Update of the tag system. 1. Correct implementation of the event ID - period, orbit...
[u/mrichter/AliRoot.git] / STEER / AliEventTag.h
1 #ifndef ALIEVENTTAG_H
2 #define ALIEVENTTAG_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6
7 /* $Id$ */
8
9 //-------------------------------------------------------------------------
10 //                          Class AliEventTag
11 //   This is the class to deal with the tags for the event level
12 //
13 //    Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
14 //-------------------------------------------------------------------------
15
16 #include "TObject.h"
17 #include "TString.h"
18
19 //___________________________________________________________________________
20 class AliEventTag : public TObject {
21  public:
22   AliEventTag();
23   AliEventTag(const AliEventTag & t);
24   virtual ~AliEventTag();
25
26   AliEventTag &operator=(const AliEventTag &rhs);
27   
28   //____________________________________________________//
29   void SetPeriodNumber(UInt_t n) {fPeriodNumber = n;}
30   void SetOrbitNumber(UInt_t n) {fOrbitNumber = n;}
31   void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber = n;}
32
33   void SetFiredTriggerClasses(TString names) {fFiredTriggerClasses = names;}
34   void SetEventType(UInt_t ntype) {fEventType = ntype;}
35
36   void SetGUID(TString Pid) {fGUID = Pid;}
37   void SetPath(TString Pid) {fPath = Pid;}
38   void SetMD5(TString Pid) {fmd5 = Pid;}
39   void SetTURL(TString Pid) {fturl = Pid;}
40   void SetSize(Long64_t i) {fsize = i;}
41   void SetNumOfParticipants(Int_t P) {fNumberOfParticipants = P;}
42   void SetNumOfParticipants2(Int_t P2) {fNumberOfParticipants = P2;}
43   void SetImpactParameter(Float_t Pimpact) {fImpactParameter = Pimpact;}
44   void SetVertexX(Float_t Pvx) {fPrimaryVertexX = Pvx;}
45   void SetVertexY(Float_t Pvy) {fPrimaryVertexY = Pvy;}
46   void SetVertexZ(Float_t Pvz) {fPrimaryVertexZ = Pvz;}
47   void SetVertexFlag(Int_t i) {fPrimaryVertexFlag = i;}
48   void SetVertexZError(Float_t f) { fPrimaryVertexZError = f;}
49   void SetTriggerMask(ULong64_t Ptr) {fTriggerMask = Ptr;}
50   void SetTriggerCluster(UChar_t n) {fTriggerCluster = n;}
51   void SetZDCNeutron1Energy(Float_t Pen) {fZDCNeutron1Energy = Pen;}
52   void SetZDCProton1Energy(Float_t Pen) {fZDCProton1Energy = Pen;}
53   void SetZDCNeutron2Energy(Float_t Pen) {fZDCNeutron2Energy = Pen;}
54   void SetZDCProton2Energy(Float_t Pen) {fZDCProton2Energy = Pen;}
55   void SetZDCEMEnergy(Float_t Pen1, Float_t Pen2) 
56        {fZDCEMEnergy[0]=Pen1; fZDCEMEnergy[1]=Pen2;}
57   void SetT0VertexZ(Float_t Pvz) {fT0VertexZ = Pvz;}
58   void SetNumOfTracks(Int_t Ptr) {fNumberOfTracks = Ptr;}
59   void SetNumOfPosTracks(Int_t Ptr) {fNumberOfPositiveTracks = Ptr;}
60   void SetNumOfNegTracks(Int_t Ptr) {fNumberOfNegativeTracks = Ptr;}
61   void SetNumOfNeutrTracks(Int_t Ptr) {fNumberOfNeutralTracks = Ptr;}
62   void SetNumOfV0s(Int_t Ptr) {fNumberOfV0s = Ptr;}
63   void SetNumOfCascades(Int_t Ptr) {fNumberOfCascades = Ptr;}
64   void SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
65   void SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
66   void SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
67   void SetNumOfPHOSClusters(Int_t Ptr) {fNumberOfPHOSClusters = Ptr;}
68   void SetNumOfEMCALClusters(Int_t Ptr) {fNumberOfEMCALClusters = Ptr;}
69   void SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
70   void SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;}
71   void SetMaxJetEnergy(Float_t f) {fMaxJetEnergy = f;}
72   void SetMaxNeutralEnergy(Float_t f) {fMaxNeutralEnergy = f;}
73   void SetNumOfChargedAbove1GeV(Int_t i) {fNumberOfChargedAbove1GeV = i;}
74   void SetNumOfChargedAbove3GeV(Int_t i) {fNumberOfChargedAbove3GeV = i;}
75   void SetNumOfChargedAbove10GeV(Int_t i) {fNumberOfChargedAbove10GeV = i;}
76   void SetNumOfMuonsAbove1GeV(Int_t i) {fNumberOfMuonsAbove1GeV = i;}
77   void SetNumOfMuonsAbove3GeV(Int_t i) {fNumberOfMuonsAbove3GeV = i;}
78   void SetNumOfMuonsAbove10GeV(Int_t i) {fNumberOfMuonsAbove10GeV = i;}
79   void SetNumOfElectronsAbove1GeV(Int_t i) {fNumberOfElectronsAbove1GeV = i;}
80   void SetNumOfElectronsAbove3GeV(Int_t i) {fNumberOfElectronsAbove3GeV = i;}
81   void SetNumOfElectronsAbove10GeV(Int_t i) {fNumberOfElectronsAbove10GeV = i;}
82   void SetNumOfElectrons(Int_t Ptr) {fNumberOfElectrons = Ptr;}
83   void SetNumOfFWMuons(Int_t Ptr) {fNumberOfFWMuons = Ptr;}
84   void SetNumOfMuons(Int_t Ptr) {fNumberOfMuons = Ptr;}
85   void SetNumOfPions(Int_t Ptr) {fNumberOfPions = Ptr;}
86   void SetNumOfKaons(Int_t Ptr) {fNumberOfKaons = Ptr;}
87   void SetNumOfProtons(Int_t Ptr) {fNumberOfProtons = Ptr;}
88   void SetNumOfLambdas(Int_t Ptr) {fNumberOfLambdas = Ptr;}
89   void SetNumOfPhotons(Int_t Ptr) {fNumberOfPhotons = Ptr;}
90   void SetNumOfPi0s(Int_t Ptr) {fNumberOfPi0s = Ptr;}
91   void SetNumOfNeutrons(Int_t Ptr) {fNumberOfNeutrons = Ptr;}
92   void SetNumOfKaon0s(Int_t Ptr) {fNumberOfKaon0s = Ptr;}
93   void SetTotalMomentum(Float_t P) {fTotalP = P;}
94   void SetMeanPt(Float_t Pt) {fMeanPt = Pt;}
95   void SetMaxPt(Float_t Pt) {fMaxPt = Pt;}
96   void SetNeutralTotalMomentum(Float_t f) {fTotalNeutralP = f;}
97   void SetNeutralMeanPt(Float_t f) {fMeanNeutralPt = f;}
98   void SetNeutralMaxPt(Float_t f) {fMaxNeutralPt = f;}
99   void SetEventPlaneAngle(Float_t f) {fEventPlaneAngle = f;}
100   void SetHBTRadii(Float_t f) {fHBTRadii = f;}
101
102   //First physics
103   void SetNumberOfFiredChipsLayer1(Int_t n) {fNumberOfFiredChipsLayer1 = n;}
104   void SetNumberOfFiredChipsLayer2(Int_t n) {fNumberOfFiredChipsLayer2 = n;}
105   void SetNumberOfSPDTracklets(Int_t n) {fNumberOfSPDTracklets = n;}
106
107   void SetVZEROADC(Int_t n, UShort_t adc) {fVZEROADC[n] = adc;}
108   void SetVZEROTime(Int_t n, Bool_t time) {fVZEROTime[n] = time;}
109
110   //____________________________________________________//
111   UInt_t GetPeriodNumber() const {return fPeriodNumber;}
112   UInt_t GetOrbitNumber() const {return fOrbitNumber;}
113   UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
114
115   TString GetFiredTriggerClasses() const {return fFiredTriggerClasses;}
116   UInt_t GetEventType() const {return fEventType;}
117
118   const char *GetGUID() const {return fGUID.Data();}
119   const char *GetPath() const {return fPath.Data();}
120   const char *GetMD5() const {return fmd5.Data();}
121   const char *GetTURL() const {return fturl.Data();}
122   Long64_t    GetSize() const {return fsize;}
123   Int_t       GetNumOfParticipants() const {return fNumberOfParticipants;}
124   Int_t       GetNumOfParticipants2() const {return fNumberOfParticipants2;}
125   Float_t     GetImpactParameter() const {return fImpactParameter;}
126   Float_t     GetVertexX() const {return fPrimaryVertexX;}
127   Float_t     GetVertexY() const {return fPrimaryVertexY;}
128   Float_t     GetVertexZ() const {return fPrimaryVertexZ;}
129   Int_t       GetVertexFlag() const {return fPrimaryVertexFlag;}
130   Float_t     GetVertexZError() const {return fPrimaryVertexZError;}
131   ULong64_t   GetTriggerMask() const {return fTriggerMask;}
132   UChar_t     GetTriggerCluster() const {return fTriggerCluster;}
133   Float_t     GetZDCNeutron1Energy() const {return fZDCNeutron1Energy;}
134   Float_t     GetZDCProton1Energy() const {return fZDCProton1Energy;}
135   Float_t     GetZDCNeutron2Energy() const {return fZDCNeutron2Energy;}
136   Float_t     GetZDCProton2Energy() const {return fZDCProton2Energy;}
137   Float_t     GetZDCEMEnergy(Int_t i) const {return fZDCEMEnergy[i];}
138   Float_t     GetT0VertexZ() const {return fT0VertexZ;}
139   Int_t       GetNumOfTracks() const {return fNumberOfTracks;}
140   Int_t       GetNumOfPosTracks() const {return fNumberOfPositiveTracks;}
141   Int_t       GetNumOfNegTracks() const {return fNumberOfNegativeTracks;}
142   Int_t       GetNumOfNeutrTracks() const {return fNumberOfNeutralTracks;}
143   Int_t       GetNumOfV0s() const {return fNumberOfV0s;}
144   Int_t       GetNumOfCascades() const {return fNumberOfCascades;}
145   Int_t       GetNumOfKinks() const {return fNumberOfKinks;}
146   Int_t       GetNumOfPMDTracks() const {return fNumberOfPMDTracks;}
147   Int_t       GetNumOfFMDTracks() const {return fNumberOfFMDTracks;}
148   Int_t       GetNumOfPHOSClusters() const {return fNumberOfPHOSClusters;}
149   Int_t       GetNumOfEMCALClusters() const {return fNumberOfEMCALClusters;}
150   Int_t       GetNumOfJetCandidates() const {return fNumberOfJetCandidates;}
151   Int_t       GetNumOfHardPhotonsCandidates() const {return fNumberOfHardPhotonsCandidates;}
152   Float_t     GetMaxJetEnergy() const {return fMaxJetEnergy;}
153   Float_t     GetMaxNeutralEnergy() const {return fMaxNeutralEnergy;}
154   Int_t       GetNumOfChargedAbove1GeV() const {return fNumberOfChargedAbove1GeV;}
155   Int_t       GetNumOfChargedAbove3GeV() const {return fNumberOfChargedAbove3GeV;}
156   Int_t       GetNumOfChargedAbove10GeV() const {return fNumberOfChargedAbove10GeV;}
157   Int_t       GetNumOfMuonsAbove1GeV() const {return fNumberOfMuonsAbove1GeV;}
158   Int_t       GetNumOfMuonsAbove3GeV() const {return fNumberOfMuonsAbove3GeV;}
159   Int_t       GetNumOfMuonsAbove10GeV() const {return fNumberOfMuonsAbove10GeV;}
160   Int_t       GetNumOfElectronsAbove1GeV() const {return fNumberOfElectronsAbove1GeV;}
161   Int_t       GetNumOfElectronsAbove3GeV() const {return fNumberOfElectronsAbove3GeV;}
162   Int_t       GetNumOfElectronsAbove10GeV() const {return fNumberOfElectronsAbove10GeV;}
163   Int_t       GetNumOfElectrons() const {return fNumberOfElectrons;}
164   Int_t       GetNumOfFWMuons() const {return fNumberOfFWMuons;}
165   Int_t       GetNumOfMuons() const {return fNumberOfMuons;}
166   Int_t       GetNumOfPions() const {return fNumberOfPions;}
167   Int_t       GetNumOfKaons() const {return fNumberOfKaons;}
168   Int_t       GetNumOfProtons() const {return fNumberOfProtons;}
169   Int_t       GetNumOfLambdas() const {return fNumberOfLambdas;}
170   Int_t       GetNumOfPhotons() const {return fNumberOfPhotons;}
171   Int_t       GetNumOfPi0s() const {return fNumberOfPi0s;}
172   Int_t       GetNumOfNeutrons() const {return fNumberOfNeutrons;}
173   Int_t       GetNumOfKaon0s() const {return fNumberOfKaon0s;}
174   Float_t     GetTotalMomentum() const {return fTotalP;}
175   Float_t     GetMeanPt() const {return fMeanPt;}
176   Float_t     GetMaxPt() const {return fMaxPt;}
177   Float_t     GetNeutralTotalMomentum() const {return fTotalNeutralP;}
178   Float_t     GetNeutralMeanPt() const {return fMeanNeutralPt;}
179   Float_t     GetNeutralMaxPt() const {return fMaxNeutralPt;}
180   Float_t     GetEventPlaneAngle() const {return fEventPlaneAngle;}
181   Float_t     GetHBTRadii() const {return fHBTRadii;}
182
183   //First physics
184   Int_t GetNumberOfFiredChipsLayer1() const {return fNumberOfFiredChipsLayer1;}
185   Int_t GetNumberOfFiredChipsLayer2() const {return fNumberOfFiredChipsLayer2;}
186   Int_t GetNumberOfSPDTracklets() const {return fNumberOfSPDTracklets;}
187
188   UShort_t GetVZEROADC(Int_t n) const {return fVZEROADC[n];}
189   UShort_t GetVZEROTime(Int_t n) const {return fVZEROTime[n];}
190
191   //____________________________________________________//
192  private:
193   UInt_t    fPeriodNumber;                  //The period number
194   UInt_t    fOrbitNumber;                   //The orbit number
195   UShort_t  fBunchCrossNumber;              //The BC number
196   TString   fFiredTriggerClasses;           //List of the fired trigger class names
197   UInt_t    fEventType;                     //event type == 7 ==> PHYSICS_EVENT
198
199   TString   fGUID;                          //The unique identifier of the file
200   TString   fPath;                          //The file's path (local storage)
201   Long64_t  fsize;                          //the size of the file
202   TString   fmd5;                           //another file identifier
203   TString   fturl;                          //the file's url
204   Int_t     fNumberOfParticipants;          //Number of participants - side C
205   Int_t     fNumberOfParticipants2;         //Number of participants - side A
206   Float_t   fImpactParameter;               //The impact parameter
207   Int_t     fPrimaryVertexFlag;             //Primary vertex flag: 0->not found, 1->found
208   Float_t   fPrimaryVertexX;                //Primary vertex - X coordinate
209   Float_t   fPrimaryVertexY;                //Primary vertex - Y coordinate
210   Float_t   fPrimaryVertexZ;                //Primary vertex - Z coordinate
211   Float_t   fPrimaryVertexZError;           //Primary vertex - Z coordinate - error
212   ULong64_t fTriggerMask;                   //Information from trigger (trigger mask)
213   UChar_t   fTriggerCluster;                // Trigger cluster (mask)
214   Float_t   fZDCNeutron1Energy;             //ZDC info - neutron
215   Float_t   fZDCProton1Energy;              //ZDC info - proton
216   Float_t   fZDCNeutron2Energy;             //ZDC info - neutron
217   Float_t   fZDCProton2Energy;              //ZDC info - proton
218   Float_t   fZDCEMEnergy[2];                //ZDC info - em
219   Float_t   fT0VertexZ;                     //T0 info
220   Int_t     fNumberOfTracks;                //Multiplicity
221   Int_t     fNumberOfPositiveTracks;        //Multiplicity of positive tracks
222   Int_t     fNumberOfNegativeTracks;        //Multiplicity of negative tracks
223   Int_t     fNumberOfNeutralTracks;         //Multiplicity of neutral tracks
224   Int_t     fNumberOfV0s;                   //Number of V0s
225   Int_t     fNumberOfCascades;              //Number of cascades
226   Int_t     fNumberOfKinks;                 //Number of kinks
227   Int_t     fNumberOfPMDTracks;             //PMD tracks
228   Int_t     fNumberOfFMDTracks;             //FMD tracks
229   Int_t     fNumberOfPHOSClusters;          //PHOS clusters
230   Int_t     fNumberOfEMCALClusters;         //EMCAL clusters
231   Int_t     fNumberOfJetCandidates;         //Jet candidates
232   Float_t   fMaxJetEnergy;                  //jet energy info
233   Int_t     fNumberOfHardPhotonsCandidates; //Hard photons candidates
234   Float_t   fMaxNeutralEnergy;              //neutral energy info
235   Int_t     fNumberOfChargedAbove1GeV;      //Number of charged above 1 GeV/c
236   Int_t     fNumberOfChargedAbove3GeV;      //Number of charged above 3 GeV/c
237   Int_t     fNumberOfChargedAbove10GeV;     //Number of charged above 10 GeV/c
238   Int_t     fNumberOfMuonsAbove1GeV;        //Number of muons above 1 GeV/c
239   Int_t     fNumberOfMuonsAbove3GeV;        //Number of muons above 3 GeV/c
240   Int_t     fNumberOfMuonsAbove10GeV;       //Number of muons above 10 GeV/c
241   Int_t     fNumberOfElectronsAbove1GeV;    //Number of electrons above 1 GeV/c
242   Int_t     fNumberOfElectronsAbove3GeV;    //Number of electrons above 3 GeV/c
243   Int_t     fNumberOfElectronsAbove10GeV;   //Number of electrons above 10 GeV/c
244   Int_t     fNumberOfElectrons;             //Number of electrons
245   Int_t     fNumberOfFWMuons;               //Number of forward muons
246   Int_t     fNumberOfMuons;                 //Number of muons
247   Int_t     fNumberOfPions;                 //Number of pions
248   Int_t     fNumberOfKaons;                 //Number of kaons
249   Int_t     fNumberOfProtons;               //Number of protons
250   Int_t     fNumberOfLambdas;               //Number of lambdas
251   Int_t     fNumberOfPhotons;               //Number of photons
252   Int_t     fNumberOfPi0s;                  //Number of pi0
253   Int_t     fNumberOfNeutrons;              //Number of neutrons
254   Int_t     fNumberOfKaon0s;                //Number of Ks
255   Float_t   fTotalP;                        //Sum of the momentum per event
256   Float_t   fMeanPt;                        //Mean Pt per event
257   Float_t   fMaxPt;                         //Max Pt for each event
258   Float_t   fTotalNeutralP;                 //Sum of the momentum per event for neutral
259   Float_t   fMeanNeutralPt;                 //Mean Pt per event for neutral
260   Float_t   fMaxNeutralPt;                  //Max Pt for each event for neutral
261   Float_t   fEventPlaneAngle;               //event plane info
262   Float_t   fHBTRadii;                      //HBT info
263   
264   //First physics
265   Int_t     fNumberOfFiredChipsLayer1;      //number of fired chips - layer 1
266   Int_t     fNumberOfFiredChipsLayer2;      //number of fired chips - layer 2
267   Int_t     fNumberOfSPDTracklets;          //number of SPD tracklets
268
269   UShort_t  fVZEROADC[64];                  //V0 raw adc values
270   Bool_t    fVZEROTime[64];                 //Flag if V0 TDC time measured
271
272   ClassDef(AliEventTag,11)  //(ClassName, ClassVersion)
273     };
274 //___________________________________________________________________________
275
276
277 #endif