adapting pt cut off correction to new correction schema
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Dec 2006 17:53:42 +0000 (17:53 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Dec 2006 17:53:42 +0000 (17:53 +0000)
changing drawPlots.C to new correction schema (first round)
changing eta binning

PWG0/dNdEta/AlidNdEtaAnalysisESDSelector.cxx
PWG0/dNdEta/AlidNdEtaCorrection.cxx
PWG0/dNdEta/AlidNdEtaCorrection.h
PWG0/dNdEta/dNdEtaAnalysis.cxx
PWG0/dNdEta/drawPlots.C
PWG0/dNdEta/testAnalysis2.C

index 6f5b97e133a09b16c1b8522b9e7edb93051ae0ad..6a35ba69cc42b8f14c68e9b66da7679d6d30342a 100644 (file)
@@ -156,7 +156,8 @@ Bool_t AlidNdEtaAnalysisESDSelector::Process(Long64_t entry)
   Double_t vtx[3];
   vtxESD->GetXYZ(vtx);
 
-  vtx[2] = vtxMC[2];
+  //vtx[2] = vtxMC[2];
+  //vtx[2] += 0.1;
 
   // get number of "good" tracks
   TObjArray* list = fEsdTrackCuts->GetAcceptedTracks(fESD);
index 3c0956230be194afbef031080c6dec5ef87b9488..731ddb2196ac0ba28a0751c6756a795cf5a19e4b 100644 (file)
@@ -275,18 +275,11 @@ Float_t AlidNdEtaCorrection::GetMeasuredFraction(CorrectionType correctionType,
   //
   // uses the generated particle histogram from the correction passed, e.g. pass GetTrack2ParticleCorrection()
 
-  const TH3F* generated = 0;
+  if (!GetCorrection(correctionType))
+    return -1;
+
+  const TH3F* generated = GetCorrection(correctionType)->GetTrackCorrection()->GetGeneratedHistogram();
 
-  switch (correctionType)
-  {
-    case kNone : return -1;
-    case kTrack2Particle : generated = fTrack2ParticleCorrection->GetTrackCorrection()->GetGeneratedHistogram(); break;
-    case kVertexReco : generated = fVertexRecoCorrection->GetTrackCorrection()->GetGeneratedHistogram(); break;
-    case kINEL : generated = fTriggerBiasCorrectionMBToINEL->GetTrackCorrection()->GetGeneratedHistogram(); break;
-    case kNSD: generated = fTriggerBiasCorrectionMBToNSD->GetTrackCorrection()->GetGeneratedHistogram(); break;
-    case kND: generated = fTriggerBiasCorrectionMBToND->GetTrackCorrection()->GetGeneratedHistogram(); break;
-  }
-  
   // find eta borders, if eta is negative assume -0.8 ... 0.8
   Int_t etaBegin = 0;
   Int_t etaEnd = 0;
@@ -301,8 +294,8 @@ Float_t AlidNdEtaCorrection::GetMeasuredFraction(CorrectionType correctionType,
     etaEnd = etaBegin;
   }
 
-  Int_t vertexBegin = generated->GetXaxis()->FindBin(-4.99);
-  Int_t vertexEnd = generated->GetXaxis()->FindBin(4.99);
+  Int_t vertexBegin = generated->GetXaxis()->FindBin(-9.99);
+  Int_t vertexEnd = generated->GetXaxis()->FindBin(9.99);
 
   TH1D* ptProj = dynamic_cast<TH1D*> (generated->ProjectionZ(Form("%s_pt", generated->GetName()), vertexBegin, vertexEnd, etaBegin, etaEnd));
   //printf("GetMeasuredFraction: bin range %d %d %d %d\n", vertexBegin, vertexEnd, etaBegin, etaEnd);
@@ -347,3 +340,20 @@ void AlidNdEtaCorrection::ReduceInformation()
   fTriggerBiasCorrectionMBToND   ->ReduceInformation();
 }
 
+//____________________________________________________________________
+AliCorrection* AlidNdEtaCorrection::GetCorrection(CorrectionType correctionType)
+{
+  // returns the given correction
+
+  switch (correctionType)
+  {
+    case kNone : return 0;
+    case kTrack2Particle : return fTrack2ParticleCorrection;
+    case kVertexReco :     return fVertexRecoCorrection;
+    case kINEL :           return fTriggerBiasCorrectionMBToINEL;
+    case kNSD :            return fTriggerBiasCorrectionMBToNSD;
+    case kND :             return fTriggerBiasCorrectionMBToND;
+  }
+
+  return 0;
+}
index 71c740cd4effdcc8e7c141ad9a97f08b26cc3509..6bb43e37fe0b7cffed1aeba31a72a6cfaf5138dc 100644 (file)
@@ -26,7 +26,7 @@ class AlidNdEtaCorrection : public TNamed
 {
 public:
   enum CorrectionType {
-    kNone,
+    kNone = 0,
     kTrack2Particle,  // measured events
     kVertexReco,      // MB sample
     kINEL,
@@ -52,6 +52,7 @@ public:
   AliCorrection* GetTriggerBiasCorrectionINEL() {return fTriggerBiasCorrectionMBToINEL;}
   AliCorrection* GetTriggerBiasCorrectionNSD()  {return fTriggerBiasCorrectionMBToNSD;}
   AliCorrection* GetTriggerBiasCorrectionND()   {return fTriggerBiasCorrectionMBToND;}
+  AliCorrection* GetCorrection(CorrectionType correctionType);
 
   void    SaveHistograms();
   Bool_t  LoadHistograms(const Char_t* dir = 0);
index 5e7393156c4958f5be6af48acc6ce63fe17d977f..0d81fbd66dfa785d7a645fe9fab4d667f96ff558 100644 (file)
@@ -54,7 +54,7 @@ dNdEtaAnalysis::dNdEtaAnalysis(Char_t* name, Char_t* title) :
   Bool_t oldStatus = TH1::AddDirectoryStatus();
   TH1::AddDirectory(kFALSE);
 
-  fdNdEta[0] = new TH1F("dNdEta", "dN_{ch}/d#eta;#eta;dN_{ch}/d#eta", 20, -2, 2);
+  fdNdEta[0] = new TH1F("dNdEta", "dN_{ch}/d#eta;#eta;dN_{ch}/d#eta", 40, -2, 2);
 
   fdNdEtaPtCutOffCorrected[0] = dynamic_cast<TH1F*> (fdNdEta[0]->Clone(Form("%s_corrected", fdNdEta[0]->GetName())));
 
@@ -282,7 +282,7 @@ void dNdEtaAnalysis::Finish(AlidNdEtaCorrection* correction, Float_t ptCut, Alid
     return;
   }
 
-  const Float_t vertexRange = 4.99;
+  const Float_t vertexRange = 9.99;
 
   for (Int_t iEta=1; iEta<=vtxVsEta->GetNbinsY(); iEta++)
   {
@@ -451,7 +451,7 @@ void dNdEtaAnalysis::DrawHistograms(Bool_t simple)
     //printf("%d\n", yPads);
     //canvas2->Divide(2, yPads);
 
-    TLegend* legend = new TLegend(0.4, 0.7, 0.6, 0.9);
+    TLegend* legend = new TLegend(0.4, 0.2, 0.6, 0.4);
 
     for (Int_t i=0; i<kVertexBinning; ++i)
     {
index d32a048183a93db6772d7fa5f0bb6fa1c5c40bbe..c59ed764058347106c6fa4b16754bbefffd717c8 100644 (file)
@@ -105,10 +105,10 @@ void ComparedNdEta(const char* ESDfolder = "dndeta", const char* MCfolder = "dnd
   TFile::Open(mcFile);
   dNdEtaAnalysis* fdNdEtaAnalysisMC = new dNdEtaAnalysis(MCfolder, MCfolder);
   fdNdEtaAnalysisMC->LoadHistograms();
-  fdNdEtaAnalysisMC->Finish(0, 0.3);
+  //fdNdEtaAnalysisMC->Finish(0, 0.3, AlidNdEtaCorrection::kNone);
 
   for (Int_t i=0; i<dNdEtaAnalysis::kVertexBinning; ++i)
-    fdNdEtaAnalysisESD->GetdNdEtaHistogram(i)->Divide(fdNdEtaAnalysisMC->GetdNdEtaHistogram(i));
+    fdNdEtaAnalysisESD->GetdNdEtaPtCutOffCorrectedHistogram(i)->Divide(fdNdEtaAnalysisMC->GetdNdEtaPtCutOffCorrectedHistogram(i));
 
   fdNdEtaAnalysisESD->DrawHistograms();
 }
@@ -455,12 +455,13 @@ void ptCutoff()
 {
   gSystem->Load("libPWG0base");
 
+  TFile::Open("correction_map.root");
   AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
-  dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
+  dNdEtaCorrection->LoadHistograms();
 
-  dNdEtaCorrection->GetMeasuredFraction(0.3, -100, kTRUE);
+  dNdEtaCorrection->GetMeasuredFraction(AlidNdEtaCorrection::kINEL, 0.3, -100, kTRUE);
 
-  TH1* hist = dynamic_cast<TH1*> (gROOT->FindObject("gene_dndeta_correction_nTrackToNPart_pt")->Clone("ptcutoff"));
+  TH1* hist = dynamic_cast<TH1*> (gROOT->FindObject("generated_pt")->Clone("ptcutoff"));
 
   hist->GetXaxis()->SetRangeUser(0, 0.9999);
   hist->SetMinimum(0);
@@ -479,9 +480,10 @@ void ptCutoff()
   canvas->SaveAs("ptCutoff.gif");
   canvas->SaveAs("ptCutoff.eps");
 
-  TH1F* factor = new TH1F("factor", ";#eta;correction factor", 10, -1, 1.000001);
-  for (Float_t eta = -0.9; eta<1; eta += 0.2)
-    factor->Fill(eta, 1.0 / dNdEtaCorrection->GetMeasuredFraction(0.3, eta, kFALSE));
+  TH1F* factor = new TH1F("factor", ";#eta;correction factor", 20, -1, 1.000001);
+  factor->SetLineWidth(2);
+  for (Float_t eta = -0.95; eta<1; eta += 0.1)
+    factor->Fill(eta, 1.0 / dNdEtaCorrection->GetMeasuredFraction(AlidNdEtaCorrection::kINEL, 0.3, eta, kFALSE));
 
   TCanvas* canvas = new TCanvas("ptCutoff_factor", "ptCutoff_factor", 700, 500);
   InitPad();
@@ -496,16 +498,20 @@ void ptCutoff()
 
 void TriggerBiasVtxRecon(const char* fileName = "correction_map.root", const char* folder = "dndeta_correction")
 {
-  TFile* file = TFile::Open(fileName);
+  gSystem->Load("libPWG0base");
+
+  TFile::Open(fileName);
+  AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
+  dNdEtaCorrection->LoadHistograms();
 
-  TH2* corrTrigger = dynamic_cast<TH2*> (file->Get(Form("%s/corr_%s_trigger", folder, folder)));
-  TH2* corrVtx = dynamic_cast<TH2*> (file->Get(Form("%s/corr_%s_vtxReco", folder, folder)));
+  TH2* corrTrigger = dNdEtaCorrection->GetTriggerBiasCorrectionINEL()->GetEventCorrection()->GetCorrectionHistogram();
+  TH2* corrVtx = dNdEtaCorrection->GetVertexRecoCorrection()->GetEventCorrection()->GetCorrectionHistogram();
 
   Prepare2DPlot(corrTrigger);
-  corrTrigger->SetTitle("a) Trigger bias correction");
+  corrTrigger->SetTitle("b) Trigger bias correction");
 
   Prepare2DPlot(corrVtx);
-  corrVtx->SetTitle("b) Vertex reconstruction correction");
+  corrVtx->SetTitle("a) Vertex reconstruction correction");
 
   corrTrigger->GetYaxis()->SetTitle("Multiplicity");
   corrVtx->GetYaxis()->SetTitle("Multiplicity");
@@ -515,11 +521,11 @@ void TriggerBiasVtxRecon(const char* fileName = "correction_map.root", const cha
 
   canvas->cd(1);
   InitPadCOLZ();
-  corrTrigger->DrawCopy("COLZ");
+  corrVtx->DrawCopy("COLZ");
 
   canvas->cd(2);
   InitPadCOLZ();
-  corrVtx->DrawCopy("COLZ");
+  corrTrigger->DrawCopy("COLZ");
 
   canvas->SaveAs(Form("TriggerBiasVtxRecon_%d.gif", gMax));
   canvas->SaveAs(Form("TriggerBiasVtxRecon_%d.eps", gMax));
@@ -532,11 +538,11 @@ void TriggerBiasVtxRecon(const char* fileName = "correction_map.root", const cha
 
   canvas->cd(1);
   InitPadCOLZ();
-  corrTrigger->DrawCopy("COLZ");
+  corrVtx->DrawCopy("COLZ");
 
   canvas->cd(2);
   InitPadCOLZ();
-  corrVtx->DrawCopy("COLZ");
+  corrTrigger->DrawCopy("COLZ");
 
   canvas->SaveAs(Form("TriggerBiasVtxReconZoom_%d.gif", gMax));
   canvas->SaveAs(Form("TriggerBiasVtxReconZoom_%d.eps", gMax));
@@ -574,12 +580,12 @@ void TriggerBias1D(const char* fileName = "correction_map.root", const char* fol
 
   TFile* file = TFile::Open(fileName);
   AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection(folderName, folderName);
-  dNdEtaCorrection->LoadHistograms(fileName, folderName);
+  dNdEtaCorrection->LoadHistograms();
 
-  TH1* hist = dNdEtaCorrection->GetTriggerBiasCorrection()->Get1DCorrection("x");
-  TH1* hist2 = dNdEtaCorrection->GetTriggerBiasCorrection()->Get1DCorrection("y", -10, 10);
+  TH1* hist = dNdEtaCorrection->GetTriggerBiasCorrectionINEL()->GetEventCorrection()->Get1DCorrection("x");
+  TH1* hist2 = dNdEtaCorrection->GetTriggerBiasCorrectionINEL()->GetEventCorrection()->Get1DCorrection("y", -10, 10);
 
-  TCanvas* canvas = new TCanvas("VtxRecon1D", "VtxRecon1D", 1000, 500);
+  TCanvas* canvas = new TCanvas("TriggerBias1D", "TriggerBias1D", 1000, 500);
   canvas->Divide(2, 1);
 
   canvas->cd(1);
@@ -643,10 +649,10 @@ void VtxRecon1D(const char* fileName = "correction_map.root", const char* folder
 
   TFile* file = TFile::Open(fileName);
   AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection(folderName, folderName);
-  dNdEtaCorrection->LoadHistograms(fileName, folderName);
+  dNdEtaCorrection->LoadHistograms();
 
-  TH1* hist = dNdEtaCorrection->GetVertexRecoCorrection()->Get1DCorrection("x");
-  TH1* hist2 = dNdEtaCorrection->GetVertexRecoCorrection()->Get1DCorrection("y", -10, 10);
+  TH1* hist = dNdEtaCorrection->GetVertexRecoCorrection()->GetEventCorrection()->Get1DCorrection("x");
+  TH1* hist2 = dNdEtaCorrection->GetVertexRecoCorrection()->GetEventCorrection()->Get1DCorrection("y", -10, 10);
 
   TCanvas* canvas = new TCanvas("VtxRecon1D", "VtxRecon1D", 1000, 500);
   canvas->Divide(2, 1);
@@ -679,14 +685,41 @@ void VtxRecon1D(const char* fileName = "correction_map.root", const char* folder
 
   canvas->SaveAs("VtxRecon1D.eps");
 
-  for (Int_t i=1; i<=hist->GetNbinsX() / 2; ++i)
-    if (hist->GetBinContent(hist->GetNbinsX() + 1 - i) != 0)
-      hist->SetBinContent(i, hist->GetBinContent(i) / hist->GetBinContent(hist->GetNbinsX() + 1 - i));
+  Correction1DCreatePlots(fileName, folderName, 9.9, 2);
 
-  new TCanvas;
-  hist->GetXaxis()->SetRange(1, hist->GetNbinsX() / 2);
-  hist->GetYaxis()->SetRangeUser(0.8, 1.2);
-  hist->DrawCopy();
+  TH1* corrX = dynamic_cast<TH1*> (gROOT->FindObject("generated_x_div_measured_x"));
+  TH1* corrZ = dynamic_cast<TH1*> (gROOT->FindObject("generated_z_div_measured_z"));
+
+  Prepare1DPlot(corrX);
+  Prepare1DPlot(corrZ);
+
+  corrX->GetYaxis()->SetTitleOffset(1.5);
+  corrZ->GetYaxis()->SetTitleOffset(1.5);
+
+  corrX->SetTitle("a) z projection");
+  corrZ->SetTitle("b) p_{T} projection");
+
+  corrX->GetYaxis()->SetTitle("correction factor");
+  corrZ->GetYaxis()->SetTitle("correction factor");
+
+  corrZ->GetXaxis()->SetRangeUser(0.11, 9.9);
+
+  TString canvasName;
+  canvasName.Form("VtxRecon1D_Track");
+  TCanvas* canvas = new TCanvas(canvasName, canvasName, 800, 400);
+  canvas->Divide(2, 1);
+
+  canvas->cd(1);
+  InitPad();
+  corrX->DrawCopy();
+
+  canvas->cd(2);
+  InitPad();
+  gPad->SetLogx();
+  corrZ->Draw();
+
+  canvas->SaveAs("VtxRecon1D_Track.eps");
+  canvas->SaveAs("VtxRecon1D_Track.gif");
 }
 
 void Track2ParticleAsNumber(const char* fileName = "correction_map.root")
@@ -730,14 +763,14 @@ void Track2ParticleAsNumber(const char* fileName = "correction_map.root")
   printf("Correction with 0.3 < pT < 0.5: %f +- %f\n", eff3, error3);
 }
 
-void Track2Particle1DCreatePlots(const char* fileName = "correction_map.root", const char* folderName = "dndeta_correction", Float_t upperPtLimit = 10)
+void Correction1DCreatePlots(const char* fileName = "correction_map.root", const char* folderName = "dndeta_correction", Float_t upperPtLimit = 9.9, Int_t correctionType = 0)
 {
   TFile::Open(fileName);
   AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection(folderName, folderName);
-  dNdEtaCorrection->LoadHistograms(fileName, folderName);
+  dNdEtaCorrection->LoadHistograms();
 
-  TH3F* gene = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetGeneratedHistogram();
-  TH3F* meas = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetMeasuredHistogram();
+  TH3F* gene = dNdEtaCorrection->GetCorrection(correctionType)->GetTrackCorrection()->GetGeneratedHistogram();
+  TH3F* meas = dNdEtaCorrection->GetCorrection(correctionType)->GetTrackCorrection()->GetMeasuredHistogram();
 
   gene->GetZaxis()->SetRangeUser(0.3, upperPtLimit);
   meas->GetZaxis()->SetRangeUser(0.3, upperPtLimit);
@@ -758,21 +791,66 @@ void Track2Particle1DCreatePlots(const char* fileName = "correction_map.root", c
   AliPWG0Helper::CreateDividedProjections(gene, meas, "z", kTRUE);
 }
 
+void Correction1D(Int_t correctionType = 0, const char* fileName = "correction_map.root", const char* folder = "dndeta_correction", Float_t upperPtLimit = 9.9)
+{
+  gSystem->Load("libPWG0base");
+
+  Correction1DCreatePlots(fileName, folder, upperPtLimit, correctionType);
+
+  TH1* corrX = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_x_div_measured_x", folder, folder)));
+  TH1* corrY = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_y_div_measured_y", folder, folder)));
+  TH1* corrZ = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_z_div_measured_z", folder, folder)));
+
+  Prepare1DPlot(corrX);
+  Prepare1DPlot(corrY);
+  Prepare1DPlot(corrZ);
+
+  corrX->SetTitle("a) z projection");
+  corrY->SetTitle("b) #eta projection");
+  corrZ->SetTitle("c) p_{T} projection");
+
+  corrX->GetYaxis()->SetTitle("correction factor");
+  corrY->GetYaxis()->SetTitle("correction factor");
+  corrZ->GetYaxis()->SetTitle("correction factor");
+
+  corrZ->GetXaxis()->SetRangeUser(0, upperPtLimit);
+
+  TString canvasName;
+  canvasName.Form("Correction1D_%s", folder);
+  TCanvas* canvas = new TCanvas(canvasName, canvasName, 1200, 400);
+  canvas->Divide(3, 1);
+
+  canvas->cd(1);
+  InitPad();
+  corrX->DrawCopy();
+
+  canvas->cd(2);
+  InitPad();
+  corrY->Draw();
+
+  canvas->cd(3);
+  InitPad();
+  corrZ->Draw();
+
+  canvas->SaveAs(Form("Correction1D_%d_%s_%f.gif", correctionType, fileName, upperPtLimit));
+  canvas->SaveAs(Form("Correction1D_%d_%s_%f.eps", correctionType, fileName, upperPtLimit));
+}
+
 void Track2Particle1D(const char* fileName = "correction_map.root", const char* folder = "dndeta_correction", Float_t upperPtLimit = 9.9)
 {
   gSystem->Load("libPWG0base");
 
-  Track2Particle1DCreatePlots(fileName, folder, upperPtLimit);
+  Correction1DCreatePlots(fileName, folder, upperPtLimit, AlidNdEtaCorrection::kTrack2Particle);
 
-  TH1* corrX = dynamic_cast<TH1*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_x_div_meas_%s_nTrackToNPart_x", folder, folder)));
-  TH1* corrY = dynamic_cast<TH1*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_y_div_meas_%s_nTrackToNPart_y", folder, folder)));
-  TH1* corrZ = dynamic_cast<TH1*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_z_div_meas_%s_nTrackToNPart_z", folder, folder)));
+  TH1* corrX = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_x_div_measured_x", folder, folder)));
+  TH1* corrY = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_y_div_measured_y", folder, folder)));
+  TH1* corrZ = dynamic_cast<TH1*> (gROOT->FindObject(Form("generated_z_div_measured_z", folder, folder)));
 
   Prepare1DPlot(corrX);
   Prepare1DPlot(corrY);
   Prepare1DPlot(corrZ);
 
-  //corrX->SetTitle("a) z projection");
+  corrX->SetTitle("a) z projection");
   corrY->SetTitle("a) #eta projection");
   corrZ->SetTitle("b) p_{T} projection");
 
@@ -792,11 +870,11 @@ void Track2Particle1D(const char* fileName = "correction_map.root", const char*
 
   canvas->cd(2);
   InitPad();
-  corrY->DrawCopy();
+  corrY->Draw();
 
   canvas->cd(3);
   InitPad();
-  corrZ->DrawCopy();
+  corrZ->Draw();
 
   canvas->SaveAs(Form("Track2Particle1D_%s_%f.gif", fileName, upperPtLimit));
   canvas->SaveAs(Form("Track2Particle1D_%s_%f.eps", fileName, upperPtLimit));
@@ -916,10 +994,10 @@ void Track2Particle2DCreatePlots(const char* fileName = "correction_map.root")
 {
   TFile::Open(fileName);
   AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
-  dNdEtaCorrection->LoadHistograms(fileName, "dndeta_correction");
+  dNdEtaCorrection->LoadHistograms();
 
-  TH3F* gene = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetGeneratedHistogram();
-  TH3F* meas = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetMeasuredHistogram();
+  TH3F* gene = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetTrackCorrection()->GetGeneratedHistogram();
+  TH3F* meas = dNdEtaCorrection->GetTrack2ParticleCorrection()->GetTrackCorrection()->GetMeasuredHistogram();
 
   gene->GetZaxis()->SetRangeUser(0.3, 10);
   meas->GetZaxis()->SetRangeUser(0.3, 10);
@@ -946,9 +1024,9 @@ void Track2Particle2D(const char* fileName = "correction_map.root", const char*
 
   Track2Particle2DCreatePlots(fileName);
 
-  TH2* corrYX = dynamic_cast<TH2*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_yx_div_meas_%s_nTrackToNPart_yx", folder, folder)));
-  TH2* corrZX = dynamic_cast<TH2*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_zx_div_meas_%s_nTrackToNPart_zx", folder, folder)));
-  TH2* corrZY = dynamic_cast<TH2*> (gROOT->FindObject(Form("gene_%s_nTrackToNPart_zy_div_meas_%s_nTrackToNPart_zy", folder, folder)));
+  TH2* corrYX = dynamic_cast<TH2*> (gROOT->FindObject("generated_yx_div_measured_yx"));
+  TH2* corrZX = dynamic_cast<TH2*> (gROOT->FindObject("generated_zx_div_measured_zx"));
+  TH2* corrZY = dynamic_cast<TH2*> (gROOT->FindObject("generated_zy_div_measured_zy"));
 
   /* this reads them from the file
   TH2* corrYX = dynamic_cast<TH2*> (file->Get("dndeta_correction/gene_nTrackToNPart_yx_div_meas_nTrackToNPart_yx"));
index f9c2cc95f5548125e22ce3df6f3dd5846cc7b387..5eb13c7d9db891cb31f4ae443ab5f8b0b1a6f19a 100644 (file)
@@ -22,11 +22,6 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
 
   TString libraries("libEG;libGeom;libESD;libPWG0base");
   TString packages("adaptivepacketizer;PWG0base");
-  if (aMC != kFALSE)
-  {
-    libraries += ";libVMC;libMinuit;libSTEER;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6;libPWG0dep";
-    packages += ";PWG0dep";
-  }
 
   if (!prepareQuery(libraries, packages, kTRUE))
     return;
@@ -76,10 +71,10 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
         return;
       }
       fdNdEtaAnalysis->LoadHistograms();
-      fdNdEtaAnalysis->DrawHistograms();
+      fdNdEtaAnalysis->DrawHistograms(kTRUE);
     }
     else
-      FinishAnalysisAll(correctionMapFile, correctionMapFolder);
+      FinishAnalysisAll("analysis_esd_raw.root", "analysis_esd.root", correctionMapFile, correctionMapFolder);
   }
 }