]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
extract efficiency depending on particle species (Leonardo)
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Mar 2013 16:12:21 +0000 (16:12 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Mar 2013 16:12:21 +0000 (16:12 +0000)
PWGCF/Correlations/Base/AliUEHist.cxx
PWGCF/Correlations/Base/AliUEHist.h
PWGCF/Correlations/Base/AliUEHistograms.cxx
PWGCF/Correlations/Base/AliUEHistograms.h

index e5ef76804aea4357d863e4f55c489c7886f21c8b..756340268ea68a698d936b17efa78e2a071800c0 100644 (file)
@@ -51,6 +51,7 @@ AliUEHist::AliUEHist(const char* reqHist, const char* binning) :
   fEtaMax(0),
   fPtMin(0),
   fPtMax(0),
+  fPartSpecies(-1),
   fCentralityMin(0),
   fCentralityMax(0),
   fZVtxMin(0),
@@ -330,6 +331,7 @@ AliUEHist::AliUEHist(const AliUEHist &c) :
   fEtaMax(0),
   fPtMin(0),
   fPtMax(0),
+  fPartSpecies(-1),
   fCentralityMin(0),
   fCentralityMax(0),
   fZVtxMin(0),
@@ -433,6 +435,7 @@ void AliUEHist::Copy(TObject& c) const
   target.fEtaMax = fEtaMax;
   target.fPtMin = fPtMin;
   target.fPtMax = fPtMax;
+  target.fPartSpecies = fPartSpecies;
   target.fCentralityMin = fCentralityMin;
   target.fCentralityMax = fCentralityMax;
   target.fZVtxMin = fZVtxMin;
@@ -1810,6 +1813,12 @@ TH1* AliUEHist::GetTrackEfficiency(CFStep step1, CFStep step2, Int_t axis1, Int_
     sourceContainer->GetGrid(step1)->SetRangeUser(1, fPtMin, fPtMax);
     sourceContainer->GetGrid(step2)->SetRangeUser(1, fPtMin, fPtMax);
   }
+  if (fPartSpecies != -1 && axis1 != 2 && axis2 != 2 && axis3 != 2)
+  {
+    Printf("Restricted to particle species %d", fPartSpecies);
+    sourceContainer->GetGrid(step1)->SetRangeUser(2, fPartSpecies, fPartSpecies);
+    sourceContainer->GetGrid(step2)->SetRangeUser(2, fPartSpecies, fPartSpecies);
+  }
   if (fCentralityMax > fCentralityMin && axis1 != 3 && axis2 != 3 && axis3 != 3)
   {
     Printf("Restricted centrality range to %f %f", fCentralityMin, fCentralityMax);
index a7f3386611129ce8cdca943b4ccfdd850b143a81..983b0eb007c330bb80fd403275e0408cf885aec0 100644 (file)
@@ -100,6 +100,7 @@ class AliUEHist : public TObject
   
   void SetEtaRange(Float_t etaMin, Float_t etaMax) { fEtaMin = etaMin; fEtaMax = etaMax; }
   void SetPtRange(Float_t ptMin, Float_t ptMax)    { fPtMin = ptMin; fPtMax = ptMax; }
+  void SetPartSpecies(Int_t species)    { fPartSpecies = species;}
   void SetCentralityRange(Float_t min, Float_t max)    { fCentralityMin = min; fCentralityMax = max; }
   void SetZVtxRange(Float_t min, Float_t max)          { fZVtxMin = min; fZVtxMax = max; }
   
@@ -146,6 +147,7 @@ protected:
   Float_t fEtaMax;                    // eta max for projections
   Float_t fPtMin;                     // pT min for projections (for track pT, not pT,lead)
   Float_t fPtMax;                     // pT max for projections (for track pT, not pT,lead)
+  Int_t fPartSpecies;                   // Particle species for projections 
   Float_t fCentralityMin;             // centrality min for projections
   Float_t fCentralityMax;             // centrality max for projections
   Float_t fZVtxMin;                   // z vtx min for projections
@@ -164,7 +166,7 @@ protected:
   
   TString fHistogramType;             // what is stored in this histogram
   
-  ClassDef(AliUEHist, 12) // underlying event histogram container
+  ClassDef(AliUEHist, 13) // underlying event histogram container
 };
 
 #endif
index 6e74257440bcecc00609d0097f427c8487582f50..884f9d14e2a2dd71720a5c25403fd93aa39483ae 100644 (file)
@@ -961,6 +961,16 @@ void AliUEHistograms::SetPtRange(Float_t ptMin, Float_t ptMax)
       GetUEHist(i)->SetPtRange(ptMin, ptMax);
 }
 
+//____________________________________________________________________
+void AliUEHistograms::SetPartSpecies(Int_t species)
+{
+  // sets PartSpecie for all contained AliUEHist classes
+  
+  for (Int_t i=0; i<fgkUEHists; i++)
+    if (GetUEHist(i))
+      GetUEHist(i)->SetPartSpecies(species);
+}
+
 //____________________________________________________________________
 void AliUEHistograms::SetZVtxRange(Float_t min, Float_t max)
 {
index 4552be0ef09152a8e03d6c5e22adfaf560cce534..5c589d3c7ac3835314bc86d1eeadc8c919b4418b 100644 (file)
@@ -77,6 +77,7 @@ class AliUEHistograms : public TNamed
   
   void SetEtaRange(Float_t etaMin, Float_t etaMax);
   void SetPtRange(Float_t ptMin, Float_t ptMax);
+  void SetPartSpecies(Int_t species);
   void SetZVtxRange(Float_t min, Float_t max);
   void SetContaminationEnhancement(TH1F* hist);
   void SetCombineMinMax(Bool_t flag);