Updates
authorzconesa <zconesa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 24 Sep 2012 14:26:54 +0000 (14:26 +0000)
committerzconesa <zconesa@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 24 Sep 2012 14:26:54 +0000 (14:26 +0000)
PWGHF/vertexingHF/macros/ReadDvsMultiplicity.C

index 9bb0e4f..b01808b 100644 (file)
@@ -38,10 +38,10 @@ enum {kCorr=0, kUnCorr, kNoPid};
 \r
 \r
 // Common variables: to be configured by the user\r
-const Int_t nPtBins=3;\r
-Double_t ptlims[nPtBins+1]={2.,4.,8.,16.};\r
-Int_t rebin[nPtBins]={4,6,6};\r
-Double_t sigmapt[nPtBins]={ 0.012, 0.016, 0.018 };\r
+const Int_t nPtBins=5;\r
+Double_t ptlims[nPtBins+1]={2.,4.,6.,8.,12.,16.};\r
+Int_t rebin[nPtBins]={4,6,6,6,8};\r
+Double_t sigmapt[nPtBins]={ 0.012, 0.016, 0.016, 0.018, 0.20 };\r
 Bool_t fixPeakSigma = kFALSE;\r
 //\r
 const Int_t nMultbins=6;\r
@@ -69,12 +69,12 @@ Bool_t CheckNtrVsZvtx(TH2F** hNtrZvtx, TH2F** hNtrZvtxCorr, Int_t nFiles);
 TH1F* RebinHisto(TH1F* hOrig, Int_t reb, Int_t firstUse=-1);\r
 \r
 \r
-void ReadDvsMultiplicity(Int_t analysisType=kDplusKpipi,\r
-                        TString fileNameb="Mult/AnalysisResults.root",\r
-                        TString fileNamec="MultC/AnalysisResults.root",\r
-                        TString fileNamed="MultD/AnalysisResults.root",\r
-                        TString fileNamee="MultE/AnalysisResults.root",\r
-                        const char *CutsType="StdPid",\r
+void ReadDvsMultiplicity(Int_t analysisType=kD0toKpi,\r
+                        TString fileNameb="AnalysisResults.root",\r
+                        TString fileNamec="",\r
+                        TString fileNamed="",\r
+                        TString fileNamee="",\r
+                        const char *CutsType="",\r
                         Int_t Option=kCorr)\r
 {\r
   // gSystem->SetIncludePath("-I. -I$ROOTSYS/include -I$ALICE_ROOT -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -I$ALICE_ROOT/TPC -I$ALICE_ROOT/CONTAINERS -I$ALICE_ROOT/STEER/STEER -I$ALICE_ROOT/STEER/STEERBase -I$ALICE_ROOT/STEER/ESD -I$ALICE_ROOT/STEER/AOD -I$ALICE_ROOT/TRD -I$ALICE_ROOT/macros -I$ALICE_ROOT/ANALYSIS  -I$ALICE_ROOT/OADB -I$ALICE_ROOT/PWGHF -I$ALICE_ROOT/PWGHF/base -I$ALICE_ROOT/PWGHF/vertexingHF -I$ALICE_ROOT/PWG/FLOW/Case -I$ALICE_ROOT/PWG/FLOW/Tasks -g");\r
@@ -326,8 +326,9 @@ void ReadDvsMultiplicity(Int_t analysisType=kDplusKpipi,
   for(Int_t imult=0; imult<nMultbins; imult++) {\r
     hMass[imult]->SetMarkerStyle(20);\r
     hMass[imult]->GetXaxis()->SetTitle("Pt (GeV/c)");\r
-    hMass[imult]->GetXaxis()->SetTitle("Mass (GeV/c^{2})");\r
+    hMass[imult]->GetYaxis()->SetTitle("Mass (GeV/c^{2})");\r
     hMass[imult]->SetMarkerColor(2*imult);\r
+    if(imult==5) hMass[imult]->SetMarkerColor(2*imult-3);\r
     if(imult==0) {\r
       hMass[imult]->SetMarkerColor(kBlack);\r
       hMass[imult]->Draw("PE");\r
@@ -339,8 +340,9 @@ void ReadDvsMultiplicity(Int_t analysisType=kDplusKpipi,
     hSigma[imult]->SetMarkerStyle(20);\r
     //  hSigma[0]->Draw("PE");\r
     hSigma[imult]->GetXaxis()->SetTitle("Pt (GeV/c)");\r
-    hSigma[imult]->GetXaxis()->SetTitle("Sigma (GeV/c^{2})");\r
+    hSigma[imult]->GetYaxis()->SetTitle("Sigma (GeV/c^{2})");\r
     hSigma[imult]->SetMarkerColor(2*imult);\r
+    if(imult==5) hSigma[imult]->SetMarkerColor(2*imult-3);\r
     if(imult==0) {\r
       hSigma[imult]->SetMarkerColor(kBlack);\r
       hSigma[imult]->Draw("PE");\r
@@ -459,9 +461,10 @@ void ReadDvsMultiplicity(Int_t analysisType=kDplusKpipi,
     hBackgroundNormSigma[i]->GetXaxis()->SetTitle("Pt (GeV/c)");\r
     hBackgroundNormSigma[i]->GetYaxis()->SetTitle("Background #times 3 #times 0.012/ (3 #times #sigma)");\r
     hBackgroundNormSigma[i]->SetMarkerColor(2*i);\r
+    if(i==5) hBackgroundNormSigma[i]->SetMarkerColor(2*i-3);\r
     if(i==0) { \r
       hBackgroundNormSigma[i]->SetMarkerColor(kBlack);\r
-      hBackgroundNormSigma[i]->Draw("PA");\r
+      hBackgroundNormSigma[i]->Draw("PE");\r
     }\r
     else  hBackgroundNormSigma[i]->Draw("Psame");\r
   }\r
@@ -606,7 +609,7 @@ Bool_t LoadD0toKpiHistos(TObjArray* listFiles, TH3F** hPtMassMult, TH2F** hNtrZv
       hPtMassMult[0]->Add(htemp);\r
     }\r
     hNtrZvtx[iFile] = (TH2F*)hlist[iFile]->FindObject("hNtrVsZvtx");\r
-    //    hNtrZvtxCorr[iFile] = (TH2F*)hlist[iFile]->FindObject("hNtrVsZvtxCorr");\r
+    hNtrZvtxCorr[iFile] = (TH2F*)hlist[iFile]->FindObject("hNtrCorrVsZvtx");\r
   }\r
   \r
   //  cout<<" hPtMassMult:"<<hPtMassMult[0]<<endl;\r
@@ -761,7 +764,7 @@ TH1F* RebinHisto(TH1F* hOrig, Int_t reb, Int_t firstUse){
 //_____________________________________________________________________________________________\r
 Bool_t CheckNtrVsZvtx(TH2F** hNtrackVsVtxZ, TH2F** hNtrackVsVtxZCorr, Int_t nFiles)\r
 {\r
-  /*\r
+\r
   TCanvas *cNtrVsZvtx = new TCanvas("cNtrVsZvtx","Ntr Vs Zvtx");\r
   cNtrVsZvtx->Divide(3,2);\r
   for(Int_t i=0; i<nFiles; i++){\r
@@ -779,7 +782,7 @@ Bool_t CheckNtrVsZvtx(TH2F** hNtrackVsVtxZ, TH2F** hNtrackVsVtxZCorr, Int_t nFil
   }\r
 \r
   TH1F *hNtrAxis = (TH1F*)hNtrackVsVtxZ[0]->ProjectionY("hNtrAxis");\r
-  TH1F *hZvtx[nMultbins]; \r
+  TH1F *hZvtx[nMultbins];\r
   Int_t firstbin=0, lastbin=0;\r
   TCanvas *cZvtx = new TCanvas("cZvtx","Zvtx projections");\r
   cZvtx->Divide(3,2);\r
@@ -793,13 +796,13 @@ Bool_t CheckNtrVsZvtx(TH2F** hNtrackVsVtxZ, TH2F** hNtrackVsVtxZCorr, Int_t nFil
   TH1F *hZvtxCorr[nMultbins]; \r
   TCanvas *cZvtxCorr = new TCanvas("cZvtxCorr","Zvtx projections Corr");\r
   cZvtxCorr->Divide(3,2);\r
-  for(Int_t i=0; i<nMultbins; i++){\r
+  for(Int_t i=0; i<nFiles; i++){\r
     cZvtxCorr->cd(i);\r
     firstbin = hNtrAxis->FindBin( multlims[i] );\r
     lastbin = hNtrAxis->FindBin( multlims[i+1] );\r
-    hZvtxCorr[i] = (TH1F*)hNtrackVsVtxZCorr[i]->ProjectionX(Form("hZvtx_%d",i),firstbin,lastbin);\r
+    hZvtxCorr[i] = (TH1F*)hNtrackVsVtxZCorr[i]->ProjectionX(Form("hZvtxCorr_%d",i),firstbin,lastbin);\r
     hZvtxCorr[i]->Draw();\r
   }\r
-  */\r
+\r
   return kTRUE;\r
 }\r