i) Removed the TFileInfo.h which was there since the previous version where it was...
[u/mrichter/AliRoot.git] / STEER / AliTag.h
1 #ifndef ALITAG
2 #define ALITAG
3
4 #include <stdlib.h>
5 #include <iostream.h>
6
7 #include "TObject.h"
8 #include "TClonesArray.h"
9
10 //______________________________________________________________________________
11 class AliEventTag : public TObject
12 {
13
14         private:
15                 Int_t    fAliceEventId;                    //The event id
16                 Int_t    fGUID;                            //The unique identifier of the file
17                 Int_t    fNumberOfParticipants;            //Number of participants
18                 Float_t  fImpactParameter;                 //The impact parameter
19                 Float_t  fPrimaryVertexX;                  //Primary vertex - X coordinate
20                 Float_t  fPrimaryVertexY;                  //Primary vertex - Y coordinate
21                 Float_t  fPrimaryVertexZ;                  //Primary vertex - Z coordinate
22                 Int_t    fTriggerInfo;                     //Information from trigger
23                 Float_t  fZDCNeutronEnergy;                //ZDC info - neutron
24                 Float_t  fZDCProtonEnergy;                 //ZDC info - proton
25                 Float_t  fZDCEMEnergy;                     //ZDC info - em
26                 Float_t  fT0VertexZ;                       //T0 info
27                 Int_t    fNumberOfTracks;                  //Multiplicity
28                 Int_t    fNumberOfPositiveTracks;          //Multiplicity of positive tracks
29                 Int_t    fNumberOfNegativeTracks;          //Multiplicity of negative tracks
30                 Int_t    fNumberOfNeutralTracks;           //Multiplicity of neutral tracks
31                 Int_t    fNumberOfV0s;                     //Number of V0s
32                 Int_t    fNumberOfCascades;                //Number of cascades
33                 Int_t    fNumberOfKinks;                   //Number of kinks
34                 Int_t    fNumberOfPMDTracks;               //PMD tracks
35                 Int_t    fNumberOfPHOSClusters;            //PHOS clusters
36                 Int_t    fNumberOfEMCALClusters;           //EMCAL clusters
37                 Int_t    fNumberOfFMDTracks;               //FMD tracks
38                 Int_t    fNumberOfJetCandidates;           //Jet candidates
39                 Int_t    fNumberOfHardPhotonsCandidates;   //Hard photons candidates
40                 Int_t    fNumberOfElectrons;               //Number of electrons
41                 Int_t    fNumberOfMuons;                   //Number of muons
42                 Int_t    fNumberOfPions;                   //Number of pions
43                 Int_t    fNumberOfKaons;                   //Number of kaons
44                 Int_t    fNumberOfProtons;                 //Number of protons
45                 Int_t    fNumberOfLambdas;                 //Number of lambdas
46                 Int_t    fNumberOfJPsiCandidates;          //JPsi candidates
47                 Int_t    fNumberOfPsiPrimeCandidates;      //Psi prime candidates
48                 Int_t    fNumberOfUpsilonCandidates;       //Upsilon candidates
49                 Int_t    fNumberOfUpsilonPrimeCandidates;  //Upsilon prime candidates
50                 Int_t    fNumberOfUpsilonDoublePrimeCandidates;
51                 Int_t    fNumberOfCharmParticleCandidates;
52                 Int_t    fNumberOfBeautyParticleCandidates;
53                 Float_t  fK0PeakPosition;
54                 Float_t  fK0PeakWidth;
55                 Float_t  fTotalP;
56                 Float_t  fMeanPt;
57                 Float_t  fMaxPt;
58                 Float_t  fFlowV1;
59                 Float_t  fFlowV2;
60
61                 virtual void CopyTag(AliEventTag *EvTag);
62
63         public:
64                 AliEventTag();
65                 AliEventTag(AliEventTag *t);
66                 virtual ~AliEventTag();
67
68                 void          SetEventId(Int_t Pid) {fAliceEventId = Pid;}
69                 void          SetGUID(Int_t Pid) {fGUID = Pid;}
70
71                 void          SetNumOfParticipants(Int_t P) {fNumberOfParticipants = P;}
72                 void          SetImpactParameter(Float_t Pimpact) {fImpactParameter = Pimpact;}
73
74                 void          SetVertexX(Float_t Pvx) {fPrimaryVertexX = Pvx;}
75                 void          SetVertexY(Float_t Pvy) {fPrimaryVertexY = Pvy;}
76                 void          SetVertexZ(Float_t Pvz) {fPrimaryVertexZ = Pvz;}
77
78                 void          SetTrigger(Int_t Ptr) {fTriggerInfo = Ptr;}
79
80                 void          SetZDCNeutronEnergy(Float_t Pen) {fZDCNeutronEnergy = Pen;}
81                 void          SetZDCProtonEnergy(Float_t Pen) {fZDCProtonEnergy = Pen;}
82                 void          SetZDCEMEnergy(Float_t Pen) {fZDCEMEnergy = Pen;}
83
84                 void          SetT0VertexZ(Float_t Pvz) {fT0VertexZ = Pvz;}
85
86                 void          SetNumOfTracks(Int_t Ptr) {fNumberOfTracks = Ptr;}
87                 void          SetNumOfPosTracks(Int_t Ptr) {fNumberOfPositiveTracks = Ptr;}
88                 void          SetNumOfNegTracks(Int_t Ptr) {fNumberOfNegativeTracks = Ptr;}
89                 void          SetNumOfNeutrTracks(Int_t Ptr) {fNumberOfNeutralTracks = Ptr;}
90
91                 void          SetNumOfV0s(Int_t Ptr) {fNumberOfV0s = Ptr;}
92                 void          SetNumOfCascades(Int_t Ptr) {fNumberOfCascades = Ptr;}
93                 void          SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
94
95                 void          SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
96                 void          SetNumOfPHOSClusters(Int_t Ptr) {fNumberOfPHOSClusters = Ptr;}
97                 void          SetNumOfEMCALClusters(Int_t Ptr) {fNumberOfEMCALClusters = Ptr;}
98                 void          SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
99
100                 void          SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
101                 void          SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;}
102                 void          SetNumOfJPsiCandidates(Int_t Ptr) {fNumberOfJPsiCandidates = Ptr;}
103                 void          SetNumOfPsiPrimeCandidates(Int_t Ptr) {fNumberOfPsiPrimeCandidates = Ptr;}
104                 void          SetNumOfUpsilonCandidates(Int_t Ptr) {fNumberOfUpsilonCandidates = Ptr;}
105                 void          SetNumOfUpsilonPrimeCandidates(Int_t Ptr) {fNumberOfUpsilonPrimeCandidates = Ptr;}
106                 void          SetNumOfUpsilonDoublePrimeCandidates(Int_t Ptr) {fNumberOfUpsilonDoublePrimeCandidates = Ptr;}
107                 void          SetNumOfCharmCandidates(Int_t Ptr) {fNumberOfCharmParticleCandidates = Ptr;}
108                 void          SetNumOfBeautyCandidates(Int_t Ptr) {fNumberOfBeautyParticleCandidates = Ptr;}
109
110                 void          SetNumOfElectrons(Int_t Ptr) {fNumberOfElectrons = Ptr;}
111                 void          SetNumOfMuons(Int_t Ptr) {fNumberOfMuons = Ptr;}
112                 void          SetNumOfPions(Int_t Ptr) {fNumberOfPions = Ptr;}
113                 void          SetNumOfKaons(Int_t Ptr) {fNumberOfKaons = Ptr;}
114                 void          SetNumOfProtons(Int_t Ptr) {fNumberOfProtons = Ptr;}
115                 void          SetNumOfLambdas(Int_t Ptr) {fNumberOfLambdas = Ptr;}
116
117                 void          SetK0Peak(Float_t Ppeak) {fK0PeakPosition = Ppeak;}
118                 void          SetK0Width(Float_t Pw) {fK0PeakWidth = Pw;}
119
120                 void          SetTotalMomentum(Float_t P) {fTotalP = P;}
121                 void          SetMeanPt(Float_t Pt) {fMeanPt = Pt;}
122                 void          SetMaxPt(Float_t Pt) {fMaxPt = Pt;}
123
124                 void          SetFlowV1(Float_t Pv1) {fFlowV1 = Pv1;}
125                 void          SetFlowV2(Float_t Pv2) {fFlowV2 = Pv2;}
126
127
128
129
130                 Int_t         GetEventId() {return fAliceEventId;}
131                 Int_t         GetGUID() {return fGUID;}
132
133                 Int_t         GetNumOfParticipants() {return fNumberOfParticipants;}
134                 Float_t       GetImpactParameter() {return fImpactParameter;}
135
136                 Float_t       GetVertexX() {return fPrimaryVertexX;}
137                 Float_t       GetVertexY() {return fPrimaryVertexY;}
138                 Float_t       GetVertexZ() {return fPrimaryVertexZ;}
139
140                 Int_t         GetTrigger() {return fTriggerInfo;}
141
142                 Float_t       GetZDCNeutronEnergy() {return fZDCNeutronEnergy;}
143                 Float_t       GetZDCProtonEnergy() {return fZDCProtonEnergy;}
144                 Float_t       GetZDCEMEnergy() {return fZDCEMEnergy;}
145
146                 Float_t       GetT0VertexZ() {return fT0VertexZ;}
147
148                 Int_t         GetNumOfTracks() {return fNumberOfTracks;}
149                 Int_t         GetNumOfPosTracks() {return fNumberOfPositiveTracks;}
150                 Int_t         GetNumOfNegTracks() {return fNumberOfNegativeTracks;}
151                 Int_t         GetNumOfNeutrTracks() {return fNumberOfNeutralTracks;}
152
153                 Int_t         GetNumOfV0s() {return fNumberOfV0s;}
154                 Int_t         GetNumOfCascades() {return fNumberOfCascades;}
155                 Int_t         GetNumOfKinks() {return fNumberOfKinks;}
156
157                 Int_t         GetNumOfPMDTracks() {return fNumberOfPMDTracks;}
158                 Int_t         GetNumOfFMDTracks() {return fNumberOfFMDTracks;}
159                 Int_t         GetNumOfPHOSClusters() {return fNumberOfPHOSClusters;}
160                 Int_t         GetNumOfEMCALClusters() {return fNumberOfEMCALClusters;}
161
162                 Int_t         GetNumOfJetCandidates() {return fNumberOfJetCandidates;}
163                 Int_t         GetNumOfHardPhotonsCandidates() {return fNumberOfHardPhotonsCandidates;}
164                 Int_t         GetNumOfJPsiCandidates() {return fNumberOfJPsiCandidates;}
165                 Int_t         GetNumOfPsiPrimeCandidates() {return fNumberOfPsiPrimeCandidates;}
166                 Int_t         GetNumOfUpsilonCandidates() {return fNumberOfUpsilonCandidates;}
167                 Int_t         GetNumOfUpsilonPrimeCandidates() {return fNumberOfUpsilonPrimeCandidates;}
168                 Int_t         GetNumOfUpsilonDoublePrimeCandidates() {return fNumberOfUpsilonDoublePrimeCandidates;}
169                 Int_t         GetNumOfCharmCandidates() {return fNumberOfCharmParticleCandidates;}
170                 Int_t         GetNumOfBeautyCandidates() {return fNumberOfBeautyParticleCandidates;}
171
172                 Int_t         GetNumOfElectrons() {return fNumberOfElectrons;}
173                 Int_t         GetNumOfMuons() {return fNumberOfMuons;}
174                 Int_t         GetNumOfPions() {return fNumberOfPions;}
175                 Int_t         GetNumOfKaons() {return fNumberOfKaons;}
176                 Int_t         GetNumOfProtons() {return fNumberOfProtons;}
177                 Int_t         GetNumOfLambdas() {return fNumberOfLambdas;}
178
179                 Float_t       GetK0Peak() {return fK0PeakPosition;}
180                 Float_t       GetK0Width() {return fK0PeakWidth;}
181
182                 Float_t       GetTotalMomentum() {return fTotalP;}
183                 Float_t       GetMeanPt() {return fMeanPt;}
184                 Float_t       GetMaxPt() {return fMaxPt;}
185
186                 Float_t       GetFlowV1() {return fFlowV1;}
187                 Float_t       GetFlowV2() {return fFlowV2;}
188
189         ClassDef(AliEventTag,2)  //(ClassName, ClassVersion)
190 };
191 //______________________________________________________________________________
192
193
194 //______________________________________________________________________________
195 class AliLHCTag : public TObject
196 {
197
198         private:
199                 Char_t   fLHCState[50];                 //LHC run conditions
200                 Float_t  fLHCLuminosity;                //the value of the luminosity
201
202         public:
203                 AliLHCTag();
204                 virtual ~AliLHCTag();
205
206                 void          SetLHCState(char *type) {strcpy(fLHCState,type);}
207                 void          SetLuminosity(Float_t lumin) {fLHCLuminosity = lumin;}
208                 void          SetLHCTag(Float_t lumin, char *type) {fLHCLuminosity = lumin; strcpy(fLHCState,type); }
209
210                 char         *GetLHCState() {return fLHCState;}
211                 Float_t       GetLuminosity() {return fLHCLuminosity;}
212
213         ClassDef(AliLHCTag,1)  //(ClassName, ClassVersion)
214 };
215 //______________________________________________________________________________
216
217
218 //______________________________________________________________________________
219 class AliDetectorTag : public TObject
220 {
221
222         private:
223                 Bool_t   fITS;                 //ITS active = 1
224                 Bool_t   fTPC;                 //TPC active = 1
225                 Bool_t   fTRD;
226                 Bool_t   fTOF;
227                 Bool_t   fHMPID;
228                 Bool_t   fPHOS;
229                 Bool_t   fZDC;
230                 Bool_t   fMUON;
231                 Bool_t   fABSORBER;
232                 Bool_t   fPMD;
233                 Bool_t   fRICH;
234                 Bool_t   fEMCAL;
235                 Bool_t   fVZERO;
236                 Bool_t   fTZERO;
237
238                 virtual void CopyTag(AliDetectorTag *DetTag);
239
240         public:
241                 AliDetectorTag();
242                 AliDetectorTag(AliDetectorTag *t);
243                 virtual ~AliDetectorTag();
244
245                 void          SetITS(Int_t n) {fITS = n;}
246                 void          SetTPC(Int_t n) {fTPC = n;}
247                 void          SetTRD(Int_t n) {fTRD = n;}
248                 void          SetTOF(Int_t n) {fTOF = n;}
249                 void          SetHMPID(Int_t n) {fHMPID = n;}
250                 void          SetPHOS(Int_t n) {fPHOS = n;}
251                 void          SetZDC(Int_t n) {fZDC = n;}
252                 void          SetMUON(Int_t n) {fMUON = n;}
253                 void          SetABSORBER(Int_t n) {fABSORBER = n;}
254                 void          SetPMD(Int_t n) {fPMD = n;}
255                 void          SetRICH(Int_t n) {fRICH = n;}
256                 void          SetEMCAL(Int_t n) {fEMCAL = n;}
257                 void          SetVZERO(Int_t n) {fVZERO = n;}
258                 void          SetTZERO(Int_t n) {fTZERO = n;}
259
260                 Bool_t        GetITS() {return fITS;}
261                 Bool_t        GetTPC() {return fTPC;}
262                 Bool_t        GetTRD() {return fTRD;}
263                 Bool_t        GetTOF() {return fTOF;}
264                 Bool_t        GetHMPID() {return fHMPID;}
265                 Bool_t        GetPHOS() {return fPHOS;}
266                 Bool_t        GetZDC() {return fZDC;}
267                 Bool_t        GetMUON() {return fMUON;}
268                 Bool_t        GetABSORBER() {return fABSORBER;}
269                 Bool_t        GetPMD() {return fPMD;}
270                 Bool_t        GetRICH() {return fRICH;}
271                 Bool_t        GetEMCAL() {return fEMCAL;}
272                 Bool_t        GetVZERO() {return fVZERO;}
273                 Bool_t        GetTZERO() {return fTZERO;}
274
275         ClassDef(AliDetectorTag,1)  //(ClassName, ClassVersion)
276 };
277 //______________________________________________________________________________
278
279
280 //______________________________________________________________________________
281 class AliRunTag : public TObject
282 {
283
284         private:
285                 Int_t    fAliceRunId;                   //the run id
286                 Float_t  fAliceMagneticField;           //value of the magnetic field
287                 Int_t    fAliceRunStartTime;            //run start date
288                 Int_t    fAliceRunStopTime;             //run stop date
289                 Int_t    fAliceReconstructionVersion;   //reco version
290                 Bool_t   fAliceRunQuality;              //validation script
291                 Float_t  fAliceBeamEnergy;              //beam energy cm
292                 Char_t   fAliceBeamType[5];             //run type (pp, AA, pA)
293                 Int_t    fAliceCalibrationVersion;      //calibration version
294
295                 Int_t    fNumEvents;                    //number of events per file
296                 Int_t    fNumDetectors;                 //number of detector configs per file
297                 TClonesArray  *fEventTag;               //array with all event tags
298                 TClonesArray  *fDetectorTag;            //array with all the detector tags
299
300                 AliLHCTag   fLHCTag;
301
302                 static TClonesArray *fgEvents;
303                 static TClonesArray *fgDetectors;
304
305         public:
306                 AliRunTag();
307                 virtual ~AliRunTag();
308
309                 void          SetRunId(Int_t Pid) {fAliceRunId = Pid;}
310                 void          SetMagneticField(Float_t Pmag) {fAliceMagneticField = Pmag;}
311                 void          SetRunStartTime(Int_t Pt0) {fAliceRunStartTime = Pt0;}
312                 void          SetRunStopTime(Int_t Pt1) {fAliceRunStopTime = Pt1;}
313                 void          SetRecoVersion(Int_t Pn) {fAliceReconstructionVersion = Pn;}
314                 void          SetRunQuality(Int_t Pn) {fAliceRunQuality = Pn;}
315                 void          SetBeamEnergy(Float_t PE) {fAliceBeamEnergy = PE;}
316                 void          SetBeamType(char *Ptype) {strcpy(fAliceBeamType,Ptype);}
317                 void          SetCalibVersion(Int_t Pn) {fAliceCalibrationVersion = Pn;}
318
319                 void          SetNEvents(Int_t Pn) { fNumEvents = Pn; }
320
321                 void          SetLHCTag(Float_t Plumin, char *type);
322                 void          SetDetectorTag(AliDetectorTag *t);
323                 void          AddEventTag(AliEventTag *t);
324                 void          Clear();
325
326
327                 Int_t         GetRunId() {return fAliceRunId;}
328                 Float_t       GetMagneticField() {return fAliceMagneticField;}
329                 Int_t         GetRunStartTime() {return fAliceRunStartTime;}
330                 Int_t         GetRunStopTime() {return fAliceRunStopTime;}
331                 Int_t         GetRecoVersion() {return fAliceReconstructionVersion;}
332                 Int_t         GetRunQuality() {return fAliceRunQuality;}
333                 Float_t       GetBeamEnergy() {return fAliceBeamEnergy;}
334                 char         *GetBeamType() {return fAliceBeamType;}
335                 Int_t         GetCalibVersion() {return fAliceCalibrationVersion;}
336
337                 Int_t         GetNEvents() const {return fNumEvents;}
338
339                 AliLHCTag       *GetLHCTag() { return &fLHCTag; }
340
341         ClassDef(AliRunTag,1)  //(ClassName, ClassVersion)
342 };
343 //______________________________________________________________________________
344
345 #endif