]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliESDtrack.cxx
Changes needed in PHOS (Y.Schutz)
[u/mrichter/AliRoot.git] / STEER / AliESDtrack.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 //           Implementation of the ESD track class
17 //   ESD = Event Summary Data
18 //   This is the class to deal with during the phisical analysis of data
19 //      Origin: Iouri Belikov, CERN
20 //      e-mail: Jouri.Belikov@cern.ch
21 //-----------------------------------------------------------------
22
23 #include "TMath.h"
24
25 #include "AliESDtrack.h"
26 #include "AliKalmanTrack.h"
27
28 ClassImp(AliESDtrack)
29
30 //_______________________________________________________________________
31 AliESDtrack::AliESDtrack() : 
32 fFlags(0),
33 fLabel(0),
34 fTrackLength(0),
35 fStopVertex(0),
36 fRalpha(0),
37 fRx(0),
38 fCalpha(0),
39 fCx(0),
40 fCchi2(1e10),
41 fIalpha(0),
42 fIx(0),
43 fOalpha(0),
44 fOx(0),
45 fITSchi2(0),
46 fITSncls(0),
47 fITSsignal(0),
48 fTPCchi2(0),
49 fTPCncls(0),
50 fTPCClusterMap(159),//number of padrows
51 fTPCsignal(0),
52 fTRDchi2(0),
53 fTRDncls(0),
54 fTRDsignal(0),
55 fTOFchi2(0),
56 fTOFindex(0),
57 fTOFsignal(-1),
58 fPHOSsignal(-1),
59 fRICHsignal(-1)
60 {
61   //
62   // The default ESD constructor 
63   //
64   for (Int_t i=0; i<kSPECIES; i++) {
65     fTrackTime[i]=0.;
66     fR[i]=1.;
67     fITSr[i]=1.;
68     fTPCr[i]=1.;
69     fTRDr[i]=1.;
70     fTOFr[i]=1.;
71     fRICHr[i]=1.;
72   }
73   
74   for (Int_t i=0; i<kSPECIESN; i++)
75     fPHOSr[i]= 1.;
76  
77   fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
78   Int_t i;
79   for (i=0; i<5; i++)  { fRp[i]=0.; fCp[i]=0.; fIp[i]=0.; fOp[i]=0.;}
80   for (i=0; i<15; i++) { fRc[i]=0.; fCc[i]=0.; fIc[i]=0.; fOc[i]=0.;   }
81   for (i=0; i<6; i++)  { fITSindex[i]=0; }
82   for (i=0; i<180; i++){ fTPCindex[i]=0; }
83   for (i=0; i<90; i++) { fTRDindex[i]=0; }
84   fTPCLabel = 0;
85   fTRDLabel = 0;
86   fITSLabel = 0;
87   
88 }
89
90 //_______________________________________________________________________
91 Double_t AliESDtrack::GetMass() const {
92   // Returns the mass of the most probable particle type
93   Float_t max=0.;
94   Int_t k=-1;
95   for (Int_t i=0; i<kSPECIES; i++) {
96     if (fR[i]>max) {k=i; max=fR[i];}
97   }
98   if (k==0) return 0.00051;
99   if (k==1) return 0.10566;
100   if (k==2||k==-1) return 0.13957;
101   if (k==3) return 0.49368;
102   if (k==4) return 0.93827;
103   Warning("GetMass()","Undefined mass !");
104   return 0.13957;
105 }
106
107 //_______________________________________________________________________
108 Bool_t AliESDtrack::UpdateTrackParams(AliKalmanTrack *t, ULong_t flags) {
109   //
110   // This function updates track's running parameters 
111   //
112   SetStatus(flags);
113   fLabel=t->GetLabel();
114
115   if (t->IsStartedTimeIntegral()) {
116     SetStatus(kTIME);
117     Double_t times[10];t->GetIntegratedTimes(times); SetIntegratedTimes(times);
118     SetIntegratedLength(t->GetIntegratedLength());
119   }
120
121   fRalpha=t->GetAlpha();
122   t->GetExternalParameters(fRx,fRp);
123   t->GetExternalCovariance(fRc);
124
125   switch (flags) {
126     
127   case kITSin: case kITSout: case kITSrefit:
128     fITSncls=t->GetNumberOfClusters();
129     fITSchi2=t->GetChi2();
130     for (Int_t i=0;i<fITSncls;i++) fITSindex[i]=t->GetClusterIndex(i);
131     fITSsignal=t->GetPIDsignal();
132     fITSLabel = t->GetLabel();
133     fITSFakeRatio = t->GetFakeRatio();
134     break;
135     
136   case kTPCin: case kTPCrefit:
137     fTPCLabel = t->GetLabel();
138     fIalpha=fRalpha;
139     fIx=fRx;
140     {
141       Int_t i;
142       for (i=0; i<5; i++) fIp[i]=fRp[i];
143       for (i=0; i<15;i++) fIc[i]=fRc[i];
144     }
145   case kTPCout:
146   
147     fTPCncls=t->GetNumberOfClusters();
148     fTPCchi2=t->GetChi2();
149     
150      {//prevrow must be declared in separate namespace, otherwise compiler cries:
151       //"jump to case label crosses initialization of `Int_t prevrow'"
152        Int_t prevrow = -1;
153        //       for (Int_t i=0;i<fTPCncls;i++) 
154        for (Int_t i=0;i<160;i++) 
155         {
156           fTPCindex[i]=t->GetClusterIndex(i);
157
158           // Piotr's Cluster Map for HBT  
159           // ### please change accordingly if cluster array is changing 
160           // to "New TPC Tracking" style (with gaps in array) 
161           Int_t idx = fTPCindex[i];
162           Int_t sect = (idx&0xff000000)>>24;
163           Int_t row = (idx&0x00ff0000)>>16;
164           if (sect > 18) row +=63; //if it is outer sector, add number of inner sectors
165
166           fTPCClusterMap.SetBitNumber(row,kTRUE);
167
168           //Fill the gap between previous row and this row with 0 bits
169           //In case  ###  pleas change it as well - just set bit 0 in case there 
170           //is no associated clusters for current "i"
171           if (prevrow < 0) 
172            {
173              prevrow = row;//if previous bit was not assigned yet == this is the first one
174            }
175           else
176            { //we don't know the order (inner to outer or reverse)
177              //just to be save in case it is going to change
178              Int_t n = 0, m = 0;
179              if (prevrow < row)
180               {
181                 n = prevrow;
182                 m = row;
183               }
184              else
185               {
186                 n = row;
187                 m = prevrow;
188               }
189
190              for (Int_t j = n+1; j < m; j++)
191               {
192                 fTPCClusterMap.SetBitNumber(j,kFALSE);
193               }
194              prevrow = row; 
195            }
196           // End Of Piotr's Cluster Map for HBT
197         }
198      }
199     fTPCsignal=t->GetPIDsignal();
200     {Double_t mass=t->GetMass();    // preliminary mass setting 
201     if (mass>0.5) fR[4]=1.;         //        used by
202     else if (mass<0.4) fR[2]=1.;    // the ITS reconstruction
203     else fR[3]=1.;}
204                      //
205     break;
206
207   case kTRDout:
208     { //requested by the PHOS  ("temporary solution")
209       Double_t r=460.;
210       if (t->PropagateTo(r,30.,0.)) {  
211          fOalpha=t->GetAlpha();
212          t->GetExternalParameters(fOx,fOp);
213          t->GetExternalCovariance(fOc);
214       }
215     }
216   case kTOFin: 
217     break;
218   case kTOFout: 
219     break;
220   case kTRDin: case kTRDrefit:
221     fTRDLabel = t->GetLabel();
222
223     fTRDncls=t->GetNumberOfClusters();
224     fTRDchi2=t->GetChi2();
225     for (Int_t i=0;i<fTRDncls;i++) fTRDindex[i]=t->GetClusterIndex(i);
226     fTRDsignal=t->GetPIDsignal();
227     break;
228   case kTRDStop:
229     break;
230   default: 
231     Error("UpdateTrackParams()","Wrong flag !\n");
232     return kFALSE;
233   }
234
235   return kTRUE;
236 }
237
238 //_______________________________________________________________________
239 void 
240 AliESDtrack::SetConstrainedTrackParams(AliKalmanTrack *t, Double_t chi2) {
241   //
242   // This function sets the constrained track parameters 
243   //
244   fCalpha=t->GetAlpha();
245   t->GetExternalParameters(fCx,fCp);
246   t->GetExternalCovariance(fCc);
247   fCchi2=chi2;
248 }
249
250
251 //_______________________________________________________________________
252 void AliESDtrack::GetExternalParameters(Double_t &x, Double_t p[5]) const {
253   //---------------------------------------------------------------------
254   // This function returns external representation of the track parameters
255   //---------------------------------------------------------------------
256   x=fRx;
257   for (Int_t i=0; i<5; i++) p[i]=fRp[i];
258 }
259 //_______________________________________________________________________
260 void AliESDtrack::GetExternalCovariance(Double_t cov[15]) const {
261   //---------------------------------------------------------------------
262   // This function returns external representation of the cov. matrix
263   //---------------------------------------------------------------------
264   for (Int_t i=0; i<15; i++) cov[i]=fRc[i];
265 }
266
267
268 //_______________________________________________________________________
269 void 
270 AliESDtrack::GetConstrainedExternalParameters(Double_t &x, Double_t p[5])const{
271   //---------------------------------------------------------------------
272   // This function returns the constrained external track parameters
273   //---------------------------------------------------------------------
274   x=fCx;
275   for (Int_t i=0; i<5; i++) p[i]=fCp[i];
276 }
277 //_______________________________________________________________________
278 void 
279 AliESDtrack::GetConstrainedExternalCovariance(Double_t c[15]) const {
280   //---------------------------------------------------------------------
281   // This function returns the constrained external cov. matrix
282   //---------------------------------------------------------------------
283   for (Int_t i=0; i<15; i++) c[i]=fCc[i];
284 }
285
286
287 Double_t AliESDtrack::GetP() const {
288   //---------------------------------------------------------------------
289   // This function returns the track momentum
290   //---------------------------------------------------------------------
291   if (TMath::Abs(fRp[4])<=0) return 0;
292   Double_t pt=1./TMath::Abs(fRp[4]);
293   return pt*TMath::Sqrt(1.+ fRp[3]*fRp[3]);
294 }
295
296 void AliESDtrack::GetConstrainedPxPyPz(Double_t *p) const {
297   //---------------------------------------------------------------------
298   // This function returns the constrained global track momentum components
299   //---------------------------------------------------------------------
300   if (TMath::Abs(fCp[4])<=0) {
301     p[0]=p[1]=p[2]=0;
302     return;
303   }
304   Double_t phi=TMath::ASin(fCp[2]) + fCalpha;
305   Double_t pt=1./TMath::Abs(fCp[4]);
306   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fCp[3]; 
307 }
308 void AliESDtrack::GetConstrainedXYZ(Double_t *xyz) const {
309   //---------------------------------------------------------------------
310   // This function returns the global track position
311   //---------------------------------------------------------------------
312   Double_t phi=TMath::ATan2(fCp[0],fCx) + fCalpha;
313   Double_t r=TMath::Sqrt(fCx*fCx + fCp[0]*fCp[0]);
314   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fCp[1]; 
315 }
316
317 void AliESDtrack::GetPxPyPz(Double_t *p) const {
318   //---------------------------------------------------------------------
319   // This function returns the global track momentum components
320   //---------------------------------------------------------------------
321   if (TMath::Abs(fRp[4])<=0) {
322     p[0]=p[1]=p[2]=0;
323     return;
324   }
325   Double_t phi=TMath::ASin(fRp[2]) + fRalpha;
326   Double_t pt=1./TMath::Abs(fRp[4]);
327   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fRp[3]; 
328 }
329 void AliESDtrack::GetXYZ(Double_t *xyz) const {
330   //---------------------------------------------------------------------
331   // This function returns the global track position
332   //---------------------------------------------------------------------
333   Double_t phi=TMath::ATan2(fRp[0],fRx) + fRalpha;
334   Double_t r=TMath::Sqrt(fRx*fRx + fRp[0]*fRp[0]);
335   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fRp[1]; 
336 }
337
338
339 void AliESDtrack::GetInnerPxPyPz(Double_t *p) const {
340   //---------------------------------------------------------------------
341   // This function returns the global track momentum components
342   // af the entrance of the TPC
343   //---------------------------------------------------------------------
344   if (fIx==0) {p[0]=p[1]=p[2]=0.; return;}
345   Double_t phi=TMath::ASin(fIp[2]) + fIalpha;
346   Double_t pt=1./TMath::Abs(fIp[4]);
347   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fIp[3]; 
348 }
349
350 void AliESDtrack::GetInnerXYZ(Double_t *xyz) const {
351   //---------------------------------------------------------------------
352   // This function returns the global track position
353   // af the entrance of the TPC
354   //---------------------------------------------------------------------
355   if (fIx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;}
356   Double_t phi=TMath::ATan2(fIp[0],fIx) + fIalpha;
357   Double_t r=TMath::Sqrt(fIx*fIx + fIp[0]*fIp[0]);
358   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fIp[1]; 
359 }
360
361 void AliESDtrack::GetInnerExternalParameters(Double_t &x, Double_t p[5]) const 
362 {
363   //skowron
364  //---------------------------------------------------------------------
365   // This function returns external representation of the track parameters at Inner Layer of TPC
366   //---------------------------------------------------------------------
367   x=fIx;
368   for (Int_t i=0; i<5; i++) p[i]=fIp[i];
369 }
370 void AliESDtrack::GetInnerExternalCovariance(Double_t cov[15]) const
371 {
372  //skowron
373  //---------------------------------------------------------------------
374  // This function returns external representation of the cov. matrix at Inner Layer of TPC
375  //---------------------------------------------------------------------
376  for (Int_t i=0; i<15; i++) cov[i]=fIc[i];
377  
378 }
379
380 void AliESDtrack::GetOuterPxPyPz(Double_t *p) const {
381   //---------------------------------------------------------------------
382   // This function returns the global track momentum components
383   // af the radius of the PHOS
384   //---------------------------------------------------------------------
385   if (fOx==0) {p[0]=p[1]=p[2]=0.; return;}
386   Double_t phi=TMath::ASin(fOp[2]) + fOalpha;
387   Double_t pt=1./TMath::Abs(fOp[4]);
388   p[0]=pt*TMath::Cos(phi); p[1]=pt*TMath::Sin(phi); p[2]=pt*fOp[3]; 
389 }
390
391 void AliESDtrack::GetOuterXYZ(Double_t *xyz) const {
392   //---------------------------------------------------------------------
393   // This function returns the global track position
394   // af the radius of the PHOS
395   //---------------------------------------------------------------------
396   if (fOx==0) {xyz[0]=xyz[1]=xyz[2]=0.; return;}
397   Double_t phi=TMath::ATan2(fOp[0],fOx) + fOalpha;
398   Double_t r=TMath::Sqrt(fOx*fOx + fOp[0]*fOp[0]);
399   xyz[0]=r*TMath::Cos(phi); xyz[1]=r*TMath::Sin(phi); xyz[2]=fOp[1]; 
400 }
401
402 //_______________________________________________________________________
403 void AliESDtrack::GetIntegratedTimes(Double_t *times) const {
404   // Returns the array with integrated times for each particle hypothesis
405   for (Int_t i=0; i<kSPECIES; i++) times[i]=fTrackTime[i];
406 }
407
408 //_______________________________________________________________________
409 void AliESDtrack::SetIntegratedTimes(const Double_t *times) {
410   // Sets the array with integrated times for each particle hypotesis
411   for (Int_t i=0; i<kSPECIES; i++) fTrackTime[i]=times[i];
412 }
413
414 //_______________________________________________________________________
415 void AliESDtrack::SetITSpid(const Double_t *p) {
416   // Sets values for the probability of each particle type (in ITS)
417   for (Int_t i=0; i<kSPECIES; i++) fITSr[i]=p[i];
418   SetStatus(AliESDtrack::kITSpid);
419 }
420
421 void AliESDtrack::SetITSChi2MIP(const Float_t *chi2mip){
422   for (Int_t i=0; i<6; i++) fITSchi2MIP[i]=chi2mip[i];
423 }
424 //_______________________________________________________________________
425 void AliESDtrack::GetITSpid(Double_t *p) const {
426   // Gets the probability of each particle type (in ITS)
427   for (Int_t i=0; i<kSPECIES; i++) p[i]=fITSr[i];
428 }
429
430 //_______________________________________________________________________
431 Int_t AliESDtrack::GetITSclusters(UInt_t *idx) const {
432   //---------------------------------------------------------------------
433   // This function returns indices of the assgined ITS clusters 
434   //---------------------------------------------------------------------
435   for (Int_t i=0; i<fITSncls; i++) idx[i]=fITSindex[i];
436   return fITSncls;
437 }
438
439 //_______________________________________________________________________
440 Int_t AliESDtrack::GetTPCclusters(Int_t *idx) const {
441   //---------------------------------------------------------------------
442   // This function returns indices of the assgined ITS clusters 
443   //---------------------------------------------------------------------
444   if (idx!=0)
445     for (Int_t i=0; i<180; i++) idx[i]=fTPCindex[i];  // MI I prefer some constant
446   return fTPCncls;
447 }
448
449 //_______________________________________________________________________
450 void AliESDtrack::SetTPCpid(const Double_t *p) {  
451   // Sets values for the probability of each particle type (in TPC)
452   for (Int_t i=0; i<kSPECIES; i++) fTPCr[i]=p[i];
453   SetStatus(AliESDtrack::kTPCpid);
454 }
455
456 //_______________________________________________________________________
457 void AliESDtrack::GetTPCpid(Double_t *p) const {
458   // Gets the probability of each particle type (in TPC)
459   for (Int_t i=0; i<kSPECIES; i++) p[i]=fTPCr[i];
460 }
461
462 //_______________________________________________________________________
463 Int_t AliESDtrack::GetTRDclusters(UInt_t *idx) const {
464   //---------------------------------------------------------------------
465   // This function returns indices of the assgined TRD clusters 
466   //---------------------------------------------------------------------
467   if (idx!=0)
468     for (Int_t i=0; i<90; i++) idx[i]=fTRDindex[i];  // MI I prefer some constant
469   return fTRDncls;
470 }
471
472 //_______________________________________________________________________
473 void AliESDtrack::SetTRDpid(const Double_t *p) {  
474   // Sets values for the probability of each particle type (in TRD)
475   for (Int_t i=0; i<kSPECIES; i++) fTRDr[i]=p[i];
476   SetStatus(AliESDtrack::kTRDpid);
477 }
478
479 //_______________________________________________________________________
480 void AliESDtrack::GetTRDpid(Double_t *p) const {
481   // Gets the probability of each particle type (in TRD)
482   for (Int_t i=0; i<kSPECIES; i++) p[i]=fTRDr[i];
483 }
484
485 //_______________________________________________________________________
486 void    AliESDtrack::SetTRDpid(Int_t iSpecies, Float_t p)
487 {
488   // Sets the probability of particle type iSpecies to p (in TRD)
489   fTRDr[iSpecies] = p;
490 }
491
492 Float_t AliESDtrack::GetTRDpid(Int_t iSpecies) const
493 {
494   // Returns the probability of particle type iSpecies (in TRD)
495   return fTRDr[iSpecies];
496 }
497
498 //_______________________________________________________________________
499 void AliESDtrack::SetTOFpid(const Double_t *p) {  
500   // Sets the probability of each particle type (in TOF)
501   for (Int_t i=0; i<kSPECIES; i++) fTOFr[i]=p[i];
502   SetStatus(AliESDtrack::kTOFpid);
503 }
504
505 //_______________________________________________________________________
506 void AliESDtrack::GetTOFpid(Double_t *p) const {
507   // Gets probabilities of each particle type (in TOF)
508   for (Int_t i=0; i<kSPECIES; i++) p[i]=fTOFr[i];
509 }
510
511
512
513 //_______________________________________________________________________
514 void AliESDtrack::SetPHOSpid(const Double_t *p) {  
515   // Sets the probability of each particle type (in PHOS)
516   for (Int_t i=0; i<kSPECIESN; i++) fPHOSr[i]=p[i];
517   SetStatus(AliESDtrack::kPHOSpid);
518 }
519
520 //_______________________________________________________________________
521 void AliESDtrack::GetPHOSpid(Double_t *p) const {
522   // Gets probabilities of each particle type (in PHOS)
523   for (Int_t i=0; i<kSPECIESN; i++) p[i]=fPHOSr[i];
524 }
525
526
527 //_______________________________________________________________________
528 void AliESDtrack::SetRICHpid(const Double_t *p) {  
529   // Sets the probability of each particle type (in RICH)
530   for (Int_t i=0; i<kSPECIES; i++) fRICHr[i]=p[i];
531   SetStatus(AliESDtrack::kRICHpid);
532 }
533
534 //_______________________________________________________________________
535 void AliESDtrack::GetRICHpid(Double_t *p) const {
536   // Gets probabilities of each particle type (in RICH)
537   for (Int_t i=0; i<kSPECIES; i++) p[i]=fRICHr[i];
538 }
539
540
541
542 //_______________________________________________________________________
543 void AliESDtrack::SetESDpid(const Double_t *p) {  
544   // Sets the probability of each particle type for the ESD track
545   for (Int_t i=0; i<kSPECIES; i++) fR[i]=p[i];
546   SetStatus(AliESDtrack::kESDpid);
547 }
548
549 //_______________________________________________________________________
550 void AliESDtrack::GetESDpid(Double_t *p) const {
551   // Gets probability of each particle type for the ESD track
552   for (Int_t i=0; i<kSPECIES; i++) p[i]=fR[i];
553 }
554
555 //_______________________________________________________________________
556 void AliESDtrack::Print(Option_t *) const {
557   // Prints info on the track
558   
559   Info("Print","Track info") ; 
560   Double_t p[kSPECIESN] ; 
561   Int_t index = 0 ; 
562   if( IsOn(kITSpid) ){
563     printf("From ITS: ") ; 
564     GetITSpid(p) ; 
565     for(index = 0 ; index < kSPECIES; index++) 
566       printf("%f, ", p[index]) ;
567     printf("\n           signal = %f\n", GetITSsignal()) ;
568   } 
569   if( IsOn(kTPCpid) ){
570     printf("From TPC: ") ; 
571     GetTPCpid(p) ; 
572     for(index = 0 ; index < kSPECIES; index++) 
573       printf("%f, ", p[index]) ;
574     printf("\n           signal = %f\n", GetTPCsignal()) ;
575   }
576   if( IsOn(kTRDpid) ){
577     printf("From TRD: ") ; 
578     GetTRDpid(p) ; 
579     for(index = 0 ; index < kSPECIES; index++) 
580       printf("%f, ", p[index]) ;
581     printf("\n           signal = %f\n", GetTRDsignal()) ;
582   }
583   if( IsOn(kTOFpid) ){
584     printf("From TOF: ") ; 
585     GetTOFpid(p) ; 
586     for(index = 0 ; index < kSPECIES; index++) 
587       printf("%f, ", p[index]) ;
588     printf("\n           signal = %f\n", GetTOFsignal()) ;
589   }
590   if( IsOn(kRICHpid) ){
591     printf("From TOF: ") ; 
592     GetRICHpid(p) ; 
593     for(index = 0 ; index < kSPECIES; index++) 
594       printf("%f, ", p[index]) ;
595     printf("\n           signal = %f\n", GetRICHsignal()) ;
596   }
597   if( IsOn(kPHOSpid) ){
598     printf("From PHOS: ") ; 
599     GetPHOSpid(p) ; 
600     for(index = 0 ; index < kSPECIESN; index++) 
601       printf("%f, ", p[index]) ;
602     printf("\n           signal = %f\n", GetPHOSsignal()) ;
603   }
604