//fhNeutralEMPositionY->Fill(recpart. ) ;
//cout << "NEUTRAL EM" << endl;
break ;
- case kCHARGEDHADRON :
+ case kCHARGEDHADRON:
fhChargedHadronEnergy->Fill(recparticle->Energy() ) ;
//fhChargedHadronPositionX->Fill(recpart. ) ;
//fhChargedHadronPositionY->Fill(recpart. ) ;
AliPHOSPID() ; // ctor
virtual ~AliPHOSPID() ; // dtor
- virtual void GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl) {} ;
+ virtual void MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl) {} ;
virtual void SetShowerProfileCuts(Float_t, Float_t, Float_t, Float_t) {} ;
virtual void SetDispersionCutOff(Float_t ) {}
//____________________________________________________________________________
-void AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl)
+void AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl)
{
// main function, does the job
AliPHOSTrackSegment * tracksegment ;
Int_t index = 0 ;
AliPHOSRecParticle * rp ;
+ Int_t type ;
+
while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) {
new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ;
rp = (AliPHOSRecParticle *)(*rpl)[index] ;
- Int_t type = rp->GetType() ;
- if ( type == kNEUTRAL ) { // resolve neutral baryon from photon
+
+ // try to figure out the type of particle:
+ // 1. just looking at the PPSD information
+ if( tracksegment->GetPpsdUp() == 0 ) { // Neutral
+
+ if( tracksegment->GetPpsdLow() == 0 ) // Neutral
+ type = kNEUTRAL ;
+ else // Gamma
+ type = kGAMMA ;
+ }
+ else // Charged
+ type = kCHARGED ;
+
+ // 2. from the shower profile analysis
+ if ( type == kNEUTRAL ) {
AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ;
Float_t * lambda = new Float_t[2];
recp->GetElipsAxis(lambda) ;
type = kNEUTRALHADRON ;
delete lambda ;
}
+
+ // 3. from the shower dispersion
if (type == kCHARGED) {
if( tracksegment->GetEmcRecPoint()->GetDispersion() > fCutOnDispersion) // shower dispersion cut
type = kCHARGEDHADRON ;
AliPHOSPIDv1() ;
virtual ~ AliPHOSPIDv1() ; // dtor
- virtual void GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
+ virtual void MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
void Print() ;
virtual void SetDispersionCutOff(Float_t Dcut) {fCutOnDispersion = Dcut ; }
virtual void SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M) ;
fPx = fE * momdir.X() ;
fPy = fE * momdir.Y() ;
fPz = fE * momdir.Z() ;
-
- fType = kUNDEFINED ; // undefined
-
- if( ts->GetPpsdUp() == 0 ) { // Neutral
-
- if( ts->GetPpsdLow() == 0 ) // Neutral
- fType = kNEUTRAL ;
- else // Gamma
- fType = kGAMMA ;
- }
- else // Charged
- fType = kCHARGED ;
-
+ fType = kUNDEFINED ;
+
}
//____________________________________________________________________________
fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
- fPID->GetParticleType(trsl, rpl) ;
+ fPID->MakeParticles(trsl, rpl) ;
}