]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add isolation cut sumpT range for background, cosmetics in header
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Fri, 11 Jul 2014 10:23:06 +0000 (12:23 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Fri, 11 Jul 2014 10:23:06 +0000 (12:23 +0200)
PWG/CaloTrackCorrBase/AliIsolationCut.cxx
PWG/CaloTrackCorrBase/AliIsolationCut.h

index db87e056e901bf65e58afac5ae8f55de2e19d0c3..4a1cca0302444db479118d5ed471be31d4035411 100755 (executable)
@@ -52,8 +52,9 @@ TObject(),
 fConeSize(0.),
 fPtThreshold(0.),
 fPtThresholdMax(10000.), 
-fSumPtThreshold(0.), 
-fPtFraction(0.), 
+fSumPtThreshold(0.),
+fSumPtThresholdMax(10000.),
+fPtFraction(0.),
 fICMethod(0),
 fPartInCone(0),
 fDebug(-1),
@@ -387,12 +388,13 @@ void AliIsolationCut::InitParameters()
   //Initialize the parameters of the analysis.
   
   fConeSize       = 0.4 ; 
-  fPtThreshold    = 1.  ;
+  fPtThreshold    = 0.5  ;
   fPtThresholdMax = 10000.  ;
-  fSumPtThreshold = 0.5 ; 
-  fPtFraction     = 0.1 ; 
-  fPartInCone     = kOnlyCharged;
-  fICMethod       = kSumPtFracIC; // 0 pt threshol method, 1 cone pt sum method
+  fSumPtThreshold    = 1.0 ;
+  fSumPtThresholdMax = 10000. ;
+  fPtFraction     = 0.1 ;
+  fPartInCone     = kNeutralAndCharged;
+  fICMethod       = kSumPtIC; // 0 pt threshol method, 1 cone pt sum method
   fFracIsThresh   = 1; 
 }
 
@@ -549,7 +551,7 @@ void  AliIsolationCut::MakeIsolationCut(TObjArray * plCTS,
         
       } // Inside cone
       
-      if(fDebug>0)  printf("\n");
+      if( fDebug > 0 )  printf("\n");
       
     }// charged particle loop
     
@@ -678,23 +680,23 @@ void  AliIsolationCut::MakeIsolationCut(TObjArray * plCTS,
         //if fPtFraction*ptC<fPtThreshold then consider the fPtThreshold directly
         if(fFracIsThresh)
         {
-          if( fPtFraction*ptC<fPtThreshold)
+          if( fPtFraction*ptC < fPtThreshold )
           {
-            if(pt>fPtThreshold)    nfrac++ ;
+            if( pt > fPtThreshold )    nfrac++ ;
           }
           else 
           {
-            if(pt>fPtFraction*ptC) nfrac++; 
+            if( pt > fPtFraction*ptC ) nfrac++;
           }
         }
         else
         {
-          if(pt>fPtFraction*ptC) nfrac++;   
+          if( pt > fPtFraction*ptC ) nfrac++;
         }
         
       }//in cone
       
-      if(fDebug>0)  printf("\n");
+      if(fDebug > 0 )  printf("\n");
       
     }// neutral particle loop
     
@@ -708,47 +710,49 @@ void  AliIsolationCut::MakeIsolationCut(TObjArray * plCTS,
     if(reftracks)        pCandidate->AddObjArray(reftracks);
   }
   
-  coneptsum = coneptsumCluster+coneptsumTrack;
+  coneptsum = coneptsumCluster + coneptsumTrack;
   
   //Check isolation, depending on selected isolation criteria
   if( fICMethod == kPtThresIC)
   {
-    if(n==0) isolated = kTRUE ;
+    if( n == 0 ) isolated = kTRUE ;
   }
-  else if( fICMethod == kSumPtIC)
+  else if( fICMethod == kSumPtIC )
   {
-    if(coneptsum < fSumPtThreshold)
-      isolated  =  kTRUE ;
+    if( coneptsum > fSumPtThreshold && coneptsum < fSumPtThresholdMax )
+      isolated  =  kFALSE ;
+    else
+      isolated  =  kTRUE  ;
   }
-  else if( fICMethod == kPtFracIC)
+  else if( fICMethod == kPtFracIC )
   {
-    if(nfrac==0) isolated = kTRUE ;
+    if(nfrac == 0 ) isolated = kTRUE ;
   }
-  else if( fICMethod == kSumPtFracIC)
+  else if( fICMethod == kSumPtFracIC )
   {
     //when the fPtFraction*ptC < fSumPtThreshold then consider the later case
  // printf("photon analysis IsDataMC() ?%i\n",IsDataMC());
-    if(fFracIsThresh )
+    if( fFracIsThresh )
     {
-      if( fPtFraction*ptC < fSumPtThreshold  && coneptsum < fSumPtThreshold) isolated  =  kTRUE ;
-      if( fPtFraction*ptC > fSumPtThreshold  && coneptsum < fPtFraction*ptC) isolated  =  kTRUE ;
+      if( fPtFraction*ptC < fSumPtThreshold  && coneptsum < fSumPtThreshold ) isolated  =  kTRUE ;
+      if( fPtFraction*ptC > fSumPtThreshold  && coneptsum < fPtFraction*ptC ) isolated  =  kTRUE ;
     }
     else 
     {
-      if(coneptsum < fPtFraction*ptC) isolated  =  kTRUE ;
+      if( coneptsum < fPtFraction*ptC ) isolated  =  kTRUE ;
     }
   }
-  else if( fICMethod == kSumDensityIC)
+  else if( fICMethod == kSumDensityIC )
   {    
     // Get good cell density (number of active cells over all cells in cone)
     // and correct energy in cone
     
     Float_t cellDensity = GetCellDensity(pCandidate,reader);
     
-    if(coneptsum < fSumPtThreshold*cellDensity)
+    if( coneptsum < fSumPtThreshold*cellDensity )
       isolated = kTRUE;
   }
-  else if( fICMethod == kSumBkgSubIC)
+  else if( fICMethod == kSumBkgSubIC )
   {
     Double_t coneptsumBkg = 0.;
     Float_t  etaBandPtSumTrackNorm   = 0;
@@ -783,9 +787,13 @@ void  AliIsolationCut::MakeIsolationCut(TObjArray * plCTS,
     coneptsum = coneptsumCluster+coneptsumTrack;
     
     coneptsum -= coneptsumBkg;
-    if(coneptsum < fSumPtThreshold)
-      isolated  =  kTRUE ;
-  } 
+    
+    if( coneptsum > fSumPtThreshold && coneptsum < fSumPtThresholdMax )
+      isolated  =  kFALSE ;
+    else
+      isolated  =  kTRUE  ;
+
+  }
   
 }
 
index f12321e763bce28a8e9c875cba170ee2586fbf93..e3eb6ae6b1bfe4bbc982fb78ce5dc207ca2a36e1 100755 (executable)
@@ -57,30 +57,31 @@ class AliIsolationCut : public TObject {
   
   // Cone background studies medthods
   
-  Float_t  CalculateExcessAreaFraction(Float_t excess) const ;
+  Float_t    CalculateExcessAreaFraction(Float_t excess) const ;
 
-  void     CalculateUEBandClusterNormalization(AliCaloTrackReader * reader,     Float_t   etaC, Float_t phiC,
-                                               Float_t   phiUEptsumCluster,     Float_t   etaUEptsumCluster,
-                                               Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
-                                               Float_t & excessFracEta,         Float_t & excessFracPhi              ) const ;
-  
-  void     CalculateUEBandTrackNormalization  (AliCaloTrackReader * reader,     Float_t   etaC,  Float_t phiC,
-                                               Float_t   phiUEptsumTrack,       Float_t   etaUEptsumTrack,
-                                               Float_t & phiUEptsumTrackNorm,   Float_t & etaUEptsumTrackNorm,
-                                               Float_t & excessFracEta,         Float_t & excessFracPhi              )   const ;
+  void       CalculateUEBandClusterNormalization(AliCaloTrackReader * reader,     Float_t   etaC, Float_t phiC,
+                                                 Float_t   phiUEptsumCluster,     Float_t   etaUEptsumCluster,
+                                                 Float_t & phiUEptsumClusterNorm, Float_t & etaUEptsumClusterNorm,
+                                                 Float_t & excessFracEta,         Float_t & excessFracPhi              ) const ;
+  
+  void       CalculateUEBandTrackNormalization  (AliCaloTrackReader * reader,     Float_t   etaC,  Float_t phiC,
+                                                 Float_t   phiUEptsumTrack,       Float_t   etaUEptsumTrack,
+                                                 Float_t & phiUEptsumTrackNorm,   Float_t & etaUEptsumTrackNorm,
+                                                 Float_t & excessFracEta,         Float_t & excessFracPhi              )   const ;
 
-  void            GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
-                               AliCaloTrackReader * reader, 
-                               Float_t & coneBadCellsCoeff,
-                               Float_t & etaBandBadCellsCoeff  , Float_t & phiBandBadCellsCoeff) ;
+  void              GetCoeffNormBadCell(AliAODPWG4ParticleCorrelation * pCandidate,
+                                 AliCaloTrackReader * reader,
+                                 Float_t & coneBadCellsCoeff,
+                                 Float_t & etaBandBadCellsCoeff  , Float_t & phiBandBadCellsCoeff) ;
 
   
   // Parameter setters and getters
   
   Float_t    GetConeSize()            const { return fConeSize       ; }
   Float_t    GetPtThreshold()         const { return fPtThreshold    ; }
-  Float_t    GetPtThresholdMax()      const { return fPtThresholdMax    ; }
+  Float_t    GetPtThresholdMax()      const { return fPtThresholdMax ; }
   Float_t    GetSumPtThreshold()      const { return fSumPtThreshold ; }
+  Float_t    GetSumPtThresholdMax()   const { return fSumPtThresholdMax ; }
   Float_t    GetPtFraction()          const { return fPtFraction     ; }
   Int_t      GetICMethod()            const { return fICMethod       ; }
   Int_t      GetParticleTypeInCone()  const { return fPartInCone     ; }
@@ -88,8 +89,9 @@ class AliIsolationCut : public TObject {
        
   void       SetConeSize(Float_t r)         { fConeSize       = r    ; }
   void       SetPtThreshold(Float_t pt)     { fPtThreshold    = pt   ; }
-  void       SetPtThresholdMax(Float_t pt)  { fPtThresholdMax    = pt   ; }
+  void       SetPtThresholdMax(Float_t pt)  { fPtThresholdMax = pt   ; }
   void       SetSumPtThreshold(Float_t s)   { fSumPtThreshold = s    ; }
+  void       SetSumPtThresholdMax(Float_t s){ fSumPtThresholdMax = s ; }
   void       SetPtFraction(Float_t pt)      { fPtFraction     = pt   ; }
   void       SetICMethod(Int_t i )          { fICMethod       = i    ; }
   void       SetParticleTypeInCone(Int_t i) { fPartInCone     = i    ; }
@@ -97,26 +99,27 @@ class AliIsolationCut : public TObject {
   void       SetFracIsThresh(Bool_t f )     { fFracIsThresh   = f    ; }
  private:
   
-  Float_t    fConeSize ;       // Size of the isolation cone 
-  Float_t    fPtThreshold ;    // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
-  Float_t    fPtThresholdMax ; // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
-  Float_t    fSumPtThreshold ; // Minium of sum pt of the particles in the cone (UE sum in the forward region cone)
-  Float_t    fPtFraction ;     // Fraction of the momentum of particles in cone or sum in cone
-  Int_t      fICMethod ;       // Isolation cut method to be used
-                               // kPtIC: Pt threshold method
-                               // kSumPtIC: Cone pt sum method
-                               // kPtFracIC:   Pt threshold, fraction of candidate pt, method
-                               // kSumPtFracIC:   Cone pt sum , fraction of cone sum, method
-  Int_t      fPartInCone;      // Type of particles inside cone:
-                               // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
+  Float_t    fConeSize ;         // Size of the isolation cone
+  Float_t    fPtThreshold ;      // Mimium pt of the particles in the cone or sum in cone (UE pt mean in the forward region cone)
+  Float_t    fPtThresholdMax ;   // Maximum pt of the particles outside the cone (needed to fit shower distribution isolated/non-isolated particles)
+  Float_t    fSumPtThreshold ;   // Minimum of sum pt of the particles in the cone (UE sum in the forward region cone)
+  Float_t    fSumPtThresholdMax ;// Maximum of sum pt of the particles in the cone (UE sum in the forward region cone)
+  Float_t    fPtFraction ;       // Fraction of the momentum of particles in cone or sum in cone
+  Int_t      fICMethod ;         // Isolation cut method to be used
+                                 // kPtIC: Pt threshold method
+                                 // kSumPtIC: Cone pt sum method
+                                 // kPtFracIC:   Pt threshold, fraction of candidate pt, method
+                                 // kSumPtFracIC:   Cone pt sum , fraction of cone sum, method
+  Int_t      fPartInCone;        // Type of particles inside cone:
+                                 // kNeutralAndCharged, kOnlyNeutral, kOnlyCharged
 
-  Int_t      fDebug;           // Debug level
-  Bool_t     fFracIsThresh;    // Use threshold instead of fraction when pt leading is small
+  Int_t      fDebug;             // Debug level
+  Bool_t     fFracIsThresh;      // Use threshold instead of fraction when pt leading is small
   
   AliIsolationCut(              const AliIsolationCut & g) ; // cpy ctor
   AliIsolationCut & operator = (const AliIsolationCut & g) ; // cpy assignment
   
-  ClassDef(AliIsolationCut,6)
+  ClassDef(AliIsolationCut,7)
 } ;