New paricle specy: conversion electron
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 May 2004 10:36:01 +0000 (10:36 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 4 May 2004 10:36:01 +0000 (10:36 +0000)
PHOS/AliPHOSFastRecParticle.cxx
PHOS/AliPHOSFastRecParticle.h

index 9bffd53a48290d7201b105929d1e3e716b2e5a46..787c9115ce829aa02c936980daf620011cbede00 100644 (file)
@@ -183,11 +183,6 @@ Bool_t AliPHOSFastRecParticle::IsPhoton(TString purity) const
       (TestPIDBit(2)||TestPIDBit(1)||TestPIDBit(0))&& //  neutral by CPV
       !TestPIDBit(14))                              //  no charged track
     return kTRUE ;
-  else if (photonLike                                   && //  photon by PCA
-          (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& //  fast by TOF
-          (!TestPIDBit(2)||!TestPIDBit(1)||!TestPIDBit(0))&& //  charged by CPV
-          !TestPIDBit(14))                                 //  no charged track, conversion electron
-    return kTRUE ; 
   else
     return kFALSE;
 }
@@ -235,6 +230,28 @@ Bool_t AliPHOSFastRecParticle::IsElectron(TString purity) const
     return kFALSE;
 }
 
+//____________________________________________________________________________
+Bool_t AliPHOSFastRecParticle::IsElecCon(TString purity) const
+{
+  // Rec.Particle is an electron if it has a photon-like shape, fast and charged
+  // photon-like shape is defined with a purity "low", "medium" or "high"
+
+  purity.ToLower();
+  Bool_t photonLike = kFALSE;
+  if      (purity == "low"   ) photonLike = TestPIDBit(6);
+  else if (purity == "medium") photonLike = TestPIDBit(7);
+  else if (purity == "high"  ) photonLike = TestPIDBit(8);
+  else Error("IsElectron","Wrong purity type: %s",purity.Data());
+  
+  if (photonLike                                   && //  photon by PCA
+      (TestPIDBit(5)|| TestPIDBit(4)|| TestPIDBit(3))&& //  fast by TOF
+      (!TestPIDBit(2)||!TestPIDBit(1)||!TestPIDBit(0))&& //  charged by CPV
+      !TestPIDBit(14))                                  //  no charged track
+    return kTRUE ;
+  else
+    return kFALSE;
+}
+
 //____________________________________________________________________________
 Bool_t AliPHOSFastRecParticle::IsHardPhoton() const
 {
index 3f5050e3c69796febc0ae4d3ab0d2d4bb3b0d5b1..b69505ef89705b97d6823a1304185259c06922ed 100644 (file)
@@ -69,6 +69,7 @@ class AliPHOSFastRecParticle : public TParticle {
   Bool_t IsSlowChargedHadron() const;
   Bool_t IsFastNeutralHadron() const;
   Bool_t IsSlowNeutralHadron() const;
+  Bool_t IsElecCon(TString purity = "low") const; 
 
   TString Name() const ; 
   virtual void Paint(Option_t * option="");