StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TSkimPionEvent.h
1 #ifndef STAR_Pi0Event
2 #define STAR_Pi0Event
3 
4 // Header file for Skim Pion Event class and sub-classes with specific information
5 
6 #include "TObject.h"
7 #include "TClonesArray.h"
8 #include "TRefArray.h"
9 #include "TRef.h"
10 #include "TH1.h"
11 #include "TMath.h"
12 #include <vector>
13 
14 using namespace std;
15 
16 class TSkimPionCandidate : public TObject {
17 
18 private:
19  Float_t m_Pt;
20  Float_t m_Mass;
21  Float_t m_Eta;
22  Float_t m_Phi;
23  Float_t m_Asymmetry;
24  Float_t m_CosAngle;
25  Float_t m_TowerId1;
26  Float_t m_TowerId2;
27  Int_t m_ChargedAssociation1;
28  Int_t m_ChargedAssociation2;
29  Int_t m_SMDFlagg1;
30  Int_t m_SMDFlagg2;
31  Float_t m_Energy1;
32  Float_t m_Energy2;
33  Float_t m_TowerEnergy1;
34  Float_t m_TowerEnergy2;
35  Float_t m_SMDe1;
36  Float_t m_SMDp1;
37  Float_t m_SMDe2;
38  Float_t m_SMDp2;
39  Float_t m_Phi1;
40  Float_t m_Eta1;
41  Float_t m_Phi2;
42  Float_t m_Eta2;
43 
44 public:
47  virtual ~TSkimPionCandidate() {};
48  void Clear(const Option_t* option ="") {};
49  // Getters:
50  Float_t Pt() const {return m_Pt;}
51  Float_t Mass() const {return m_Mass;}
52  Float_t Eta() const {return m_Eta;}
53  Float_t Phi() const {return m_Phi;}
54  Float_t Asymmetry() const {return m_Asymmetry;}
55  Float_t CosAngle() const {return m_CosAngle;}
56  Float_t TowerId1() const {return m_TowerId1;}
57  Float_t TowerId2() const {return m_TowerId2;}
58  Int_t ChargedAssociation1() const {return m_ChargedAssociation1;}
59  Int_t ChargedAssociation2() const {return m_ChargedAssociation2;}
60  Int_t SMDFlagg1() const {return m_SMDFlagg1;}
61  Int_t SMDFlagg2() const {return m_SMDFlagg2;}
62  Float_t Energy1() const {return m_Energy1;}
63  Float_t Energy2() const {return m_Energy2;}
64  Float_t TowerEnergy1() const {return m_TowerEnergy1;}
65  Float_t TowerEnergy2() const {return m_TowerEnergy2;}
66  Float_t SMDe1() const {return m_SMDe1;}
67  Float_t SMDp1() const {return m_SMDp1;}
68  Float_t SMDe2() const {return m_SMDe2;}
69  Float_t SMDp2() const {return m_SMDp2;}
70  Float_t Phi1() const {return m_Phi1;}
71  Float_t Eta1() const {return m_Eta1;}
72  Float_t Phi2() const {return m_Phi2;}
73  Float_t Eta2() const {return m_Eta2;}
74  // Setters:
75  void SetAll(Float_t data[24]);
76 
77  ClassDef(TSkimPionCandidate,1)
78  };
79 
80 class THit : public TObject {
81 private:
82  Float_t m_X;
83  Float_t m_Y;
84  Float_t m_Z;
85  Int_t m_Id;
86  Float_t m_Energy;
87  Float_t m_Pt;
88  Int_t m_NTracks;
89  Int_t m_SMDFlag;
90  Float_t m_EnergySMDe;
91  Float_t m_EnergySMDp;
92  Float_t m_EnergyTower;
93  Float_t m_SizeSMDe;
94  Float_t m_SizeSMDp;
95  Float_t m_SizeTower;
96  Float_t m_Phi;
97  Float_t m_Eta;
98 
99 public:
100  THit();
101  THit(const THit& orig);
102  virtual ~THit() {};
103  void Clear(const Option_t* option =""){};
104  Float_t X() const {return m_X;}
105  Float_t Y() const {return m_Y;}
106  Float_t Z() const {return m_Z;}
107  Int_t Id() const {return m_Id;}
108  Float_t Energy() const {return m_Energy;}
109  Float_t Pt() const {return m_Pt;}
110  Int_t NTracks() const {return m_NTracks;}
111  Int_t SMDFlag() const {return m_SMDFlag;}
112  Float_t EnergySMDe() const {return m_EnergySMDe;}
113  Float_t EnergySMDp() const {return m_EnergySMDp;}
114  Float_t EnergyTower() const {return m_EnergyTower;}
115  Float_t SizeSMDe() const {return m_SizeSMDe;}
116  Float_t SizeSMDp() const {return m_SizeSMDp;}
117  Float_t SizeTower() const {return m_SizeTower;}
118  Float_t Phi() const {return m_Phi;}
119  Float_t Eta() const {return m_Eta;}
120  void SetAll(Float_t data[16]);
121 
122  ClassDef(THit,1)
123  };
124 
125 
126 class TSkimPionEvent : public TObject {
127 
128 private:
129  Int_t m_EventNo;
130  Int_t m_RunNo;
131  Int_t m_FillNo;
132  Float_t m_VertexX;
133  Float_t m_VertexY;
134  Float_t m_VertexZ;
135  Int_t m_IsMB;
136  Int_t m_IsHTTPL2;
137  Int_t m_IsHTTPL2_Test;
138  Int_t m_IsSoftHTTPL2;
139  Int_t m_IsSoftMB;
140  Int_t m_HiTowerAdc6Bit;
141  Int_t m_BEMCPoints;
142  Float_t m_ChargedPtSum;
143  Float_t m_NeutralEnergy;
144  Int_t m_PrescaleMB;
145  Int_t m_PrescaleHTTPL2;
146  Int_t m_PrescaleHTTPL2_Test;
147  Int_t m_BBCTrig;
148  Int_t m_NPi0Candidates;
149  Int_t m_NHits;
150  Int_t m_BunchX48;
151  Int_t m_BunchX7;
152  Int_t m_SpinBit4;
153  Int_t m_MaskedXing;
154  Int_t m_ValidSpin;
155  Int_t m_PolLong;
156  Int_t m_DbSpinBit;
157  Float_t m_BBCVertexZ;
158  Float_t m_BBCTimeBin;
159  Int_t m_OnlyBBCVtx;
160 
161  TClonesArray *m_SkimPionCandidates; //->
162  TClonesArray *m_Hits; //->
163  static TClonesArray *aSkimPionCandidates;
164  static TClonesArray *aHits;
165 
166 public:
167  TSkimPionEvent();
168  virtual ~TSkimPionEvent();
169  void Clear(const Option_t* option ="");
170  static void Reset(Option_t *option ="");
171  //Getters
172  Int_t EventNo() const {return m_EventNo;}
173  Int_t RunNo() const {return m_RunNo;}
174  Int_t FillNo() const {return m_FillNo;}
175  Float_t VertexX() const {return m_VertexX;}
176  Float_t VertexY() const {return m_VertexY;}
177  Float_t VertexZ() const {return m_VertexZ;}
178  Int_t IsMB() const {return m_IsMB;}
179  Int_t IsHTTPL2() const {return m_IsHTTPL2;}
180  Int_t IsHTTPL2_Test() const {return m_IsHTTPL2_Test;}
181  Int_t IsSoftHTTPL2() const {return m_IsSoftHTTPL2;}
182  Int_t IsSoftMB() const {return m_IsSoftMB;}
183  Int_t HiTowerAdc6Bit() const {return m_HiTowerAdc6Bit;}
184  Int_t BEMCPoints() const {return m_BEMCPoints;}
185  Float_t ChargedPtSum() const {return m_ChargedPtSum;}
186  Float_t NeutralEnergy() const {return m_NeutralEnergy;}
187  Int_t PrescaleMB() const {return m_PrescaleMB;}
188  Int_t PrescaleHTTPL2() const {return m_PrescaleHTTPL2;}
189  Int_t PrescaleHTTPL2_Test() const {return m_PrescaleHTTPL2_Test;}
190  Int_t BBCTrig() const {return m_BBCTrig;}
191  Int_t NPi0Candidates() const {return m_NPi0Candidates;}
192  Int_t NHits() const {return m_NHits;}
193  Int_t BunchX48() const {return m_BunchX48;}
194  Int_t BunchX7() const {return m_BunchX7;}
195  Int_t SpinBit() const {return m_SpinBit4;}
196  Int_t MaskedXing() const {return m_MaskedXing;}
197  Int_t ValidSpin() const {return m_ValidSpin;}
198  Int_t PolLong() const {return m_PolLong;}
199  Int_t DbSpinBit() const {return m_DbSpinBit;}
200  Float_t BBCVertexZ() const {return m_BBCVertexZ;}
201  Int_t OnlyBBCVertex() const {return m_OnlyBBCVtx;}
202  Float_t BBCTimeBin() const {return m_BBCTimeBin;}
203  TClonesArray* SkimPionCandidates() const {return m_SkimPionCandidates;}
204  TSkimPionCandidate* SkimPionCandidate(Int_t i) {return (TSkimPionCandidate*)m_SkimPionCandidates->At(i);}
205  TClonesArray* Hits() const {return m_Hits;}
206  THit* Hit(Int_t i) {return (THit*)m_Hits->At(i);}
207 
208 
209  //Setters
210  void SetEventNo(Int_t evN) {m_EventNo = evN;}
211  void SetRunNo(Int_t rN) {m_RunNo = rN;}
212  void SetFillNo(Int_t fN) {m_FillNo = fN;}
213  void SetVertex(Float_t vx, Float_t vy, Float_t vz) {m_VertexX = vx; m_VertexY = vy; m_VertexZ = vz;}
214  void SetTriggers(Int_t tr[3]) {m_IsMB = tr[0]; m_IsHTTPL2 = tr[1]; m_IsHTTPL2_Test = tr[2];}
215  void SetSoftTriggers(Int_t sftr[2]) {m_IsSoftMB = sftr[0]; m_IsSoftHTTPL2 = sftr[1];}
216  void SetPrescales(Int_t pr[3]) {m_PrescaleMB = pr[0]; m_PrescaleHTTPL2 = pr[1]; m_PrescaleHTTPL2_Test = pr[2];}
217  void SetHiTowerAdc6Bit(Int_t ht) {m_HiTowerAdc6Bit = ht;}
218  void SetBEMCPoints(Int_t points) {m_BEMCPoints = points;}
219  void SetChargedPtSum(Float_t sum) {m_ChargedPtSum = sum;}
220  void SetNeutralEnergy(Float_t en) {m_NeutralEnergy = en;}
221  void SetBBCTrig(Int_t bt) {m_BBCTrig = bt;}
222  void SetBunchX48(Int_t b48) {m_BunchX48 = b48;}
223  void SetBunchX7(Int_t b7) {m_BunchX7 = b7;}
224  void SetSpinBit(Int_t sb) {m_SpinBit4 = sb;}
225  void SetMaskedXing(Int_t mask) {m_MaskedXing = mask;}
226  void SetValidSpin(Int_t val) {m_ValidSpin = val;}
227  void SetPolLong(Int_t pol) {m_PolLong = pol;}
228  void SetDbSpinBit(Int_t sb) {m_DbSpinBit = sb;}
229  void SetBBCVertexZ(Float_t vtxz) {m_BBCVertexZ = vtxz;}
230  void SetOnlyBBCVertex(Int_t flag = 1) {m_OnlyBBCVtx = flag;}
231  void SetBBCTimeBin(Float_t bin) {m_BBCTimeBin = bin;}
232  TSkimPionCandidate* AddSkimPionCandidate(TSkimPionCandidate& cand);
233  THit* AddHit(THit& cand);
234 
235  ClassDef(TSkimPionEvent,1)
236  };
237 #endif