Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DMCTrackHit.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: DMCTrackHit.h
4 // Created: Mon Apr 4 08:18:07 EDT 2005
5 // Creator: davidl (on Darwin wire129.jlab.org 7.8.0 powerpc)
6 //
7 
8 #ifndef _DMCTrackHit_
9 #define _DMCTrackHit_
10 
11 #include <JANA/JObject.h>
12 using namespace jana;
13 
14 #include "GlueX.h"
15 
16 class DMCTrackHit:public JObject{
17  public:
18  JOBJECT_PUBLIC(DMCTrackHit);
19 
20  float r,phi,z; ///< coordinates of hit in cm and rad
21  int track; ///< Track number
22  int itrack; ///< MC track index
23  int primary; ///< primary track=1 not primary track=0
24  int ptype; /// particle type
25  DetectorSystem_t system;///< 1=CDC 2=FDC 4=BCAL 8=TOF 16=Cherenkov 32=FCAL 64=UPV
26 
27  void toStrings(vector<pair<string,string> > &items)const{
28  AddString(items, "r(cm)", "%3.1f", r);
29  AddString(items, "phi(rad)", "%1.3f", phi);
30  AddString(items, "z(cm)", "%3.1f", z);
31  AddString(items, "track", "%d", track);
32  AddString(items, "itrack", "%d", itrack);
33  AddString(items, "primary", "%d", primary);
34  AddString(items, "ptype", "%d", ptype);
35  AddString(items, "system", "%s", SystemName(system));
36  }
37 };
38 
39 #endif // _DMCTrackHit_
40 
Definition: track.h:16
DetectorSystem_t
Definition: GlueX.h:15
DetectorSystem_t system
particle type
Definition: DMCTrackHit.h:25
float z
coordinates of hit in cm and rad
Definition: DMCTrackHit.h:20
const char * SystemName(DetectorSystem_t sys)
Definition: GlueX.h:38
int primary
primary track=1 not primary track=0
Definition: DMCTrackHit.h:23
int itrack
MC track index.
Definition: DMCTrackHit.h:22
int track
Track number.
Definition: DMCTrackHit.h:21
void toStrings(vector< pair< string, string > > &items) const
Definition: DMCTrackHit.h:27