Full PID delegated to AliPHOSPID
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2000 16:44:58 +0000 (16:44 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Feb 2000 16:44:58 +0000 (16:44 +0000)
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSPID.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSPIDv1.h
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSReconstructioner.cxx

index ca704bb8d504fece00300dd0ddd8f018c601f41f..3f2d8ffad1d7519d2722535ad520f1fc29e22d02 100644 (file)
@@ -249,7 +249,7 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
                      //fhNeutralEMPositionY->Fill(recpart. ) ; 
                      //cout << "NEUTRAL EM" << endl;
                      break ;
-                   case kCHARGEDHADRON :
+                   case kCHARGEDHADRON:
                      fhChargedHadronEnergy->Fill(recparticle->Energy() ) ; 
                      //fhChargedHadronPositionX->Fill(recpart. ) ;
                      //fhChargedHadronPositionY->Fill(recpart. ) ; 
index 2f99a522747cb36079c717a6ff7e0c006b658b7f..f538eb0d1dea7a4ca81754f85a1803807ce829b6 100644 (file)
@@ -36,7 +36,7 @@ public:
   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 ) {}    
 
index 4454fce2a787aaf827ce0fa1bb6eeb7230a0d11c..f4e934e96c920bcc4f000574c8077ede028907f1 100644 (file)
@@ -49,7 +49,7 @@ ClassImp( AliPHOSPIDv1)
 
 
 //____________________________________________________________________________
-void  AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl)
+void  AliPHOSPIDv1::MakeParticles(TrackSegmentsList * trsl, RecParticlesList * rpl)
 {
   // main function, does the job
 
@@ -57,11 +57,26 @@ void  AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList *
   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) ; 
@@ -72,6 +87,8 @@ void  AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList *
        type = kNEUTRALHADRON ; 
       delete lambda ; 
    }
+
+    //   3. from the shower dispersion 
     if (type == kCHARGED) { 
       if( tracksegment->GetEmcRecPoint()->GetDispersion() > fCutOnDispersion)  // shower dispersion cut
        type = kCHARGEDHADRON ;
index 4ddb24df226dca79137417fd6157cc21c2b2ad7e..e983074b358a8a6072d2774e4c42546108e1102f 100644 (file)
@@ -28,7 +28,7 @@ public:
   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) ; 
index 8add627439ffccd22df3c88ec62a6ce6dec26312..7efe03b62e143fb7677e849bd5129cf0962ff163 100644 (file)
@@ -40,19 +40,8 @@ ClassImp(AliPHOSRecParticle)
   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 ;  
+                           
 }
 
 //____________________________________________________________________________
index eea1e4aca96c8a197cec74a748077d9c3a0dfd12..173879e8e97e12cad226d470220c2658b3040dfb 100644 (file)
@@ -75,5 +75,5 @@ AliPHOSReconstructioner::~AliPHOSReconstructioner()
 
   fTrackSegmentMaker->MakeTrackSegments(dl, emccl, ppsdl, trsl) ;
 
-  fPID->GetParticleType(trsl, rpl) ; 
+  fPID->MakeParticles(trsl, rpl) ; 
 }