]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Particle identification improved by shower profile analysis
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2000 18:07:54 +0000 (18:07 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2000 18:07:54 +0000 (18:07 +0000)
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSAnalyze.h
PHOS/AliPHOSPID.h
PHOS/AliPHOSPIDv1.cxx
PHOS/AliPHOSPIDv1.h
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSRecParticle.h
PHOS/AliPHOSTrackSegment.cxx
PHOS/AliPHOSTrackSegment.h

index 04e26a1c58f3bf5633f2e6210ceb5eeadf4e6a81..196f53883b8a864ce8cfb562a2cfe945faa3b051 100644 (file)
@@ -164,6 +164,8 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
          fTrs = new AliPHOSTrackSegmentMakerv1()  ; 
          //========== Creates the particle identifier
          fPID = new AliPHOSPIDv1() ;
+         fPID->SetShowerProfileCuts(0.5, 1.5, 0.5, 1.5 ) ; 
+         fPID->Print() ;           
          //========== Creates the Reconstructioner  
          fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ; 
          //========== Event Number
@@ -219,31 +221,32 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
            {
              if ( tracksegment->GetPHOSMod() == module )
                { 
-                 switch(tracksegment->GetPartType())
+                 AliPHOSRecParticle recpart(tracksegment) ; 
+                 switch(recpart.GetType())
                    {
-                   case 0:
-                     fhPhotonEnergy->Fill(tracksegment->GetEnergy() ) ; 
-                     //                      fhPhotonPositionX->Fill(tracksegment-> ) ;
-                     //fhPhotonPositionY->Fill(tracksegment-> ) ;                 
+                   case kGAMMA:
+                     fhPhotonEnergy->Fill(recpart.Energy() ) ; 
+                     //fhPhotonPositionX->Fill(recpart. ) ;
+                     //fhPhotonPositionY->Fill(recpart. ) ;                 
                      //cout << "PHOTON" << endl;
                      break;
-                   case :
-                     fhElectronEnergy->Fill(tracksegment->GetEnergy() ) ; 
-                     //fhElectronPositionX->Fill(tracksegment-> ) ;
-                     //fhElectronPositionY->Fill(tracksegment-> ) ; 
+                   case kELECTRON:
+                     fhElectronEnergy->Fill(recpart.Energy() ) ; 
+                     //fhElectronPositionX->Fill(recpart. ) ;
+                     //fhElectronPositionY->Fill(recpart. ) ; 
                      //cout << "ELECTRON" << endl;
                      break;
-                   case :
-                     fhNeutralEnergy->Fill(tracksegment->GetEnergy() ) ; 
-                     //fhNeutralPositionX->Fill(tracksegment-> ) ;
-                     //fhNeutralPositionY->Fill(tracksegment-> ) ; 
-                     //cout << "NEUTRAL" << endl;
+                   case kNEUTRON:
+                     fhNeutronEnergy->Fill(recpart.Energy() ) ; 
+                     //fhNeutronPositionX->Fill(recpart. ) ;
+                     //fhNeutronPositionY->Fill(recpart. ) ; 
+                     //cout << "NEUTRON" << endl;
                      break ;
-                   case 3 :
-                     fhChargedEnergy->Fill(tracksegment->GetEnergy() ) ; 
-                     //fhChargedPositionX->Fill(tracksegment-> ) ;
-                     //fhChargedPositionY->Fill(tracksegment-> ) ; 
-                     //cout << "CHARGED" << endl;
+                   case kCHARGEDHADRON :
+                     fhChargedHadronEnergy->Fill(recpart.Energy() ) ; 
+                     //fhChargedHadronPositionX->Fill(recpart. ) ;
+                     //fhChargedHadronPositionY->Fill(recpart. ) ; 
+                     //cout << "CHARGED HADRON" << endl;
                      break ;
                      
                    }
@@ -280,16 +283,16 @@ void  AliPHOSAnalyze::BookingHistograms()
   fhConvertorEmc     = new TH2F("hConvertorEmc",  "hConvertorEmc",      200,  1. ,  3., 200, 0., 3.e-5);
   fhPhotonEnergy     = new TH1F("hPhotonEnergy",  "hPhotonEnergy",     1000,  0. ,  30.);
   fhElectronEnergy   = new TH1F("hElectronEnergy","hElectronEnergy",   1000,  0. ,  30.);
-  fhNeutralEnergy    = new TH1F("hNeutralEnergy", "hNeutralEnergy",    1000,  0. ,  30.);
-  fhChargedEnergy    = new TH1F("hChargedEnergy", "hChargedEnergy",    1000,  0. ,  30.);
+  fhNeutronEnergy    = new TH1F("hNeutronEnergy", "hNeutronEnergy",    1000,  0. ,  30.);
+  fhChargedHadronEnergy    = new TH1F("hChargedHadronEnergy", "hChargedHadronEnergy",    1000,  0. ,  30.);
   fhPhotonPositionX  = new TH1F("hPhotonPositionX","hPhotonPositionX",   500,-80. , 80.);
   fhElectronPositionX= new TH1F("hElectronPositionX","hElectronPositionX",500,-80. , 80.);
-  fhNeutralPositionX  = new TH1F("hNeutralPositionX","hNeutralPositionX",500,-80. , 80.);
-  fhChargedPositionX  = new TH1F("hChargedPositionX","hChargedPositionX",500,-80. , 80.);
+  fhNeutronPositionX  = new TH1F("hNeutronPositionX","hNeutronPositionX",500,-80. , 80.);
+  fhChargedHadronPositionX  = new TH1F("hChargedHadronPositionX","hChargedHadronPositionX",500,-80. , 80.);
   fhPhotonPositionY  = new TH1F("hPhotonPositionY","hPhotonPositionY",   500,-80. , 80.);
   fhElectronPositionY= new TH1F("hElectronPositionY","hElectronPositionY",500,-80. , 80.);
-  fhNeutralPositionY  = new TH1F("hNeutralPositionY","hNeutralPositionY",500,-80. , 80.);
-  fhChargedPositionY  = new TH1F("hChargedPositionY","hChargedPositionY",500,-80. , 80.);
+  fhNeutronPositionY  = new TH1F("hNeutronPositionY","hNeutronPositionY",500,-80. , 80.);
+  fhChargedHadronPositionY  = new TH1F("hChargedHadronPositionY","hChargedHadronPositionY",500,-80. , 80.);
 
 }
 //____________________________________________________________________________
@@ -753,15 +756,15 @@ void AliPHOSAnalyze::SavingHistograms()
   if (fhPhotonEnergy)      fhPhotonEnergy->Write() ;
   if (fhPhotonPositionX)   fhPhotonPositionX->Write() ;
   if (fhPhotonPositionY)   fhPhotonPositionX->Write() ;
-  if (fhElectronEnergy)      fhElectronEnergy->Write() ;
+  if (fhElectronEnergy)    fhElectronEnergy->Write() ;
   if (fhElectronPositionX) fhElectronPositionX->Write() ;
   if (fhElectronPositionY) fhElectronPositionX->Write() ;
-  if (fhNeutralEnergy)     fhNeutralEnergy->Write() ;
-  if (fhNeutralPositionX)  fhNeutralPositionX->Write() ;
-  if (fhNeutralPositionY)  fhNeutralPositionX->Write() ;
-  if (fhChargedEnergy)     fhChargedEnergy->Write() ;
-  if (fhChargedPositionX)  fhChargedPositionX->Write() ;
-  if (fhChargedPositionY)  fhChargedPositionX->Write() ;
+  if (fhNeutronEnergy)     fhNeutronEnergy->Write() ;
+  if (fhNeutronPositionX)  fhNeutronPositionX->Write() ;
+  if (fhNeutronPositionY)  fhNeutronPositionX->Write() ;
+  if (fhChargedHadronEnergy)     fhChargedHadronEnergy->Write() ;
+  if (fhChargedHadronPositionX)  fhChargedHadronPositionX->Write() ;
+  if (fhChargedHadronPositionY)  fhChargedHadronPositionX->Write() ;
 
   output.Write();
   output.Close();
index 3d41013b054f13450709a81c7357ace805c0cbe0..2b702492e76e3f65d33b7156069e2ab20d8f61c0 100644 (file)
@@ -64,16 +64,16 @@ private:
   TH2F * fhConvertorEmc    ;   // 2d Convertor versus Emc energies
   TH1F * fhPhotonEnergy    ;   // Spectrum of detected photons
   TH1F * fhElectronEnergy  ;   // Spectrum of detected electrons
-  TH1F * fhNeutralEnergy   ;   // Spectrum of detected neutrals
-  TH1F * fhChargedEnergy   ;   // Spectrum of detected charged
+  TH1F * fhNeutronEnergy   ;   // Spectrum of detected neutrals
+  TH1F * fhChargedHadronEnergy   ;   // Spectrum of detected charged
   TH1F * fhPhotonPositionX ;   // X distribution of detected photons
   TH1F * fhElectronPositionX ; // X distribution of detected electrons
-  TH1F * fhNeutralPositionX  ; // X distribution of detected neutrals
-  TH1F * fhChargedPositionX  ; // X distribution of detected charged
+  TH1F * fhNeutronPositionX  ; // X distribution of detected neutrals
+  TH1F * fhChargedHadronPositionX  ; // X distribution of detected charged
   TH1F * fhPhotonPositionY   ; // Y distribution of detected photons
   TH1F * fhElectronPositionY ; // Y distribution of detected electrons
-  TH1F * fhNeutralPositionY  ; // Y distribution of detected neutrals
-  TH1F * fhChargedPositionY  ; // Y distribution of detected charged
+  TH1F * fhNeutronPositionY  ; // Y distribution of detected neutrals
+  TH1F * fhChargedHadronPositionY  ; // Y distribution of detected charged
 
 
 ClassDef(AliPHOSAnalyze,1)  // PHOS event analyzis , version 1
index 39640ec43177af78fd1d7fa3d7f50793094839f8..2f99a522747cb36079c717a6ff7e0c006b658b7f 100644 (file)
@@ -37,6 +37,8 @@ public:
   virtual ~AliPHOSPID() ; // dtor
 
   virtual void GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl) {} ; 
+  virtual void SetShowerProfileCuts(Float_t, Float_t, Float_t, Float_t) {} ; 
+  virtual void SetDispersionCutOff(Float_t ) {}    
 
   ClassDef(AliPHOSPID,1)  // Particle Identifier interface, version 1
 
index 9eb7804036ab5267bc4745df0ca07fe15869c29c..0e03756cc0c197a67a60d1858eff47ee6e03f1d2 100644 (file)
@@ -34,7 +34,8 @@ ClassImp( AliPHOSPIDv1)
 
 
 //____________________________________________________________________________
- AliPHOSPIDv1::AliPHOSPIDv1() 
+ AliPHOSPIDv1::AliPHOSPIDv1(): fCutOnDispersion(1.5) 
+
 {
   // ctor
 
@@ -55,11 +56,48 @@ void  AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList *
   TIter next(trsl) ; 
   AliPHOSTrackSegment * tracksegment ; 
   Int_t index = 0 ; 
-
+  AliPHOSRecParticle * rp ; 
   while ( (tracksegment = (AliPHOSTrackSegment *)next()) ) {
-    new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ; 
+    new( (*rpl)[index] ) AliPHOSRecParticle(tracksegment) ;
+    rp = (AliPHOSRecParticle *)(*rpl)[index] ; 
+    Int_t type =  rp->GetType() ;  
+    if ( type == kNEUTRAL ) { // resolve neutral baryon from photon
+      AliPHOSEmcRecPoint * recp = tracksegment->GetEmcRecPoint() ; 
+      Float_t * lambda = new Float_t[2]; 
+      recp->GetElipsAxis(lambda) ; 
+      if ( ( lambda[0] > fLambda1m && lambda[0] < fLambda1M ) && // shower profile cut
+          ( lambda[1] > fLambda2m && lambda[1] < fLambda2M ) )
+       type = kGAMMA ; 
+      else 
+       type = kNEUTRON ; 
+      delete lambda ; 
+   }
+    if (type == kCHARGED) { 
+      if( tracksegment->GetEmcRecPoint()->GetDispersion() > fCutOnDispersion)  // shower dispersion cut
+       type = kCHARGEDHADRON ;
+      else  
+       type = kELECTRON ; 
+    } 
+    rp->SetType(type) ; 
     index++ ; 
   }
     
 }
 
+//____________________________________________________________________________
+void  AliPHOSPIDv1:: Print() 
+{
+  cout << "AliPHOSPIDv1 : cuts for the particle idendification based on the shower profile " << endl 
+       << fLambda1m << " < value1 < " << fLambda1M << endl 
+       << fLambda2m << " < value2 < " << fLambda2M << endl ;  
+
+}
+
+//____________________________________________________________________________
+void  AliPHOSPIDv1::SetShowerProfileCuts(Float_t l1m, Float_t l1M, Float_t l2m, Float_t l2M)
+{
+  fLambda1m = l1m ; 
+  fLambda1M = l1M ; 
+  fLambda2m = l2m ; 
+  fLambda2M = l2M ; 
+}
index 117107a0ea9c5164ee353f2080f6322cd062b0ff..4ddb24df226dca79137417fd6157cc21c2b2ad7e 100644 (file)
@@ -28,7 +28,20 @@ public:
   AliPHOSPIDv1() ;                     
   virtual ~ AliPHOSPIDv1() ; // dtor
 
-  void    GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
+  virtual void GetParticleType(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) ; 
+
+ private:
+
+  // cuts on the shower profile 
+  Float_t fLambda1m ; // minimum value for first elips axis
+  Float_t fLambda1M ; // maximum value for first elips axis
+  Float_t fLambda2m ; // minimum value for second elips axis
+  Float_t fLambda2M ; // maximum value for second elips axis
+
+  Float_t fCutOnDispersion ; // cut on the shower dispersion to distinguish hadronic from EM showers
 
   ClassDef( AliPHOSPIDv1,1)  // particle identifier implementation , version 1
 
index 2d3fc2ad232875b91af6f077780c6fc68c4c453f..cc717d0b90923548a44f6006277eee9a1c127134 100644 (file)
@@ -35,13 +35,24 @@ ClassImp(AliPHOSRecParticle)
   // ctor
  
   fPHOSTrackSegment = new AliPHOSTrackSegment(*ts) ; 
-  fType             = ts->GetPartType() ; 
   fE                = ts->GetEnergy() ; 
   TVector3 momdir   = ts->GetMomentumDirection() ;
   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 ;   
+  
 }
 
 //____________________________________________________________________________
@@ -49,18 +60,21 @@ TString AliPHOSRecParticle::Name()
 {
   TString  name ; 
   switch (fType) {
-  case kGAMMA :
+  case kGAMMA:
     name = "PHOTON" ;
     break ; 
-   case kELECTRON :
+   case kELECTRON:
      name = "ELECTRON" ;
     break ; 
-  case kNEUTRAL :
+  case kNEUTRAL:
     name = "NEUTRAL" ;
     break ; 
    case kCHARGEDHADRON:
     name = "CHARGED HADRON" ;
     break ; 
+  case kNEUTRON:
+    name = "NEUTRAL BARYON" ; 
+    break ; 
   }
   return name ; 
 }
index f6216fd6fc956502655829bed6f110a148207edb..1da0c026fb5a7380481bdf75ce5c7999cdbb2f42 100644 (file)
 
 #include "AliPHOSTrackSegment.h"
 
+const static Int_t kUNDEFINED     = -1; 
+const static Int_t kGAMMA         = 0 ; 
+const static Int_t kELECTRON      = 1 ;
+const static Int_t kNEUTRAL       = 2 ;  
+const static Int_t kCHARGED       = 3 ;  
+const static Int_t kCHARGEDHADRON = 4 ;  
+const static Int_t kNEUTRON       = 5 ;  
+
 class AliPHOSRecParticle : public TParticle {
 
 public:
@@ -35,7 +43,8 @@ public:
   AliPHOSTrackSegment * GetPHOSTrackSegment() { return fPHOSTrackSegment ; } 
   Int_t GetType() { return fType ; } 
   TString Name() ; 
-  void Print() ;   
+  void Print() ; 
+  void SetType(Int_t type) { fType = type ; } 
 
 private:
 
index fae3164d70f323b3a9189c509907599660db1afe..12e1421421bd137617ff2b0ebc8bd120324dc55b 100644 (file)
@@ -47,7 +47,6 @@ AliPHOSTrackSegment::AliPHOSTrackSegment( AliPHOSEmcRecPoint * emc , AliPHOSPpsd
   if( ppsdRP2  ) 
     fPpsdLow = ppsdRP2 ;
 
-  fCutOnDispersion = 1.5 ; 
 }
 
 //____________________________________________________________________________
@@ -141,15 +140,7 @@ void AliPHOSTrackSegment::ExecuteEvent(Int_t event, Int_t px, Int_t py)
        fEmcRecPoint->GetLocalPosition(pos) ;
        textTS = new TPaveText(pos.X()-10,pos.Z()+10,pos.X()+5,pos.Z()+15,"") ;
        Text_t  line1[40] ;
-       if (GetPartType() == kGAMMA ) 
-        sprintf(line1,"PHOTON") ;
-       if (GetPartType() == kELECTRON ) 
-        sprintf(line1,"ELECTRON") ;
-       if (GetPartType() == kNEUTRAL ) 
-        sprintf(line1,"NEUTRAL") ;
-       if (GetPartType() == kCHARGEDHADRON ) 
-        sprintf(line1,"CHARGED HADRON") ;
-
+       sprintf(line1,"See RecParticle for ID") ;
        textTS ->AddText(line1) ;
        textTS ->Draw("");
        gPad->Update() ; 
@@ -223,37 +214,6 @@ TVector3 AliPHOSTrackSegment::GetMomentumDirection()
   return dir ;  
 }
 
-//____________________________________________________________________________
-Int_t AliPHOSTrackSegment::GetPartType()  
-{  
-  // Returns 0 - gamma
-  //         1 - e+, e-
-  //         2 - neutral   
-  //         3 - charged hadron
-
-  Int_t typeofparticle = kGAMMA ;
-                            
-  if( fPpsdUp == 0 ) {     // Neutral
-
-    if( fPpsdLow == 0 )    // Neutral  
-      typeofparticle = kNEUTRAL ;   
-    else                   // Gamma
-      typeofparticle = kGAMMA ;               
-
-  }
-
-  else {             // Charged           
-
-    if( fEmcRecPoint->GetDispersion() > fCutOnDispersion) 
-      typeofparticle = kCHARGEDHADRON ;
-    else  
-      typeofparticle = kELECTRON ;  
-  
-  }
-  
-  return   typeofparticle ;                     
-
-}
 
 //____________________________________________________________________________
 void AliPHOSTrackSegment::GetPosition( TVector3 & pos ) 
index 1323117ef15c22d4b4925b8d7e56794f2e02b788..c72e77664ef395eb9ed27113ef947264ffd12e63 100644 (file)
 #include "AliPHOSEmcRecPoint.h"
 #include "AliPHOSPpsdRecPoint.h"
 
-const static Int_t kGAMMA         = 0 ; 
-const static Int_t kELECTRON      = 1 ;
-const static Int_t kNEUTRAL       = 2 ;  
-const static Int_t kCHARGEDHADRON = 3 ;  
-
 class AliPHOSTrackSegment : public TObject  {
 
 public:
@@ -46,16 +41,17 @@ public:
   virtual Int_t  DistancetoPrimitive(Int_t px, Int_t py);
   virtual void   Draw(Option_t * option="") ;
   virtual void   ExecuteEvent(Int_t event, Int_t px, Int_t py);
-  Int_t GetPartType() ;                    // Returns 0 - gamma, 1 - e+, e- ;  2 - neutral hadron ; 3 - charged hadron
   Float_t GetEnergy(){ return fEmcRecPoint->GetTotalEnergy() ;}   // Returns energy in EMC
   
   Float_t GetDistanceInPHOSPlane(void) ;   // Computes in PHOS plane the relative position between EMC and PPSD clusters 
   virtual Int_t  GetPHOSMod(void) {return fEmcRecPoint->GetPHOSMod();  }
   TVector3 GetMomentumDirection() ;        // Returns the momentum direction
   void GetPosition( TVector3 & pos ) ;     // Returns positions of hit
+  AliPHOSEmcRecPoint * GetEmcRecPoint() const { return fEmcRecPoint ; } 
+  AliPHOSPpsdRecPoint * GetPpsdLow() const { return fPpsdLow ; } 
+  AliPHOSPpsdRecPoint * GetPpsdUp() const { return fPpsdUp ; } 
   virtual  void  Paint(Option_t * option="");
   void Print() ;
-  void SetDispersionCutOff(Float_t Dcut) {fCutOnDispersion = Dcut ; }    
   
   
 private:
@@ -64,7 +60,6 @@ private:
   AliPHOSPpsdRecPoint * fPpsdLow ;
   AliPHOSPpsdRecPoint * fPpsdUp ;
   
-  Float_t fCutOnDispersion ;   
 
   ClassDef(AliPHOSTrackSegment,1)  // description , version 1