Removing obsolete macros
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Feb 2012 16:05:35 +0000 (16:05 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 1 Feb 2012 16:05:35 +0000 (16:05 +0000)
221 files changed:
prod/LHC08d10/CheckESD.C [deleted file]
prod/LHC08d10/Config.C [deleted file]
prod/LHC08d10/JDL [deleted file]
prod/LHC08d10/rec.C [deleted file]
prod/LHC08d10/sim.C [deleted file]
prod/LHC08d10/simrun.C [deleted file]
prod/LHC08d10/tag.C [deleted file]
prod/LHC08d11/CheckESD.C [deleted file]
prod/LHC08d11/Config.C [deleted file]
prod/LHC08d11/JDL [deleted file]
prod/LHC08d11/rec.C [deleted file]
prod/LHC08d11/sim.C [deleted file]
prod/LHC08d11/simrun.C [deleted file]
prod/LHC08d11/tag.C [deleted file]
prod/LHC08d12/CheckESD.C [deleted file]
prod/LHC08d12/Config.C [deleted file]
prod/LHC08d12/JDL [deleted file]
prod/LHC08d12/rec.C [deleted file]
prod/LHC08d12/sim.C [deleted file]
prod/LHC08d12/simrun.C [deleted file]
prod/LHC08d12/tag.C [deleted file]
prod/LHC08d13/CheckESD.C [deleted file]
prod/LHC08d13/Config.C [deleted file]
prod/LHC08d13/JDL [deleted file]
prod/LHC08d13/rec.C [deleted file]
prod/LHC08d13/sim.C [deleted file]
prod/LHC08d13/simrun.C [deleted file]
prod/LHC08d13/tag.C [deleted file]
prod/LHC08d14/CheckESD.C [deleted file]
prod/LHC08d14/Config.C [deleted file]
prod/LHC08d14/JDL [deleted file]
prod/LHC08d14/rec.C [deleted file]
prod/LHC08d14/sim.C [deleted file]
prod/LHC08d14/simrun.C [deleted file]
prod/LHC08d14/tag.C [deleted file]
prod/LHC08d15/CheckESD.C [deleted file]
prod/LHC08d15/Config.C [deleted file]
prod/LHC08d15/JDL [deleted file]
prod/LHC08d15/rec.C [deleted file]
prod/LHC08d15/sim.C [deleted file]
prod/LHC08d15/simrun.C [deleted file]
prod/LHC08d15/tag.C [deleted file]
prod/LHC08d16/CheckESD.C [deleted file]
prod/LHC08d16/Config.C [deleted file]
prod/LHC08d16/JDL [deleted file]
prod/LHC08d16/rec.C [deleted file]
prod/LHC08d16/sim.C [deleted file]
prod/LHC08d16/simrun.C [deleted file]
prod/LHC08d16/tag.C [deleted file]
prod/LHC08d17/CheckESD.C [deleted file]
prod/LHC08d17/Config.C [deleted file]
prod/LHC08d17/JDL [deleted file]
prod/LHC08d17/rec.C [deleted file]
prod/LHC08d17/sim.C [deleted file]
prod/LHC08d17/simrun.C [deleted file]
prod/LHC08d17/tag.C [deleted file]
prod/LHC08d5/Config.C [deleted file]
prod/LHC08d5/JDL [deleted file]
prod/LHC08d5/rec.C [deleted file]
prod/LHC08d5/sim.C [deleted file]
prod/LHC08d5/simrun.C [deleted file]
prod/LHC08d5/tag.C [deleted file]
prod/LHC08d6/Config.C [deleted file]
prod/LHC08d6/JDL [deleted file]
prod/LHC08d6/rec.C [deleted file]
prod/LHC08d6/sim.C [deleted file]
prod/LHC08d6/simrun.C [deleted file]
prod/LHC08d6/tag.C [deleted file]
prod/LHC08d8/CheckESD.C [deleted file]
prod/LHC08d8/Config.C [deleted file]
prod/LHC08d8/JDL [deleted file]
prod/LHC08d8/rec.C [deleted file]
prod/LHC08d8/sim.C [deleted file]
prod/LHC08d8/simrun.C [deleted file]
prod/LHC08d8/tag.C [deleted file]
prod/LHC08d9/CheckESD.C [deleted file]
prod/LHC08d9/Config.C [deleted file]
prod/LHC08d9/JDL [deleted file]
prod/LHC08d9/rec.C [deleted file]
prod/LHC08d9/sim.C [deleted file]
prod/LHC08d9/simrun.C [deleted file]
prod/LHC08d9/tag.C [deleted file]
prod/LHC09a1/CheckESD.C [deleted file]
prod/LHC09a1/Config.C [deleted file]
prod/LHC09a1/ConfigJetAnalysis.C [deleted file]
prod/LHC09a1/ConfigJetAnalysisMC.C [deleted file]
prod/LHC09a1/JDL [deleted file]
prod/LHC09a1/rec.C [deleted file]
prod/LHC09a1/rec2.C [deleted file]
prod/LHC09a1/runAODFilterJets.C [deleted file]
prod/LHC09a1/sim.C [deleted file]
prod/LHC09a1/simrun.C [deleted file]
prod/LHC09a1/tag.C [deleted file]
prod/LHC09a1/validation.sh [deleted file]
prod/LHC09a10/CheckESD.C [deleted file]
prod/LHC09a10/Config.C [deleted file]
prod/LHC09a10/JDL [deleted file]
prod/LHC09a10/rec.C [deleted file]
prod/LHC09a10/sim.C [deleted file]
prod/LHC09a10/simrun.C [deleted file]
prod/LHC09a10/tag.C [deleted file]
prod/LHC09a11/CheckESD.C [deleted file]
prod/LHC09a11/Config.C [deleted file]
prod/LHC09a11/JDL [deleted file]
prod/LHC09a11/rec.C [deleted file]
prod/LHC09a11/sim.C [deleted file]
prod/LHC09a11/simrun.C [deleted file]
prod/LHC09a11/tag.C [deleted file]
prod/LHC09a12/CheckESD.C [deleted file]
prod/LHC09a12/Config.C [deleted file]
prod/LHC09a12/JDL [deleted file]
prod/LHC09a12/rec.C [deleted file]
prod/LHC09a12/sim.C [deleted file]
prod/LHC09a12/simrun.C [deleted file]
prod/LHC09a12/tag.C [deleted file]
prod/LHC09a13/CheckESD.C [deleted file]
prod/LHC09a13/Config.C [deleted file]
prod/LHC09a13/JDL [deleted file]
prod/LHC09a13/rec.C [deleted file]
prod/LHC09a13/sim.C [deleted file]
prod/LHC09a13/simrun.C [deleted file]
prod/LHC09a13/tag.C [deleted file]
prod/LHC09a14/CheckESD.C [deleted file]
prod/LHC09a14/Config.C [deleted file]
prod/LHC09a14/JDL [deleted file]
prod/LHC09a14/rec.C [deleted file]
prod/LHC09a14/sim.C [deleted file]
prod/LHC09a14/simrun.C [deleted file]
prod/LHC09a14/tag.C [deleted file]
prod/LHC09a15/CheckESD.C [deleted file]
prod/LHC09a15/Config.C [deleted file]
prod/LHC09a15/JDL [deleted file]
prod/LHC09a15/rec.C [deleted file]
prod/LHC09a15/sim.C [deleted file]
prod/LHC09a15/simrun.C [deleted file]
prod/LHC09a15/tag.C [deleted file]
prod/LHC09a16/CheckESD.C [deleted file]
prod/LHC09a16/Config.C [deleted file]
prod/LHC09a16/JDL [deleted file]
prod/LHC09a16/rec.C [deleted file]
prod/LHC09a16/sim.C [deleted file]
prod/LHC09a16/simrun.C [deleted file]
prod/LHC09a16/tag.C [deleted file]
prod/LHC09c1/CheckESD.C [deleted file]
prod/LHC09c1/Config.C [deleted file]
prod/LHC09c1/CreateAODfromESD.C [deleted file]
prod/LHC09c1/JDL [deleted file]
prod/LHC09c1/rec.C [deleted file]
prod/LHC09c1/sim.C [deleted file]
prod/LHC09c1/simrun.C [deleted file]
prod/LHC09c1/tag.C [deleted file]
prod/LHC09d1/CheckESD.C [deleted file]
prod/LHC09d1/Config.C [deleted file]
prod/LHC09d1/CreateAODfromESD.C [deleted file]
prod/LHC09d1/JDL [deleted file]
prod/LHC09d1/rec.C [deleted file]
prod/LHC09d1/sim.C [deleted file]
prod/LHC09d1/simrun.C [deleted file]
prod/LHC09d1/tag.C [deleted file]
prod/LHC09d2/CheckESD.C [deleted file]
prod/LHC09d2/Config.C [deleted file]
prod/LHC09d2/CreateAODfromESD.C [deleted file]
prod/LHC09d2/JDL [deleted file]
prod/LHC09d2/rec.C [deleted file]
prod/LHC09d2/sim.C [deleted file]
prod/LHC09d2/simrun.C [deleted file]
prod/LHC09d2/tag.C [deleted file]
prod/LHC09d3/CheckESD.C [deleted file]
prod/LHC09d3/Config.C [deleted file]
prod/LHC09d3/CreateAODfromESD.C [deleted file]
prod/LHC09d3/JDL [deleted file]
prod/LHC09d3/rec.C [deleted file]
prod/LHC09d3/sim.C [deleted file]
prod/LHC09d3/simrun.C [deleted file]
prod/LHC09d3/tag.C [deleted file]
prod/LHC09d4/CheckESD.C [deleted file]
prod/LHC09d4/Config.C [deleted file]
prod/LHC09d4/CreateAODfromESD.C [deleted file]
prod/LHC09d4/JDL [deleted file]
prod/LHC09d4/rec.C [deleted file]
prod/LHC09d4/sim.C [deleted file]
prod/LHC09d4/simrun.C [deleted file]
prod/LHC09d4/tag.C [deleted file]
prod/LHC09d5/CheckESD.C [deleted file]
prod/LHC09d5/Config.C [deleted file]
prod/LHC09d5/CreateAODfromESD.C [deleted file]
prod/LHC09d5/JDL [deleted file]
prod/LHC09d5/rec.C [deleted file]
prod/LHC09d5/sim.C [deleted file]
prod/LHC09d5/simrun.C [deleted file]
prod/LHC09d5/tag.C [deleted file]
prod/LHC09d6/CheckESD.C [deleted file]
prod/LHC09d6/Config.C [deleted file]
prod/LHC09d6/CreateAODfromESD.C [deleted file]
prod/LHC09d6/JDL [deleted file]
prod/LHC09d6/rec.C [deleted file]
prod/LHC09d6/sim.C [deleted file]
prod/LHC09d6/simrun.C [deleted file]
prod/LHC09d6/tag.C [deleted file]
prod/acrcaf/clean/clean.C [deleted file]
prod/acrcaf/qa.sh [deleted file]
prod/acrcaf/qa/qa.C [deleted file]
prod/acrcaf/rec.sh [deleted file]
prod/acrcaf/reco/prepareAlienCollection.sh [deleted file]
prod/acrcaf/reco/rec.C [deleted file]
prod/acrcaf/reco/runProof.C [deleted file]
prod/cosmic/MergeQAMerged.C [deleted file]
prod/cosmic/qasummary.C [deleted file]
prod/cosmic/rawqa.C [deleted file]
prod/cosmic/rawqa.sh [deleted file]
prod/cosmic/rec.C [deleted file]
prod/cosmic/rec.sh [deleted file]
prod/cosmic/recpointqa.C [deleted file]
prod/cosmic/recpointqa.sh [deleted file]
prod/fpprod/Config.C [deleted file]
prod/fpprod/README [deleted file]
prod/fpprod/aod.C [deleted file]
prod/fpprod/check.C [deleted file]
prod/fpprod/rec.C [deleted file]
prod/fpprod/runtest.sh [deleted file]
prod/fpprod/sim.C [deleted file]

diff --git a/prod/LHC08d10/CheckESD.C b/prod/LHC08d10/CheckESD.C
deleted file mode 100644 (file)
index 4bf5317..0000000
+++ /dev/null
@@ -1,694 +0,0 @@
-#if !defined( __CINT__) || defined(__MAKECINT__)\r
-#include <TROOT.h>\r
-#include <TFile.h>\r
-#include <TError.h>\r
-#include <TH1.h>\r
-#include <TH2.h>\r
-#include <TF1.h>\r
-#include <TCanvas.h>\r
-#include <TVector3.h>\r
-#include <TPDGCode.h>\r
-#include <TParticle.h>\r
-\r
-#include "AliRunLoader.h"\r
-#include "AliLoader.h"\r
-#include "AliESDEvent.h"\r
-#include "AliESDv0.h"\r
-#include "AliESDcascade.h"\r
-#include "AliESDMuonTrack.h"\r
-#include "AliESDCaloCluster.h"\r
-#include "AliRun.h"\r
-#include "AliStack.h"\r
-#include "AliHeader.h"\r
-#include "AliGenEventHeader.h"\r
-#include "AliPID.h"\r
-#endif\r
-\r
-\r
-TH1F* CreateHisto(const char* name, const char* title, \r
-                 Int_t nBins, Double_t xMin, Double_t xMax,\r
-                 const char* xLabel = NULL, const char* yLabel = NULL)\r
-{\r
-// create a histogram\r
-\r
-  TH1F* result = new TH1F(name, title, nBins, xMin, xMax);\r
-  result->SetOption("E");\r
-  if (xLabel) result->GetXaxis()->SetTitle(xLabel);\r
-  if (yLabel) result->GetYaxis()->SetTitle(yLabel);\r
-  result->SetMarkerStyle(kFullCircle);\r
-  return result;\r
-}\r
-\r
-TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec)\r
-{\r
-// create an efficiency histogram\r
-\r
-  Int_t nBins = hGen->GetNbinsX();\r
-  TH1F* hEff = (TH1F*) hGen->Clone("hEff");\r
-  hEff->SetTitle("");\r
-  hEff->SetStats(kFALSE);\r
-  hEff->SetMinimum(0.);\r
-  hEff->SetMaximum(110.);\r
-  hEff->GetYaxis()->SetTitle("#epsilon [%]");\r
-\r
-  for (Int_t iBin = 0; iBin <= nBins; iBin++) {\r
-    Double_t nGen = hGen->GetBinContent(iBin);\r
-    Double_t nRec = hRec->GetBinContent(iBin);\r
-    if (nGen > 0) {\r
-      Double_t eff = nRec/nGen;\r
-      hEff->SetBinContent(iBin, 100. * eff);\r
-      Double_t error = sqrt(eff*(1.-eff) / nGen);\r
-      if (error == 0) error = 0.0001;\r
-      hEff->SetBinError(iBin, 100. * error);\r
-    } else {\r
-      hEff->SetBinContent(iBin, -100.);\r
-      hEff->SetBinError(iBin, 0);\r
-    }\r
-  }\r
-\r
-  return hEff;\r
-}\r
-\r
-Bool_t FitHisto(TH1* histo, Double_t& res, Double_t& resError)\r
-{\r
-// fit a gaussian to a histogram\r
-\r
-  static TF1* fitFunc = new TF1("fitFunc", "gaus");\r
-  fitFunc->SetLineWidth(2);\r
-  fitFunc->SetFillStyle(0);\r
-  Double_t maxFitRange = 2;\r
-\r
-  if (histo->Integral() > 50) {\r
-    Float_t mean = histo->GetMean();\r
-    Float_t rms = histo->GetRMS();\r
-    fitFunc->SetRange(mean - maxFitRange*rms, mean + maxFitRange*rms);\r
-    fitFunc->SetParameters(mean, rms);\r
-    histo->Fit(fitFunc, "QRI0");\r
-    histo->GetFunction("fitFunc")->ResetBit(1<<9);\r
-    res = TMath::Abs(fitFunc->GetParameter(2));\r
-    resError = TMath::Abs(fitFunc->GetParError(2));\r
-    return kTRUE;\r
-  }\r
-\r
-  return kFALSE;\r
-}\r
-\r
-\r
-Bool_t CheckESD(const char* gAliceFileName = "galice.root", \r
-               const char* esdFileName = "AliESDs.root")\r
-{\r
-// check the content of the ESD\r
\r
-  // check values\r
-  Int_t    checkNGenLow = 1;\r
-\r
-  Double_t checkEffLow = 0.5;\r
-  Double_t checkEffSigma = 3;\r
-  Double_t checkFakeHigh = 0.5;\r
-  Double_t checkFakeSigma = 3;\r
-\r
-  Double_t checkResPtInvHigh = 5;\r
-  Double_t checkResPtInvSigma = 3;\r
-  Double_t checkResPhiHigh = 10;\r
-  Double_t checkResPhiSigma = 3;\r
-  Double_t checkResThetaHigh = 10;\r
-  Double_t checkResThetaSigma = 3;\r
-\r
-  Double_t checkPIDEffLow = 0.5;\r
-  Double_t checkPIDEffSigma = 3;\r
-  Double_t checkResTOFHigh = 500;\r
-  Double_t checkResTOFSigma = 3;\r
-\r
-  Double_t checkPHOSNLow = 5;\r
-  Double_t checkPHOSEnergyLow = 0.3;\r
-  Double_t checkPHOSEnergyHigh = 1.0;\r
-  Double_t checkEMCALNLow = 50;\r
-  Double_t checkEMCALEnergyLow = 0.05;\r
-  Double_t checkEMCALEnergyHigh = 1.0;\r
-\r
-  Double_t checkMUONNLow = 1;\r
-  Double_t checkMUONPtLow = 0.5;\r
-  Double_t checkMUONPtHigh = 10.;\r
-\r
-  Double_t cutPtV0 = 0.3;\r
-  Double_t checkV0EffLow = 0.02;\r
-  Double_t checkV0EffSigma = 3;\r
-  Double_t cutPtCascade = 0.5;\r
-  Double_t checkCascadeEffLow = 0.01;\r
-  Double_t checkCascadeEffSigma = 3;\r
-\r
-  // open run loader and load gAlice, kinematics and header\r
-  AliRunLoader* runLoader = AliRunLoader::Open(gAliceFileName);\r
-  if (!runLoader) {\r
-    Error("CheckESD", "getting run loader from file %s failed", \r
-           gAliceFileName);\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadgAlice();\r
-  gAlice = runLoader->GetAliRun();\r
-  if (!gAlice) {\r
-    Error("CheckESD", "no galice object found");\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadKinematics();\r
-  runLoader->LoadHeader();\r
-\r
-  // open the ESD file\r
-  TFile* esdFile = TFile::Open(esdFileName);\r
-  if (!esdFile || !esdFile->IsOpen()) {\r
-    Error("CheckESD", "opening ESD file %s failed", esdFileName);\r
-    return kFALSE;\r
-  }\r
-  AliESDEvent * esd = new AliESDEvent;\r
-  TTree* tree = (TTree*) esdFile->Get("esdTree");\r
-  if (!tree) {\r
-    Error("CheckESD", "no ESD tree found");\r
-    return kFALSE;\r
-  }\r
-  esd->ReadFromTree(tree);\r
-\r
-  // efficiency and resolution histograms\r
-  Int_t nBinsPt = 15;\r
-  Float_t minPt = 0.1;\r
-  Float_t maxPt = 3.1;\r
-  TH1F* hGen = CreateHisto("hGen", "generated tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  TH1F* hRec = CreateHisto("hRec", "reconstructed tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  Int_t nGen = 0;\r
-  Int_t nRec = 0;\r
-  Int_t nFake = 0;\r
-\r
-  TH1F* hResPtInv = CreateHisto("hResPtInv", "", 100, -10, 10, \r
-           "(p_{t,rec}^{-1}-p_{t,sim}^{-1}) / p_{t,sim}^{-1} [%]", "N");\r
-  TH1F* hResPhi = CreateHisto("hResPhi", "", 100, -20, 20, \r
-                             "#phi_{rec}-#phi_{sim} [mrad]", "N");\r
-  TH1F* hResTheta = CreateHisto("hResTheta", "", 100, -20, 20, \r
-                               "#theta_{rec}-#theta_{sim} [mrad]", "N");\r
-\r
-  // PID\r
-  Int_t partCode[AliPID::kSPECIES] = \r
-    {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};\r
-  const char* partName[AliPID::kSPECIES+1] = \r
-    {"electron", "muon", "pion", "kaon", "proton", "other"};\r
-  Double_t partFrac[AliPID::kSPECIES] = \r
-    {0.01, 0.01, 0.85, 0.10, 0.05};\r
-  Int_t identified[AliPID::kSPECIES+1][AliPID::kSPECIES];\r
-  for (Int_t iGen = 0; iGen < AliPID::kSPECIES+1; iGen++) {\r
-    for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-      identified[iGen][iRec] = 0;\r
-    }\r
-  }\r
-  Int_t nIdentified = 0;\r
-\r
-  // dE/dx and TOF\r
-  TH2F* hDEdxRight = new TH2F("hDEdxRight", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxRight->SetStats(kFALSE);\r
-  hDEdxRight->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxRight->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxRight->SetMarkerStyle(kFullCircle);\r
-  hDEdxRight->SetMarkerSize(0.4);\r
-  TH2F* hDEdxWrong = new TH2F("hDEdxWrong", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxWrong->SetStats(kFALSE);\r
-  hDEdxWrong->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxWrong->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxWrong->SetMarkerStyle(kFullCircle);\r
-  hDEdxWrong->SetMarkerSize(0.4);\r
-  hDEdxWrong->SetMarkerColor(kRed);\r
-  TH1F* hResTOFRight = CreateHisto("hResTOFRight", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  TH1F* hResTOFWrong = CreateHisto("hResTOFWrong", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  hResTOFWrong->SetLineColor(kRed);\r
-\r
-  // calorimeters\r
-  TH1F* hEPHOS = CreateHisto("hEPHOS", "PHOS", 100, 0, 50, "E [GeV]", "N");\r
-  TH1F* hEEMCAL = CreateHisto("hEEMCAL", "EMCAL", 100, 0, 50, "E [GeV]", "N");\r
-\r
-  // muons\r
-  TH1F* hPtMUON = CreateHisto("hPtMUON", "MUON", 100, 0, 20, \r
-                             "p_{t} [GeV/c]", "N");\r
-\r
-  // V0s and cascades\r
-  TH1F* hMassK0 = CreateHisto("hMassK0", "K^{0}", 100, 0.4, 0.6, \r
-                             "M(#pi^{+}#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambda = CreateHisto("hMassLambda", "#Lambda", 100, 1.0, 1.2, \r
-                                 "M(p#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambdaBar = CreateHisto("hMassLambdaBar", "#bar{#Lambda}", \r
-                                    100, 1.0, 1.2, \r
-                                    "M(#bar{p}#pi^{+}) [GeV/c^{2}]", "N");\r
-  Int_t nGenV0s = 0;\r
-  Int_t nRecV0s = 0;\r
-  TH1F* hMassXi = CreateHisto("hMassXi", "#Xi", 100, 1.2, 1.5, \r
-                             "M(#Lambda#pi) [GeV/c^{2}]", "N");\r
-  TH1F* hMassOmega = CreateHisto("hMassOmega", "#Omega", 100, 1.5, 1.8, \r
-                                "M(#LambdaK) [GeV/c^{2}]", "N");\r
-  Int_t nGenCascades = 0;\r
-  Int_t nRecCascades = 0;\r
-\r
-  // loop over events\r
-  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {\r
-    runLoader->GetEvent(iEvent);\r
-\r
-    // select simulated primary particles, V0s and cascades\r
-    AliStack* stack = gAlice->Stack();\r
-    Int_t nParticles = stack->GetNtrack();\r
-    TArrayF vertex(3);\r
-    runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex);\r
-    TObjArray selParticles;\r
-    TObjArray selV0s;\r
-    TObjArray selCascades;\r
-    for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {\r
-      TParticle* particle = stack->Particle(iParticle);\r
-      if (!particle) continue;\r
-      if (particle->Pt() < 0.001) continue;\r
-      if (TMath::Abs(particle->Eta()) > 0.9) continue;\r
-      TVector3 dVertex(particle->Vx() - vertex[0], \r
-                      particle->Vy() - vertex[1],\r
-                      particle->Vz() - vertex[2]);\r
-      if (dVertex.Mag() > 0.0001) continue;\r
-\r
-      switch (TMath::Abs(particle->GetPdgCode())) {\r
-      case kElectron:\r
-      case kMuonMinus:\r
-      case kPiPlus:\r
-      case kKPlus:\r
-      case kProton: {\r
-       if (particle->Pt() > minPt) {\r
-         selParticles.Add(particle);\r
-         nGen++;\r
-         hGen->Fill(particle->Pt());\r
-       }\r
-       break;\r
-      }\r
-      case kK0Short:\r
-      case kLambda0: {\r
-       if (particle->Pt() > cutPtV0) {\r
-         nGenV0s++;\r
-         selV0s.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      case kXiMinus:\r
-      case kOmegaMinus: {\r
-       if (particle->Pt() > cutPtCascade) {\r
-         nGenCascades++;\r
-         selCascades.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      default: break;\r
-      }\r
-    }\r
-\r
-    // get the event summary data\r
-    tree->GetEvent(iEvent);\r
-    if (!esd) {\r
-      Error("CheckESD", "no ESD object found for event %d", iEvent);\r
-      return kFALSE;\r
-    }\r
-\r
-    // loop over tracks\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfTracks(); iTrack++) {\r
-      AliESDtrack* track = esd->GetTrack(iTrack);\r
-\r
-      // select tracks of selected particles\r
-      Int_t label = TMath::Abs(track->GetLabel());\r
-      if (label > stack->GetNtrack()) continue;     // background\r
-      TParticle* particle = stack->Particle(label);\r
-      if (!selParticles.Contains(particle)) continue;\r
-      if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) continue;\r
-      if (track->GetConstrainedChi2() > 1e9) continue;\r
-      selParticles.Remove(particle);   // don't count multiple tracks\r
-\r
-      nRec++;\r
-      hRec->Fill(particle->Pt());\r
-      if (track->GetLabel() < 0) nFake++;\r
-\r
-      // resolutions\r
-      hResPtInv->Fill(100. * (TMath::Abs(track->GetSigned1Pt()) - 1./particle->Pt()) * \r
-                     particle->Pt());\r
-      hResPhi->Fill(1000. * (track->Phi() - particle->Phi()));\r
-      hResTheta->Fill(1000. * (track->Theta() - particle->Theta()));\r
-\r
-      // PID\r
-      if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) continue;\r
-      Int_t iGen = 5;\r
-      for (Int_t i = 0; i < AliPID::kSPECIES; i++) {\r
-       if (TMath::Abs(particle->GetPdgCode()) == partCode[i]) iGen = i;\r
-      }\r
-      Double_t probability[AliPID::kSPECIES];\r
-      track->GetESDpid(probability);\r
-      Double_t pMax = 0;\r
-      Int_t iRec = 0;\r
-      for (Int_t i = 0; i < AliPID::kSPECIES; i++) {\r
-       probability[i] *= partFrac[i];\r
-       if (probability[i] > pMax) {\r
-         pMax = probability[i];\r
-         iRec = i;\r
-       }\r
-      }\r
-      identified[iGen][iRec]++;\r
-      if (iGen == iRec) nIdentified++;\r
-\r
-      // dE/dx and TOF\r
-      Double_t time[AliPID::kSPECIES];\r
-      track->GetIntegratedTimes(time);\r
-      if (iGen == iRec) {\r
-       hDEdxRight->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFRight->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      } else {\r
-       hDEdxWrong->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFWrong->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      }\r
-    }\r
-\r
-    // loop over muon tracks\r
-    {\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfMuonTracks(); iTrack++) {\r
-      AliESDMuonTrack* muonTrack = esd->GetMuonTrack(iTrack);\r
-      Double_t ptInv = TMath::Abs(muonTrack->GetInverseBendingMomentum());\r
-      if (ptInv > 0.001) {\r
-       hPtMUON->Fill(1./ptInv);\r
-      }\r
-    }\r
-    }\r
-\r
-    // loop over V0s\r
-    for (Int_t iV0 = 0; iV0 < esd->GetNumberOfV0s(); iV0++) {\r
-      AliESDv0* v0 = esd->GetV0(iV0);\r
-      if (v0->GetOnFlyStatus()) continue;\r
-      v0->ChangeMassHypothesis(kK0Short);\r
-      hMassK0->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0);\r
-      hMassLambda->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0Bar);\r
-      hMassLambdaBar->Fill(v0->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(v0->GetNindex())->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(v0->GetPindex())->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      TParticle* particle = stack->Particle(negMother);\r
-      if (!selV0s.Contains(particle)) continue;\r
-      selV0s.Remove(particle);\r
-      nRecV0s++;\r
-    }\r
-\r
-    // loop over Cascades\r
-    for (Int_t iCascade = 0; iCascade < esd->GetNumberOfCascades(); \r
-        iCascade++) {\r
-      AliESDcascade* cascade = esd->GetCascade(iCascade);\r
-      Double_t v0q;\r
-      cascade->ChangeMassHypothesis(v0q,kXiMinus);\r
-      hMassXi->Fill(cascade->GetEffMass());\r
-      cascade->ChangeMassHypothesis(v0q,kOmegaMinus);\r
-      hMassOmega->Fill(cascade->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(cascade->GetNindex())\r
-                                 ->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(cascade->GetPindex())\r
-                                 ->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      Int_t v0Mother = stack->Particle(negMother)->GetMother(0);\r
-      if (v0Mother < 0) continue;\r
-      Int_t bacLabel = TMath::Abs(esd->GetTrack(cascade->GetBindex())\r
-                                 ->GetLabel());\r
-      if (bacLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t bacMother = stack->Particle(bacLabel)->GetMother(0);\r
-      if (v0Mother != bacMother) continue;\r
-      TParticle* particle = stack->Particle(v0Mother);\r
-      if (!selCascades.Contains(particle)) continue;\r
-      selCascades.Remove(particle);\r
-      nRecCascades++;\r
-    }\r
-\r
-    // loop over the clusters\r
-    {\r
-      for (Int_t iCluster=0; iCluster<esd->GetNumberOfCaloClusters(); iCluster++) {\r
-       AliESDCaloCluster * clust = esd->GetCaloCluster(iCluster);\r
-       if (clust->IsPHOS()) hEPHOS->Fill(clust->E());\r
-       if (clust->IsEMCAL()) hEEMCAL->Fill(clust->E());\r
-      }\r
-    }\r
-\r
-  }\r
-\r
-  // perform checks\r
-  if (nGen < checkNGenLow) {\r
-    Warning("CheckESD", "low number of generated particles: %d", Int_t(nGen));\r
-  }\r
-\r
-  TH1F* hEff = CreateEffHisto(hGen, hRec);\r
-\r
-  Info("CheckESD", "%d out of %d tracks reconstructed including %d "\r
-        "fake tracks", nRec, nGen, nFake);\r
-  if (nGen > 0) {\r
-    // efficiency\r
-    Double_t eff = nRec*1./nGen;\r
-    Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGen);\r
-    Double_t fake = nFake*1./nGen;\r
-    Double_t fakeError = TMath::Sqrt(fake*(1.-fake) / nGen);\r
-    Info("CheckESD", "eff = (%.1f +- %.1f) %%  fake = (%.1f +- %.1f) %%",\r
-        100.*eff, 100.*effError, 100.*fake, 100.*fakeError);\r
-\r
-    if (eff < checkEffLow - checkEffSigma*effError) {\r
-      Warning("CheckESD", "low efficiency: (%.1f +- %.1f) %%", \r
-             100.*eff, 100.*effError);\r
-    }\r
-    if (fake > checkFakeHigh + checkFakeSigma*fakeError) {\r
-      Warning("CheckESD", "high fake: (%.1f +- %.1f) %%", \r
-             100.*fake, 100.*fakeError);\r
-    }\r
-\r
-    // resolutions\r
-    Double_t res, resError;\r
-    if (FitHisto(hResPtInv, res, resError)) {\r
-      Info("CheckESD", "relative inverse pt resolution = (%.1f +- %.1f) %%",\r
-          res, resError);\r
-      if (res > checkResPtInvHigh + checkResPtInvSigma*resError) {\r
-       Warning("CheckESD", "bad pt resolution: (%.1f +- %.1f) %%", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResPhi, res, resError)) {\r
-      Info("CheckESD", "phi resolution = (%.1f +- %.1f) mrad", res, resError);\r
-      if (res > checkResPhiHigh + checkResPhiSigma*resError) {\r
-       Warning("CheckESD", "bad phi resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResTheta, res, resError)) {\r
-      Info("CheckESD", "theta resolution = (%.1f +- %.1f) mrad", \r
-          res, resError);\r
-      if (res > checkResThetaHigh + checkResThetaSigma*resError) {\r
-       Warning("CheckESD", "bad theta resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // PID\r
-    if (nRec > 0) {\r
-      Double_t eff = nIdentified*1./nRec;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nRec);\r
-      Info("CheckESD", "PID eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkPIDEffLow - checkPIDEffSigma*effError) {\r
-       Warning("CheckESD", "low PID efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    printf("%9s:", "gen\\rec");\r
-    for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-      printf("%9s", partName[iRec]);\r
-    }\r
-    printf("\n");\r
-    for (Int_t iGen = 0; iGen < AliPID::kSPECIES+1; iGen++) {\r
-      printf("%9s:", partName[iGen]);\r
-      for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-       printf("%9d", identified[iGen][iRec]);\r
-      }\r
-      printf("\n");\r
-    }\r
-\r
-    if (FitHisto(hResTOFRight, res, resError)) {\r
-      Info("CheckESD", "TOF resolution = (%.1f +- %.1f) ps", res, resError);\r
-      if (res > checkResTOFHigh + checkResTOFSigma*resError) {\r
-       Warning("CheckESD", "bad TOF resolution: (%.1f +- %.1f) ps", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // calorimeters\r
-    if (hEPHOS->Integral() < checkPHOSNLow) {\r
-      Warning("CheckESD", "low number of PHOS particles: %d", \r
-             Int_t(hEPHOS->Integral()));\r
-    } else {\r
-      Double_t mean = hEPHOS->GetMean();\r
-      if (mean < checkPHOSEnergyLow) {\r
-       Warning("CheckESD", "low mean PHOS energy: %.1f GeV", mean);\r
-      } else if (mean > checkPHOSEnergyHigh) {\r
-       Warning("CheckESD", "high mean PHOS energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    if (hEEMCAL->Integral() < checkEMCALNLow) {\r
-      Warning("CheckESD", "low number of EMCAL particles: %d", \r
-             Int_t(hEEMCAL->Integral()));\r
-    } else {\r
-      Double_t mean = hEEMCAL->GetMean();\r
-      if (mean < checkEMCALEnergyLow) {\r
-       Warning("CheckESD", "low mean EMCAL energy: %.1f GeV", mean);\r
-      } else if (mean > checkEMCALEnergyHigh) {\r
-       Warning("CheckESD", "high mean EMCAL energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    // muons\r
-    if (hPtMUON->Integral() < checkMUONNLow) {\r
-      Warning("CheckESD", "low number of MUON particles: %d", \r
-             Int_t(hPtMUON->Integral()));\r
-    } else {\r
-      Double_t mean = hPtMUON->GetMean();\r
-      if (mean < checkMUONPtLow) {\r
-       Warning("CheckESD", "low mean MUON pt: %.1f GeV/c", mean);\r
-      } else if (mean > checkMUONPtHigh) {\r
-       Warning("CheckESD", "high mean MUON pt: %.1f GeV/c", mean);\r
-      }\r
-    }\r
-\r
-    // V0s\r
-    if (nGenV0s > 0) {\r
-      Double_t eff = nRecV0s*1./nGenV0s;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenV0s);\r
-      if (effError == 0) effError = checkV0EffLow / TMath::Sqrt(1.*nGenV0s);\r
-      Info("CheckESD", "V0 eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkV0EffLow - checkV0EffSigma*effError) {\r
-       Warning("CheckESD", "low V0 efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    // Cascades\r
-    if (nGenCascades > 0) {\r
-      Double_t eff = nRecCascades*1./nGenCascades;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenCascades);\r
-      if (effError == 0) effError = checkV0EffLow / \r
-                          TMath::Sqrt(1.*nGenCascades);\r
-      Info("CheckESD", "Cascade eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkCascadeEffLow - checkCascadeEffSigma*effError) {\r
-       Warning("CheckESD", "low Cascade efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-  }\r
-\r
-  // draw the histograms if not in batch mode\r
-  if (!gROOT->IsBatch()) {\r
-    new TCanvas;\r
-    hEff->DrawCopy();\r
-    new TCanvas;\r
-    hResPtInv->DrawCopy("E");\r
-    new TCanvas;\r
-    hResPhi->DrawCopy("E");\r
-    new TCanvas;\r
-    hResTheta->DrawCopy("E");\r
-    new TCanvas;\r
-    hDEdxRight->DrawCopy();\r
-    hDEdxWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hResTOFRight->DrawCopy("E");\r
-    hResTOFWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hEPHOS->DrawCopy("E");\r
-    new TCanvas;\r
-    hEEMCAL->DrawCopy("E");\r
-    new TCanvas;\r
-    hPtMUON->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassK0->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambda->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambdaBar->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassXi->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassOmega->DrawCopy("E");\r
-  }\r
-\r
-  // write the output histograms to a file\r
-  TFile* outputFile = TFile::Open("check.root", "recreate");\r
-  if (!outputFile || !outputFile->IsOpen()) {\r
-    Error("CheckESD", "opening output file check.root failed");\r
-    return kFALSE;\r
-  }\r
-  hEff->Write();\r
-  hResPtInv->Write();\r
-  hResPhi->Write();\r
-  hResTheta->Write();\r
-  hDEdxRight->Write();\r
-  hDEdxWrong->Write();\r
-  hResTOFRight->Write();\r
-  hResTOFWrong->Write();\r
-  hEPHOS->Write();\r
-  hEEMCAL->Write();\r
-  hPtMUON->Write();\r
-  hMassK0->Write();\r
-  hMassLambda->Write();\r
-  hMassLambdaBar->Write();\r
-  hMassXi->Write();\r
-  hMassOmega->Write();\r
-  outputFile->Close();\r
-  delete outputFile;\r
-\r
-  // clean up\r
-  delete hGen;\r
-  delete hRec;\r
-  delete hEff;\r
-  delete hResPtInv;\r
-  delete hResPhi;\r
-  delete hResTheta;\r
-  delete hDEdxRight;\r
-  delete hDEdxWrong;\r
-  delete hResTOFRight;\r
-  delete hResTOFWrong;\r
-  delete hEPHOS;\r
-  delete hEEMCAL;\r
-  delete hPtMUON;\r
-  delete hMassK0;\r
-  delete hMassLambda;\r
-  delete hMassLambdaBar;\r
-  delete hMassXi;\r
-  delete hMassOmega;\r
-\r
-  delete esd;\r
-  esdFile->Close();\r
-  delete esdFile;\r
-\r
-  runLoader->UnloadHeader();\r
-  runLoader->UnloadKinematics();\r
-  delete runLoader;\r
-\r
-  // result of check\r
-  Info("CheckESD", "check of ESD was successfull");\r
-  return kTRUE;\r
-}\r
diff --git a/prod/LHC08d10/Config.C b/prod/LHC08d10/Config.C
deleted file mode 100644 (file)
index 3a684df..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-// One can use the configuration macro in compiled mode by\r
-// root [0] gSystem->Load("libgeant321");
-// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
-//                   -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
-// root [0] .x grun.C(1,"Config_PDC07.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TRandom.h>
-#include <TDatime.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenParam.h"
-#include "EVGEN/AliGenMUONlib.h"
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagF.h"
-#include "STRUCT/AliBODY.h"
-#include "STRUCT/AliMAG.h"
-#include "STRUCT/AliABSOv3.h"
-#include "STRUCT/AliDIPOv3.h"
-#include "STRUCT/AliHALLv3.h"
-#include "STRUCT/AliFRAMEv2.h"
-#include "STRUCT/AliSHILv3.h"
-#include "STRUCT/AliPIPEv3.h"
-#include "ITS/AliITSv11Hybrid.h"
-#include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv6T0.h"
-#include "HMPID/AliHMPIDv3.h"
-#include "ZDC/AliZDCv3.h"
-#include "TRD/AliTRDv1.h"
-#include "TRD/AliTRDgeometry.h"
-#include "FMD/AliFMDv1.h"
-#include "MUON/AliMUONv1.h"
-#include "PHOS/AliPHOSv1.h"
-#include "PHOS/AliPHOSSimParam.h"
-#include "PMD/AliPMDv1.h"
-#include "T0/AliT0v1.h"
-#include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv1.h"
-#include "VZERO/AliVZEROv7.h"
-#endif
-
-
-enum PDC07Proc_t
-{
-//--- Heavy Flavour Production ---
-  kCharmPbPb5500,  kCharmpPb8800,  kCharmpp14000,  kCharmpp14000wmi,
-  kD0PbPb5500,     kD0pPb8800,     kD0pp14000,
-  kDPlusPbPb5500,  kDPluspPb8800,  kDPluspp14000,
-  kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
-  // -- Pythia Mb
-  kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kPyJetJet, kBeautyppwmiJet,
-  kPyGammaJetPHOS, kPyJetJetPHOS, kPyJetJetPHOSv2, kPyGammaBremsPHOS,
-  kPyGammaJetEMCAL, kPyJetJetEMCAL, kPyGammaBremsEMCAL, kRunMax
-};
-
-const char * pprRunName[] = {
-  "kCharmPbPb5500",  "kCharmpPb8800",  "kCharmpp14000",  "kCharmpp14000wmi",
-  "kD0PbPb5500",     "kD0pPb8800",     "kD0pp14000",
-  "kDPlusPbPb5500",  "kDPluspPb8800",  "kDPluspp14000",
-  "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi",
-  "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus", "kPyJetJet", "kBeautyppwmiJet",
-  "kPyGammaJetPHOS", "kPyJetJetPHOS",  "kPyJetJetPHOSv2", "kPyGammaBremsPHOS",
-  "kPyGammaJetEMCAL", "kPyJetJetEMCAL", "kPyGammaBremsEMCAL"
-};
-
-
-//--- Decay Mode ---
-enum DecayHvFl_t
-{
-  kNature,  kHadr, kSemiEl, kSemiMu
-};
-//--- Magnetic Field ---
-enum Mag_t
-{
-  kNoField, k5kG, kFieldMax
-};
-//--- Trigger config ---
-enum TrigConf_t
-{
-    kDefaultPPTrig, kDefaultPbPbTrig
-};
-
-const char * TrigConfName[] = {
-    "p-p","Pb-Pb"
-};
-
-//--- Functions ---
-class AliGenPythia ;
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc);
-AliGenPythia *PythiaHard(PDC07Proc_t proc);
-AliGenerator *MbCocktail();
-AliGenerator *PyMbTriggered(Int_t pdg);
-void ProcessEnvironmentVars();
-
-// This part for configuration
-static DecayHvFl_t   decHvFl     = kNature;
-static Mag_t         mag         = k5kG;
-static TrigConf_t    trig        = kDefaultPPTrig; // default pp trigger configuration
-static Int_t         runNumber   = 0;
-static Int_t         eventNumber = 0;
-//========================//
-// Set Random Number seed //
-//========================//
-TDatime dt;
-static UInt_t seed    = dt.Get();
-
-// nEvts = -1  : you get 1 QQbar pair and all the fragmentation and
-//               decay chain
-// nEvts = N>0 : you get N charm / beauty Hadrons
-Int_t nEvts = -1;
-// stars = kTRUE : all heavy resonances and their decay stored
-//       = kFALSE: only final heavy hadrons and their decays stored
-Bool_t stars = kTRUE;
-
-// To be used only with kCharmpp14000wmi and kBeautypp14000wmi
-// To get a "reasonable" agreement with MNR results, events have to be
-// generated with the minimum ptHard set to 2.76 GeV.
-// To get a "perfect" agreement with MNR results, events have to be
-// generated in four ptHard bins with the following relative
-// normalizations:
-//  CHARM
-// 2.76-3 GeV: 25%
-//    3-4 GeV: 40%
-//    4-8 GeV: 29%
-//     >8 GeV:  6%
-//  BEAUTY
-// 2.76-4 GeV:  5%
-//    4-6 GeV: 31%
-//    6-8 GeV: 28%
-//     >8 GeV: 36%
-
-
-Float_t eCMS=5500;
-PDC07Proc_t proc = kPyJetJet;
-//PDC07Proc_t proc = kPyGammaJetEMCAL;
-//PDC07Proc_t proc = kBeautyppwmiJet;
-Int_t nPtHardGJBins = 11;
-Int_t ptHardGJLo[] = {5 ,10,20,30,40,50,60,70,80,90 ,100};
-Int_t ptHardGJHi[] = {10,20,30,40,50,60,70,80,90,100,-1};
-Int_t nPtHardJJBins = 17;
-Int_t ptHardJJLo[] = {2 ,12,16,20,24,29,35,41,50,60,72,86 ,104,124,149,179,215};
-Int_t ptHardJJHi[] = {12,16,20,24,29,35,41,50,60,72,86,104,124,149,179,215,258};
-Float_t ptHardMin =  10.;
-Float_t ptHardMax =  20.;
-Float_t ptGammaPi0Min = 0.;
-Int_t iquenching = 0;
-Float_t qhat = 50.; //for  iquenching equal 1 and 4
-//Float_t medlength = 6.; // for iquenching equal to 4
-Int_t year = 0; //ALICE geometry configuration
-Bool_t pi0FragPhotonInDet = kFALSE ;
-
-// Comment line
-static TString comment;
-
-void Config()
-{
-
-       // Get settings from environment variables
-       ProcessEnvironmentVars();
-       
-       gSystem->Load("liblhapdf.so");      // Parton density functions
-       gSystem->Load("libEGPythia6.so");   // TGenerator interface
-       gSystem->Load("libpythia6.so");     // Pythia
-       gSystem->Load("libAliPythia6.so");  // ALICE specific implementations
-       
-       // libraries required by geant321
-#if defined(__CINT__)
-       gSystem->Load("liblhapdf");
-       gSystem->Load("libEGPythia6");
-       gSystem->Load("libpythia6");
-       gSystem->Load("libAliPythia6");
-       gSystem->Load("libgeant321");
-#endif
-       
-       new TGeant3TGeo("C++ Interface to Geant3");
-       
-       // Output every 100 tracks
-       ((TGeant3*)gMC)->SetSWIT(4,100);
-       
-       //=======================================================================
-       
-       // Run loader
-       AliRunLoader* rl=0x0;
-       rl = AliRunLoader::Open("galice.root",
-                                                       AliConfig::GetDefaultEventFolderName(),
-                                                       "recreate");
-       if (rl == 0x0)
-    {
-               gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
-               return;
-    }
-       rl->SetCompressionLevel(2);
-       rl->SetNumberOfEventsPerFile(1000);
-       gAlice->SetRunLoader(rl);
-       
-       // Set the trigger configuration
-       AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]);
-       cout<<"Trigger configuration is set to  "<<TrigConfName[trig]<<endl;
-       
-       //
-       //=======================================================================
-       // ************* STEERING parameters FOR ALICE SIMULATION **************
-       // --- Specify event type to be tracked through the ALICE setup
-       // --- All positions are in cm, angles in degrees, and P and E in GeV
-       
-       
-    gMC->SetProcess("DCAY",1);
-    gMC->SetProcess("PAIR",1);
-    gMC->SetProcess("COMP",1);
-    gMC->SetProcess("PHOT",1);
-    gMC->SetProcess("PFIS",0);
-    gMC->SetProcess("DRAY",0);
-    gMC->SetProcess("ANNI",1);
-    gMC->SetProcess("BREM",1);
-    gMC->SetProcess("MUNU",1);
-    gMC->SetProcess("CKOV",1);
-    gMC->SetProcess("HADR",1);
-    gMC->SetProcess("LOSS",2);
-    gMC->SetProcess("MULS",1);
-    gMC->SetProcess("RAYL",1);
-       
-    Float_t cut = 1.e-3;        // 1MeV cut by default
-    Float_t tofmax = 1.e10;
-       
-    gMC->SetCut("CUTGAM", cut);
-    gMC->SetCut("CUTELE", cut);
-    gMC->SetCut("CUTNEU", cut);
-    gMC->SetCut("CUTHAD", cut);
-    gMC->SetCut("CUTMUO", cut);
-    gMC->SetCut("BCUTE",  cut);
-    gMC->SetCut("BCUTM",  cut);
-    gMC->SetCut("DCUTE",  cut);
-    gMC->SetCut("DCUTM",  cut);
-    gMC->SetCut("PPCUTM", cut);
-    gMC->SetCut("TOFMAX", tofmax);
-       
-       //======================//
-       // Set External decayer //
-       //======================//
-       TVirtualMCDecayer* decayer = new AliDecayerPythia();
-       // DECAYS
-       //
-       switch(decHvFl) {
-               case kNature:
-                       decayer->SetForceDecay(kNeutralPion);
-                       break;
-               case kHadr:
-                       decayer->SetForceDecay(kHadronicD);
-                       break;
-               case kSemiEl:
-                       decayer->SetForceDecay(kSemiElectronic);
-                       break;
-               case kSemiMu:
-                       decayer->SetForceDecay(kSemiMuonic);
-                       break;
-       }
-       decayer->Init();
-       gMC->SetExternalDecayer(decayer);
-       //if(proc == kPyJetJetPHOSv2) // in this case we decay the pi0
-       //      decayer->SetForceDecay(kNeutralPion);
-       
-       //=========================//
-       // Generator Configuration //
-       //=========================//
-       AliGenPythia* gener = 0x0;
-       
-       if (proc <=   kBeautypp14000wmi) {
-               AliGenPythia *pythia = PythiaHVQ(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Stack filling option
-               if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               //
-               // DECAYS
-               //
-               switch(decHvFl) {
-                       case kNature:
-                               pythia->SetForceDecay(kNeutralPion);
-                               break;
-                       case kHadr:
-                               pythia->SetForceDecay(kHadronicD);
-                               break;
-                       case kSemiEl:
-                               pythia->SetForceDecay(kSemiElectronic);
-                               break;
-                       case kSemiMu:
-                               pythia->SetForceDecay(kSemiMuonic);
-                               break;
-               }
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-               pythia->SetPhiRange(0., 360.);
-               pythia->SetThetaRange(0,180);
-               switch(ycut) {
-                       case kFull:
-                               pythia->SetYRange(-12,12);
-                               break;
-                       case kBarrel:
-                               pythia->SetYRange(-2,2);
-                               break;
-                       case kMuonArm:
-                               pythia->SetYRange(1,6);
-                               break;
-               }
-               gener = pythia;
-       } else if (proc == kPyMbNoHvq) {
-               gener = MbCocktail();
-       } else if (proc == kPyOmegaMinus) {
-               gener = PyMbTriggered(3334);
-       } else if (proc == kPyOmegaPlus) {
-               gener = PyMbTriggered(-3334);
-       } else if (proc <= kPyGammaBremsEMCAL) {
-               AliGenPythia *pythia = PythiaHard(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-//             if(proc == kPyJetJetPHOSv2)
-//                     pythia->SetForceDecay(kNeutralPion);
-//             else
-//                     pythia->SetForceDecay(kAll);
-
-               pythia->SetForceDecay(kNeutralPion);
-               pythia->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
-               pythia->SetGluonRadiation(1,1); //ISR and FRS effects on.
-               pythia->SetPtKick(3.); // set the intrinsic kt to about 5.3 GeV/c
-               gener = pythia;
-       }
-       
-       
-       // PRIMARY VERTEX
-       
-       gener->SetOrigin(0., 0., 0.);    // vertex position
-       
-       // Size of the interaction diamond
-       // Longitudinal
-       Float_t           sigmaz  = 7.55 / TMath::Sqrt(2.); // [cm] 14  TeV (p-p), 5.5 TeV (Pb-Pb)
-       if(eCMS == 10000) sigmaz  = 5.4  / TMath::Sqrt(2.); // [cm] 10  TeV
-       if(eCMS == 900)   sigmaz  = 10.5 / TMath::Sqrt(2.); // [cm] 0.9 TeV
-       cout<<">>> SigmaZ x srqt(2.) "<< sigmaz * TMath::Sqrt(2.) << endl;
-       
-    // Transverse
-       Float_t betast  = 10;                 // beta* [m]
-       Float_t eps     = 3.75e-6;            // emittance [m]
-       Float_t gamma   = eCMS / 2.0 / 0.938272;   // relativistic gamma [1]
-       Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.;  // [cm]
-       printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
-       
-       gener->SetSigma(sigmaxy, sigmaxy, sigmaz);      // Sigma in (X,Y,Z) (cm) on IP position
-       gener->SetCutVertexZ(3.);        // Truncate at 3 sigma
-       gener->SetVertexSmear(kPerEvent);
-       
-       gener->Init();
-       
-       //Quenching
-       gener->SetQuench(iquenching);
-       if(iquenching == 1){ //quenching weights
-               Float_t k = 6e5*(qhat/1.7) ; //qhat=1.7, k = 6e5, default  value
-               AliPythia::Instance()->InitQuenching(0.,0.1,k,0,0.95,6);
-       }
-       else if(iquenching == 4){ //q-pythia
-               //Not yet implemented
-               gener->SetQhat(qhat); //   !transport coefficient (GeV2/fm)
-       }
-
-  // FIELD
-  //
-  AliMagF* field = 0x0;
-  if (mag == kNoField) {
-    comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagF("Maps","Maps", 0., 0., AliMagF::k5kGUniform);
-  } else if (mag == k5kG) {
-    comment = comment.Append(" | L3 field 0.5 T");
-    field = new AliMagF("Maps","Maps",  -1., -1., AliMagF::k5kG);
-  }
-  printf("\n \n Comment: %s \n \n", comment.Data());
-  TGeoGlobalMagField::Instance()->SetField(field);
-  rl->CdGAFile();
-  gAlice->SetField(field);
-
-       
-       Int_t iABSO   = 1;
-       Int_t iACORDE = 0;
-       Int_t iDIPO   = 1;
-       Int_t iEMCAL  = 1;
-       Int_t iFMD    = 1;
-       Int_t iFRAME  = 1;
-       Int_t iHALL   = 1;
-       Int_t iITS    = 1;
-       Int_t iMAG    = 1;
-       Int_t iMUON   = 1;
-       Int_t iPHOS   = 1;
-       Int_t iPIPE   = 1;
-       Int_t iPMD    = 1;
-       Int_t iHMPID  = 1;
-       Int_t iSHIL   = 1;
-       Int_t iT0     = 1;
-       Int_t iTOF    = 1;
-       Int_t iTPC    = 1;
-       Int_t iTRD    = 1;
-       Int_t iVZERO  = 1;
-       Int_t iZDC    = 1;
-       
-       
-    //=================== Alice BODY parameters =============================
-    AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
-       
-       
-    if (iMAG)
-    {
-        //=================== MAG parameters ============================
-        // --- Start with Magnet since detector layouts may be depending ---
-        // --- on the selected Magnet dimensions ---
-        AliMAG *MAG = new AliMAG("MAG", "Magnet");
-    }
-       
-       
-    if (iABSO)
-    {
-        //=================== ABSO parameters ============================
-        AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
-    }
-       
-    if (iDIPO)
-    {
-        //=================== DIPO parameters ============================
-               
-        AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
-    }
-       
-    if (iHALL)
-    {
-        //=================== HALL parameters ============================
-               
-        AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
-    }
-       
-       
-    if (iFRAME)
-    {
-        //=================== FRAME parameters ============================
-               
-        AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
-           FRAME->SetHoles(1);
-    }
-       
-    if (iSHIL)
-    {
-        //=================== SHIL parameters ============================
-               
-        AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
-    }
-       
-       
-    if (iPIPE)
-    {
-        //=================== PIPE parameters ============================
-               
-        AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
-    }
-       
-    if (iITS)
-       {
-               //=================== ITS parameters ============================
-               
-               AliITS *ITS  = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
-    }
-       
-    if (iTPC)
-    {
-               //============================ TPC parameters =====================
-
-        AliTPC *TPC = new AliTPCv2("TPC", "Default");
-    }
-       
-       
-    if (iTOF) {
-        //=================== TOF parameters ============================
-
-               AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
-       }
-       
-       
-    if (iHMPID)
-    {
-        //=================== HMPID parameters ===========================
-               AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");  
-       }
-       
-       
-    if (iZDC)
-    {
-        //=================== ZDC parameters ============================
-               
-        AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
-    }
-       
-    if (iTRD)
-    {
-        //=================== TRD parameters ============================
-               
-        AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
-        AliTRDgeometry *geoTRD = TRD->GetGeometry();
-               if(year == 2009){
-                       // Partial geometry: modules at 0,8,9,17
-                       // Partial geometry: modules at 1,7,10,16 expected for 2009
-                       // starting at 3h in positive direction
-                       
-                       //geoTRD->SetSMstatus(1,0);
-                       //geoTRD->SetSMstatus(2,0);
-                       //geoTRD->SetSMstatus(3,0);
-                       //geoTRD->SetSMstatus(4,0);
-                       //geoTRD->SetSMstatus(5,0);
-                       //geoTRD->SetSMstatus(6,0);
-                       //geoTRD->SetSMstatus(7,0);
-                       
-                       
-                       //geoTRD->SetSMstatus(10,0);
-                       //geoTRD->SetSMstatus(11,0);
-                       //geoTRD->SetSMstatus(12,0);
-                       //geoTRD->SetSMstatus(13,0);
-                       //geoTRD->SetSMstatus(14,0);
-                       //geoTRD->SetSMstatus(15,0);
-                       //geoTRD->SetSMstatus(16,0);
-       
-                       geoTRD->SetSMstatus(2,0);
-                       geoTRD->SetSMstatus(3,0);
-                       geoTRD->SetSMstatus(4,0);
-                       geoTRD->SetSMstatus(5,0);
-                       geoTRD->SetSMstatus(6,0);
-
-                              geoTRD->SetSMstatus(11,0);
-                              geoTRD->SetSMstatus(12,0);
-                                      geoTRD->SetSMstatus(13,0);
-                                      geoTRD->SetSMstatus(14,0);
-                                      geoTRD->SetSMstatus(15,0);
-       }
-    }
-       
-    if (iFMD)
-    {
-        //=================== FMD parameters ============================
-               AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
-       }
-       
-    if (iMUON)
-    {
-        //=================== MUON parameters ===========================
-        // New MUONv1 version (geometry defined via builders)
-        AliMUON *MUON = new AliMUONv1("MUON", "default");
-    }
-    //=================== PHOS parameters ===========================
-       
-    if (iPHOS)
-    {
-        AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
-    }
-       
-       
-    if (iPMD)
-    {
-        //=================== PMD parameters ============================
-        AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
-    }
-       
-    if (iT0)
-    {
-        //=================== T0 parameters ============================
-        AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
-    }
-       
-    if (iEMCAL)
-    {
-        //=================== EMCAL parameters ============================
-        AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
-    }
-       
-       if (iACORDE)
-    {
-        //=================== ACORDE parameters ============================
-        AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
-    }
-       
-       if (iVZERO)
-    {
-        //=================== VZERO parameters ============================
-        AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
-    }
-       
-       AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
-}
-
-//           PYTHIA
-
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for charm / beauty generation with PYTHIA      //
-//                                                                   //
-// The parameters have been tuned in order to reproduce the inclusive//
-// heavy quark pt distribution given by the NLO pQCD calculation by  //
-// Mangano, Nason and Ridolfi.                                       //
-//                                                                   //
-// For details and for the NORMALIZATION of the yields see:          //
-//   N.Carrer and A.Dainese,                                         //
-//   "Charm and beauty production at the LHC",                       //
-//   ALICE-INT-2003-019, [arXiv:hep-ph/0311225];                     //
-//   PPR Chapter 6.6, CERN/LHCC 2005-030 (2005).                     //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-  case kCharmPbPb5500:
-      comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kCharmpPb8800:
-      comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmpPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kCharmpp14000:
-      comment = comment.Append(" Charm in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kCharmpp14000wmi:
-      comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyCharmppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kD0PbPb5500:
-      comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0PbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kD0pPb8800:
-      comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0pPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kD0pp14000:
-      comment = comment.Append(" D0 in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0ppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kDPlusPbPb5500:
-      comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kDPluspPb8800:
-      comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPluspPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kDPluspp14000:
-      comment = comment.Append(" DPlus in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautyPbPb5500:
-      comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kBeautypPb8800:
-      comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautypPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kBeautypp14000:
-      comment = comment.Append(" Beauty in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautypp14000wmi:
-      comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyBeautyppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-   }
-
-  return gener;
-}
-
-AliGenPythia *PythiaHard(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for hard QCD processes generation with PYTHIA  //
-//                                                                   //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-
-  case kPyJetJet:
-    comment = comment.Append(" pp->jet + jet over at 14 TeV, no restriction");
-    AliGenPythia * gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);//        Centre of mass energy
-    gener->SetProcess(kPyJets);//        Process type
-    gener->SetJetEtaRange(-1.5, 1.5);//  Final state kinematic cuts
-    gener->SetJetPhiRange(0., 360.);
-    gener->SetJetEtRange(10., 1000.);
-    gener->SetPtHard(ptHardMin, ptHardMax);// Pt transfer of the hard scattering
-    gener->SetStrucFunc(kCTEQ4L);
-    return gener;
-  case kBeautyppwmiJet:
-       comment = comment.Append(" Beauty Jets over EMCAL");
-       AliGenPythia *gener = new AliGenPythia(-1);
-       gener->SetProcess(kPyBeautyppMNRwmi);
-       gener->SetStrucFunc(kCTEQ4L);
-       //Jet specific stuff below
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       gener->SetJetEtaRange(-1,1);
-       gener->SetJetPhiRange(60.,210.);
-       gener->SetJetEtRange(10.,1000.);
-       //jet specific stuff above
-       gener->SetEnergyCMS(eCMS);
-       gener->SetForceDecay(kSemiElectronic);
-       gener->SetYRange(-2,2);
-       gener->SetFeedDownHigherFamily(kFALSE);
-       gener->SetCountMode(AliGenPythia::kCountParents);               
-      break;
-  case kPyGammaJetPHOS:
-      comment = comment.Append(" pp->jet + gamma over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyDirectGamma);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetGammaEtaRange(-0.13,0.13);
-      gener->SetGammaPhiRange(219.,321.);//Over 5 modules +-2 deg
-      break;
-  case kPyJetJetPHOS:
-      comment = comment.Append(" pp->jet + jet over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetJetEtRange(10., 1000.);
-      gener->SetPi0InPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-  case kPyGammaBremsPHOS:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over PHOS at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetFragPhotonInPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-         printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-         break;
-   case kPyJetJetPHOSv2:
-        comment = comment.Append(" pp->jet + jet over PHOS version2 ");
-        gener = new AliGenPythia(nEvts);
-       gener->SetEnergyCMS(eCMS);
-       gener->SetProcess(kPyJets);
-       gener->SetStrucFunc(kCTEQ4L);
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       //gener->SetYHard(-1.0,1.0);
-       gener->SetJetEtaRange(-1.,1.);
-       gener->SetJetPhiRange(200.,340.);
-       //gener->SetPi0InPHOS(kTRUE);
-       gener->SetPhotonInPHOSeta(pi0FragPhotonInDet);
-       gener->SetPhotonMinPt(ptGammaPi0Min);
-       gener->SetForceDecay(kAll);
-       break;
-  case kPyGammaJetEMCAL:
-    comment = comment.Append(" pp->jet + gamma over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyDirectGamma);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetGammaEtaRange(-0.701,0.701);
-    gener->SetGammaPhiRange(79.,191.);//Over 6 supermodules +-2 deg
-    break;
-  case kPyJetJetEMCAL:
-    comment = comment.Append(" pp->jet + jet over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyJets);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetJetEtaRange(-1,1);
-    gener->SetJetPhiRange(60.,210.);
-       gener->SetJetEtRange(10., 1000.);
-    gener->SetPi0InEMCAL(pi0FragPhotonInDet);
-    gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-    printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-    break;
-  case kPyGammaBremsEMCAL:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over EMCAL at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1,1);
-      gener->SetJetPhiRange(60.,210.); 
-         gener->SetJetEtRange(10., 1000.);
-      gener->SetFragPhotonInEMCAL(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-
-  }
-
-  return gener;
-}
-
-AliGenerator* MbCocktail()
-{
-      comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
-      AliGenCocktail * gener = new AliGenCocktail();
-      gener->UsePerEventRates();
-
-//    Pythia
-
-      AliGenPythia* pythia = new AliGenPythia(-1);
-      pythia->SetMomentumRange(0, 999999.);
-      pythia->SetThetaRange(0., 180.);
-      pythia->SetYRange(-12.,12.);
-      pythia->SetPtRange(0,1000.);
-      pythia->SetProcess(kPyMb);
-      pythia->SetEnergyCMS(14000.);
-      pythia->SwitchHFOff();
-
-//   J/Psi parameterisation
-
-      AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
-      jpsi->SetPtRange(0.,100.);
-      jpsi->SetYRange(-8., 8.);
-      jpsi->SetPhiRange(0., 360.);
-      jpsi->SetForceDecay(kAll);
-
-      gener->AddGenerator(pythia, "Pythia", 1.);
-      gener->AddGenerator(jpsi,   "J/Psi", 8.e-4);
-
-      return gener;
-}
-
-AliGenerator* PyMbTriggered(Int_t pdg)
-{
-    AliGenPythia* pythia = new AliGenPythia(-1);
-    pythia->SetMomentumRange(0, 999999.);
-    pythia->SetThetaRange(0., 180.);
-    pythia->SetYRange(-12.,12.);
-    pythia->SetPtRange(0,1000.);
-    pythia->SetProcess(kPyMb);
-    pythia->SetEnergyCMS(14000.);
-    pythia->SetTriggerParticle(pdg, 0.9);
-    return pythia;
-}
-
-void ProcessEnvironmentVars()
-{
-       cout << "######################################" << endl;
-       cout << "## Processing environment variables ##" << endl;
-       cout << "######################################" << endl;
-       
-    // Run Number
-    if (gSystem->Getenv("RUN")) {
-               runNumber = atoi(gSystem->Getenv("RUN"));
-    }
-    //cout<<"Run number "<<runNumber<<endl;
-       
-    // Event Number
-    if (gSystem->Getenv("EVENT")) {
-               eventNumber = atoi(gSystem->Getenv("EVENT"));
-    }
-    //cout<<"Event number "<<eventNumber<<endl;
-       
-       // Random Number seed
-    if (gSystem->Getenv("CONFIG_SEED")) {
-               seed = atoi(gSystem->Getenv("CONFIG_SEED"));
-    }
-    else if(gSystem->Getenv("EVENT") && gSystem->Getenv("RUN")){
-               seed = runNumber * 100000 + eventNumber;
-    }
-       
-    gRandom->SetSeed(seed);
-       
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-    cout<<"Seed for random number generation= "<< seed<<"  "<< gRandom->GetSeed()<<endl;
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-       
-    // Run type
-    if (gSystem->Getenv("DC_RUN_TYPE")) {
-               cout<<"run type "<<gSystem->Getenv("DC_RUN_TYPE")<<endl;
-               for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
-                       if (strcmp(gSystem->Getenv("DC_RUN_TYPE"), pprRunName[iRun])==0) {
-                               proc = (PDC07Proc_t)iRun;
-                       }
-               }
-    }
-    else
-               cout << "Environment variable DC_RUN_TYPE is not defined" << endl;
-    if (gSystem->Getenv("YEAR"))
-               year = atoi(gSystem->Getenv("YEAR"));
-       if (gSystem->Getenv("ECMS"))
-               eCMS = atof(gSystem->Getenv("ECMS"));
-       if (gSystem->Getenv("TRIGGER"))
-               trig = atoi(gSystem->Getenv("TRIGGER"));
-       if ( gSystem->Getenv("PI0GAMMAINDET") )
-               pi0FragPhotonInDet      = atoi(gSystem->Getenv("PI0GAMMAINDET"));
-    if (gSystem->Getenv("PTGAMMAPI0MIN"))
-               ptGammaPi0Min = atof(gSystem->Getenv("PTGAMMAPI0MIN"));
-       if (gSystem->Getenv("QUENCHING"))
-               iquenching = atof(gSystem->Getenv("QUENCHING"));
-       if (gSystem->Getenv("QHAT"))
-               qhat = atof(gSystem->Getenv("QHAT"));
-       //if (gSystem->Getenv("MEDLENGHT"))
-       //      medlength = atof(gSystem->Getenv("MEDLENGHT"));
-       if (gSystem->Getenv("PTHARDMIN"))
-               ptHardMin = atof(gSystem->Getenv("PTHARDMIN"));
-       if (gSystem->Getenv("PTHARDMAX"))
-               ptHardMax = atof(gSystem->Getenv("PTHARDMAX"));
-                                       
-    if(gSystem->Getenv("PTHARDMIN") && gSystem->Getenv("PTHARDMAX")){
-       if( strncmp(pprRunName[proc],"kPyJetJet",9)==0 || strncmp(pprRunName[proc],"kBeautyppwmiJet",15)==0 ){
-                       ptHardMin = ptHardJJLo[runNumber%nPtHardJJBins];
-                       ptHardMax = ptHardJJHi[runNumber%nPtHardJJBins];
-               }
-               else if( strncmp(pprRunName[proc],"kPyGammaJet",11)==0){
-                       ptHardMin = ptHardGJLo[runNumber%nPtHardGJBins];
-                       ptHardMax = ptHardGJHi[runNumber%nPtHardGJBins];        
-               }       
-       }
-       
-    cout<<">> Run type set to "<<pprRunName[proc]<<endl;
-    cout<<">> Collision energy set to "<<eCMS <<endl;
-       cout<<">> Collisions trigger type "<<trig<<" "<<TrigConfName[trig]<<endl;
-    cout<<">> ptHard limits: "<<ptHardMin<<" to " <<ptHardMax<<" GeV"<<endl;
-       if(pi0FragPhotonInDet) cout<<">> pt gamma/pi0 threshold "<< ptGammaPi0Min<<" GeV "<<endl;
-    if(iquenching) cout<<">> quenching on? "<< iquenching<<" qhat "<<qhat//<<" medlength "<<medlength
-       <<endl;
-       cout<<">> Year geometry : "<<year<<endl;        
-    cout << "######################################" << endl;
-    cout << "######################################" << endl;
-}
diff --git a/prod/LHC08d10/JDL b/prod/LHC08d10/JDL
deleted file mode 100644 (file)
index 1f22329..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Executable = "aliroot_new";\r
-Jobtag={"comment:jet-jet pp, PYTHIA, no quenching"};\r
-\r
-Packages={"VO_ALICE@AliRoot::v4-16-Rev-09","VO_ALICE@GEANT3::v1-10","VO_ALICE@ROOT::v5-23-02","VO_ALICE@APISCONFIG::V2.4"};\r
-\r
-TTL = "72000";\r
-Price = 1;\r
-\r
-Validationcommand ="/alice/cern.ch/user/a/aliprod/prod2007/configs_pbpb_hijing/validation.sh";\r
-\r
-InputFile= {"LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/CheckESD.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/Config.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/rec.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/sim.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/simrun.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/tag.C"};\r
-\r
-OutputArchive={"log_archive:*.log,stdout,stderr,*.log@Alice::NIHAM::File","root_archive.zip:*.tag.root,galice.root,geometry.root,Kinematics.root,TrackRefs.root,AliESDs.root,AliESDfriends.root,pyxsec.root@Alice::Subatech::DPM"};\r
-\r
-OutputDir="/alice/cern.ch/user/c/conesa/production/output_pp_new/BJ/$1/#alien_counter_03i#";\r
-\r
-JDLVariables={"Packages", "OutputDir"};\r
-GUIDFILE="guid.txt";\r
-\r
-splitarguments="simrun.C --run $1 --event #alien_counter# --process kBeautyppwmiJet --ecms 14000 --trigger 0";\r
-split="production:1-100";\r
-\r
-Workdirectorysize={"4000MB"};\r
diff --git a/prod/LHC08d10/rec.C b/prod/LHC08d10/rec.C
deleted file mode 100644 (file)
index a7b30f1..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-void rec() {\r
-  //AliLog::SetGlobalLogLevel(AliLog::kError);\r
-\r
-  AliReconstruction reco;\r
-\r
-  reco.SetWriteESDfriend();\r
-  reco.SetWriteAlignmentData();\r
-\r
-\r
-  AliITSRecoParam * itspar = AliITSRecoParam::GetLowFluxParam();\r
-  itspar->SetStoreLikeSignV0s(kTRUE);\r
-  reco.SetRecoParam("ITS",itspar);\r
-  reco.SetRecoParam("TPC",AliTPCRecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("TRD",AliTRDrecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());\r
-  reco.SetRecoParam("MUON",AliMUONRecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("EMCAL",AliEMCALRecParam::GetLowFluxParam());\r
-  reco.SetRecoParam("GRP",AliGRPRecoParam::GetLowFluxParam());\r
-\r
-  reco.SetOption("TRD","sl_tr_1");            // Stream Level for the tracker equal to 1\r
-\r
-  // Only in case of Full misalignment\r
-//   AliGRPRecoParam *grpRecoParam = AliGRPRecoParam::GetLowFluxParam();\r
-//   grpRecoParam->SetVertexerTracksConstraintITS(kFALSE);\r
-//   grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE);\r
-//   reco.SetRecoParam("GRP",grpRecoParam);\r
-\r
-  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");\r
-  //reco.SetSpecificStorage("GRP/GRP/Data/","alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");
-  reco.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
-  // No write access to the OCDB => local specific storage\r
-//   reco.SetSpecificStorage("GRP/GRP/Data",\r
-//                        Form("local://%s",gSystem->pwd()));\r
-\r
-  //-------------------------------------------------------------------------\r
-  // Setting the cuts for the V0 and cascade finding\r
-  // The values of the cuts below are "reasonable" for pp events\r
-  //-------------------------------------------------------------------------\r
-\r
-  Double_t v0sels[]={33,    // max allowed chi2\r
-                     0.05,  // min allowed impact parameter for the 1st daughter\r
-                     0.05,  // min allowed impact parameter for the 2nd daughter\r
-                     0.5,   // max allowed DCA between the daughter tracks\r
-                     0.99,  // max allowed cosine of V0's pointing angle\r
-                     0.2,   // min radius of the fiducial volume\r
-                     100    // max radius of the fiducial volume\r
-  };\r
-  AliV0vertexer::SetDefaultCuts(v0sels);\r
-\r
-  Double_t xisels[]={33.,   // max allowed chi2 (same as PDC07)\r
-                     0.025, // min allowed V0 impact parameter (PDC07 was 0.05)\r
-                     0.010, // "window" around the Lambda mass (PDC07 was 0.008)\r
-                     0.025, // min allowed bachelor's impact parameter (PDC07 was 0.035)\r
-                     0.2,   // max allowed DCA between the V0 and the bachelor (PDC07 was 0.1)\r
-                     0.998, // max allowed cosine of the cascade pointing angle (PDC07 was 0.9985)\r
-                     0.2,   // min radius of the fiducial volume (PDC07 was 0.9)\r
-                     100    // max radius of the fiducial volume (same as PDC07)\r
-  };\r
-  AliCascadeVertexer::SetDefaultCuts(xisels);\r
-\r
-  reco.SetRunQA("ALL:ALL");\r
-\r
-  TStopwatch timer;\r
-  timer.Start();\r
-  reco.Run();\r
-  timer.Stop();\r
-  timer.Print();\r
-}\r
-\r
diff --git a/prod/LHC08d10/sim.C b/prod/LHC08d10/sim.C
deleted file mode 100644 (file)
index c4f3d35..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-void sim(Int_t nev=100) {\r
-//  AliLog::SetGlobalLogLevel(AliLog::kError);\r
-\r
-  AliSimulation simu;\r
-  simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");\r
-  simu.SetMakeDigitsFromHits("ITS TPC");\r
-\r
-  simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");\r
-\r
-
-  simu.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
-
-  TStopwatch timer;\r
-  timer.Start();\r
-  simu.Run(nev);\r
-  WriteXsection();
-  timer.Stop();\r
-  timer.Print();\r
-}\r
-
-WriteXsection()
-{
-  TPythia6 *pythia = TPythia6::Instance();
-  pythia->Pystat(1);
-  Double_t xsection = pythia->GetPARI(1);
-  Int_t    ntrials  = pythia->GetMSTI(5);
-
-  TFile *file = new TFile("pyxsec.root","recreate");
-  TTree   *tree   = new TTree("Xsection","Pythia cross section");
-  TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
-  TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
-  tree->Fill();
-
-  tree->Write();
-  file->Close();
-
-  cout << "Pythia cross section: " << xsection 
-       << ", number of trials: " << ntrials << endl;
-}
diff --git a/prod/LHC08d10/simrun.C b/prod/LHC08d10/simrun.C
deleted file mode 100644 (file)
index 5a8ee67..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-//#define VERBOSEARGS
-
-{
-       // set job and simulation variables as :
-       // root run.C  --run <x> --event <y> --process <proc> --minhard <min> --maxhard <max> --minpt <minpt> ...
-       
-       int nrun = 0;
-       int nevent = 0;
-       int seed = 0;
-       
-       char sseed[1024];
-       char srun[1024];
-       char sevent[1024];
-       char secms[1024];
-       char sprocess[1024];
-       char sminpthard[1024];
-       char smaxpthard[1024];
-       char sminptgammapi0[1024];
-       char spi0gammafrag[1024];
-       char squench[1024];
-       char sqhat[1024];
-       char smedlength[1024];
-       char strig[1024];
-       char syear[1024];
-       
-       sprintf(srun,"");
-       sprintf(sevent,"");
-       sprintf(secms,"");
-       sprintf(sprocess,"");
-       sprintf(sminpthard,"");
-       sprintf(smaxpthard,"");
-       sprintf(sminptgammapi0,"");
-       sprintf(spi0gammafrag,"");
-       sprintf(squench,"");
-       sprintf(sqhat,"");
-       //sprintf(smedlength,"");
-       sprintf(strig,"");
-       sprintf(syear,"");
-       
-       for (int i=0; i< gApplication->Argc();i++){
-#ifdef VERBOSEARGS
-               printf("Arg  %d:  %s\n",i,gApplication->Argv(i));
-#endif
-               if (!(strcmp(gApplication->Argv(i),"--run")))
-                       nrun = atoi(gApplication->Argv(i+1));
-               sprintf(srun,"%d",nrun);
-       
-               if (!(strcmp(gApplication->Argv(i),"--event")))
-                       nevent = atoi(gApplication->Argv(i+1));
-               sprintf(sevent,"%d",nevent);
-                               
-               if (!(strcmp(gApplication->Argv(i),"--process")))
-                       sprintf(sprocess, gApplication->Argv(i+1));
-                               
-               if (!(strcmp(gApplication->Argv(i),"--year")))
-                       sprintf(syear, gApplication->Argv(i+1));
-
-               if (!(strcmp(gApplication->Argv(i),"--ecms")))
-                       sprintf(secms,gApplication->Argv(i+1));
-                                               
-               if (!(strcmp(gApplication->Argv(i),"--minhard")))
-                       sprintf(sminpthard,gApplication->Argv(i+1));
-                                                       
-               if (!(strcmp(gApplication->Argv(i),"--maxhard")))
-                       sprintf(smaxpthard,gApplication->Argv(i+1));
-       
-               if (!(strcmp(gApplication->Argv(i),"--pi0gammafrag")))
-                       sprintf(spi0gammafrag,gApplication->Argv(i+1));
-                                                                                                                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--minpt")))
-                       sprintf(sminptgammapi0,gApplication->Argv(i+1));
-                                                                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--quench")))
-                       sprintf(squench,gApplication->Argv(i+1));
-                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--qhat")))
-                       sprintf(sqhat,gApplication->Argv(i+1));
-                                                                                       
-               //if (!(strcmp(gApplication->Argv(i),"--medlength")))
-               //      sprintf(smedlength,gApplication->Argv(i+1));
-                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--trigger")))
-                       sprintf(strig,gApplication->Argv(i+1));
-                                                                                                       
-       }
-       
-       //rec params for reconstruction
-       //only for release < 16
-       //char cmd[200] ; 
-       //sprintf(cmd, ".! tar zxvf DBpp.tgz") ; 
-       //gROOT->ProcessLine(cmd) ; 
-       
-       seed = nrun * 100000 + nevent;
-       sprintf(sseed,"%d",seed);
-       
-       if (seed==0) {
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stderr,"!!!!  WARNING! Seeding variable for MC is 0          !!!!\n");
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       } else {
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stdout,"!!!  MC Seed is %d \n",seed);
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       }
-       
-       // set the seed environment variable
-       gSystem->Setenv("CONFIG_SEED",sseed);
-       gSystem->Setenv("RUN",srun);
-       gSystem->Setenv("EVENT",sevent);
-       gSystem->Setenv("DC_RUN_TYPE",sprocess);//"kPyGammaJetPHOS");
-       gSystem->Setenv("YEAR",syear);//"14000");       
-       gSystem->Setenv("ECMS",secms);//"14000");
-       gSystem->Setenv("PTHARDMIN",sminpthard);//"20");
-       gSystem->Setenv("PTHARDMAX",smaxpthard);//"30");
-       gSystem->Setenv("PI0GAMMAINDET",spi0gammafrag);//"1");
-       gSystem->Setenv("PTGAMMAPI0MIN",sminptgammapi0);//"1");
-       gSystem->Setenv("QUENCHING",squench);
-       gSystem->Setenv("QHAT",sqhat);
-       //gSystem->Setenv("MEDLENGTH",smedlength);
-       gSystem->Setenv("TRIGGER",strig);
-       
-       cout<< "SIMRUN:: Run = " << gSystem->Getenv("RUN") << "; Event = " << gSystem->Getenv("EVENT") 
-       << "; Process = "    << gSystem->Getenv("DC_RUN_TYPE")
-       << "; E cms = " << gSystem->Getenv("ECMS") 
-       << "; Trigger configuration = "<< gSystem->Getenv("TRIGGER")
-       << "; Year = "<<gSystem->Getenv("YEAR") << endl;
-       
-       cout<< "         minpthard = " << gSystem->Getenv("PTHARDMIN") 
-       << "; maxpthard =" << gSystem->Getenv("PTHARDMAX") 
-       << "; force pi0/gamma frag in detector = "     << gSystem->Getenv("PI0GAMMAINDET") 
-       << "; minpt = "     << gSystem->Getenv("PTGAMMAPI0MIN") 
-       << "; quenching option ="<<gSystem->Getenv("QUENCHING") 
-       << "; qhat = "<<gSystem->Getenv("QHAT") 
-       //<< "; medium length = "<<gSystem->Getenv("MEDIUMLENGTH")
-       << endl;
-       
-       cout<<">>>>> SIMULATION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1");
-       cout<<">>>>> RECONSTRUCTION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
-       cout<<">>>>> TAG <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
-       cout<<">>>>> CHECK ESD <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1");
-       
-}
diff --git a/prod/LHC08d10/tag.C b/prod/LHC08d10/tag.C
deleted file mode 100644 (file)
index f8e55f8..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-void tag() {\r
-  const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR");\r
-  TString fESDFileName = "alien://";\r
-  fESDFileName += turl;\r
-  fESDFileName += "/AliESDs.root";  \r
-\r
-  TString fGUID = 0;\r
-  GetGUID(fGUID);\r
-\r
-  TString fAliroot, fRoot, fGeant;\r
-  GetVersions(fAliroot,fRoot,fGeant);\r
-\r
-  UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID);\r
-}\r
-  \r
-//_____________________________________//\r
-GetVersions(TString &fAliroot, TString &froot, TString &fgeant) {\r
-  const char* fver = gSystem->Getenv("ALIEN_JDL_PACKAGES");\r
-  TString fS = fver;\r
-  Int_t fFirst = fS.First("#");\r
-\r
-  while(fFirst != -1) {\r
-    Int_t fTotalLength = fS.Length();\r
-    TString tmp = fS;\r
-    TString fS1 = fS(0,fFirst);\r
-    tmp = fS(fFirst+2,fTotalLength);\r
-    fS = tmp;\r
-\r
-    if(fS1.Contains("Root")) fAliroot = fS1;\r
-    if(fS1.Contains("ROOT")) froot = fS1;\r
-    if(fS1.Contains("GEANT")) fgeant = fS1;\r
-\r
-    if(tmp.Contains("Root")) fAliroot = tmp;\r
-    if(tmp.Contains("ROOT")) froot = tmp;\r
-    if(tmp.Contains("GEANT")) fgeant = tmp;\r
-    \r
-    fFirst = tmp.First("#");\r
-  }\r
-}\r
-\r
-//_____________________________________//\r
-GetGUID(TString &guid) {\r
-  ofstream myfile ("guid.txt");\r
-  if (myfile.is_open()) {\r
-    TFile *f = TFile::Open("AliESDs.root","read");\r
-    if(f->IsOpen()) {\r
-      guid = f->GetUUID().AsString();\r
-      myfile << "AliESDs.root \t"<<f->GetUUID().AsString();\r
-      cout<<guid.Data()<<endl;\r
-      myfile.close();\r
-    }\r
-    else cout<<"Input file not found"<<endl;\r
-  }\r
-  else cout<<"Output file can't be created..."<<endl;\r
-}\r
-\r
-\r
-//_____________________________________//\r
-Bool_t UpdateTag(TString faliroot, TString froot, TString fgeant, TString turl, TString guid) {\r
-  cout<<"Updating tags....."<<endl;\r
-\r
-  const char * tagPattern = "tag.root";\r
-  // Open the working directory\r
-  void * dirp = gSystem->OpenDirectory(gSystem->pwd());\r
-  const char * name = 0x0;\r
-  // Add all files matching *pattern* to the chain\r
-  while((name = gSystem->GetDirEntry(dirp))) {\r
-    if (strstr(name,tagPattern)) {\r
-      TFile *f = TFile::Open(name,"read") ;\r
\r
-      AliRunTag *tag = new AliRunTag;\r
-      AliEventTag *evTag = new AliEventTag;\r
-      TTree *fTree = (TTree *)f->Get("T");\r
-      fTree->SetBranchAddress("AliTAG",&tag);\r
-   \r
-      //Defining new tag objects\r
-      AliRunTag *newTag = new AliRunTag();\r
-      TTree ttag("T","A Tree with event tags");\r
-      TBranch * btag = ttag.Branch("AliTAG", &newTag);\r
-      btag->SetCompressionLevel(9);\r
-      for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) {\r
-       fTree->GetEntry(iTagFiles);\r
-       newTag->SetRunId(tag->GetRunId());\r
-       newTag->SetAlirootVersion(faliroot);\r
-       newTag->SetRootVersion(froot);\r
-       newTag->SetGeant3Version(fgeant);\r
-       const TClonesArray *tagList = tag->GetEventTags();\r
-       for(Int_t j = 0; j < tagList->GetEntries(); j++) {\r
-         evTag = (AliEventTag *) tagList->At(j);\r
-         evTag->SetTURL(turl);\r
-         evTag->SetGUID(guid);\r
-         newTag->AddEventTag(*evTag);\r
-       }\r
-       ttag.Fill();\r
-       newTag->Clear();\r
-      }//tag file loop \r
-  \r
-      TFile* ftag = TFile::Open(name, "recreate");\r
-      ftag->cd();\r
-      ttag.Write();\r
-      ftag->Close();\r
-      \r
-      delete tag;\r
-      delete newTag;\r
-    }//pattern check\r
-  }//directory loop\r
-  return kTRUE;\r
-}\r
-\r
-\r
diff --git a/prod/LHC08d11/CheckESD.C b/prod/LHC08d11/CheckESD.C
deleted file mode 100644 (file)
index 4bf5317..0000000
+++ /dev/null
@@ -1,694 +0,0 @@
-#if !defined( __CINT__) || defined(__MAKECINT__)\r
-#include <TROOT.h>\r
-#include <TFile.h>\r
-#include <TError.h>\r
-#include <TH1.h>\r
-#include <TH2.h>\r
-#include <TF1.h>\r
-#include <TCanvas.h>\r
-#include <TVector3.h>\r
-#include <TPDGCode.h>\r
-#include <TParticle.h>\r
-\r
-#include "AliRunLoader.h"\r
-#include "AliLoader.h"\r
-#include "AliESDEvent.h"\r
-#include "AliESDv0.h"\r
-#include "AliESDcascade.h"\r
-#include "AliESDMuonTrack.h"\r
-#include "AliESDCaloCluster.h"\r
-#include "AliRun.h"\r
-#include "AliStack.h"\r
-#include "AliHeader.h"\r
-#include "AliGenEventHeader.h"\r
-#include "AliPID.h"\r
-#endif\r
-\r
-\r
-TH1F* CreateHisto(const char* name, const char* title, \r
-                 Int_t nBins, Double_t xMin, Double_t xMax,\r
-                 const char* xLabel = NULL, const char* yLabel = NULL)\r
-{\r
-// create a histogram\r
-\r
-  TH1F* result = new TH1F(name, title, nBins, xMin, xMax);\r
-  result->SetOption("E");\r
-  if (xLabel) result->GetXaxis()->SetTitle(xLabel);\r
-  if (yLabel) result->GetYaxis()->SetTitle(yLabel);\r
-  result->SetMarkerStyle(kFullCircle);\r
-  return result;\r
-}\r
-\r
-TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec)\r
-{\r
-// create an efficiency histogram\r
-\r
-  Int_t nBins = hGen->GetNbinsX();\r
-  TH1F* hEff = (TH1F*) hGen->Clone("hEff");\r
-  hEff->SetTitle("");\r
-  hEff->SetStats(kFALSE);\r
-  hEff->SetMinimum(0.);\r
-  hEff->SetMaximum(110.);\r
-  hEff->GetYaxis()->SetTitle("#epsilon [%]");\r
-\r
-  for (Int_t iBin = 0; iBin <= nBins; iBin++) {\r
-    Double_t nGen = hGen->GetBinContent(iBin);\r
-    Double_t nRec = hRec->GetBinContent(iBin);\r
-    if (nGen > 0) {\r
-      Double_t eff = nRec/nGen;\r
-      hEff->SetBinContent(iBin, 100. * eff);\r
-      Double_t error = sqrt(eff*(1.-eff) / nGen);\r
-      if (error == 0) error = 0.0001;\r
-      hEff->SetBinError(iBin, 100. * error);\r
-    } else {\r
-      hEff->SetBinContent(iBin, -100.);\r
-      hEff->SetBinError(iBin, 0);\r
-    }\r
-  }\r
-\r
-  return hEff;\r
-}\r
-\r
-Bool_t FitHisto(TH1* histo, Double_t& res, Double_t& resError)\r
-{\r
-// fit a gaussian to a histogram\r
-\r
-  static TF1* fitFunc = new TF1("fitFunc", "gaus");\r
-  fitFunc->SetLineWidth(2);\r
-  fitFunc->SetFillStyle(0);\r
-  Double_t maxFitRange = 2;\r
-\r
-  if (histo->Integral() > 50) {\r
-    Float_t mean = histo->GetMean();\r
-    Float_t rms = histo->GetRMS();\r
-    fitFunc->SetRange(mean - maxFitRange*rms, mean + maxFitRange*rms);\r
-    fitFunc->SetParameters(mean, rms);\r
-    histo->Fit(fitFunc, "QRI0");\r
-    histo->GetFunction("fitFunc")->ResetBit(1<<9);\r
-    res = TMath::Abs(fitFunc->GetParameter(2));\r
-    resError = TMath::Abs(fitFunc->GetParError(2));\r
-    return kTRUE;\r
-  }\r
-\r
-  return kFALSE;\r
-}\r
-\r
-\r
-Bool_t CheckESD(const char* gAliceFileName = "galice.root", \r
-               const char* esdFileName = "AliESDs.root")\r
-{\r
-// check the content of the ESD\r
\r
-  // check values\r
-  Int_t    checkNGenLow = 1;\r
-\r
-  Double_t checkEffLow = 0.5;\r
-  Double_t checkEffSigma = 3;\r
-  Double_t checkFakeHigh = 0.5;\r
-  Double_t checkFakeSigma = 3;\r
-\r
-  Double_t checkResPtInvHigh = 5;\r
-  Double_t checkResPtInvSigma = 3;\r
-  Double_t checkResPhiHigh = 10;\r
-  Double_t checkResPhiSigma = 3;\r
-  Double_t checkResThetaHigh = 10;\r
-  Double_t checkResThetaSigma = 3;\r
-\r
-  Double_t checkPIDEffLow = 0.5;\r
-  Double_t checkPIDEffSigma = 3;\r
-  Double_t checkResTOFHigh = 500;\r
-  Double_t checkResTOFSigma = 3;\r
-\r
-  Double_t checkPHOSNLow = 5;\r
-  Double_t checkPHOSEnergyLow = 0.3;\r
-  Double_t checkPHOSEnergyHigh = 1.0;\r
-  Double_t checkEMCALNLow = 50;\r
-  Double_t checkEMCALEnergyLow = 0.05;\r
-  Double_t checkEMCALEnergyHigh = 1.0;\r
-\r
-  Double_t checkMUONNLow = 1;\r
-  Double_t checkMUONPtLow = 0.5;\r
-  Double_t checkMUONPtHigh = 10.;\r
-\r
-  Double_t cutPtV0 = 0.3;\r
-  Double_t checkV0EffLow = 0.02;\r
-  Double_t checkV0EffSigma = 3;\r
-  Double_t cutPtCascade = 0.5;\r
-  Double_t checkCascadeEffLow = 0.01;\r
-  Double_t checkCascadeEffSigma = 3;\r
-\r
-  // open run loader and load gAlice, kinematics and header\r
-  AliRunLoader* runLoader = AliRunLoader::Open(gAliceFileName);\r
-  if (!runLoader) {\r
-    Error("CheckESD", "getting run loader from file %s failed", \r
-           gAliceFileName);\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadgAlice();\r
-  gAlice = runLoader->GetAliRun();\r
-  if (!gAlice) {\r
-    Error("CheckESD", "no galice object found");\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadKinematics();\r
-  runLoader->LoadHeader();\r
-\r
-  // open the ESD file\r
-  TFile* esdFile = TFile::Open(esdFileName);\r
-  if (!esdFile || !esdFile->IsOpen()) {\r
-    Error("CheckESD", "opening ESD file %s failed", esdFileName);\r
-    return kFALSE;\r
-  }\r
-  AliESDEvent * esd = new AliESDEvent;\r
-  TTree* tree = (TTree*) esdFile->Get("esdTree");\r
-  if (!tree) {\r
-    Error("CheckESD", "no ESD tree found");\r
-    return kFALSE;\r
-  }\r
-  esd->ReadFromTree(tree);\r
-\r
-  // efficiency and resolution histograms\r
-  Int_t nBinsPt = 15;\r
-  Float_t minPt = 0.1;\r
-  Float_t maxPt = 3.1;\r
-  TH1F* hGen = CreateHisto("hGen", "generated tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  TH1F* hRec = CreateHisto("hRec", "reconstructed tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  Int_t nGen = 0;\r
-  Int_t nRec = 0;\r
-  Int_t nFake = 0;\r
-\r
-  TH1F* hResPtInv = CreateHisto("hResPtInv", "", 100, -10, 10, \r
-           "(p_{t,rec}^{-1}-p_{t,sim}^{-1}) / p_{t,sim}^{-1} [%]", "N");\r
-  TH1F* hResPhi = CreateHisto("hResPhi", "", 100, -20, 20, \r
-                             "#phi_{rec}-#phi_{sim} [mrad]", "N");\r
-  TH1F* hResTheta = CreateHisto("hResTheta", "", 100, -20, 20, \r
-                               "#theta_{rec}-#theta_{sim} [mrad]", "N");\r
-\r
-  // PID\r
-  Int_t partCode[AliPID::kSPECIES] = \r
-    {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};\r
-  const char* partName[AliPID::kSPECIES+1] = \r
-    {"electron", "muon", "pion", "kaon", "proton", "other"};\r
-  Double_t partFrac[AliPID::kSPECIES] = \r
-    {0.01, 0.01, 0.85, 0.10, 0.05};\r
-  Int_t identified[AliPID::kSPECIES+1][AliPID::kSPECIES];\r
-  for (Int_t iGen = 0; iGen < AliPID::kSPECIES+1; iGen++) {\r
-    for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-      identified[iGen][iRec] = 0;\r
-    }\r
-  }\r
-  Int_t nIdentified = 0;\r
-\r
-  // dE/dx and TOF\r
-  TH2F* hDEdxRight = new TH2F("hDEdxRight", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxRight->SetStats(kFALSE);\r
-  hDEdxRight->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxRight->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxRight->SetMarkerStyle(kFullCircle);\r
-  hDEdxRight->SetMarkerSize(0.4);\r
-  TH2F* hDEdxWrong = new TH2F("hDEdxWrong", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxWrong->SetStats(kFALSE);\r
-  hDEdxWrong->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxWrong->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxWrong->SetMarkerStyle(kFullCircle);\r
-  hDEdxWrong->SetMarkerSize(0.4);\r
-  hDEdxWrong->SetMarkerColor(kRed);\r
-  TH1F* hResTOFRight = CreateHisto("hResTOFRight", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  TH1F* hResTOFWrong = CreateHisto("hResTOFWrong", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  hResTOFWrong->SetLineColor(kRed);\r
-\r
-  // calorimeters\r
-  TH1F* hEPHOS = CreateHisto("hEPHOS", "PHOS", 100, 0, 50, "E [GeV]", "N");\r
-  TH1F* hEEMCAL = CreateHisto("hEEMCAL", "EMCAL", 100, 0, 50, "E [GeV]", "N");\r
-\r
-  // muons\r
-  TH1F* hPtMUON = CreateHisto("hPtMUON", "MUON", 100, 0, 20, \r
-                             "p_{t} [GeV/c]", "N");\r
-\r
-  // V0s and cascades\r
-  TH1F* hMassK0 = CreateHisto("hMassK0", "K^{0}", 100, 0.4, 0.6, \r
-                             "M(#pi^{+}#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambda = CreateHisto("hMassLambda", "#Lambda", 100, 1.0, 1.2, \r
-                                 "M(p#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambdaBar = CreateHisto("hMassLambdaBar", "#bar{#Lambda}", \r
-                                    100, 1.0, 1.2, \r
-                                    "M(#bar{p}#pi^{+}) [GeV/c^{2}]", "N");\r
-  Int_t nGenV0s = 0;\r
-  Int_t nRecV0s = 0;\r
-  TH1F* hMassXi = CreateHisto("hMassXi", "#Xi", 100, 1.2, 1.5, \r
-                             "M(#Lambda#pi) [GeV/c^{2}]", "N");\r
-  TH1F* hMassOmega = CreateHisto("hMassOmega", "#Omega", 100, 1.5, 1.8, \r
-                                "M(#LambdaK) [GeV/c^{2}]", "N");\r
-  Int_t nGenCascades = 0;\r
-  Int_t nRecCascades = 0;\r
-\r
-  // loop over events\r
-  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {\r
-    runLoader->GetEvent(iEvent);\r
-\r
-    // select simulated primary particles, V0s and cascades\r
-    AliStack* stack = gAlice->Stack();\r
-    Int_t nParticles = stack->GetNtrack();\r
-    TArrayF vertex(3);\r
-    runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex);\r
-    TObjArray selParticles;\r
-    TObjArray selV0s;\r
-    TObjArray selCascades;\r
-    for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {\r
-      TParticle* particle = stack->Particle(iParticle);\r
-      if (!particle) continue;\r
-      if (particle->Pt() < 0.001) continue;\r
-      if (TMath::Abs(particle->Eta()) > 0.9) continue;\r
-      TVector3 dVertex(particle->Vx() - vertex[0], \r
-                      particle->Vy() - vertex[1],\r
-                      particle->Vz() - vertex[2]);\r
-      if (dVertex.Mag() > 0.0001) continue;\r
-\r
-      switch (TMath::Abs(particle->GetPdgCode())) {\r
-      case kElectron:\r
-      case kMuonMinus:\r
-      case kPiPlus:\r
-      case kKPlus:\r
-      case kProton: {\r
-       if (particle->Pt() > minPt) {\r
-         selParticles.Add(particle);\r
-         nGen++;\r
-         hGen->Fill(particle->Pt());\r
-       }\r
-       break;\r
-      }\r
-      case kK0Short:\r
-      case kLambda0: {\r
-       if (particle->Pt() > cutPtV0) {\r
-         nGenV0s++;\r
-         selV0s.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      case kXiMinus:\r
-      case kOmegaMinus: {\r
-       if (particle->Pt() > cutPtCascade) {\r
-         nGenCascades++;\r
-         selCascades.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      default: break;\r
-      }\r
-    }\r
-\r
-    // get the event summary data\r
-    tree->GetEvent(iEvent);\r
-    if (!esd) {\r
-      Error("CheckESD", "no ESD object found for event %d", iEvent);\r
-      return kFALSE;\r
-    }\r
-\r
-    // loop over tracks\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfTracks(); iTrack++) {\r
-      AliESDtrack* track = esd->GetTrack(iTrack);\r
-\r
-      // select tracks of selected particles\r
-      Int_t label = TMath::Abs(track->GetLabel());\r
-      if (label > stack->GetNtrack()) continue;     // background\r
-      TParticle* particle = stack->Particle(label);\r
-      if (!selParticles.Contains(particle)) continue;\r
-      if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) continue;\r
-      if (track->GetConstrainedChi2() > 1e9) continue;\r
-      selParticles.Remove(particle);   // don't count multiple tracks\r
-\r
-      nRec++;\r
-      hRec->Fill(particle->Pt());\r
-      if (track->GetLabel() < 0) nFake++;\r
-\r
-      // resolutions\r
-      hResPtInv->Fill(100. * (TMath::Abs(track->GetSigned1Pt()) - 1./particle->Pt()) * \r
-                     particle->Pt());\r
-      hResPhi->Fill(1000. * (track->Phi() - particle->Phi()));\r
-      hResTheta->Fill(1000. * (track->Theta() - particle->Theta()));\r
-\r
-      // PID\r
-      if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) continue;\r
-      Int_t iGen = 5;\r
-      for (Int_t i = 0; i < AliPID::kSPECIES; i++) {\r
-       if (TMath::Abs(particle->GetPdgCode()) == partCode[i]) iGen = i;\r
-      }\r
-      Double_t probability[AliPID::kSPECIES];\r
-      track->GetESDpid(probability);\r
-      Double_t pMax = 0;\r
-      Int_t iRec = 0;\r
-      for (Int_t i = 0; i < AliPID::kSPECIES; i++) {\r
-       probability[i] *= partFrac[i];\r
-       if (probability[i] > pMax) {\r
-         pMax = probability[i];\r
-         iRec = i;\r
-       }\r
-      }\r
-      identified[iGen][iRec]++;\r
-      if (iGen == iRec) nIdentified++;\r
-\r
-      // dE/dx and TOF\r
-      Double_t time[AliPID::kSPECIES];\r
-      track->GetIntegratedTimes(time);\r
-      if (iGen == iRec) {\r
-       hDEdxRight->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFRight->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      } else {\r
-       hDEdxWrong->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFWrong->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      }\r
-    }\r
-\r
-    // loop over muon tracks\r
-    {\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfMuonTracks(); iTrack++) {\r
-      AliESDMuonTrack* muonTrack = esd->GetMuonTrack(iTrack);\r
-      Double_t ptInv = TMath::Abs(muonTrack->GetInverseBendingMomentum());\r
-      if (ptInv > 0.001) {\r
-       hPtMUON->Fill(1./ptInv);\r
-      }\r
-    }\r
-    }\r
-\r
-    // loop over V0s\r
-    for (Int_t iV0 = 0; iV0 < esd->GetNumberOfV0s(); iV0++) {\r
-      AliESDv0* v0 = esd->GetV0(iV0);\r
-      if (v0->GetOnFlyStatus()) continue;\r
-      v0->ChangeMassHypothesis(kK0Short);\r
-      hMassK0->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0);\r
-      hMassLambda->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0Bar);\r
-      hMassLambdaBar->Fill(v0->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(v0->GetNindex())->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(v0->GetPindex())->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      TParticle* particle = stack->Particle(negMother);\r
-      if (!selV0s.Contains(particle)) continue;\r
-      selV0s.Remove(particle);\r
-      nRecV0s++;\r
-    }\r
-\r
-    // loop over Cascades\r
-    for (Int_t iCascade = 0; iCascade < esd->GetNumberOfCascades(); \r
-        iCascade++) {\r
-      AliESDcascade* cascade = esd->GetCascade(iCascade);\r
-      Double_t v0q;\r
-      cascade->ChangeMassHypothesis(v0q,kXiMinus);\r
-      hMassXi->Fill(cascade->GetEffMass());\r
-      cascade->ChangeMassHypothesis(v0q,kOmegaMinus);\r
-      hMassOmega->Fill(cascade->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(cascade->GetNindex())\r
-                                 ->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(cascade->GetPindex())\r
-                                 ->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      Int_t v0Mother = stack->Particle(negMother)->GetMother(0);\r
-      if (v0Mother < 0) continue;\r
-      Int_t bacLabel = TMath::Abs(esd->GetTrack(cascade->GetBindex())\r
-                                 ->GetLabel());\r
-      if (bacLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t bacMother = stack->Particle(bacLabel)->GetMother(0);\r
-      if (v0Mother != bacMother) continue;\r
-      TParticle* particle = stack->Particle(v0Mother);\r
-      if (!selCascades.Contains(particle)) continue;\r
-      selCascades.Remove(particle);\r
-      nRecCascades++;\r
-    }\r
-\r
-    // loop over the clusters\r
-    {\r
-      for (Int_t iCluster=0; iCluster<esd->GetNumberOfCaloClusters(); iCluster++) {\r
-       AliESDCaloCluster * clust = esd->GetCaloCluster(iCluster);\r
-       if (clust->IsPHOS()) hEPHOS->Fill(clust->E());\r
-       if (clust->IsEMCAL()) hEEMCAL->Fill(clust->E());\r
-      }\r
-    }\r
-\r
-  }\r
-\r
-  // perform checks\r
-  if (nGen < checkNGenLow) {\r
-    Warning("CheckESD", "low number of generated particles: %d", Int_t(nGen));\r
-  }\r
-\r
-  TH1F* hEff = CreateEffHisto(hGen, hRec);\r
-\r
-  Info("CheckESD", "%d out of %d tracks reconstructed including %d "\r
-        "fake tracks", nRec, nGen, nFake);\r
-  if (nGen > 0) {\r
-    // efficiency\r
-    Double_t eff = nRec*1./nGen;\r
-    Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGen);\r
-    Double_t fake = nFake*1./nGen;\r
-    Double_t fakeError = TMath::Sqrt(fake*(1.-fake) / nGen);\r
-    Info("CheckESD", "eff = (%.1f +- %.1f) %%  fake = (%.1f +- %.1f) %%",\r
-        100.*eff, 100.*effError, 100.*fake, 100.*fakeError);\r
-\r
-    if (eff < checkEffLow - checkEffSigma*effError) {\r
-      Warning("CheckESD", "low efficiency: (%.1f +- %.1f) %%", \r
-             100.*eff, 100.*effError);\r
-    }\r
-    if (fake > checkFakeHigh + checkFakeSigma*fakeError) {\r
-      Warning("CheckESD", "high fake: (%.1f +- %.1f) %%", \r
-             100.*fake, 100.*fakeError);\r
-    }\r
-\r
-    // resolutions\r
-    Double_t res, resError;\r
-    if (FitHisto(hResPtInv, res, resError)) {\r
-      Info("CheckESD", "relative inverse pt resolution = (%.1f +- %.1f) %%",\r
-          res, resError);\r
-      if (res > checkResPtInvHigh + checkResPtInvSigma*resError) {\r
-       Warning("CheckESD", "bad pt resolution: (%.1f +- %.1f) %%", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResPhi, res, resError)) {\r
-      Info("CheckESD", "phi resolution = (%.1f +- %.1f) mrad", res, resError);\r
-      if (res > checkResPhiHigh + checkResPhiSigma*resError) {\r
-       Warning("CheckESD", "bad phi resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResTheta, res, resError)) {\r
-      Info("CheckESD", "theta resolution = (%.1f +- %.1f) mrad", \r
-          res, resError);\r
-      if (res > checkResThetaHigh + checkResThetaSigma*resError) {\r
-       Warning("CheckESD", "bad theta resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // PID\r
-    if (nRec > 0) {\r
-      Double_t eff = nIdentified*1./nRec;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nRec);\r
-      Info("CheckESD", "PID eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkPIDEffLow - checkPIDEffSigma*effError) {\r
-       Warning("CheckESD", "low PID efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    printf("%9s:", "gen\\rec");\r
-    for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-      printf("%9s", partName[iRec]);\r
-    }\r
-    printf("\n");\r
-    for (Int_t iGen = 0; iGen < AliPID::kSPECIES+1; iGen++) {\r
-      printf("%9s:", partName[iGen]);\r
-      for (Int_t iRec = 0; iRec < AliPID::kSPECIES; iRec++) {\r
-       printf("%9d", identified[iGen][iRec]);\r
-      }\r
-      printf("\n");\r
-    }\r
-\r
-    if (FitHisto(hResTOFRight, res, resError)) {\r
-      Info("CheckESD", "TOF resolution = (%.1f +- %.1f) ps", res, resError);\r
-      if (res > checkResTOFHigh + checkResTOFSigma*resError) {\r
-       Warning("CheckESD", "bad TOF resolution: (%.1f +- %.1f) ps", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // calorimeters\r
-    if (hEPHOS->Integral() < checkPHOSNLow) {\r
-      Warning("CheckESD", "low number of PHOS particles: %d", \r
-             Int_t(hEPHOS->Integral()));\r
-    } else {\r
-      Double_t mean = hEPHOS->GetMean();\r
-      if (mean < checkPHOSEnergyLow) {\r
-       Warning("CheckESD", "low mean PHOS energy: %.1f GeV", mean);\r
-      } else if (mean > checkPHOSEnergyHigh) {\r
-       Warning("CheckESD", "high mean PHOS energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    if (hEEMCAL->Integral() < checkEMCALNLow) {\r
-      Warning("CheckESD", "low number of EMCAL particles: %d", \r
-             Int_t(hEEMCAL->Integral()));\r
-    } else {\r
-      Double_t mean = hEEMCAL->GetMean();\r
-      if (mean < checkEMCALEnergyLow) {\r
-       Warning("CheckESD", "low mean EMCAL energy: %.1f GeV", mean);\r
-      } else if (mean > checkEMCALEnergyHigh) {\r
-       Warning("CheckESD", "high mean EMCAL energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    // muons\r
-    if (hPtMUON->Integral() < checkMUONNLow) {\r
-      Warning("CheckESD", "low number of MUON particles: %d", \r
-             Int_t(hPtMUON->Integral()));\r
-    } else {\r
-      Double_t mean = hPtMUON->GetMean();\r
-      if (mean < checkMUONPtLow) {\r
-       Warning("CheckESD", "low mean MUON pt: %.1f GeV/c", mean);\r
-      } else if (mean > checkMUONPtHigh) {\r
-       Warning("CheckESD", "high mean MUON pt: %.1f GeV/c", mean);\r
-      }\r
-    }\r
-\r
-    // V0s\r
-    if (nGenV0s > 0) {\r
-      Double_t eff = nRecV0s*1./nGenV0s;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenV0s);\r
-      if (effError == 0) effError = checkV0EffLow / TMath::Sqrt(1.*nGenV0s);\r
-      Info("CheckESD", "V0 eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkV0EffLow - checkV0EffSigma*effError) {\r
-       Warning("CheckESD", "low V0 efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    // Cascades\r
-    if (nGenCascades > 0) {\r
-      Double_t eff = nRecCascades*1./nGenCascades;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenCascades);\r
-      if (effError == 0) effError = checkV0EffLow / \r
-                          TMath::Sqrt(1.*nGenCascades);\r
-      Info("CheckESD", "Cascade eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkCascadeEffLow - checkCascadeEffSigma*effError) {\r
-       Warning("CheckESD", "low Cascade efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-  }\r
-\r
-  // draw the histograms if not in batch mode\r
-  if (!gROOT->IsBatch()) {\r
-    new TCanvas;\r
-    hEff->DrawCopy();\r
-    new TCanvas;\r
-    hResPtInv->DrawCopy("E");\r
-    new TCanvas;\r
-    hResPhi->DrawCopy("E");\r
-    new TCanvas;\r
-    hResTheta->DrawCopy("E");\r
-    new TCanvas;\r
-    hDEdxRight->DrawCopy();\r
-    hDEdxWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hResTOFRight->DrawCopy("E");\r
-    hResTOFWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hEPHOS->DrawCopy("E");\r
-    new TCanvas;\r
-    hEEMCAL->DrawCopy("E");\r
-    new TCanvas;\r
-    hPtMUON->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassK0->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambda->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambdaBar->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassXi->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassOmega->DrawCopy("E");\r
-  }\r
-\r
-  // write the output histograms to a file\r
-  TFile* outputFile = TFile::Open("check.root", "recreate");\r
-  if (!outputFile || !outputFile->IsOpen()) {\r
-    Error("CheckESD", "opening output file check.root failed");\r
-    return kFALSE;\r
-  }\r
-  hEff->Write();\r
-  hResPtInv->Write();\r
-  hResPhi->Write();\r
-  hResTheta->Write();\r
-  hDEdxRight->Write();\r
-  hDEdxWrong->Write();\r
-  hResTOFRight->Write();\r
-  hResTOFWrong->Write();\r
-  hEPHOS->Write();\r
-  hEEMCAL->Write();\r
-  hPtMUON->Write();\r
-  hMassK0->Write();\r
-  hMassLambda->Write();\r
-  hMassLambdaBar->Write();\r
-  hMassXi->Write();\r
-  hMassOmega->Write();\r
-  outputFile->Close();\r
-  delete outputFile;\r
-\r
-  // clean up\r
-  delete hGen;\r
-  delete hRec;\r
-  delete hEff;\r
-  delete hResPtInv;\r
-  delete hResPhi;\r
-  delete hResTheta;\r
-  delete hDEdxRight;\r
-  delete hDEdxWrong;\r
-  delete hResTOFRight;\r
-  delete hResTOFWrong;\r
-  delete hEPHOS;\r
-  delete hEEMCAL;\r
-  delete hPtMUON;\r
-  delete hMassK0;\r
-  delete hMassLambda;\r
-  delete hMassLambdaBar;\r
-  delete hMassXi;\r
-  delete hMassOmega;\r
-\r
-  delete esd;\r
-  esdFile->Close();\r
-  delete esdFile;\r
-\r
-  runLoader->UnloadHeader();\r
-  runLoader->UnloadKinematics();\r
-  delete runLoader;\r
-\r
-  // result of check\r
-  Info("CheckESD", "check of ESD was successfull");\r
-  return kTRUE;\r
-}\r
diff --git a/prod/LHC08d11/Config.C b/prod/LHC08d11/Config.C
deleted file mode 100644 (file)
index 3b76007..0000000
+++ /dev/null
@@ -1,1029 +0,0 @@
-// One can use the configuration macro in compiled mode by\r
-// root [0] gSystem->Load("libgeant321");
-// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
-//                   -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
-// root [0] .x grun.C(1,"Config_PDC07.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TRandom.h>
-#include <TDatime.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenParam.h"
-#include "EVGEN/AliGenMUONlib.h"
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagF.h"
-#include "STRUCT/AliBODY.h"
-#include "STRUCT/AliMAG.h"
-#include "STRUCT/AliABSOv3.h"
-#include "STRUCT/AliDIPOv3.h"
-#include "STRUCT/AliHALLv3.h"
-#include "STRUCT/AliFRAMEv2.h"
-#include "STRUCT/AliSHILv3.h"
-#include "STRUCT/AliPIPEv3.h"
-#include "ITS/AliITSv11Hybrid.h"
-#include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv6T0.h"
-#include "HMPID/AliHMPIDv3.h"
-#include "ZDC/AliZDCv3.h"
-#include "TRD/AliTRDv1.h"
-#include "TRD/AliTRDgeometry.h"
-#include "FMD/AliFMDv1.h"
-#include "MUON/AliMUONv1.h"
-#include "PHOS/AliPHOSv1.h"
-#include "PHOS/AliPHOSSimParam.h"
-#include "PMD/AliPMDv1.h"
-#include "T0/AliT0v1.h"
-#include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv1.h"
-#include "VZERO/AliVZEROv7.h"
-#endif
-
-
-enum PDC07Proc_t
-{
-//--- Heavy Flavour Production ---
-  kCharmPbPb5500,  kCharmpPb8800,  kCharmpp14000,  kCharmpp14000wmi,
-  kD0PbPb5500,     kD0pPb8800,     kD0pp14000,
-  kDPlusPbPb5500,  kDPluspPb8800,  kDPluspp14000,
-  kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
-  // -- Pythia Mb
-  kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kPyJetJet, kBeautyppwmiJet,
-  kPyGammaJetPHOS, kPyJetJetPHOS, kPyJetJetPHOSv2, kPyGammaBremsPHOS,
-  kPyGammaJetEMCAL, kPyJetJetEMCAL, kPyGammaBremsEMCAL, kRunMax
-};
-
-const char * pprRunName[] = {
-  "kCharmPbPb5500",  "kCharmpPb8800",  "kCharmpp14000",  "kCharmpp14000wmi",
-  "kD0PbPb5500",     "kD0pPb8800",     "kD0pp14000",
-  "kDPlusPbPb5500",  "kDPluspPb8800",  "kDPluspp14000",
-  "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi",
-  "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus", "kPyJetJet", "kBeautyppwmiJet",
-  "kPyGammaJetPHOS", "kPyJetJetPHOS",  "kPyJetJetPHOSv2", "kPyGammaBremsPHOS",
-  "kPyGammaJetEMCAL", "kPyJetJetEMCAL", "kPyGammaBremsEMCAL"
-};
-
-
-//--- Decay Mode ---
-enum DecayHvFl_t
-{
-  kNature,  kHadr, kSemiEl, kSemiMu
-};
-//--- Magnetic Field ---
-enum Mag_t
-{
-  kNoField, k5kG, kFieldMax
-};
-//--- Trigger config ---
-enum TrigConf_t
-{
-    kDefaultPPTrig, kDefaultPbPbTrig
-};
-
-const char * TrigConfName[] = {
-    "p-p","Pb-Pb"
-};
-
-//--- Functions ---
-class AliGenPythia ;
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc);
-AliGenPythia *PythiaHard(PDC07Proc_t proc);
-AliGenerator *MbCocktail();
-AliGenerator *PyMbTriggered(Int_t pdg);
-void ProcessEnvironmentVars();
-
-// This part for configuration
-static DecayHvFl_t   decHvFl     = kNature;
-static Mag_t         mag         = k5kG;
-static TrigConf_t    trig        = kDefaultPPTrig; // default pp trigger configuration
-static Int_t         runNumber   = 0;
-static Int_t         eventNumber = 0;
-//========================//
-// Set Random Number seed //
-//========================//
-TDatime dt;
-static UInt_t seed    = dt.Get();
-
-// nEvts = -1  : you get 1 QQbar pair and all the fragmentation and
-//               decay chain
-// nEvts = N>0 : you get N charm / beauty Hadrons
-Int_t nEvts = -1;
-// stars = kTRUE : all heavy resonances and their decay stored
-//       = kFALSE: only final heavy hadrons and their decays stored
-Bool_t stars = kTRUE;
-
-// To be used only with kCharmpp14000wmi and kBeautypp14000wmi
-// To get a "reasonable" agreement with MNR results, events have to be
-// generated with the minimum ptHard set to 2.76 GeV.
-// To get a "perfect" agreement with MNR results, events have to be
-// generated in four ptHard bins with the following relative
-// normalizations:
-//  CHARM
-// 2.76-3 GeV: 25%
-//    3-4 GeV: 40%
-//    4-8 GeV: 29%
-//     >8 GeV:  6%
-//  BEAUTY
-// 2.76-4 GeV:  5%
-//    4-6 GeV: 31%
-//    6-8 GeV: 28%
-//     >8 GeV: 36%
-
-
-Float_t eCMS=5500;
-PDC07Proc_t proc = kPyJetJet;
-//PDC07Proc_t proc = kPyGammaJetEMCAL;
-//PDC07Proc_t proc = kBeautyppwmiJet;
-Int_t nPtHardGJBins = 11;
-Int_t ptHardGJLo[] = {5 ,10,20,30,40,50,60,70,80,90 ,100};
-Int_t ptHardGJHi[] = {10,20,30,40,50,60,70,80,90,100,-1};
-Int_t nPtHardJJBins = 17;
-Int_t ptHardJJLo[] = {2 ,12,16,20,24,29,35,41,50,60,72,86 ,104,124,149,179,215};
-Int_t ptHardJJHi[] = {12,16,20,24,29,35,41,50,60,72,86,104,124,149,179,215,258};
-Float_t ptHardMin =  10.;
-Float_t ptHardMax =  20.;
-Float_t ptGammaPi0Min = 0.;
-Int_t iquenching = 0;
-Float_t qhat = 50.; //for  iquenching equal 1 and 4
-//Float_t medlength = 6.; // for iquenching equal to 4
-Int_t year = 0; //ALICE geometry configuration
-Bool_t pi0FragPhotonInDet = kFALSE ;
-
-// Comment line
-static TString comment;
-
-void Config()
-{
-
-       // Get settings from environment variables
-       ProcessEnvironmentVars();
-       
-       gSystem->Load("liblhapdf.so");      // Parton density functions
-       gSystem->Load("libEGPythia6.so");   // TGenerator interface
-       gSystem->Load("libpythia6.so");     // Pythia
-       gSystem->Load("libAliPythia6.so");  // ALICE specific implementations
-       
-       // libraries required by geant321
-#if defined(__CINT__)
-       gSystem->Load("liblhapdf");
-       gSystem->Load("libEGPythia6");
-       gSystem->Load("libpythia6");
-       gSystem->Load("libAliPythia6");
-       gSystem->Load("libgeant321");
-#endif
-       
-       new TGeant3TGeo("C++ Interface to Geant3");
-       
-       // Output every 100 tracks
-       ((TGeant3*)gMC)->SetSWIT(4,100);
-       
-       //=======================================================================
-       
-       // Run loader
-       AliRunLoader* rl=0x0;
-       rl = AliRunLoader::Open("galice.root",
-                                                       AliConfig::GetDefaultEventFolderName(),
-                                                       "recreate");
-       if (rl == 0x0)
-    {
-               gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
-               return;
-    }
-       rl->SetCompressionLevel(2);
-       rl->SetNumberOfEventsPerFile(1000);
-       gAlice->SetRunLoader(rl);
-       
-       // Set the trigger configuration
-       AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]);
-       cout<<"Trigger configuration is set to  "<<TrigConfName[trig]<<endl;
-       
-       //
-       //=======================================================================
-       // ************* STEERING parameters FOR ALICE SIMULATION **************
-       // --- Specify event type to be tracked through the ALICE setup
-       // --- All positions are in cm, angles in degrees, and P and E in GeV
-       
-       
-    gMC->SetProcess("DCAY",1);
-    gMC->SetProcess("PAIR",1);
-    gMC->SetProcess("COMP",1);
-    gMC->SetProcess("PHOT",1);
-    gMC->SetProcess("PFIS",0);
-    gMC->SetProcess("DRAY",0);
-    gMC->SetProcess("ANNI",1);
-    gMC->SetProcess("BREM",1);
-    gMC->SetProcess("MUNU",1);
-    gMC->SetProcess("CKOV",1);
-    gMC->SetProcess("HADR",1);
-    gMC->SetProcess("LOSS",2);
-    gMC->SetProcess("MULS",1);
-    gMC->SetProcess("RAYL",1);
-       
-    Float_t cut = 1.e-3;        // 1MeV cut by default
-    Float_t tofmax = 1.e10;
-       
-    gMC->SetCut("CUTGAM", cut);
-    gMC->SetCut("CUTELE", cut);
-    gMC->SetCut("CUTNEU", cut);
-    gMC->SetCut("CUTHAD", cut);
-    gMC->SetCut("CUTMUO", cut);
-    gMC->SetCut("BCUTE",  cut);
-    gMC->SetCut("BCUTM",  cut);
-    gMC->SetCut("DCUTE",  cut);
-    gMC->SetCut("DCUTM",  cut);
-    gMC->SetCut("PPCUTM", cut);
-    gMC->SetCut("TOFMAX", tofmax);
-       
-       //======================//
-       // Set External decayer //
-       //======================//
-       TVirtualMCDecayer* decayer = new AliDecayerPythia();
-       // DECAYS
-       //
-       switch(decHvFl) {
-               case kNature:
-                       decayer->SetForceDecay(kNeutralPion);
-                       break;
-               case kHadr:
-                       decayer->SetForceDecay(kHadronicD);
-                       break;
-               case kSemiEl:
-                       decayer->SetForceDecay(kSemiElectronic);
-                       break;
-               case kSemiMu:
-                       decayer->SetForceDecay(kSemiMuonic);
-                       break;
-       }
-       decayer->Init();
-       gMC->SetExternalDecayer(decayer);
-       //if(proc == kPyJetJetPHOSv2) // in this case we decay the pi0
-       //      decayer->SetForceDecay(kNeutralPion);
-       
-       //=========================//
-       // Generator Configuration //
-       //=========================//
-       AliGenPythia* gener = 0x0;
-       
-       if (proc <=   kBeautypp14000wmi) {
-               AliGenPythia *pythia = PythiaHVQ(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Stack filling option
-               if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               //
-               // DECAYS
-               //
-               switch(decHvFl) {
-                       case kNature:
-                               pythia->SetForceDecay(kNeutralPion);
-                               break;
-                       case kHadr:
-                               pythia->SetForceDecay(kHadronicD);
-                               break;
-                       case kSemiEl:
-                               pythia->SetForceDecay(kSemiElectronic);
-                               break;
-                       case kSemiMu:
-                               pythia->SetForceDecay(kSemiMuonic);
-                               break;
-               }
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-               pythia->SetPhiRange(0., 360.);
-               pythia->SetThetaRange(0,180);
-               switch(ycut) {
-                       case kFull:
-                               pythia->SetYRange(-12,12);
-                               break;
-                       case kBarrel:
-                               pythia->SetYRange(-2,2);
-                               break;
-                       case kMuonArm:
-                               pythia->SetYRange(1,6);
-                               break;
-               }
-               gener = pythia;
-       } else if (proc == kPyMbNoHvq) {
-               gener = MbCocktail();
-       } else if (proc == kPyOmegaMinus) {
-               gener = PyMbTriggered(3334);
-       } else if (proc == kPyOmegaPlus) {
-               gener = PyMbTriggered(-3334);
-       } else if (proc <= kPyGammaBremsEMCAL) {
-               AliGenPythia *pythia = PythiaHard(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-//             if(proc == kPyJetJetPHOSv2)
-//                     pythia->SetForceDecay(kNeutralPion);
-//             else
-//                     pythia->SetForceDecay(kAll);
-
-               pythia->SetForceDecay(kNeutralPion);
-               pythia->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
-               pythia->SetGluonRadiation(1,1); //ISR and FRS effects on.
-               pythia->SetPtKick(3.); // set the intrinsic kt to about 5.3 GeV/c
-               gener = pythia;
-       }
-       
-       
-       // PRIMARY VERTEX
-       
-       gener->SetOrigin(0., 0., 0.);    // vertex position
-       
-       // Size of the interaction diamond
-       // Longitudinal
-       Float_t           sigmaz  = 7.55 / TMath::Sqrt(2.); // [cm] 14  TeV (p-p), 5.5 TeV (Pb-Pb)
-       if(eCMS == 10000) sigmaz  = 5.4  / TMath::Sqrt(2.); // [cm] 10  TeV
-       if(eCMS == 900)   sigmaz  = 10.5 / TMath::Sqrt(2.); // [cm] 0.9 TeV
-       cout<<">>> SigmaZ x srqt(2.) "<< sigmaz * TMath::Sqrt(2.) << endl;
-       
-    // Transverse
-       Float_t betast  = 10;                 // beta* [m]
-       Float_t eps     = 3.75e-6;            // emittance [m]
-       Float_t gamma   = eCMS / 2.0 / 0.938272;   // relativistic gamma [1]
-       Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.;  // [cm]
-       printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
-       
-       gener->SetSigma(sigmaxy, sigmaxy, sigmaz);      // Sigma in (X,Y,Z) (cm) on IP position
-       gener->SetCutVertexZ(3.);        // Truncate at 3 sigma
-       gener->SetVertexSmear(kPerEvent);
-       
-       gener->Init();
-       
-       //Quenching
-       gener->SetQuench(iquenching);
-       if(iquenching == 1){ //quenching weights
-               Float_t k = 6e5*(qhat/1.7) ; //qhat=1.7, k = 6e5, default  value
-               AliPythia::Instance()->InitQuenching(0.,0.1,k,0,0.95,6);
-       }
-       else if(iquenching == 4){ //q-pythia
-               //Not yet implemented
-               gener->SetQhat(qhat); //   !transport coefficient (GeV2/fm)
-       }
-
-  // FIELD
-  //
-  AliMagF* field = 0x0;
-  if (mag == kNoField) {
-    comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagF("Maps","Maps", 0., 0., AliMagF::k5kGUniform);
-  } else if (mag == k5kG) {
-    comment = comment.Append(" | L3 field 0.5 T");
-    field = new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG);
-  }
-  printf("\n \n Comment: %s \n \n", comment.Data());
-  TGeoGlobalMagField::Instance()->SetField(field);
-
-  rl->CdGAFile();
-  gAlice->SetField(field);
-
-       
-       Int_t iABSO   = 1;
-       Int_t iACORDE = 0;
-       Int_t iDIPO   = 1;
-       Int_t iEMCAL  = 1;
-       Int_t iFMD    = 1;
-       Int_t iFRAME  = 1;
-       Int_t iHALL   = 1;
-       Int_t iITS    = 1;
-       Int_t iMAG    = 1;
-       Int_t iMUON   = 1;
-       Int_t iPHOS   = 1;
-       Int_t iPIPE   = 1;
-       Int_t iPMD    = 1;
-       Int_t iHMPID  = 1;
-       Int_t iSHIL   = 1;
-       Int_t iT0     = 1;
-       Int_t iTOF    = 1;
-       Int_t iTPC    = 1;
-       Int_t iTRD    = 1;
-       Int_t iVZERO  = 1;
-       Int_t iZDC    = 1;
-       
-       
-    //=================== Alice BODY parameters =============================
-    AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
-       
-       
-    if (iMAG)
-    {
-        //=================== MAG parameters ============================
-        // --- Start with Magnet since detector layouts may be depending ---
-        // --- on the selected Magnet dimensions ---
-        AliMAG *MAG = new AliMAG("MAG", "Magnet");
-    }
-       
-       
-    if (iABSO)
-    {
-        //=================== ABSO parameters ============================
-        AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
-    }
-       
-    if (iDIPO)
-    {
-        //=================== DIPO parameters ============================
-               
-        AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
-    }
-       
-    if (iHALL)
-    {
-        //=================== HALL parameters ============================
-               
-        AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
-    }
-       
-       
-    if (iFRAME)
-    {
-        //=================== FRAME parameters ============================
-               
-        AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
-           FRAME->SetHoles(1);
-    }
-       
-    if (iSHIL)
-    {
-        //=================== SHIL parameters ============================
-               
-        AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
-    }
-       
-       
-    if (iPIPE)
-    {
-        //=================== PIPE parameters ============================
-               
-        AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
-    }
-       
-    if (iITS)
-       {
-               //=================== ITS parameters ============================
-               
-               AliITS *ITS  = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
-    }
-       
-    if (iTPC)
-    {
-               //============================ TPC parameters =====================
-
-        AliTPC *TPC = new AliTPCv2("TPC", "Default");
-    }
-       
-       
-    if (iTOF) {
-        //=================== TOF parameters ============================
-
-               AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
-       }
-       
-       
-    if (iHMPID)
-    {
-        //=================== HMPID parameters ===========================
-               AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");  
-       }
-       
-       
-    if (iZDC)
-    {
-        //=================== ZDC parameters ============================
-               
-        AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
-    }
-       
-    if (iTRD)
-    {
-        //=================== TRD parameters ============================
-               
-        AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
-        AliTRDgeometry *geoTRD = TRD->GetGeometry();
-               if(year == 2009){
-                       // Partial geometry: modules at 0,8,9,17
-                       // Partial geometry: modules at 1,7,10,16 expected for 2009
-                       // starting at 3h in positive direction
-                       
-                       //geoTRD->SetSMstatus(1,0);
-                       //geoTRD->SetSMstatus(2,0);
-                       //geoTRD->SetSMstatus(3,0);
-                       //geoTRD->SetSMstatus(4,0);
-                       //geoTRD->SetSMstatus(5,0);
-                       //geoTRD->SetSMstatus(6,0);
-                       //geoTRD->SetSMstatus(7,0);
-                       
-                       
-                       //geoTRD->SetSMstatus(10,0);
-                       //geoTRD->SetSMstatus(11,0);
-                       //geoTRD->SetSMstatus(12,0);
-                       //geoTRD->SetSMstatus(13,0);
-                       //geoTRD->SetSMstatus(14,0);
-                       //geoTRD->SetSMstatus(15,0);
-                       //geoTRD->SetSMstatus(16,0);
-       
-                       geoTRD->SetSMstatus(2,0);
-                       geoTRD->SetSMstatus(3,0);
-                       geoTRD->SetSMstatus(4,0);
-                       geoTRD->SetSMstatus(5,0);
-                       geoTRD->SetSMstatus(6,0);
-
-                              geoTRD->SetSMstatus(11,0);
-                              geoTRD->SetSMstatus(12,0);
-                                      geoTRD->SetSMstatus(13,0);
-                                      geoTRD->SetSMstatus(14,0);
-                                      geoTRD->SetSMstatus(15,0);
-       }
-    }
-       
-    if (iFMD)
-    {
-        //=================== FMD parameters ============================
-               AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
-       }
-       
-    if (iMUON)
-    {
-        //=================== MUON parameters ===========================
-        // New MUONv1 version (geometry defined via builders)
-        AliMUON *MUON = new AliMUONv1("MUON", "default");
-    }
-    //=================== PHOS parameters ===========================
-       
-    if (iPHOS)
-    {
-        AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
-    }
-       
-       
-    if (iPMD)
-    {
-        //=================== PMD parameters ============================
-        AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
-    }
-       
-    if (iT0)
-    {
-        //=================== T0 parameters ============================
-        AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
-    }
-       
-    if (iEMCAL)
-    {
-        //=================== EMCAL parameters ============================
-        AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
-    }
-       
-       if (iACORDE)
-    {
-        //=================== ACORDE parameters ============================
-        AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
-    }
-       
-       if (iVZERO)
-    {
-        //=================== VZERO parameters ============================
-        AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
-    }
-       
-       AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
-}
-
-//           PYTHIA
-
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for charm / beauty generation with PYTHIA      //
-//                                                                   //
-// The parameters have been tuned in order to reproduce the inclusive//
-// heavy quark pt distribution given by the NLO pQCD calculation by  //
-// Mangano, Nason and Ridolfi.                                       //
-//                                                                   //
-// For details and for the NORMALIZATION of the yields see:          //
-//   N.Carrer and A.Dainese,                                         //
-//   "Charm and beauty production at the LHC",                       //
-//   ALICE-INT-2003-019, [arXiv:hep-ph/0311225];                     //
-//   PPR Chapter 6.6, CERN/LHCC 2005-030 (2005).                     //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-  case kCharmPbPb5500:
-      comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kCharmpPb8800:
-      comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmpPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kCharmpp14000:
-      comment = comment.Append(" Charm in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kCharmpp14000wmi:
-      comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyCharmppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kD0PbPb5500:
-      comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0PbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kD0pPb8800:
-      comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0pPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kD0pp14000:
-      comment = comment.Append(" D0 in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0ppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kDPlusPbPb5500:
-      comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kDPluspPb8800:
-      comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPluspPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kDPluspp14000:
-      comment = comment.Append(" DPlus in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautyPbPb5500:
-      comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kBeautypPb8800:
-      comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautypPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kBeautypp14000:
-      comment = comment.Append(" Beauty in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautypp14000wmi:
-      comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyBeautyppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-   }
-
-  return gener;
-}
-
-AliGenPythia *PythiaHard(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for hard QCD processes generation with PYTHIA  //
-//                                                                   //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-
-  case kPyJetJet:
-    comment = comment.Append(" pp->jet + jet over at 14 TeV, no restriction");
-    AliGenPythia * gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);//        Centre of mass energy
-    gener->SetProcess(kPyJets);//        Process type
-    gener->SetJetEtaRange(-1.5, 1.5);//  Final state kinematic cuts
-    gener->SetJetPhiRange(0., 360.);
-    gener->SetJetEtRange(10., 1000.);
-    gener->SetPtHard(ptHardMin, ptHardMax);// Pt transfer of the hard scattering
-    gener->SetStrucFunc(kCTEQ4L);
-    return gener;
-  case kBeautyppwmiJet:
-       comment = comment.Append(" Beauty Jets over EMCAL");
-       AliGenPythia *gener = new AliGenPythia(-1);
-       gener->SetProcess(kPyBeautyppMNRwmi);
-       gener->SetStrucFunc(kCTEQ4L);
-       //Jet specific stuff below
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       gener->SetJetEtaRange(-1,1);
-       gener->SetJetPhiRange(60.,210.);
-       gener->SetJetEtRange(10.,1000.);
-       //jet specific stuff above
-       gener->SetEnergyCMS(eCMS);
-       gener->SetForceDecay(kSemiElectronic);
-       gener->SetYRange(-2,2);
-       gener->SetFeedDownHigherFamily(kFALSE);
-       gener->SetCountMode(AliGenPythia::kCountParents);               
-      break;
-  case kPyGammaJetPHOS:
-      comment = comment.Append(" pp->jet + gamma over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyDirectGamma);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetGammaEtaRange(-0.13,0.13);
-      gener->SetGammaPhiRange(219.,321.);//Over 5 modules +-2 deg
-      break;
-  case kPyJetJetPHOS:
-      comment = comment.Append(" pp->jet + jet over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetJetEtRange(10., 1000.);
-      gener->SetPi0InPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-  case kPyGammaBremsPHOS:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over PHOS at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetFragPhotonInPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-         printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-         break;
-   case kPyJetJetPHOSv2:
-        comment = comment.Append(" pp->jet + jet over PHOS version2 ");
-        gener = new AliGenPythia(nEvts);
-       gener->SetEnergyCMS(eCMS);
-       gener->SetProcess(kPyJets);
-       gener->SetStrucFunc(kCTEQ4L);
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       //gener->SetYHard(-1.0,1.0);
-       gener->SetJetEtaRange(-1.,1.);
-       gener->SetJetPhiRange(200.,340.);
-       //gener->SetPi0InPHOS(kTRUE);
-       gener->SetPhotonInPHOSeta(pi0FragPhotonInDet);
-       gener->SetPhotonMinPt(ptGammaPi0Min);
-       gener->SetForceDecay(kAll);
-       break;
-  case kPyGammaJetEMCAL:
-    comment = comment.Append(" pp->jet + gamma over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyDirectGamma);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetGammaEtaRange(-0.701,0.701);
-    gener->SetGammaPhiRange(79.,191.);//Over 6 supermodules +-2 deg
-    break;
-  case kPyJetJetEMCAL:
-    comment = comment.Append(" pp->jet + jet over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyJets);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetJetEtaRange(-1,1);
-    gener->SetJetPhiRange(60.,210.);
-       gener->SetJetEtRange(10., 1000.);
-    gener->SetPi0InEMCAL(pi0FragPhotonInDet);
-    gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-    printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-    break;
-  case kPyGammaBremsEMCAL:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over EMCAL at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1,1);
-      gener->SetJetPhiRange(60.,210.); 
-         gener->SetJetEtRange(10., 1000.);
-      gener->SetFragPhotonInEMCAL(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-
-  }
-
-  return gener;
-}
-
-AliGenerator* MbCocktail()
-{
-      comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
-      AliGenCocktail * gener = new AliGenCocktail();
-      gener->UsePerEventRates();
-
-//    Pythia
-
-      AliGenPythia* pythia = new AliGenPythia(-1);
-      pythia->SetMomentumRange(0, 999999.);
-      pythia->SetThetaRange(0., 180.);
-      pythia->SetYRange(-12.,12.);
-      pythia->SetPtRange(0,1000.);
-      pythia->SetProcess(kPyMb);
-      pythia->SetEnergyCMS(14000.);
-      pythia->SwitchHFOff();
-
-//   J/Psi parameterisation
-
-      AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
-      jpsi->SetPtRange(0.,100.);
-      jpsi->SetYRange(-8., 8.);
-      jpsi->SetPhiRange(0., 360.);
-      jpsi->SetForceDecay(kAll);
-
-      gener->AddGenerator(pythia, "Pythia", 1.);
-      gener->AddGenerator(jpsi,   "J/Psi", 8.e-4);
-
-      return gener;
-}
-
-AliGenerator* PyMbTriggered(Int_t pdg)
-{
-    AliGenPythia* pythia = new AliGenPythia(-1);
-    pythia->SetMomentumRange(0, 999999.);
-    pythia->SetThetaRange(0., 180.);
-    pythia->SetYRange(-12.,12.);
-    pythia->SetPtRange(0,1000.);
-    pythia->SetProcess(kPyMb);
-    pythia->SetEnergyCMS(14000.);
-    pythia->SetTriggerParticle(pdg, 0.9);
-    return pythia;
-}
-
-void ProcessEnvironmentVars()
-{
-       cout << "######################################" << endl;
-       cout << "## Processing environment variables ##" << endl;
-       cout << "######################################" << endl;
-       
-    // Run Number
-    if (gSystem->Getenv("RUN")) {
-               runNumber = atoi(gSystem->Getenv("RUN"));
-    }
-    //cout<<"Run number "<<runNumber<<endl;
-       
-    // Event Number
-    if (gSystem->Getenv("EVENT")) {
-               eventNumber = atoi(gSystem->Getenv("EVENT"));
-    }
-    //cout<<"Event number "<<eventNumber<<endl;
-       
-       // Random Number seed
-    if (gSystem->Getenv("CONFIG_SEED")) {
-               seed = atoi(gSystem->Getenv("CONFIG_SEED"));
-    }
-    else if(gSystem->Getenv("EVENT") && gSystem->Getenv("RUN")){
-               seed = runNumber * 100000 + eventNumber;
-    }
-       
-    gRandom->SetSeed(seed);
-       
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-    cout<<"Seed for random number generation= "<< seed<<"  "<< gRandom->GetSeed()<<endl;
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-       
-    // Run type
-    if (gSystem->Getenv("DC_RUN_TYPE")) {
-               cout<<"run type "<<gSystem->Getenv("DC_RUN_TYPE")<<endl;
-               for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
-                       if (strcmp(gSystem->Getenv("DC_RUN_TYPE"), pprRunName[iRun])==0) {
-                               proc = (PDC07Proc_t)iRun;
-                       }
-               }
-    }
-    else
-               cout << "Environment variable DC_RUN_TYPE is not defined" << endl;
-    if (gSystem->Getenv("YEAR"))
-               year = atoi(gSystem->Getenv("YEAR"));
-       if (gSystem->Getenv("ECMS"))
-               eCMS = atof(gSystem->Getenv("ECMS"));
-       if (gSystem->Getenv("TRIGGER"))
-               trig = atoi(gSystem->Getenv("TRIGGER"));
-       if ( gSystem->Getenv("PI0GAMMAINDET") )
-               pi0FragPhotonInDet      = atoi(gSystem->Getenv("PI0GAMMAINDET"));
-    if (gSystem->Getenv("PTGAMMAPI0MIN"))
-               ptGammaPi0Min = atof(gSystem->Getenv("PTGAMMAPI0MIN"));
-       if (gSystem->Getenv("QUENCHING"))
-               iquenching = atof(gSystem->Getenv("QUENCHING"));
-       if (gSystem->Getenv("QHAT"))
-               qhat = atof(gSystem->Getenv("QHAT"));
-       //if (gSystem->Getenv("MEDLENGHT"))
-       //      medlength = atof(gSystem->Getenv("MEDLENGHT"));
-       if (gSystem->Getenv("PTHARDMIN"))
-               ptHardMin = atof(gSystem->Getenv("PTHARDMIN"));
-       if (gSystem->Getenv("PTHARDMAX"))
-               ptHardMax = atof(gSystem->Getenv("PTHARDMAX"));
-                                       
-    if(gSystem->Getenv("PTHARDMIN") && gSystem->Getenv("PTHARDMAX")){
-       if( strncmp(pprRunName[proc],"kPyJetJet",9)==0 || strncmp(pprRunName[proc],"kBeautyppwmiJet",15)==0 ){
-                       ptHardMin = ptHardJJLo[runNumber%nPtHardJJBins];
-                       ptHardMax = ptHardJJHi[runNumber%nPtHardJJBins];
-               }
-               else if( strncmp(pprRunName[proc],"kPyGammaJet",11)==0){
-                       ptHardMin = ptHardGJLo[runNumber%nPtHardGJBins];
-                       ptHardMax = ptHardGJHi[runNumber%nPtHardGJBins];        
-               }       
-       }
-       
-    cout<<">> Run type set to "<<pprRunName[proc]<<endl;
-    cout<<">> Collision energy set to "<<eCMS <<endl;
-       cout<<">> Collisions trigger type "<<trig<<" "<<TrigConfName[trig]<<endl;
-    cout<<">> ptHard limits: "<<ptHardMin<<" to " <<ptHardMax<<" GeV"<<endl;
-       if(pi0FragPhotonInDet) cout<<">> pt gamma/pi0 threshold "<< ptGammaPi0Min<<" GeV "<<endl;
-    if(iquenching) cout<<">> quenching on? "<< iquenching<<" qhat "<<qhat//<<" medlength "<<medlength
-       <<endl;
-       cout<<">> Year geometry : "<<year<<endl;        
-    cout << "######################################" << endl;
-    cout << "######################################" << endl;
-}
diff --git a/prod/LHC08d11/JDL b/prod/LHC08d11/JDL
deleted file mode 100644 (file)
index eea14de..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-Executable = "aliroot_new";\r
-Jobtag={"comment:jet-jet pp, PYTHIA, no quenching"};\r
-\r
-Packages={"VO_ALICE@AliRoot::v4-16-Rev-09","VO_ALICE@GEANT3::v1-10","VO_ALICE@ROOT::v5-23-02","VO_ALICE@APISCONFIG::V2.4"};\r
-\r
-TTL = "72000";\r
-Price = 1;\r
-\r
-Validationcommand ="/alice/cern.ch/user/a/aliprod/prod2007/configs_pbpb_hijing/validation.sh";\r
-\r
-InputFile= {"LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/CheckESD.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/Config.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/rec.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/sim.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/simrun.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_new/tag.C"};\r
-\r
-OutputArchive={"log_archive:*.log,stdout,stderr,*.log@Alice::NIHAM::File","root_archive.zip:*.tag.root,galice.root,geometry.root,Kinematics.root,TrackRefs.root,AliESDs.root,AliESDfriends.root,pyxsec.root@Alice::Subatech::DPM"};\r
-\r
-OutputDir="/alice/cern.ch/user/c/conesa/production/output_pp_new/JJ/$1/#alien_counter_03i#";\r
-\r
-JDLVariables={"Packages", "OutputDir"};\r
-GUIDFILE="guid.txt";\r
-\r
-splitarguments="simrun.C --run $1 --event #alien_counter# --process kPyJetJetEMCAL  --ecms 10000 --year 2009  --trigger 0";\r
-split="production:1-1000";\r
-\r
-Workdirectorysize={"4000MB"};\r
diff --git a/prod/LHC08d11/rec.C b/prod/LHC08d11/rec.C
deleted file mode 100644 (file)
index a7b30f1..0000000
+++ /dev/null
@@ -1,69 +0,0 @@
-void rec() {\r
-  //AliLog::SetGlobalLogLevel(AliLog::kError);\r
-\r
-  AliReconstruction reco;\r
-\r
-  reco.SetWriteESDfriend();\r
-  reco.SetWriteAlignmentData();\r
-\r
-\r
-  AliITSRecoParam * itspar = AliITSRecoParam::GetLowFluxParam();\r
-  itspar->SetStoreLikeSignV0s(kTRUE);\r
-  reco.SetRecoParam("ITS",itspar);\r
-  reco.SetRecoParam("TPC",AliTPCRecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("TRD",AliTRDrecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());\r
-  reco.SetRecoParam("MUON",AliMUONRecoParam::GetLowFluxParam());\r
-  reco.SetRecoParam("EMCAL",AliEMCALRecParam::GetLowFluxParam());\r
-  reco.SetRecoParam("GRP",AliGRPRecoParam::GetLowFluxParam());\r
-\r
-  reco.SetOption("TRD","sl_tr_1");            // Stream Level for the tracker equal to 1\r
-\r
-  // Only in case of Full misalignment\r
-//   AliGRPRecoParam *grpRecoParam = AliGRPRecoParam::GetLowFluxParam();\r
-//   grpRecoParam->SetVertexerTracksConstraintITS(kFALSE);\r
-//   grpRecoParam->SetVertexerTracksConstraintTPC(kFALSE);\r
-//   reco.SetRecoParam("GRP",grpRecoParam);\r
-\r
-  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Residual/");\r
-  //reco.SetSpecificStorage("GRP/GRP/Data/","alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");
-  reco.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
-  // No write access to the OCDB => local specific storage\r
-//   reco.SetSpecificStorage("GRP/GRP/Data",\r
-//                        Form("local://%s",gSystem->pwd()));\r
-\r
-  //-------------------------------------------------------------------------\r
-  // Setting the cuts for the V0 and cascade finding\r
-  // The values of the cuts below are "reasonable" for pp events\r
-  //-------------------------------------------------------------------------\r
-\r
-  Double_t v0sels[]={33,    // max allowed chi2\r
-                     0.05,  // min allowed impact parameter for the 1st daughter\r
-                     0.05,  // min allowed impact parameter for the 2nd daughter\r
-                     0.5,   // max allowed DCA between the daughter tracks\r
-                     0.99,  // max allowed cosine of V0's pointing angle\r
-                     0.2,   // min radius of the fiducial volume\r
-                     100    // max radius of the fiducial volume\r
-  };\r
-  AliV0vertexer::SetDefaultCuts(v0sels);\r
-\r
-  Double_t xisels[]={33.,   // max allowed chi2 (same as PDC07)\r
-                     0.025, // min allowed V0 impact parameter (PDC07 was 0.05)\r
-                     0.010, // "window" around the Lambda mass (PDC07 was 0.008)\r
-                     0.025, // min allowed bachelor's impact parameter (PDC07 was 0.035)\r
-                     0.2,   // max allowed DCA between the V0 and the bachelor (PDC07 was 0.1)\r
-                     0.998, // max allowed cosine of the cascade pointing angle (PDC07 was 0.9985)\r
-                     0.2,   // min radius of the fiducial volume (PDC07 was 0.9)\r
-                     100    // max radius of the fiducial volume (same as PDC07)\r
-  };\r
-  AliCascadeVertexer::SetDefaultCuts(xisels);\r
-\r
-  reco.SetRunQA("ALL:ALL");\r
-\r
-  TStopwatch timer;\r
-  timer.Start();\r
-  reco.Run();\r
-  timer.Stop();\r
-  timer.Print();\r
-}\r
-\r
diff --git a/prod/LHC08d11/sim.C b/prod/LHC08d11/sim.C
deleted file mode 100644 (file)
index c4f3d35..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-void sim(Int_t nev=100) {\r
-//  AliLog::SetGlobalLogLevel(AliLog::kError);\r
-\r
-  AliSimulation simu;\r
-  simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO");\r
-  simu.SetMakeDigitsFromHits("ITS TPC");\r
-\r
-  simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal");\r
-\r
-
-  simu.SetSpecificStorage("GRP/GRP/Data",Form("local://%s",gSystem->pwd()));
-
-  TStopwatch timer;\r
-  timer.Start();\r
-  simu.Run(nev);\r
-  WriteXsection();
-  timer.Stop();\r
-  timer.Print();\r
-}\r
-
-WriteXsection()
-{
-  TPythia6 *pythia = TPythia6::Instance();
-  pythia->Pystat(1);
-  Double_t xsection = pythia->GetPARI(1);
-  Int_t    ntrials  = pythia->GetMSTI(5);
-
-  TFile *file = new TFile("pyxsec.root","recreate");
-  TTree   *tree   = new TTree("Xsection","Pythia cross section");
-  TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
-  TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
-  tree->Fill();
-
-  tree->Write();
-  file->Close();
-
-  cout << "Pythia cross section: " << xsection 
-       << ", number of trials: " << ntrials << endl;
-}
diff --git a/prod/LHC08d11/simrun.C b/prod/LHC08d11/simrun.C
deleted file mode 100644 (file)
index 5a8ee67..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-//#define VERBOSEARGS
-
-{
-       // set job and simulation variables as :
-       // root run.C  --run <x> --event <y> --process <proc> --minhard <min> --maxhard <max> --minpt <minpt> ...
-       
-       int nrun = 0;
-       int nevent = 0;
-       int seed = 0;
-       
-       char sseed[1024];
-       char srun[1024];
-       char sevent[1024];
-       char secms[1024];
-       char sprocess[1024];
-       char sminpthard[1024];
-       char smaxpthard[1024];
-       char sminptgammapi0[1024];
-       char spi0gammafrag[1024];
-       char squench[1024];
-       char sqhat[1024];
-       char smedlength[1024];
-       char strig[1024];
-       char syear[1024];
-       
-       sprintf(srun,"");
-       sprintf(sevent,"");
-       sprintf(secms,"");
-       sprintf(sprocess,"");
-       sprintf(sminpthard,"");
-       sprintf(smaxpthard,"");
-       sprintf(sminptgammapi0,"");
-       sprintf(spi0gammafrag,"");
-       sprintf(squench,"");
-       sprintf(sqhat,"");
-       //sprintf(smedlength,"");
-       sprintf(strig,"");
-       sprintf(syear,"");
-       
-       for (int i=0; i< gApplication->Argc();i++){
-#ifdef VERBOSEARGS
-               printf("Arg  %d:  %s\n",i,gApplication->Argv(i));
-#endif
-               if (!(strcmp(gApplication->Argv(i),"--run")))
-                       nrun = atoi(gApplication->Argv(i+1));
-               sprintf(srun,"%d",nrun);
-       
-               if (!(strcmp(gApplication->Argv(i),"--event")))
-                       nevent = atoi(gApplication->Argv(i+1));
-               sprintf(sevent,"%d",nevent);
-                               
-               if (!(strcmp(gApplication->Argv(i),"--process")))
-                       sprintf(sprocess, gApplication->Argv(i+1));
-                               
-               if (!(strcmp(gApplication->Argv(i),"--year")))
-                       sprintf(syear, gApplication->Argv(i+1));
-
-               if (!(strcmp(gApplication->Argv(i),"--ecms")))
-                       sprintf(secms,gApplication->Argv(i+1));
-                                               
-               if (!(strcmp(gApplication->Argv(i),"--minhard")))
-                       sprintf(sminpthard,gApplication->Argv(i+1));
-                                                       
-               if (!(strcmp(gApplication->Argv(i),"--maxhard")))
-                       sprintf(smaxpthard,gApplication->Argv(i+1));
-       
-               if (!(strcmp(gApplication->Argv(i),"--pi0gammafrag")))
-                       sprintf(spi0gammafrag,gApplication->Argv(i+1));
-                                                                                                                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--minpt")))
-                       sprintf(sminptgammapi0,gApplication->Argv(i+1));
-                                                                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--quench")))
-                       sprintf(squench,gApplication->Argv(i+1));
-                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--qhat")))
-                       sprintf(sqhat,gApplication->Argv(i+1));
-                                                                                       
-               //if (!(strcmp(gApplication->Argv(i),"--medlength")))
-               //      sprintf(smedlength,gApplication->Argv(i+1));
-                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--trigger")))
-                       sprintf(strig,gApplication->Argv(i+1));
-                                                                                                       
-       }
-       
-       //rec params for reconstruction
-       //only for release < 16
-       //char cmd[200] ; 
-       //sprintf(cmd, ".! tar zxvf DBpp.tgz") ; 
-       //gROOT->ProcessLine(cmd) ; 
-       
-       seed = nrun * 100000 + nevent;
-       sprintf(sseed,"%d",seed);
-       
-       if (seed==0) {
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stderr,"!!!!  WARNING! Seeding variable for MC is 0          !!!!\n");
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       } else {
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stdout,"!!!  MC Seed is %d \n",seed);
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       }
-       
-       // set the seed environment variable
-       gSystem->Setenv("CONFIG_SEED",sseed);
-       gSystem->Setenv("RUN",srun);
-       gSystem->Setenv("EVENT",sevent);
-       gSystem->Setenv("DC_RUN_TYPE",sprocess);//"kPyGammaJetPHOS");
-       gSystem->Setenv("YEAR",syear);//"14000");       
-       gSystem->Setenv("ECMS",secms);//"14000");
-       gSystem->Setenv("PTHARDMIN",sminpthard);//"20");
-       gSystem->Setenv("PTHARDMAX",smaxpthard);//"30");
-       gSystem->Setenv("PI0GAMMAINDET",spi0gammafrag);//"1");
-       gSystem->Setenv("PTGAMMAPI0MIN",sminptgammapi0);//"1");
-       gSystem->Setenv("QUENCHING",squench);
-       gSystem->Setenv("QHAT",sqhat);
-       //gSystem->Setenv("MEDLENGTH",smedlength);
-       gSystem->Setenv("TRIGGER",strig);
-       
-       cout<< "SIMRUN:: Run = " << gSystem->Getenv("RUN") << "; Event = " << gSystem->Getenv("EVENT") 
-       << "; Process = "    << gSystem->Getenv("DC_RUN_TYPE")
-       << "; E cms = " << gSystem->Getenv("ECMS") 
-       << "; Trigger configuration = "<< gSystem->Getenv("TRIGGER")
-       << "; Year = "<<gSystem->Getenv("YEAR") << endl;
-       
-       cout<< "         minpthard = " << gSystem->Getenv("PTHARDMIN") 
-       << "; maxpthard =" << gSystem->Getenv("PTHARDMAX") 
-       << "; force pi0/gamma frag in detector = "     << gSystem->Getenv("PI0GAMMAINDET") 
-       << "; minpt = "     << gSystem->Getenv("PTGAMMAPI0MIN") 
-       << "; quenching option ="<<gSystem->Getenv("QUENCHING") 
-       << "; qhat = "<<gSystem->Getenv("QHAT") 
-       //<< "; medium length = "<<gSystem->Getenv("MEDIUMLENGTH")
-       << endl;
-       
-       cout<<">>>>> SIMULATION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1");
-       cout<<">>>>> RECONSTRUCTION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
-       cout<<">>>>> TAG <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
-       cout<<">>>>> CHECK ESD <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1");
-       
-}
diff --git a/prod/LHC08d11/tag.C b/prod/LHC08d11/tag.C
deleted file mode 100644 (file)
index f8e55f8..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-void tag() {\r
-  const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR");\r
-  TString fESDFileName = "alien://";\r
-  fESDFileName += turl;\r
-  fESDFileName += "/AliESDs.root";  \r
-\r
-  TString fGUID = 0;\r
-  GetGUID(fGUID);\r
-\r
-  TString fAliroot, fRoot, fGeant;\r
-  GetVersions(fAliroot,fRoot,fGeant);\r
-\r
-  UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID);\r
-}\r
-  \r
-//_____________________________________//\r
-GetVersions(TString &fAliroot, TString &froot, TString &fgeant) {\r
-  const char* fver = gSystem->Getenv("ALIEN_JDL_PACKAGES");\r
-  TString fS = fver;\r
-  Int_t fFirst = fS.First("#");\r
-\r
-  while(fFirst != -1) {\r
-    Int_t fTotalLength = fS.Length();\r
-    TString tmp = fS;\r
-    TString fS1 = fS(0,fFirst);\r
-    tmp = fS(fFirst+2,fTotalLength);\r
-    fS = tmp;\r
-\r
-    if(fS1.Contains("Root")) fAliroot = fS1;\r
-    if(fS1.Contains("ROOT")) froot = fS1;\r
-    if(fS1.Contains("GEANT")) fgeant = fS1;\r
-\r
-    if(tmp.Contains("Root")) fAliroot = tmp;\r
-    if(tmp.Contains("ROOT")) froot = tmp;\r
-    if(tmp.Contains("GEANT")) fgeant = tmp;\r
-    \r
-    fFirst = tmp.First("#");\r
-  }\r
-}\r
-\r
-//_____________________________________//\r
-GetGUID(TString &guid) {\r
-  ofstream myfile ("guid.txt");\r
-  if (myfile.is_open()) {\r
-    TFile *f = TFile::Open("AliESDs.root","read");\r
-    if(f->IsOpen()) {\r
-      guid = f->GetUUID().AsString();\r
-      myfile << "AliESDs.root \t"<<f->GetUUID().AsString();\r
-      cout<<guid.Data()<<endl;\r
-      myfile.close();\r
-    }\r
-    else cout<<"Input file not found"<<endl;\r
-  }\r
-  else cout<<"Output file can't be created..."<<endl;\r
-}\r
-\r
-\r
-//_____________________________________//\r
-Bool_t UpdateTag(TString faliroot, TString froot, TString fgeant, TString turl, TString guid) {\r
-  cout<<"Updating tags....."<<endl;\r
-\r
-  const char * tagPattern = "tag.root";\r
-  // Open the working directory\r
-  void * dirp = gSystem->OpenDirectory(gSystem->pwd());\r
-  const char * name = 0x0;\r
-  // Add all files matching *pattern* to the chain\r
-  while((name = gSystem->GetDirEntry(dirp))) {\r
-    if (strstr(name,tagPattern)) {\r
-      TFile *f = TFile::Open(name,"read") ;\r
\r
-      AliRunTag *tag = new AliRunTag;\r
-      AliEventTag *evTag = new AliEventTag;\r
-      TTree *fTree = (TTree *)f->Get("T");\r
-      fTree->SetBranchAddress("AliTAG",&tag);\r
-   \r
-      //Defining new tag objects\r
-      AliRunTag *newTag = new AliRunTag();\r
-      TTree ttag("T","A Tree with event tags");\r
-      TBranch * btag = ttag.Branch("AliTAG", &newTag);\r
-      btag->SetCompressionLevel(9);\r
-      for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) {\r
-       fTree->GetEntry(iTagFiles);\r
-       newTag->SetRunId(tag->GetRunId());\r
-       newTag->SetAlirootVersion(faliroot);\r
-       newTag->SetRootVersion(froot);\r
-       newTag->SetGeant3Version(fgeant);\r
-       const TClonesArray *tagList = tag->GetEventTags();\r
-       for(Int_t j = 0; j < tagList->GetEntries(); j++) {\r
-         evTag = (AliEventTag *) tagList->At(j);\r
-         evTag->SetTURL(turl);\r
-         evTag->SetGUID(guid);\r
-         newTag->AddEventTag(*evTag);\r
-       }\r
-       ttag.Fill();\r
-       newTag->Clear();\r
-      }//tag file loop \r
-  \r
-      TFile* ftag = TFile::Open(name, "recreate");\r
-      ftag->cd();\r
-      ttag.Write();\r
-      ftag->Close();\r
-      \r
-      delete tag;\r
-      delete newTag;\r
-    }//pattern check\r
-  }//directory loop\r
-  return kTRUE;\r
-}\r
-\r
-\r
diff --git a/prod/LHC08d12/CheckESD.C b/prod/LHC08d12/CheckESD.C
deleted file mode 100644 (file)
index cdf8c5b..0000000
+++ /dev/null
@@ -1,695 +0,0 @@
-#if !defined( __CINT__) || defined(__MAKECINT__)\r
-#include <TROOT.h>\r
-#include <TFile.h>\r
-#include <TError.h>\r
-#include <TH1.h>\r
-#include <TH2.h>\r
-#include <TF1.h>\r
-#include <TCanvas.h>\r
-#include <TVector3.h>\r
-#include <TPDGCode.h>\r
-#include <TParticle.h>\r
-\r
-#include "AliRunLoader.h"\r
-#include "AliLoader.h"\r
-#include "AliESDEvent.h"\r
-#include "AliESDv0.h"\r
-#include "AliESDcascade.h"\r
-#include "AliESDMuonTrack.h"\r
-#include "AliESDCaloCluster.h"\r
-#include "AliRun.h"\r
-#include "AliStack.h"\r
-#include "AliHeader.h"\r
-#include "AliGenEventHeader.h"\r
-#include "AliPID.h"\r
-#endif\r
-\r
-\r
-TH1F* CreateHisto(const char* name, const char* title, \r
-                 Int_t nBins, Double_t xMin, Double_t xMax,\r
-                 const char* xLabel = NULL, const char* yLabel = NULL)\r
-{\r
-// create a histogram\r
-\r
-  TH1F* result = new TH1F(name, title, nBins, xMin, xMax);\r
-  result->SetOption("E");\r
-  if (xLabel) result->GetXaxis()->SetTitle(xLabel);\r
-  if (yLabel) result->GetYaxis()->SetTitle(yLabel);\r
-  result->SetMarkerStyle(kFullCircle);\r
-  return result;\r
-}\r
-\r
-TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec)\r
-{\r
-// create an efficiency histogram\r
-\r
-  Int_t nBins = hGen->GetNbinsX();\r
-  TH1F* hEff = (TH1F*) hGen->Clone("hEff");\r
-  hEff->SetTitle("");\r
-  hEff->SetStats(kFALSE);\r
-  hEff->SetMinimum(0.);\r
-  hEff->SetMaximum(110.);\r
-  hEff->GetYaxis()->SetTitle("#epsilon [%]");\r
-\r
-  for (Int_t iBin = 0; iBin <= nBins; iBin++) {\r
-    Double_t nGen = hGen->GetBinContent(iBin);\r
-    Double_t nRec = hRec->GetBinContent(iBin);\r
-    if (nGen > 0) {\r
-      Double_t eff = nRec/nGen;\r
-      hEff->SetBinContent(iBin, 100. * eff);\r
-      Double_t error = sqrt(eff*(1.-eff) / nGen);\r
-      if (error == 0) error = 0.0001;\r
-      hEff->SetBinError(iBin, 100. * error);\r
-    } else {\r
-      hEff->SetBinContent(iBin, -100.);\r
-      hEff->SetBinError(iBin, 0);\r
-    }\r
-  }\r
-\r
-  return hEff;\r
-}\r
-\r
-Bool_t FitHisto(TH1* histo, Double_t& res, Double_t& resError)\r
-{\r
-// fit a gaussian to a histogram\r
-\r
-  static TF1* fitFunc = new TF1("fitFunc", "gaus");\r
-  fitFunc->SetLineWidth(2);\r
-  fitFunc->SetFillStyle(0);\r
-  Double_t maxFitRange = 2;\r
-\r
-  if (histo->Integral() > 50) {\r
-    Float_t mean = histo->GetMean();\r
-    Float_t rms = histo->GetRMS();\r
-    fitFunc->SetRange(mean - maxFitRange*rms, mean + maxFitRange*rms);\r
-    fitFunc->SetParameters(mean, rms);\r
-    histo->Fit(fitFunc, "QRI0");\r
-    histo->GetFunction("fitFunc")->ResetBit(1<<9);\r
-    res = TMath::Abs(fitFunc->GetParameter(2));\r
-    resError = TMath::Abs(fitFunc->GetParError(2));\r
-    return kTRUE;\r
-  }\r
-\r
-  return kFALSE;\r
-}\r
-\r
-\r
-Bool_t CheckESD(const char* gAliceFileName = "galice.root", \r
-               const char* esdFileName = "AliESDs.root")\r
-{\r
-// check the content of the ESD\r
\r
-  // check values\r
-  Int_t    checkNGenLow = 1;\r
-\r
-  Double_t checkEffLow = 0.5;\r
-  Double_t checkEffSigma = 3;\r
-  Double_t checkFakeHigh = 0.5;\r
-  Double_t checkFakeSigma = 3;\r
-\r
-  Double_t checkResPtInvHigh = 5;\r
-  Double_t checkResPtInvSigma = 3;\r
-  Double_t checkResPhiHigh = 10;\r
-  Double_t checkResPhiSigma = 3;\r
-  Double_t checkResThetaHigh = 10;\r
-  Double_t checkResThetaSigma = 3;\r
-\r
-  Double_t checkPIDEffLow = 0.5;\r
-  Double_t checkPIDEffSigma = 3;\r
-  Double_t checkResTOFHigh = 500;\r
-  Double_t checkResTOFSigma = 3;\r
-\r
-  Double_t checkPHOSNLow = 5;\r
-  Double_t checkPHOSEnergyLow = 0.3;\r
-  Double_t checkPHOSEnergyHigh = 1.0;\r
-  Double_t checkEMCALNLow = 50;\r
-  Double_t checkEMCALEnergyLow = 0.05;\r
-  Double_t checkEMCALEnergyHigh = 1.0;\r
-\r
-  Double_t checkMUONNLow = 1;\r
-  Double_t checkMUONPtLow = 0.5;\r
-  Double_t checkMUONPtHigh = 10.;\r
-\r
-  Double_t cutPtV0 = 0.3;\r
-  Double_t checkV0EffLow = 0.02;\r
-  Double_t checkV0EffSigma = 3;\r
-  Double_t cutPtCascade = 0.5;\r
-  Double_t checkCascadeEffLow = 0.01;\r
-  Double_t checkCascadeEffSigma = 3;\r
-\r
-  // open run loader and load gAlice, kinematics and header\r
-  AliRunLoader* runLoader = AliRunLoader::Open(gAliceFileName);\r
-  if (!runLoader) {\r
-    Error("CheckESD", "getting run loader from file %s failed", \r
-           gAliceFileName);\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadgAlice();\r
-  gAlice = runLoader->GetAliRun();\r
-  if (!gAlice) {\r
-    Error("CheckESD", "no galice object found");\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadKinematics();\r
-  runLoader->LoadHeader();\r
-\r
-  // open the ESD file\r
-  TFile* esdFile = TFile::Open(esdFileName);\r
-  if (!esdFile || !esdFile->IsOpen()) {\r
-    Error("CheckESD", "opening ESD file %s failed", esdFileName);\r
-    return kFALSE;\r
-  }\r
-  AliESDEvent * esd = new AliESDEvent;\r
-  TTree* tree = (TTree*) esdFile->Get("esdTree");\r
-  if (!tree) {\r
-    Error("CheckESD", "no ESD tree found");\r
-    return kFALSE;\r
-  }\r
-  esd->ReadFromTree(tree);\r
-\r
-  // efficiency and resolution histograms\r
-  Int_t nBinsPt = 15;\r
-  Float_t minPt = 0.1;\r
-  Float_t maxPt = 3.1;\r
-  TH1F* hGen = CreateHisto("hGen", "generated tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  TH1F* hRec = CreateHisto("hRec", "reconstructed tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  Int_t nGen = 0;\r
-  Int_t nRec = 0;\r
-  Int_t nFake = 0;\r
-\r
-  TH1F* hResPtInv = CreateHisto("hResPtInv", "", 100, -10, 10, \r
-           "(p_{t,rec}^{-1}-p_{t,sim}^{-1}) / p_{t,sim}^{-1} [%]", "N");\r
-  TH1F* hResPhi = CreateHisto("hResPhi", "", 100, -20, 20, \r
-                             "#phi_{rec}-#phi_{sim} [mrad]", "N");\r
-  TH1F* hResTheta = CreateHisto("hResTheta", "", 100, -20, 20, \r
-                               "#theta_{rec}-#theta_{sim} [mrad]", "N");\r
-\r
-  // PID\r
-  Int_t partCode[5] = \r
-    {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};\r
-  const char* partName[5+1] = \r
-    {"electron", "muon", "pion", "kaon", "proton", "other"};\r
-  Double_t partFrac[5] = \r
-    {0.01, 0.01, 0.85, 0.10, 0.05};\r
-  Int_t identified[5+1][5];\r
-  for (Int_t iGen = 0; iGen < 5+1; iGen++) {\r
-    for (Int_t iRec = 0; iRec < 5; iRec++) {\r
-      identified[iGen][iRec] = 0;\r
-    }\r
-  }\r
-  Int_t nIdentified = 0;\r
-\r
-  // dE/dx and TOF\r
-  TH2F* hDEdxRight = new TH2F("hDEdxRight", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxRight->SetStats(kFALSE);\r
-  hDEdxRight->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxRight->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxRight->SetMarkerStyle(kFullCircle);\r
-  hDEdxRight->SetMarkerSize(0.4);\r
-  TH2F* hDEdxWrong = new TH2F("hDEdxWrong", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxWrong->SetStats(kFALSE);\r
-  hDEdxWrong->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxWrong->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxWrong->SetMarkerStyle(kFullCircle);\r
-  hDEdxWrong->SetMarkerSize(0.4);\r
-  hDEdxWrong->SetMarkerColor(kRed);\r
-  TH1F* hResTOFRight = CreateHisto("hResTOFRight", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  TH1F* hResTOFWrong = CreateHisto("hResTOFWrong", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  hResTOFWrong->SetLineColor(kRed);\r
-\r
-  // calorimeters\r
-  TH1F* hEPHOS = CreateHisto("hEPHOS", "PHOS", 100, 0, 50, "E [GeV]", "N");\r
-  TH1F* hEEMCAL = CreateHisto("hEEMCAL", "EMCAL", 100, 0, 50, "E [GeV]", "N");\r
-\r
-  // muons\r
-  TH1F* hPtMUON = CreateHisto("hPtMUON", "MUON", 100, 0, 20, \r
-                             "p_{t} [GeV/c]", "N");\r
-\r
-  // V0s and cascades\r
-  TH1F* hMassK0 = CreateHisto("hMassK0", "K^{0}", 100, 0.4, 0.6, \r
-                             "M(#pi^{+}#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambda = CreateHisto("hMassLambda", "#Lambda", 100, 1.0, 1.2, \r
-                                 "M(p#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambdaBar = CreateHisto("hMassLambdaBar", "#bar{#Lambda}", \r
-                                    100, 1.0, 1.2, \r
-                                    "M(#bar{p}#pi^{+}) [GeV/c^{2}]", "N");\r
-  Int_t nGenV0s = 0;\r
-  Int_t nRecV0s = 0;\r
-  TH1F* hMassXi = CreateHisto("hMassXi", "#Xi", 100, 1.2, 1.5, \r
-                             "M(#Lambda#pi) [GeV/c^{2}]", "N");\r
-  TH1F* hMassOmega = CreateHisto("hMassOmega", "#Omega", 100, 1.5, 1.8, \r
-                                "M(#LambdaK) [GeV/c^{2}]", "N");\r
-  Int_t nGenCascades = 0;\r
-  Int_t nRecCascades = 0;\r
-\r
-  // loop over events\r
-  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {\r
-    runLoader->GetEvent(iEvent);\r
-\r
-    // select simulated primary particles, V0s and cascades\r
-    AliStack* stack = gAlice->Stack();\r
-    Int_t nParticles = stack->GetNtrack();\r
-    TArrayF vertex(3);\r
-    runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex);\r
-    TObjArray selParticles;\r
-    TObjArray selV0s;\r
-    TObjArray selCascades;\r
-    for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {\r
-      TParticle* particle = stack->Particle(iParticle);\r
-      if (!particle) continue;\r
-      if (particle->Pt() < 0.001) continue;\r
-      if (TMath::Abs(particle->Eta()) > 0.9) continue;\r
-      TVector3 dVertex(particle->Vx() - vertex[0], \r
-                      particle->Vy() - vertex[1],\r
-                      particle->Vz() - vertex[2]);\r
-      if (dVertex.Mag() > 0.0001) continue;\r
-\r
-      switch (TMath::Abs(particle->GetPdgCode())) {\r
-      case kElectron:\r
-      case kMuonMinus:\r
-      case kPiPlus:\r
-      case kKPlus:\r
-      case kProton: {\r
-       if (particle->Pt() > minPt) {\r
-         selParticles.Add(particle);\r
-         nGen++;\r
-         hGen->Fill(particle->Pt());\r
-       }\r
-       break;\r
-      }\r
-      case kK0Short:\r
-      case kLambda0: {\r
-       if (particle->Pt() > cutPtV0) {\r
-         nGenV0s++;\r
-         selV0s.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      case kXiMinus:\r
-      case kOmegaMinus: {\r
-       if (particle->Pt() > cutPtCascade) {\r
-         nGenCascades++;\r
-         selCascades.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      default: break;\r
-      }\r
-    }\r
-\r
-    // get the event summary data\r
-    tree->GetEvent(iEvent);\r
-    if (!esd) {\r
-      Error("CheckESD", "no ESD object found for event %d", iEvent);\r
-      return kFALSE;\r
-    }\r
-\r
-    // loop over tracks\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfTracks(); iTrack++) {\r
-      AliESDtrack* track = esd->GetTrack(iTrack);\r
-\r
-      // select tracks of selected particles\r
-      Int_t label = TMath::Abs(track->GetLabel());\r
-      if (label > stack->GetNtrack()) continue;     // background\r
-      TParticle* particle = stack->Particle(label);\r
-      if (!selParticles.Contains(particle)) continue;\r
-      if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) continue;\r
-      if (track->GetConstrainedChi2() > 1e9) continue;\r
-      selParticles.Remove(particle);   // don't count multiple tracks\r
-\r
-      nRec++;\r
-      hRec->Fill(particle->Pt());\r
-      if (track->GetLabel() < 0) nFake++;\r
-\r
-      // resolutions\r
-      hResPtInv->Fill(100. * (TMath::Abs(track->GetSigned1Pt()) - 1./particle->Pt()) * \r
-                     particle->Pt());\r
-      hResPhi->Fill(1000. * (track->Phi() - particle->Phi()));\r
-      hResTheta->Fill(1000. * (track->Theta() - particle->Theta()));\r
-\r
-      // PID\r
-      if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) continue;\r
-      Int_t iGen = 5;\r
-      for (Int_t i = 0; i < 5; i++) {\r
-       if (TMath::Abs(particle->GetPdgCode()) == partCode[i]) iGen = i;\r
-      }\r
-      Double_t probability[5];\r
-      track->GetESDpid(probability);\r
-      Double_t pMax = 0;\r
-      Int_t iRec = 0;\r
-      for (Int_t i = 0; i < 5; i++) {\r
-       probability[i] *= partFrac[i];\r
-       if (probability[i] > pMax) {\r
-         pMax = probability[i];\r
-         iRec = i;\r
-       }\r
-      }\r
-      identified[iGen][iRec]++;\r
-      if (iGen == iRec) nIdentified++;\r
-\r
-      // dE/dx and TOF\r
-      Double_t time[5];\r
-      track->GetIntegratedTimes(time);\r
-      if (iGen == iRec) {\r
-       hDEdxRight->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFRight->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      } else {\r
-       hDEdxWrong->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFWrong->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      }\r
-    }\r
-\r
-    // loop over muon tracks\r
-    {\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfMuonTracks(); iTrack++) {\r
-      AliESDMuonTrack* muonTrack = esd->GetMuonTrack(iTrack);\r
-      Double_t ptInv = TMath::Abs(muonTrack->GetInverseBendingMomentum());\r
-      if (ptInv > 0.001) {\r
-       hPtMUON->Fill(1./ptInv);\r
-      }\r
-    }\r
-    }\r
-\r
-    // loop over V0s\r
-    for (Int_t iV0 = 0; iV0 < esd->GetNumberOfV0s(); iV0++) {\r
-      AliESDv0* v0 = esd->GetV0(iV0);\r
-      if (v0->GetOnFlyStatus()) continue;\r
-      v0->ChangeMassHypothesis(kK0Short);\r
-      hMassK0->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0);\r
-      hMassLambda->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0Bar);\r
-      hMassLambdaBar->Fill(v0->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(v0->GetNindex())->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(v0->GetPindex())->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      TParticle* particle = stack->Particle(negMother);\r
-      if (!selV0s.Contains(particle)) continue;\r
-      selV0s.Remove(particle);\r
-      nRecV0s++;\r
-    }\r
-\r
-    // loop over Cascades\r
-    for (Int_t iCascade = 0; iCascade < esd->GetNumberOfCascades(); \r
-        iCascade++) {\r
-      AliESDcascade* cascade = esd->GetCascade(iCascade);\r
-      Double_t v0q;\r
-      cascade->ChangeMassHypothesis(v0q,kXiMinus);\r
-      hMassXi->Fill(cascade->GetEffMass());\r
-      cascade->ChangeMassHypothesis(v0q,kOmegaMinus);\r
-      hMassOmega->Fill(cascade->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(cascade->GetNindex())\r
-                                 ->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(cascade->GetPindex())\r
-                                 ->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      Int_t v0Mother = stack->Particle(negMother)->GetMother(0);\r
-      if (v0Mother < 0) continue;\r
-      Int_t bacLabel = TMath::Abs(esd->GetTrack(cascade->GetBindex())\r
-                                 ->GetLabel());\r
-      if (bacLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t bacMother = stack->Particle(bacLabel)->GetMother(0);\r
-      if (v0Mother != bacMother) continue;\r
-      TParticle* particle = stack->Particle(v0Mother);\r
-      if (!selCascades.Contains(particle)) continue;\r
-      selCascades.Remove(particle);\r
-      nRecCascades++;\r
-    }\r
-\r
-    // loop over the clusters\r
-    {\r
-      for (Int_t iCluster=0; iCluster<esd->GetNumberOfCaloClusters(); iCluster++) {\r
-       AliESDCaloCluster * clust = esd->GetCaloCluster(iCluster);\r
-       if (clust->IsPHOS()) hEPHOS->Fill(clust->E());\r
-       if (clust->IsEMCAL()) hEEMCAL->Fill(clust->E());\r
-      }\r
-    }\r
-\r
-  }\r
-\r
-  // perform checks\r
-  if (nGen < checkNGenLow) {\r
-    Warning("CheckESD", "low number of generated particles: %d", Int_t(nGen));\r
-  }\r
-\r
-  TH1F* hEff = CreateEffHisto(hGen, hRec);\r
-\r
-  Info("CheckESD", "%d out of %d tracks reconstructed including %d "\r
-        "fake tracks", nRec, nGen, nFake);\r
-  if (nGen > 0) {\r
-    // efficiency\r
-    Double_t eff = nRec*1./nGen;\r
-    Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGen);\r
-    Double_t fake = nFake*1./nGen;\r
-    Double_t fakeError = TMath::Sqrt(fake*(1.-fake) / nGen);\r
-    Info("CheckESD", "eff = (%.1f +- %.1f) %%  fake = (%.1f +- %.1f) %%",\r
-        100.*eff, 100.*effError, 100.*fake, 100.*fakeError);\r
-\r
-    if (eff < checkEffLow - checkEffSigma*effError) {\r
-      Warning("CheckESD", "low efficiency: (%.1f +- %.1f) %%", \r
-             100.*eff, 100.*effError);\r
-    }\r
-    if (fake > checkFakeHigh + checkFakeSigma*fakeError) {\r
-      Warning("CheckESD", "high fake: (%.1f +- %.1f) %%", \r
-             100.*fake, 100.*fakeError);\r
-    }\r
-\r
-    // resolutions\r
-    Double_t res, resError;\r
-    if (FitHisto(hResPtInv, res, resError)) {\r
-      Info("CheckESD", "relative inverse pt resolution = (%.1f +- %.1f) %%",\r
-          res, resError);\r
-      if (res > checkResPtInvHigh + checkResPtInvSigma*resError) {\r
-       Warning("CheckESD", "bad pt resolution: (%.1f +- %.1f) %%", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResPhi, res, resError)) {\r
-      Info("CheckESD", "phi resolution = (%.1f +- %.1f) mrad", res, resError);\r
-      if (res > checkResPhiHigh + checkResPhiSigma*resError) {\r
-       Warning("CheckESD", "bad phi resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    if (FitHisto(hResTheta, res, resError)) {\r
-      Info("CheckESD", "theta resolution = (%.1f +- %.1f) mrad", \r
-          res, resError);\r
-      if (res > checkResThetaHigh + checkResThetaSigma*resError) {\r
-       Warning("CheckESD", "bad theta resolution: (%.1f +- %.1f) mrad", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // PID\r
-    if (nRec > 0) {\r
-      Double_t eff = nIdentified*1./nRec;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nRec);\r
-      Info("CheckESD", "PID eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkPIDEffLow - checkPIDEffSigma*effError) {\r
-       Warning("CheckESD", "low PID efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    printf("%9s:", "gen\\rec");\r
-    for (Int_t iRec = 0; iRec < 5; iRec++) {\r
-      printf("%9s", partName[iRec]);\r
-    }\r
-    printf("\n");\r
-    for (Int_t iGen = 0; iGen < 5+1; iGen++) {\r
-      printf("%9s:", partName[iGen]);\r
-      for (Int_t iRec = 0; iRec < 5; iRec++) {\r
-       printf("%9d", identified[iGen][iRec]);\r
-      }\r
-      printf("\n");\r
-    }\r
-\r
-    if (FitHisto(hResTOFRight, res, resError)) {\r
-      Info("CheckESD", "TOF resolution = (%.1f +- %.1f) ps", res, resError);\r
-      if (res > checkResTOFHigh + checkResTOFSigma*resError) {\r
-       Warning("CheckESD", "bad TOF resolution: (%.1f +- %.1f) ps", \r
-               res, resError);\r
-      }\r
-    }\r
-\r
-    // calorimeters\r
-    if (hEPHOS->Integral() < checkPHOSNLow) {\r
-      Warning("CheckESD", "low number of PHOS particles: %d", \r
-             Int_t(hEPHOS->Integral()));\r
-    } else {\r
-      Double_t mean = hEPHOS->GetMean();\r
-      if (mean < checkPHOSEnergyLow) {\r
-       Warning("CheckESD", "low mean PHOS energy: %.1f GeV", mean);\r
-      } else if (mean > checkPHOSEnergyHigh) {\r
-       Warning("CheckESD", "high mean PHOS energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    if (hEEMCAL->Integral() < checkEMCALNLow) {\r
-      Warning("CheckESD", "low number of EMCAL particles: %d", \r
-             Int_t(hEEMCAL->Integral()));\r
-    } else {\r
-      Double_t mean = hEEMCAL->GetMean();\r
-      if (mean < checkEMCALEnergyLow) {\r
-       Warning("CheckESD", "low mean EMCAL energy: %.1f GeV", mean);\r
-      } else if (mean > checkEMCALEnergyHigh) {\r
-       Warning("CheckESD", "high mean EMCAL energy: %.1f GeV", mean);\r
-      }\r
-    }\r
-\r
-    // muons\r
-    if (hPtMUON->Integral() < checkMUONNLow) {\r
-      Warning("CheckESD", "low number of MUON particles: %d", \r
-             Int_t(hPtMUON->Integral()));\r
-    } else {\r
-      Double_t mean = hPtMUON->GetMean();\r
-      if (mean < checkMUONPtLow) {\r
-       Warning("CheckESD", "low mean MUON pt: %.1f GeV/c", mean);\r
-      } else if (mean > checkMUONPtHigh) {\r
-       Warning("CheckESD", "high mean MUON pt: %.1f GeV/c", mean);\r
-      }\r
-    }\r
-\r
-    // V0s\r
-    if (nGenV0s > 0) {\r
-      Double_t eff = nRecV0s*1./nGenV0s;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenV0s);\r
-      if (effError == 0) effError = checkV0EffLow / TMath::Sqrt(1.*nGenV0s);\r
-      Info("CheckESD", "V0 eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkV0EffLow - checkV0EffSigma*effError) {\r
-       Warning("CheckESD", "low V0 efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-\r
-    // Cascades\r
-    if (nGenCascades > 0) {\r
-      Double_t eff = nRecCascades*1./nGenCascades;\r
-      Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGenCascades);\r
-      if (effError == 0) effError = checkV0EffLow / \r
-                          TMath::Sqrt(1.*nGenCascades);\r
-      Info("CheckESD", "Cascade eff = (%.1f +- %.1f) %%", \r
-          100.*eff, 100.*effError);\r
-      if (eff < checkCascadeEffLow - checkCascadeEffSigma*effError) {\r
-       Warning("CheckESD", "low Cascade efficiency: (%.1f +- %.1f) %%", \r
-               100.*eff, 100.*effError);\r
-      }\r
-    }\r
-  }\r
-\r
-  // draw the histograms if not in batch mode\r
-  if (!gROOT->IsBatch()) {\r
-    new TCanvas;\r
-    hEff->DrawCopy();\r
-    new TCanvas;\r
-    hResPtInv->DrawCopy("E");\r
-    new TCanvas;\r
-    hResPhi->DrawCopy("E");\r
-    new TCanvas;\r
-    hResTheta->DrawCopy("E");\r
-    new TCanvas;\r
-    hDEdxRight->DrawCopy();\r
-    hDEdxWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hResTOFRight->DrawCopy("E");\r
-    hResTOFWrong->DrawCopy("SAME");\r
-    new TCanvas;\r
-    hEPHOS->DrawCopy("E");\r
-    new TCanvas;\r
-    hEEMCAL->DrawCopy("E");\r
-    new TCanvas;\r
-    hPtMUON->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassK0->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambda->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassLambdaBar->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassXi->DrawCopy("E");\r
-    new TCanvas;\r
-    hMassOmega->DrawCopy("E");\r
-  }\r
-\r
-  // write the output histograms to a file\r
-  TFile* outputFile = TFile::Open("check.root", "recreate");\r
-  if (!outputFile || !outputFile->IsOpen()) {\r
-    Error("CheckESD", "opening output file check.root failed");\r
-    return kFALSE;\r
-  }\r
-  hEff->Write();\r
-  hResPtInv->Write();\r
-  hResPhi->Write();\r
-  hResTheta->Write();\r
-  hDEdxRight->Write();\r
-  hDEdxWrong->Write();\r
-  hResTOFRight->Write();\r
-  hResTOFWrong->Write();\r
-  hEPHOS->Write();\r
-  hEEMCAL->Write();\r
-  hPtMUON->Write();\r
-  hMassK0->Write();\r
-  hMassLambda->Write();\r
-  hMassLambdaBar->Write();\r
-  hMassXi->Write();\r
-  hMassOmega->Write();\r
-  outputFile->Close();\r
-  delete outputFile;\r
-\r
-  // clean up\r
-  delete hGen;\r
-  delete hRec;\r
-  delete hEff;\r
-  delete hResPtInv;\r
-  delete hResPhi;\r
-  delete hResTheta;\r
-  delete hDEdxRight;\r
-  delete hDEdxWrong;\r
-  delete hResTOFRight;\r
-  delete hResTOFWrong;\r
-  delete hEPHOS;\r
-  delete hEEMCAL;\r
-  delete hPtMUON;\r
-  delete hMassK0;\r
-  delete hMassLambda;\r
-  delete hMassLambdaBar;\r
-  delete hMassXi;\r
-  delete hMassOmega;\r
-\r
-  delete esd;\r
-  esdFile->Close();\r
-  delete esdFile;\r
-\r
-  runLoader->UnloadHeader();\r
-  runLoader->UnloadKinematics();\r
-  delete runLoader;\r
-\r
-  // result of check\r
-  Info("CheckESD", "check of ESD was successfull");\r
-  return kTRUE;\r
-}\r
-\r
diff --git a/prod/LHC08d12/Config.C b/prod/LHC08d12/Config.C
deleted file mode 100644 (file)
index 036485a..0000000
+++ /dev/null
@@ -1,1051 +0,0 @@
-// One can use the configuration macro in compiled mode by
-// root [0] gSystem->Load("libgeant321");
-// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
-//                   -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
-// root [0] .x grun.C(1,"Config_PDC07.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TRandom.h>
-#include <TDatime.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenParam.h"
-#include "EVGEN/AliGenMUONlib.h"
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "PYTHIA6/AliGenPythia.h"
-#include "STEER/AliMagF.h"
-#include "STRUCT/AliBODY.h"
-#include "STRUCT/AliMAG.h"
-#include "STRUCT/AliABSOv3.h"
-#include "STRUCT/AliDIPOv3.h"
-#include "STRUCT/AliHALLv3.h"
-#include "STRUCT/AliFRAMEv2.h"
-#include "STRUCT/AliSHILv3.h"
-#include "STRUCT/AliPIPEv3.h"
-#include "ITS/AliITSv11Hybrid.h"
-#include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv6T0.h"
-#include "HMPID/AliHMPIDv3.h"
-#include "ZDC/AliZDCv3.h"
-#include "TRD/AliTRDv1.h"
-#include "TRD/AliTRDgeometry.h"
-#include "FMD/AliFMDv1.h"
-#include "MUON/AliMUONv1.h"
-#include "PHOS/AliPHOSv1.h"
-#include "PHOS/AliPHOSSimParam.h"
-#include "PMD/AliPMDv1.h"
-#include "T0/AliT0v1.h"
-#include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv1.h"
-#include "VZERO/AliVZEROv7.h"
-#endif
-
-
-enum PDC07Proc_t
-{
-//--- Heavy Flavour Production ---
-  kCharmPbPb5500,  kCharmpPb8800,  kCharmpp14000,  kCharmpp14000wmi,
-  kD0PbPb5500,     kD0pPb8800,     kD0pp14000,
-  kDPlusPbPb5500,  kDPluspPb8800,  kDPluspp14000,
-  kBeautyPbPb5500, kBeautypPb8800, kBeautypp14000, kBeautypp14000wmi,
-  // -- Pythia Mb
-  kPyMbNoHvq, kPyOmegaPlus, kPyOmegaMinus, kPyJetJet, kBeautyppwmiJet,kPyBJetEMCAL,
-  kPyGammaJetPHOS, kPyJetJetPHOS, kPyJetJetPHOSv2, kPyGammaBremsPHOS,
-  kPyGammaJetEMCAL, kPyJetJetEMCAL, kPyGammaBremsEMCAL, kRunMax
-};
-
-const char * pprRunName[] = {
-  "kCharmPbPb5500",  "kCharmpPb8800",  "kCharmpp14000",  "kCharmpp14000wmi",
-  "kD0PbPb5500",     "kD0pPb8800",     "kD0pp14000",
-  "kDPlusPbPb5500",  "kDPluspPb8800",  "kDPluspp14000",
-  "kBeautyPbPb5500", "kBeautypPb8800", "kBeautypp14000", "kBeautypp14000wmi",
-  "kPyMbNoHvq", "kPyOmegaPlus", "kPyOmegaMinus", "kPyJetJet", "kBeautyppwmiJet", "kPyBJetEMCAL",
-  "kPyGammaJetPHOS", "kPyJetJetPHOS",  "kPyJetJetPHOSv2", "kPyGammaBremsPHOS",
-  "kPyGammaJetEMCAL", "kPyJetJetEMCAL", "kPyGammaBremsEMCAL"
-};
-
-
-//--- Decay Mode ---
-enum DecayHvFl_t
-{
-  kNature,  kHadr, kSemiEl, kSemiMu
-};
-//--- Magnetic Field ---
-enum Mag_t
-{
-  kNoField, k5kG, kFieldMax
-};
-//--- Trigger config ---
-enum TrigConf_t
-{
-    kDefaultPPTrig, kDefaultPbPbTrig
-};
-
-const char * TrigConfName[] = {
-    "p-p","Pb-Pb"
-};
-
-//--- Functions ---
-class AliGenPythia ;
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc);
-AliGenPythia *PythiaHard(PDC07Proc_t proc);
-AliGenerator *MbCocktail();
-AliGenerator *PyMbTriggered(Int_t pdg);
-void ProcessEnvironmentVars();
-
-// This part for configuration
-static DecayHvFl_t   decHvFl     = kNature;
-static Mag_t         mag         = k5kG;
-static TrigConf_t    trig        = kDefaultPPTrig; // default pp trigger configuration
-static Int_t         runNumber   = 0;
-static Int_t         eventNumber = 0;
-//========================//
-// Set Random Number seed //
-//========================//
-TDatime dt;
-static UInt_t seed    = dt.Get();
-
-// nEvts = -1  : you get 1 QQbar pair and all the fragmentation and
-//               decay chain
-// nEvts = N>0 : you get N charm / beauty Hadrons
-Int_t nEvts = -1;
-// stars = kTRUE : all heavy resonances and their decay stored
-//       = kFALSE: only final heavy hadrons and their decays stored
-Bool_t stars = kTRUE;
-
-// To be used only with kCharmpp14000wmi and kBeautypp14000wmi
-// To get a "reasonable" agreement with MNR results, events have to be
-// generated with the minimum ptHard set to 2.76 GeV.
-// To get a "perfect" agreement with MNR results, events have to be
-// generated in four ptHard bins with the following relative
-// normalizations:
-//  CHARM
-// 2.76-3 GeV: 25%
-//    3-4 GeV: 40%
-//    4-8 GeV: 29%
-//     >8 GeV:  6%
-//  BEAUTY
-// 2.76-4 GeV:  5%
-//    4-6 GeV: 31%
-//    6-8 GeV: 28%
-//     >8 GeV: 36%
-
-
-Float_t eCMS=14000;
-//PDC07Proc_t proc = kPyJetJet;
-//PDC07Proc_t proc = kPyGammaJetEMCAL;
-PDC07Proc_t proc = kPyBJetEMCAL;
-Int_t nPtHardGJBins = 11;
-Int_t ptHardGJLo[] = {5 ,10,20,30,40,50,60,70,80,90 ,100};
-Int_t ptHardGJHi[] = {10,20,30,40,50,60,70,80,90,100,-1};
-Int_t nPtHardJJBins = 17;
-Int_t ptHardJJLo[] = {2 ,12,16,20,24,29,35,41,50,60,72,86 ,104,124,149,179,215};
-Int_t ptHardJJHi[] = {12,16,20,24,29,35,41,50,60,72,86,104,124,149,179,215,258};
-Float_t ptHardMin =  10.;
-Float_t ptHardMax =  20.;
-Float_t ptGammaPi0Min = 0.;
-Int_t iquenching = 0;
-Float_t qhat = 20.; //for  iquenching equal 1 and 4
-//Float_t medlength = 6.; // for iquenching equal to 4
-Int_t year = 0; //ALICE geometry configuration
-Bool_t pi0FragPhotonInDet = kFALSE ;
-
-// Comment line
-static TString comment;
-
-void Config()
-{
-
-       // Get settings from environment variables
-       ProcessEnvironmentVars();
-       
-       gSystem->Load("liblhapdf.so");      // Parton density functions
-       gSystem->Load("libEGPythia6.so");   // TGenerator interface
-       if(iquenching !=4) gSystem->Load("libpythia6.so"); // Pythia   
-       else               gSystem->Load("libqpythia.so"); // qpythia
-       gSystem->Load("libAliPythia6.so");  // ALICE specific implementations
-       
-       // libraries required by geant321
-#if defined(__CINT__)
-       gSystem->Load("liblhapdf");
-       gSystem->Load("libEGPythia6");
-       if(iquenching !=4) gSystem->Load("libpythia6.so"); // Pythia   
-       else               gSystem->Load("libqpythia.so"); // qpythia
-       gSystem->Load("libAliPythia6");
-       gSystem->Load("libgeant321");
-#endif
-       
-       new TGeant3TGeo("C++ Interface to Geant3");
-       
-       // Output every 100 tracks
-       ((TGeant3*)gMC)->SetSWIT(4,100);
-       
-       //=======================================================================
-       
-       // Run loader
-       AliRunLoader* rl=0x0;
-       rl = AliRunLoader::Open("galice.root",
-                                                       AliConfig::GetDefaultEventFolderName(),
-                                                       "recreate");
-       if (rl == 0x0)
-    {
-               gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
-               return;
-    }
-       rl->SetCompressionLevel(2);
-       rl->SetNumberOfEventsPerFile(1000);
-       gAlice->SetRunLoader(rl);
-       
-       // Set the trigger configuration
-       AliSimulation::Instance()->SetTriggerConfig(TrigConfName[trig]);
-       cout<<"Trigger configuration is set to  "<<TrigConfName[trig]<<endl;
-       
-       //
-       //=======================================================================
-       // ************* STEERING parameters FOR ALICE SIMULATION **************
-       // --- Specify event type to be tracked through the ALICE setup
-       // --- All positions are in cm, angles in degrees, and P and E in GeV
-       
-       
-    gMC->SetProcess("DCAY",1);
-    gMC->SetProcess("PAIR",1);
-    gMC->SetProcess("COMP",1);
-    gMC->SetProcess("PHOT",1);
-    gMC->SetProcess("PFIS",0);
-    gMC->SetProcess("DRAY",0);
-    gMC->SetProcess("ANNI",1);
-    gMC->SetProcess("BREM",1);
-    gMC->SetProcess("MUNU",1);
-    gMC->SetProcess("CKOV",1);
-    gMC->SetProcess("HADR",1);
-    gMC->SetProcess("LOSS",2);
-    gMC->SetProcess("MULS",1);
-    gMC->SetProcess("RAYL",1);
-       
-    Float_t cut = 1.e-3;        // 1MeV cut by default
-    Float_t tofmax = 1.e10;
-       
-    gMC->SetCut("CUTGAM", cut);
-    gMC->SetCut("CUTELE", cut);
-    gMC->SetCut("CUTNEU", cut);
-    gMC->SetCut("CUTHAD", cut);
-    gMC->SetCut("CUTMUO", cut);
-    gMC->SetCut("BCUTE",  cut);
-    gMC->SetCut("BCUTM",  cut);
-    gMC->SetCut("DCUTE",  cut);
-    gMC->SetCut("DCUTM",  cut);
-    gMC->SetCut("PPCUTM", cut);
-    gMC->SetCut("TOFMAX", tofmax);
-       
-       //======================//
-       // Set External decayer //
-       //======================//
-       TVirtualMCDecayer* decayer = new AliDecayerPythia();
-       // DECAYS
-       //
-       switch(decHvFl) {
-               case kNature:
-                       decayer->SetForceDecay(kNeutralPion);
-                       break;
-               case kHadr:
-                       decayer->SetForceDecay(kHadronicD);
-                       break;
-               case kSemiEl:
-                       decayer->SetForceDecay(kSemiElectronic);
-                       break;
-               case kSemiMu:
-                       decayer->SetForceDecay(kSemiMuonic);
-                       break;
-       }
-       decayer->Init();
-       gMC->SetExternalDecayer(decayer);
-       //if(proc == kPyJetJetPHOSv2) // in this case we decay the pi0
-       //      decayer->SetForceDecay(kNeutralPion);
-       
-       //=========================//
-       // Generator Configuration //
-       //=========================//
-       AliGenPythia* gener = 0x0;
-       
-       if (proc <=   kBeautypp14000wmi) {
-               AliGenPythia *pythia = PythiaHVQ(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Stack filling option
-               if(!stars) pythia->SetStackFillOpt(AliGenPythia::kParentSelection);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               //
-               // DECAYS
-               //
-               switch(decHvFl) {
-                       case kNature:
-                               pythia->SetForceDecay(kNeutralPion);
-                               break;
-                       case kHadr:
-                               pythia->SetForceDecay(kHadronicD);
-                               break;
-                       case kSemiEl:
-                               pythia->SetForceDecay(kSemiElectronic);
-                               break;
-                       case kSemiMu:
-                               pythia->SetForceDecay(kSemiMuonic);
-                               break;
-               }
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-               pythia->SetPhiRange(0., 360.);
-               pythia->SetThetaRange(0,180);
-               switch(ycut) {
-                       case kFull:
-                               pythia->SetYRange(-12,12);
-                               break;
-                       case kBarrel:
-                               pythia->SetYRange(-2,2);
-                               break;
-                       case kMuonArm:
-                               pythia->SetYRange(1,6);
-                               break;
-               }
-               gener = pythia;
-       } else if (proc == kPyMbNoHvq) {
-               gener = MbCocktail();
-       } else if (proc == kPyOmegaMinus) {
-               gener = PyMbTriggered(3334);
-       } else if (proc == kPyOmegaPlus) {
-               gener = PyMbTriggered(-3334);
-       } else if (proc <= kPyGammaBremsEMCAL) {
-               AliGenPythia *pythia = PythiaHard(proc);
-               // FeedDown option
-               pythia->SetFeedDownHigherFamily(kFALSE);
-               // Set Count mode
-               if(nEvts>0) pythia->SetCountMode(AliGenPythia::kCountParents);
-               
-               //
-               // GEOM & KINE CUTS
-               //
-               pythia->SetMomentumRange(0,99999999);
-//             if(proc == kPyJetJetPHOSv2)
-//                     pythia->SetForceDecay(kNeutralPion);
-//             else
-//                     pythia->SetForceDecay(kAll);
-
-               pythia->SetForceDecay(kNeutralPion);
-               pythia->SetPycellParameters(2., 274, 432, 0., 4., 5., 1.0);
-               pythia->SetGluonRadiation(1,1); //ISR and FRS effects on.
-               pythia->SetPtKick(3.); // set the intrinsic kt to about 5.3 GeV/c
-               gener = pythia;
-               }
-       
-       //gener->SetTrackingFlag(1);
-
-       //Quenching
-       gener->SetQuench(iquenching);
-       Float_t k = 6e5*(qhat/1.7) ; //qhat=1.7, k = 6e5, default  value
-       if(iquenching == 1)//quenching weights
-         AliPythia::Instance()->InitQuenching(0.,0.1,k,0,0.95,6);
-       else if(iquenching == 4)//q-pythia
-         gener->SetQhat(k); //   !transport coefficient (GeV2/fm)
-
-       
-       // PRIMARY VERTEX
-       
-       gener->SetOrigin(0., 0., 0.);    // vertex position
-       
-       // Size of the interaction diamond
-       // Longitudinal
-       Float_t           sigmaz  = 7.55 / TMath::Sqrt(2.); // [cm] 14  TeV (p-p), 5.5 TeV (Pb-Pb)
-       if(eCMS == 10000) sigmaz  = 5.4  / TMath::Sqrt(2.); // [cm] 10  TeV
-       if(eCMS == 900)   sigmaz  = 10.5 / TMath::Sqrt(2.); // [cm] 0.9 TeV
-       cout<<">>> SigmaZ x srqt(2.) "<< sigmaz * TMath::Sqrt(2.) << endl;
-       
-    // Transverse
-       Float_t betast  = 10;                 // beta* [m]
-       Float_t eps     = 3.75e-6;            // emittance [m]
-       Float_t gamma   = eCMS / 2.0 / 0.938272;   // relativistic gamma [1]
-       Float_t sigmaxy = TMath::Sqrt(eps * betast / gamma) / TMath::Sqrt(2.) * 100.;  // [cm]
-       printf("\n \n Diamond size x-y: %10.3e z: %10.3e\n \n", sigmaxy, sigmaz);
-       
-       gener->SetSigma(sigmaxy, sigmaxy, sigmaz);      // Sigma in (X,Y,Z) (cm) on IP position
-       gener->SetCutVertexZ(3.);        // Truncate at 3 sigma
-       gener->SetVertexSmear(kPerEvent);
-       
-       gener->Init();
-
-
-  // FIELD
-  //
-  
-  AliMagF* field = 0x0;
-  if (mag == kNoField) {
-    comment = comment.Append(" | L3 field 0.0 T");
-    field = new AliMagF("Maps","Maps", 0., 0., AliMagF::k5kGUniform);
-  } else if (mag == k5kG) {
-    comment = comment.Append(" | L3 field 0.5 T");
-    field = new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG);
-  }
-  printf("\n \n Comment: %s \n \n", comment.Data());
-  TGeoGlobalMagField::Instance()->SetField(field);
-    
-   rl->CdGAFile();
-   gAlice->SetField(field);
-
-       
-       Int_t iABSO   = 1;
-       Int_t iACORDE = 0;
-       Int_t iDIPO   = 1;
-       Int_t iEMCAL  = 1;
-       Int_t iFMD    = 1;
-       Int_t iFRAME  = 1;
-       Int_t iHALL   = 1;
-       Int_t iITS    = 1;
-       Int_t iMAG    = 1;
-       Int_t iMUON   = 1;
-       Int_t iPHOS   = 1;
-       Int_t iPIPE   = 1;
-       Int_t iPMD    = 1;
-       Int_t iHMPID  = 1;
-       Int_t iSHIL   = 1;
-       Int_t iT0     = 1;
-       Int_t iTOF    = 1;
-       Int_t iTPC    = 1;
-       Int_t iTRD    = 1;
-       Int_t iVZERO  = 1;
-       Int_t iZDC    = 1;
-       
-       
-   //=================== Alice BODY parameters =============================
-   AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
-       
-       
-    if (iMAG)
-    {
-   //=================== MAG parameters ============================
-   // --- Start with Magnet since detector layouts may be depending ---
-   // --- on the selected Magnet dimensions ---
-         AliMAG *MAG = new AliMAG("MAG", "Magnet");
-     }
-       
-       
-    if (iABSO)
-    {
-        //=================== ABSO parameters ============================
-        AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
-    }
-       
-    if (iDIPO)
-    {
-        //=================== DIPO parameters ============================
-               
-        AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
-    }
-       
-    if (iHALL)
-    {
-        //=================== HALL parameters ============================
-               
-        AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
-    }
-       
-       
-    if (iFRAME)
-    {
-        //=================== FRAME parameters ============================
-               
-        AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
-           FRAME->SetHoles(1);
-    }
-       
-    if (iSHIL)
-    {
-        //=================== SHIL parameters ============================
-               
-        AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
-    }
-       
-       
-    if (iPIPE)
-    {
-        //=================== PIPE parameters ============================
-               
-        AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
-    }
-       
-    if (iITS)
-       {
-               //=================== ITS parameters ============================
-               
-               AliITS *ITS  = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
-    }
-       
-    if (iTPC)
-    {
-               //============================ TPC parameters =====================
-
-        AliTPC *TPC = new AliTPCv2("TPC", "Default");
-    }
-       
-       
-    if (iTOF) {
-        //=================== TOF parameters ============================
-
-               AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
-       }
-       
-       
-    if (iHMPID)
-    {
-        //=================== HMPID parameters ===========================
-               AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");  
-       }
-       
-       
-    if (iZDC)
-    {
-        //=================== ZDC parameters ============================
-               
-        AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
-    }
-       
-    if (iTRD)
-    {
-        //=================== TRD parameters ============================
-               
-        AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
-        AliTRDgeometry *geoTRD = TRD->GetGeometry();
-               if(year == 2009){
-                       // Partial geometry: modules at 0,8,9,17
-                       // Partial geometry: modules at 1,7,10,16 expected for 2009
-                       // starting at 3h in positive direction
-                       
-                       //geoTRD->SetSMstatus(1,0);
-                       //geoTRD->SetSMstatus(2,0);
-                       //geoTRD->SetSMstatus(3,0);
-                       //geoTRD->SetSMstatus(4,0);
-                       //geoTRD->SetSMstatus(5,0);
-                       //geoTRD->SetSMstatus(6,0);
-                       //geoTRD->SetSMstatus(7,0);
-                       
-                       
-                       //geoTRD->SetSMstatus(10,0);
-                       //geoTRD->SetSMstatus(11,0);
-                       //geoTRD->SetSMstatus(12,0);
-                       //geoTRD->SetSMstatus(13,0);
-                       //geoTRD->SetSMstatus(14,0);
-                       //geoTRD->SetSMstatus(15,0);
-                       //geoTRD->SetSMstatus(16,0);
-       
-                       geoTRD->SetSMstatus(2,0);
-                       geoTRD->SetSMstatus(3,0);
-                       geoTRD->SetSMstatus(4,0);
-                       geoTRD->SetSMstatus(5,0);
-                       geoTRD->SetSMstatus(6,0);
-
-                              geoTRD->SetSMstatus(11,0);
-                              geoTRD->SetSMstatus(12,0);
-                                      geoTRD->SetSMstatus(13,0);
-                                      geoTRD->SetSMstatus(14,0);
-                                      geoTRD->SetSMstatus(15,0);
-       }
-    }
-       
-    if (iFMD)
-    {
-        //=================== FMD parameters ============================
-               AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
-       }
-       
-    if (iMUON)
-    {
-        //=================== MUON parameters ===========================
-        // New MUONv1 version (geometry defined via builders)
-        AliMUON *MUON = new AliMUONv1("MUON", "default");
-    }
-    //=================== PHOS parameters ===========================
-       
-    if (iPHOS)
-    {
-        AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
-    }
-       
-       
-    if (iPMD)
-    {
-        //=================== PMD parameters ============================
-        AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
-    }
-       
-    if (iT0)
-    {
-        //=================== T0 parameters ============================
-        AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
-    }
-       
-    if (iEMCAL)
-    {
-        //=================== EMCAL parameters ============================
-        AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
-    }
-       
-       if (iACORDE)
-    {
-        //=================== ACORDE parameters ============================
-        AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
-    }
-       
-       if (iVZERO)
-    {
-        //=================== VZERO parameters ============================
-        AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
-    }
-       
-       AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
-}
-
-//           PYTHIA
-
-AliGenPythia *PythiaHVQ(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for charm / beauty generation with PYTHIA      //
-//                                                                   //
-// The parameters have been tuned in order to reproduce the inclusive//
-// heavy quark pt distribution given by the NLO pQCD calculation by  //
-// Mangano, Nason and Ridolfi.                                       //
-//                                                                   //
-// For details and for the NORMALIZATION of the yields see:          //
-//   N.Carrer and A.Dainese,                                         //
-//   "Charm and beauty production at the LHC",                       //
-//   ALICE-INT-2003-019, [arXiv:hep-ph/0311225];                     //
-//   PPR Chapter 6.6, CERN/LHCC 2005-030 (2005).                     //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-  case kCharmPbPb5500:
-      comment = comment.Append(" Charm in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kCharmpPb8800:
-      comment = comment.Append(" Charm in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmpPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kCharmpp14000:
-      comment = comment.Append(" Charm in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyCharmppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kCharmpp14000wmi:
-      comment = comment.Append(" Charm in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyCharmppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kD0PbPb5500:
-      comment = comment.Append(" D0 in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0PbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kD0pPb8800:
-      comment = comment.Append(" D0 in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0pPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kD0pp14000:
-      comment = comment.Append(" D0 in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyD0ppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kDPlusPbPb5500:
-      comment = comment.Append(" DPlus in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kDPluspPb8800:
-      comment = comment.Append(" DPlus in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPluspPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kDPluspp14000:
-      comment = comment.Append(" DPlus in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyDPlusppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.1,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautyPbPb5500:
-      comment = comment.Append(" Beauty in Pb-Pb at 5.5 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyPbPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(5500.);
-      gener->SetNuclei(208,208);
-      break;
-  case kBeautypPb8800:
-      comment = comment.Append(" Beauty in p-Pb at 8.8 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautypPbMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(8800.);
-      gener->SetProjectile("P",1,1);
-      gener->SetTarget("Pb",208,82);
-      break;
-  case kBeautypp14000:
-      comment = comment.Append(" Beauty in pp at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetProcess(kPyBeautyppMNR);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(2.75,-1.0);
-      gener->SetEnergyCMS(14000.);
-      break;
-  case kBeautypp14000wmi:
-      comment = comment.Append(" Beauty in pp at 14 TeV with mult. interactions");
-      gener = new AliGenPythia(-1);
-      gener->SetProcess(kPyBeautyppMNRwmi);
-      gener->SetStrucFunc(kCTEQ5L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      gener->SetEnergyCMS(14000.);
-      break;
-   }
-
-  return gener;
-}
-
-AliGenPythia *PythiaHard(PDC07Proc_t proc) {
-//*******************************************************************//
-// Configuration file for hard QCD processes generation with PYTHIA  //
-//                                                                   //
-//*******************************************************************//
-  AliGenPythia * gener = 0x0;
-
-  switch(proc) {
-
-  case kPyJetJet:
-    comment = comment.Append(" pp->jet + jet over at 14 TeV, no restriction");
-    AliGenPythia * gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);//        Centre of mass energy
-    gener->SetProcess(kPyJets);//        Process type
-    gener->SetJetEtaRange(-1.5, 1.5);//  Final state kinematic cuts
-    gener->SetJetPhiRange(0., 360.);
-    gener->SetJetEtRange(10., 1000.);
-    gener->SetPtHard(ptHardMin, ptHardMax);// Pt transfer of the hard scattering
-    gener->SetStrucFunc(kCTEQ4L);
-       break;
-  case kBeautyppwmiJet:
-       comment = comment.Append(" Beauty Jets, no acceptance cuts");
-       AliGenPythia *gener = new AliGenPythia(-1);
-       gener->SetProcess(kPyBeautyppMNRwmi);
-       gener->SetStrucFunc(kCTEQ4L);
-       //Jet specific stuff below
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       gener->SetJetEtaRange(-1,1); //used like that in LHC08d10, does nothing?
-       gener->SetJetPhiRange(60.,210.);//used like that in LHC08d10, does nothing?
-       gener->SetJetEtRange(10.,1000.);//used like that in LHC08d10,does nothing
-       //jet specific stuff above
-       gener->SetEnergyCMS(eCMS);
-       gener->SetForceDecay(kSemiElectronic);
-       gener->SetYRange(-2,2);
-       gener->SetFeedDownHigherFamily(kFALSE);
-       gener->SetCountMode(AliGenPythia::kCountParents);               
-       break;
-  case kPyBJetEMCAL:
-       comment = comment.Append(" Beauty Jets over EMCAL");
-       AliGenPythia *gener = new AliGenPythia(-1);
-       gener->SetProcess(kPyBeautyJets); 
-       gener->SetStrucFunc(kCTEQ4L); 
-       //Jet specific stuff below 
-       gener->SetPtHard(ptHardMin,ptHardMax); 
-       gener->SetJetEtaRange(-1,1); 
-       gener->SetJetPhiRange(60.,210.); 
-       gener->SetJetEtRange(10.,1000.); 
-       //jet specific stuff above 
-       gener->SetEnergyCMS(eCMS); 
-       gener->SetForceDecay(kSemiElectronic); 
-       gener->SetYRange(-2,2); 
-       gener->SetFeedDownHigherFamily(kFALSE); 
-       gener->SetCountMode(AliGenPythia::kCountParents);       
-       gener->SetElectronMinPt(1.); 
-       gener->SetElectronInEMCAL(kTRUE);               
-       break;            
-  case kPyGammaJetPHOS:
-      comment = comment.Append(" pp->jet + gamma over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyDirectGamma);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetGammaEtaRange(-0.13,0.13);
-      gener->SetGammaPhiRange(219.,321.);//Over 5 modules +-2 deg
-      break;
-  case kPyJetJetPHOS:
-      comment = comment.Append(" pp->jet + jet over PHOS");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetJetEtRange(10., 1000.);
-      gener->SetPi0InPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-  case kPyGammaBremsPHOS:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over PHOS at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1.,1.);
-      gener->SetJetPhiRange(200.,340.);
-      gener->SetFragPhotonInPHOS(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-         printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-         break;
-   case kPyJetJetPHOSv2:
-        comment = comment.Append(" pp->jet + jet over PHOS version2 ");
-        gener = new AliGenPythia(nEvts);
-       gener->SetEnergyCMS(eCMS);
-       gener->SetProcess(kPyJets);
-       gener->SetStrucFunc(kCTEQ4L);
-       gener->SetPtHard(ptHardMin,ptHardMax);
-       //gener->SetYHard(-1.0,1.0);
-       gener->SetJetEtaRange(-1.,1.);
-       gener->SetJetPhiRange(200.,340.);
-       //gener->SetPi0InPHOS(kTRUE);
-       gener->SetPhotonInPHOSeta(pi0FragPhotonInDet);
-       gener->SetPhotonMinPt(ptGammaPi0Min);
-       gener->SetForceDecay(kAll);
-       break;
-  case kPyGammaJetEMCAL:
-    comment = comment.Append(" pp->jet + gamma over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyDirectGamma);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetGammaEtaRange(-0.701,0.701);
-    gener->SetGammaPhiRange(79.,191.);//Over 6 supermodules +-2 deg
-    break;
-  case kPyJetJetEMCAL:
-    comment = comment.Append(" pp->jet + jet over EMCAL at 14 TeV");
-    gener = new AliGenPythia(nEvts);
-    gener->SetEnergyCMS(eCMS);
-    gener->SetProcess(kPyJets);
-    gener->SetStrucFunc(kCTEQ4L);
-    gener->SetPtHard(ptHardMin,ptHardMax);
-    //gener->SetYHard(-1.0,1.0);
-    gener->SetJetEtaRange(-1,1);
-    gener->SetJetPhiRange(60.,210.);
-       gener->SetJetEtRange(10., 1000.);
-    gener->SetPi0InEMCAL(pi0FragPhotonInDet);
-    gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-    printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-    break;
-  case kPyGammaBremsEMCAL:
-      comment = comment.Append(" pp->jet + jet+bremsphoton over EMCAL at 14 TeV");
-      gener = new AliGenPythia(nEvts);
-      gener->SetEnergyCMS(eCMS);
-      gener->SetProcess(kPyJets);
-      gener->SetStrucFunc(kCTEQ4L);
-      gener->SetPtHard(ptHardMin,ptHardMax);
-      //gener->SetYHard(-1.0,1.0);
-      gener->SetJetEtaRange(-1,1);
-      gener->SetJetPhiRange(60.,210.); 
-         gener->SetJetEtRange(10., 1000.);
-      gener->SetFragPhotonInEMCAL(pi0FragPhotonInDet);
-      gener->SetFragPhotonOrPi0MinPt(ptGammaPi0Min);
-
-      printf("\n \n Event generator: Minimum pT of particle in calorimeter %f \n \n", ptGammaPi0Min);
-      break;
-
-  }
-
-  return gener;
-}
-
-AliGenerator* MbCocktail()
-{
-      comment = comment.Append(" pp at 14 TeV: Pythia low-pt, no heavy quarks + J/Psi from parameterisation");
-      AliGenCocktail * gener = new AliGenCocktail();
-      gener->UsePerEventRates();
-
-//    Pythia
-
-      AliGenPythia* pythia = new AliGenPythia(-1);
-      pythia->SetMomentumRange(0, 999999.);
-      pythia->SetThetaRange(0., 180.);
-      pythia->SetYRange(-12.,12.);
-      pythia->SetPtRange(0,1000.);
-      pythia->SetProcess(kPyMb);
-      pythia->SetEnergyCMS(14000.);
-      pythia->SwitchHFOff();
-
-//   J/Psi parameterisation
-
-      AliGenParam* jpsi = new AliGenParam(1, AliGenMUONlib::kJpsi, "CDF scaled", "Jpsi");
-      jpsi->SetPtRange(0.,100.);
-      jpsi->SetYRange(-8., 8.);
-      jpsi->SetPhiRange(0., 360.);
-      jpsi->SetForceDecay(kAll);
-
-      gener->AddGenerator(pythia, "Pythia", 1.);
-      gener->AddGenerator(jpsi,   "J/Psi", 8.e-4);
-
-      return gener;
-}
-
-AliGenerator* PyMbTriggered(Int_t pdg)
-{
-    AliGenPythia* pythia = new AliGenPythia(-1);
-    pythia->SetMomentumRange(0, 999999.);
-    pythia->SetThetaRange(0., 180.);
-    pythia->SetYRange(-12.,12.);
-    pythia->SetPtRange(0,1000.);
-    pythia->SetProcess(kPyMb);
-    pythia->SetEnergyCMS(14000.);
-    pythia->SetTriggerParticle(pdg, 0.9);
-    return pythia;
-}
-
-void ProcessEnvironmentVars()
-{
-       cout << "######################################" << endl;
-       cout << "## Processing environment variables ##" << endl;
-       cout << "######################################" << endl;
-       
-    // Run Number
-    if (gSystem->Getenv("RUN")) {
-               runNumber = atoi(gSystem->Getenv("RUN"));
-    }
-    //cout<<"Run number "<<runNumber<<endl;
-       
-    // Event Number
-    if (gSystem->Getenv("EVENT")) {
-               eventNumber = atoi(gSystem->Getenv("EVENT"));
-    }
-    //cout<<"Event number "<<eventNumber<<endl;
-       
-       // Random Number seed
-    if (gSystem->Getenv("CONFIG_SEED")) {
-               seed = atoi(gSystem->Getenv("CONFIG_SEED"));
-    }
-    else if(gSystem->Getenv("EVENT") && gSystem->Getenv("RUN")){
-               seed = runNumber * 100000 + eventNumber;
-    }
-       
-    gRandom->SetSeed(seed);
-       
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-    cout<<"Seed for random number generation= "<< seed<<"  "<< gRandom->GetSeed()<<endl;
-    cout<<"////////////////////////////////////////////////////////////////////////////////////"<<endl;
-       
-    // Run type
-    if (gSystem->Getenv("DC_RUN_TYPE")) {
-               cout<<"run type "<<gSystem->Getenv("DC_RUN_TYPE")<<endl;
-               for (Int_t iRun = 0; iRun < kRunMax; iRun++) {
-                       if (strcmp(gSystem->Getenv("DC_RUN_TYPE"), pprRunName[iRun])==0) {
-                               proc = (PDC07Proc_t)iRun;
-                       }
-               }
-    }
-    else
-               cout << "Environment variable DC_RUN_TYPE is not defined" << endl;
-    if (gSystem->Getenv("YEAR"))
-               year = atoi(gSystem->Getenv("YEAR"));
-       if (gSystem->Getenv("ECMS"))
-               eCMS = atof(gSystem->Getenv("ECMS"));
-       if (gSystem->Getenv("TRIGGER"))
-               trig = atoi(gSystem->Getenv("TRIGGER"));
-       if ( gSystem->Getenv("PI0GAMMAINDET") )
-               pi0FragPhotonInDet      = atoi(gSystem->Getenv("PI0GAMMAINDET"));
-    if (gSystem->Getenv("PTGAMMAPI0MIN"))
-               ptGammaPi0Min = atof(gSystem->Getenv("PTGAMMAPI0MIN"));
-       if (gSystem->Getenv("QUENCHING"))
-               iquenching = atof(gSystem->Getenv("QUENCHING"));
-       if (gSystem->Getenv("QHAT"))
-               qhat = atof(gSystem->Getenv("QHAT"));
-       //if (gSystem->Getenv("MEDLENGHT"))
-       //      medlength = atof(gSystem->Getenv("MEDLENGHT"));
-       if (gSystem->Getenv("PTHARDMIN"))
-               ptHardMin = atof(gSystem->Getenv("PTHARDMIN"));
-       if (gSystem->Getenv("PTHARDMAX"))
-               ptHardMax = atof(gSystem->Getenv("PTHARDMAX"));
-                                       
-    if(gSystem->Getenv("PTHARDMIN") && gSystem->Getenv("PTHARDMAX")){
-       if( strncmp(pprRunName[proc],"kPyJetJet",9)==0 || strncmp(pprRunName[proc],"kPyBJetEMCAL",11)==0 ){
-                       ptHardMin = ptHardJJLo[runNumber%nPtHardJJBins];
-                       ptHardMax = ptHardJJHi[runNumber%nPtHardJJBins];
-               }
-               else if( strncmp(pprRunName[proc],"kPyGammaJet",11)==0){
-                       ptHardMin = ptHardGJLo[runNumber%nPtHardGJBins];
-                       ptHardMax = ptHardGJHi[runNumber%nPtHardGJBins];        
-               }       
-       }
-       
-    cout<<">> Run type set to "<<pprRunName[proc]<<endl;
-    cout<<">> Collision energy set to "<<eCMS <<endl;
-       cout<<">> Collisions trigger type "<<trig<<" "<<TrigConfName[trig]<<endl;
-    cout<<">> ptHard limits: "<<ptHardMin<<" to " <<ptHardMax<<" GeV"<<endl;
-       if(pi0FragPhotonInDet) cout<<">> pt gamma/pi0 threshold "<< ptGammaPi0Min<<" GeV "<<endl;
-    if(iquenching) cout<<">> quenching on? "<< iquenching<<" qhat "<<qhat//<<" medlength "<<medlength
-       <<endl;
-       cout<<">> Year geometry : "<<year<<endl;        
-    cout << "######################################" << endl;
-    cout << "######################################" << endl;
-}
diff --git a/prod/LHC08d12/JDL b/prod/LHC08d12/JDL
deleted file mode 100644 (file)
index 150df7d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-Executable = "aliroot_new";\r
-Jobtag={"comment:jet-jet, PbPb, PYTHIA+HIJING, no quenching, run number $1, HIJING run background $2"};\r
-\r
-Packages={"VO_ALICE@AliRoot::v4-16-Rev-13","VO_ALICE@GEANT3::v1-10-1","VO_ALICE@ROOT::v5-23-04","VO_ALICE@APISCONFIG::V2.4"};\r
-\r
-TTL = "72000";\r
-Price = 1;\r
-\r
-Validationcommand ="/alice/cern.ch/user/a/aliprod/prod2007/configs_pbpb_hijing/validation.sh";\r
-\r
-InputFile= {"LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/CheckESD.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/Config.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/rec.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/sim.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/simrun.C","LF:/alice/cern.ch/user/c/conesa/production/configs_pp_PbPb_new/tag.C"};\r
-\r
-OutputArchive={"log_archive:*.log,stdout,stderr,*.log@Alice::NIHAM::File","root_archive.zip:*.tag.root,galice.root,geometry.root,Kinematics.root,TrackRefs.root,AliESDs.root,AliESDfriends.root,pyxsec.root,*QA*@Alice::Subatech::SE"};\r
-\r
-InputDataCollection="LF:/alice/cern.ch/user/c/conesa/production/collection/PbPb/$2.xml";\r
-InputDataListFormat = "xml-single";\r
-InputDataList = "collection.xml";\r
-\r
-OutputDir="/alice/cern.ch/user/c/conesa/production/outPbPb/JJ/noq/$1/#alien_counter_03i#";\r
-\r
-JDLVariables={"Packages", "OutputDir"};\r
-GUIDFILE="guid.txt";\r
-\r
-splitarguments="simrun.C --run $1 --event #alien_counter# --process kPyJetJetEMCAL  --ecms 5500 --quench 0 --trigger 1" ;\r
-\r
-Split="se"; \r
-SplitMaxInputFileNumber="1"; \r
-\r
-Workdirectorysize={"6000MB"};\r
diff --git a/prod/LHC08d12/rec.C b/prod/LHC08d12/rec.C
deleted file mode 100644 (file)
index 0a2c711..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-void rec() {
-
-  AliReconstruction reco;
-  reco.SetWriteESDfriend();
-  reco.SetWriteAlignmentData();
-
-  reco.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/");
-
-  reco.SetRecoParam("ITS",AliITSRecoParam::GetHighFluxParam());
-  reco.SetRecoParam("TPC",AliTPCRecoParam::GetHighFluxParam());
-  reco.SetRecoParam("TRD",AliTRDrecoParam::GetHighFluxParam());
-  reco.SetRecoParam("PHOS",AliPHOSRecoParam::GetDefaultParameters());
-  reco.SetRecoParam("EMCAL",AliEMCALRecParam::GetHighFluxParam());
-  reco.SetRecoParam("MUON",AliMUONRecoParam::GetHighFluxParam());
-
-  // No write access to the OCDB => specific storage
-  reco.SetSpecificStorage("GRP/GRP/Data",
-                         Form("local://%s",gSystem->pwd()));
-
-  reco.SetRunQA("ALL:ALL");
-
-  TStopwatch timer;
-  timer.Start();
-  reco.Run();
-  timer.Stop();
-  timer.Print();
-}
diff --git a/prod/LHC08d12/sim.C b/prod/LHC08d12/sim.C
deleted file mode 100644 (file)
index 1c053e9..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-void sim(Int_t nev=10) {
-  AliSimulation simu;
-  //simu.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL FMD PMD T0 ZDC VZERO MUON HLT");
-  //simu.SetMakeDigits ("TRD TOF PHOS HMPID EMCAL FMD PMD T0 ZDC VZERO MUON HLT");
-  //simu.SetMakeDigitsFromHits("ITS TPC");
-  //simu.SetWriteRawData("ALL","raw.root",kTRUE);
-  simu.SetDefaultStorage("alien://Folder=/alice/simulation/2008/v4-15-Release/Ideal/?cacheFold=/tmp/CDBCache?operateDisconnected=kFALSE");
-
-  // No write access to the OCDB => specific storage
-  simu.SetSpecificStorage("GRP/GRP/Data",
-                          Form("local://%s",gSystem->pwd()));
-
-  //simu.SetRunQA(":") ; 
-  //simu.SetRunHLT("");
-  //simu.SetWriteGRPEntry(kFALSE);
-
-  //Merge with HIJING
-  //Load necessary libraries and connect to the GRID
-  gSystem->Load("libNetx.so") ;
-  gSystem->Load("libRAliEn.so");
-  TGrid::Connect("alien://") ;
-    
-  //Feed Grid with collection file
-  TGridCollection * collection = (TGridCollection*) TAlienCollection::Open("collection.xml");   
-  if (! collection) {
-    AliError(Form("collection: %s not found", kXML)) ;
-    return kFALSE ;
-  }
-  TGridResult* result = collection->GetGridResult("",0 ,0);
-  TString alienURL = result->GetKey(0, "turl") ;//split all files in collection, only one is sent per job
-  cout << "================== " << alienURL << endl ;
-  simu.MergeWith(alienURL);
-
-  TStopwatch timer;
-  timer.Start();
-  simu.Run(nev);
-  WriteXsection();
-  timer.Stop();
-  timer.Print();
-}
-
-WriteXsection()
-{
-  TPythia6 *pythia = TPythia6::Instance();
-  pythia->Pystat(1);
-  Double_t xsection = pythia->GetPARI(1);
-  Int_t    ntrials  = pythia->GetMSTI(5);
-
-  TTree   *tree   = new TTree("Xsection","Pythia cross section");
-  TBranch *branch = tree->Branch("xsection", &xsection, "X/D");
-  TBranch *branch = tree->Branch("ntrials" , &ntrials , "X/i");
-  tree->Fill();
-
-  TFile *file = new TFile("pyxsec.root","recreate");
-  tree->Write();
-  file->Close();
-
-  cout << "Pythia cross section: " << xsection 
-       << ", number of trials: " << ntrials << endl;
-}
diff --git a/prod/LHC08d12/simrun.C b/prod/LHC08d12/simrun.C
deleted file mode 100644 (file)
index 26e7393..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-//#define VERBOSEARGS
-
-{
-       // set job and simulation variables as :
-       // root run.C  --run <x> --event <y> --process <proc> --minhard <min> --maxhard <max> --minpt <minpt> ...
-cout<<"Begin SIMRUN"<<endl;    
-       int nrun = 0;
-       int nevent = 0;
-       int seed = 0;
-       
-       char sseed[1024];
-       char srun[1024];
-       char sevent[1024];
-       char secms[1024];
-       char sprocess[1024];
-       char sminpthard[1024];
-       char smaxpthard[1024];
-       char sminptgammapi0[1024];
-       char spi0gammafrag[1024];
-       char squench[1024];
-       char sqhat[1024];
-       char smedlength[1024];
-       char strig[1024];
-       char syear[1024];
-       
-       sprintf(srun,"");
-       sprintf(sevent,"");
-       sprintf(secms,"");
-       sprintf(sprocess,"");
-       sprintf(sminpthard,"");
-       sprintf(smaxpthard,"");
-       sprintf(sminptgammapi0,"");
-       sprintf(spi0gammafrag,"");
-       sprintf(squench,"");
-       sprintf(sqhat,"");
-       //sprintf(smedlength,"");
-       sprintf(strig,"");
-       sprintf(syear,"");
-       
-       for (int i=0; i< gApplication->Argc();i++){
-#ifdef VERBOSEARGS
-               printf("Arg  %d:  %s\n",i,gApplication->Argv(i));
-#endif
-               if (!(strcmp(gApplication->Argv(i),"--run")))
-                       nrun = atoi(gApplication->Argv(i+1));
-               sprintf(srun,"%d",nrun);
-       
-               if (!(strcmp(gApplication->Argv(i),"--event")))
-                       nevent = atoi(gApplication->Argv(i+1));
-               sprintf(sevent,"%d",nevent);
-                               
-               if (!(strcmp(gApplication->Argv(i),"--process")))
-                       sprintf(sprocess, gApplication->Argv(i+1));
-                               
-               if (!(strcmp(gApplication->Argv(i),"--year")))
-                       sprintf(syear, gApplication->Argv(i+1));
-
-               if (!(strcmp(gApplication->Argv(i),"--ecms")))
-                       sprintf(secms,gApplication->Argv(i+1));
-                                               
-               if (!(strcmp(gApplication->Argv(i),"--minhard")))
-                       sprintf(sminpthard,gApplication->Argv(i+1));
-                                                       
-               if (!(strcmp(gApplication->Argv(i),"--maxhard")))
-                       sprintf(smaxpthard,gApplication->Argv(i+1));
-       
-               if (!(strcmp(gApplication->Argv(i),"--pi0gammafrag")))
-                       sprintf(spi0gammafrag,gApplication->Argv(i+1));
-                                                                                                                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--minpt")))
-                       sprintf(sminptgammapi0,gApplication->Argv(i+1));
-                                                                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--quench")))
-                       sprintf(squench,gApplication->Argv(i+1));
-                                                                               
-               if (!(strcmp(gApplication->Argv(i),"--qhat")))
-                       sprintf(sqhat,gApplication->Argv(i+1));
-                                                                                       
-               //if (!(strcmp(gApplication->Argv(i),"--medlength")))
-               //      sprintf(smedlength,gApplication->Argv(i+1));
-                                                                                       
-               if (!(strcmp(gApplication->Argv(i),"--trigger")))
-                       sprintf(strig,gApplication->Argv(i+1));
-                                                                                                       
-       }
-       cout<<"GOT VARIABLES SIMRUN"<<endl;      
-       //rec params for reconstruction
-       //only for release < 16
-       //char cmd[200] ; 
-       //sprintf(cmd, ".! tar zxvf DBpp.tgz") ; 
-       //gROOT->ProcessLine(cmd) ; 
-       
-       seed = nrun * 100000 + nevent;
-       sprintf(sseed,"%d",seed);
-       
-       if (seed==0) {
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stderr,"!!!!  WARNING! Seeding variable for MC is 0          !!!!\n");
-               fprintf(stderr,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       } else {
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-               fprintf(stdout,"!!!  MC Seed is %d \n",seed);
-               fprintf(stdout,"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
-       }
-       
-       // set the seed environment variable
-       gSystem->Setenv("CONFIG_SEED",sseed);
-       gSystem->Setenv("RUN",srun);
-       gSystem->Setenv("EVENT",sevent);
-       gSystem->Setenv("DC_RUN_TYPE",sprocess);//"kPyGammaJetPHOS");
-       gSystem->Setenv("YEAR",syear);//"14000");       
-       gSystem->Setenv("ECMS",secms);//"14000");
-       gSystem->Setenv("PTHARDMIN",sminpthard);//"20");
-       gSystem->Setenv("PTHARDMAX",smaxpthard);//"30");
-       gSystem->Setenv("PI0GAMMAINDET",spi0gammafrag);//"1");
-       gSystem->Setenv("PTGAMMAPI0MIN",sminptgammapi0);//"1");
-       gSystem->Setenv("QUENCHING",squench);
-       gSystem->Setenv("QHAT",sqhat);
-       //gSystem->Setenv("MEDLENGTH",smedlength);
-       gSystem->Setenv("TRIGGER",strig);
-       
-       cout<< "SIMRUN:: Run = " << gSystem->Getenv("RUN") << "; Event = " << gSystem->Getenv("EVENT") 
-       << "; Process = "    << gSystem->Getenv("DC_RUN_TYPE")
-       << "; E cms = " << gSystem->Getenv("ECMS") 
-       << "; Trigger configuration = "<< gSystem->Getenv("TRIGGER")
-       << "; Year = "<<gSystem->Getenv("YEAR") << endl;
-       
-       cout<< "         minpthard = " << gSystem->Getenv("PTHARDMIN") 
-       << "; maxpthard =" << gSystem->Getenv("PTHARDMAX") 
-       << "; force pi0/gamma frag in detector = "     << gSystem->Getenv("PI0GAMMAINDET") 
-       << "; minpt = "     << gSystem->Getenv("PTGAMMAPI0MIN") 
-       << "; quenching option ="<<gSystem->Getenv("QUENCHING") 
-       << "; qhat = "<<gSystem->Getenv("QHAT") 
-       //<< "; medium length = "<<gSystem->Getenv("MEDIUMLENGTH")
-       << endl;
-       
-       cout<<">>>>> SIMULATION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q sim.C > sim.log 2>&1");
-       cout<<">>>>> RECONSTRUCTION <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q rec.C > rec.log 2>&1");
-       cout<<">>>>> TAG <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q tag.C > tag.log 2>&1");
-       cout<<">>>>> CHECK ESD <<<<<"<<endl;
-       gSystem->Exec("aliroot -b -q CheckESD.C > check.log 2>&1");
-       
-}
diff --git a/prod/LHC08d12/tag.C b/prod/LHC08d12/tag.C
deleted file mode 100644 (file)
index 668d95a..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-void tag() {
-  const char* turl = gSystem->Getenv("ALIEN_JDL_OUTPUTDIR");
-  TString fESDFileName = "alien://";
-  fESDFileName += turl;
-  fESDFileName += "/AliESDs.root";
-
-  TString fGUID = 0;
-  GetGUID(fGUID);
-
-  TString fAliroot, fRoot, fGeant;
-  GetVersions(fAliroot,fRoot,fGeant);
-
-  UpdateTag(fAliroot,fRoot,fGeant,fESDFileName,fGUID);
-}
-
-//_____________________________________//
-GetVersions(TString &fAliroot, TString &froot, TString &fgeant) {
-  const char* fver = gSystem->Getenv("ALIEN_JDL_PACKAGES");
-  TString fS = fver;
-  Int_t fFirst = fS.First("#");
-
-  while(fFirst != -1) {
-    Int_t fTotalLength = fS.Length();
-    TString tmp = fS;
-    TString fS1 = fS(0,fFirst);
-    tmp = fS(fFirst+2,fTotalLength);
-    fS = tmp;
-
-    if(fS1.Contains("Root")) fAliroot = fS1;
-    if(fS1.Contains("ROOT")) froot = fS1;
-    if(fS1.Contains("GEANT")) fgeant = fS1;
-
-    if(tmp.Contains("Root")) fAliroot = tmp;
-    if(tmp.Contains("ROOT")) froot = tmp;
-    if(tmp.Contains("GEANT")) fgeant = tmp;
-
-    fFirst = tmp.First("#");
-  }
-}
-
-//_____________________________________//
-GetGUID(TString &guid) {
-  ofstream myfile ("guid.txt");
-  if (myfile.is_open()) {
-    TFile *f = TFile::Open("AliESDs.root","read");
-    if(f->IsOpen()) {
-      guid = f->GetUUID().AsString();
-      myfile << "AliESDs.root \t"<<f->GetUUID().AsString();
-      cout<<guid.Data()<<endl;
-      myfile.close();
-    }
-    else cout<<"Input file not found"<<endl;
-  }
-  else cout<<"Output file can't be created..."<<endl;
-}
-
-
-//_____________________________________//
-Bool_t UpdateTag(TString faliroot, TString froot, TString fgeant, TString turl, TString guid) {
-  cout<<"Updating tags....."<<endl;
-
-  const char * tagPattern = "tag.root";
-  // Open the working directory
-  void * dirp = gSystem->OpenDirectory(gSystem->pwd());
-  const char * name = 0x0;
-  // Add all files matching *pattern* to the chain
-  while((name = gSystem->GetDirEntry(dirp))) {
-    if (strstr(name,tagPattern)) {
-      TFile *f = TFile::Open(name,"read") ;
-
-      AliRunTag *tag = new AliRunTag;
-      AliEventTag *evTag = new AliEventTag;
-      TTree *fTree = (TTree *)f->Get("T");
-      fTree->SetBranchAddress("AliTAG",&tag);
-
-      //Defining new tag objects
-      AliRunTag *newTag = new AliRunTag();
-      TTree ttag("T","A Tree with event tags");
-      TBranch * btag = ttag.Branch("AliTAG", &newTag);
-      btag->SetCompressionLevel(9);
-      for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) {
-       fTree->GetEntry(iTagFiles);
-       newTag->SetRunId(tag->GetRunId());
-       newTag->SetAlirootVersion(faliroot);
-       newTag->SetRootVersion(froot);
-       newTag->SetGeant3Version(fgeant);
-       const TClonesArray *tagList = tag->GetEventTags();
-       for(Int_t j = 0; j < tagList->GetEntries(); j++) {
-         evTag = (AliEventTag *) tagList->At(j);
-         evTag->SetTURL(turl);
-         evTag->SetGUID(guid);
-         newTag->AddEventTag(*evTag);
-       }
-       ttag.Fill();
-       newTag->Clear();
-      }//tag file loop
-
-      TFile* ftag = TFile::Open(name, "recreate");
-      ftag->cd();
-      ttag.Write();
-      ftag->Close();
-
-      delete tag;
-      delete newTag;
-    }//pattern check
-  }//directory loop
-  return kTRUE;
-}
diff --git a/prod/LHC08d13/CheckESD.C b/prod/LHC08d13/CheckESD.C
deleted file mode 100644 (file)
index cdf8c5b..0000000
+++ /dev/null
@@ -1,695 +0,0 @@
-#if !defined( __CINT__) || defined(__MAKECINT__)\r
-#include <TROOT.h>\r
-#include <TFile.h>\r
-#include <TError.h>\r
-#include <TH1.h>\r
-#include <TH2.h>\r
-#include <TF1.h>\r
-#include <TCanvas.h>\r
-#include <TVector3.h>\r
-#include <TPDGCode.h>\r
-#include <TParticle.h>\r
-\r
-#include "AliRunLoader.h"\r
-#include "AliLoader.h"\r
-#include "AliESDEvent.h"\r
-#include "AliESDv0.h"\r
-#include "AliESDcascade.h"\r
-#include "AliESDMuonTrack.h"\r
-#include "AliESDCaloCluster.h"\r
-#include "AliRun.h"\r
-#include "AliStack.h"\r
-#include "AliHeader.h"\r
-#include "AliGenEventHeader.h"\r
-#include "AliPID.h"\r
-#endif\r
-\r
-\r
-TH1F* CreateHisto(const char* name, const char* title, \r
-                 Int_t nBins, Double_t xMin, Double_t xMax,\r
-                 const char* xLabel = NULL, const char* yLabel = NULL)\r
-{\r
-// create a histogram\r
-\r
-  TH1F* result = new TH1F(name, title, nBins, xMin, xMax);\r
-  result->SetOption("E");\r
-  if (xLabel) result->GetXaxis()->SetTitle(xLabel);\r
-  if (yLabel) result->GetYaxis()->SetTitle(yLabel);\r
-  result->SetMarkerStyle(kFullCircle);\r
-  return result;\r
-}\r
-\r
-TH1F* CreateEffHisto(TH1F* hGen, TH1F* hRec)\r
-{\r
-// create an efficiency histogram\r
-\r
-  Int_t nBins = hGen->GetNbinsX();\r
-  TH1F* hEff = (TH1F*) hGen->Clone("hEff");\r
-  hEff->SetTitle("");\r
-  hEff->SetStats(kFALSE);\r
-  hEff->SetMinimum(0.);\r
-  hEff->SetMaximum(110.);\r
-  hEff->GetYaxis()->SetTitle("#epsilon [%]");\r
-\r
-  for (Int_t iBin = 0; iBin <= nBins; iBin++) {\r
-    Double_t nGen = hGen->GetBinContent(iBin);\r
-    Double_t nRec = hRec->GetBinContent(iBin);\r
-    if (nGen > 0) {\r
-      Double_t eff = nRec/nGen;\r
-      hEff->SetBinContent(iBin, 100. * eff);\r
-      Double_t error = sqrt(eff*(1.-eff) / nGen);\r
-      if (error == 0) error = 0.0001;\r
-      hEff->SetBinError(iBin, 100. * error);\r
-    } else {\r
-      hEff->SetBinContent(iBin, -100.);\r
-      hEff->SetBinError(iBin, 0);\r
-    }\r
-  }\r
-\r
-  return hEff;\r
-}\r
-\r
-Bool_t FitHisto(TH1* histo, Double_t& res, Double_t& resError)\r
-{\r
-// fit a gaussian to a histogram\r
-\r
-  static TF1* fitFunc = new TF1("fitFunc", "gaus");\r
-  fitFunc->SetLineWidth(2);\r
-  fitFunc->SetFillStyle(0);\r
-  Double_t maxFitRange = 2;\r
-\r
-  if (histo->Integral() > 50) {\r
-    Float_t mean = histo->GetMean();\r
-    Float_t rms = histo->GetRMS();\r
-    fitFunc->SetRange(mean - maxFitRange*rms, mean + maxFitRange*rms);\r
-    fitFunc->SetParameters(mean, rms);\r
-    histo->Fit(fitFunc, "QRI0");\r
-    histo->GetFunction("fitFunc")->ResetBit(1<<9);\r
-    res = TMath::Abs(fitFunc->GetParameter(2));\r
-    resError = TMath::Abs(fitFunc->GetParError(2));\r
-    return kTRUE;\r
-  }\r
-\r
-  return kFALSE;\r
-}\r
-\r
-\r
-Bool_t CheckESD(const char* gAliceFileName = "galice.root", \r
-               const char* esdFileName = "AliESDs.root")\r
-{\r
-// check the content of the ESD\r
\r
-  // check values\r
-  Int_t    checkNGenLow = 1;\r
-\r
-  Double_t checkEffLow = 0.5;\r
-  Double_t checkEffSigma = 3;\r
-  Double_t checkFakeHigh = 0.5;\r
-  Double_t checkFakeSigma = 3;\r
-\r
-  Double_t checkResPtInvHigh = 5;\r
-  Double_t checkResPtInvSigma = 3;\r
-  Double_t checkResPhiHigh = 10;\r
-  Double_t checkResPhiSigma = 3;\r
-  Double_t checkResThetaHigh = 10;\r
-  Double_t checkResThetaSigma = 3;\r
-\r
-  Double_t checkPIDEffLow = 0.5;\r
-  Double_t checkPIDEffSigma = 3;\r
-  Double_t checkResTOFHigh = 500;\r
-  Double_t checkResTOFSigma = 3;\r
-\r
-  Double_t checkPHOSNLow = 5;\r
-  Double_t checkPHOSEnergyLow = 0.3;\r
-  Double_t checkPHOSEnergyHigh = 1.0;\r
-  Double_t checkEMCALNLow = 50;\r
-  Double_t checkEMCALEnergyLow = 0.05;\r
-  Double_t checkEMCALEnergyHigh = 1.0;\r
-\r
-  Double_t checkMUONNLow = 1;\r
-  Double_t checkMUONPtLow = 0.5;\r
-  Double_t checkMUONPtHigh = 10.;\r
-\r
-  Double_t cutPtV0 = 0.3;\r
-  Double_t checkV0EffLow = 0.02;\r
-  Double_t checkV0EffSigma = 3;\r
-  Double_t cutPtCascade = 0.5;\r
-  Double_t checkCascadeEffLow = 0.01;\r
-  Double_t checkCascadeEffSigma = 3;\r
-\r
-  // open run loader and load gAlice, kinematics and header\r
-  AliRunLoader* runLoader = AliRunLoader::Open(gAliceFileName);\r
-  if (!runLoader) {\r
-    Error("CheckESD", "getting run loader from file %s failed", \r
-           gAliceFileName);\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadgAlice();\r
-  gAlice = runLoader->GetAliRun();\r
-  if (!gAlice) {\r
-    Error("CheckESD", "no galice object found");\r
-    return kFALSE;\r
-  }\r
-  runLoader->LoadKinematics();\r
-  runLoader->LoadHeader();\r
-\r
-  // open the ESD file\r
-  TFile* esdFile = TFile::Open(esdFileName);\r
-  if (!esdFile || !esdFile->IsOpen()) {\r
-    Error("CheckESD", "opening ESD file %s failed", esdFileName);\r
-    return kFALSE;\r
-  }\r
-  AliESDEvent * esd = new AliESDEvent;\r
-  TTree* tree = (TTree*) esdFile->Get("esdTree");\r
-  if (!tree) {\r
-    Error("CheckESD", "no ESD tree found");\r
-    return kFALSE;\r
-  }\r
-  esd->ReadFromTree(tree);\r
-\r
-  // efficiency and resolution histograms\r
-  Int_t nBinsPt = 15;\r
-  Float_t minPt = 0.1;\r
-  Float_t maxPt = 3.1;\r
-  TH1F* hGen = CreateHisto("hGen", "generated tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  TH1F* hRec = CreateHisto("hRec", "reconstructed tracks", \r
-                          nBinsPt, minPt, maxPt, "p_{t} [GeV/c]", "N");\r
-  Int_t nGen = 0;\r
-  Int_t nRec = 0;\r
-  Int_t nFake = 0;\r
-\r
-  TH1F* hResPtInv = CreateHisto("hResPtInv", "", 100, -10, 10, \r
-           "(p_{t,rec}^{-1}-p_{t,sim}^{-1}) / p_{t,sim}^{-1} [%]", "N");\r
-  TH1F* hResPhi = CreateHisto("hResPhi", "", 100, -20, 20, \r
-                             "#phi_{rec}-#phi_{sim} [mrad]", "N");\r
-  TH1F* hResTheta = CreateHisto("hResTheta", "", 100, -20, 20, \r
-                               "#theta_{rec}-#theta_{sim} [mrad]", "N");\r
-\r
-  // PID\r
-  Int_t partCode[5] = \r
-    {kElectron, kMuonMinus, kPiPlus, kKPlus, kProton};\r
-  const char* partName[5+1] = \r
-    {"electron", "muon", "pion", "kaon", "proton", "other"};\r
-  Double_t partFrac[5] = \r
-    {0.01, 0.01, 0.85, 0.10, 0.05};\r
-  Int_t identified[5+1][5];\r
-  for (Int_t iGen = 0; iGen < 5+1; iGen++) {\r
-    for (Int_t iRec = 0; iRec < 5; iRec++) {\r
-      identified[iGen][iRec] = 0;\r
-    }\r
-  }\r
-  Int_t nIdentified = 0;\r
-\r
-  // dE/dx and TOF\r
-  TH2F* hDEdxRight = new TH2F("hDEdxRight", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxRight->SetStats(kFALSE);\r
-  hDEdxRight->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxRight->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxRight->SetMarkerStyle(kFullCircle);\r
-  hDEdxRight->SetMarkerSize(0.4);\r
-  TH2F* hDEdxWrong = new TH2F("hDEdxWrong", "", 300, 0, 3, 100, 0, 400);\r
-  hDEdxWrong->SetStats(kFALSE);\r
-  hDEdxWrong->GetXaxis()->SetTitle("p [GeV/c]");\r
-  hDEdxWrong->GetYaxis()->SetTitle("dE/dx_{TPC}");\r
-  hDEdxWrong->SetMarkerStyle(kFullCircle);\r
-  hDEdxWrong->SetMarkerSize(0.4);\r
-  hDEdxWrong->SetMarkerColor(kRed);\r
-  TH1F* hResTOFRight = CreateHisto("hResTOFRight", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  TH1F* hResTOFWrong = CreateHisto("hResTOFWrong", "", 100, -1000, 1000, \r
-                                  "t_{TOF}-t_{track} [ps]", "N");\r
-  hResTOFWrong->SetLineColor(kRed);\r
-\r
-  // calorimeters\r
-  TH1F* hEPHOS = CreateHisto("hEPHOS", "PHOS", 100, 0, 50, "E [GeV]", "N");\r
-  TH1F* hEEMCAL = CreateHisto("hEEMCAL", "EMCAL", 100, 0, 50, "E [GeV]", "N");\r
-\r
-  // muons\r
-  TH1F* hPtMUON = CreateHisto("hPtMUON", "MUON", 100, 0, 20, \r
-                             "p_{t} [GeV/c]", "N");\r
-\r
-  // V0s and cascades\r
-  TH1F* hMassK0 = CreateHisto("hMassK0", "K^{0}", 100, 0.4, 0.6, \r
-                             "M(#pi^{+}#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambda = CreateHisto("hMassLambda", "#Lambda", 100, 1.0, 1.2, \r
-                                 "M(p#pi^{-}) [GeV/c^{2}]", "N");\r
-  TH1F* hMassLambdaBar = CreateHisto("hMassLambdaBar", "#bar{#Lambda}", \r
-                                    100, 1.0, 1.2, \r
-                                    "M(#bar{p}#pi^{+}) [GeV/c^{2}]", "N");\r
-  Int_t nGenV0s = 0;\r
-  Int_t nRecV0s = 0;\r
-  TH1F* hMassXi = CreateHisto("hMassXi", "#Xi", 100, 1.2, 1.5, \r
-                             "M(#Lambda#pi) [GeV/c^{2}]", "N");\r
-  TH1F* hMassOmega = CreateHisto("hMassOmega", "#Omega", 100, 1.5, 1.8, \r
-                                "M(#LambdaK) [GeV/c^{2}]", "N");\r
-  Int_t nGenCascades = 0;\r
-  Int_t nRecCascades = 0;\r
-\r
-  // loop over events\r
-  for (Int_t iEvent = 0; iEvent < runLoader->GetNumberOfEvents(); iEvent++) {\r
-    runLoader->GetEvent(iEvent);\r
-\r
-    // select simulated primary particles, V0s and cascades\r
-    AliStack* stack = gAlice->Stack();\r
-    Int_t nParticles = stack->GetNtrack();\r
-    TArrayF vertex(3);\r
-    runLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex);\r
-    TObjArray selParticles;\r
-    TObjArray selV0s;\r
-    TObjArray selCascades;\r
-    for (Int_t iParticle = 0; iParticle < nParticles; iParticle++) {\r
-      TParticle* particle = stack->Particle(iParticle);\r
-      if (!particle) continue;\r
-      if (particle->Pt() < 0.001) continue;\r
-      if (TMath::Abs(particle->Eta()) > 0.9) continue;\r
-      TVector3 dVertex(particle->Vx() - vertex[0], \r
-                      particle->Vy() - vertex[1],\r
-                      particle->Vz() - vertex[2]);\r
-      if (dVertex.Mag() > 0.0001) continue;\r
-\r
-      switch (TMath::Abs(particle->GetPdgCode())) {\r
-      case kElectron:\r
-      case kMuonMinus:\r
-      case kPiPlus:\r
-      case kKPlus:\r
-      case kProton: {\r
-       if (particle->Pt() > minPt) {\r
-         selParticles.Add(particle);\r
-         nGen++;\r
-         hGen->Fill(particle->Pt());\r
-       }\r
-       break;\r
-      }\r
-      case kK0Short:\r
-      case kLambda0: {\r
-       if (particle->Pt() > cutPtV0) {\r
-         nGenV0s++;\r
-         selV0s.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      case kXiMinus:\r
-      case kOmegaMinus: {\r
-       if (particle->Pt() > cutPtCascade) {\r
-         nGenCascades++;\r
-         selCascades.Add(particle);\r
-       }\r
-       break;\r
-      }\r
-      default: break;\r
-      }\r
-    }\r
-\r
-    // get the event summary data\r
-    tree->GetEvent(iEvent);\r
-    if (!esd) {\r
-      Error("CheckESD", "no ESD object found for event %d", iEvent);\r
-      return kFALSE;\r
-    }\r
-\r
-    // loop over tracks\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfTracks(); iTrack++) {\r
-      AliESDtrack* track = esd->GetTrack(iTrack);\r
-\r
-      // select tracks of selected particles\r
-      Int_t label = TMath::Abs(track->GetLabel());\r
-      if (label > stack->GetNtrack()) continue;     // background\r
-      TParticle* particle = stack->Particle(label);\r
-      if (!selParticles.Contains(particle)) continue;\r
-      if ((track->GetStatus() & AliESDtrack::kITSrefit) == 0) continue;\r
-      if (track->GetConstrainedChi2() > 1e9) continue;\r
-      selParticles.Remove(particle);   // don't count multiple tracks\r
-\r
-      nRec++;\r
-      hRec->Fill(particle->Pt());\r
-      if (track->GetLabel() < 0) nFake++;\r
-\r
-      // resolutions\r
-      hResPtInv->Fill(100. * (TMath::Abs(track->GetSigned1Pt()) - 1./particle->Pt()) * \r
-                     particle->Pt());\r
-      hResPhi->Fill(1000. * (track->Phi() - particle->Phi()));\r
-      hResTheta->Fill(1000. * (track->Theta() - particle->Theta()));\r
-\r
-      // PID\r
-      if ((track->GetStatus() & AliESDtrack::kESDpid) == 0) continue;\r
-      Int_t iGen = 5;\r
-      for (Int_t i = 0; i < 5; i++) {\r
-       if (TMath::Abs(particle->GetPdgCode()) == partCode[i]) iGen = i;\r
-      }\r
-      Double_t probability[5];\r
-      track->GetESDpid(probability);\r
-      Double_t pMax = 0;\r
-      Int_t iRec = 0;\r
-      for (Int_t i = 0; i < 5; i++) {\r
-       probability[i] *= partFrac[i];\r
-       if (probability[i] > pMax) {\r
-         pMax = probability[i];\r
-         iRec = i;\r
-       }\r
-      }\r
-      identified[iGen][iRec]++;\r
-      if (iGen == iRec) nIdentified++;\r
-\r
-      // dE/dx and TOF\r
-      Double_t time[5];\r
-      track->GetIntegratedTimes(time);\r
-      if (iGen == iRec) {\r
-       hDEdxRight->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFRight->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      } else {\r
-       hDEdxWrong->Fill(particle->P(), track->GetTPCsignal());\r
-        if ((track->GetStatus() & AliESDtrack::kTOFpid) != 0) {\r
-         hResTOFWrong->Fill(track->GetTOFsignal() - time[iRec]);\r
-       }\r
-      }\r
-    }\r
-\r
-    // loop over muon tracks\r
-    {\r
-    for (Int_t iTrack = 0; iTrack < esd->GetNumberOfMuonTracks(); iTrack++) {\r
-      AliESDMuonTrack* muonTrack = esd->GetMuonTrack(iTrack);\r
-      Double_t ptInv = TMath::Abs(muonTrack->GetInverseBendingMomentum());\r
-      if (ptInv > 0.001) {\r
-       hPtMUON->Fill(1./ptInv);\r
-      }\r
-    }\r
-    }\r
-\r
-    // loop over V0s\r
-    for (Int_t iV0 = 0; iV0 < esd->GetNumberOfV0s(); iV0++) {\r
-      AliESDv0* v0 = esd->GetV0(iV0);\r
-      if (v0->GetOnFlyStatus()) continue;\r
-      v0->ChangeMassHypothesis(kK0Short);\r
-      hMassK0->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0);\r
-      hMassLambda->Fill(v0->GetEffMass());\r
-      v0->ChangeMassHypothesis(kLambda0Bar);\r
-      hMassLambdaBar->Fill(v0->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(v0->GetNindex())->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(v0->GetPindex())->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      TParticle* particle = stack->Particle(negMother);\r
-      if (!selV0s.Contains(particle)) continue;\r
-      selV0s.Remove(particle);\r
-      nRecV0s++;\r
-    }\r
-\r
-    // loop over Cascades\r
-    for (Int_t iCascade = 0; iCascade < esd->GetNumberOfCascades(); \r
-        iCascade++) {\r
-      AliESDcascade* cascade = esd->GetCascade(iCascade);\r
-      Double_t v0q;\r
-      cascade->ChangeMassHypothesis(v0q,kXiMinus);\r
-      hMassXi->Fill(cascade->GetEffMass());\r
-      cascade->ChangeMassHypothesis(v0q,kOmegaMinus);\r
-      hMassOmega->Fill(cascade->GetEffMass());\r
-\r
-      Int_t negLabel = TMath::Abs(esd->GetTrack(cascade->GetNindex())\r
-                                 ->GetLabel());\r
-      if (negLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t negMother = stack->Particle(negLabel)->GetMother(0);\r
-      if (negMother < 0) continue;\r
-      Int_t posLabel = TMath::Abs(esd->GetTrack(cascade->GetPindex())\r
-                                 ->GetLabel());\r
-      if (posLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t posMother = stack->Particle(posLabel)->GetMother(0);\r
-      if (negMother != posMother) continue;\r
-      Int_t v0Mother = stack->Particle(negMother)->GetMother(0);\r
-      if (v0Mother < 0) continue;\r
-      Int_t bacLabel = TMath::Abs(esd->GetTrack(cascade->GetBindex())\r
-                                 ->GetLabel());\r
-      if (bacLabel > stack->GetNtrack()) continue;     // background\r
-      Int_t bacMother = stack->Particle(bacLabel)->GetMother(0);\r
-      if (v0Mother != bacMother) continue;\r
-      TParticle* particle = stack->Particle(v0Mother);\r
-      if (!selCascades.Contains(particle)) continue;\r
-      selCascades.Remove(particle);\r
-      nRecCascades++;\r
-    }\r
-\r
-    // loop over the clusters\r
-    {\r
-      for (Int_t iCluster=0; iCluster<esd->GetNumberOfCaloClusters(); iCluster++) {\r
-       AliESDCaloCluster * clust = esd->GetCaloCluster(iCluster);\r
-       if (clust->IsPHOS()) hEPHOS->Fill(clust->E());\r
-       if (clust->IsEMCAL()) hEEMCAL->Fill(clust->E());\r
-      }\r
-    }\r
-\r
-  }\r
-\r
-  // perform checks\r
-  if (nGen < checkNGenLow) {\r
-    Warning("CheckESD", "low number of generated particles: %d", Int_t(nGen));\r
-  }\r
-\r
-  TH1F* hEff = CreateEffHisto(hGen, hRec);\r
-\r
-  Info("CheckESD", "%d out of %d tracks reconstructed including %d "\r
-        "fake tracks", nRec, nGen, nFake);\r
-  if (nGen > 0) {\r
-    // efficiency\r
-    Double_t eff = nRec*1./nGen;\r
-    Double_t effError = TMath::Sqrt(eff*(1.-eff) / nGen);\r
-    Double_t fake = nFake*1./nGen;\r
-    Double_t fakeError = TMath::Sqrt(fake*(1.-fake) / nGen);\r
-    Info("CheckESD", "eff = (%.1f +- %.1f) %%  fake = (%.1f +- %.1f) %%",\r
-        100.*eff, 100.*effError, 100.*fake, 100.*fakeError);\r
-\r
-    if (eff < checkEffLow - checkEffSigma*effError) {\r
-      Warning("CheckESD", "low efficiency: (%.1f +- %.1f) %%", \r
-             100.*eff, 100.*effError);\r
-    }\r
-    if (fake > checkFakeHigh + checkFakeSigma*fakeError) {\r
-      Warning("CheckESD", "high fake: (%.1f +- %.1f) %%", \r
-             100.*fake, 100.*fakeError);\r
-    }\r
-\r
-