Root6-enabled version
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Oct 2013 13:26:22 +0000 (13:26 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 25 Oct 2013 13:26:22 +0000 (13:26 +0000)
test/PbPbbench/Config.C
test/PbPbbench/aod.C [new file with mode: 0644]
test/PbPbbench/monsim.C
test/PbPbbench/rec.C
test/PbPbbench/recraw/aod.C [new file with mode: 0644]
test/PbPbbench/recraw/rec.C
test/PbPbbench/runtest.sh
test/PbPbbench/sim.C

index c1031b9..b4a346d 100644 (file)
@@ -1,60 +1,4 @@
-// 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,"ConfigPPR.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TRandom.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include <TPDGCode.h>
-#include <TF1.h>
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "STEER/AliGenerator.h"
-#include "STEER/AliLog.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "EVGEN/AliGenHIJINGpara.h"
-#include "THijing/AliGenHijing.h"
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenSlowNucleons.h"
-#include "EVGEN/AliSlowNucleonModelExp.h"
-#include "EVGEN/AliGenParam.h"
-#include "EVGEN/AliGenMUONlib.h"
-#include "EVGEN/AliGenSTRANGElib.h"
-#include "EVGEN/AliGenMUONCocktail.h"
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenGeVSim.h"
-#include "EVGEN/AliGeVSimParticle.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/AliITSv11.h"
-#include "TPC/AliTPCv2.h"
-#include "TOF/AliTOFv6T0.h"
-#include "HMPID/AliHMPIDv3.h"
-#include "ZDC/AliZDCv4.h"
-#include "TRD/AliTRDv1.h"
-#include "FMD/AliFMDv1.h"
-#include "MUON/AliMUONv1.h"
-#include "PHOS/AliPHOSv1.h"
-#include "PMD/AliPMDv1.h"
-#include "T0/AliT0v1.h"
-#include "EMCAL/AliEMCALv2.h"
-#include "ACORDE/AliACORDEv1.h"
-#include "VZERO/AliVZEROv7.h"
-#endif
+//Configuration of simulation
 
 enum PprRun_t 
 {
@@ -130,7 +74,7 @@ static TString  comment;
 // Functions
 Float_t EtaToTheta(Float_t arg);
 AliGenerator* GeneratorFactory(PprRun_t srun);
-AliGenerator* HijingStandard();
+AliGenHijing* HijingStandard();
 AliGenGeVSim* GeVSimStandard(Float_t, Float_t);
 void ProcessEnvironmentVars();
 
@@ -147,25 +91,14 @@ void Config()
     cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl; 
 
 
-   // libraries required by geant321
-#if defined(__CINT__)
-    gSystem->Load("liblhapdf");
-    gSystem->Load("libEGPythia6");
-    gSystem->Load("libpythia6");
-    gSystem->Load("libAliPythia6");
-    gSystem->Load("libgeant321");
-    
-    if (srun >= kHijing_cent1 && srun <= kHijing_pA) 
-      {
-       gSystem->Load("libhijing");
-       gSystem->Load("libTHijing");
-      }
-#endif
+   // libraries required by geant321 and Pythia: loaded in sim.C
 
     new     TGeant3TGeo("C++ Interface to Geant3");
 
+    TVirtualMC * vmc = TVirtualMC::GetMC();
+
   // Output every 100 tracks
-  ((TGeant3*)gMC)->SetSWIT(4,100);
+  ((TGeant3*)vmc)->SetSWIT(4,100);
 
     AliRunLoader* rl=0x0;
 
@@ -207,7 +140,7 @@ void Config()
       break;
     }
     decayer->Init();
-    gMC->SetExternalDecayer(decayer);
+    vmc->SetExternalDecayer(decayer);
     //
     //
     //=======================================================================
@@ -217,35 +150,35 @@ void Config()
     // --- 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);
+    vmc->SetProcess("DCAY",1);
+    vmc->SetProcess("PAIR",1);
+    vmc->SetProcess("COMP",1);
+    vmc->SetProcess("PHOT",1);
+    vmc->SetProcess("PFIS",0);
+    vmc->SetProcess("DRAY",0);
+    vmc->SetProcess("ANNI",1);
+    vmc->SetProcess("BREM",1);
+    vmc->SetProcess("MUNU",1);
+    vmc->SetProcess("CKOV",1);
+    vmc->SetProcess("HADR",1);
+    vmc->SetProcess("LOSS",2);
+    vmc->SetProcess("MULS",1);
+    vmc->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); 
+    vmc->SetCut("CUTGAM", cut);
+    vmc->SetCut("CUTELE", cut);
+    vmc->SetCut("CUTNEU", cut);
+    vmc->SetCut("CUTHAD", cut);
+    vmc->SetCut("CUTMUO", cut);
+    vmc->SetCut("BCUTE",  cut); 
+    vmc->SetCut("BCUTM",  cut); 
+    vmc->SetCut("DCUTE",  cut); 
+    vmc->SetCut("DCUTM",  cut); 
+    vmc->SetCut("PPCUTM", cut);
+    vmc->SetCut("TOFMAX", tofmax); 
 
     // Generator Configuration
     AliGenerator* gener = GeneratorFactory(srun);
@@ -1435,7 +1368,7 @@ AliGenerator* GeneratorFactory(PprRun_t srun) {
       Int_t particle;
       // Xi
       particle = kXiMinus;
-      AliGenParam *genXi = new AliGenParam(16,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));
+      AliGenParam *genXi = new AliGenParam(16,lib,particle);
       genXi->SetPtRange(0., 12.);
       genXi->SetYRange(-1.1, 1.1);
       genXi->SetForceDecay(kNoDecay);  
@@ -1443,7 +1376,7 @@ AliGenerator* GeneratorFactory(PprRun_t srun) {
       //
       // Omega
       particle = kOmegaMinus;
-      AliGenParam *genOmega = new AliGenParam(10,particle,lib->GetPt(particle),lib->GetY(particle),lib->GetIp(particle));     
+      AliGenParam *genOmega = new AliGenParam(10,lib,particle);
       genOmega->SetPtRange(0, 12.);
       genOmega->SetYRange(-1.1, 1.1);
       genOmega->SetForceDecay(kNoDecay);
@@ -1471,7 +1404,7 @@ AliGenerator* GeneratorFactory(PprRun_t srun) {
   return gGener;
 }
 
-AliGenerator* HijingStandard()
+AliGenHijing* HijingStandard()
 {
   
     AliGenHijing *gener = new AliGenHijing(-1);
diff --git a/test/PbPbbench/aod.C b/test/PbPbbench/aod.C
new file mode 100644 (file)
index 0000000..46f64e4
--- /dev/null
@@ -0,0 +1,10 @@
+void aod(){
+
+    gSystem->Load("libANALYSIS");
+    gSystem->Load("libANALYSISalice");
+    gSystem->Load("libCORRFW");
+    gSystem->Load("libPWGHFbase");
+    gSystem->Load("libPWGmuon");
+
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+}
index 0799a77..f540c13 100644 (file)
@@ -1,4 +1,13 @@
 void monsim(Int_t nev=1){ 
+  gSystem->Load("liblhapdf");
+  gSystem->Load("libEGPythia6");
+  gSystem->Load("libpythia6");
+  gSystem->Load("libAliPythia6");
+  gSystem->Load("libgeant321");
+  
+  gSystem->Load("libhijing");
+  gSystem->Load("libTHijing");
+
   // MonaLisa monitoring
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
index b5e234c..ec374c0 100644 (file)
@@ -15,8 +15,8 @@ void rec() {
   reco.SetRunPlaneEff(kTRUE);
   
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
-    reco.SetQACycles(det, 999) ;
-    reco.SetQAWriteExpert(det) ; 
+    reco.SetQACycles((AliQAv1::DETECTORINDEX_t)det, 999) ;
+    reco.SetQAWriteExpert((AliQAv1::DETECTORINDEX_t)det) ; 
   }
 
   // High multiplicity settings
diff --git a/test/PbPbbench/recraw/aod.C b/test/PbPbbench/recraw/aod.C
new file mode 100644 (file)
index 0000000..4835a68
--- /dev/null
@@ -0,0 +1,10 @@
+void aod(){
+
+    gSystem->Load("libANALYSIS");
+    gSystem->Load("libANALYSISalice");
+    gSystem->Load("libCORRFW");
+    gSystem->Load("libPWGHFbase");
+    gSystem->Load("libPWGmuon");
+
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C(\"AliESDs.root\",\"AliAODs.root\",kFALSE)");
+}
index 426907d..50799fa 100644 (file)
@@ -17,8 +17,8 @@ void rec() {
   reco.SetRunPlaneEff(kTRUE);
   
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
-    reco.SetQACycles(det, 999) ;
-    reco.SetQAWriteExpert(det) ; 
+    reco.SetQACycles((AliQAv1::DETECTORINDEX_t)det, 999) ;
+    reco.SetQAWriteExpert((AliQAv1::DETECTORINDEX_t)det) ; 
   }
 
   reco.SetInput("raw.root");
index 577070a..58673c8 100755 (executable)
@@ -19,13 +19,13 @@ mv syswatch.log simwatch.log
 aliroot -b -q $1rec.C      2>&1 | tee rec.log
 mv syswatch.log recwatch.log
 aliroot -b -q ${ALICE_ROOT}/STEER/CheckESD.C 2>&1 | tee check.log
-aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C 2>&1 | tee aod.log
+aliroot -b -q aod.C 2>&1 | tee aod.log
 
 cd recraw
 ln -s ../raw.root
 aliroot -b -q rec.C      2>&1 | tee rec.log
 mv syswatch.log ../rawwatch.log
-aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C\(\"AliESDs.root\",\"AliAODs.root\",kFALSE\) 2>&1 | tee aod.log
+aliroot -b -q aod.C 2>&1 | tee aod.log
 
 
 
index b366b89..4fe6586 100644 (file)
@@ -1,4 +1,14 @@
 void sim(Int_t nev=1) {
+
+  gSystem->Load("liblhapdf");
+  gSystem->Load("libEGPythia6");
+  gSystem->Load("libpythia6");
+  gSystem->Load("libAliPythia6");
+  gSystem->Load("libgeant321");
+  
+  gSystem->Load("libhijing");
+  gSystem->Load("libTHijing");
+
   AliSimulation simulator;
   if (gSystem->Getenv("EVENT"))
    nev = atoi(gSystem->Getenv("EVENT")) ;   
@@ -13,7 +23,7 @@ void sim(Int_t nev=1) {
   simulator.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
   
   for (Int_t det = 0 ; det < AliQA::kNDET ; det++) {
-    simulator.SetQACycles(det, nev+1) ;
+    simulator.SetQACycles((AliQAv1::DETECTORINDEX_t)det, nev+1) ;
   }
   TStopwatch timer;
   timer.Start();