]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
set the number of MC types of cluster origins and then the number of histograms via...
authorgconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 6 Sep 2014 11:19:06 +0000 (13:19 +0200)
committergconesab <gustavo.conesa.balbastre@cern.ch>
Sat, 6 Sep 2014 14:36:48 +0000 (16:36 +0200)
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.cxx
PWGGA/CaloTrackCorrelations/AliAnaParticleHadronCorrelation.h

index ffc1f88d44ae5b79d509ad24b0caf6c94c3d0ba2..ffc40bb6300f8845605279448114ae9e7c7e6a18 100755 (executable)
@@ -185,7 +185,7 @@ ClassImp(AliAnaParticleHadronCorrelation)
   //Initialize parameters
   InitParameters();
   
-  for(Int_t i = 0; i < 7; i++)
+  for(Int_t i = 0; i < fgkNmcTypes; i++)
   { 
     fhPtTriggerMC[i] = 0;
     fhXEChargedMC[i] = 0;
@@ -1254,7 +1254,7 @@ TList *  AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
   
   if(IsDataMC())
   {
-    for(Int_t i=0; i < 7; i++)
+    for(Int_t i=0; i < fgkNmcTypes; i++)
     {
       fhPtTriggerMC[i]  = new TH1F(Form("hPtTrigger_MC%s",nameMC[i].Data()),
                                    Form("#it{p}_{T} distribution of trigger particles, trigger origin is %s",nameMC[i].Data()),
@@ -1276,7 +1276,7 @@ TList *  AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
       
       if(IsDataMC())
       {
-        for(Int_t i=0; i < 7; i++)
+        for(Int_t i=0; i < fgkNmcTypes; i++)
         {
           fhPtDecayTriggerMC[ibit][i]  = new TH1F(Form("hPtDecayTrigger_bit%d_MC%s",fDecayBits[ibit], nameMC[i].Data()),
                                             Form("#it{p}_{T} distribution of trigger particles, decay Bit %d, trigger origin is %s",fDecayBits[ibit], nameMC[i].Data()),
@@ -1505,7 +1505,7 @@ TList *  AliAnaParticleHadronCorrelation::GetCreateOutputObjects()
   
   if(IsDataMC())
   {
-    for(Int_t i=0; i < 7; i++)
+    for(Int_t i=0; i < fgkNmcTypes; i++)
     {
       
       fhDeltaPhiChargedMC[i]  = new TH2F(Form("hDeltaPhiCharged_MC%s",nameMC[i].Data()),
@@ -3245,7 +3245,7 @@ void  AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
     // pT of the trigger, vs trigger origin if MC
     //
     fhPtTrigger->Fill(pt);
-    if(IsDataMC() && mcIndex >=0 && mcIndex < 7)
+    if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
       fhPtTriggerMC[mcIndex]->Fill(pt);
     
     if(fDecayTrigger)
@@ -3259,7 +3259,7 @@ void  AliAnaParticleHadronCorrelation::MakeAnalysisFillHistograms()
           {
             fhPtDecayTrigger[ibit]->Fill(pt);
             
-            if(IsDataMC() && mcIndex >=0 && mcIndex < 7)
+            if(IsDataMC() && mcIndex >=0 && mcIndex < fgkNmcTypes)
               fhPtDecayTriggerMC[ibit][mcIndex]->Fill(pt);
           }
         }
index c916f47887ba9f16f23413c8f7cde554c6af792c..a301fbfa586d0257239c206d1ce550ce198835d2 100755 (executable)
@@ -92,7 +92,8 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
                                                          Float_t deltaPhi);  
     
   Int_t        GetMCTagHistogramIndex(Int_t tag);
-  
+  static const Int_t fgkNmcTypes = 7;
+
   Bool_t       IsTriggerTheEventLeadingParticle();
   
   // Parameter setter and getter
@@ -214,8 +215,8 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
   void         SwitchOnFillPtImbalancePerPtABinHistograms()  { fFillMomImbalancePtAssocBinsHisto = kTRUE  ; }
   void         SwitchOffFillPtImbalancePerPtABinHistograms() { fFillMomImbalancePtAssocBinsHisto = kFALSE ; }
   
-  void         SetMCGenType(Int_t min = 0, Int_t max = 6) { if(min >= 0 && min < 7) fMCGenTypeMin = min ;
-                                                            if(max >= 0 && max < 7) fMCGenTypeMax = max ; }
+  void         SetMCGenType(Int_t min = 0, Int_t max = 6) { if(min >= 0 && min < fgkNmcTypes) fMCGenTypeMin = min ;
+                                                            if(max >= 0 && max < fgkNmcTypes) fMCGenTypeMax = max ; }
   
  private:
 
@@ -267,8 +268,8 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
   Bool_t       fFillEtaGapsHisto;              // Fill azimuthal correlation histograms in 2 eta gaps, |eta|>0.8 and |eta|<0.01
   Bool_t       fFillMomImbalancePtAssocBinsHisto; // momentum imbalance histograms in bins of pT associated
   
-  Int_t        fMCGenTypeMin;                  // Of the 7 possible types, select those between fMCGenTypeMin and fMCGenTypeMax
-  Int_t        fMCGenTypeMax;                  // Of the 7 possible types, select those between fMCGenTypeMin and fMCGenTypeMax
+  Int_t        fMCGenTypeMin;                  // Of the fgkNmcTypes possible types, select those between fMCGenTypeMin and fMCGenTypeMax
+  Int_t        fMCGenTypeMax;                  // Of the fgkNmcTypes possible types, select those between fMCGenTypeMin and fMCGenTypeMax
   
   //Histograms
 
@@ -285,10 +286,10 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
   TH2F *       fhPhiTrigger;                   //! phi distribution vs pT of trigger particles
   TH2F *       fhEtaTrigger;                   //! eta distribution vs pT of trigger particles
   
-  TH1F *       fhPtTriggerMC[7];               //! pT distribution of trigger particles, check the origin of the cluster : "Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"
+  TH1F *       fhPtTriggerMC[fgkNmcTypes];     //! pT distribution of trigger particles, check the origin of the cluster : "Photon","Pi0","Pi0Decay","EtaDecay","OtherDecay","Electron","Hadron"
 
   TH1F *       fhPtDecayTrigger[4];            //! pT distribution of trigger particles, tagged as decay
-  TH1F *       fhPtDecayTriggerMC[4][7];       //! pT distribution of trigger particles, tagged as decay, check the origin of the cluster
+  TH1F *       fhPtDecayTriggerMC[4][fgkNmcTypes];//! pT distribution of trigger particles, tagged as decay, check the origin of the cluster
   
   TH2F *       fhPtTriggerCentrality;          //! pT distribution of trigger particles vs centrality
   TH2F *       fhPtTriggerEventPlane;          //! pT distribution of trigger particles vs centrality
@@ -331,8 +332,8 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
   TH2F *       fhPtHbpZTCharged  ;             //! Trigger particle -charged hadron momentum HBP histogram
   TH2F *       fhPtHbpZTUeCharged  ;           //! Trigger particle -underlying charged hadron momentum HBP histogram  
   
-  TH2F *       fhXEChargedMC[7]  ;             //! Trigger particle -charged hadron momentum imbalance histogram, check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0), hadron, rest of photons (prompt, FSR, ISR)
-  TH2F *       fhDeltaPhiChargedMC[7]  ;       //! Trigger particle -charged hadron delta phi histogram, check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0), hadron, rest of photons (prompt, FSR, ISR)
+  TH2F *       fhXEChargedMC[fgkNmcTypes]  ;   //! Trigger particle -charged hadron momentum imbalance histogram, check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0), hadron, rest of photons (prompt, FSR, ISR)
+  TH2F *       fhDeltaPhiChargedMC[fgkNmcTypes];//! Trigger particle -charged hadron delta phi histogram, check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0), hadron, rest of photons (prompt, FSR, ISR)
 
   TH2F *       fhDeltaPhiDeltaEtaChargedPtA3GeV;//! differences of eta and phi between trigger and charged hadrons, pTa > 3 GeV
   TH2F *       fhDeltaPhiChargedPtA3GeV  ;      //! Difference of charged particle phi and trigger particle  phi as function of  trigger particle pT, pTa > 3 GeV
@@ -457,33 +458,33 @@ class AliAnaParticleHadronCorrelation : public AliAnaCaloTrackCorrBaseClass {
   // If the data is MC, correlation with generated particles
   // check the origin of the cluster : decay photon (pi0, eta, other), merged photon (pi0),
   // hadron, rest of photons (prompt, FSR, ISR)
-  TH1F *       fhMCPtTrigger[7];               //! MC pure pT distribution of trigger particles
-  TH2F *       fhMCPhiTrigger[7];              //! MC pure Phi distribution of trigger particles
-  TH2F *       fhMCEtaTrigger[7];              //! MC pure Eta distribution of trigger particles
-  TH1F *       fhMCPtTriggerNotLeading[7];     //! MC pure pT distribution of trigger not leading particles
-  TH2F *       fhMCPhiTriggerNotLeading[7];    //! MC pure Phi distribution of trigger not leading particles
-  TH2F *       fhMCEtaTriggerNotLeading[7];    //! MC pure Eta distribution of trigger not leading particles
-  TH2F *       fhMCEtaCharged[7];              //! MC pure particles charged primary pt vs eta (both associated)
-  TH2F *       fhMCPhiCharged[7];              //! MC pure particles charged primary pt vs phi (both associated)
-  TH2F *       fhMCDeltaEtaCharged[7];         //! MC pure particles charged trigger primary pt vs delta eta (associated-trigger)
-  TH2F *       fhMCDeltaPhiCharged[7];         //! MC pure particles charged trigger primary pt vs delta phi (associated-trigger)
-  TH2F *       fhMCDeltaPhiDeltaEtaCharged[7]; //! MC pure particles charged associated primary pt vs delta phi (associated-trigger), in away side
-  TH2F *       fhMCDeltaPhiChargedPt[7];       //! MC pure particles charged delta phi vs delta eta (associated-trigger)
-  TH2F *       fhMCPtXECharged[7];             //! MC pure particles charged trigger primary pt vs xE
-  TH2F *       fhMCPtXEUeCharged[7];           //! MC pure particles charged trigger primary pt vs xE (underlying event)
-  TH2F *       fhMCPtXEUeLeftCharged[7];       //! MC pure particles charged trigger primary pt vs xE (underlying event,left cone)
-  TH2F *       fhMCPtHbpXECharged[7];          //! MC pure particles charged trigger primary pt vs ln(1/xE)
-  TH2F *       fhMCPtHbpXEUeCharged[7];        //! MC pure particles charged trigger primary pt vs ln(1/xE) (underlying event)
-  TH2F *       fhMCPtHbpXEUeLeftCharged[7];    //! MC pure particles charged trigger primary pt vs ln(1/xE) (underlying event, left cone)
-  TH1F *       fhMCUePart[7];                  //! MC pure UE particles distribution vs pt trig
-  TH2F *       fhMCPtZTCharged[7];             //! MC pure particles charged trigger primary pt vs zT
-  TH2F *       fhMCPtZTUeCharged[7];           //! MC pure particles charged trigger primary pt vs zT (underlying event)
-  TH2F *       fhMCPtZTUeLeftCharged[7];       //! MC pure particles charged trigger primary pt vs zT (underlying event, left cone)
-  TH2F *       fhMCPtHbpZTCharged[7];          //! MC pure particles charged trigger primary pt vs ln(1/zT)
-  TH2F *       fhMCPtHbpZTUeCharged[7];        //! MC pure particles charged trigger primary pt vs ln(1/zT) (underlying event)
-  TH2F *       fhMCPtHbpZTUeLeftCharged[7];    //! MC pure particles charged trigger primary pt vs ln(1/zT) (underlying event, left cone)
-  TH2F *       fhMCPtTrigPout[7];              //! MC pure particles charged trigger primary pt vs pOut
-  TH2F *       fhMCPtAssocDeltaPhi[7];         //! MC pure particles charged associated primary pt vs delta phi (associated-trigger)
+  TH1F *       fhMCPtTrigger[fgkNmcTypes];               //! MC pure pT distribution of trigger particles
+  TH2F *       fhMCPhiTrigger[fgkNmcTypes];              //! MC pure Phi distribution of trigger particles
+  TH2F *       fhMCEtaTrigger[fgkNmcTypes];              //! MC pure Eta distribution of trigger particles
+  TH1F *       fhMCPtTriggerNotLeading[fgkNmcTypes];     //! MC pure pT distribution of trigger not leading particles
+  TH2F *       fhMCPhiTriggerNotLeading[fgkNmcTypes];    //! MC pure Phi distribution of trigger not leading particles
+  TH2F *       fhMCEtaTriggerNotLeading[fgkNmcTypes];    //! MC pure Eta distribution of trigger not leading particles
+  TH2F *       fhMCEtaCharged[fgkNmcTypes];              //! MC pure particles charged primary pt vs eta (both associated)
+  TH2F *       fhMCPhiCharged[fgkNmcTypes];              //! MC pure particles charged primary pt vs phi (both associated)
+  TH2F *       fhMCDeltaEtaCharged[fgkNmcTypes];         //! MC pure particles charged trigger primary pt vs delta eta (associated-trigger)
+  TH2F *       fhMCDeltaPhiCharged[fgkNmcTypes];         //! MC pure particles charged trigger primary pt vs delta phi (associated-trigger)
+  TH2F *       fhMCDeltaPhiDeltaEtaCharged[fgkNmcTypes]; //! MC pure particles charged associated primary pt vs delta phi (associated-trigger), in away side
+  TH2F *       fhMCDeltaPhiChargedPt[fgkNmcTypes];       //! MC pure particles charged delta phi vs delta eta (associated-trigger)
+  TH2F *       fhMCPtXECharged[fgkNmcTypes];             //! MC pure particles charged trigger primary pt vs xE
+  TH2F *       fhMCPtXEUeCharged[fgkNmcTypes];           //! MC pure particles charged trigger primary pt vs xE (underlying event)
+  TH2F *       fhMCPtXEUeLeftCharged[fgkNmcTypes];       //! MC pure particles charged trigger primary pt vs xE (underlying event,left cone)
+  TH2F *       fhMCPtHbpXECharged[fgkNmcTypes];          //! MC pure particles charged trigger primary pt vs ln(1/xE)
+  TH2F *       fhMCPtHbpXEUeCharged[fgkNmcTypes];        //! MC pure particles charged trigger primary pt vs ln(1/xE) (underlying event)
+  TH2F *       fhMCPtHbpXEUeLeftCharged[fgkNmcTypes];    //! MC pure particles charged trigger primary pt vs ln(1/xE) (underlying event, left cone)
+  TH1F *       fhMCUePart[fgkNmcTypes];                  //! MC pure UE particles distribution vs pt trig
+  TH2F *       fhMCPtZTCharged[fgkNmcTypes];             //! MC pure particles charged trigger primary pt vs zT
+  TH2F *       fhMCPtZTUeCharged[fgkNmcTypes];           //! MC pure particles charged trigger primary pt vs zT (underlying event)
+  TH2F *       fhMCPtZTUeLeftCharged[fgkNmcTypes];       //! MC pure particles charged trigger primary pt vs zT (underlying event, left cone)
+  TH2F *       fhMCPtHbpZTCharged[fgkNmcTypes];          //! MC pure particles charged trigger primary pt vs ln(1/zT)
+  TH2F *       fhMCPtHbpZTUeCharged[fgkNmcTypes];        //! MC pure particles charged trigger primary pt vs ln(1/zT) (underlying event)
+  TH2F *       fhMCPtHbpZTUeLeftCharged[fgkNmcTypes];    //! MC pure particles charged trigger primary pt vs ln(1/zT) (underlying event, left cone)
+  TH2F *       fhMCPtTrigPout[fgkNmcTypes];              //! MC pure particles charged trigger primary pt vs pOut
+  TH2F *       fhMCPtAssocDeltaPhi[fgkNmcTypes];         //! MC pure particles charged associated primary pt vs delta phi (associated-trigger)
 
   // Mixing
   TH1I *       fhNEventsTrigger;               //! number of analyzed triggered events