+ // The following commented code becomes valid once the PPSD provides
+ // a reasonable position resolution, at least as good as EMC !
+ // TVector3 ppsdlglobalpos ;
+ // TVector3 ppsduglobalpos ;
+ // if( fPpsdLowRecPoint ){ // certainly a photon that has concerted
+ // fPpsdLowRecPoint->GetGlobalPosition(ppsdlglobalpos, mdummy) ;
+ // dir = emcglobalpos - ppsdlglobalpos ;
+ // if( fPpsdUpRecPoint ){ // not looks like a charged
+ // fPpsdUpRecPoint->GetGlobalPosition(ppsduglobalpos, mdummy) ;
+ // dir = ( dir + emcglobalpos - ppsduglobalpos ) * 0.5 ;
+ // }
+ // }
+ // else { // looks like a neutral
+ // dir = emcglobalpos ;
+ // }
+
+ dir = emcglobalpos ;
+ dir.SetZ( -dir.Z() ) ; // why ?
+ dir.SetMag(1.) ;
+
+ //account correction to the position of IP
+ Float_t xo,yo,zo ; //Coordinates of the origin
+ gAlice->Generator()->GetOrigin(xo,yo,zo) ;
+ TVector3 origin(xo,yo,zo);
+ dir = dir - origin ;
+
+ return dir ;
+}
+//____________________________________________________________________________
+void AliPHOSPIDv1::PrintRecParticles(Option_t * option)
+{
+ // Print table of reconstructed particles
+
+ AliPHOSGetter *gime = AliPHOSGetter::GetInstance() ;
+
+ TString taskName(GetName()) ;
+ taskName.Remove(taskName.Index(Version())-1) ;
+ TClonesArray * recParticles = gime->RecParticles(taskName) ;
+
+ cout << "AliPHOSPIDv1: event "<<gAlice->GetEvNumber() << endl ;
+ cout << " found " << recParticles->GetEntriesFast() << " RecParticles " << endl ;
+
+ fRecParticlesInRun += recParticles->GetEntriesFast() ;
+
+ if(strstr(option,"all")) { // printing found TS
+
+ cout << " PARTICLE "
+ << " Index " << endl ;
+ // << " X "
+ // << " Y "
+ // << " Z "
+ // << " # of primaries "
+ // << " Primaries list " << endl;
+
+ Int_t index ;
+ for (index = 0 ; index < recParticles->GetEntries() ; index++) {
+ AliPHOSRecParticle * rp = (AliPHOSRecParticle * ) recParticles->At(index) ;
+
+ Text_t particle[11];
+ switch(rp->GetType()) {
+ case AliPHOSFastRecParticle::kNEUTRALEMFAST:
+ strcpy( particle, "NEUTRAL EM FAST");
+ break;
+ case AliPHOSFastRecParticle::kNEUTRALHAFAST:
+ strcpy(particle, "NEUTRAL HA FAST");
+ break;
+ case AliPHOSFastRecParticle::kNEUTRALEMSLOW:
+ strcpy(particle, "NEUTRAL EM SLOW");
+ break ;
+ case AliPHOSFastRecParticle::kNEUTRALHASLOW:
+ strcpy(particle, "NEUTRAL HA SLOW");
+ break ;
+ case AliPHOSFastRecParticle::kCHARGEDEMFAST:
+ strcpy(particle, "CHARGED EM FAST") ;
+ break ;
+ case AliPHOSFastRecParticle::kCHARGEDHAFAST:
+ strcpy(particle, "CHARGED HA FAST") ;
+ break ;
+ case AliPHOSFastRecParticle::kCHARGEDEMSLOW:
+ strcpy(particle, "CHARGEDEMSLOW") ;
+ break ;
+ case AliPHOSFastRecParticle::kCHARGEDHASLOW:
+ strcpy(particle, "CHARGED HA SLOW") ;
+ break ;
+ }
+
+ // Int_t * primaries;
+ // Int_t nprimaries;
+ // primaries = rp->GetPrimaries(nprimaries);
+
+ cout << setw(10) << particle << " "
+ << setw(5) << rp->GetIndexInList() << " " ;
+ // << setw(4) << nprimaries << " ";
+ // for (Int_t iprimary=0; iprimary<nprimaries; iprimary++)
+ // cout << setw(4) << primaries[iprimary] << " ";
+ cout << endl;
+ }
+ cout << "-------------------------------------------" << endl ;
+ }
+