]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Replacing Mult and Zvtx axes with pool index in THnSparse histos (Sandro)
authorarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Aug 2013 09:45:01 +0000 (09:45 +0000)
committerarossi <arossi@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Aug 2013 09:45:01 +0000 (09:45 +0000)
PWGHF/correlationHF/AliAnalysisTaskDStarCorrelations.cxx

index 55ceab85cc5f5d6d41a5f38aa532590bccced548..0deb1d33caa58e1e613a17e69fdd89ad0e02d0c8 100644 (file)
@@ -226,7 +226,7 @@ void AliAnalysisTaskDStarCorrelations::UserCreateOutputObjects(){
        \r
     Double_t Pi = TMath::Pi();\r
        fCorrelator = new AliHFCorrelator("Correlator",fCuts2,fUseCentrality); // fCuts2 is the hadron cut object, fSystem to switch between pp or PbPb\r
-       fCorrelator->SetDeltaPhiInterval(  -0.5*Pi - Pi/fPhiBins, 1.5*Pi- Pi/fPhiBins); // set correct phi interval\r
+       fCorrelator->SetDeltaPhiInterval(  -0.5*Pi, 1.5*Pi); // set correct phi interval\r
        //fCorrelator->SetDeltaPhiInterval((-0.5)*Pi,(1.5)*Pi); // set correct phi interval\r
        fCorrelator->SetEventMixing(fmixing); //set kFALSE/kTRUE for mixing Off/On\r
        fCorrelator->SetAssociatedParticleType(fselect); // set 1/2/3 for hadron/kaons/kzeros\r
@@ -427,6 +427,13 @@ void AliAnalysisTaskDStarCorrelations::UserExec(Option_t *){
        \r
        if(!aodEvent->GetPrimaryVertex() || TMath::Abs(aodEvent->GetMagneticField())<0.001) return;\r
        \r
+    \r
+    // get the poolbin\r
+    \r
+    Int_t poolbin = fCuts2->GetPoolBin(MultipOrCent, zVtxPosition);\r
+  \r
+    \r
+    \r
        // initialize variables you will need for the D*\r
        \r
        Double_t ptDStar;//\r
@@ -840,7 +847,7 @@ void AliAnalysisTaskDStarCorrelations::UserExec(Option_t *){
            \r
            \r
            \r
-            Double_t arraytofill[6];\r
+            Double_t arraytofill[5];\r
             Double_t MCarraytofill[7];\r
             \r
             \r
@@ -878,9 +885,8 @@ void AliAnalysisTaskDStarCorrelations::UserExec(Option_t *){
              arraytofill[0] = DeltaPhi;\r
              arraytofill[1] = DeltaEta;\r
              arraytofill[2] = ptDStar;\r
-             arraytofill[3] = MultipOrCent;\r
-             arraytofill[4] = ptHad;\r
-             arraytofill[5] = zVtxPosition;\r
+             arraytofill[3] = ptHad;\r
+             arraytofill[4] = poolbin;\r
               \r
               \r
               \r
@@ -1050,8 +1056,8 @@ void AliAnalysisTaskDStarCorrelations::DefineThNSparseForAnalysis(){
     \r
     Double_t Pi = TMath::Pi();\r
        Int_t nbinscorr = fPhiBins;\r
-       Double_t lowcorrbin = -0.5*Pi - Pi/fPhiBins ; // shift the bin by half the width so that at 0 is it the bin center\r
-       Double_t upcorrbin = 1.5*Pi - Pi/fPhiBins ;\r
+       Double_t lowcorrbin = -0.5*Pi;\r
+       Double_t upcorrbin = 1.5*Pi;\r
     // define the THnSparseF\r
     \r
     //sparse bins\r
@@ -1063,10 +1069,13 @@ void AliAnalysisTaskDStarCorrelations::DefineThNSparseForAnalysis(){
     //5 track pt\r
     //6 zVtx position\r
     \r
+    Int_t nbinsPool = (fCuts2->GetNZvtxPoolBins())*(fCuts2->GetNCentPoolBins());\r
+    \r
     \r
-    Int_t nbinsSparse[6]={nbinscorr,fPhiBins,50,100,250,8};\r
-    Double_t binLowLimitSparse[6]={lowcorrbin,-1.6,0,0,0,-10};\r
-    Double_t binUpLimitSparse[6]={upcorrbin,1.6,50,100,25,10};\r
+    Int_t nbinsSparse[5]=         {nbinscorr,   32,30,250,nbinsPool};\r
+    Double_t binLowLimitSparse[5]={lowcorrbin,-1.6, 0,  0,-0.5};\r
+    Double_t binUpLimitSparse[5]= {upcorrbin,  1.6,30,25,nbinsPool-0.5};\r
+  \r
     Int_t MCnbinsSparse[7]={nbinscorr,40,50,40,250,10,2};\r
     Double_t MCbinLowLimitSparse[7]={lowcorrbin,-2,0.,-1,0,0.5,-0.5};\r
     Double_t MCbinUpLimitSparse[7]={upcorrbin,2,50,1,25,9.5,1.5};\r
@@ -1084,13 +1093,13 @@ void AliAnalysisTaskDStarCorrelations::DefineThNSparseForAnalysis(){
     TString MCSparseName = "MCDStar";\r
     MCSparseName += sparsename;\r
     // signal correlations\r
-    THnSparseF * Correlations = new THnSparseF(sparsename.Data(),"Correlations for signal",6,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
+    THnSparseF * Correlations = new THnSparseF(sparsename.Data(),"Correlations for signal",5,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
     \r
     // bkg correlations from D0 sidebands\r
-    THnSparseF * DZeroBkgCorrelations = new THnSparseF(D0Bkgsparsename.Data(),"Bkg Correlations estimated with D0 sidebands",6,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
+    THnSparseF * DZeroBkgCorrelations = new THnSparseF(D0Bkgsparsename.Data(),"Bkg Correlations estimated with D0 sidebands",5,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
     \r
     // bkg correlations from D* sidebands\r
-    THnSparseF * DStarBkgCorrelations = new THnSparseF(DStarBkgsparsename.Data(),"Bkg Correlations estimated with D* sidebands",6,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
+    THnSparseF * DStarBkgCorrelations = new THnSparseF(DStarBkgsparsename.Data(),"Bkg Correlations estimated with D* sidebands",5,nbinsSparse,binLowLimitSparse,binUpLimitSparse);\r
     \r
     \r
     THnSparseF * MCCorrelations = new THnSparseF(MCSparseName.Data(),"MC Correlations",7,MCnbinsSparse,MCbinLowLimitSparse,MCbinUpLimitSparse);\r
@@ -1123,8 +1132,8 @@ void AliAnalysisTaskDStarCorrelations::DefineHistoForAnalysis(){
        \r
        Double_t Pi = TMath::Pi();\r
        Int_t nbinscorr = fPhiBins;\r
-       Double_t lowcorrbin = -0.5*Pi - Pi/fPhiBins ; // shift the bin by half the width so that at 0 is it the bin center\r
-       Double_t upcorrbin = 1.5*Pi - Pi/fPhiBins ;\r
+       Double_t lowcorrbin = -0.5*Pi ; // shift the bin by half the width so that at 0 is it the bin center\r
+       Double_t upcorrbin = 1.5*Pi ;\r
        \r
        // ========================= histograms for both Data and MonteCarlo\r
        \r