Changes:
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Aug 2006 12:41:25 +0000 (12:41 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Aug 2006 12:41:25 +0000 (12:41 +0000)
small fixes to AliSelector, AliSelectorRL, CorrectionMatrix
AlidNdEtaAnalysisMCSelector uses Stack instead of TreeK directly
AlidNdEtaCorrectionSelector, AlidNdEtaSystematicsSelector now PROOF ready
PWG0base, PWG0dep only load the libraries that are not already loaded
new PWG0Helper.C that contains functions to send a PROOF query, is used by makeCorrection2.C, makeSystematics.C, runMultiplicitySelector.C, testAnalysis2.C

18 files changed:
PWG0/AliCorrectionMatrix.cxx
PWG0/AliSelector.cxx
PWG0/AliSelectorRL.cxx
PWG0/PROOF-INF.PWG0base/SETUP.C
PWG0/PROOF-INF.PWG0dep/SETUP.C
PWG0/PWG0Helper.C [new file with mode: 0644]
PWG0/dNdEta/AlidNdEtaAnalysisESDSelector.cxx
PWG0/dNdEta/AlidNdEtaAnalysisMCSelector.cxx
PWG0/dNdEta/AlidNdEtaCorrectionSelector.cxx
PWG0/dNdEta/AlidNdEtaCorrectionSelector.h
PWG0/dNdEta/AlidNdEtaSystematicsSelector.cxx
PWG0/dNdEta/CreatedNdEta.C [deleted file]
PWG0/dNdEta/drawPlots.C
PWG0/dNdEta/drawSystematics.C
PWG0/dNdEta/makeCorrection2.C
PWG0/dNdEta/makeSystematics.C
PWG0/dNdEta/runMultiplicitySelector.C
PWG0/dNdEta/testAnalysis2.C

index ce2a3ef41f3afe8804ea432a2b06141d5e0085dd..ff24721ece29e419671b37ad7a1dc8778dbb70c7 100644 (file)
@@ -217,8 +217,11 @@ void AliCorrectionMatrix::SaveHistograms()
   // saves the histograms
   //
 
-  fhMeas ->Write();
-  fhGene ->Write();
+  if (fhMeas)
+    fhMeas ->Write();
+
+  if (fhGene)
+    fhGene ->Write();
 
   if (fhCorr)
     fhCorr->Write();
index 7947f5f49653a35bff109821584c7439d92f62e1..21099e9317119b1f63c0695e1db9b0d32e8b98e7 100644 (file)
@@ -78,9 +78,15 @@ void AliSelector::CheckOptions()
 
   TString option = GetOption();
 
-  if (option.Contains("debug"))
+  if (option.Contains("moredebug"))
   {
-    printf("Enabling debug more for %s\n", ClassName());
+    printf("Enabling verbose debug mode for %s\n", ClassName());
+    AliLog::SetClassDebugLevel(ClassName(), AliLog::kDebug+1);
+    AliInfo(Form("Called with option %s.", option.Data()));
+  }
+  else if (option.Contains("debug"))
+  {
+    printf("Enabling debug mode for %s\n", ClassName());
     AliLog::SetClassDebugLevel(ClassName(), AliLog::kDebug);
     AliInfo(Form("Called with option %s.", option.Data()));
   }
@@ -236,6 +242,9 @@ TTree* AliSelector::GetKinematics()
     TString fileName(fTree->GetCurrentFile()->GetName());
     fileName.ReplaceAll("AliESDs", "Kinematics");
 
+    // temporary workaround for PROOF bug #18505
+    fileName.ReplaceAll("#Kinematics.root#Kinematics.root", "#Kinematics.root");
+
     AliDebug(AliLog::kInfo, Form("Opening %s", fileName.Data()));
 
     fKineFile = TFile::Open(fileName);
index 1f42b4112278c8c2574e9a0636ca6bbbeeb7fa6b..e732ec9f55e7d45a6fdb181e24b902c053d9314b 100644 (file)
@@ -58,7 +58,10 @@ Bool_t AliSelectorRL::Process(Long64_t entry)
     return kFALSE;
 
   if (fRunLoader)
-    fRunLoader->GetEvent(entry);
+  {
+    if (fRunLoader->GetEvent(entry) != 0)
+      return kFALSE;
+  }
 
   return kTRUE;
 }
@@ -93,12 +96,6 @@ AliRunLoader* AliSelectorRL::GetRunLoader()
     if (!fRunLoader)
       return 0;
 
-    if (fRunLoader->LoadgAlice() != 0)
-    {
-      delete fRunLoader;
-      fRunLoader = 0;
-      return 0;
-    }
     fRunLoader->GetEvent(fTree->GetTree()->GetReadEntry());
   }
 
index a9ec88036e51ac3dc70075b92d062f1fc74ef4b8..500d6bc747232aec2cc2289f59aafe0bbeebe1c5 100644 (file)
@@ -1,13 +1,13 @@
 void SETUP()
 {
    // Load some ROOT libraries
-   gSystem->Load("libEG");
-   gSystem->Load("libGeom");
+   CheckLoadLibrary("libEG");
+   CheckLoadLibrary("libGeom");
 
    // Load the ESD library
-   gSystem->Load("libESD");
+   CheckLoadLibrary("libESD");
 
-   gSystem->Load("libPWG0base");
+   CheckLoadLibrary("libPWG0base");
 
    // Set the include paths
    gROOT->ProcessLine(".include PWG0base");
@@ -15,3 +15,13 @@ void SETUP()
    // Set our location, so that other packages can find us
    gSystem->Setenv("PWG0base_INCLUDE", "PWG0base");
 }
+
+Int_t CheckLoadLibrary(const char* library)
+{
+  // checks if a library is already loaded, if not loads the library
+
+  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
+    return 1;
+
+  return gSystem->Load(library);
+}
index ab015beb4cf5c8c50be4011bccca05e5f5137784..aac03604f6caf09baf9bb7cb92214f045f69f048 100644 (file)
@@ -1,14 +1,34 @@
 void SETUP()
 {
    // we assume PWG0base (and thus ESD) already loaded
+   CheckLoadLibrary("libMinuit");
 
    // this package depends on STEER
-   gSystem->Load("libVMC");
-   gSystem->Load("libMinuit");
-   gSystem->Load("libSTEER");
+   CheckLoadLibrary("libVMC");
+   CheckLoadLibrary("libMinuit");
+   CheckLoadLibrary("libSTEER");
 
-   gSystem->Load("libPWG0dep");
+   CheckLoadLibrary("libPWG0dep");
+
+   // more packages to access the alice event header
+   CheckLoadLibrary("libEVGEN");
+   CheckLoadLibrary("libFASTSIM");
+   CheckLoadLibrary("libmicrocern");
+   CheckLoadLibrary("libpdf");
+   CheckLoadLibrary("libpythia6");
+   CheckLoadLibrary("libEGPythia6");
+   CheckLoadLibrary("libAliPythia6");
 
    // Set the Include paths
    gROOT->ProcessLine(".include PWG0dep");
 }
+
+Int_t CheckLoadLibrary(const char* library)
+{
+  // checks if a library is already loaded, if not loads the library
+
+  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
+    return 1;
+
+  return gSystem->Load(library);
+}
diff --git a/PWG0/PWG0Helper.C b/PWG0/PWG0Helper.C
new file mode 100644 (file)
index 0000000..41273e1
--- /dev/null
@@ -0,0 +1,175 @@
+/* $Id$ */
+
+// Helper macros can be found in this file
+// A set of them can be used to connect to proof and execute selectors.
+
+TVirtualProof* connectProof(const char* proofServer)
+{
+  TVirtualProof* proof = TProof::Open(proofServer);
+
+  if (!proof)
+  {
+    printf("ERROR: PROOF connection not established.\n");
+    return 0;
+  }
+
+  proof->SetParallel(20);
+
+  // enable the new packetizer
+  //proof->AddInput(new TNamed("PROOF_Packetizer", "TPacketizerProgressive"));
+
+  proof->ClearInput();
+
+  return proof;
+}
+
+Bool_t prepareQuery(TString libraries, TString packages, Bool_t useAliRoot)
+{
+  // if not proof load libraries
+  if (!gProof)
+  {
+    TObjArray* librariesList = libraries.Tokenize(";");
+    for (Int_t i=0; i<librariesList->GetEntries(); ++i)
+    {
+      TObjString* str = dynamic_cast<TObjString*> (librariesList->At(i));
+      if (!str)
+        continue;
+
+      printf("Loading %s...", str->String().Data());
+      Int_t result = CheckLoadLibrary(str->String());
+      if (result < 0)
+      {
+        printf("failed\n");
+        //return kFALSE;
+      }
+      else
+        printf("succeeded\n");
+    }
+  }
+  else
+  {
+    if (useAliRoot)
+      ProofEnableAliRoot();
+
+    TObjArray* packagesList = packages.Tokenize(";");
+    for (Int_t i=0; i<packagesList->GetEntries(); ++i)
+    {
+      TObjString* str = dynamic_cast<TObjString*> (packagesList->At(i));
+      if (!str)
+        continue;
+
+      if (!EnablePackageLocal(str->String()))
+      {
+        printf("Loading of package %s locally failed\n", str->String().Data());
+        return kFALSE;
+      }
+
+      if (gProof->EnablePackage(str->String()))
+      {
+        printf("Loading of package %s failed\n", str->String().Data());
+        return kFALSE;
+      }
+    }
+ }
+
+ return kTRUE;
+}
+
+Int_t executeQuery(TChain* chain, TList* inputList, TString selectorName, const char* option = "")
+{
+  if (!gProof)
+    chain->GetUserInfo()->AddAll(inputList);
+  else
+  {
+    for (Int_t i=0; i<inputList->GetEntries(); ++i)
+      gProof->AddInput(inputList->At(i));
+  }
+
+  TStopwatch timer;
+  timer.Start();
+
+  Long64_t result = -1;
+
+  if (gProof)
+    result = chain->MakeTDSet()->Process(selectorName, option);
+  else
+    result = chain->Process(selectorName, option);
+
+  if (result < 0)
+    printf("ERROR: Executing process failed with %d.\n", result);
+
+  timer.Stop();
+  timer.Print();
+
+  return result;
+}
+
+void ProofEnableAliRoot()
+{
+  // enables a locally deployed AliRoot in a PROOF cluster
+
+  /* executes the following commands on each node:
+     gSystem->Setenv("ALICE_ROOT", "/home/alicecaf/ALICE/aliroot-head")
+     gSystem->AddIncludePath("/home/alicecaf/ALICE/aliroot-head/include");
+     gSystem->SetDynamicPath(Form("%s:%s", gSystem->GetDynamicPath(), "/home/alicecaf/ALICE/aliroot-head/lib/tgt_linux"))
+     gSystem->Load("libMinuit");
+     gROOT->Macro("$ALICE_ROOT/macros/loadlibs.C");
+  */
+
+  const char* location = "/home/alicecaf/ALICE/aliroot-head";
+
+  gProof->Exec(Form("gSystem->Setenv(\"ALICE_ROOT\", \"%s\")", location), kTRUE);
+  gProof->AddIncludePath(Form("%s/include", location));
+  gProof->AddDynamicPath(Form("%s/lib/tgt_linux", location));
+
+  // load all libraries
+  gProof->Exec("gSystem->Load(\"libMinuit\")");
+  gProof->Exec("gROOT->Macro(\"$ALICE_ROOT/macros/loadlibs.C\")");
+}
+
+Bool_t EnablePackageLocal(const char* package)
+{
+  printf("Enabling package %s locally...\n", package);
+
+  if (!gSystem->cd(package))
+    return kFALSE;
+
+  gROOT->ProcessLine(".x PROOF-INF/SETUP.C");
+  gSystem->cd("..");
+
+  return kTRUE;
+}
+
+Int_t CheckLoadLibrary(const char* library)
+{
+  // checks if a library is already loaded, if not loads the library
+
+  if (strlen(gSystem->GetLibraries(Form("%s.so", library), "", kFALSE)) > 0)
+    return 1;
+
+  return gSystem->Load(library);
+}
+
+void redeployPackages(const char* proofServer, Bool_t localAliRoot = kTRUE)
+{
+  // deploys PWG0base and PWG0dep (the latter only when localAliRoot is true) that are expected in $ALICE_ROOT
+  // when localAliRoot is false ESD.par is also deployed
+
+  TProof::Reset(proofServer);
+  TVirtualProof* proof = TProof::Open(proofServer);
+  proof->ClearPackages();
+
+  if (localAliRoot)
+    ProofEnableAliRoot();
+  else
+  {
+    proof->UploadPackage("$ALICE_ROOT/ESD.par");
+    proof->EnablePackage("ESD");
+  }
+
+  proof->UploadPackage("$ALICE_ROOT/PWG0base.par");
+  proof->EnablePackage("PWG0base");
+
+  proof->UploadPackage("$ALICE_ROOT/PWG0dep.par");
+  proof->EnablePackage("PWG0dep");
+}
index 017853bdd3dca1eeeb9ad57ec9a9f5a00d8ede4c..c068884b28a6977ed0dd28b97188ccd96b50f0a6 100644 (file)
@@ -313,6 +313,9 @@ void AlidNdEtaAnalysisESDSelector::Terminate()
   if (fEsdTrackCuts)
     fEsdTrackCuts->SaveHistograms("esd_tracks_cuts");
 
+  if (fdNdEtaCorrection)
+    fdNdEtaCorrection->SaveHistograms();
+
   fout->Write();
   fout->Close();
 }
index 763df03a8a1d7a9e7ca16e0e3002d59cb49b54e8..fd7f46f0356b7c16628ddb0f27acf4bd510e84c4 100644 (file)
@@ -16,6 +16,7 @@
 #include <AliLog.h>
 #include <AliGenEventHeader.h>
 #include <AliHeader.h>
+#include <AliStack.h>
 
 #include "dNdEta/dNdEtaAnalysis.h"
 #include "AliPWG0Helper.h"
@@ -51,6 +52,9 @@ void AlidNdEtaAnalysisMCSelector::SlaveBegin(TTree * tree)
   AliSelectorRL::SlaveBegin(tree);
 
   fdNdEtaAnalysis = new dNdEtaAnalysis("dndeta", "dndeta");
+  fVertex = new TH3F("vertex_check", "vertex_check", 50, -50, 50, 50, -50, 50, 50, -50, 50);
+  fPartEta = new TH1F("dndeta_check", "dndeta_check", 120, -6, 6);
+  fPartEta->Sumw2();
 }
 
 void AlidNdEtaAnalysisMCSelector::Init(TTree *tree)
@@ -58,10 +62,6 @@ void AlidNdEtaAnalysisMCSelector::Init(TTree *tree)
   AliSelectorRL::Init(tree);
 
   tree->SetBranchStatus("ESD", 0);
-
-  fVertex = new TH3F("vertex_check", "vertex_check", 50, -50, 50, 50, -50, 50, 50, -50, 50);
-  fPartEta = new TH1F("dndeta_check", "dndeta_check", 120, -6, 6);
-  fPartEta->Sumw2();
 }
 
 Bool_t AlidNdEtaAnalysisMCSelector::Process(Long64_t entry)
@@ -71,10 +71,10 @@ Bool_t AlidNdEtaAnalysisMCSelector::Process(Long64_t entry)
   if (AliSelectorRL::Process(entry) == kFALSE)
     return kFALSE;
 
-  TTree* particleTree = GetKinematics();
-  if (!particleTree)
+  AliStack* stack = GetStack();
+  if (!stack)
   {
-    AliDebug(AliLog::kError, "Kinematics not available");
+    AliDebug(AliLog::kError, "Stack not available");
     return kFALSE;
   }
 
@@ -91,25 +91,12 @@ Bool_t AlidNdEtaAnalysisMCSelector::Process(Long64_t entry)
   TArrayF vtxMC(3);
   genHeader->PrimaryVertex(vtxMC);
 
-  particleTree->SetBranchStatus("*", 0);
-  particleTree->SetBranchStatus("fDaughter[2]", 1);
-  particleTree->SetBranchStatus("fPdgCode", 1);
-  particleTree->SetBranchStatus("fPx", 1);
-  particleTree->SetBranchStatus("fPy", 1);
-  particleTree->SetBranchStatus("fPz", 1);
-  particleTree->SetBranchStatus("fVx", 1);
-  particleTree->SetBranchStatus("fVy", 1);
-  particleTree->SetBranchStatus("fVz", 1);
-
-  TParticle* particle = 0;
-  particleTree->SetBranchAddress("Particles", &particle);
-
-  Int_t nPrim  = header->GetNprimary();
-  Int_t nTotal = header->GetNtrack();
+  // loop over mc particles
+  Int_t nPrim  = stack->GetNprimary();
 
-  for (Int_t i_mc = nTotal - nPrim; i_mc < nTotal; ++i_mc)
+  for (Int_t iMc = 0; iMc < nPrim; ++iMc)
   {
-    particleTree->GetEntry(i_mc);
+    TParticle* particle = stack->Particle(iMc);
 
     if (!particle)
       continue;
@@ -117,7 +104,7 @@ Bool_t AlidNdEtaAnalysisMCSelector::Process(Long64_t entry)
     if (AliPWG0Helper::IsPrimaryCharged(particle, nPrim) == kFALSE)
       continue;
 
-    AliDebug(AliLog::kDebug+1, Form("Accepted primary %d, unique ID: %d", i_mc, particle->GetUniqueID()));
+    AliDebug(AliLog::kDebug+1, Form("Accepted primary %d, unique ID: %d", iMc, particle->GetUniqueID()));
 
     fdNdEtaAnalysis->FillTrack(vtxMC[2], particle->Eta(), particle->Pt(), 1);
     fVertex->Fill(particle->Vx(), particle->Vy(), particle->Vz());
@@ -172,15 +159,18 @@ void AlidNdEtaAnalysisMCSelector::Terminate()
   fout->Write();
   fout->Close();
 
-  fPartEta->Scale(1.0/fEvents);
-  fPartEta->Scale(1.0/fPartEta->GetBinWidth(1));
+  if (fPartEta)
+  {
+    fPartEta->Scale(1.0/fEvents);
+    fPartEta->Scale(1.0/fPartEta->GetBinWidth(1));
 
-  TCanvas* canvas = new TCanvas("control", "control", 900, 450);
-  canvas->Divide(2, 1);
+    TCanvas* canvas = new TCanvas("control", "control", 900, 450);
+    canvas->Divide(2, 1);
 
-  canvas->cd(1);
-  fVertex->Draw();
+    canvas->cd(1);
+    fVertex->Draw();
 
-  canvas->cd(2);
-  fPartEta->Draw();
+    canvas->cd(2);
+    fPartEta->Draw();
+  }
 }
index 7920018069b6a9cb5a194e9461728fbb896c652c..53f0a2303bfe3b2ae398405fde62c0cd43950712 100644 (file)
@@ -85,6 +85,20 @@ Bool_t AlidNdEtaCorrectionSelector::SignOK(TParticlePDG* particle)
   return kTRUE;
 }
 
+void AlidNdEtaCorrectionSelector::ReadUserObjects(TTree* tree)
+{
+  // read the user objects, called from slavebegin and begin
+
+  if (!fEsdTrackCuts && fInput)
+    fEsdTrackCuts = dynamic_cast<AliESDtrackCuts*> (fInput->FindObject("AliESDtrackCuts"));
+
+  if (!fEsdTrackCuts && tree)
+    fEsdTrackCuts = dynamic_cast<AliESDtrackCuts*> (tree->GetUserInfo()->FindObject("AliESDtrackCuts"));
+
+  if (!fEsdTrackCuts)
+     AliDebug(AliLog::kError, "ERROR: Could not read EsdTrackCuts from input list.");
+}
+
 void AlidNdEtaCorrectionSelector::Begin(TTree * tree)
 {
   // The Begin() function is called at the start of the query.
@@ -93,6 +107,8 @@ void AlidNdEtaCorrectionSelector::Begin(TTree * tree)
 
   AliSelectorRL::Begin(tree);
 
+  ReadUserObjects(tree);
+
   TString option = GetOption();
   AliInfo(Form("Called with option %s.", option.Data()));
 
@@ -116,13 +132,9 @@ void AlidNdEtaCorrectionSelector::SlaveBegin(TTree * tree)
 
   AliSelectorRL::SlaveBegin(tree);
 
-  fdNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
-
-  if (fTree)
-    fEsdTrackCuts = dynamic_cast<AliESDtrackCuts*> (fTree->GetUserInfo()->FindObject("AliESDtrackCuts"));
+  ReadUserObjects(tree);
 
-  if (!fEsdTrackCuts)
-    AliDebug(AliLog::kError, "ERROR: Could not read EsdTrackCuts from user info");
+  fdNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
 
   fPIDParticles = new TH1F("pid_particles", "PID of generated primary particles", 10001, -5000.5, 5000.5);
   fPIDTracks = new TH1F("pid_tracks", "MC PID of reconstructed tracks", 10001, -5000.5, 5000.5);
@@ -164,6 +176,8 @@ Bool_t AlidNdEtaCorrectionSelector::Process(Long64_t entry)
     return kFALSE;
   }
 
+  gDebug = 2;
+
   AliHeader* header = GetHeader();
   if (!header)
   {
@@ -334,7 +348,8 @@ void AlidNdEtaCorrectionSelector::Terminate()
 
   TFile* fout = new TFile(Form("correction_map%s.root", GetOption()), "RECREATE");
 
-  fEsdTrackCuts->SaveHistograms("esd_track_cuts");
+  if (fEsdTrackCuts)
+    fEsdTrackCuts->SaveHistograms("esd_track_cuts");
   fdNdEtaCorrection->SaveHistograms();
 
   fout->Write();
@@ -342,31 +357,37 @@ void AlidNdEtaCorrectionSelector::Terminate()
 
   fdNdEtaCorrection->DrawHistograms();
 
-  new TCanvas("pidcanvas", "pidcanvas", 500, 500);
-
-  fPIDParticles->Draw();
-  fPIDTracks->SetLineColor(2);
-  fPIDTracks->Draw("SAME");
-
-  TDatabasePDG* pdgDB = new TDatabasePDG;
+  if (fPIDParticles && fPIDTracks)
+  {
+    new TCanvas("pidcanvas", "pidcanvas", 500, 500);
 
-  for (Int_t i=0; i <= fPIDParticles->GetNbinsX()+1; ++i)
-    if (fPIDParticles->GetBinContent(i) > 0)
-      printf("PDG = %d (%s): generated: %d, reconstructed: %d, ratio: %f\n", (Int_t) fPIDParticles->GetBinCenter(i), pdgDB->GetParticle((Int_t) fPIDParticles->GetBinCenter(i))->GetName(), (Int_t) fPIDParticles->GetBinContent(i), (Int_t) fPIDTracks->GetBinContent(i), ((fPIDTracks->GetBinContent(i) > 0) ? fPIDParticles->GetBinContent(i) / fPIDTracks->GetBinContent(i) : -1));
+    fPIDParticles->Draw();
+    fPIDTracks->SetLineColor(2);
+    fPIDTracks->Draw("SAME");
 
-  delete pdgDB;
-  pdgDB = 0;
+    TDatabasePDG* pdgDB = new TDatabasePDG;
 
-  TCanvas* canvas = new TCanvas("clusters", "clusters", 1000, 500);
-  canvas->Divide(2, 1);
+    for (Int_t i=0; i <= fPIDParticles->GetNbinsX()+1; ++i)
+      if (fPIDParticles->GetBinContent(i) > 0)
+        printf("PDG = %d (%s): generated: %d, reconstructed: %d, ratio: %f\n", (Int_t) fPIDParticles->GetBinCenter(i), pdgDB->GetParticle((Int_t) fPIDParticles->GetBinCenter(i))->GetName(), (Int_t) fPIDParticles->GetBinContent(i), (Int_t) fPIDTracks->GetBinContent(i), ((fPIDTracks->GetBinContent(i) > 0) ? fPIDParticles->GetBinContent(i) / fPIDTracks->GetBinContent(i) : -1));
 
-  canvas->cd(1);
-  fClustersITSPos->Draw();
-  fClustersITSNeg->SetLineColor(kRed);
-  fClustersITSNeg->Draw("SAME");
+    delete pdgDB;
+    pdgDB = 0;
+  }
 
-  canvas->cd(2);
-  fClustersTPCPos->Draw();
-  fClustersTPCNeg->SetLineColor(kRed);
-  fClustersTPCNeg->Draw("SAME");
+  if (fClustersITSPos && fClustersITSNeg && fClustersTPCPos && fClustersTPCNeg)
+  {
+    TCanvas* canvas = new TCanvas("clusters", "clusters", 1000, 500);
+    canvas->Divide(2, 1);
+
+    canvas->cd(1);
+    fClustersITSPos->Draw();
+    fClustersITSNeg->SetLineColor(kRed);
+    fClustersITSNeg->Draw("SAME");
+
+    canvas->cd(2);
+    fClustersTPCPos->Draw();
+    fClustersTPCNeg->SetLineColor(kRed);
+    fClustersTPCNeg->Draw("SAME");
+  }
 }
index fbc7b08c926ebf63e2752dbba280a10258f5753b..bd2479b650de218cc6bd80806ff35ba010b8a07e 100644 (file)
@@ -15,6 +15,7 @@ class AlidNdEtaCorrectionSelector : public AliSelectorRL {
     AlidNdEtaCorrectionSelector();
     virtual ~AlidNdEtaCorrectionSelector();
 
+    void ReadUserObjects(TTree* tree);
     virtual void    Begin(TTree *tree);
     virtual void    SlaveBegin(TTree *tree);
     virtual Bool_t  Process(Long64_t entry);
index ad6ea420f87d51f1b2fcecf80b103d17b6fc91e9..9d46ac534d446f9522bba5e0fcf82d076eab30aa 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "esdTrackCuts/AliESDtrackCuts.h"
 #include "AliPWG0Helper.h"
-#include "AlidNdEtaCorrection.h"
+#include "dNdEta/AlidNdEtaCorrection.h"
 
 ClassImp(AlidNdEtaSystematicsSelector)
 
@@ -498,14 +498,17 @@ void AlidNdEtaSystematicsSelector::Terminate()
     fdNdEtaCorrection[i] = dynamic_cast<AlidNdEtaCorrection*> (fOutput->FindObject(Form("correction_%d", i)));
   fSigmaVertex = dynamic_cast<TH1F*> (fOutput->FindObject("fSigmaVertex"));
 
-  TDatabasePDG* pdgDB = new TDatabasePDG;
+  if (fPIDParticles)
+  {
+    TDatabasePDG* pdgDB = new TDatabasePDG;
 
-  for (Int_t i=0; i <= fPIDParticles->GetNbinsX()+1; ++i)
-    if (fPIDParticles->GetBinContent(i) > 0)
-      printf("PDG = %d (%s): generated: %d, reconstructed: %d, ratio: %f\n", (Int_t) fPIDParticles->GetBinCenter(i), pdgDB->GetParticle((Int_t) fPIDParticles->GetBinCenter(i))->GetName(), (Int_t) fPIDParticles->GetBinContent(i), (Int_t) fPIDTracks->GetBinContent(i), ((fPIDTracks->GetBinContent(i) > 0) ? fPIDParticles->GetBinContent(i) / fPIDTracks->GetBinContent(i) : -1));
+    for (Int_t i=0; i <= fPIDParticles->GetNbinsX()+1; ++i)
+      if (fPIDParticles->GetBinContent(i) > 0)
+        printf("PDG = %d (%s): generated: %d, reconstructed: %d, ratio: %f\n", (Int_t) fPIDParticles->GetBinCenter(i), pdgDB->GetParticle((Int_t) fPIDParticles->GetBinCenter(i))->GetName(), (Int_t) fPIDParticles->GetBinContent(i), (Int_t) fPIDTracks->GetBinContent(i), ((fPIDTracks->GetBinContent(i) > 0) ? fPIDParticles->GetBinContent(i) / fPIDTracks->GetBinContent(i) : -1));
 
-  delete pdgDB;
-  pdgDB = 0;
+    delete pdgDB;
+    pdgDB = 0;
+  }
 
   TFile* fout = TFile::Open("systematics.root", "RECREATE");
 
diff --git a/PWG0/dNdEta/CreatedNdEta.C b/PWG0/dNdEta/CreatedNdEta.C
deleted file mode 100644 (file)
index ec23af4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-// this macro combines the correction and the analysis and draws them
-
-void CreatedNdEta(Bool_t correct = kTRUE, const Char_t* filename = "analysis_esd.root", const char* object = "dndeta")
-{
-  gSystem->Load("libPWG0base");
-
-  AlidNdEtaCorrection* dNdEtaCorrection = 0;
-  if (correct)
-  {
-    dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
-    dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
-    //dNdEtaCorrection->RemoveEdges(2, 0, 2);
-  }
-
-  fdNdEtaAnalysis = new dNdEtaAnalysis(object, object);
-
-  TFile* file = TFile::Open(filename);
-  if (!file)
-  {
-    cout << "Error. File out.root not found" << endl;
-    return;
-  }
-  fdNdEtaAnalysis->LoadHistograms();
-
-  fdNdEtaAnalysis->Finish(dNdEtaCorrection, (correct) ? 0.3 : -1);
-
-  fdNdEtaAnalysis->DrawHistograms();
-}
-
-
index 5b513806bfdeaf541e82227f0637088a4cd272f2..daade40167caa02e7fc7527b6fcd45c0d3d954c1 100644 (file)
@@ -247,12 +247,12 @@ void ptCutoff()
   canvas->SaveAs("ptCutoff.eps");
 }
 
-void TriggerBiasVtxRecon(const char* fileName = "correction_map.root")
+void TriggerBiasVtxRecon(const char* fileName = "correction_map.root", const char* folder = "dndeta_correction")
 {
   TFile* file = TFile::Open(fileName);
 
-  TH2* corrTrigger = dynamic_cast<TH2*> (file->Get("dndeta_correction/corr_trigger"));
-  TH2* corrVtx = dynamic_cast<TH2*> (file->Get("dndeta_correction/corr_vtxReco"));
+  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)));
 
   Prepare2DPlot(corrTrigger);
   corrTrigger->SetTitle("a) Trigger bias correction");
@@ -549,15 +549,15 @@ void Track2Particle2DCreatePlots(const char* fileName = "correction_map.root")
   meas->GetXaxis()->SetRange(0, 0);
 }
 
-void Track2Particle2D(const char* fileName = "correction_map.root")
+void Track2Particle2D(const char* fileName = "correction_map.root", const char* folder = "dndeta_correction")
 {
   gSystem->Load("libPWG0base");
 
   Track2Particle2DCreatePlots(fileName);
 
-  TH2* corrYX = dynamic_cast<TH2*> (gROOT->FindObject("gene_nTrackToNPart_yx_div_meas_nTrackToNPart_yx"));
-  TH2* corrZX = dynamic_cast<TH2*> (gROOT->FindObject("gene_nTrackToNPart_zx_div_meas_nTrackToNPart_zx"));
-  TH2* corrZY = dynamic_cast<TH2*> (gROOT->FindObject("gene_nTrackToNPart_zy_div_meas_nTrackToNPart_zy"));
+  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)));
 
   /* this reads them from the file
   TH2* corrYX = dynamic_cast<TH2*> (file->Get("dndeta_correction/gene_nTrackToNPart_yx_div_meas_nTrackToNPart_yx"));
index 082407a72257f44a20cea00c41ae89d23c7c9c8a..2285ab3a6a7387fb976adefcbe62d18b8ab3db42 100644 (file)
@@ -693,7 +693,7 @@ TH1F* Sigma2VertexSimulation()
     return;
   }
 
-  TH1F* ratio = new TH1F("sigmavertexsimulation_ratio", "sigmavertexsimulation_ratio;Nsigma;% included 3 sigma / % included n sigma", sigmavertex->GetNbinsX(), sigmavertex->GetXaxis()->GetXmin(), sigmavertex->GetXaxis()->GetXmax());
+  TH1F* ratio = new TH1F("sigmavertexsimulation_ratio", "sigmavertexsimulation_ratio;N#sigma;% included #sigma / % included n #sigma", sigmavertex->GetNbinsX(), sigmavertex->GetXaxis()->GetXmin(), sigmavertex->GetXaxis()->GetXmax());
 
   for (Int_t i=1; i<=sigmavertex->GetNbinsX(); ++i)
     ratio->SetBinContent(i, sigmavertex->GetBinContent(sigmavertex->GetXaxis()->FindBin(3)) / sigmavertex->GetBinContent(i));
@@ -723,20 +723,28 @@ void Sigma2VertexCompare()
   ratio1->SetMarkerStyle(0);
   ratio2->SetMarkerStyle(0);
 
-  TLegend* legend = new TLegend(0.647177,0.775424,0.961694,0.966102);
+  ratio1->SetLineWidth(2);
+  ratio2->SetLineWidth(2);
+
+  TLegend* legend = new TLegend(0.7, 0.8, 0.95, 0.95);
+  legend->SetFillColor(0);
   legend->AddEntry(ratio1, "Gaussian");
   legend->AddEntry(ratio2, "Simulation");
 
-  ratio1->GetXaxis()->SetTitleOffset(1.5);
+  ratio2->SetTitle("");
+  ratio2->GetYaxis()->SetTitleOffset(1.5);
+  ratio2->GetXaxis()->SetRangeUser(2, 4);
 
   TCanvas* canvas = new TCanvas("Sigma2VertexCompare", "Sigma2VertexCompare", 500, 500);
   InitPad();
 
-  ratio1->Draw();
   ratio2->SetLineColor(kRed);
-  ratio2->Draw("SAME");
+  ratio2->Draw();
+  ratio1->Draw("SAME");
 
   legend->Draw();
+
+  canvas->SaveAs("Sigma2VertexCompare.eps");
 }
 
 void drawSystematics()
index 1913981aa45e8d31035e0a20d0e76ca70a4db37d..c248439bca27e30b5a34e9b0bd76d362bb30a6a7 100644 (file)
@@ -8,11 +8,18 @@
 //
 
 #include "../CreateESDChain.C"
+#include "../PWG0Helper.C"
 
-void makeCorrection2(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t debug = kFALSE, const Char_t* option = "")
+void makeCorrection2(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t debug = kFALSE, Bool_t aProof = kFALSE, const Char_t* option = "")
 {
-  gSystem->Load("libPWG0base");
-  gSystem->Load("libPWG0dep");
+  if (aProof)
+    connectProof("proof01@lxb6046");
+
+  TString libraries("libEG;libGeom;libESD;libPWG0base;libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6");
+  TString packages("PWG0base;PWG0dep");
+
+  if (!prepareQuery(libraries, packages, kTRUE))
+    return;
 
   gROOT->ProcessLine(".L CreateCuts.C");
 
@@ -23,12 +30,14 @@ void makeCorrection2(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t d
     return;
   }
 
+  TList inputList;
+  inputList.Add(esdTrackCuts);
+
   TChain* chain = CreateESDChain(dataDir, nRuns, offset);
-  chain->GetUserInfo()->Add(esdTrackCuts);
 
   TString selector("AlidNdEtaCorrectionSelector.cxx++");
   if (debug != kFALSE)
     selector += "g";
 
-  chain->Process(selector, option);
+  Int_t result = executeQuery(chain, &inputList, selector, option);
 }
index a8d89a45406d3f5dba2d8fc27fcf55c926a9ebf3..703c586283c3d8d507c4c54baef9943e7f26b72e 100644 (file)
@@ -5,11 +5,18 @@
 //
 
 #include "../CreateESDChain.C"
+#include "../PWG0Helper.C"
 
-void makeSystematics(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t debug = kFALSE, const Char_t* option = "")
+void makeSystematics(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t debug = kFALSE, Bool_t aProof = kFALSE, const Char_t* option = "")
 {
-  gSystem->Load("libPWG0base");
-  gSystem->Load("libPWG0dep");
+  if (aProof)
+    connectProof("proof01@lxb6046");
+
+  TString libraries("libEG;libGeom;libESD;libPWG0base;libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6");
+  TString packages("PWG0base;PWG0dep");
+
+  if (!prepareQuery(libraries, packages, kTRUE))
+    return;
 
   gROOT->ProcessLine(".L CreateCuts.C");
 
@@ -20,14 +27,16 @@ void makeSystematics(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t d
     return;
   }
 
+  TList inputList;
+  inputList.Add(esdTrackCuts);
+
   TChain* chain = CreateESDChain(dataDir, nRuns, offset);
-  chain->GetUserInfo()->Add(esdTrackCuts);
 
-  TString selector("AlidNdEtaSystematicsSelector.cxx+");
+  TString selector("AlidNdEtaSystematicsSelector.cxx++");
   if (debug != kFALSE)
     selector += "g";
 
-  chain->Process(selector, option);
+  Int_t result = executeQuery(chain, &inputList, selector, option);
 }
 
 void runAnalysisWithDifferentMaps(Char_t* dataDir, Int_t nRuns=20, Int_t offset = 0, Bool_t debug = kFALSE, Bool_t proof = kFALSE)
index 98701acc326e13aa09d64a77c29005ff9328cede..68b78cad0ddc057c61a798ced2b3cf7817f1cf62 100644 (file)
@@ -5,61 +5,28 @@
 //
 
 #include "../CreateESDChain.C"
+#include "../PWG0Helper.C"
 
-void runMultiplicitySelector(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE)
+TChain* runMultiplicitySelector(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE)
 {
-  TStopwatch timer;
-  timer.Start();
+  if (aProof)
+    connectProof("proof01@lxb6046");
+
+  TString libraries("libEG;libGeom;libESD;libPWG0base");
+  TString packages("PWG0base");
 
-  gSystem->Load("libEG");
-  gSystem->Load("libGeom");
-  gSystem->Load("libESD");
-  gSystem->Load("libPWG0base");
   if (aMC != kFALSE)
-    gSystem->Load("libPWG0dep");
+  {
+    libraries += ";libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6";
+    packages += ";PWG0dep";
+  }
+
+  if (!prepareQuery(libraries, packages, kTRUE))
+    return;
 
-  gROOT->ProcessLine(".L CreatedNdEta.C");
   gROOT->ProcessLine(".L CreateCuts.C");
   gROOT->ProcessLine(".L drawPlots.C");
 
-  TChain* chain = CreateESDChain(data, nRuns, offset);
-  TVirtualProof* proof = 0;
-
-  if (aProof != kFALSE)
-  {
-    proof = TProof::Open("jgrosseo@lxb6046");
-
-    if (!proof)
-    {
-      printf("ERROR: PROOF connection not established.\n");
-      return;
-    }
-
-    if (proof->EnablePackage("ESD"))
-    {
-      printf("ERROR: ESD package could not be enabled.\n");
-      return;
-    }
-
-    if (proof->EnablePackage("PWG0base"))
-    {
-      printf("ERROR: PWG0base package could not be enabled.\n");
-      return;
-    }
-
-    if (aMC != kFALSE)
-    {
-      if (proof->EnablePackage("PWG0dep"))
-      {
-        printf("ERROR: PWG0dep package could not be enabled.\n");
-        return;
-      }
-    }
-
-    //chain->SetProof(proof);
-  }
-
-  // ########################################################
   // selection of esd tracks
   AliESDtrackCuts* esdTrackCuts = CreateTrackCuts();
   if (!esdTrackCuts)
@@ -68,24 +35,20 @@ void runMultiplicitySelector(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_
     return;
   }
 
-  chain->GetUserInfo()->Add(esdTrackCuts);
-  if (proof)
-    proof->AddInput(esdTrackCuts);
+  TList inputList;
+  inputList.Add(esdTrackCuts);
+
+  TChain* chain = CreateESDChain(data, nRuns, offset);
 
   TString selectorName = ((aMC == kFALSE) ? "AliMultiplicityESDSelector" : "AliMultiplicityMCSelector");
   AliLog::SetClassDebugLevel(selectorName, AliLog::kInfo);
 
-  selectorName += ".cxx++";
+  selectorName += ".cxx+";
 
   if (aDebug != kFALSE)
     selectorName += "g";
 
-  Long64_t result = -1;
-
-  if (proof != kFALSE)
-    result = chain->MakeTDSet()->Process(selectorName);
-  else
-    result = chain->Process(selectorName);
+  Int_t result = executeQuery(chain, &inputList, selectorName);
 
   if (result != 0)
   {
@@ -93,7 +56,10 @@ void runMultiplicitySelector(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_
     return;
   }
 
-  timer.Stop();
-  timer.Print();
+  // and draw it
+  if (aMC != kFALSE)
+    MultiplicityMC();
+  else
+    MultiplicityESD();
 }
 
index fe55cb3959a76767627adc597bada5170a00659f..3e2e8895d32612af445fde70b1614ab0c1bc4799 100644 (file)
@@ -9,58 +9,30 @@
 //
 
 #include "../CreateESDChain.C"
+#include "../PWG0Helper.C"
 
-void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE)
+void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kFALSE, Bool_t aDebug = kFALSE, Bool_t aProof = kFALSE, const char* correctionMapFile = "correction_map.root", const char* correctionMapFolder = "dndeta_correction")
 {
-  gSystem->Load("libEG");
-  gSystem->Load("libGeom");
-  gSystem->Load("libESD");
-  gSystem->Load("libPWG0base");
-  if (aMC != kFALSE)
-    gSystem->Load("libPWG0dep");
-
-  gROOT->ProcessLine(".L CreatedNdEta.C");
-  gROOT->ProcessLine(".L CreateCuts.C");
-  gROOT->ProcessLine(".L drawPlots.C");
-
-  TChain* chain = CreateESDChain(data, nRuns, offset);;
-  TVirtualProof* proof = 0;
+  if (aProof)
+    connectProof("proof01@lxb6046");
 
-  if (aProof != kFALSE)
+  TString libraries("libEG;libGeom;libESD;libPWG0base");
+  TString packages("PWG0base");
+  if (aMC != kFALSE)
   {
-    proof = TProof::Open("jgrosseo@lxb6046");
-
-    if (!proof)
-    {
-      printf("ERROR: PROOF connection not established.\n");
-      return;
-    }
-
-    if (proof->EnablePackage("ESD"))
-    {
-      printf("ERROR: ESD package could not be enabled.\n");
-      return;
-    }
+    libraries += ";libVMC;libMinuit;libSTEER;libPWG0dep;libEVGEN;libFASTSIM;libmicrocern;libpdf;libpythia6;libEGPythia6;libAliPythia6";
+    packages += ";PWG0dep";
+  }
 
-    if (proof->EnablePackage("PWG0base"))
-    {
-      printf("ERROR: PWG0base package could not be enabled.\n");
-      return;
-    }
+  if (!prepareQuery(libraries, packages, kTRUE))
+    return;
 
-    if (aMC != kFALSE)
-    {
-      if (proof->EnablePackage("PWG0dep"))
-      {
-        printf("ERROR: PWG0dep package could not be enabled.\n");
-        return;
-      }
-    }
+  //TODO somehow prevent loading several times
+  gROOT->ProcessLine(".L CreateCuts.C");
+  gROOT->ProcessLine(".L drawPlots.C");
 
-    //chain->SetProof(proof);
-  }
+  TChain* chain = CreateESDChain(data, nRuns, offset);
 
-  // ########################################################
   // selection of esd tracks
   AliESDtrackCuts* esdTrackCuts = CreateTrackCuts();
   if (!esdTrackCuts)
@@ -69,20 +41,18 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
     return;
   }
 
-  chain->GetUserInfo()->Add(esdTrackCuts);
-  if (proof)
-    proof->AddInput(esdTrackCuts);
+  TList inputList;
+  inputList.Add(esdTrackCuts);
 
   if (aMC == kFALSE)
   {
-    AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection("dndeta_correction", "dndeta_correction");
-    dNdEtaCorrection->LoadHistograms("correction_map.root","dndeta_correction");
+    AlidNdEtaCorrection* dNdEtaCorrection = new AlidNdEtaCorrection(correctionMapFolder, correctionMapFolder);
+    dNdEtaCorrection->LoadHistograms(correctionMapFile, correctionMapFolder);
     dNdEtaCorrection->ReduceInformation();
-    //dNdEtaCorrection->RemoveEdges(2, 0, 2);
+    dNdEtaCorrection->SetName("dndeta_correction");
+    dNdEtaCorrection->SetTitle("dndeta_correction");
 
-    chain->GetUserInfo()->Add(dNdEtaCorrection);
-    if (proof)
-      proof->AddInput(dNdEtaCorrection);
+    inputList.Add(dNdEtaCorrection);
   }
 
   TString selectorName = ((aMC == kFALSE) ? "AlidNdEtaAnalysisESDSelector" : "AlidNdEtaAnalysisMCSelector");
@@ -93,36 +63,21 @@ void testAnalysis2(Char_t* data, Int_t nRuns=20, Int_t offset=0, Bool_t aMC = kF
   if (aDebug != kFALSE)
     selectorName += "g";
 
-  TStopwatch timer;
-  timer.Start();
-
-  Long64_t result = -1;
+  Int_t result = executeQuery(chain, &inputList, selectorName);
 
-  if (proof != kFALSE)
-    result = chain->MakeTDSet()->Process(selectorName);
-  else
-    result = chain->Process(selectorName);
-
-  if (result != 0)
+  if (result >= 0)
   {
-    printf("ERROR: Executing process failed with %d.\n", result);
-    return;
-  }
-
-  timer.Stop();
-  timer.Print();
+    dNdEtaAnalysis* fdNdEtaAnalysis = new dNdEtaAnalysis("dndeta", "dndeta");
 
-  dNdEtaAnalysis* fdNdEtaAnalysis = new dNdEtaAnalysis("dndeta", "dndeta");
+    TFile* file = TFile::Open(aMC ? "analysis_mc.root" : "analysis_esd.root");
+    if (!file)
+    {
+      cout << "Error. File not found" << endl;
+      return;
+    }
+    fdNdEtaAnalysis->LoadHistograms();
+    fdNdEtaAnalysis->DrawHistograms();
 
-  TFile* file = TFile::Open(aMC ? "analysis_mc.root" : "analysis_esd.root");
-  if (!file)
-  {
-    cout << "Error. File not found" << endl;
-    return;
+    dNdEta(kTRUE);
   }
-  fdNdEtaAnalysis->LoadHistograms();
-  fdNdEtaAnalysis->DrawHistograms();
-
-  dNdEta(kTRUE);
 }
-