ESD tags for muons modified, since they revealed to be
[u/mrichter/AliRoot.git] / STEER / AliEventTag.cxx
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 /* $Id$ */
17
18 //-----------------------------------------------------------------
19 //           Implementation of the EventTag class
20 //   This is the class to deal with the tags in the event level
21 //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
22 //-----------------------------------------------------------------
23
24 #include "AliEventTag.h"
25
26 ClassImp(AliEventTag)
27
28 //______________________________________________________________________________
29   AliEventTag::AliEventTag() : 
30     TObject(),
31     fPeriodNumber(0),
32     fOrbitNumber(0),
33     fBunchCrossNumber(0),
34     fFiredTriggerClasses(),
35     fEventType(0),
36     fGUID(0),
37     fPath(0),
38     fsize(0),
39     fmd5(0),
40     fturl(0),
41     fNumberOfParticipants(-10),
42     fNumberOfParticipants2(-10),
43     fImpactParameter(-10.0),
44     fPrimaryVertexFlag(-1),
45     fPrimaryVertexX(-100.0),
46     fPrimaryVertexY(-100.0),
47     fPrimaryVertexZ(-100.0),
48     fPrimaryVertexZError(-100.0),
49     fTriggerMask(0),
50     fTriggerCluster(0),
51     fZDCNeutron1Energy(-10.0),
52     fZDCProton1Energy(-10.0),
53     fZDCNeutron2Energy(-10.0),
54     fZDCProton2Energy(-10.0),
55     fT0VertexZ(-10.0),
56     fNumberOfTracks(-10),
57     fNumberOfPositiveTracks(-10),
58     fNumberOfNegativeTracks(-10),
59     fNumberOfNeutralTracks(-10),  
60     fNumberOfV0s(-10),
61     fNumberOfCascades(-10),
62     fNumberOfKinks(-10),
63     fNumberOfPMDTracks(-10),
64     fNumberOfFMDTracks(-10),
65     fNumberOfPHOSClusters(-10),
66     fNumberOfEMCALClusters(-10),
67     fNumberOfJetCandidates(-10),
68     fMaxJetEnergy(-100.0),
69     fNumberOfHardPhotonsCandidates(-10),
70     fMaxNeutralEnergy(-100.0),
71     fNumberOfChargedAbove1GeV(-10),
72     fNumberOfChargedAbove3GeV(-10),
73     fNumberOfChargedAbove10GeV(-10),
74     fNumberOfMuonsAbove1GeV(-10),
75     fNumberOfMuonsAbove3GeV(-10),
76     fNumberOfMuonsAbove10GeV(-10),
77     fNumberOfElectronsAbove1GeV(-10),
78     fNumberOfElectronsAbove3GeV(-10),
79     fNumberOfElectronsAbove10GeV(-10),
80     fNumberOfElectrons(-10),
81     fNumberOfFWMuons(-10),
82     fNumberOfFWMatchedMuons(-10),
83     fNumberOfMuons(-10),
84     fNumberOfPions(-10),
85     fNumberOfKaons(-10),
86     fNumberOfProtons(-10),
87     fNumberOfLambdas(-10),
88     fNumberOfPhotons(-10),
89     fNumberOfPi0s(-10),
90     fNumberOfNeutrons(-10),
91     fNumberOfKaon0s(-10),
92     fTotalP(-10.0),
93     fMeanPt(-10.0),
94     fMaxPt(-10.0),
95     fEtaMaxPt(-13.0),
96     fPhiMaxPt(+13.0),
97     fTotalNeutralP(-10.0),
98     fMeanNeutralPt(-10.0),
99     fMaxNeutralPt(-10.0),
100     fEventPlaneAngle(-10.0),
101     fHBTRadii(-10.0),
102     fNumberOfFiredChipsLayer1(0),
103     fNumberOfFiredChipsLayer2(0),
104     fNumberOfSPDTracklets(0),
105     fMTotV0A(0),
106     fMTotV0C(0),
107     fNbPMV0A(0),
108     fNbPMV0C(0)
109 {
110   // AliEventTag default constructor
111   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = -10.0;
112 }
113
114
115 //___________________________________________________________________________
116 AliEventTag::AliEventTag(const AliEventTag & evTag) :
117   TObject(evTag),
118   fPeriodNumber(evTag.fPeriodNumber),
119   fOrbitNumber(evTag.fOrbitNumber),
120   fBunchCrossNumber(evTag.fBunchCrossNumber),
121   fFiredTriggerClasses(evTag.fFiredTriggerClasses),
122   fEventType(evTag.fEventType),
123   fGUID(evTag.fGUID),
124   fPath(evTag.fPath),
125   fsize(evTag.fsize),
126   fmd5(evTag.fmd5),
127   fturl(evTag.fturl),
128   fNumberOfParticipants(evTag.fNumberOfParticipants),
129   fNumberOfParticipants2(evTag.fNumberOfParticipants2),
130   fImpactParameter(evTag.fImpactParameter),
131   fPrimaryVertexFlag(evTag.fPrimaryVertexFlag),
132   fPrimaryVertexX(evTag.fPrimaryVertexX),
133   fPrimaryVertexY(evTag.fPrimaryVertexY),
134   fPrimaryVertexZ(evTag.fPrimaryVertexZ),
135   fPrimaryVertexZError(evTag.fPrimaryVertexZError),
136   fTriggerMask(evTag.fTriggerMask),
137   fTriggerCluster(evTag.fTriggerCluster),
138   fZDCNeutron1Energy(evTag.fZDCNeutron1Energy),
139   fZDCProton1Energy(evTag.fZDCProton1Energy),
140   fZDCNeutron2Energy(evTag.fZDCNeutron2Energy),
141   fZDCProton2Energy(evTag.fZDCProton2Energy),
142   fT0VertexZ(evTag.fT0VertexZ),
143   fNumberOfTracks(evTag.fNumberOfTracks),
144   fNumberOfPositiveTracks(evTag.fNumberOfPositiveTracks),
145   fNumberOfNegativeTracks(evTag.fNumberOfNegativeTracks),
146   fNumberOfNeutralTracks(evTag.fNumberOfNeutralTracks),  
147   fNumberOfV0s(evTag.fNumberOfV0s),
148   fNumberOfCascades(evTag.fNumberOfCascades),
149   fNumberOfKinks(evTag.fNumberOfKinks),
150   fNumberOfPMDTracks(evTag.fNumberOfPMDTracks),
151   fNumberOfFMDTracks(evTag.fNumberOfFMDTracks),
152   fNumberOfPHOSClusters(evTag.fNumberOfPHOSClusters),
153   fNumberOfEMCALClusters(evTag.fNumberOfEMCALClusters),
154   fNumberOfJetCandidates(evTag.fNumberOfJetCandidates),
155   fMaxJetEnergy(evTag.fMaxJetEnergy),
156   fNumberOfHardPhotonsCandidates(evTag.fNumberOfHardPhotonsCandidates),
157   fMaxNeutralEnergy(evTag.fMaxNeutralEnergy),
158   fNumberOfChargedAbove1GeV(evTag.fNumberOfChargedAbove1GeV),
159   fNumberOfChargedAbove3GeV(evTag.fNumberOfChargedAbove3GeV),
160   fNumberOfChargedAbove10GeV(evTag.fNumberOfChargedAbove10GeV),
161   fNumberOfMuonsAbove1GeV(evTag.fNumberOfMuonsAbove1GeV),
162   fNumberOfMuonsAbove3GeV(evTag.fNumberOfMuonsAbove3GeV),
163   fNumberOfMuonsAbove10GeV(evTag.fNumberOfMuonsAbove10GeV),
164   fNumberOfElectronsAbove1GeV(evTag.fNumberOfElectronsAbove1GeV),
165   fNumberOfElectronsAbove3GeV(evTag.fNumberOfElectronsAbove3GeV),
166   fNumberOfElectronsAbove10GeV(evTag.fNumberOfElectronsAbove10GeV),
167   fNumberOfElectrons(evTag.fNumberOfElectrons),
168   fNumberOfFWMuons(evTag.fNumberOfFWMuons),
169   fNumberOfFWMatchedMuons(evTag.fNumberOfFWMatchedMuons),
170   fNumberOfMuons(evTag.fNumberOfMuons),
171   fNumberOfPions(evTag.fNumberOfPions),
172   fNumberOfKaons(evTag.fNumberOfKaons),
173   fNumberOfProtons(evTag.fNumberOfProtons),
174   fNumberOfLambdas(evTag.fNumberOfLambdas),
175   fNumberOfPhotons(evTag.fNumberOfPhotons),
176   fNumberOfPi0s(evTag.fNumberOfPi0s),
177   fNumberOfNeutrons(evTag.fNumberOfNeutrons),
178   fNumberOfKaon0s(evTag.fNumberOfKaon0s),
179   fTotalP(evTag.fTotalP),
180   fMeanPt(evTag.fMeanPt),
181   fMaxPt(evTag.fMaxPt),
182   fEtaMaxPt(evTag.fEtaMaxPt),
183   fPhiMaxPt(evTag.fPhiMaxPt),
184   fTotalNeutralP(evTag.fTotalNeutralP),
185   fMeanNeutralPt(evTag.fMeanNeutralPt),
186   fMaxNeutralPt(evTag.fMaxNeutralPt),
187   fEventPlaneAngle(evTag.fEventPlaneAngle),
188   fHBTRadii(evTag.fHBTRadii),
189   fNumberOfFiredChipsLayer1(evTag.fNumberOfFiredChipsLayer1),
190   fNumberOfFiredChipsLayer2(evTag.fNumberOfFiredChipsLayer2),
191   fNumberOfSPDTracklets(evTag.fNumberOfSPDTracklets),
192   fMTotV0A(evTag.fMTotV0A),
193   fMTotV0C(evTag.fMTotV0C),
194   fNbPMV0A(evTag.fNbPMV0A),
195   fNbPMV0C(evTag.fNbPMV0C)
196  {
197   // EventTag copy constructor
198   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = evTag.fZDCEMEnergy[i];
199 }
200
201 //___________________________________________________________________________
202 AliEventTag & AliEventTag::operator=(const AliEventTag &evTag) {
203   // EventTag assignment operator
204   if (this != &evTag) {
205     TObject::operator=(evTag);
206     
207     SetPeriodNumber(evTag.GetPeriodNumber());
208     SetOrbitNumber(evTag.GetOrbitNumber());
209     SetBunchCrossNumber(evTag.GetBunchCrossNumber());
210     SetFiredTriggerClasses(evTag.GetFiredTriggerClasses());
211     SetEventType(evTag.GetEventType());
212     SetGUID(evTag.GetGUID());
213     SetPath(evTag.GetPath());
214     SetMD5(evTag.GetMD5());
215     SetTURL(evTag.GetTURL());
216     SetSize(evTag.GetSize());
217     SetNumOfParticipants(evTag.GetNumOfParticipants());
218     SetImpactParameter(evTag.GetImpactParameter());
219     SetVertexX(evTag.GetVertexX());
220     SetVertexY(evTag.GetVertexY());
221     SetVertexZ(evTag.GetVertexZ());
222     SetVertexFlag(evTag.GetVertexFlag());
223     SetVertexZError(evTag.GetVertexZError());
224     SetTriggerMask(evTag.GetTriggerMask());
225     SetTriggerCluster(evTag.GetTriggerCluster());
226     SetZDCNeutron1Energy(evTag.GetZDCNeutron1Energy());
227     SetZDCProton1Energy(evTag.GetZDCProton1Energy());
228     SetZDCNeutron2Energy(evTag.GetZDCNeutron2Energy());
229     SetZDCProton2Energy(evTag.GetZDCProton2Energy());
230     SetZDCEMEnergy(evTag.GetZDCEMEnergy(0),evTag.GetZDCEMEnergy(1));
231     SetT0VertexZ(evTag.GetT0VertexZ());
232     SetNumOfTracks(evTag.GetNumOfTracks());
233     SetNumOfPosTracks(evTag.GetNumOfPosTracks());
234     SetNumOfNegTracks(evTag.GetNumOfNegTracks());
235     SetNumOfNeutrTracks(evTag.GetNumOfNeutrTracks());
236     SetNumOfV0s(evTag.GetNumOfV0s());
237     SetNumOfCascades(evTag.GetNumOfCascades());
238     SetNumOfKinks(evTag.GetNumOfKinks());
239     SetNumOfPMDTracks(evTag.GetNumOfPMDTracks());
240     SetNumOfFMDTracks(evTag.GetNumOfFMDTracks());
241     SetNumOfPHOSClusters(evTag.GetNumOfPHOSClusters());
242     SetNumOfEMCALClusters(evTag.GetNumOfEMCALClusters());
243     SetNumOfJetCandidates(evTag.GetNumOfJetCandidates());
244     SetNumOfHardPhotonsCandidates(evTag.GetNumOfHardPhotonsCandidates());
245     SetMaxJetEnergy(evTag.GetMaxJetEnergy());
246     SetMaxNeutralEnergy(evTag.GetMaxNeutralEnergy());
247     SetNumOfChargedAbove1GeV(evTag.GetNumOfChargedAbove1GeV());
248     SetNumOfChargedAbove3GeV(evTag.GetNumOfChargedAbove3GeV());
249     SetNumOfChargedAbove10GeV(evTag.GetNumOfChargedAbove10GeV());
250     SetNumOfMuonsAbove1GeV(evTag.GetNumOfMuonsAbove1GeV());
251     SetNumOfMuonsAbove3GeV(evTag.GetNumOfMuonsAbove3GeV());
252     SetNumOfMuonsAbove10GeV(evTag.GetNumOfMuonsAbove10GeV());
253     SetNumOfElectronsAbove1GeV(evTag.GetNumOfElectronsAbove1GeV());
254     SetNumOfElectronsAbove3GeV(evTag.GetNumOfElectronsAbove3GeV());
255     SetNumOfElectronsAbove10GeV(evTag.GetNumOfElectronsAbove10GeV());
256     SetNumOfElectrons(evTag.GetNumOfElectrons());
257     SetNumOfFWMuons(evTag.GetNumOfFWMuons());
258     SetNumOfFWMatchedMuons(evTag.GetNumOfFWMatchedMuons());
259     SetNumOfMuons(evTag.GetNumOfMuons());
260     SetNumOfPions(evTag.GetNumOfPions());
261     SetNumOfKaons(evTag.GetNumOfKaons());
262     SetNumOfProtons(evTag.GetNumOfProtons());
263     SetNumOfLambdas(evTag.GetNumOfLambdas());
264     SetNumOfPhotons(evTag.GetNumOfPhotons());
265     SetNumOfPi0s(evTag.GetNumOfPi0s());
266     SetNumOfNeutrons(evTag.GetNumOfNeutrons());
267     SetNumOfKaon0s(evTag.GetNumOfKaon0s());
268     SetTotalMomentum(evTag.GetTotalMomentum());
269     SetMeanPt(evTag.GetMeanPt());
270     SetMaxPt(evTag.GetMaxPt());
271     SetEtaMaxPt(evTag.GetEtaMaxPt());
272     SetPhiMaxPt(evTag.GetPhiMaxPt());
273     SetNeutralTotalMomentum(evTag.GetNeutralTotalMomentum());
274     SetNeutralMeanPt(evTag.GetNeutralMeanPt());
275     SetNeutralMaxPt(evTag.GetNeutralMaxPt());
276     SetEventPlaneAngle(evTag.GetEventPlaneAngle());
277     SetHBTRadii(evTag.GetHBTRadii());
278     SetNumberOfFiredChipsLayer1(evTag.GetNumberOfFiredChipsLayer1());
279     SetNumberOfFiredChipsLayer2(evTag.GetNumberOfFiredChipsLayer2());
280     SetNumberOfSPDTracklets(evTag.GetNumberOfSPDTracklets());
281     SetMTotV0A(evTag.GetMTotV0A());
282     SetMTotV0C(evTag.GetMTotV0C());
283     SetNbPMV0A(evTag.GetNbPMV0A());
284     SetNbPMV0C(evTag.GetNbPMV0C());
285   }
286   return *this;
287 }
288
289 //___________________________________________________________________________
290 AliEventTag::~AliEventTag() {
291   // AliEventTag destructor
292 }