]>
Commit | Line | Data |
---|---|---|
3513afb7 | 1 | /************************************************************************** |
2 | * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
3 | * * | |
4 | * Author: The ALICE Off-line Project. * | |
5 | * Contributors are mentioned in the code where appropriate. * | |
6 | * * | |
7 | * Permission to use, copy, modify and distribute this software and its * | |
8 | * documentation strictly for non-commercial purposes is hereby granted * | |
9 | * without fee, provided that the above copyright notice appears in all * | |
10 | * copies and that both the copyright notice and this permission notice * | |
11 | * appear in the supporting documentation. The authors make no claims * | |
12 | * about the suitability of this software for any purpose. It is * | |
13 | * provided "as is" without express or implied warranty. * | |
14 | **************************************************************************/ | |
15 | // | |
16 | // Debug event to look at the distribution of the variable we are cutting on | |
17 | // | |
18 | // | |
19 | #ifndef ALIHFEREDUCEDEVENT_H | |
20 | #define ALIHFEREDUCEDEVENT_H | |
21 | ||
22 | #include <TObject.h> | |
23 | ||
24 | class TObjArray; | |
25 | class AliHFEreducedTrack; | |
26 | class AliHFEreducedMCParticle; | |
27 | ||
28 | class AliHFEreducedEvent : public TObject{ | |
29 | public: | |
30 | AliHFEreducedEvent(); | |
31 | AliHFEreducedEvent(const AliHFEreducedEvent &ref); | |
32 | AliHFEreducedEvent &operator=(const AliHFEreducedEvent &ref); | |
33 | ~AliHFEreducedEvent(); | |
34 | ||
35 | void AddTrack(const AliHFEreducedTrack *track); | |
36 | const AliHFEreducedTrack *GetTrack(int itrk) const; | |
37 | Int_t GetNumberOfTracks() const { return fNtracks; } | |
38 | void AddMCParticle(const AliHFEreducedMCParticle *mctrack); | |
39 | const AliHFEreducedMCParticle *GetMCParticle(int itrk) const; | |
40 | Int_t GetNumberOfMCParticles() const { return fNmcparticles; } | |
41 | ||
7e695443 | 42 | Float_t GetVX() const { return fVX[0]; } |
43 | Float_t GetVY() const { return fVY[0]; } | |
44 | Float_t GetVZ() const { return fVZ[0]; } | |
45 | Float_t GetVXSPD() const { return fVX[1]; } | |
46 | Float_t GetVYSPD() const { return fVY[1]; } | |
47 | Float_t GetVZSPD() const { return fVZ[1]; } | |
48 | Int_t GetNContribVertex() const { return fNContrib[0]; } | |
49 | Int_t GetNContribVertexSPD() const { return fNContrib[1]; } | |
50 | Bool_t HasPrimaryVertex() const { return fNContrib[0] > 0; } | |
51 | Bool_t HasPrimaryVertexSPD() const { return fNContrib[1] > 0; } | |
52 | Float_t GetVertexZResolution() const { return fVertexResolution[0]; }; | |
53 | Float_t GetVertexZResolutionSPD() const { return fVertexResolution[1]; }; | |
3513afb7 | 54 | Int_t GetRunNumber() const { return fRunNumber; } |
55 | Double_t GetCentrality() const { return fCentrality[0]; } | |
56 | Double_t GetCentralityV0M() const { return fCentrality[0]; } | |
57 | Double_t GetCentralityV0A() const { return fCentrality[1]; } | |
58 | Double_t GetCentralityV0C() const { return fCentrality[2]; } | |
59 | Double_t GetCentralityTracklets() const { return fCentrality[3]; } | |
60 | Double_t GetCentralityTracks() const { return fCentrality[4]; } | |
61 | Double_t GetCentralityZNA() const { return fCentrality[5]; } | |
4437a0d2 | 62 | Double_t GetCentralityZNC() const { return fCentrality[6]; } |
63 | Double_t GetCentralityCL0() const { return fCentrality[7]; } | |
64 | Double_t GetCentralityCL1() const { return fCentrality[8]; } | |
65 | Double_t GetCentralityCND() const { return fCentrality[9]; } | |
3513afb7 | 66 | Float_t GetV0AMultiplicity() const { return fV0Multiplicity[0]; } |
67 | Float_t GetV0CMultiplicity() const { return fV0Multiplicity[1]; } | |
68 | Float_t GetV0MMultiplicity() const { return fV0Multiplicity[0] + fV0Multiplicity[1]; } | |
69 | Float_t GetZNAEnergy() const { return fZDCEnergy[0]; } | |
70 | Float_t GetZNCEnergy() const { return fZDCEnergy[1]; } | |
71 | Float_t GetZPAEnergy() const { return fZDCEnergy[2]; } | |
72 | Float_t GetZPCEnergy() const { return fZDCEnergy[3]; } | |
73 | Float_t GetZDCNEnergySum() const { return fZDCEnergy[0] + fZDCEnergy[1]; } | |
74 | Float_t GetZDCNEnergyDifference() const { return fZDCEnergy[0] - fZDCEnergy[1]; } | |
75 | Float_t GetZDCNEnergyAsymmetry() const { return fZDCEnergy[0] + fZDCEnergy[1] != 0 ? (fZDCEnergy[0] - fZDCEnergy[1])/(fZDCEnergy[0] + fZDCEnergy[1]) : 1.; } | |
76 | Float_t GetZDCPEnergySum() const { return fZDCEnergy[2] + fZDCEnergy[3]; } | |
77 | Float_t GetZDCPEnergyDifference() const { return fZDCEnergy[2] - fZDCEnergy[3]; } | |
78 | Float_t GetZDCPEnergyAsymmetry() const { return fZDCEnergy[2] + fZDCEnergy[3] != 0 ? (fZDCEnergy[2] - fZDCEnergy[3])/(fZDCEnergy[2] + fZDCEnergy[3]) : 1.; } | |
79 | Int_t GetSPDMultiplicity() const { return fSPDMultiplicity; } | |
80 | ||
7e695443 | 81 | void SetVX(Float_t vx) { fVX[0] = vx; } |
82 | void SetVY(Float_t vy) { fVY[0] = vy; } | |
83 | void SetVZ(Float_t vz) { fVZ[0] = vz; } | |
84 | void SetVXSPD(Float_t vx) { fVX[1] = vx; } | |
85 | void SetVYSPD(Float_t vy) { fVY[1] = vy; } | |
86 | void SetVZSPD(Float_t vz) { fVZ[1] = vz; } | |
3513afb7 | 87 | void SetRunNumber(Int_t runnumber) { fRunNumber = runnumber; } |
4437a0d2 | 88 | inline void SetCentrality( |
89 | Float_t centV0M, | |
90 | Float_t centV0A, | |
91 | Float_t centV0C, | |
92 | Float_t centTLS, | |
93 | Float_t centTrks, | |
94 | Float_t centZNA, | |
95 | Float_t centZNC, | |
96 | Float_t centCL0, | |
97 | Float_t centCL1, | |
98 | Float_t centCND | |
99 | ); | |
7e695443 | 100 | void SetNContribVertex(Int_t ncontrib) { fNContrib[0] = ncontrib; } |
101 | void SetNContribVertexSPD(Int_t ncontrib) { fNContrib[1] = ncontrib; } | |
102 | void SetVertexResolution(Float_t res) { fVertexResolution[0] = res; } | |
103 | void SetVertexResolutionSPD(Float_t res) { fVertexResolution[1] = res; } | |
3513afb7 | 104 | |
105 | Bool_t IsMBTrigger() const { return TESTBIT(fTrigger, kMB); } | |
106 | Bool_t IsSemiCentralTrigger() const { return TESTBIT(fTrigger, kSemiCentral); } | |
107 | Bool_t IsCentralTrigger() const { return TESTBIT(fTrigger, kCentral); } | |
108 | Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); } | |
109 | Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); } | |
110 | Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); } | |
420bd2ea | 111 | Bool_t IsINTTrigger() const { return TESTBIT(fTrigger, kINTTRG); } |
112 | ||
3513afb7 | 113 | void SetMBTrigger() { SETBIT(fTrigger, kMB); } |
114 | void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); } | |
115 | void SetCentralTrigger() { SETBIT(fTrigger, kCentral); } | |
116 | void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); } | |
117 | void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); } | |
118 | void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); } | |
420bd2ea | 119 | void SetINTTrigger() { SETBIT(fTrigger, kINTTRG); } |
120 | ||
3513afb7 | 121 | void SetV0Multiplicity(Float_t v0A, Float_t v0C) { |
122 | fV0Multiplicity[0] = v0A; | |
123 | fV0Multiplicity[1] = v0C; | |
124 | } | |
125 | inline void SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc); | |
126 | void SetSPDMultiplicity(Int_t mult) { fSPDMultiplicity = mult; } | |
127 | ||
128 | private: | |
129 | typedef enum{ | |
130 | kMB = 0, | |
131 | kSemiCentral = 1, | |
132 | kCentral = 2, | |
133 | kEMCAL = 3, | |
134 | kTRDSE = 4, | |
420bd2ea | 135 | kTRDDQ = 5, |
136 | kINTTRG = 6 | |
3513afb7 | 137 | } Trigger_t; |
4437a0d2 | 138 | enum{ |
139 | kCentBuff = 15 | |
140 | }; | |
3513afb7 | 141 | TObjArray *fTracks; // Array with reconstructed tracks |
142 | TObjArray *fMCparticles; // Array with MC particles | |
143 | Int_t fNtracks; // Number of tracks | |
144 | Int_t fNmcparticles; // Number of MC Particles | |
145 | Int_t fRunNumber; // Run Number | |
4437a0d2 | 146 | Float_t fCentrality[kCentBuff]; // Centrality (V0M, V0A, V0C, TLS, TRK, ZNA, ZNC, CL0, CL1, CND) |
3513afb7 | 147 | Int_t fTrigger; // Trigger bits |
7e695443 | 148 | Float_t fVX[2]; // Vertex X |
149 | Float_t fVY[2]; // Vertex Y | |
150 | Float_t fVZ[2]; // Vertex Z | |
151 | Int_t fNContrib[2]; // Number of vertex contributors | |
152 | Float_t fVertexResolution[2];// z-Vertex resolution | |
3513afb7 | 153 | Float_t fV0Multiplicity[2]; // V0 multiplicity |
154 | Float_t fZDCEnergy[4]; // ZDC Energy (n,p) | |
155 | Int_t fSPDMultiplicity; // SPD tracklet multiplicity | |
156 | ||
420bd2ea | 157 | ClassDef(AliHFEreducedEvent, 4) |
3513afb7 | 158 | }; |
159 | ||
160 | //____________________________________________________________ | |
4437a0d2 | 161 | void AliHFEreducedEvent::SetCentrality( |
162 | Float_t centV0M, | |
163 | Float_t centV0A, | |
164 | Float_t centV0C, | |
165 | Float_t centTLS, | |
166 | Float_t centTrks, | |
167 | Float_t centZNA, | |
168 | Float_t centZNC, | |
169 | Float_t centCL0, | |
170 | Float_t centCL1, | |
171 | Float_t centCND | |
172 | ) | |
173 | { | |
3513afb7 | 174 | fCentrality[0] = centV0M; |
175 | fCentrality[1] = centV0A; | |
176 | fCentrality[2] = centV0C; | |
177 | fCentrality[3] = centTLS; | |
178 | fCentrality[4] = centTrks; | |
179 | fCentrality[5] = centZNA; | |
4437a0d2 | 180 | fCentrality[6] = centZNC; |
181 | fCentrality[7] = centCL0; | |
182 | fCentrality[8] = centCL1; | |
183 | fCentrality[9] = centCND; | |
3513afb7 | 184 | } |
4437a0d2 | 185 | |
3513afb7 | 186 | //_________________________________________________________ |
187 | void AliHFEreducedEvent::SetZDCEnergy(Float_t zna, Float_t znc, Float_t zpa, Float_t zpc){ | |
188 | fZDCEnergy[0] = zna; | |
189 | fZDCEnergy[1] = znc; | |
190 | fZDCEnergy[2] = zpa; | |
191 | fZDCEnergy[3] = zpc; | |
192 | } | |
193 | #endif |