]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliTag.cxx
Introduction of equipment id map. The map is taken from simple ascii formatted file...
[u/mrichter/AliRoot.git] / STEER / AliTag.cxx
1 #include <stdlib.h>
2 #include <iostream.h>
3
4 #include "AliTag.h"
5
6 ClassImp(AliRunTag)
7 ClassImp(AliLHCTag)
8 ClassImp(AliDetectorTag)
9 ClassImp(AliEventTag)
10
11 TClonesArray *AliRunTag::fgEvents = 0;
12 TClonesArray *AliRunTag::fgDetectors = 0;
13
14 //______________________________________________________________________________
15 AliRunTag::AliRunTag()
16 {
17         if (!fgEvents) fgEvents = new TClonesArray("AliEventTag", 1000);
18         fEventTag = fgEvents;
19         fNumEvents = 0;
20
21         if (!fgDetectors) fgDetectors = new TClonesArray("AliDetectorTag", 1000);
22         fDetectorTag = fgDetectors;
23         fNumDetectors = 0;
24
25         fAliceMagneticField = 0.0;
26         fAliceRunStartTime = 0;
27         fAliceRunStopTime = 0;
28         fAliceReconstructionVersion = 0;
29         fAliceRunQuality = 0;
30         fAliceBeamEnergy = 0.0;
31         fAliceCalibrationVersion = 0;
32 }
33
34 //______________________________________________________________________________
35 AliRunTag::~AliRunTag()
36 {
37 }
38
39 //______________________________________________________________________________
40 void AliRunTag::SetLHCTag(Float_t lumin, char *type)
41 {
42         fLHCTag.SetLHCTag(lumin,type);
43 }
44
45 //______________________________________________________________________________
46 void AliRunTag::SetDetectorTag(AliDetectorTag *DetTag)
47 {
48         TClonesArray &detectors = *fDetectorTag;
49         new(detectors[fNumDetectors++]) AliDetectorTag(DetTag);
50 }
51
52 //______________________________________________________________________________
53 void AliRunTag::AddEventTag(AliEventTag *EvTag)
54 {
55         TClonesArray &events = *fEventTag;
56         new(events[fNumEvents++]) AliEventTag(EvTag);
57 }
58
59 //______________________________________________________________________________
60 void AliRunTag::Clear()
61 {
62         fNumEvents = 0;
63         fNumDetectors = 0;
64 }
65
66
67 //______________________________________________________________________________
68 //______________________________________________________________________________
69 AliLHCTag::AliLHCTag()
70 {
71         fLHCLuminosity = -1.0;
72 }
73
74 //______________________________________________________________________________
75 AliLHCTag::~AliLHCTag()
76 {
77 }
78
79 //______________________________________________________________________________
80 //______________________________________________________________________________
81 AliDetectorTag::AliDetectorTag()
82 {
83         fITS = 0;
84         fTPC = 0;
85         fTRD = 0;
86         fTOF = 0;
87         fHMPID = 0;
88         fPHOS = 0;
89         fZDC = 0;
90         fMUON = 0;
91         fABSORBER = 0;
92         fPMD = 0;
93         fRICH = 0;
94         fEMCAL = 0;
95         fVZERO = 0;
96         fTZERO = 0;
97 }
98
99 //______________________________________________________________________________
100 AliDetectorTag::AliDetectorTag(AliDetectorTag *DetTag)
101 {
102         // DetectorTag copy constructor
103         CopyTag(DetTag);
104 }
105
106 //______________________________________________________________________________
107 AliDetectorTag::~AliDetectorTag()
108 {
109 }
110
111 //______________________________________________________________________________
112 void AliDetectorTag::CopyTag(AliDetectorTag *DetTag)
113 {
114         SetITS(DetTag->GetITS());
115         SetTPC(DetTag->GetTPC());
116         SetTRD(DetTag->GetTRD());
117         SetTOF(DetTag->GetTOF());
118         SetHMPID(DetTag->GetHMPID());
119         SetPHOS(DetTag->GetPHOS());
120         SetZDC(DetTag->GetZDC());
121         SetMUON(DetTag->GetMUON());
122         SetABSORBER(DetTag->GetABSORBER());
123         SetPMD(DetTag->GetPMD());
124         SetRICH(DetTag->GetRICH());
125         SetEMCAL(DetTag->GetEMCAL());
126         SetVZERO(DetTag->GetVZERO());
127         SetTZERO(DetTag->GetTZERO());
128 }
129
130
131 //______________________________________________________________________________
132 //______________________________________________________________________________
133 AliEventTag::AliEventTag()
134 {
135         fAliceEventId = 0;
136         fGUID = 0;
137
138         fNumberOfParticipants = -10;
139         fImpactParameter = -10.0;
140
141         fPrimaryVertexX = -100.0;
142         fPrimaryVertexY = -100.0;
143         fPrimaryVertexZ = -100.0;
144
145         fTriggerInfo = -10;
146
147         fZDCNeutronEnergy = -10.0;
148         fZDCProtonEnergy = -10.0;
149         fZDCEMEnergy = -10.0;
150
151         fT0VertexZ = -10.0;
152
153         fNumberOfTracks = -10;
154         fNumberOfPositiveTracks = -10;
155         fNumberOfNegativeTracks = -10;
156         fNumberOfNeutralTracks = -10;
157
158         fNumberOfV0s = -10;
159         fNumberOfCascades = -10;
160         fNumberOfKinks = -10;
161
162         fNumberOfPMDTracks = -10;
163         fNumberOfFMDTracks = -10;
164         fNumberOfPHOSTracks = -10;
165         fNumberOfEMCALClusters = -10;
166
167         fNumberOfJetCandidates = -10;
168         fNumberOfHardPhotonsCandidates = -10;
169
170         fNumberOfElectrons = -10;
171         fNumberOfMuons = -10;
172         fNumberOfPions = -10;
173         fNumberOfKaons = -10;
174         fNumberOfProtons = -10;
175         fNumberOfLambdas = -10;
176
177         fNumberOfJPsiCandidates = -10;
178         fNumberOfPsiPrimeCandidates = -10;
179         fNumberOfUpsilonCandidates = -10;
180         fNumberOfUpsilonPrimeCandidates = -10;
181         fNumberOfUpsilonDoublePrimeCandidates = -10;
182         fNumberOfCharmParticleCandidates = -10;
183         fNumberOfBeautyParticleCandidates = -10;
184
185         fK0PeakPosition = -10.0;
186         fK0PeakWidth = -10.0;
187
188         fTotalP = -10.0;
189         fMeanPt = -10.0;
190         fMaxPt = -10.0;
191
192         fFlowV1 = -10.0;
193         fFlowV2 = -10.0;
194 }
195
196
197 //______________________________________________________________________________
198 AliEventTag::AliEventTag(AliEventTag *EvTag)
199 {
200         // EventTag copy constructor
201         CopyTag(EvTag);
202 }
203 //______________________________________________________________________________
204 AliEventTag::~AliEventTag()
205 {
206 }
207
208 //______________________________________________________________________________
209 void AliEventTag::CopyTag(AliEventTag *EvTag)
210 {
211         SetEventId(EvTag->GetEventId());
212         SetGUID(EvTag->GetGUID());
213
214         SetNumOfParticipants(EvTag->GetNumOfParticipants());
215         SetImpactParameter(EvTag->GetImpactParameter());
216
217         SetVertexX(EvTag->GetVertexX());
218         SetVertexY(EvTag->GetVertexY());
219         SetVertexZ(EvTag->GetVertexZ());
220
221         SetTrigger(EvTag->GetTrigger());
222
223         SetZDCNeutronEnergy(EvTag->GetZDCNeutronEnergy());
224         SetZDCProtonEnergy(EvTag->GetZDCProtonEnergy());
225         SetZDCEMEnergy(EvTag->GetZDCEMEnergy());
226
227         SetT0VertexZ(EvTag->GetT0VertexZ());
228
229         SetNumOfTracks(EvTag->GetNumOfTracks());
230         SetNumOfPosTracks(EvTag->GetNumOfPosTracks());
231         SetNumOfNegTracks(EvTag->GetNumOfNegTracks());
232         SetNumOfNeutrTracks(EvTag->GetNumOfNeutrTracks());
233
234         SetNumOfV0s(EvTag->GetNumOfV0s());
235         SetNumOfCascades(EvTag->GetNumOfCascades());
236         SetNumOfKinks(EvTag->GetNumOfKinks());
237
238         SetNumOfPMDTracks(EvTag->GetNumOfPMDTracks());
239         SetNumOfFMDTracks(EvTag->GetNumOfFMDTracks());
240         SetNumOfPHOSTracks(EvTag->GetNumOfPHOSTracks());
241         SetNumOfEMCALClusters(EvTag->GetNumOfEMCALClusters());
242
243         SetNumOfJetCandidates(EvTag->GetNumOfJetCandidates());
244         SetNumOfHardPhotonsCandidates(EvTag->GetNumOfHardPhotonsCandidates());
245         SetNumOfJPsiCandidates(EvTag->GetNumOfJPsiCandidates());
246         SetNumOfPsiPrimeCandidates(EvTag->GetNumOfPsiPrimeCandidates());
247         SetNumOfUpsilonCandidates(EvTag->GetNumOfUpsilonCandidates());
248         SetNumOfUpsilonPrimeCandidates(EvTag->GetNumOfUpsilonPrimeCandidates());
249         SetNumOfUpsilonDoublePrimeCandidates(EvTag->GetNumOfUpsilonDoublePrimeCandidates());
250         SetNumOfCharmCandidates(EvTag->GetNumOfCharmCandidates());
251         SetNumOfBeautyCandidates(EvTag->GetNumOfBeautyCandidates());
252
253         SetNumOfElectrons(EvTag->GetNumOfElectrons());
254         SetNumOfMuons(EvTag->GetNumOfMuons());
255         SetNumOfPions(EvTag->GetNumOfPions());
256         SetNumOfKaons(EvTag->GetNumOfKaons());
257         SetNumOfProtons(EvTag->GetNumOfProtons());
258         SetNumOfLambdas(EvTag->GetNumOfLambdas());
259
260         SetK0Peak(EvTag->GetK0Peak());
261         SetK0Width(EvTag->GetK0Width());
262
263         SetTotalMomentum(EvTag->GetTotalMomentum());
264         SetMeanPt(EvTag->GetMeanPt());
265         SetMaxPt(EvTag->GetMaxPt());
266
267         SetFlowV1(EvTag->GetFlowV1());
268         SetFlowV2(EvTag->GetFlowV2());
269 }