LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EventSummary.h
Go to the documentation of this file.
1 #ifndef EventSummary_h
2 #define EventSummary_h 1
3 
4 #include "lcio.h"
5 #include "UTIL/LCFixedObject.h"
6 
7 #include "UTIL/ProcessFlag.h"
8 
9 
10 namespace UTIL {
11 
13  enum struct EventSummaryIntValues {
14  runnum ,
15  evtnum ,
16  chpfonum ,
17  neupfonum ,
18  elnum ,
19  munum ,
20  taunum ,
21  phonum ,
22  jetnum ,
23  bcpfonum ,
24  trknum ,
25  clunum ,
26  mcproc ,
27  SIZE
28  } ;
29 
32 
35  epfotot ,
36  emcptot ,
37  thrust ,
38  spher ,
39  emiss ,
40  pxmiss ,
41  pymiss ,
42  pzmiss ,
43  y12 ,
44  y23 ,
45  y34 ,
46  y45 ,
47  y56 ,
48  y67 ,
49  y78 ,
50  SIZE
51  } ;
52 
55 
58  SIZE
59  } ;
62 
63 
64 
70  class EventSummary : public UTIL::LCFixedObject<int(ESI::SIZE),int(ESF::SIZE),int(ESD::SIZE)> {
71 
72  public:
73 
76  EventSummary() = default ;
77 
80  EventSummary(LCObject* o) : UTIL::LCFixedObject<int(ESI::SIZE),int(ESF::SIZE),int(ESD::SIZE)>( o ){ }
81 
83  virtual ~EventSummary() { /* no op*/ }
84 
85 // ------ the class interface ------------------------------------
86 
90  int getI( ESI intval) { return obj()->getIntVal( (int) intval ); }
91 
95  float getF( ESF floatval) { return obj()->getFloatVal( (int) floatval ); }
96 
100  double getD( ESD doubleval) { return obj()->getDoubleVal( (int) doubleval ); }
101 
105  void setI( ESI intval, int val ) { obj()->setIntVal( (int) intval , val); }
106 
110  void setF( ESF floatval, float val ) { obj()->setFloatVal( (int) floatval , val); }
111 
115  void setD( ESD doubleval, double val ) { obj()->setDoubleVal( (int) doubleval , val); }
116 
117  // -----------------------------------------------------------
118 
119  void print( std::ostream& os ) ;
120 
121 
122  // -------- need to implement abstract methods from LCGenericObject
123 
124  const std::string getTypeName() const {
125  return"EventSummary" ;
126  }
127 
129  return "i:runnum,i:evtnum,i:chpfonum,i:neupfonum,i:elnum,i:munum,i:taunum,i:phonum,i:jetnum,i:bcpfonum,i:trknum,i:clunum,i:mcproc,f:epfotot,f:emcptot,f:thrust,f:spher,f:emiss,f:pxmiss,f:pymiss,f:pzmiss,f:y12,f:y23,f:y34,f:y45,f:y56,f:y67,f:y78" ;
130  }
131 
132 
133  }; // class
134 
135 }
136 #endif
137 //=============================================================================
EventSummaryFloatValues ESD
Short name for EventSummaryDoubleValues.
Definition: EventSummary.h:61
total reconstructed energy
virtual void setFloatVal(unsigned index, float value)
Sets the float value at the given index.
int getI(ESI intval)
return the specified int value - see EventSummaryIntValues for possible values, for example getI( ESI...
Definition: EventSummary.h:90
number of isloted electrons
virtual int getIntVal(int index) const
Returns the integer value for the given index.
EventSummary()=default
Convenient c&#39;tor.
EventSummary(LCObject *o)
&#39;Copy constructor&#39; needed to interpret LCCollection read from file/database.
Definition: EventSummary.h:80
y34 flip value for exclusive jet clustering
virtual float getFloatVal(int index) const
Returns the float value for the given index.
EventSummaryIntValues ESI
Short name for EventSummaryIntValues.
Definition: EventSummary.h:31
Utility class for storing an event summary as an LCGenericObject.
Definition: EventSummary.h:70
y78 flip value for exclusive jet clustering
void print(std::ostream &os)
y67 flip value for exclusive jet clustering
number of tracks - if present
void setD(ESD doubleval, double val)
set the specified double value - see EventSummaryDoubleValues for possible values, not used currently
Definition: EventSummary.h:115
EventSummaryFloatValues ESF
Short name for EventSummaryFloatValues.
Definition: EventSummary.h:54
STL class.
number of isloted muons
virtual double getDoubleVal(int index) const
Returns the double value for the given index.
total visible true energy (exluding neutrinos)
number of clusters - if present
virtual void setIntVal(unsigned index, int value)
Sets the integer value at the given index.
generated Monte Carlo ProcessFlag
number of PFOs in the BeamCal
y45 flip value for exclusive jet clustering
number of isloted photons
const std::string getDataDescription() const
The description string.
Definition: EventSummary.h:128
y23 flip value for exclusive jet clustering
void setI(ESI intval, int val)
set the specified int value - see EventSummaryIntValues for possible values, for example set( ESI::ch...
Definition: EventSummary.h:105
EventSummaryFloatValues
enum class defining valid float values in EventSummary
Definition: EventSummary.h:34
y12 flip value for exclusive jet clustering
EventSummaryIntValues
enum class defining valid int values in EventSummary
Definition: EventSummary.h:13
EventSummaryDoubleValues
helper struct with double values for EventSummary
Definition: EventSummary.h:57
virtual ~EventSummary()
Important for memory handling.
Definition: EventSummary.h:83
Template class for fixed size LCGenericObject subclasses.
Definition: LCFixedObject.h:25
spericity value of the event
thrust value of the event
y56 flip value for exclusive jet clustering
virtual void setDoubleVal(unsigned index, double value)
Sets the double value at the given index.
IMPL::LCGenericObjectImpl * obj()
The LCGenericObjectImpl .
Definition: LCFixedObject.h:80
float getF(ESF floatval)
return the specified float value - see EventSummaryFloatValues for possible values, for example getF( ESF::thrust ) returns the thrust value of the event.
Definition: EventSummary.h:95
STL class.
double getD(ESD doubleval)
return the specified double value - see EventSummaryDoubleValues for possible values, not used currently.
Definition: EventSummary.h:100
const std::string getTypeName() const
The type name of the user class (typically the class name) This type name is stored as a collection p...
Definition: EventSummary.h:124
number of jets - if only one jet collection, -1 else
void setF(ESF floatval, float val)
set the specified float value - see EventSummaryFloatValues for possible values, for example set( ESF...
Definition: EventSummary.h:110