In case of multiple isolations, remove the condition on the isolation, done case...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 9 Aug 2014 15:01:04 +0000 (17:01 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 9 Aug 2014 17:08:25 +0000 (19:08 +0200)
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleIsolation.h

index 07639bb..365c137 100755 (executable)
@@ -162,13 +162,13 @@ fHistoNPtInConeBins(0),           fHistoPtInConeMax(0.),           fHistoPtInCon
     fConeSizes[i]      = 0 ;
     
     for(Int_t imc = 0; imc < 9; imc++)
-      fhPtSumIsolatedMC[imc][i] = 0 ;
+      fhSumPtLeadingPtMC[imc][i] = 0 ;
     
     for(Int_t j = 0; j < 5 ; j++)
     {
       fhPtThresIsolated             [i][j] = 0 ;
       fhPtFracIsolated              [i][j] = 0 ;
-      fhPtSumIsolated               [i][j] = 0 ;
+      fhSumPtIsolated               [i][j] = 0 ;
       
       fhEtaPhiPtThresIso            [i][j] = 0 ;
       fhEtaPhiPtThresDecayIso       [i][j] = 0 ;
@@ -191,6 +191,7 @@ fHistoNPtInConeBins(0),           fHistoPtInConeMax(0.),           fHistoPtInCon
       {
         fhPtThresIsolatedMC[imc][i][j] = 0 ;
         fhPtFracIsolatedMC [imc][i][j] = 0 ;
+        fhSumPtIsolatedMC  [imc][i][j] = 0 ;
         
       }
     }
@@ -2654,12 +2655,12 @@ TList *  AliAnaParticleIsolation::GetCreateOutputObjects()
       {
         for(Int_t imc = 0; imc < 9; imc++)
         {
-          snprintf(name , buffersize,"hPtSumMC%s_Cone_%d",mcPartName[imc].Data(),icone);
+          snprintf(name , buffersize,"hSumPtLeadingPt_MC%s_Cone_%d",mcPartName[imc].Data(),icone);
           snprintf(title, buffersize,"Candidate %s #it{p}_{T} vs cone #Sigma #it{p}_{T} for #it{R}=%2.2f",mcPartType[imc].Data(),fConeSizes[icone]);
-          fhPtSumIsolatedMC[imc][icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
-          fhPtSumIsolatedMC[imc][icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
-          fhPtSumIsolatedMC[imc][icone]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
-          outputContainer->Add(fhPtSumIsolatedMC[imc][icone]) ;
+          fhSumPtLeadingPtMC[imc][icone] = new TH2F(name, title,nptbins,ptmin,ptmax,nptsumbins,ptsummin,ptsummax);
+          fhSumPtLeadingPtMC[imc][icone]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
+          fhSumPtLeadingPtMC[imc][icone]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
+          outputContainer->Add(fhSumPtLeadingPtMC[imc][icone]) ;
         }
       }//Histos with MC
       
@@ -2677,13 +2678,12 @@ TList *  AliAnaParticleIsolation::GetCreateOutputObjects()
         fhPtFracIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
         outputContainer->Add(fhPtFracIsolated[icone][ipt]) ; 
         
-        
-        snprintf(name, buffersize,"hPtSum_Cone_%d_Pt%d",icone,ipt);
+        snprintf(name, buffersize,"hSumPt_Cone_%d_Pt%d",icone,ipt);
         snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for #it{R} =  %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
-        fhPtSumIsolated[icone][ipt]  = new TH1F(name, title,nptbins,ptmin,ptmax);
-        // fhPtSumIsolated[icone][ipt]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
-        fhPtSumIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
-        outputContainer->Add(fhPtSumIsolated[icone][ipt]) ;
+        fhSumPtIsolated[icone][ipt]  = new TH1F(name, title,nptbins,ptmin,ptmax);
+        // fhSumPtIsolated[icone][ipt]->SetYTitle("#Sigma #it{p}_{T} (GeV/#it{c})");
+        fhSumPtIsolated[icone][ipt]->SetXTitle("#it{p}_{T} (GeV/#it{c})");
+        outputContainer->Add(fhSumPtIsolated[icone][ipt]) ;
         
         snprintf(name, buffersize,"hPtSumDensity_Cone_%d_Pt%d",icone,ipt);
         snprintf(title, buffersize,"Isolated candidate #it{p}_{T} distribution for density in #it{R} =  %2.2f and #it{p}_{T}^{sum} = %2.2f GeV/#it{c}",fConeSizes[icone],fSumPtThresholds[ipt]);
@@ -2830,6 +2830,14 @@ TList *  AliAnaParticleIsolation::GetCreateOutputObjects()
             fhPtFracIsolatedMC[imc][icone][ipt]->SetYTitle("#it{counts}");
             fhPtFracIsolatedMC[imc][icone][ipt]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
             outputContainer->Add(fhPtFracIsolatedMC[imc][icone][ipt]) ;
+            
+            snprintf(name , buffersize,"hSumPtMC%s_Cone_%d_Pt%d",mcPartName[imc].Data(),icone,ipt);
+            snprintf(title, buffersize,"Isolated %s #it{p}_{T} for #it{R}=%2.2f and #Sigma #it{p}_{T}^{in cone}=%2.2f",
+                     mcPartType[imc].Data(),fConeSizes[icone], fSumPtThresholds[ipt]);
+            fhSumPtIsolatedMC[imc][icone][ipt] = new TH1F(name, title,nptbins,ptmin,ptmax);
+            fhSumPtIsolatedMC[imc][icone][ipt]->SetYTitle("#it{counts}");
+            fhSumPtIsolatedMC[imc][icone][ipt]->SetXTitle("#it{p}_{T}(GeV/#it{c})");
+            outputContainer->Add(fhSumPtIsolatedMC[imc][icone][ipt]) ;
           }
         }//Histos with MC
       }//icone loop
@@ -3594,6 +3602,7 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
   //Keep original setting used when filling AODs, reset at end of analysis
   Float_t ptthresorg = GetIsolationCut()->GetPtThreshold();
   Float_t ptfracorg  = GetIsolationCut()->GetPtFraction();
+  Float_t ptsumcorg  = GetIsolationCut()->GetSumPtThreshold();
   Float_t rorg       = GetIsolationCut()->GetConeSize();
   
   Float_t coneptsum = 0 ;
@@ -3719,6 +3728,14 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
     }
     
     fhSumPtLeadingPt[icone]->Fill(ptC,coneptsum);
+    
+    if(IsDataMC())
+    {
+      if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
+        fhSumPtLeadingPtMC[kmcPhoton][icone]->Fill(ptC,coneptsum) ;
+      
+      fhSumPtLeadingPtMC[mcIndex][icone]->Fill(ptC,coneptsum) ;
+    }
 
     ///////////////////
     
@@ -3737,16 +3754,14 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
                                           n[icone][ipt],nfrac[icone][ipt],coneptsum, isolated);
       
       
-      if(!isolated) continue;
-      
       // Normal pT threshold cut
       
       if(GetDebug() > 0)
       {
         printf(" AliAnaParticleIsolation::MakeSeveralICAnalysis() - cone size %1.1f, ptThres  %1.1f, sumptThresh  %1.1f\n",
                fConeSizes[icone],fPtThresholds[ipt],fSumPtThresholds[ipt]);
-        printf("\t n %d, nfrac %d, coneptsum %2.2f, isolated %d\n",
-               n[icone][ipt],nfrac[icone][ipt],coneptsum, isolated);
+        printf("\t n %d, nfrac %d, coneptsum %2.2f\n",
+               n[icone][ipt],nfrac[icone][ipt],coneptsum);
         
         printf(" AliAnaParticleIsolation::MakeSeveralICAnalysis() - pt %1.1f, eta %1.1f, phi %1.1f\n",ptC, etaC, phiC);
       }
@@ -3808,7 +3823,7 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
         if(GetDebug() > 0 )
           printf(" AliAnaParticleIsolation::MakeSeveralICAnalysis() - filling sum loop\n");
 
-        fhPtSumIsolated [icone][ipt]->Fill(ptC) ;
+        fhSumPtIsolated [icone][ipt]->Fill(ptC) ;
         fhEtaPhiPtSumIso[icone][ipt]->Fill(etaC, phiC) ;
         
         if( decay && fFillTaggedDecayHistograms )
@@ -3816,6 +3831,14 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
           fhPtPtSumDecayIso[icone][ipt]->Fill(ptC);
           fhEtaPhiPtSumDecayIso[icone][ipt]->Fill(etaC, phiC) ;
         }
+        
+        if(IsDataMC())
+        {
+          if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
+            fhSumPtIsolatedMC[kmcPhoton][icone][ipt]->Fill(ptC) ;
+          
+          fhSumPtIsolatedMC[mcIndex][icone][ipt]->Fill(ptC) ;
+        }
       }
       
       // pt sum pt frac method
@@ -3855,19 +3878,13 @@ void  AliAnaParticleIsolation::MakeSeveralICAnalysis(AliAODPWG4ParticleCorrelati
       }
     }//pt thresh loop
     
-    if(IsDataMC())
-    {
-      if( GetMCAnalysisUtils()->CheckTagBit(tag,AliMCAnalysisUtils::kMCPhoton))
-        fhPtSumIsolatedMC[kmcPhoton][icone]->Fill(ptC,coneptsum) ;
-      
-      fhPtSumIsolatedMC[mcIndex][icone]->Fill(ptC,coneptsum) ;
-    }
     
   }//cone size loop
   
   //Reset original parameters for AOD analysis
   GetIsolationCut()->SetPtThreshold(ptthresorg);
   GetIsolationCut()->SetPtFraction(ptfracorg);
+  GetIsolationCut()->SetSumPtThreshold(ptsumcorg);
   GetIsolationCut()->SetConeSize(rorg);
   
 }
index b178025..ba401f8 100755 (executable)
@@ -324,13 +324,10 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
   TH1F *   fhPtIsoMC  [9];                        //! Number of isolated mcTypes particle
   TH2F *   fhPhiIsoMC [9];                        //! Phi of isolated mcTypes particle
   TH2F *   fhEtaIsoMC [9];                        //! eta of isolated mcTypes particle
-  TH1F *   fhPtThresIsolatedMC[9][5][5];          //! Isolated mcTypes particle with pt threshold
-  TH1F *   fhPtFracIsolatedMC [9][5][5];          //! Isolated mcTypes particle with pt frac
-  TH2F *   fhPtSumIsolatedMC  [9][5];             //! Isolated mcTypes particle with threshold on cone pt sum
   
   TH2F *   fhPtLambda0MC[9][2];                    //! Shower shape of (non) isolated candidates originated by mcTypes particle (do not apply SS cut previously)
-  //
-  
+  // Multiple cut analysis
   TH2F *   fhSumPtLeadingPt[5] ;                  //! Sum Pt in the cone
   TH2F *   fhPtLeadingPt[5] ;                     //! Particle Pt in the cone
   TH2F *   fhPerpSumPtLeadingPt[5] ;              //! Sum Pt in the cone at the perpendicular phi region to trigger axis  (phi +90)
@@ -338,7 +335,7 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
 
   TH1F *   fhPtThresIsolated[5][5] ;              //! Isolated particle with pt threshold 
   TH1F *   fhPtFracIsolated[5][5] ;               //! Isolated particle with pt threshold frac
-  TH1F *   fhPtSumIsolated[5][5] ;                //! Isolated particle with threshold on cone pt sum
+  TH1F *   fhSumPtIsolated[5][5] ;                //! Isolated particle with threshold on cone pt sum
   
   TH2F *   fhEtaPhiPtThresIso[5][5] ;             //! eta vs phi of isolated particles with pt threshold
   TH2F *   fhEtaPhiPtThresDecayIso[5][5] ;        //! eta vs phi of isolated particles with pt threshold
@@ -362,6 +359,13 @@ class AliAnaParticleIsolation : public AliAnaCaloTrackCorrBaseClass {
   TH2F *   fhEtaPhiFracPtSumIso[5][5];            //! Isolated particle with threshold on cone sum density
   TH2F *   fhEtaPhiFracPtSumDecayIso[5][5];       //! Isolated particle with threshold on cone sum density
  
+  // Multiple cut MC
+  TH1F *   fhPtThresIsolatedMC[9][5][5];          //! Isolated mcTypes particle with pt threshold
+  TH1F *   fhPtFracIsolatedMC [9][5][5];          //! Isolated mcTypes particle with pt frac
+  TH1F *   fhSumPtIsolatedMC  [9][5][5];          //! Isolated mcTypes particle with threshold on cone pt sum
+  TH2F *   fhSumPtLeadingPtMC [9][5];             //! mcTypes particle for sum Pt, different cone
+
+  
   // Track matching studies
   TH2F *   fhTrackMatchedDEta[2]     ;            //! Eta distance between track and cluster vs cluster E
   TH2F *   fhTrackMatchedDPhi[2]     ;            //! Phi distance between track and cluster vs cluster E