]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
additional function, with which one can retrieve the EMCAL
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 21:02:22 +0000 (21:02 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 May 2012 21:02:22 +0000 (21:02 +0000)
cluster parameters in one shot with the nsigma (we are retrieving the AliVCluster inside this function).
Michael Weber <m.weber@cern.ch>

STEER/STEERBase/AliPIDResponse.cxx
STEER/STEERBase/AliPIDResponse.h

index d6cdc3f2ef98d2f53025debc1edeb32a803512b1..2e6d680bd8d7e5311ea2b2de3d5af28d919ed44f 100644 (file)
@@ -211,7 +211,7 @@ Float_t AliPIDResponse::NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EPar
   // Track matching
   nMatchClus = track->GetEMCALcluster();
   if(nMatchClus > -1){
-
+    
     mom    = track->P();
     pt     = track->Pt();
     charge = track->Charge();
@@ -220,23 +220,70 @@ Float_t AliPIDResponse::NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EPar
     
     if(matchedClus){
       
-    // matched cluster is EMCAL
-    if(matchedClus->IsEMCAL()){
-      
-      fClsE       = matchedClus->E();
-      EovP        = fClsE/mom;
-      
-      
-      // NSigma value really meaningful only for electrons!
-      return fEMCALResponse.GetNumberOfSigmas(pt,EovP,type,charge); 
+      // matched cluster is EMCAL
+      if(matchedClus->IsEMCAL()){
+       
+       fClsE       = matchedClus->E();
+       EovP        = fClsE/mom;
+       
+       
+       // NSigma value really meaningful only for electrons!
+       return fEMCALResponse.GetNumberOfSigmas(pt,EovP,type,charge); 
+      }
     }
   }
-  }
-
+  
   return -999;
   
 }
 
+//______________________________________________________________________________
+Float_t  AliPIDResponse::NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EParticleType type, Double_t &eop, Double_t showershape[4]) const {
+
+  AliVCluster *matchedClus = NULL;
+
+  Double_t mom     = -1.; 
+  Double_t pt      = -1.; 
+  Double_t EovP    = -1.;
+  Double_t fClsE   = -1.;
+  
+  Int_t nMatchClus = -1;
+  Int_t charge     = 0;
+  
+  // Track matching
+  nMatchClus = track->GetEMCALcluster();
+  if(nMatchClus > -1){
+
+    mom    = track->P();
+    pt     = track->Pt();
+    charge = track->Charge();
+    
+    matchedClus = (AliVCluster*)fCurrentEvent->GetCaloCluster(nMatchClus);
+    
+    if(matchedClus){
+      
+      // matched cluster is EMCAL
+      if(matchedClus->IsEMCAL()){
+       
+       fClsE       = matchedClus->E();
+       EovP        = fClsE/mom;
+       
+       // fill used EMCAL variables here
+       eop            = EovP; // E/p
+       showershape[0] = matchedClus->GetNCells(); // number of cells in cluster
+       showershape[1] = matchedClus->GetM02(); // long axis
+       showershape[2] = matchedClus->GetM20(); // short axis
+       showershape[3] = matchedClus->GetDispersion(); // dispersion
+       
+       // NSigma value really meaningful only for electrons!
+       return fEMCALResponse.GetNumberOfSigmas(pt,EovP,type,charge); 
+      }
+    }
+  }
+  return -999;
+}
+
+
 //______________________________________________________________________________
 AliPIDResponse::EDetPidStatus AliPIDResponse::ComputePIDProbability  (EDetCode detCode,  const AliVTrack *track, Int_t nSpecies, Double_t p[]) const
 {
index 04aa00008f2c5f2e55528b0d2d59bd7b556ef511..ef44dbe289b10cd43cbf4a465a8c5fa3f96fe6d0 100644 (file)
@@ -61,6 +61,7 @@ public:
   virtual Float_t NumberOfSigmasITS(const AliVParticle *track, AliPID::EParticleType type) const;
   virtual Float_t NumberOfSigmasTPC(const AliVParticle *track, AliPID::EParticleType type) const;
   virtual Float_t NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EParticleType type) const;
+  virtual Float_t NumberOfSigmasEMCAL(const AliVTrack *track, AliPID::EParticleType type, Double_t &eop, Double_t showershape[4]) const;
   virtual Float_t NumberOfSigmasTOF(const AliVParticle *track, AliPID::EParticleType type) const = 0;
   virtual Bool_t IdentifiedAsElectronTRD(const AliVTrack *track, Double_t efficiencyLevel) const;