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