Fixed warnings
[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     fAliceEventId(0),
32     fGUID(0),
33     fPath(0),
34     fsize(0),
35     fmd5(0),
36     fturl(0),
37     fNumberOfParticipants(-10),
38     fNumberOfParticipants2(-10),
39     fImpactParameter(-10.0),
40     fPrimaryVertexFlag(-1),
41     fPrimaryVertexX(-100.0),
42     fPrimaryVertexY(-100.0),
43     fPrimaryVertexZ(-100.0),
44     fPrimaryVertexZError(-100.0),
45     fTriggerMask(0),
46     fTriggerCluster(0),
47     fZDCNeutron1Energy(-10.0),
48     fZDCProton1Energy(-10.0),
49     fZDCNeutron2Energy(-10.0),
50     fZDCProton2Energy(-10.0),
51     fT0VertexZ(-10.0),
52     fNumberOfTracks(-10),
53     fNumberOfPositiveTracks(-10),
54     fNumberOfNegativeTracks(-10),
55     fNumberOfNeutralTracks(-10),  
56     fNumberOfV0s(-10),
57     fNumberOfCascades(-10),
58     fNumberOfKinks(-10),
59     fNumberOfPMDTracks(-10),
60     fNumberOfFMDTracks(-10),
61     fNumberOfPHOSClusters(-10),
62     fNumberOfEMCALClusters(-10),
63     fNumberOfJetCandidates(-10),
64     fMaxJetEnergy(-100.0),
65     fNumberOfHardPhotonsCandidates(-10),
66     fMaxNeutralEnergy(-100.0),
67     fNumberOfChargedAbove1GeV(-10),
68     fNumberOfChargedAbove3GeV(-10),
69     fNumberOfChargedAbove10GeV(-10),
70     fNumberOfMuonsAbove1GeV(-10),
71     fNumberOfMuonsAbove3GeV(-10),
72     fNumberOfMuonsAbove10GeV(-10),
73     fNumberOfElectronsAbove1GeV(-10),
74     fNumberOfElectronsAbove3GeV(-10),
75     fNumberOfElectronsAbove10GeV(-10),
76     fNumberOfElectrons(-10),
77     fNumberOfFWMuons(-10),
78     fNumberOfMuons(-10),
79     fNumberOfPions(-10),
80     fNumberOfKaons(-10),
81     fNumberOfProtons(-10),
82     fNumberOfLambdas(-10),
83     fNumberOfPhotons(-10),
84     fNumberOfPi0s(-10),
85     fNumberOfNeutrons(-10),
86     fNumberOfKaon0s(-10),
87     fTotalP(-10.0),
88     fMeanPt(-10.0),
89     fMaxPt(-10.0),
90     fTotalNeutralP(-10.0),
91     fMeanNeutralPt(-10.0),
92     fMaxNeutralPt(-10.0),
93     fEventPlaneAngle(-10.0),
94     fHBTRadii(-10.0)
95 {
96   // AliEventTag default constructor
97   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = -10.0;
98
99 }
100
101
102 //___________________________________________________________________________
103 AliEventTag::AliEventTag(const AliEventTag & evTag) :
104   TObject(evTag),
105   fAliceEventId(evTag.fAliceEventId),
106   fGUID(evTag.fGUID),
107   fPath(evTag.fPath),
108   fsize(evTag.fsize),
109   fmd5(evTag.fmd5),
110   fturl(evTag.fturl),
111   fNumberOfParticipants(evTag.fNumberOfParticipants),
112   fNumberOfParticipants2(evTag.fNumberOfParticipants2),
113   fImpactParameter(evTag.fImpactParameter),
114   fPrimaryVertexFlag(evTag.fPrimaryVertexFlag),
115   fPrimaryVertexX(evTag.fPrimaryVertexX),
116   fPrimaryVertexY(evTag.fPrimaryVertexY),
117   fPrimaryVertexZ(evTag.fPrimaryVertexZ),
118   fPrimaryVertexZError(evTag.fPrimaryVertexZError),
119   fTriggerMask(evTag.fTriggerMask),
120   fTriggerCluster(evTag.fTriggerCluster),
121   fZDCNeutron1Energy(evTag.fZDCNeutron1Energy),
122   fZDCProton1Energy(evTag.fZDCProton1Energy),
123   fZDCNeutron2Energy(evTag.fZDCNeutron2Energy),
124   fZDCProton2Energy(evTag.fZDCProton2Energy),
125   fT0VertexZ(evTag.fT0VertexZ),
126   fNumberOfTracks(evTag.fNumberOfTracks),
127   fNumberOfPositiveTracks(evTag.fNumberOfPositiveTracks),
128   fNumberOfNegativeTracks(evTag.fNumberOfNegativeTracks),
129   fNumberOfNeutralTracks(evTag.fNumberOfNeutralTracks),  
130   fNumberOfV0s(evTag.fNumberOfV0s),
131   fNumberOfCascades(evTag.fNumberOfCascades),
132   fNumberOfKinks(evTag.fNumberOfKinks),
133   fNumberOfPMDTracks(evTag.fNumberOfPMDTracks),
134   fNumberOfFMDTracks(evTag.fNumberOfFMDTracks),
135   fNumberOfPHOSClusters(evTag.fNumberOfPHOSClusters),
136   fNumberOfEMCALClusters(evTag.fNumberOfEMCALClusters),
137   fNumberOfJetCandidates(evTag.fNumberOfJetCandidates),
138   fMaxJetEnergy(evTag.fMaxJetEnergy),
139   fNumberOfHardPhotonsCandidates(evTag.fNumberOfHardPhotonsCandidates),
140   fMaxNeutralEnergy(evTag.fMaxNeutralEnergy),
141   fNumberOfChargedAbove1GeV(evTag.fNumberOfChargedAbove1GeV),
142   fNumberOfChargedAbove3GeV(evTag.fNumberOfChargedAbove3GeV),
143   fNumberOfChargedAbove10GeV(evTag.fNumberOfChargedAbove10GeV),
144   fNumberOfMuonsAbove1GeV(evTag.fNumberOfMuonsAbove1GeV),
145   fNumberOfMuonsAbove3GeV(evTag.fNumberOfMuonsAbove3GeV),
146   fNumberOfMuonsAbove10GeV(evTag.fNumberOfMuonsAbove10GeV),
147   fNumberOfElectronsAbove1GeV(evTag.fNumberOfElectronsAbove1GeV),
148   fNumberOfElectronsAbove3GeV(evTag.fNumberOfElectronsAbove3GeV),
149   fNumberOfElectronsAbove10GeV(evTag.fNumberOfElectronsAbove10GeV),
150   fNumberOfElectrons(evTag.fNumberOfElectrons),
151   fNumberOfFWMuons(evTag.fNumberOfFWMuons),
152   fNumberOfMuons(evTag.fNumberOfMuons),
153   fNumberOfPions(evTag.fNumberOfPions),
154   fNumberOfKaons(evTag.fNumberOfKaons),
155   fNumberOfProtons(evTag.fNumberOfProtons),
156   fNumberOfLambdas(evTag.fNumberOfLambdas),
157   fNumberOfPhotons(evTag.fNumberOfPhotons),
158   fNumberOfPi0s(evTag.fNumberOfPi0s),
159   fNumberOfNeutrons(evTag.fNumberOfNeutrons),
160   fNumberOfKaon0s(evTag.fNumberOfKaon0s),
161   fTotalP(evTag.fTotalP),
162   fMeanPt(evTag.fMeanPt),
163   fMaxPt(evTag.fMaxPt),
164   fTotalNeutralP(evTag.fTotalNeutralP),
165   fMeanNeutralPt(evTag.fMeanNeutralPt),
166   fMaxNeutralPt(evTag.fMaxNeutralPt),
167   fEventPlaneAngle(evTag.fEventPlaneAngle),
168   fHBTRadii(evTag.fHBTRadii)
169  {
170   // EventTag copy constructor
171   for(Int_t i=0; i<2; i++)     fZDCEMEnergy[i] = evTag.fZDCEMEnergy[i];
172 }
173
174 //___________________________________________________________________________
175 AliEventTag & AliEventTag::operator=(const AliEventTag &evTag) {
176   // EventTag assignment operator
177   if (this != &evTag) {
178     TObject::operator=(evTag);
179     
180     SetEventId(evTag.GetEventId());
181     SetGUID(evTag.GetGUID());
182     SetPath(evTag.GetPath());
183     SetMD5(evTag.GetMD5());
184     SetTURL(evTag.GetTURL());
185     SetSize(evTag.GetSize());
186     SetNumOfParticipants(evTag.GetNumOfParticipants());
187     SetImpactParameter(evTag.GetImpactParameter());
188     SetVertexX(evTag.GetVertexX());
189     SetVertexY(evTag.GetVertexY());
190     SetVertexZ(evTag.GetVertexZ());
191     SetVertexFlag(evTag.GetVertexFlag());
192     SetVertexZError(evTag.GetVertexZError());
193     SetTriggerMask(evTag.GetTriggerMask());
194     SetTriggerCluster(evTag.GetTriggerCluster());
195     SetZDCNeutron1Energy(evTag.GetZDCNeutron1Energy());
196     SetZDCProton1Energy(evTag.GetZDCProton1Energy());
197     SetZDCNeutron2Energy(evTag.GetZDCNeutron2Energy());
198     SetZDCProton2Energy(evTag.GetZDCProton2Energy());
199     SetZDCEMEnergy(evTag.GetZDCEMEnergy(0),evTag.GetZDCEMEnergy(1));
200     SetT0VertexZ(evTag.GetT0VertexZ());
201     SetNumOfTracks(evTag.GetNumOfTracks());
202     SetNumOfPosTracks(evTag.GetNumOfPosTracks());
203     SetNumOfNegTracks(evTag.GetNumOfNegTracks());
204     SetNumOfNeutrTracks(evTag.GetNumOfNeutrTracks());
205     SetNumOfV0s(evTag.GetNumOfV0s());
206     SetNumOfCascades(evTag.GetNumOfCascades());
207     SetNumOfKinks(evTag.GetNumOfKinks());
208     SetNumOfPMDTracks(evTag.GetNumOfPMDTracks());
209     SetNumOfFMDTracks(evTag.GetNumOfFMDTracks());
210     SetNumOfPHOSClusters(evTag.GetNumOfPHOSClusters());
211     SetNumOfEMCALClusters(evTag.GetNumOfEMCALClusters());
212     SetNumOfJetCandidates(evTag.GetNumOfJetCandidates());
213     SetNumOfHardPhotonsCandidates(evTag.GetNumOfHardPhotonsCandidates());
214     SetMaxJetEnergy(evTag.GetMaxJetEnergy());
215     SetMaxNeutralEnergy(evTag.GetMaxNeutralEnergy());
216     SetNumOfChargedAbove1GeV(evTag.GetNumOfChargedAbove1GeV());
217     SetNumOfChargedAbove3GeV(evTag.GetNumOfChargedAbove3GeV());
218     SetNumOfChargedAbove10GeV(evTag.GetNumOfChargedAbove10GeV());
219     SetNumOfMuonsAbove1GeV(evTag.GetNumOfMuonsAbove1GeV());
220     SetNumOfMuonsAbove3GeV(evTag.GetNumOfMuonsAbove3GeV());
221     SetNumOfMuonsAbove10GeV(evTag.GetNumOfMuonsAbove10GeV());
222     SetNumOfElectronsAbove1GeV(evTag.GetNumOfElectronsAbove1GeV());
223     SetNumOfElectronsAbove3GeV(evTag.GetNumOfElectronsAbove3GeV());
224     SetNumOfElectronsAbove10GeV(evTag.GetNumOfElectronsAbove10GeV());
225     SetNumOfElectrons(evTag.GetNumOfElectrons());
226     SetNumOfFWMuons(evTag.GetNumOfFWMuons());
227     SetNumOfMuons(evTag.GetNumOfMuons());
228     SetNumOfPions(evTag.GetNumOfPions());
229     SetNumOfKaons(evTag.GetNumOfKaons());
230     SetNumOfProtons(evTag.GetNumOfProtons());
231     SetNumOfLambdas(evTag.GetNumOfLambdas());
232     SetNumOfPhotons(evTag.GetNumOfPhotons());
233     SetNumOfPi0s(evTag.GetNumOfPi0s());
234     SetNumOfNeutrons(evTag.GetNumOfNeutrons());
235     SetNumOfKaon0s(evTag.GetNumOfKaon0s());
236     SetTotalMomentum(evTag.GetTotalMomentum());
237     SetMeanPt(evTag.GetMeanPt());
238     SetMaxPt(evTag.GetMaxPt());
239     SetNeutralTotalMomentum(evTag.GetNeutralTotalMomentum());
240     SetNeutralMeanPt(evTag.GetNeutralMeanPt());
241     SetNeutralMaxPt(evTag.GetNeutralMaxPt());
242     SetEventPlaneAngle(evTag.GetEventPlaneAngle());
243     SetHBTRadii(evTag.GetHBTRadii());
244   }
245   return *this;
246 }
247
248 //___________________________________________________________________________
249 AliEventTag::~AliEventTag() {
250   // AliEventTag destructor
251 }