Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DBCALTruthShower.h
Go to the documentation of this file.
1 #ifndef _DBCALTruthShower_
2 #define _DBCALTruthShower_
3 
4 #include <JANA/JObject.h>
5 #include <JANA/JFactory.h>
6 using namespace jana;
7 
8 
9 class DBCALTruthShower:public JObject{
10  public:
11  JOBJECT_PUBLIC(DBCALTruthShower);
12 
13  int track; ///< This is the unique number that GEANT has assigned the particle
14  int itrack; ///< This is the index within the MCThrown structure of this track
15  int ptype; ///< This is the particle ID number
16  int primary;
17  float phi;
18  float r;
19  float z;
20  float t;
21  float E;
22  float px;
23  float py;
24  float pz;
25 
26  void toStrings(vector<pair<string,string> > &items)const{
27  AddString(items, "ptype", "%d", ptype);
28  AddString(items, "track", "%d", track);
29  AddString(items, "itrack", "%d", itrack);
30  AddString(items, "primary", "%d", primary);
31  AddString(items, "phi", "%1.3f", phi);
32  AddString(items, "r", "%4.3f", r);
33  AddString(items, "z", "%4.1f", z);
34  AddString(items, "t", "%4.3f", t);
35  AddString(items, "p", "%4.3f", sqrt(px*px + py*py + pz*pz));
36  AddString(items, "E", "%4.3f", E);
37  }
38 };
39 
40 #endif // _DBCALTruthShower_
41 
Definition: track.h:16
int track
This is the unique number that GEANT has assigned the particle.
int itrack
This is the index within the MCThrown structure of this track.
int ptype
This is the particle ID number.
void toStrings(vector< pair< string, string > > &items) const
TH1D * py[NCHANNELS]
double sqrt(double)