]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliESDtrack.cxx
Added customised streamer to AliMUONSt12QuadrantSegmentation (to get correct behavio...
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.cxx
CommitLineData
ae982df3 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 **************************************************************************/
ae982df3 15//-----------------------------------------------------------------
16// Implementation of the ESD track class
4427806c 17// ESD = Event Summary Data
15614b8b 18// This is the class to deal with during the phisics analysis of data
4427806c 19// Origin: Iouri Belikov, CERN
20// e-mail: Jouri.Belikov@cern.ch
ae982df3 21//-----------------------------------------------------------------
22
23#include "TMath.h"
24
25#include "AliESDtrack.h"
26#include "AliKalmanTrack.h"
5f7789fc 27#include "AliLog.h"
ae982df3 28
29ClassImp(AliESDtrack)
30
31//_______________________________________________________________________
32AliESDtrack::AliESDtrack() :
2bad268c 33fFlags(0),
34fLabel(0),
1e5d06c3 35fID(0),
2bad268c 36fTrackLength(0),
399fb957 37fD(0),
38fZ(0),
2bad268c 39fStopVertex(0),
40fRalpha(0),
41fRx(0),
a866ac60 42fCalpha(0),
43fCx(0),
67c3dcbe 44fCchi2(1e10),
a866ac60 45fIalpha(0),
46fIx(0),
c4d11b15 47fTalpha(0),
48fTx(0),
2bad268c 49fITSchi2(0),
ae982df3 50fITSncls(0),
2bad268c 51fITSsignal(0),
2bad268c 52fTPCchi2(0),
05e445cd 53fTPCncls(0),
a866ac60 54fTPCClusterMap(159),//number of padrows
2bad268c 55fTPCsignal(0),
56fTRDchi2(0),
57fTRDncls(0),
c4d11b15 58fTRDncls0(0),
2bad268c 59fTRDsignal(0),
7c97ee80 60fTRDQuality(0),
2bad268c 61fTOFchi2(0),
ea776286 62fTOFindex(0),
4a78b8c5 63fTOFsignal(-1),
64fPHOSsignal(-1),
704be597 65fEMCALsignal(-1),
1e5d06c3 66fRICHchi2(1e10),
67fRICHncls(0),
68fRICHindex(0),
69fRICHsignal(-1),
70fRICHtheta(0),
71fRICHphi(0),
72fRICHdx(0),
73fRICHdy(0)
ae982df3 74{
75 //
76 // The default ESD constructor
77 //
304864ab 78 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
4a78b8c5 79 fTrackTime[i]=0.;
80 fR[i]=1.;
81 fITSr[i]=1.;
82 fTPCr[i]=1.;
83 fTRDr[i]=1.;
84 fTOFr[i]=1.;
4a78b8c5 85 fRICHr[i]=1.;
2bad268c 86 }
ac2f7574 87
304864ab 88 for (Int_t i=0; i<AliPID::kSPECIESN; i++) {
704be597 89 fPHOSr[i] = 1.;
90 fEMCALr[i] = 1.;
91 }
92
ac2f7574 93
4a78b8c5 94 fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
704be597 95 fEMCALpos[0]=fEMCALpos[1]=fEMCALpos[2]=0.;
bb2ceb1f 96 Int_t i;
15614b8b 97 for (i=0; i<5; i++) {
23904d16 98 fRp[i]=fCp[i]=fIp[i]=fTp[i]=0.;
15614b8b 99 }
100 for (i=0; i<15; i++) {
23904d16 101 fRc[i]=fCc[i]=fIc[i]=fTc[i]=0.;
15614b8b 102 }
a866ac60 103 for (i=0; i<6; i++) { fITSindex[i]=0; }
104 for (i=0; i<180; i++){ fTPCindex[i]=0; }
51ad6848 105 for (i=0; i<3;i++) { fKinkIndexes[i]=0;}
106 for (i=0; i<3;i++) { fV0Indexes[i]=-1;}
c4d11b15 107 for (i=0; i<130; i++) { fTRDindex[i]=0; }
eab5961e 108 for (i=0;i<kNPlane;i++) {fTRDsignals[i]=0.; fTRDTimBin[i]=-1;}
51ad6848 109 for (Int_t i=0;i<4;i++) {fTPCPoints[i]=-1;}
110 for (Int_t i=0;i<3;i++) {fTOFLabel[i]=-1;}
111 for (Int_t i=0;i<10;i++) {fTOFInfo[i]=-1;}
6e5b1b04 112 fTPCLabel = 0;
113 fTRDLabel = 0;
7c97ee80 114 fTRDQuality =0;
6e5b1b04 115 fITSLabel = 0;
c4d11b15 116 fITStrack = 0;
117 fTRDtrack = 0;
118}
119
120//_______________________________________________________________________
121
122AliESDtrack::AliESDtrack(const AliESDtrack& track):TObject(track){
123 //
124 //copy constructor
125 //
126 fFlags = track.fFlags;
127 fLabel =track.fLabel;
1e5d06c3 128 fID = track.fID;
c4d11b15 129 fTrackLength =track.fTrackLength;
399fb957 130 fD=track.fD; fZ=track.fZ;
304864ab 131 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] =track.fTrackTime[i];
132 for (Int_t i=0;i<AliPID::kSPECIES;i++) fR[i] =track.fR[i];
c4d11b15 133 fStopVertex =track.fStopVertex;
134 //
135 fRalpha =track.fRalpha;
136 fRx =track.fRx;
137 for (Int_t i=0;i<5;i++) fRp[i] =track.fRp[i];
138 for (Int_t i=0;i<15;i++) fRc[i] =track.fRc[i];
139 //
140 fCalpha =track.fCalpha;
141 fCx =track.fCx;
142 for (Int_t i=0;i<5;i++) fCp[i] =track.fCp[i];
143 for (Int_t i=0;i<15;i++) fCc[i] =track.fCc[i];
144 fCchi2 =track.fCchi2;
145 //
146 fIalpha =track.fIalpha;
147 fIx =track.fIx;
148 for (Int_t i=0;i<5;i++) fIp[i] =track.fIp[i];
149 for (Int_t i=0;i<15;i++) fIc[i] =track.fIc[i];
150 //
151 fTalpha =track.fTalpha;
152 fTx =track.fTx;
153 for (Int_t i=0;i<5;i++) fTp[i] =track.fTp[i];
154 for (Int_t i=0;i<15;i++) fTc[i] =track.fTc[i];
155 //
c4d11b15 156 fITSchi2 =track.fITSchi2;
157 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] =track.fITSchi2MIP[i];
158 fITSncls =track.fITSncls;
159 for (Int_t i=0;i<6;i++) fITSindex[i]=track.fITSindex[i];
160 fITSsignal =track.fITSsignal;
304864ab 161 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]=track.fITSr[i];
c4d11b15 162 fITSLabel =track.fITSLabel;
163 fITSFakeRatio =track.fITSFakeRatio;
164 fITStrack =0; //coping separatelly - in user code
165 //
166 fTPCchi2 =track.fTPCchi2;
167 fTPCncls =track.fTPCncls;
168 for (Int_t i=0;i<180;i++) fTPCindex[i]=track.fTPCindex[i];
169 fTPCClusterMap=track.fTPCClusterMap;
170 fTPCsignal=track.fTPCsignal;
304864ab 171 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=track.fTPCr[i];
c4d11b15 172 fTPCLabel=track.fTPCLabel;
51ad6848 173 for (Int_t i=0;i<4;i++) {fTPCPoints[i]=track.fTPCPoints[i];}
174 for (Int_t i=0; i<3;i++) { fKinkIndexes[i]=track.fKinkIndexes[i];}
175 for (Int_t i=0; i<3;i++) { fV0Indexes[i]=track.fV0Indexes[i];}
c4d11b15 176 //
177 fTRDchi2=track.fTRDchi2;
178 fTRDncls=track.fTRDncls;
179 fTRDncls0=track.fTRDncls0;
180 for (Int_t i=0;i<130;i++) fTRDindex[i]=track.fTRDindex[i];
181 fTRDsignal=track.fTRDsignal;
eab5961e 182 for (Int_t i=0;i<kNPlane;i++) {
183 fTRDsignals[i]=track.fTRDsignals[i];
184 fTRDTimBin[i]=track.fTRDTimBin[i];
185 }
304864ab 186 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i]=track.fTRDr[i];
c4d11b15 187 fTRDLabel=track.fTRDLabel;
188 fTRDtrack=0;
7c97ee80 189 fTRDQuality = track.fTRDQuality;
c4d11b15 190 //
191 fTOFchi2=track.fTOFchi2;
192 fTOFindex=track.fTOFindex;
193 fTOFsignal=track.fTOFsignal;
304864ab 194 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i]=track.fTOFr[i];
51ad6848 195 for (Int_t i=0;i<3;i++) fTOFLabel[i]=track.fTOFLabel[i];
196 for (Int_t i=0;i<10;i++) fTOFInfo[i]=track.fTOFInfo[i];
c4d11b15 197 //
198 for (Int_t i=0;i<3;i++) fPHOSpos[i]=track.fPHOSpos[i];
199 fPHOSsignal=track.fPHOSsignal;
304864ab 200 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i]=track.fPHOSr[i];
c4d11b15 201 //
202 for (Int_t i=0;i<3;i++) fEMCALpos[i]=track.fEMCALpos[i];
203 fEMCALsignal=track.fEMCALsignal;
304864ab 204 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i]=track.fEMCALr[i];
c4d11b15 205 //
1e5d06c3 206 fRICHchi2=track.fRICHchi2;
207 fRICHncls=track.fRICHncls;
208 fRICHindex=track.fRICHindex;
c4d11b15 209 fRICHsignal=track.fRICHsignal;
304864ab 210 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i]=track.fRICHr[i];
1e5d06c3 211 fRICHtheta=track.fRICHtheta;
212 fRICHphi=track.fRICHphi;
213 fRICHdx=track.fRICHdx;
214 fRICHdy=track.fRICHdy;
ae982df3 215}
c4d11b15 216//_______________________________________________________________________
217AliESDtrack::~AliESDtrack(){
218 //
219 // This is destructor according Coding Conventrions
220 //
221 //printf("Delete track\n");
3fd96ae3 222 delete fITStrack;
223 delete fTRDtrack;
c4d11b15 224}
ae982df3 225
9559cbc4 226//_______________________________________________________________________
227void AliESDtrack::MakeMiniESDtrack(){
228 // Resets everything except
229 // fFlags: Reconstruction status flags
230 // fLabel: Track label
231 // fID: Unique ID of the track
232 // fD: Impact parameter in XY-plane
233 // fZ: Impact parameter in Z
234 // fR[AliPID::kSPECIES]: combined "detector response probability"
235 // Running track parameters
236 // fRalpha: track rotation angle
237 // fRx: X-coordinate of the track reference plane
238 // fRp[5]: external track parameters
239 // fRc[15]: external cov. matrix of the track parameters
240
241 fTrackLength = 0;
242 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTrackTime[i] = 0;
243 fStopVertex = 0;
244
245 // Reset track parameters constrained to the primary vertex
246 fCalpha = 0;
247 fCx = 0;
248 for (Int_t i=0;i<5;i++) fCp[i] = 0;
249 for (Int_t i=0;i<15;i++) fCc[i] = 0;
250 fCchi2 = 0;
251
252 // Reset track parameters at the inner wall of TPC
253 fIalpha = 0;
254 fIx = 0;
255 for (Int_t i=0;i<5;i++) fIp[i] = 0;
256 for (Int_t i=0;i<15;i++) fIc[i] = 0;
257
258 // Reset track parameters at the inner wall of the TRD
259 fTalpha = 0;
260 fTx = 0;
261 for (Int_t i=0;i<5;i++) fTp[i] = 0;
262 for (Int_t i=0;i<15;i++) fTc[i] = 0;
263
264 // Reset ITS track related information
265 fITSchi2 = 0;
266 for (Int_t i=0;i<12;i++) fITSchi2MIP[i] = 0;
267 fITSncls = 0;
268 for (Int_t i=0;i<6;i++) fITSindex[i]= 0;
269 fITSsignal = 0;
270 for (Int_t i=0;i<AliPID::kSPECIES;i++) fITSr[i]= 0;
271 fITSLabel = 0;
272 fITSFakeRatio = 0;
273 fITStrack =0;
274
275 // Reset TPC related track information
276 fTPCchi2 = 0;
277 fTPCncls = 0;
278 for (Int_t i=0;i<180;i++) fTPCindex[i] = 0;
279 fTPCClusterMap = 0;
280 fTPCsignal= 0;
281 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTPCr[i]=0;
282 fTPCLabel=0;
283 for (Int_t i=0;i<4;i++) fTPCPoints[i] = 0;
284 for (Int_t i=0; i<3;i++) fKinkIndexes[i] = 0;
285 for (Int_t i=0; i<3;i++) fV0Indexes[i] = 0;
286
287 // Reset TRD related track information
288 fTRDchi2 = 0;
289 fTRDncls = 0;
290 fTRDncls0 = 0;
291 for (Int_t i=0;i<130;i++) fTRDindex[i] = 0;
292 fTRDsignal = 0;
293 for (Int_t i=0;i<kNPlane;i++) {
294 fTRDsignals[i] = 0;
295 fTRDTimBin[i] = 0;
296 }
297 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTRDr[i] = 0;
298 fTRDLabel = 0;
299 fTRDtrack = 0;
300 fTRDQuality = 0;
301
302 // Reset TOF related track information
303 fTOFchi2 = 0;
304 fTOFindex = 0;
305 fTOFsignal = 0;
306 for (Int_t i=0;i<AliPID::kSPECIES;i++) fTOFr[i] = 0;
307 for (Int_t i=0;i<3;i++) fTOFLabel[i] = 0;
308 for (Int_t i=0;i<10;i++) fTOFInfo[i] = 0;
309
310 // Reset PHOS related track information
311 for (Int_t i=0;i<3;i++) fPHOSpos[i] = 0;
312 fPHOSsignal = 0;
313 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i] = 0;
314
315 // Reset EMCAL related track information
316 for (Int_t i=0;i<3;i++) fEMCALpos[i] = 0;
317 fEMCALsignal = 0;
318 for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i] = 0;
319
320 // Reset RICH related track information
321 fRICHchi2 = 0;
322 fRICHncls = 0;
323 fRICHindex = 0;
324 fRICHsignal = 0;
325 for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i] = 0;
326 fRICHtheta = 0;
327 fRICHphi = 0;
328 fRICHdx = 0;
329 fRICHdy = 0;
330
331}
ae982df3 332//_______________________________________________________________________
4a78b8c5 333Double_t AliESDtrack::GetMass() const {
4427806c 334 // Returns the mass of the most probable particle type
ae982df3 335 Float_t max=0.;
336 Int_t k=-1;
304864ab 337 for (Int_t i=0; i<AliPID::kSPECIES; i++) {
ae982df3 338 if (fR[i]>max) {k=i; max=fR[i];}
339 }
db3989b3 340 if (k==0) { // dE/dx "crossing points" in the TPC
341 Double_t p=GetP();
342 if ((p>0.38)&&(p<0.48))
304864ab 343 if (fR[0]<fR[3]*10.) return AliPID::ParticleMass(AliPID::kKaon);
db3989b3 344 if ((p>0.75)&&(p<0.85))
304864ab 345 if (fR[0]<fR[4]*10.) return AliPID::ParticleMass(AliPID::kProton);
db3989b3 346 return 0.00051;
347 }
304864ab 348 if (k==1) return AliPID::ParticleMass(AliPID::kMuon);
349 if (k==2||k==-1) return AliPID::ParticleMass(AliPID::kPion);
350 if (k==3) return AliPID::ParticleMass(AliPID::kKaon);
351 if (k==4) return AliPID::ParticleMass(AliPID::kProton);
5f7789fc 352 AliWarning("Undefined mass !");
304864ab 353 return AliPID::ParticleMass(AliPID::kPion);
ae982df3 354}
355
356//_______________________________________________________________________
15614b8b 357Bool_t AliESDtrack::UpdateTrackParams(const AliKalmanTrack *t, ULong_t flags) {
ae982df3 358 //
359 // This function updates track's running parameters
360 //
15614b8b 361 Bool_t rc=kTRUE;
362
9b859005 363 SetStatus(flags);
364 fLabel=t->GetLabel();
365
366 if (t->IsStartedTimeIntegral()) {
367 SetStatus(kTIME);
368 Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times);
369 SetIntegratedLength(t->GetIntegratedLength());
370 }
371
372 fRalpha=t->GetAlpha();
373 t->GetExternalParameters(fRx,fRp);
374 t->GetExternalCovariance(fRc);
375
ae982df3 376 switch (flags) {
ad2f1f2b 377
9b859005 378 case kITSin: case kITSout: case kITSrefit:
ae982df3 379 fITSncls=t->GetNumberOfClusters();
380 fITSchi2=t->GetChi2();
381 for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i);
382 fITSsignal=t->GetPIDsignal();
6e5b1b04 383 fITSLabel = t->GetLabel();
babd135a 384 fITSFakeRatio = t->GetFakeRatio();
ae982df3 385 break;
ad2f1f2b 386
9b859005 387 case kTPCin: case kTPCrefit:
6e5b1b04 388 fTPCLabel = t->GetLabel();
9b859005 389 fIalpha=fRalpha;
51ad6848 390 fIx=fRx;
9b859005 391 {
392 Int_t i;
393 for (i=0; i<5; i++) fIp[i]=fRp[i];
394 for (i=0; i<15;i++) fIc[i]=fRc[i];
395 }
396 case kTPCout:
a866ac60 397
ae982df3 398 fTPCncls=t->GetNumberOfClusters();
399 fTPCchi2=t->GetChi2();
a866ac60 400
401 {//prevrow must be declared in separate namespace, otherwise compiler cries:
402 //"jump to case label crosses initialization of `Int_t prevrow'"
403 Int_t prevrow = -1;
6e5b1b04 404 // for (Int_t i=0;i<fTPCncls;i++)
405 for (Int_t i=0;i<160;i++)
a866ac60 406 {
407 fTPCindex[i]=t->GetClusterIndex(i);
408
409 // Piotr's Cluster Map for HBT
410 // ### please change accordingly if cluster array is changing
411 // to "New TPC Tracking" style (with gaps in array)
412 Int_t idx = fTPCindex[i];
413 Int_t sect = (idx&0xff000000)>>24;
414 Int_t row = (idx&0x00ff0000)>>16;
415 if (sect > 18) row +=63; //if it is outer sector, add number of inner sectors
416
417 fTPCClusterMap.SetBitNumber(row,kTRUE);
418
419 //Fill the gap between previous row and this row with 0 bits
420 //In case ### pleas change it as well - just set bit 0 in case there
421 //is no associated clusters for current "i"
422 if (prevrow < 0)
423 {
424 prevrow = row;//if previous bit was not assigned yet == this is the first one
425 }
426 else
427 { //we don't know the order (inner to outer or reverse)
428 //just to be save in case it is going to change
429 Int_t n = 0, m = 0;
430 if (prevrow < row)
431 {
432 n = prevrow;
433 m = row;
434 }
435 else
436 {
437 n = row;
438 m = prevrow;
439 }
440
441 for (Int_t j = n+1; j < m; j++)
442 {
443 fTPCClusterMap.SetBitNumber(j,kFALSE);
444 }
445 prevrow = row;
446 }
447 // End Of Piotr's Cluster Map for HBT
448 }
449 }
ae982df3 450 fTPCsignal=t->GetPIDsignal();
451 {Double_t mass=t->GetMass(); // preliminary mass setting
452 if (mass>0.5) fR[4]=1.; // used by
453 else if (mass<0.4) fR[2]=1.; // the ITS reconstruction
a866ac60 454 else fR[3]=1.;}
455 //
ae982df3 456 break;
9b859005 457
23904d16 458 case kTRDout: case kTRDin: case kTRDrefit:
51ad6848 459 fTRDLabel = t->GetLabel();
79e94bf8 460 fTRDncls=t->GetNumberOfClusters();
461 fTRDchi2=t->GetChi2();
bb2ceb1f 462 for (Int_t i=0;i<fTRDncls;i++) fTRDindex[i]=t->GetClusterIndex(i);
79e94bf8 463 fTRDsignal=t->GetPIDsignal();
464 break;
c4d11b15 465 case kTRDbackup:
466 t->GetExternalParameters(fTx,fTp);
467 t->GetExternalCovariance(fTc);
35f4ab61 468 fTalpha = t->GetAlpha();
c4d11b15 469 fTRDncls0 = t->GetNumberOfClusters();
470 break;
471 case kTOFin:
472 break;
473 case kTOFout:
474 break;
d0862fea 475 case kTRDStop:
476 break;
ae982df3 477 default:
5f7789fc 478 AliError("Wrong flag !");
ae982df3 479 return kFALSE;
480 }
481
15614b8b 482 return rc;
ae982df3 483}
484
67c3dcbe 485//_______________________________________________________________________
486void
5ccd1720 487AliESDtrack::SetConstrainedTrackParams(const AliKalmanTrack *t, Double_t chi2) {
67c3dcbe 488 //
489 // This function sets the constrained track parameters
490 //
db3989b3 491 Int_t i;
492 Double_t x,buf[15];
67c3dcbe 493 fCalpha=t->GetAlpha();
db3989b3 494 t->GetExternalParameters(x,buf); fCx=x;
495 for (i=0; i<5; i++) fCp[i]=buf[i];
496 t->GetExternalCovariance(buf);
497 for (i=0; i<15; i++) fCc[i]=buf[i];
67c3dcbe 498 fCchi2=chi2;
499}
500
501
ae982df3 502//_______________________________________________________________________
503void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const {
504 //---------------------------------------------------------------------
505 // This function returns external representation of the track parameters
506 //---------------------------------------------------------------------
507 x=fRx;
508 for (Int_t i=0; i<5; i++) p[i]=fRp[i];
509}
15614b8b 510
511//_______________________________________________________________________
512Bool_t AliESDtrack::GetExternalParametersAt(Double_t x, Double_t p[5]) const {
513 //---------------------------------------------------------------------
514 // This function returns external representation of the track parameters
515 // at the position given by the first argument
516 //---------------------------------------------------------------------
517 Double_t dx=x-fRx;
518 Double_t f1=fRp[2], f2=f1 + dx*fRp[4]/AliKalmanTrack::GetConvConst();
519
520 if (TMath::Abs(f2) >= 0.9999) return kFALSE;
521
522 Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
523 p[0] = fRp[0] + dx*(f1+f2)/(r1+r2);
524 p[1] = fRp[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fRp[3];
525 p[2] = f2;
526 p[3] = fRp[3];
527 p[4] = fRp[4];
528
529 return kTRUE;
530}
531
67c3dcbe 532//_______________________________________________________________________
a866ac60 533void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const {
67c3dcbe 534 //---------------------------------------------------------------------
535 // This function returns external representation of the cov. matrix
536 //---------------------------------------------------------------------
a866ac60 537 for (Int_t i=0; i<15; i++) cov[i]=fRc[i];
67c3dcbe 538}
539
540
541//_______________________________________________________________________
542void
543AliESDtrack::GetConstrainedExternalParameters(Double_t &x, Double_t p[5])const{
544 //---------------------------------------------------------------------
545 // This function returns the constrained external track parameters
546 //---------------------------------------------------------------------
547 x=fCx;
548 for (Int_t i=0; i<5; i++) p[i]=fCp[i];
549}
550//_______________________________________________________________________
551void
552AliESDtrack::GetConstrainedExternalCovariance(Double_t c[15]) const {
553 //---------------------------------------------------------------------
554 // This function returns the constrained external cov. matrix
555 //---------------------------------------------------------------------
556 for (Int_t i=0; i<15; i++) c[i]=fCc[i];
557}
558
ae982df3 559
560Double_t AliESDtrack::GetP() const {
561 //---------------------------------------------------------------------
562 // This function returns the track momentum
b322ab2f 563 // Results for (nearly) straight tracks are meaningless !
ae982df3 564 //---------------------------------------------------------------------
2157f4f2 565 if (TMath::Abs(fRp[4])<=0) return 0;
ae982df3 566 Double_t pt=1./TMath::Abs(fRp[4]);
5bc70ad8 567 return pt*TMath::Sqrt(1.+ fRp[3]*fRp[3]);
ae982df3 568}
569
09c96efc 570Bool_t Local2GlobalMomentum(Double_t p[3],Double_t alpha) {
571 //----------------------------------------------------------------
572 // This function performs local->global transformation of the
573 // track momentum.
574 // When called, the arguments are:
575 // p[0] = 1/pt of the track;
576 // p[1] = sine of local azim. angle of the track momentum;
577 // p[2] = tangent of the track momentum dip angle;
578 // alpha - rotation angle.
579 // The result is returned as:
580 // p[0] = px
581 // p[1] = py
582 // p[2] = pz
583 // Results for (nearly) straight tracks are meaningless !
584 //----------------------------------------------------------------
585 if (TMath::Abs(p[0])<=0) return kFALSE;
586 if (TMath::Abs(p[1])> 0.999999) return kFALSE;
587
588 Double_t pt=1./TMath::Abs(p[0]);
589 Double_t cs=TMath::Cos(alpha), sn=TMath::Sin(alpha);
590 Double_t r=TMath::Sqrt(1 - p[1]*p[1]);
591 p[0]=pt*(r*cs - p[1]*sn); p[1]=pt*(p[1]*cs + r*sn); p[2]=pt*p[2];
592
593 return kTRUE;
594}
595
596Bool_t Local2GlobalPosition(Double_t r[3],Double_t alpha) {
597 //----------------------------------------------------------------
598 // This function performs local->global transformation of the
599 // track position.
600 // When called, the arguments are:
601 // r[0] = local x
602 // r[1] = local y
603 // r[2] = local z
604 // alpha - rotation angle.
605 // The result is returned as:
606 // r[0] = global x
607 // r[1] = global y
608 // r[2] = global z
609 //----------------------------------------------------------------
610 Double_t cs=TMath::Cos(alpha), sn=TMath::Sin(alpha), x=r[0];
611 r[0]=x*cs - r[1]*sn; r[1]=x*sn + r[1]*cs;
612
613 return kTRUE;
614}
615
616Bool_t AliESDtrack::GetConstrainedPxPyPz(Double_t *p) const {
67c3dcbe 617 //---------------------------------------------------------------------
618 // This function returns the constrained global track momentum components
b322ab2f 619 // Results for (nearly) straight tracks are meaningless !
67c3dcbe 620 //---------------------------------------------------------------------
09c96efc 621 p[0]=fCp[4]; p[1]=fCp[2]; p[2]=fCp[3];
622 return Local2GlobalMomentum(p,fCalpha);
623}
b322ab2f 624
09c96efc 625Bool_t AliESDtrack::GetConstrainedXYZ(Double_t *r) const {
67c3dcbe 626 //---------------------------------------------------------------------
09c96efc 627 // This function returns the constrained global track position
67c3dcbe 628 //---------------------------------------------------------------------
09c96efc 629 r[0]=fCx; r[1]=fCp[0]; r[2]=fCp[1];
630 return Local2GlobalPosition(r,fCalpha);
67c3dcbe 631}
632
09c96efc 633Bool_t AliESDtrack::GetPxPyPz(Double_t *p) const {
ae982df3 634 //---------------------------------------------------------------------
635 // This function returns the global track momentum components
b322ab2f 636 // Results for (nearly) straight tracks are meaningless !
ae982df3 637 //---------------------------------------------------------------------
09c96efc 638 p[0]=fRp[4]; p[1]=fRp[2]; p[2]=fRp[3];
639 return Local2GlobalMomentum(p,fRalpha);
ae982df3 640}
b322ab2f 641
09c96efc 642Bool_t AliESDtrack::GetXYZ(Double_t *r) const {
ae982df3 643 //---------------------------------------------------------------------
644 // This function returns the global track position
645 //---------------------------------------------------------------------
09c96efc 646 r[0]=fRx; r[1]=fRp[0]; r[2]=fRp[1];
647 return Local2GlobalPosition(r,fRalpha);
ae982df3 648}
649
b322ab2f 650void AliESDtrack::GetCovariance(Double_t cv[21]) const {
651 //---------------------------------------------------------------------
652 // This function returns the global covariance matrix of the track params
653 //
654 // Cov(x,x) ... : cv[0]
655 // Cov(y,x) ... : cv[1] cv[2]
656 // Cov(z,x) ... : cv[3] cv[4] cv[5]
657 // Cov(px,x)... : cv[6] cv[7] cv[8] cv[9]
23904d16 658 // Cov(py,x)... : cv[10] cv[11] cv[12] cv[13] cv[14]
659 // Cov(pz,x)... : cv[15] cv[16] cv[17] cv[18] cv[19] cv[20]
b322ab2f 660 //
661 // Results for (nearly) straight tracks are meaningless !
662 //---------------------------------------------------------------------
663 if (TMath::Abs(fRp[4])<=0) {
664 for (Int_t i=0; i<21; i++) cv[i]=0.;
665 return;
666 }
667 if (TMath::Abs(fRp[2]) > 0.999999) {
668 for (Int_t i=0; i<21; i++) cv[i]=0.;
669 return;
670 }
671 Double_t pt=1./TMath::Abs(fRp[4]);
672 Double_t cs=TMath::Cos(fRalpha), sn=TMath::Sin(fRalpha);
673 Double_t r=TMath::Sqrt(1-fRp[2]*fRp[2]);
674
675 Double_t m00=-sn, m10=cs;
676 Double_t m23=-pt*(sn + fRp[2]*cs/r), m43=-pt*pt*(r*cs - fRp[2]*sn);
677 Double_t m24= pt*(cs - fRp[2]*sn/r), m44=-pt*pt*(r*sn + fRp[2]*cs);
678 Double_t m35=pt, m45=-pt*pt*fRp[3];
679
680 cv[0]=fRc[0]*m00*m00;
681 cv[1]=fRc[0]*m00*m10;
682 cv[2]=fRc[0]*m10*m10;
683 cv[3]=fRc[1]*m00;
684 cv[4]=fRc[1]*m10;
685 cv[5]=fRc[2];
686 cv[6]=m00*(fRc[3]*m23+fRc[10]*m43);
687 cv[7]=m10*(fRc[3]*m23+fRc[10]*m43);
688 cv[8]=fRc[4]*m23+fRc[11]*m43;
689 cv[9]=m23*(fRc[5]*m23+fRc[12]*m43)+m43*(fRc[12]*m23+fRc[14]*m43);
690 cv[10]=m00*(fRc[3]*m24+fRc[10]*m44);
691 cv[11]=m10*(fRc[3]*m24+fRc[10]*m44);
692 cv[12]=fRc[4]*m24+fRc[11]*m44;
693 cv[13]=m23*(fRc[5]*m24+fRc[12]*m44)+m43*(fRc[12]*m24+fRc[14]*m44);
694 cv[14]=m24*(fRc[5]*m24+fRc[12]*m44)+m44*(fRc[12]*m24+fRc[14]*m44);
695 cv[15]=m00*(fRc[6]*m35+fRc[10]*m45);
696 cv[16]=m10*(fRc[6]*m35+fRc[10]*m45);
697 cv[17]=fRc[7]*m35+fRc[11]*m45;
698 cv[18]=m23*(fRc[8]*m35+fRc[12]*m45)+m43*(fRc[13]*m35+fRc[14]*m45);
699 cv[19]=m24*(fRc[8]*m35+fRc[12]*m45)+m44*(fRc[13]*m35+fRc[14]*m45);
700 cv[20]=m35*(fRc[9]*m35+fRc[13]*m45)+m45*(fRc[13]*m35+fRc[14]*m45);
701}
67c3dcbe 702
09c96efc 703Bool_t AliESDtrack::GetInnerPxPyPz(Double_t *p) const {
9b859005 704 //---------------------------------------------------------------------
705 // This function returns the global track momentum components
706 // af the entrance of the TPC
707 //---------------------------------------------------------------------
09c96efc 708 p[0]=fIp[4]; p[1]=fIp[2]; p[2]=fIp[3];
709 return Local2GlobalMomentum(p,fIalpha);
9b859005 710}
711
09c96efc 712Bool_t AliESDtrack::GetInnerXYZ(Double_t *r) const {
9b859005 713 //---------------------------------------------------------------------
714 // This function returns the global track position
715 // af the entrance of the TPC
716 //---------------------------------------------------------------------
09c96efc 717 if (fIx==0) return kFALSE;
718 r[0]=fIx; r[1]=fIp[0]; r[2]=fIp[1];
719 return Local2GlobalPosition(r,fIalpha);
9b859005 720}
721
a866ac60 722void AliESDtrack::GetInnerExternalParameters(Double_t &x, Double_t p[5]) const
723{
724 //skowron
725 //---------------------------------------------------------------------
726 // This function returns external representation of the track parameters at Inner Layer of TPC
727 //---------------------------------------------------------------------
728 x=fIx;
729 for (Int_t i=0; i<5; i++) p[i]=fIp[i];
730}
731void AliESDtrack::GetInnerExternalCovariance(Double_t cov[15]) const
732{
733 //skowron
734 //---------------------------------------------------------------------
735 // This function returns external representation of the cov. matrix at Inner Layer of TPC
736 //---------------------------------------------------------------------
737 for (Int_t i=0; i<15; i++) cov[i]=fIc[i];
738
739}
740
35f4ab61 741void AliESDtrack::GetTRDExternalParameters(Double_t &x, Double_t&alpha, Double_t p[5], Double_t cov[15]) const
c4d11b15 742{
743 //
744 //this function returns TRD parameters
745 //
746 x=fTx;
35f4ab61 747 alpha = fTalpha;
c4d11b15 748 for (Int_t i=0; i<5; i++) p[i]=fTp[i];
749 for (Int_t i=0; i<15; i++) cov[i]=fTc[i];
750}
751
23904d16 752Bool_t AliESDtrack::GetPxPyPzAt(Double_t x,Double_t *p) const {
672b5f43 753 //---------------------------------------------------------------------
754 // This function returns the global track momentum components
23904d16 755 // at the position "x" using the helix track approximation
672b5f43 756 //---------------------------------------------------------------------
09c96efc 757 p[0]=fRp[4];
758 p[1]=fRp[2]+(x-fRx)*fRp[4]/AliKalmanTrack::GetConvConst();
759 p[2]=fRp[3];
760 return Local2GlobalMomentum(p,fRalpha);
672b5f43 761}
762
09c96efc 763Bool_t AliESDtrack::GetXYZAt(Double_t x, Double_t *r) const {
3fd96ae3 764 //---------------------------------------------------------------------
765 // This function returns the global track position
23904d16 766 // af the radius "x" using the helix track approximation
3fd96ae3 767 //---------------------------------------------------------------------
23904d16 768 Double_t dx=x-fRx;
769 Double_t f1=fRp[2], f2=f1 + dx*fRp[4]/AliKalmanTrack::GetConvConst();
770
771 if (TMath::Abs(f2) >= 0.9999) return kFALSE;
772
773 Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
09c96efc 774 r[0] = x;
775 r[1] = fRp[0] + dx*(f1+f2)/(r1+r2);
776 r[2] = fRp[1] + dx*(f1+f2)/(f1*r2 + f2*r1)*fRp[3];
777 return Local2GlobalPosition(r,fRalpha);
23904d16 778}
672b5f43 779
ae982df3 780//_______________________________________________________________________
781void AliESDtrack::GetIntegratedTimes(Double_t *times) const {
4427806c 782 // Returns the array with integrated times for each particle hypothesis
304864ab 783 for (Int_t i=0; i<AliPID::kSPECIES; i++) times[i]=fTrackTime[i];
ae982df3 784}
785
786//_______________________________________________________________________
787void AliESDtrack::SetIntegratedTimes(const Double_t *times) {
4427806c 788 // Sets the array with integrated times for each particle hypotesis
304864ab 789 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTrackTime[i]=times[i];
ae982df3 790}
791
c630aafd 792//_______________________________________________________________________
4427806c 793void AliESDtrack::SetITSpid(const Double_t *p) {
794 // Sets values for the probability of each particle type (in ITS)
304864ab 795 for (Int_t i=0; i<AliPID::kSPECIES; i++) fITSr[i]=p[i];
c630aafd 796 SetStatus(AliESDtrack::kITSpid);
797}
798
babd135a 799void AliESDtrack::SetITSChi2MIP(const Float_t *chi2mip){
c4d11b15 800 for (Int_t i=0; i<12; i++) fITSchi2MIP[i]=chi2mip[i];
babd135a 801}
c630aafd 802//_______________________________________________________________________
803void AliESDtrack::GetITSpid(Double_t *p) const {
4427806c 804 // Gets the probability of each particle type (in ITS)
304864ab 805 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fITSr[i];
c630aafd 806}
807
ae982df3 808//_______________________________________________________________________
809Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const {
810 //---------------------------------------------------------------------
811 // This function returns indices of the assgined ITS clusters
812 //---------------------------------------------------------------------
813 for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i];
814 return fITSncls;
815}
816
817//_______________________________________________________________________
05e445cd 818Int_t AliESDtrack::GetTPCclusters(Int_t *idx) const {
ae982df3 819 //---------------------------------------------------------------------
820 // This function returns indices of the assgined ITS clusters
821 //---------------------------------------------------------------------
d1420ddf 822 if (idx!=0)
823 for (Int_t i=0; i<180; i++) idx[i]=fTPCindex[i]; // MI I prefer some constant
ae982df3 824 return fTPCncls;
825}
8c6a71ab 826
827//_______________________________________________________________________
828void AliESDtrack::SetTPCpid(const Double_t *p) {
4427806c 829 // Sets values for the probability of each particle type (in TPC)
304864ab 830 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTPCr[i]=p[i];
8c6a71ab 831 SetStatus(AliESDtrack::kTPCpid);
832}
833
834//_______________________________________________________________________
835void AliESDtrack::GetTPCpid(Double_t *p) const {
4427806c 836 // Gets the probability of each particle type (in TPC)
304864ab 837 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTPCr[i];
8c6a71ab 838}
839
bb2ceb1f 840//_______________________________________________________________________
841Int_t AliESDtrack::GetTRDclusters(UInt_t *idx) const {
842 //---------------------------------------------------------------------
843 // This function returns indices of the assgined TRD clusters
844 //---------------------------------------------------------------------
d1420ddf 845 if (idx!=0)
c4d11b15 846 for (Int_t i=0; i<130; i++) idx[i]=fTRDindex[i]; // MI I prefer some constant
bb2ceb1f 847 return fTRDncls;
848}
849
c630aafd 850//_______________________________________________________________________
851void AliESDtrack::SetTRDpid(const Double_t *p) {
4427806c 852 // Sets values for the probability of each particle type (in TRD)
304864ab 853 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTRDr[i]=p[i];
c630aafd 854 SetStatus(AliESDtrack::kTRDpid);
855}
856
857//_______________________________________________________________________
858void AliESDtrack::GetTRDpid(Double_t *p) const {
4427806c 859 // Gets the probability of each particle type (in TRD)
304864ab 860 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTRDr[i];
c630aafd 861}
862
79e94bf8 863//_______________________________________________________________________
864void AliESDtrack::SetTRDpid(Int_t iSpecies, Float_t p)
865{
4427806c 866 // Sets the probability of particle type iSpecies to p (in TRD)
79e94bf8 867 fTRDr[iSpecies] = p;
868}
869
870Float_t AliESDtrack::GetTRDpid(Int_t iSpecies) const
871{
4427806c 872 // Returns the probability of particle type iSpecies (in TRD)
79e94bf8 873 return fTRDr[iSpecies];
874}
875
c630aafd 876//_______________________________________________________________________
877void AliESDtrack::SetTOFpid(const Double_t *p) {
4427806c 878 // Sets the probability of each particle type (in TOF)
304864ab 879 for (Int_t i=0; i<AliPID::kSPECIES; i++) fTOFr[i]=p[i];
c630aafd 880 SetStatus(AliESDtrack::kTOFpid);
881}
882
51ad6848 883//_______________________________________________________________________
884void AliESDtrack::SetTOFLabel(const Int_t *p) {
885 // Sets (in TOF)
886 for (Int_t i=0; i<3; i++) fTOFLabel[i]=p[i];
887}
888
c630aafd 889//_______________________________________________________________________
890void AliESDtrack::GetTOFpid(Double_t *p) const {
4427806c 891 // Gets probabilities of each particle type (in TOF)
304864ab 892 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fTOFr[i];
c630aafd 893}
894
51ad6848 895//_______________________________________________________________________
896void AliESDtrack::GetTOFLabel(Int_t *p) const {
897 // Gets (in TOF)
898 for (Int_t i=0; i<3; i++) p[i]=fTOFLabel[i];
899}
900
901//_______________________________________________________________________
902void AliESDtrack::GetTOFInfo(Float_t *info) const {
903 // Gets (in TOF)
904 for (Int_t i=0; i<10; i++) info[i]=fTOFInfo[i];
905}
906
907//_______________________________________________________________________
908void AliESDtrack::SetTOFInfo(Float_t*info) {
909 // Gets (in TOF)
910 for (Int_t i=0; i<10; i++) fTOFInfo[i]=info[i];
911}
912
4a78b8c5 913
914
915//_______________________________________________________________________
916void AliESDtrack::SetPHOSpid(const Double_t *p) {
917 // Sets the probability of each particle type (in PHOS)
304864ab 918 for (Int_t i=0; i<AliPID::kSPECIESN; i++) fPHOSr[i]=p[i];
4a78b8c5 919 SetStatus(AliESDtrack::kPHOSpid);
920}
921
922//_______________________________________________________________________
923void AliESDtrack::GetPHOSpid(Double_t *p) const {
924 // Gets probabilities of each particle type (in PHOS)
304864ab 925 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fPHOSr[i];
4a78b8c5 926}
927
704be597 928//_______________________________________________________________________
929void AliESDtrack::SetEMCALpid(const Double_t *p) {
930 // Sets the probability of each particle type (in EMCAL)
304864ab 931 for (Int_t i=0; i<AliPID::kSPECIESN; i++) fEMCALr[i]=p[i];
704be597 932 SetStatus(AliESDtrack::kEMCALpid);
933}
934
935//_______________________________________________________________________
936void AliESDtrack::GetEMCALpid(Double_t *p) const {
937 // Gets probabilities of each particle type (in EMCAL)
304864ab 938 for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fEMCALr[i];
704be597 939}
4a78b8c5 940
941//_______________________________________________________________________
942void AliESDtrack::SetRICHpid(const Double_t *p) {
943 // Sets the probability of each particle type (in RICH)
304864ab 944 for (Int_t i=0; i<AliPID::kSPECIES; i++) fRICHr[i]=p[i];
4a78b8c5 945 SetStatus(AliESDtrack::kRICHpid);
946}
947
948//_______________________________________________________________________
949void AliESDtrack::GetRICHpid(Double_t *p) const {
950 // Gets probabilities of each particle type (in RICH)
304864ab 951 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fRICHr[i];
4a78b8c5 952}
953
954
955
8c6a71ab 956//_______________________________________________________________________
957void AliESDtrack::SetESDpid(const Double_t *p) {
4427806c 958 // Sets the probability of each particle type for the ESD track
304864ab 959 for (Int_t i=0; i<AliPID::kSPECIES; i++) fR[i]=p[i];
8c6a71ab 960 SetStatus(AliESDtrack::kESDpid);
961}
962
963//_______________________________________________________________________
964void AliESDtrack::GetESDpid(Double_t *p) const {
4427806c 965 // Gets probability of each particle type for the ESD track
304864ab 966 for (Int_t i=0; i<AliPID::kSPECIES; i++) p[i]=fR[i];
8c6a71ab 967}
968
ac2f7574 969//_______________________________________________________________________
970void AliESDtrack::Print(Option_t *) const {
971 // Prints info on the track
972
5f7789fc 973 printf("ESD track info\n") ;
304864ab 974 Double_t p[AliPID::kSPECIESN] ;
ac2f7574 975 Int_t index = 0 ;
976 if( IsOn(kITSpid) ){
977 printf("From ITS: ") ;
978 GetITSpid(p) ;
304864ab 979 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 980 printf("%f, ", p[index]) ;
981 printf("\n signal = %f\n", GetITSsignal()) ;
982 }
983 if( IsOn(kTPCpid) ){
984 printf("From TPC: ") ;
985 GetTPCpid(p) ;
304864ab 986 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 987 printf("%f, ", p[index]) ;
988 printf("\n signal = %f\n", GetTPCsignal()) ;
989 }
990 if( IsOn(kTRDpid) ){
991 printf("From TRD: ") ;
992 GetTRDpid(p) ;
304864ab 993 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 994 printf("%f, ", p[index]) ;
995 printf("\n signal = %f\n", GetTRDsignal()) ;
996 }
997 if( IsOn(kTOFpid) ){
998 printf("From TOF: ") ;
999 GetTOFpid(p) ;
304864ab 1000 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1001 printf("%f, ", p[index]) ;
1002 printf("\n signal = %f\n", GetTOFsignal()) ;
1003 }
1004 if( IsOn(kRICHpid) ){
1005 printf("From TOF: ") ;
1006 GetRICHpid(p) ;
304864ab 1007 for(index = 0 ; index < AliPID::kSPECIES; index++)
ac2f7574 1008 printf("%f, ", p[index]) ;
1009 printf("\n signal = %f\n", GetRICHsignal()) ;
1010 }
1011 if( IsOn(kPHOSpid) ){
1012 printf("From PHOS: ") ;
1013 GetPHOSpid(p) ;
304864ab 1014 for(index = 0 ; index < AliPID::kSPECIESN; index++)
ac2f7574 1015 printf("%f, ", p[index]) ;
1016 printf("\n signal = %f\n", GetPHOSsignal()) ;
1017 }
704be597 1018 if( IsOn(kEMCALpid) ){
1019 printf("From EMCAL: ") ;
1020 GetEMCALpid(p) ;
304864ab 1021 for(index = 0 ; index < AliPID::kSPECIESN; index++)
704be597 1022 printf("%f, ", p[index]) ;
1023 printf("\n signal = %f\n", GetEMCALsignal()) ;
1024 }
ac2f7574 1025}