]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
add option to do the analysis only when one of the clusters is tagged as isolated
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 28 Aug 2014 08:12:54 +0000 (10:12 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Thu, 28 Aug 2014 08:13:41 +0000 (10:13 +0200)
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.cxx
PWGGA/CaloTrackCorrelations/AliAnaPi0EbE.h

index 5e37184481301ce8ab176afbcd5b5da11476f151..64a3d60b139c98439b9164ec05e8218123a13d3f 100755 (executable)
@@ -53,7 +53,7 @@ fAnaType(kIMCalo),                  fCalorimeter(""),
 fMinDist(0.),fMinDist2(0.),         fMinDist3(0.),
 fNLMCutMin(-1),                     fNLMCutMax(10),
 fTimeCutMin(-10000),                fTimeCutMax(10000),
-fRejectTrackMatch(kTRUE),
+fRejectTrackMatch(kTRUE),           fSelectIsolatedDecay(kFALSE),
 fFillPileUpHistograms(0),
 fFillWeightHistograms(kFALSE),      fFillTMHisto(0),
 fFillSelectClHisto(0),              fFillOnlySimpleSSHisto(1),
@@ -2798,6 +2798,15 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
     {
       AliAODPWG4Particle * photon2 =  (AliAODPWG4Particle*) (GetInputAODBranch()->At(jphoton));
       
+      // Do analysis only when one of the decays is isolated
+      // Run AliAnaParticleIsolation before
+      if(fSelectIsolatedDecay)
+      {
+        Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
+        Bool_t isolated2 = ((AliAODPWG4ParticleCorrelation*) photon2)->IsIsolated();
+        if(!isolated1 && !isolated2) continue;
+      }
+      
       // Vertex cut in case of mixed events
       Int_t evtIndex2 = 0 ;
       if(GetMixedEvent())
@@ -2891,18 +2900,11 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
       // Select good pair (good phi, pt cuts, aperture and invariant mass)
       //
       if(!GetNeutralMesonSelection()->SelectPair(mom1, mom2,fCalorimeter)) continue;
-      
+            
       if(GetDebug()>1)
         printf("AliAnaPi0EbE::MakeInvMassInCalorimeter() - Selected gamma pair: pt %f, phi %f, eta%f \n",
                mom.Pt(), mom.Phi()*TMath::RadToDeg(), mom.Eta());
       
-      //Fill some histograms about shower shape
-      if(fFillSelectClHisto && clusters && GetReader()->GetDataType()!=AliCaloTrackReader::kMC)
-      {
-        FillSelectedClusterHistograms(cluster1, mom1.Pt(), nMaxima1, photon1->GetTag());
-        FillSelectedClusterHistograms(cluster2, mom2.Pt(), nMaxima2, photon2->GetTag());
-      }
-      
       //
       // Tag both photons as decay if not done before
       // set the corresponding bit for pi0 or eta or "side" case
@@ -2973,7 +2975,6 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
       FillPileUpHistograms(ptpair,((cluster1->GetTOF()+cluster2->GetTOF())*1e9)/2,cluster1);
       
       //Create AOD for analysis
-      
       AliAODPWG4Particle pi0 = AliAODPWG4Particle(mom);
       
       if     ( (GetNeutralMesonSelection()->GetParticle()).Contains("Pi0") ) pi0.SetIdentifiedParticleType(AliCaloPID::kPi0);
@@ -2995,7 +2996,6 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeter()
       
       AddAODParticle(pi0);
       
-      
     }//2n photon loop
     
   }//1st photon loop
@@ -3062,6 +3062,14 @@ void  AliAnaPi0EbE::MakeInvMassInCalorimeterAndCTS()
     AliAODPWG4Particle * photon1 =  (AliAODPWG4Particle*) (GetInputAODBranch()->At(iphoton));
     mom1 = *(photon1->Momentum());
     
+    // Do analysis only when one of the decays is isolated
+    // Run AliAnaParticleIsolation before
+    if(fSelectIsolatedDecay)
+    {
+      Bool_t isolated1 = ((AliAODPWG4ParticleCorrelation*) photon1)->IsIsolated();
+      if(!isolated1) continue;
+    }
+
     //Get original cluster, to recover some information
     Int_t iclus = -1;
     AliVCluster *cluster = FindCluster(clusters,photon1->GetCaloLabel(0),iclus);
index 8a4f7d4163dc62f853460bb0abf43fef5a5a1db1..ca3ec197aca321188811bdacbef7a645f50a0ea5 100755 (executable)
@@ -128,6 +128,8 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   void           SwitchOnAllNLMHistoFill()                   { fFillAllNLMHistograms   = kTRUE ; }
   void           SwitchOffAllNLMHistoFill()                  { fFillAllNLMHistograms   = kFALSE; }
 
+  void           SwitchOnSelectIsolatedDecay()               { fSelectIsolatedDecay    = kTRUE ; }
+  void           SwitchOffSelectIsolatedDecay()              { fSelectIsolatedDecay    = kFALSE; }
   
   //For histograms
   enum mcTypes   { kmcPi0Decay = 0, kmcEtaDecay = 1, kmcOtherDecay = 2,
@@ -151,7 +153,8 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   Double_t       fTimeCutMin  ;            // Remove clusters/cells with time smaller than this value, in ns
   Double_t       fTimeCutMax  ;            // Remove clusters/cells with time larger than this value, in ns
   Bool_t         fRejectTrackMatch ;       // Remove clusters which have an associated TPC track
-
+  Bool_t         fSelectIsolatedDecay;     // Select pairs where at least one is declared isolated (run first AliAnaParticleIsolation)
+  
   Bool_t         fFillPileUpHistograms;    // Fill pile-up related histograms
   Bool_t         fFillWeightHistograms ;   // Fill weigth histograms
   Bool_t         fFillTMHisto;             // Fill track matching plots
@@ -417,7 +420,7 @@ class AliAnaPi0EbE : public AliAnaCaloTrackCorrBaseClass {
   AliAnaPi0EbE(              const AliAnaPi0EbE & pi0ebe) ; // cpy ctor
   AliAnaPi0EbE & operator = (const AliAnaPi0EbE & pi0ebe) ; // cpy assignment
   
-  ClassDef(AliAnaPi0EbE,40)
+  ClassDef(AliAnaPi0EbE,41)
 } ;