Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DTOFHitMC.h
Go to the documentation of this file.
1 // $Id: DTOFHitRawMC.h Wed Jan 19 14:22:41 EST 2011
2 //
3 /// File: DTOFHitMC.h
4 /// Created: Wed Jan 19 14:22:41 EST 2011
5 /// Creator: B. Zihlmann
6 /// Purpose: Container class to hold Monte Carlo track data,
7 /// like track id number, particle type ect.
8 //
9 
10 #ifndef _DTOFHitMC_
11 #define _DTOFHitMC_
12 
13 #include "JANA/JObject.h"
14 #include "JANA/JFactory.h"
15 
16 class DTOFHitMC:public JObject{
17 
18  public:
20 
21  int plane; // plane (0: vertical, 1: horizontal)
22  int bar; // bar number
23  int end; // 0: north (beam-left), 1: south (beam-right)
24  int ptype; // GEANT particle type
25  int itrack; // Track number of primary particle causing the hit
26  float dist; // Hit distance from center of paddle (or x=0)
27  float x; // hit location in global coordiantes
28  float y;
29  float z;
30  float px; // particle momentum
31  float py;
32  float pz;
33  float E; // particle Energy
34 
35  void toStrings(vector<pair<string,string> > &items)const{
36  AddString(items, "bar", "%d", bar);
37  AddString(items, "plane", "%d", plane);
38  AddString(items, "end", "%d", end);
39  AddString(items, "dist", "%12.4e", dist);
40  AddString(items, "x", "%12.4e", x);
41  AddString(items, "y", "%12.4e", y);
42  AddString(items, "z", "%12.4e", z);
43  AddString(items, "px", "%12.4e", px);
44  AddString(items, "py", "%12.4e", py);
45  AddString(items, "pz", "%12.4e", pz);
46  AddString(items, "E", "%12.4e", E);
47  AddString(items, "ptype", "%d", ptype);
48  AddString(items, "itrack", "%d", itrack);
49  }
50 };
51 
52 #endif // _DTOFHitMC_
53 
void toStrings(vector< pair< string, string > > &items) const
Definition: DTOFHitMC.h:35
int ptype
Definition: DTOFHitMC.h:24
float y
Definition: DTOFHitMC.h:28
float pz
Definition: DTOFHitMC.h:32
float dist
Definition: DTOFHitMC.h:26
float x
Definition: DTOFHitMC.h:27
int end
Definition: DTOFHitMC.h:23
float py
Definition: DTOFHitMC.h:31
File: DTOFHitMC.h Created: Wed Jan 19 14:22:41 EST 2011 Creator: B. Zihlmann Purpose: Container class...
Definition: DTOFHitMC.h:16
float px
Definition: DTOFHitMC.h:30
float E
Definition: DTOFHitMC.h:33
int bar
Definition: DTOFHitMC.h:22
int plane
Definition: DTOFHitMC.h:21
int itrack
Definition: DTOFHitMC.h:25
float z
Definition: DTOFHitMC.h:29
JOBJECT_PUBLIC(DTOFHitMC)