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