Jpp  17.3.2
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions
PhysicsEvent.hh File Reference
#include <ostream>
#include <iomanip>
#include <vector>
#include <limits>
#include <TROOT.h>
#include <TObject.h>
#include "antares-dataformat/DataTypes.hh"
#include "antares-dataformat/Ars.hh"
#include "antares-dataformat/EventPreamble.hh"

Go to the source code of this file.

Classes

class  ARS_Hit< T >
 Template hit. More...
 
class  SPE_Hit
 SPE hit. More...
 
class  AWF_Hit
 AWF hit. More...
 
class  DWF_Hit
 DWF hit. More...
 
class  TriggeredSPE_Hit
 Triggered SPE hit. More...
 
class  PhysicsEvent
 Physics event. More...
 
class  PhysicsEvent::const_iterator< T >
 Template vector<T>::iterator. More...
 

Functions

 ClassDefT2 (ARS_Hit, T)
 
 ClassImpT (ARS_Hit, T)
 
bool operator== (const SPE_Hit &first, const SPE_Hit &second)
 equal operator for SPE hit. More...
 
bool operator!= (const SPE_Hit &first, const SPE_Hit &second)
 not-equal operator for SPE hit. More...
 
bool operator== (const PhysicsEvent &first, const PhysicsEvent &second)
 equal operator for physics event. More...
 
bool operator!= (const PhysicsEvent &first, const PhysicsEvent &second)
 not-equal operator for physics event. More...
 
bool operator< (const PhysicsEvent &first, const PhysicsEvent &second)
 Comparator for physics event; earliest event first. More...
 
template<class T >
std::vector< T >::difference_type distance (typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
 Specialisation of STL distance. More...
 

Function Documentation

ClassDefT2 ( ARS_Hit  ,
T   
)
ClassImpT ( ARS_Hit  ,
T   
)
bool operator== ( const SPE_Hit first,
const SPE_Hit second 
)
inline

equal operator for SPE hit.

Parameters
firstSPE hit
secondSPE hit
Returns
true if first equals second; else false

Definition at line 362 of file PhysicsEvent.hh.

363 {
364  return (first.lcm_id == second.lcm_id &&
365  first.ars_id == second.ars_id &&
366  first.timestamp == second.timestamp &&
367  first.tvc == second.tvc &&
368  first.avc == second.avc);
369 }
unsigned char tvc
ARS Time to Voltage Convertor.
Definition: Ars.hh:145
unsigned char avc
ARS Analogue to Voltage Convertor.
Definition: Ars.hh:142
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
unsigned short lcm_id
LCM identifier.
Definition: PhysicsEvent.hh:26
unsigned char ars_id
ARS identifier.
Definition: PhysicsEvent.hh:28
bool operator!= ( const SPE_Hit first,
const SPE_Hit second 
)
inline

not-equal operator for SPE hit.

Parameters
firstSPE hit
secondSPE hit
Returns
true if first not equals second; else false

Definition at line 378 of file PhysicsEvent.hh.

379 {
380  return (first.lcm_id != second.lcm_id ||
381  first.ars_id != second.ars_id ||
382  first.timestamp != second.timestamp ||
383  first.tvc != second.tvc ||
384  first.avc != second.avc);
385 }
unsigned char tvc
ARS Time to Voltage Convertor.
Definition: Ars.hh:145
unsigned char avc
ARS Analogue to Voltage Convertor.
Definition: Ars.hh:142
unsigned int timestamp
ARS timestamp (24 bits)
Definition: Ars.hh:44
unsigned short lcm_id
LCM identifier.
Definition: PhysicsEvent.hh:26
unsigned char ars_id
ARS identifier.
Definition: PhysicsEvent.hh:28
bool operator== ( const PhysicsEvent first,
const PhysicsEvent second 
)
inline

equal operator for physics event.

Parameters
firstphysics event
secondphysics event
Returns
true if first equals second; else false

Definition at line 395 of file PhysicsEvent.hh.

396 {
397  return (first.MinT() < second.MaxT() &&
398  first.MaxT() > second.MinT());
399 }
const double MinT() const
time of first hit in event
const double MaxT() const
time of last hit in event
bool operator!= ( const PhysicsEvent first,
const PhysicsEvent second 
)
inline

not-equal operator for physics event.

Parameters
firstphysics event
secondphysics event
Returns
true if first not equals second; else false

Definition at line 408 of file PhysicsEvent.hh.

409 {
410  return (first.MinT() > second.MaxT() ||
411  first.MaxT() < second.MinT());
412 }
const double MinT() const
time of first hit in event
const double MaxT() const
time of last hit in event
bool operator< ( const PhysicsEvent first,
const PhysicsEvent second 
)
inline

Comparator for physics event; earliest event first.

Parameters
firstphysics event
secondphysics event
Returns
true if first earlier than second; else false

Definition at line 421 of file PhysicsEvent.hh.

422 {
423  return first.MinT() < second.MinT();
424 }
const double MinT() const
time of first hit in event
template<class T >
std::vector<T>::difference_type distance ( typename std::vector< T >::const_iterator  first,
typename PhysicsEvent::const_iterator< T second 
)
inline

Specialisation of STL distance.

Parameters
firstfirst position
secondlast position
Returns
distance

Definition at line 434 of file PhysicsEvent.hh.

436 {
437  return std::distance(first, (typename std::vector<T>::const_iterator&) second);
438 }
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first