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