StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
MyEvent.h
1 #ifndef MYEVENT_H
2 #define MYEVENT_H
3 
4 #include <TObject.h>
5 #include <TClonesArray.h>
6 #include <TVector3.h>
7 
8 class MyPoint;
9 class MyMcTrack;
10 
11 class MyEvent : public TObject{
12  protected:
13  int fRunId;
14  int fEventId;
15  int fDate;
16  int fTime;
17  int fTrigger;
18  int fPrescale[4];
19  int fHiTowAdc;
20  int fHiTowId;
21  int fHiTowStat;
22  float fHiTowEn;
23  TVector3 fVertex;
24  int fGoodPrimaryTracks;
25  int fGoodPrimaryTracksBarrelW;//0<eta<1
26  int fGoodGlobalTracks;
27  int fFtpcRefMultTracks;
28  int fCratesCorrupted;
29  int fModulesNoHits;
30  int fModulesBad;
31  float fEnBarrel;
32  float fTpcPt;
33  float fTpcPtBarrelW;//0<eta<1
34  float fZdcSumW;
35  float fZdcSumE;
36  float fZdcVertexZ;
37  float fBbcSumE;
38  float fBbcSumW;
39  float fCtbSum;//mips
40  //new->
41  float fBbcVertexZ;
42  //<-
43 
44  float fWeight;
45  float fPartonPt;
46 
47  int fNumberOfPoints;
48  int fNumberOfMcPhotons;
49  int fNumberOfMcPions;
50 
51  TClonesArray *fPointArray;
52  TClonesArray *fMcPhotonArray;
53  TClonesArray *fMcPionArray;
54  MyMcTrack *fMcTrack;
55 
56  public:
57  MyEvent(int run=0,int ev=0,int date=0,int time=0);
58  MyEvent(const MyEvent&);
59  ~MyEvent();
60 
61  int runId() {return fRunId;}
62  int eventId() {return fEventId;}
63  int date() {return fDate;}
64  int time() {return fTime;}
65  int trigger() {return fTrigger;}
66  int prescale(unsigned int i) {return fPrescale[i];}
67  int highTowerAdc() {return fHiTowAdc;}
68  int highTowerId() {return fHiTowId;}
69  int highTowerStatus() {return fHiTowStat;}
70  float highTowerEnergy() {return fHiTowEn;}
71  TVector3 vertex() {return fVertex;}
72  int goodPrimaries() {return fGoodPrimaryTracks;}
73  int goodPrimBarrel() {return fGoodPrimaryTracksBarrelW;}
74  int goodGlobals() {return fGoodGlobalTracks;}
75  int refMult() {return fFtpcRefMultTracks;}
76  int corruptedCrates() {return fCratesCorrupted;}
77  int modulesNoHits() {return fModulesNoHits;}
78  int modulesBad() {return fModulesBad;}
79  int numberOfPoints() {return fNumberOfPoints;}
80  int numberOfMcPhotons() {return fNumberOfMcPhotons;}
81  int numberOfMcPions() {return fNumberOfMcPions;}
82 
83  float energyInBarrel() {return fEnBarrel;}
84  float momentumInTpc() {return fTpcPt;}
85  float momentumInTpcWest() {return fTpcPtBarrelW;}
86  float zdcSumWest() {return fZdcSumW;}
87  float zdcSumEast() {return fZdcSumE;}
88  float zdcVertexZ() {return fZdcVertexZ;}
89  float bbcSumEast() {return fBbcSumE;}
90  float bbcSumWest() {return fBbcSumW;}
91  float ctbSum() {return fCtbSum;}
92  float bbcVertexZ() {return fBbcVertexZ;}
93 
94  float weight() {return fWeight;}
95  float partonPt() {return fPartonPt;}
96 
97  TClonesArray *getPointArray() {return fPointArray;}//array with barrel points
98  TClonesArray *getMcPhotonArray() {return fMcPhotonArray;}//array with mc photons
99  TClonesArray *getMcPionArray() {return fMcPionArray;}
100  MyMcTrack *getMcTrack() {return fMcTrack;}//the generated meson/gamma
101 
102  void setRunId(int val) {fRunId=val;}
103  void setEventId(int val) {fEventId=val;}
104  void setDate(int val) {fDate=val;}
105  void setTime(int val) {fTime=val;}
106  void setTrigger(int val) {fTrigger=val;}
107  void setPrescale(unsigned int i,int val) {fPrescale[i]=val;}
108  void setHighTowerAdc(int val) {fHiTowAdc=val;}
109  void setHighTowerId(int val) {fHiTowId=val;}
110  void setHighTowerStatus(int val) {fHiTowStat=val;}
111  void setHighTowerEnergy(float val) {fHiTowEn=val;}
112  void setVertex(float val1,float val2,float val3){
113  fVertex.SetX(val1);
114  fVertex.SetY(val2);
115  fVertex.SetZ(val3);
116  }
117  void setGoodPrimaries(int val) {fGoodPrimaryTracks=val;}
118  void setGoodPrimBarrel(int val) {fGoodPrimaryTracksBarrelW=val;}
119  void setGoodGlobals(int val) {fGoodGlobalTracks=val;}
120  void setRefMult(int val) {fFtpcRefMultTracks=val;}
121  void setCorruptedCrates(int val) {fCratesCorrupted=val;}
122  void setModulesNoHits(int val) {fModulesNoHits=val;}
123  void setModulesBad(int val) {fModulesBad=val;}
124 
125  void setEnergyInBarrel(float val) {fEnBarrel=val;}
126  void setMomentumInTpc(float val) {fTpcPt=val;}
127  void setMomentumInTpcWest(float val) {fTpcPtBarrelW=val;}
128  void setZdcSumWest(float val) {fZdcSumW=val;}
129  void setZdcSumEast(float val) {fZdcSumE=val;}
130  void setZdcVertexZ(float val) {fZdcVertexZ=val;}
131  void setBbcSumEast(float val) {fBbcSumE=val;}
132  void setBbcSumWest(float val) {fBbcSumW=val;}
133  void setCtbSum(float val) {fCtbSum=val;}
134  void setBbcVertexZ(float val) {fBbcVertexZ=val;}
135 
136  void setWeight(float val) {fWeight=val;}
137  void setPartonPt(float val) {fPartonPt=val;}
138 
139  void addPoint(MyPoint*);
140  void addMcPhoton(MyMcTrack*);
141  void addMcPion(MyMcTrack*);
142  void setMcTrack(MyMcTrack*);
143 
144  ClassDef(MyEvent,6)
145 };
146 #endif
147 
Definition: MyPoint.h:7