Update PR task : drathee
authorsjena <sjena@cern.ch>
Wed, 17 Sep 2014 22:39:49 +0000 (00:39 +0200)
committersjena <sjena@cern.ch>
Wed, 17 Sep 2014 22:39:49 +0000 (00:39 +0200)
14 files changed:
PWGCF/EBYE/PIDFluctuation/macros/AddEbyEPidRatioTask.C
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioBase.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioBase.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioDCA.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioEffCont.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioEffCont.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioHelper.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioPhy.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioPhy.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioQA.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioQA.h
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioTask.cxx
PWGCF/EBYE/PIDFluctuation/task/AliEbyEPidRatioTask.h

index c745046..e35a504 100644 (file)
@@ -9,7 +9,7 @@
 
 AliAnalysisTask *AddEbyEPidRatioTask(const Char_t *name   = "TPC_NuDyn",                        Bool_t isModeDist = 1, 
                                     Bool_t  isModeEff    = 0,    Bool_t isModeDCA        = 0,  Bool_t isModeQA   = 0, 
-                                    Bool_t  isCreateCSC  = 0,    Bool_t isModeAOD        = 0,  Bool_t isSetExt   = 0, 
+                                    Bool_t  isRatio      = 0,    Bool_t isModeAOD        = 0,  Bool_t isSetExt   = 0, 
                                     Int_t   aodFilterBit = 1024, 
                                     Int_t   modeCSC      = 0,    Int_t   modeCuts        = 0,  Int_t modePID     =-1,    
                                     Float_t gMinPt       = 0.3,  Float_t gMaxPt          = 2.5, 
@@ -20,11 +20,6 @@ AliAnalysisTask *AddEbyEPidRatioTask(const Char_t *name   = "TPC_NuDyn",
   
   TString sName(name);
 
-  if (isCreateCSC && !isModeEff) {
-    Error("AddTaskNetParticle", "Creating CrossSectionCorrection needs 'isModeEff' to be set.");
-    return NULL;
-  }
-
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   if (!mgr) {
     Error("AddTaskNetParticle", "No analysis manager found.");
@@ -55,7 +50,9 @@ AliAnalysisTask *AddEbyEPidRatioTask(const Char_t *name   = "TPC_NuDyn",
   }
   if (isModeQA)
     task->SetModeQACreation(1);              // => 1 = on    | 0 = off (default)
-  
+  if (isRatio)
+    task->SetIsRatio();
+
   Float_t minPt,     maxPt,     minPtEff,     maxPtEff,  minPtForTOF;
   Float_t nSigmaITS, nSigmaTPC, nSigmaTPClow, nSigmaTOF, maxPtForTPClow; 
   Float_t etaMax,    etaMaxEff, maxRap; 
@@ -76,10 +73,7 @@ AliAnalysisTask *AddEbyEPidRatioTask(const Char_t *name   = "TPC_NuDyn",
   nSigmaTPC      = 4.0;   
   nSigmaTPClow   = 3.0;   
   nSigmaTOF      = 4.0; 
-  
-  if (isCreateCSC && modeCSC == 1)
-    minPtForTOF = maxPtEff;
-  
+    
   if (isSetExt) {
     minPt          = gMinPt;    
     maxPt          = gMaxPt;
@@ -129,6 +123,7 @@ AliAnalysisTask *AddEbyEPidRatioTask(const Char_t *name   = "TPC_NuDyn",
   helper->SetNSigmaMaxTOF(nSigmaTOF);
   helper->SetMinPtForTOFRequired(minPtForTOF);
   helper->SetMaxPtForTPClow(maxPtForTPClow);
   task->SetNetParticleHelper(helper);
   mgr->AddTask(task);
   
index 067caa0..edb1a0f 100644 (file)
@@ -53,7 +53,7 @@ AliEbyEPidRatioBase::AliEbyEPidRatioBase() :
   fStack(NULL),
   
   fCentralityBin(-1.),
-  fNTracks(0) {
+  fNTracks(0), fIsRatio(kFALSE) {
   // Constructor   
 
   AliLog::SetClassDebugLevel("AliEbyEPidRatioBase",10);
@@ -74,7 +74,7 @@ AliEbyEPidRatioBase::AliEbyEPidRatioBase(const Char_t* name, const Char_t* title
   fStack(NULL),
   
   fCentralityBin(-1.),
-  fNTracks(0) {
+  fNTracks(0), fIsRatio(kFALSE) {
   // Constructor   
 
   AliLog::SetClassDebugLevel("AliEbyEPidRatioBase",10);
@@ -90,6 +90,7 @@ void AliEbyEPidRatioBase::Initialize(AliEbyEPidRatioHelper* helper, AliESDtrackC
   fHelper           = helper;
   fESDTrackCuts     = (cuts) ? cuts : helper->GetESDTrackCuts();
   fIsMC             = helper->GetIsMC();
+  fIsRatio          = helper->GetIsRatio();
   fAODtrackCutBit   = helper->GetAODtrackCutBit();
   Init();
   CreateHistograms();
index 24763d2..116c1b8 100644 (file)
@@ -55,7 +55,8 @@ class AliEbyEPidRatioBase : public TNamed {
   AliStack           *fStack;                 //! Ptr to stack
   Float_t             fCentralityBin;         //  Centrality of current event  
   Int_t               fNTracks;               //  N Tracks in the current event
-  
+  Bool_t              fIsRatio;                  //  Is MC event
+
   ClassDef(AliEbyEPidRatioBase, 1);
 };
 
index 3e88e32..8395616 100644 (file)
@@ -125,7 +125,7 @@ void AliEbyEPidRatioDCA::Process() {
     // -- Fill THnSparse 
     
     if(iPid != 0) {   
-      Double_t hnDCA[10] = {fCentralityBin, 
+      Double_t hnDCA[10] = {fCentralityBin,0, 
                            track->Eta(), 
                            yP, 
                            track->Phi(), 
@@ -133,21 +133,19 @@ void AliEbyEPidRatioDCA::Process() {
                            track->Charge(), 
                            contIdx,
                            isDCArAccepted, 
-                           dca[0], 
-                           0};
+                           dca[0]};
       fHnDCA->Fill(hnDCA);
     }      
-
-      Double_t hnDCA[10] = {fCentralityBin, 
-                           track->Eta(), 
-                           yP, 
-                           track->Phi(), 
-                           track->Pt(), 
-                           track->Charge(), 
-                           contIdx,
-                           isDCArAccepted, 
-                           dca[0], 
-                           iPid};
+    
+    Double_t hnDCA[10] = {fCentralityBin, iPid,
+                         track->Eta(), 
+                         yP, 
+                         track->Phi(), 
+                         track->Pt(), 
+                         track->Charge(), 
+                         contIdx,
+                         isDCArAccepted, 
+                         dca[0]};
       fHnDCA->Fill(hnDCA);
 
 
@@ -158,43 +156,53 @@ void AliEbyEPidRatioDCA::Process() {
 
 //________________________________________________________________________
 void AliEbyEPidRatioDCA::CreateHistograms() {
-  Int_t    binHnDCA[10] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, AliEbyEPidRatioHelper::fgkfHistNBinsEta,        //     cent |       etaRec
-                         AliEbyEPidRatioHelper::fgkfHistNBinsRap,  AliEbyEPidRatioHelper::fgkfHistNBinsPhi,        //     yRec |       phiRec
-                         AliEbyEPidRatioHelper::fgkfHistNBinsPt,   AliEbyEPidRatioHelper::fgkfHistNBinsSign,       //    ptRec |         sign
-                          4,  2,  77,4};                                                                                            //  contPart| DCArAccepted | DCAr
-
-  Double_t minHnDCA[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
-                         AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
-                         AliEbyEPidRatioHelper::fgkfHistRangePt[0],   AliEbyEPidRatioHelper::fgkfHistRangeSign[0], 
+  Int_t    binHnDCA[11] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent,4,
+                          AliEbyEPidRatioHelper::fgkfHistNBinsEta,       
+                          AliEbyEPidRatioHelper::fgkfHistNBinsRap,  
+                          AliEbyEPidRatioHelper::fgkfHistNBinsPhi,        
+                          AliEbyEPidRatioHelper::fgkfHistNBinsPt,   
+                          AliEbyEPidRatioHelper::fgkfHistNBinsSign,      
+                          4,  2,  77};      
+  
+  Double_t minHnDCA[11] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0],-0.5, 
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[0],   
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0], 
                           0.5, -0.5, -3.,-0.5};
   
-  Double_t maxHnDCA[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
-                         AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
-                         AliEbyEPidRatioHelper::fgkfHistRangePt[1],   AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 
+  Double_t maxHnDCA[11] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1],3.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[1],   
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 
                           4.5, 1.5, 3., 3.5};
 
 
-  fHnDCA = new THnSparseD("hnDCA", "cent:etaRec:yRec:phiRec:ptRec:sign:contPart:contSign:DCArAccepted:DCAr", 10, binHnDCA, minHnDCA, maxHnDCA);
+  fHnDCA = new THnSparseD("hnDCA", "cent:pid:etaRec:yRec:phiRec:ptRec:sign:contPart:contSign:DCArAccepted:DCAr", 11, binHnDCA, minHnDCA, maxHnDCA);
   
   fHnDCA->Sumw2();
+
   fHnDCA->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
-  fHnDCA->GetAxis(1)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
-  fHnDCA->GetAxis(2)->SetTitle("#it{y}_{Rec}");                 //  rapidity  [-0.5, 0.5]
-  fHnDCA->GetAxis(3)->SetTitle("#varphi_{Rec} (rad)");          //  phi  [ 0. , 2Pi]
-  fHnDCA->GetAxis(4)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})");  //  pT   [ 0.2, 2.6]
-  fHnDCA->GetAxis(5)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnDCA->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");   //  0 | 1 | 2 | 3 
+  fHnDCA->GetAxis(2)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
+  fHnDCA->GetAxis(3)->SetTitle("#it{y}_{Rec}");                 //  rapidity  [-0.5, 0.5]
+  fHnDCA->GetAxis(4)->SetTitle("#varphi_{Rec} (rad)");          //  phi  [ 0. , 2Pi]
+  fHnDCA->GetAxis(5)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})");  //  pT   [ 0.2, 2.6]
+  fHnDCA->GetAxis(6)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnDCA->GetAxis(7)->SetTitle("contPart");                     //  1  primary | 2 missId | 3 from WeakDecay | 4 p from Material
+  fHnDCA->GetAxis(8)->SetTitle("DCArAccepted");                 //  0 not accepted | 1 accepted 
+  fHnDCA->GetAxis(9)->SetTitle("DCAr");                         //  DCAr [-3, 3]
 
-  fHnDCA->GetAxis(6)->SetTitle("contPart");                     //  1  primary | 2 missId | 3 from WeakDecay | 4 p from Material
-  fHnDCA->GetAxis(7)->SetTitle("DCArAccepted");                 //  0 not accepted | 1 accepted 
-  fHnDCA->GetAxis(8)->SetTitle("DCAr");                         //  DCAr [-3, 3]
-  fHnDCA->GetAxis(9)->SetTitle("PID");                          //  0 | 1 | 2 | 3
 
   fHelper->BinLogAxis(fHnDCA,  4, fESDTrackCuts);
   fHelper->BinLogAxis(fHnDCA,  4, fESDTrackCutsBkg);
 
   // -- Set binning for DCAr
   Double_t binsDCAr[77] = {-3.,-2.85,-2.7,-2.55,-2.4,-2.25,-2.1,-1.95,-1.8,-1.65,-1.5,-1.35,-1.2,-1.05,-0.9,-0.75,-0.6,-0.45,-0.3,-0.285,-0.27,-0.255,-0.24,-0.225,-0.21,-0.195,-0.18,-0.165,-0.15,-0.135,-0.12,-0.105,-0.09,-0.075,-0.06,-0.045,-0.03,-0.015,0.,0.015,0.03,0.045,0.06,0.075,0.09,0.105,0.12,0.135,0.15,0.165,0.18,0.195,0.21,0.225,0.24,0.255,0.27,0.285,0.3,0.45,0.6,0.75,0.9,1.05,1.2,1.35,1.5,1.65,1.8,1.95,2.1,2.25,2.4,2.55,2.7,2.85,3.};
-  fHnDCA->GetAxis(8)->Set(76, binsDCAr);
+  fHnDCA->GetAxis(9)->Set(76, binsDCAr);
 
   // ------------------------------------------------------------------
   
index 5a72f64..6ccbd78 100644 (file)
@@ -44,8 +44,10 @@ ClassImp(AliEbyEPidRatioEffCont)
 AliEbyEPidRatioEffCont::AliEbyEPidRatioEffCont() :
   AliEbyEPidRatioBase("EffCont", "EffCont"),
   fLabelsRec(NULL),
-  fHnEff(NULL),
-  fHnCont(NULL) {
+  fHnEffMc(NULL),
+  fHnContMc(NULL),
+  fHnEffRec(NULL),
+  fHnContRec(NULL) {
   // Constructor   
 
   AliLog::SetClassDebugLevel("AliEbyEPidRatioEffCont",10);
@@ -93,70 +95,79 @@ void AliEbyEPidRatioEffCont::Init() {
 //________________________________________________________________________
 void AliEbyEPidRatioEffCont::CreateHistograms() {
   // Copied from NetParticle class
-  Int_t    binHnEff[20] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent,    AliEbyEPidRatioHelper::fgkfHistNBinsEta,       //     cent |     etaMC
-                          AliEbyEPidRatioHelper::fgkfHistNBinsRap,     AliEbyEPidRatioHelper::fgkfHistNBinsPhi,       //      yMC |     phiMC
-                          AliEbyEPidRatioHelper::fgkfHistNBinsPt,      AliEbyEPidRatioHelper::fgkfHistNBinsSign,      //     ptMC |    signMC
-                          2,      2  ,      2  ,                                                                                    // findable | recStatus  | pidStatus
-                          AliEbyEPidRatioHelper::fgkfHistNBinsEta,     AliEbyEPidRatioHelper::fgkfHistNBinsRap,       //   etaRec |      yRec
-                          AliEbyEPidRatioHelper::fgkfHistNBinsPhi,     AliEbyEPidRatioHelper::fgkfHistNBinsPt,        //   phiRec |     ptRec
-                          AliEbyEPidRatioHelper::fgkfHistNBinsSign,                                                          //  signRec
-                          AliEbyEPidRatioHelper::fgkfHistNBinsEta,     AliEbyEPidRatioHelper::fgkfHistNBinsRap,       // deltaEta | deltaY
-                          2*AliEbyEPidRatioHelper::fgkfHistNBinsPhi+1, 2*AliEbyEPidRatioHelper::fgkfHistNBinsPt+1,    // deltaPhi | deltaPt
-                          AliEbyEPidRatioHelper::fgkfHistNBinsSign+2, 4};                                                       // deltaSign
+  Int_t    binHnEff[10] = { AliEbyEPidRatioHelper::fgkfHistNBinsCent, 4,   
+                           AliEbyEPidRatioHelper::fgkfHistNBinsSign, 2,      2  ,      2  ,                       
+                           AliEbyEPidRatioHelper::fgkfHistNBinsEta,     
+                           AliEbyEPidRatioHelper::fgkfHistNBinsRap,     
+                           AliEbyEPidRatioHelper::fgkfHistNBinsPhi,     
+                           AliEbyEPidRatioHelper::fgkfHistNBinsPt};
+  
+  Double_t minHnEff[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], -0.5, 
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0], -0.5, -0.5, -0.5,  
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[0]};
+
+
+  Double_t maxHnEff[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], 3.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 1.5,      1.5,      1.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1],  
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[1]};
+  
+  fHnEffMc    = new THnSparseF("hnEffMc", "cent:pid:SignMC:findable:recStatus:pidStatus:etaMC:yMC:phiMC:ptMC", 10, binHnEff, minHnEff, maxHnEff);
+  fHnEffRec   = new THnSparseF("hnEffRec", "cent:pid:SignMC:findable:recStatus:pidStatus:etaRec:yRec:phiRec:ptRec", 10, binHnEff, minHnEff, maxHnEff);
+  //fHnEffRecMc = new THnSparseF("hnEffRecMMc", "cent:pid:SignMC:findable:recStatus:pidStatus:deltaEta:deltaY:deltaPhi:deltaPt" 10, binHnEff, minHnEff, maxHnEff);
+
+  fHnEffMc->Sumw2();    
+  fHnEffRec->Sumw2();    
+  
+
+  fHnEffMc->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnEffMc->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+  fHnEffMc->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnEffMc->GetAxis(3)->SetTitle("findable");                     //  0 not findable      |  1 findable
+  fHnEffMc->GetAxis(4)->SetTitle("recStatus");                    //  0 not reconstructed |  1 reconstructed
+  fHnEffMc->GetAxis(5)->SetTitle("recPid");                       //  0 not accepted      |  1 accepted
+  fHnEffMc->GetAxis(6)->SetTitle("#eta_{MC}");                    //  eta  [-0.9, 0.9]
+  fHnEffMc->GetAxis(7)->SetTitle("#it{y}_{MC}");                  //  rapidity  [-0.5, 0.5]
+  fHnEffMc->GetAxis(8)->SetTitle("#varphi_{MC} (rad)");           //  phi  [ 0. , 2Pi]
+  fHnEffMc->GetAxis(9)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})");   //  pT   [ 0.2, 2.3]
+  
+
+  fHnEffRec->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnEffRec->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+  fHnEffRec->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnEffRec->GetAxis(3)->SetTitle("findable");                     //  0 not findable      |  1 findable
+  fHnEffRec->GetAxis(4)->SetTitle("recStatus");                    //  0 not reconstructed |  1 reconstructed
+  fHnEffRec->GetAxis(5)->SetTitle("recPid");                       //  0 not accepted      |  1 accepted
+  fHnEffRec->GetAxis(6)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
+  fHnEffRec->GetAxis(7)->SetTitle("#it{y}_{Rec}");                 //  rapidity  [-0.5, 0.5]
+  fHnEffRec->GetAxis(8)->SetTitle("#varphi_{Rec} (rad)");          //  phi  [ 0. , 2Pi]
+  fHnEffRec->GetAxis(9)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})");  //  pt   [ 0.2, 2.3]
 
+  // fHnEff->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  // fHnEff->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+  // fHnEff->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1 
+  // fHnEff->GetAxis(3)->SetTitle("findable");                     //  0 not findable      |  1 findable
+  // fHnEff->GetAxis(4)->SetTitle("recStatus");                    //  0 not reconstructed |  1 reconstructed
+  // fHnEff->GetAxis(5)->SetTitle("recPid");                       //  0 not accepted      |  1 accepted
+  // fHnEff->GetAxis(6)->SetTitle("#eta_{MC}-#eta_{Rec}");                      //  eta  [-0.9, 0.9]
+  // fHnEff->GetAxis(7)->SetTitle("#it{y}_{MC}-#it{y}_{Rec}");                  //  rapidity  [-0.5, 0.5]
+  // fHnEff->GetAxis(8)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)");          //  phi  [ -2Pi , 2Pi]
+  // fHnEff->GetAxis(9)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ -2.3, 2.3]
+  //  fHnEff->GetAxis(10)->SetTitle("sign_{MC}-sign_{Rec}");                      //  -2 | 0 | +2 
   
-  Double_t minHnEff[20] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
-                          AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
-                          AliEbyEPidRatioHelper::fgkfHistRangePt[0],   AliEbyEPidRatioHelper::fgkfHistRangeSign[0], 
-                          -0.5,     -0.5,     -0.5,
-                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0],  AliEbyEPidRatioHelper::fgkfHistRangeRap[0], 
-                          AliEbyEPidRatioHelper::fgkfHistRangePhi[0],  AliEbyEPidRatioHelper::fgkfHistRangePt[0],
-                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0],
-                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0],  AliEbyEPidRatioHelper::fgkfHistRangeRap[0], 
-                          -1.*AliEbyEPidRatioHelper::fgkfHistRangePhi[1], -1.*AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0]-1., -0.5};
-
-  Double_t maxHnEff[20] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
-                          AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
-                          AliEbyEPidRatioHelper::fgkfHistRangePt[1],   AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 
-                          1.5,      1.5,      1.5,
-                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1],  AliEbyEPidRatioHelper::fgkfHistRangeRap[1], 
-                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1],  AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1],
-                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1],  AliEbyEPidRatioHelper::fgkfHistRangeRap[1], 
-                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1],  AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1]+1., 3.5};
-
-  fHnEff = new THnSparseF("hnEff", "cent:etaMC:yMC:phiMC:ptMC:signMC:findable:recStatus:pidStatus:etaRec:yRec:phiRec:ptRec:signRec:deltaEta:deltaY:deltaPhi:deltaPt:deltaSign:PID", 
-                         20, binHnEff, minHnEff, maxHnEff);
-  fHnEff->Sumw2();    
-
-  fHnEff->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
-  fHnEff->GetAxis(1)->SetTitle("#eta_{MC}");                    //  eta  [-0.9, 0.9]
-  fHnEff->GetAxis(2)->SetTitle("#it{y}_{MC}");                  //  rapidity  [-0.5, 0.5]
-  fHnEff->GetAxis(3)->SetTitle("#varphi_{MC} (rad)");           //  phi  [ 0. , 2Pi]
-  fHnEff->GetAxis(4)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})");   //  pT   [ 0.2, 2.3]
   
-  fHnEff->GetAxis(5)->SetTitle("sign");                         //  -1 | 0 | +1 
-  fHnEff->GetAxis(6)->SetTitle("findable");                     //  0 not findable      |  1 findable
-  fHnEff->GetAxis(7)->SetTitle("recStatus");                    //  0 not reconstructed |  1 reconstructed
-  fHnEff->GetAxis(8)->SetTitle("recPid");                       //  0 not accepted      |  1 accepted
-
-  fHnEff->GetAxis(9)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
-  fHnEff->GetAxis(10)->SetTitle("#it{y}_{Rec}");                //  rapidity  [-0.5, 0.5]
-  fHnEff->GetAxis(11)->SetTitle("#varphi_{Rec} (rad)");         //  phi  [ 0. , 2Pi]
-  fHnEff->GetAxis(12)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ 0.2, 2.3]
-  fHnEff->GetAxis(13)->SetTitle("sign");                        //  -1 | 0 | +1 
-
-  fHnEff->GetAxis(14)->SetTitle("#eta_{MC}-#eta_{Rec}");                      //  eta  [-0.9, 0.9]
-  fHnEff->GetAxis(15)->SetTitle("#it{y}_{MC}-#it{y}_{Rec}");                  //  rapidity  [-0.5, 0.5]
-  fHnEff->GetAxis(16)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)");          //  phi  [ -2Pi , 2Pi]
-  fHnEff->GetAxis(17)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ -2.3, 2.3]
-  fHnEff->GetAxis(18)->SetTitle("sign_{MC}-sign_{Rec}");                      //  -2 | 0 | +2 
-  fHnEff->GetAxis(19)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
-
-  fHelper->BinLogAxis(fHnEff,  4);
-  fHelper->BinLogAxis(fHnEff, 12);
+
+  fHelper->BinLogAxis(fHnEffMc,  7);
+  fHelper->BinLogAxis(fHnEffMc, 9);
+  fHelper->BinLogAxis(fHnEffRec,  7);
+  fHelper->BinLogAxis(fHnEffRec, 9);
 
   /* 
      >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Copied from NetParticle
@@ -176,68 +187,62 @@ void AliEbyEPidRatioEffCont::CreateHistograms() {
   // -- Create THnSparse - Cont
   // ------------------------------------------------------------------
 
-  Int_t    binHnCont[18] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, AliEbyEPidRatioHelper::fgkfHistNBinsEta,       //     cent |    etaMC
-                           AliEbyEPidRatioHelper::fgkfHistNBinsRap,  AliEbyEPidRatioHelper::fgkfHistNBinsPhi,       //      yMC |    phiMC
-                           AliEbyEPidRatioHelper::fgkfHistNBinsPt,   AliEbyEPidRatioHelper::fgkfHistNBinsSign,      //     ptMC |   signMC=contSign
-                           8,                                                                                                     // contPart | 
-                           AliEbyEPidRatioHelper::fgkfHistNBinsEta,  AliEbyEPidRatioHelper::fgkfHistNBinsRap,       //   etaRec |     yRec
-                           AliEbyEPidRatioHelper::fgkfHistNBinsPhi,  AliEbyEPidRatioHelper::fgkfHistNBinsPt,        //   phiRec |    ptRec
-                           AliEbyEPidRatioHelper::fgkfHistNBinsSign,                                                       //  signRec  
-                           AliEbyEPidRatioHelper::fgkfHistNBinsEta,     AliEbyEPidRatioHelper::fgkfHistNBinsRap,    // deltaEta | deltaY
-                           2*AliEbyEPidRatioHelper::fgkfHistNBinsPhi+1, 2*AliEbyEPidRatioHelper::fgkfHistNBinsPt+1, // deltaPhi | deltaPt
-                           AliEbyEPidRatioHelper::fgkfHistNBinsSign+2, 4};                                          // deltaSign| pid 0-3
+  Int_t    binHnCont[8] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, 4, 
+                          AliEbyEPidRatioHelper::fgkfHistNBinsSign, 8,   
+                          AliEbyEPidRatioHelper::fgkfHistNBinsEta,     
+                          AliEbyEPidRatioHelper::fgkfHistNBinsRap,  
+                          AliEbyEPidRatioHelper::fgkfHistNBinsPhi,     
+                          AliEbyEPidRatioHelper::fgkfHistNBinsPt};   
   
-  Double_t minHnCont[18] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
-                           AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
-                           AliEbyEPidRatioHelper::fgkfHistRangePt[0],   AliEbyEPidRatioHelper::fgkfHistRangeSign[0], 
-                           0.5,                                            
-                           AliEbyEPidRatioHelper::fgkfHistRangeEta[0],  AliEbyEPidRatioHelper::fgkfHistRangeRap[0], 
-                           AliEbyEPidRatioHelper::fgkfHistRangePhi[0],  AliEbyEPidRatioHelper::fgkfHistRangePt[0],
-                           AliEbyEPidRatioHelper::fgkfHistRangeSign[0],
-                           AliEbyEPidRatioHelper::fgkfHistRangeEta[0],  AliEbyEPidRatioHelper::fgkfHistRangeRap[0], 
-                           -1.*AliEbyEPidRatioHelper::fgkfHistRangePhi[1], -1.*AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                           AliEbyEPidRatioHelper::fgkfHistRangeSign[0]-1., -0.5};
-
+  Double_t minHnCont[8] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], -0.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0],  0.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[0]};   
+  
+  Double_t maxHnCont[8] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], 3.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 8.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[1]};   
+  
+  fHnContMc  = new THnSparseF("hnContMc", "cent:pid:SignMC:contPart:etaMC:yMC:phiMC:ptMC",8, binHnCont, minHnCont, maxHnCont);
+  fHnContRec = new THnSparseF("hnContRec", "cent:pid:SignRec:contPart:etaRec:yRec:phiRec:ptRec",8, binHnCont, minHnCont, maxHnCont);
+
+  fHnContMc->Sumw2();    
+  fHnContRec->Sumw2();    
+
+  fHnContMc->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnContMc->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+  fHnContMc->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1  
+  fHnContMc->GetAxis(3)->SetTitle("contPart");                     //  1 pi | 2 K | 3 p | 4 e | 5 mu | 6 other | 7 p from WeakDecay | 8 p from Material
+  fHnContMc->GetAxis(4)->SetTitle("#eta_{MC}");                    //  eta  [-0.9,0.9]
+  fHnContMc->GetAxis(5)->SetTitle("#it{y}_{MC}");                  //  rapidity  [-0.5, 0.5]
+  fHnContMc->GetAxis(6)->SetTitle("#varphi_{MC} (rad)");           //  phi  [ 0. ,2Pi]
+  fHnContMc->GetAxis(7)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})");   //  pT   [ 0.2,2.3]
   
-  Double_t maxHnCont[18] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
-                           AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
-                           AliEbyEPidRatioHelper::fgkfHistRangePt[1],   AliEbyEPidRatioHelper::fgkfHistRangeSign[1],
-                           8.5,                        
-                           AliEbyEPidRatioHelper::fgkfHistRangeEta[1],  AliEbyEPidRatioHelper::fgkfHistRangeRap[1], 
-                           AliEbyEPidRatioHelper::fgkfHistRangePhi[1],  AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                           AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 
-                           AliEbyEPidRatioHelper::fgkfHistRangeEta[1],  AliEbyEPidRatioHelper::fgkfHistRangeRap[1], 
-                           AliEbyEPidRatioHelper::fgkfHistRangePhi[1],  AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                           AliEbyEPidRatioHelper::fgkfHistRangeSign[1]+1., 3.5};
-
-  fHnCont = new THnSparseF("hnCont", "cent:etaMC:yMC:phiMC:ptMC:signMC:contPart:etaRec:yRec:phiRec:ptRec:signRec:deltaEta:deltaY:deltaPhi:deltaPt:deltaSign:PID",
-                          18, binHnCont, minHnCont, maxHnCont);
-  fHnCont->Sumw2();    
-
-  fHnCont->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
-  fHnCont->GetAxis(1)->SetTitle("#eta_{MC}");                    //  eta  [-0.9,0.9]
-  fHnCont->GetAxis(2)->SetTitle("#it{y}_{MC}");                  //  rapidity  [-0.5, 0.5]
-  fHnCont->GetAxis(3)->SetTitle("#varphi_{MC} (rad)");           //  phi  [ 0. ,2Pi]
-  fHnCont->GetAxis(4)->SetTitle("#it{p}_{T,MC} (GeV/#it{c})");   //  pT   [ 0.2,2.3]
-  fHnCont->GetAxis(5)->SetTitle("sign");                         //  -1 | 0 | +1 
   
-  fHnCont->GetAxis(6)->SetTitle("contPart");                     //  1 pi | 2 K | 3 p | 4 e | 5 mu | 6 other | 7 p from WeakDecay | 8 p from Material
+  fHnContRec->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnContRec->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+  fHnContRec->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1  
+  fHnContRec->GetAxis(3)->SetTitle("contPart");                     //  1 pi | 2 K | 3 p | 4 e | 5 mu | 6 other | 7 p from WeakDecay | 8 p from Material
+  fHnContRec->GetAxis(4)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
+  fHnContRec->GetAxis(5)->SetTitle("#it{y}_{Rec}");                 //  rapidity  [-0.5, 0.5]
+  fHnContRec->GetAxis(6)->SetTitle("#varphi_{Rec} (rad)");          //  phi  [ 0. , 2Pi]
+  fHnContRec->GetAxis(7)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ 0.2, 2.3]
  
-  fHnCont->GetAxis(7)->SetTitle("#eta_{Rec}");                   //  eta  [-0.9, 0.9]
-  fHnCont->GetAxis(8)->SetTitle("#it{y}_{Rec}");                 //  rapidity  [-0.5, 0.5]
-  fHnCont->GetAxis(9)->SetTitle("#varphi_{Rec} (rad)");          //  phi  [ 0. , 2Pi]
-  fHnCont->GetAxis(10)->SetTitle("#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ 0.2, 2.3]
-  fHnCont->GetAxis(11)->SetTitle("sign");                        //  -1 | 0 | +1 
-
-  fHnCont->GetAxis(12)->SetTitle("#eta_{MC}-#eta_{Rec}");                      //  eta  [-0.9, 0.9]
-  fHnCont->GetAxis(13)->SetTitle("#it{y}_{MC}-#it{y}_{Rec}");                  //  rapidity  [-0.5, 0.5]
-  fHnCont->GetAxis(14)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)");          //  phi  [ -2Pi , 2Pi]
-  fHnCont->GetAxis(15)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ -2.3, 2.3]
-  fHnCont->GetAxis(16)->SetTitle("sign_{MC}-sign_{Rec}");                      //  -2 | 0 | +2 
-  fHnCont->GetAxis(17)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
-
-  fHelper->BinLogAxis(fHnCont,  4);
-  fHelper->BinLogAxis(fHnCont, 10);
+
+  //  fHnCont->GetAxis(12)->SetTitle("#eta_{MC}-#eta_{Rec}");                      //  eta  [-0.9, 0.9]
+  // fHnCont->GetAxis(13)->SetTitle("#it{y}_{MC}-#it{y}_{Rec}");                  //  rapidity  [-0.5, 0.5]
+  // fHnCont->GetAxis(14)->SetTitle("#varphi_{MC}-#varphi_{Rec} (rad)");          //  phi  [ -2Pi , 2Pi]
+  // fHnCont->GetAxis(15)->SetTitle("#it{p}_{T,MC}-#it{p}_{T,Rec} (GeV/#it{c})"); //  pt   [ -2.3, 2.3]
+  // fHnCont->GetAxis(16)->SetTitle("sign_{MC}-sign_{Rec}");                      //  -2 | 0 | +2 
+  // fHnCont->GetAxis(17)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");                //  0 | 1 | 2 | 3
+
+  // fHelper->BinLogAxis(fHnCont,  4);
+  // fHelper->BinLogAxis(fHnCont, 10);
 
   return;
 }
@@ -410,25 +415,10 @@ void AliEbyEPidRatioEffCont::CheckContTrack(AliVTrack *track, Int_t iPid, Int_t
       deltaPhi -= TMath::TwoPi();
   }
 
-    Double_t hnCont[18] = {fCentralityBin, 
-                          particle->Eta(), 
-                          particle->Y(), 
-                          particle->Phi(), 
-                          particle->Pt(), 
-                          signMC, 
-                          contPart, 
-                          track->Eta(), 
-                          yRec, 
-                          track->Phi(), 
-                          track->Pt(), 
-                          signRec,
-                          particle->Eta()-track->Eta(), 
-                          particle->Y()-yRec, 
-                          deltaPhi, 
-                          particle->Pt()-track->Pt(), 
-                          signMC-signRec, 
-                          iPid};
-    fHnCont->Fill(hnCont);
+  Double_t hnContMc[8]  = {fCentralityBin,iPid,signMC,contPart,particle->Eta(),particle->Y(),particle->Phi(),particle->Pt()};
+  Double_t hnContRec[8] = {fCentralityBin,iPid,signRec,contPart, track->Eta(),yRec,track->Phi(),track->Pt()};
+  fHnContMc->Fill(hnContMc);
+  fHnContRec->Fill(hnContRec);
    
 }
 
@@ -524,51 +514,17 @@ void AliEbyEPidRatioEffCont::FillMCEffHist() {
     }
     
     if(iPid != 0) {
-      Double_t hnEff[20] = {fCentralityBin, 
-                           particle->Eta(), 
-                           particle->Y(), 
-                           particle->Phi(), 
-                           particle->Pt(), 
-                           signMC, 
-                           findable, 
-                           recStatus, 
-                           recPid, 
-                           etaRec, 
-                           yRec, 
-                           phiRec, 
-                           ptRec, 
-                           signRec,
-                           particle->Eta()-etaRec, 
-                           particle->Y()-yRec, 
-                           deltaPhi, 
-                           particle->Pt()-ptRec, 
-                           signMC-signRec, 
-                           0};
-      fHnEff->Fill(hnEff);
+      Double_t hnEffMc[10]  = {fCentralityBin,0,signMC,findable, recStatus,recPid,particle->Eta(), particle->Y(), particle->Phi(),particle->Pt()};
+      Double_t hnEffRec[10] = {fCentralityBin,0,signRec,findable, recStatus,recPid,etaRec, yRec, phiRec, ptRec};
+      fHnEffMc->Fill(hnEffMc);
+      fHnEffRec->Fill(hnEffRec);
     }
+    Double_t hnEffMc[10]  = {fCentralityBin,iPid,signMC,findable, recStatus,recPid,particle->Eta(), particle->Y(), particle->Phi(),particle->Pt()};
+    Double_t hnEffRec[10] = {fCentralityBin,iPid,signRec,findable, recStatus,recPid,etaRec, yRec, phiRec, ptRec};
+    fHnEffMc->Fill(hnEffMc);
+    fHnEffRec->Fill(hnEffRec);
     
-    Double_t hnEff[20] = {fCentralityBin, 
-                         particle->Eta(), 
-                         particle->Y(), 
-                         particle->Phi(), 
-                         particle->Pt(), 
-                         signMC, 
-                         findable, 
-                         recStatus, 
-                         recPid, 
-                         etaRec, 
-                         yRec, 
-                         phiRec, 
-                         ptRec, 
-                         signRec,
-                         particle->Eta()-etaRec, 
-                         particle->Y()-yRec, 
-                         deltaPhi, 
-                         particle->Pt()-ptRec, 
-                         signMC-signRec, 
-                         iPid};
-    fHnEff->Fill(hnEff);
-
+   
 
   } // for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {
   
index 9d2cf6d..56a4f12 100644 (file)
@@ -26,8 +26,10 @@ class AliEbyEPidRatioEffCont: public AliEbyEPidRatioBase {
   AliEbyEPidRatioEffCont();
   virtual ~AliEbyEPidRatioEffCont();
   virtual void Process();
-  THnSparseF* GetHnEff()  {return fHnEff;}
-  THnSparseF* GetHnCont() {return fHnCont;}
+  THnSparseF* GetHnEffMc()  {return fHnEffMc;}
+  THnSparseF* GetHnContMc() {return fHnContMc;}
+  THnSparseF* GetHnEffRec()  {return fHnEffRec;}
+  THnSparseF* GetHnContRec() {return fHnContRec;}
 
  private:
 
@@ -44,8 +46,10 @@ class AliEbyEPidRatioEffCont: public AliEbyEPidRatioBase {
   void CheckContTrack(AliVTrack* track, Int_t iPid, Int_t gPdgCode);
     
   Int_t            ***fLabelsRec;             //! 2x nTracks large array with labels for MC particles
-  THnSparseF         *fHnEff;                 //  THnSparseF efficiency 
-  THnSparseF         *fHnCont;                //  THnSparseF contamination
+  THnSparseF         *fHnEffMc;                 //  THnSparseF efficiency 
+  THnSparseF         *fHnContMc;                //  THnSparseF contamination
+  THnSparseF         *fHnEffRec;                 //  THnSparseF efficiency 
+  THnSparseF         *fHnContRec;                //  THnSparseF contamination
   
   ClassDef(AliEbyEPidRatioEffCont, 1);
 };
index 431a5aa..4a25a81 100644 (file)
@@ -90,13 +90,14 @@ AliEbyEPidRatioHelper::AliEbyEPidRatioHelper() :
   fHCentralityStat(NULL),
   fNCentralityBins(11),
   
-  fRandom(NULL) {
+  fRandom(NULL),
+  fIsRatio(kFALSE) {
   // Constructor   
   
   AliLog::SetClassDebugLevel("AliEbyEPidRatioHelper",10);
 }
 
-const Float_t AliEbyEPidRatioHelper::fgkfHistBinWitdthRap = 0.075;
+const Float_t AliEbyEPidRatioHelper::fgkfHistBinWitdthRap = 0.1;
 const Float_t AliEbyEPidRatioHelper::fgkfHistBinWitdthPt  = 0.3; // 0.08 // 300 MeV  // was 80 MeV
 
 const Float_t AliEbyEPidRatioHelper::fgkfHistRangeCent[]  = {-0.5, 10.5};
@@ -107,11 +108,11 @@ const Int_t   AliEbyEPidRatioHelper::fgkfHistNBinsEta     = Int_t((AliEbyEPidRat
                                                                   AliEbyEPidRatioHelper::fgkfHistRangeEta[0]) / 
                                                                  AliEbyEPidRatioHelper::fgkfHistBinWitdthRap) +1;
 
-const Float_t AliEbyEPidRatioHelper::fgkfHistRangeRap[]   = {-0.9, 0.9};
+const Float_t AliEbyEPidRatioHelper::fgkfHistRangeRap[]   = {-0.8, 0.8};
 const Int_t   AliEbyEPidRatioHelper::fgkfHistNBinsRap     = Int_t((AliEbyEPidRatioHelper::fgkfHistRangeRap[1] - AliEbyEPidRatioHelper::fgkfHistRangeRap[0]) / AliEbyEPidRatioHelper::fgkfHistBinWitdthRap) +1;
 
 const Float_t AliEbyEPidRatioHelper::fgkfHistRangePhi[]   = {0.0, TMath::TwoPi()};
-const Int_t   AliEbyEPidRatioHelper::fgkfHistNBinsPhi     = 42 ;
+const Int_t   AliEbyEPidRatioHelper::fgkfHistNBinsPhi     = 21 ;
 
 const Float_t AliEbyEPidRatioHelper::fgkfHistRangePt[]    = {0.2, 2.9}; // {0.2, 5.}; // was {0.3, 2.22}
 const Int_t   AliEbyEPidRatioHelper::fgkfHistNBinsPt      = Int_t((AliEbyEPidRatioHelper::fgkfHistRangePt[1] - AliEbyEPidRatioHelper::fgkfHistRangePt[0]) / AliEbyEPidRatioHelper::fgkfHistBinWitdthPt); 
@@ -175,7 +176,7 @@ void AliEbyEPidRatioHelper::SetPhiRange(Float_t f1, Float_t f2) {
 
 
 //________________________________________________________________________
-Int_t AliEbyEPidRatioHelper::Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Int_t trackCutBit, Int_t modeDistCreation) {
+Int_t AliEbyEPidRatioHelper::Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Bool_t isRatio, Int_t trackCutBit, Int_t modeDistCreation) {
   // -- Initialize helper
 
   Int_t iResult = 0;
@@ -185,6 +186,7 @@ Int_t AliEbyEPidRatioHelper::Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Int_
 
   // -- Is MC
   fIsMC             = isMC;
+  fIsRatio          = isRatio;
 
   // -- AOD track filter bit
   fAODtrackCutBit   = trackCutBit;
index ae11a3b..2d8a724 100644 (file)
@@ -52,7 +52,7 @@ class AliEbyEPidRatioHelper : public TNamed {
   void SetNSigmaMaxTOF(Float_t f)              {fNSigmaMaxTOF        = f;}
   void SetMinPtForTOFRequired(Float_t f)       {fMinPtForTOFRequired = f;}
   void SetMaxPtForTPClow(Float_t f)            {fMaxPtForTPClow      = f;}
-   
+     
   void SetPhiRange(Float_t f1, Float_t f2);
 
   TH1F*    GetHEventStat0()                    {return fHEventStat0;}
@@ -69,12 +69,13 @@ class AliEbyEPidRatioHelper : public TNamed {
   Float_t  GetPhiMax()                         {return fPhiMax;}
   AliESDtrackCuts* GetESDTrackCuts()           {return fESDTrackCuts;}
   Bool_t           GetIsMC()                   {return fIsMC;}
+  Bool_t           GetIsRatio()                {return fIsRatio;}
   Int_t            GetAODtrackCutBit()         {return fAODtrackCutBit;}
   AliInputEventHandler* GetInputEventHandler() {return fInputEventHandler;}
   AliMCEvent*           GetMCEvent()           {return fMCEvent;}
  
   /** Initialize Helper */
-  Int_t Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Int_t trackCutBit, Int_t modeDistCreation);
+  Int_t Initialize(AliESDtrackCuts *cuts, Bool_t isMC, Bool_t isRatio, Int_t trackCutBit, Int_t modeDistCreation);
 
   /** Setup Event */
   Int_t SetupEvent(AliESDInputHandler *esdHandler, AliAODInputHandler *aodHandler, AliMCEvent *mcEvent);
@@ -114,7 +115,8 @@ class AliEbyEPidRatioHelper : public TNamed {
 
   /** Check if trackis  accepted for Phi */
   Bool_t IsTrackAcceptedPhi(AliVTrack *track);
-  
+
   /** Method for the correct logarithmic binning of histograms 
    *  and Update MinPtForTOFRequired, using the pT log-scale 
    */
@@ -190,6 +192,8 @@ class AliEbyEPidRatioHelper : public TNamed {
   TH1F                 *fHCentralityStat;          //  Centrality statistics
   Int_t                 fNCentralityBins;          //  N centrality bins used
   TRandom3             *fRandom;                   //  Random generator
+  Bool_t                fIsRatio;
+
 
   ClassDef(AliEbyEPidRatioHelper, 1);
 };
index cacdaba..03a7425 100644 (file)
@@ -138,6 +138,9 @@ void AliEbyEPidRatioPhy::CreateHistograms() {
   Float_t ptRange[2];
   fESDTrackCuts->GetPtRange(ptRange[0],ptRange[1]);
   TString sTitle("");
+
+ if (fIsRatio) AddHistSetRatio("Ratio",       Form("%s, #it{p}_{T} [%.1f,%.1f]", sTitle.Data(), ptRange[0], ptRange[1]));
+
   AddHistSetCent("Phy",       Form("%s, #it{p}_{T} [%.1f,%.1f]", sTitle.Data(), ptRange[0], ptRange[1]));
   //  AddHistSetCent("PhyTPC",    Form("%s, #it{p}_{T} [%.1f,%.1f]", sTitle.Data(), ptRange[0], fHelper->GetMinPtForTOFRequired()));
   // AddHistSetCent("PhyTOF",    Form("%s, #it{p}_{T} [%.1f,%.1f]", sTitle.Data(), fHelper->GetMinPtForTOFRequired(), ptRange[1]));
@@ -151,6 +154,8 @@ void AliEbyEPidRatioPhy::CreateHistograms() {
   if (fIsMC) {
     TString sMCTitle("");
   
+    if (fIsRatio) AddHistSetRatio("MCRatio",       Form("%s, #it{p}_{T} [%.1f,%.1f]", sTitle.Data(), ptRange[0], ptRange[1]));
+
     AddHistSetCent("MC",      Form("%s", sTitle.Data()));
     AddHistSetCent("MCpt",    Form("%s, #it{p}_{T} [%.1f,%.1f]", sMCTitle.Data(), ptRange[0], ptRange[1]));
     // AddHistSetCent("MCTPC",   Form("%s, #it{p}_{T} [%.1f,%.1f]", sMCTitle.Data(), ptRange[0], fHelper->GetMinPtForTOFRequired()));
@@ -246,7 +251,8 @@ Int_t AliEbyEPidRatioPhy::ProcessTracks() {
 #endif
   } // for (Int_t idxTrack = 0; idxTrack < fESD->GetNumberOfTracks(); ++idxTrack) {
  
-  FillHistSetCent("Phy",        0, kFALSE);
+FillHistSetCent("Phy",        0, kFALSE);
+if (fIsRatio) FillHistSetRatio("Ratio",        0, kFALSE);
 //  FillHistSetCent("PhyTPC",     1, kFALSE);
 //  FillHistSetCent("PhyTOF",     2, kFALSE);
  
@@ -349,12 +355,14 @@ Int_t AliEbyEPidRatioPhy::ProcessParticles() {
   } // for (Int_t idxMC = 0; idxMC < nPart; ++idxMC) {
   
   FillHistSetCent("MC",        0, kTRUE);
+  if (fIsRatio) FillHistSetRatio("MCRatio",     0, kTRUE);
   FillHistSetCent("MCpt",      1, kTRUE);
   //  FillHistSetCent("MCTPC",     2, kTRUE);
   // FillHistSetCent("MCTOF",     3, kTRUE);
 
 #if USE_PHI
   FillHistSetCent("MCphi",     2, kTRUE);
+  
   // FillHistSetCent("MCTPCphi",  5, kTRUE);
   // FillHistSetCent("MCTOFphi",  6, kTRUE);
 
@@ -467,6 +475,88 @@ void  AliEbyEPidRatioPhy::AddHistSetCent(const Char_t *name, const Char_t *title
   return;
 }
 
+
+
+//________________________________________________________________________
+void  AliEbyEPidRatioPhy::AddHistSetRatio(const Char_t *name, const Char_t *title)  {
+  TString sName(name);
+  TString sTitle(title);
+  Float_t etaRange[2];
+  fESDTrackCuts->GetEtaRange(etaRange[0],etaRange[1]);
+
+  //TList *list[4];
+  fOutList->Add(new TList);
+  TList *list =  static_cast<TList*>(fOutList->Last());
+  list->SetName(Form("f%s", name));
+  list->SetOwner(kTRUE);
+  
+
+  Int_t nBinsCent         =  AliEbyEPidRatioHelper::fgkfHistNBinsCent;
+  Double_t centBinRange[] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeCent[1]};
+
+  TString xyz = Form("|y| < %.1f",fHelper->GetRapidityMax()); 
+
+  list->Add(new TH2F(Form("fHistRatioKPi%s",name), 
+                    Form("(%s %s) : K/#pi;Centrality(11);K/#pi", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioKpPip%s",name), 
+                    Form("(%s %s) : K^{+}/#pi^{+};Centrality(11);K^{+}/#pi^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioKmPip%s",name), 
+                    Form("(%s %s) : K^{-}/#pi^{+};Centrality(11);K^{-}/#pi^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioKmPim%s",name), 
+                    Form("(%s %s) : K^{-}/#pi^{-};Centrality(11);K^{-}/#pi^{-}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+
+
+
+ list->Add(new TH2F(Form("fHistRatioPK%s",name), 
+                    Form("(%s %s) : P/K;Centrality(11);P/K", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPpKp%s",name), 
+                    Form("(%s %s) : P/K^{+};Centrality(11);P/K^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPmKp%s",name), 
+                    Form("(%s %s) : #bar{P}/K^{+};Centrality(11);#bar{P}/K^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPmKm%s",name), 
+                    Form("(%s %s) : #bar{P}/K^{-};Centrality(11);#bar{P}/K^{-}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+
+
+
+ list->Add(new TH2F(Form("fHistRatioPPi%s",name), 
+                    Form("(%s %s) : P/#pi;Centrality(11);K/#pi", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPpPip%s",name), 
+                    Form("(%s %s) : P/#pi^{+};Centrality(11);P/#pi^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPmPip%s",name), 
+                    Form("(%s %s) : #bar{P}/#pi^{+};Centrality(11);#bar{P}/#pi^{+}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+  
+  list->Add(new TH2F(Form("fHistRatioPmPim%s",name), 
+                    Form("(%s %s) : #bar{P}/#pi^{-};Centrality(11);#bar{P}/#pi^{-}", xyz.Data(), sTitle.Data()),
+                    nBinsCent, centBinRange[0], centBinRange[1], 2500,0,0.25));
+
+  
+  return;
+}
+
+
+
+
 //________________________________________________________________________
 void AliEbyEPidRatioPhy::FillHistSetCent(const Char_t *name, Int_t idx, Bool_t isMC)  {
   /*
@@ -589,5 +679,47 @@ void AliEbyEPidRatioPhy::FillHistSetCent(const Char_t *name, Int_t idx, Bool_t i
 }
 
 
+//________________________________________________________________________
+void AliEbyEPidRatioPhy::FillHistSetRatio(const Char_t *name, Int_t idx, Bool_t isMC)  {
+   
+  Int_t ***np = (isMC) ? fMCNp : fNp;
+  Float_t centralityBin = fHelper->GetCentralityBin();
+  
+  TList *list = static_cast<TList*>(fOutList->FindObject(Form("f%s",name)));
+    
+  Double_t KPi   = -1; if(np[idx][1][1]+np[idx][1][0] != 0 ) KPi = (np[idx][2][1]+np[idx][2][0])/(np[idx][1][1]+np[idx][1][0]);
+  Double_t KpPip = -1;
+  Double_t KmPip = -1;if (np[idx][1][1] != 0 ) { KpPip  = (np[idx][2][1])/(np[idx][1][1]); KmPip =  (np[idx][2][0])/(np[idx][1][1]); }
+  Double_t KmPim = -1;if (np[idx][1][0] != 0) KmPim = (np[idx][2][0])/(np[idx][1][0]);
+  
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKPi%s",name))))->Fill(centralityBin, KPi);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKpPip%s",name))))->Fill(centralityBin, KpPip);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPip%s",name))))->Fill(centralityBin, KmPip);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioKmPim%s",name))))->Fill(centralityBin, KmPim);
+
+  Double_t PK   = -1; if(np[idx][2][1]+np[idx][2][0] != 0 ) PK = (np[idx][3][1]+np[idx][3][0])/(np[idx][2][1]+np[idx][2][0]);
+  Double_t PpKp = -1;
+  Double_t PmKp = -1;if (np[idx][2][1] != 0 ) { PpKp  = (np[idx][3][1])/(np[idx][2][1]); PmKp =  (np[idx][3][0])/(np[idx][2][1]); }
+  Double_t PmKm = -1;if (np[idx][2][0] != 0) PmKm = (np[idx][3][0])/(np[idx][2][0]);
+
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPK%s",name))))->Fill(centralityBin, PK);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPpKp%s",name))))->Fill(centralityBin, PpKp);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmKp%s",name))))->Fill(centralityBin, PmKp);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmKm%s",name))))->Fill(centralityBin, PmKm);
+
+  Double_t PPi   = -1; if(np[idx][1][1]+np[idx][1][0] != 0 ) PPi = (np[idx][3][1]+np[idx][3][0])/(np[idx][1][1]+np[idx][1][0]);
+  Double_t PpPip = -1;
+  Double_t PmPip = -1;if (np[idx][1][1] != 0 ) { PpPip  = (np[idx][3][1])/(np[idx][1][1]); PmPip =  (np[idx][3][0])/(np[idx][1][1]); }
+  Double_t PmPim = -1;if (np[idx][1][0] != 0) PmPim = (np[idx][3][0])/(np[idx][1][0]);
+
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPPi%s",name))))->Fill(centralityBin, PPi);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPpPip%s",name))))->Fill(centralityBin, PpPip);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmPip%s",name))))->Fill(centralityBin, PmPip);
+  (static_cast<TProfile*>(list->FindObject(Form("fHistRatioPmPim%s",name))))->Fill(centralityBin, PmPim);
+  
+  return;
+}
+
+
 
 
index 4746aff..cabb63f 100644 (file)
@@ -38,6 +38,10 @@ class AliEbyEPidRatioPhy : public AliEbyEPidRatioBase {
   void ResetHistSet();
   void AddHistSetCent(const Char_t *name, const Char_t *title);
   void FillHistSetCent(const Char_t *name, Int_t idx, Bool_t isMC);
+
+  void AddHistSetRatio(const Char_t *name, const Char_t *title);
+  void FillHistSetRatio(const Char_t *name, Int_t idx, Bool_t isMC);
+  
   
   TList                *fOutList;               //! Output data container
   Int_t                 fOrder;                 //  Max order of higher order distributions
index 927c266..c563739 100644 (file)
@@ -52,7 +52,7 @@ ClassImp(AliEbyEPidRatioQA)
 AliEbyEPidRatioQA::AliEbyEPidRatioQA() :
   AliEbyEPidRatioBase("QA", "QA"),
 
-  fHnQA(NULL) {
+  fHnQAa(NULL), fHnQAb(NULL)  {
   // Constructor   
   
   AliLog::SetClassDebugLevel("AliEbyEPidRatioQA",10);
@@ -68,58 +68,80 @@ AliEbyEPidRatioQA::~AliEbyEPidRatioQA() {
 //________________________________________________________________________
 void AliEbyEPidRatioQA::CreateHistograms() {
  
-  Int_t    binHnQA[17] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, AliEbyEPidRatioHelper::fgkfHistNBinsEta,  //       cent |       eta
-                         AliEbyEPidRatioHelper::fgkfHistNBinsRap,  AliEbyEPidRatioHelper::fgkfHistNBinsPhi,  //          y |       phi
-                         AliEbyEPidRatioHelper::fgkfHistNBinsPt,   AliEbyEPidRatioHelper::fgkfHistNBinsPt,   //         pt |    pInner
-                         AliEbyEPidRatioHelper::fgkfHistNBinsSign, 500,                                      //       sign | TPCsignal |  
-                         50, 50, 50,                                                                         //  nSigmaITS | nSigmaTPC |  nSigmaTOF
-                         50, 50, 50, 50,                                                                     //  DCAr      |      DCAz | nSigmaDCAr | nSigmaDCAz 
-                         3,4};                                                                                 //  MCisProbe  
+  Int_t    binHnQAa[10] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, 4, 
+                         AliEbyEPidRatioHelper::fgkfHistNBinsSign, 
+                         AliEbyEPidRatioHelper::fgkfHistNBinsPt, 
+                         500, 50, 50, 50, 3};
+
+  Double_t minHnQAa[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0],-0.5,
+                         AliEbyEPidRatioHelper::fgkfHistRangeSign[0],
+                         AliEbyEPidRatioHelper::fgkfHistRangePt[0],
+                         30, -10,-10, -10, -0.5};
+
+  Double_t maxHnQAa[10] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], 3.5,
+                         AliEbyEPidRatioHelper::fgkfHistRangeSign[1],
+                         AliEbyEPidRatioHelper::fgkfHistRangePt[1], 
+                         500, 10., 10., 10., 2.5};
+
+  Int_t    binHnQAb[9] = {AliEbyEPidRatioHelper::fgkfHistNBinsCent, 4, 
+                         AliEbyEPidRatioHelper::fgkfHistNBinsSign, 
+                         AliEbyEPidRatioHelper::fgkfHistNBinsEta,  
+                         AliEbyEPidRatioHelper::fgkfHistNBinsRap,  
+                         AliEbyEPidRatioHelper::fgkfHistNBinsPhi,  
+                         AliEbyEPidRatioHelper::fgkfHistNBinsPt,   
+                         50, 50};
   
-  Double_t minHnQA[17] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0], AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
-                         AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
-                         AliEbyEPidRatioHelper::fgkfHistRangePt[0],   AliEbyEPidRatioHelper::fgkfHistRangePt[0],   
-                         AliEbyEPidRatioHelper::fgkfHistRangeSign[0], 30, 
-                         -10., -10., -10.,
-                         -10., -10., -10., -10., 
-                         -0.5,-0.5};
+  Double_t minHnQAb[9] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[0],-0.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[0],
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[0],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[0], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[0],   
+                         -10,-10};
   
-  Double_t maxHnQA[17] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
-                         AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
-                         AliEbyEPidRatioHelper::fgkfHistRangePt[1],   AliEbyEPidRatioHelper::fgkfHistRangePt[1],
-                         AliEbyEPidRatioHelper::fgkfHistRangeSign[1], 500,
-                         10., 10., 10.,
-                         10.,  10., 10., 10., 
-                         2.5,3.5};
+  Double_t maxHnQAb[9] = {AliEbyEPidRatioHelper::fgkfHistRangeCent[1], 3.5,
+                          AliEbyEPidRatioHelper::fgkfHistRangeSign[1],
+                          AliEbyEPidRatioHelper::fgkfHistRangeEta[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangeRap[1],  
+                          AliEbyEPidRatioHelper::fgkfHistRangePhi[1], 
+                          AliEbyEPidRatioHelper::fgkfHistRangePt[1],
+                          10., 10.};
   
-
-  fHnQA = new THnSparseF("hnQA", "cent:eta:y:phi:pt:pInner:sign:TPCsignal:nSigmaITS:nSigmaTPC:nSigmaTOF:DCAr:DCAz:nSigmaDCAr:nSigmaDCAz:MCisProbe:PID",
-                                17, binHnQA, minHnQA, maxHnQA);
-  
-  fHnQA->Sumw2();
-  
-  fHnQA->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
-  fHnQA->GetAxis(1)->SetTitle("#eta");                         //  eta  [-0.9, 0.9]
-  fHnQA->GetAxis(2)->SetTitle("#it{y}");                       //  rapidity [-0.5, 0.5]
-  fHnQA->GetAxis(3)->SetTitle("#varphi");                      //  phi  [ 0. , 2Pi]
-  fHnQA->GetAxis(4)->SetTitle("#it{p}_{T} (GeV/#it{c})");      //  pt   [ 0.46, 2.22]
-  fHnQA->GetAxis(5)->SetTitle("#it{p}_{Inner} (GeV/#it{c})");  //  pInner [ 0.1, 3.0]
-  fHnQA->GetAxis(6)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnQAa = new THnSparseF("hnQAPid", "cent:pid:sign:pt:pInner:TPCsignal:nSigmaITS:nSigmaTPC:nSigmaTOF:MCisProbe", 10, binHnQAa, minHnQAa, maxHnQAa);
+  fHnQAb = new THnSparseF("hnQADca", "cent:pid:sign:eta:y:phi:pt:DCAr:DCAz", 9, binHnQAb, minHnQAb, maxHnQAb);
+  fHnQAa->Sumw2();
+  fHnQAb->Sumw2();
   
-  fHnQA->GetAxis(7)->SetTitle("TPC signal");                   //  TPCsignal [30, 500]
-  fHnQA->GetAxis(8)->SetTitle("n #sigma ITS");                 //  nSigma ITS [-10, 10]
-  fHnQA->GetAxis(9)->SetTitle("n #sigma TPC");                 //  nSigma TPC [-10, 10]
-  fHnQA->GetAxis(10)->SetTitle("n #sigma TOF");                //  nSigma TOF [-10, 10]
+  fHnQAa->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnQAa->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");   //  0 | 1 | 2 | 3
+  fHnQAa->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnQAa->GetAxis(3)->SetTitle("#it{p}_{T} (GeV/#it{c})");      //  pt   [ 0.46, 2.22]
+  fHnQAa->GetAxis(4)->SetTitle("#it{p}_{Inner} (GeV/#it{c})");  //  pInner [ 0.1, 3.0]
+  fHnQAa->GetAxis(5)->SetTitle("TPC signal");                   //  TPCsignal [30, 500]
+  fHnQAa->GetAxis(6)->SetTitle("n #sigma ITS");                 //  nSigma ITS [-10, 10]
+  fHnQAa->GetAxis(7)->SetTitle("n #sigma TPC");                 //  nSigma TPC [-10, 10]
+  fHnQAa->GetAxis(8)->SetTitle("n #sigma TOF");                 //  nSigma TOF [-10, 10]
+  fHnQAa->GetAxis(9)->SetTitle("MCisProbe");                    //  0 | 1 (isProbeParticle) | 2 (isProbeParticle wrong sign) 
+
+  fHnQAb->GetAxis(0)->SetTitle("centrality");                   //  0-5|5-10|10-20|20-30|30-40|40-50|50-60|60-70|70-80|80-90 --> 10 bins
+  fHnQAb->GetAxis(1)->SetTitle("N_{ch}|N_{#pi}|N_{K}|N_{p}");   //  0 | 1 | 2 | 3
+  fHnQAb->GetAxis(2)->SetTitle("sign");                         //  -1 | 0 | +1 
+  fHnQAb->GetAxis(3)->SetTitle("#eta");                         //  eta  [-0.9, 0.9]
+  fHnQAb->GetAxis(4)->SetTitle("#it{y}");                       //  rapidity [-0.5, 0.5]
+  fHnQAb->GetAxis(5)->SetTitle("#varphi");                      //  phi  [ 0. , 2Pi]
+  fHnQAb->GetAxis(6)->SetTitle("#it{p}_{T} (GeV/#it{c})");      //  pt   [ 0.46, 2.22]
+  fHnQAb->GetAxis(7)->SetTitle("DCAr");                         //  DCAr [-10, 10]
+  fHnQAb->GetAxis(8)->SetTitle("DCAz");                         //  DCAz [-10, 10]
+  // fHnQA->GetAxis(9)->SetTitle("n #sigma #sqrt(Cdd)/DCAr");   //  nSigma DCAr [-10, 10]
+  // fHnQA->GetAxis(10)->SetTitle("n #sigma #sqrt(Czz)/DCAz");  //  nSigma DCAz [-10, 10]
   
-  fHnQA->GetAxis(11)->SetTitle("DCAr");                        //  DCAr [-10, 10]
-  fHnQA->GetAxis(12)->SetTitle("DCAz");                        //  DCAz [-10, 10]
-  fHnQA->GetAxis(13)->SetTitle("n #sigma #sqrt(Cdd)/DCAr");    //  nSigma DCAr [-10, 10]
-  fHnQA->GetAxis(14)->SetTitle("n #sigma #sqrt(Czz)/DCAz");    //  nSigma DCAz [-10, 10]
-  fHnQA->GetAxis(15)->SetTitle("MCisProbe");                   //  0 | 1 (isProbeParticle) | 2 (isProbeParticle wrong sign) 
-  fHnQA->GetAxis(16)->SetTitle("PID");                         //  0 | 1 | 2 | 3
+  fHelper->BinLogAxis(fHnQAa, 3);
+  fHelper->BinLogAxis(fHnQAa, 4);
+  fHelper->BinLogAxis(fHnQAb, 6);
+
+
   
-  fHelper->BinLogAxis(fHnQA, 4);
-  fHelper->BinLogAxis(fHnQA, 5);
+                        
 
   return;
 }
@@ -198,8 +220,8 @@ void AliEbyEPidRatioQA::Process() {
     if (fESD)
       (static_cast<AliESDtrack*>(track))->GetImpactParameters(dca,cov);
 
-    Float_t dcaRoverCdd = ( TMath::Sqrt(cov[0]) != 0. )  ? dca[0]/TMath::Sqrt(cov[0]) : -9.99;
-    Float_t dcaZoverCzz = ( TMath::Sqrt(cov[2]) != 0. )  ? dca[1]/TMath::Sqrt(cov[2]) : -9.99;
+    //  Float_t dcaRoverCdd = ( TMath::Sqrt(cov[0]) != 0. )  ? dca[0]/TMath::Sqrt(cov[0]) : -9.99;
+    //  Float_t dcaZoverCzz = ( TMath::Sqrt(cov[2]) != 0. )  ? dca[1]/TMath::Sqrt(cov[2]) : -9.99;
 
     if (iPid == 0)  
       yP = track->Eta();
@@ -208,50 +230,17 @@ void AliEbyEPidRatioQA::Process() {
     // cout << pid[0] << "  " << pid[1] << " " << pid[2] << yP << "  " << iPid << endl;
 
     if (iPid != 0) { 
-      Double_t aTrack[17] = {
-       Double_t(fCentralityBin),               //  0 centrality 
-       track->Eta(),                           //  1 eta
-       yP,                                     //  2 rapidity
-       track->Phi(),                           //  3 phi
-       track->Pt(),                            //  4 pt
-       track->GetTPCmomentum(),                //  5 pInner
-       track->Charge(),                        //  6 sign
-       track->GetTPCsignal(),                  //  7 TPC dE/dx
-       pid[0],                                 //  8 n Sigma ITS
-       pid[1],                                 //  9 n Sigma TPC
-       pid[2],                                 // 10 n Sigma TOF
-       dca[0],                                 // 11 dca r
-       dca[1],                                 // 12 dca z
-       dcaRoverCdd,                            // 13 sqrt(cov[dd])
-       dcaZoverCzz,                            // 14 sqrt(cov[zz])
-       isProbeParticle,                        // 15 isProbe
-       0                                    // 16 PID
-      };
-      
-      fHnQA->Fill(aTrack);
-    }
-    
-    Double_t aTrack[17] = {
-      Double_t(fCentralityBin),               //  0 centrality 
-      track->Eta(),                           //  1 eta
-      yP,                                     //  2 rapidity
-      track->Phi(),                           //  3 phi
-      track->Pt(),                            //  4 pt
-      track->GetTPCmomentum(),                //  5 pInner
-      track->Charge(),                        //  6 sign
-      track->GetTPCsignal(),                  //  7 TPC dE/dx
-      pid[0],                                 //  8 n Sigma ITS
-      pid[1],                                 //  9 n Sigma TPC
-      pid[2],                                 // 10 n Sigma TOF
-      dca[0],                                 // 11 dca r
-      dca[1],                                 // 12 dca z
-      dcaRoverCdd,                            // 13 sqrt(cov[dd])
-      dcaZoverCzz,                            // 14 sqrt(cov[zz])
-      isProbeParticle,                        // 15 isProbe
-      iPid                                    // 16 PID
-    };
 
-   fHnQA->Fill(aTrack);
+      Double_t aTracka[10] = {fCentralityBin,0,track->Charge(),track->Pt(),track->GetTPCmomentum(),track->GetTPCsignal(),pid[0],pid[1],pid[2],isProbeParticle};   
+      Double_t aTrackb[9] = {fCentralityBin,0,track->Charge(),track->Eta(),yP, track->Phi(),track->Pt(),dca[0],dca[1]};
+      fHnQAa->Fill(aTracka);
+      fHnQAb->Fill(aTrackb);
+    }
+   
+    Double_t aTracka[10] = {fCentralityBin,iPid,track->Charge(),track->Pt(),track->GetTPCmomentum(),track->GetTPCsignal(),pid[0],pid[1],pid[2],isProbeParticle};   
+    Double_t aTrackb[9] = {fCentralityBin,iPid,track->Charge(),track->Eta(),yP, track->Phi(),track->Pt(),dca[0],dca[1]};
+      fHnQAa->Fill(aTracka);
+      fHnQAb->Fill(aTrackb);
 
   } // for (Int_t idxTrack = 0; idxTrack < fNTracks; ++idxTrack) {
 
index ceca419..f1637e5 100644 (file)
@@ -23,7 +23,8 @@ class AliEbyEPidRatioQA : public AliEbyEPidRatioBase {
   AliEbyEPidRatioQA();
   virtual ~AliEbyEPidRatioQA();
   virtual void Process();
-  THnSparseF* GetHnQA()  {return fHnQA;}
+  THnSparseF* GetHnQAPid()  {return fHnQAa;}
+  THnSparseF* GetHnQADca()  {return fHnQAb;}
 
  private:
 
@@ -31,7 +32,8 @@ class AliEbyEPidRatioQA : public AliEbyEPidRatioBase {
   AliEbyEPidRatioQA& operator=(const AliEbyEPidRatioQA&); // not implemented
   virtual void CreateHistograms();
 
-  THnSparseF           *fHnQA;                  //! THnSparseF : tracks for QA
+  THnSparseF           *fHnQAa;                  //! THnSparseF : tracks for QA
+  THnSparseF           *fHnQAb;                  //! THnSparseF : tracks for QA
 
   ClassDef(AliEbyEPidRatioQA, 1);
 };
index 726ff48..bda5885 100644 (file)
@@ -180,15 +180,20 @@ void AliEbyEPidRatioTask::UserCreateOutputObjects() {
   list->Add(fHelper->GetHCentralityStat());
 
   if ((fIsAOD||fIsMC) && fModeEffCreation == 1) {
-    fOutListEff->Add(fEffCont->GetHnEff());
-    fOutListCont->Add(fEffCont->GetHnCont());
+    fOutListEff->Add(fEffCont->GetHnEffMc());
+    fOutListEff->Add(fEffCont->GetHnEffRec());
+
+    fOutListCont->Add(fEffCont->GetHnContMc());
+    fOutListCont->Add(fEffCont->GetHnContRec());
   }
   
   if (fModeDCACreation == 1)
     fOutListDCA->Add(fDCA->GetHnDCA());
 
-  if (fModeQACreation == 1)
-    fOutListQA->Add(fQA->GetHnQA());
+  if (fModeQACreation == 1) {
+    fOutListQA->Add(fQA->GetHnQAPid());
+    fOutListQA->Add(fQA->GetHnQADca());
+  }
 
   TH1::AddDirectory(oldStatus);
 
@@ -325,7 +330,7 @@ Int_t AliEbyEPidRatioTask::Initialize() {
   // ------------------------------------------------------------------
   // -- Initialize Helper
   // ------------------------------------------------------------------
-  if (fHelper->Initialize(fESDTrackCutsEff, fIsMC, fAODtrackCutBit, fModeDistCreation))
+  if (fHelper->Initialize(fESDTrackCutsEff, fIsMC, fIsRatio, fAODtrackCutBit, fModeDistCreation))
     return -1;
 
   // ------------------------------------------------------------------
index 8cd5bba..ee54f4b 100644 (file)
@@ -65,6 +65,7 @@ class AliEbyEPidRatioTask : public AliAnalysisTaskSE {
    */
 
   void SetIsMC()                             {fIsMC             = kTRUE;}
+  void SetIsRatio()                          {fIsRatio          = kTRUE;}
   void SetIsAOD(Bool_t b)                    {fIsAOD            = b;}
   
   void SetESDTrackCutMode(Int_t i)           {fESDTrackCutMode  = i;}
@@ -148,6 +149,7 @@ class AliEbyEPidRatioTask : public AliAnalysisTaskSE {
   
   // --- Flags -------------------------------------------------------------
   Bool_t              fIsMC;                    //  Is MC event
+  Bool_t              fIsRatio;                    //  Is MC event
   Bool_t              fIsAOD;                   //  analysis mode            : 0 = ESDs  | 1 = AODs
   Int_t               fESDTrackCutMode;         //  ESD track cut mode       : 0 = clean | 1 = dirty
   Int_t               fModeEffCreation ;        //  Correction creation mode : 1 = on    | 0 = off