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

index 7b520d4..7888cd6 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 
 {
@@ -145,19 +89,15 @@ 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");
-#endif
+   // libraries required by geant321 and Pythia: loaded in sim.C
 
     new     TGeant3TGeo("C++ Interface to Geant3");
 
   // Output every 100 tracks
-  ((TGeant3*)gMC)->SetSWIT(4,100);
+
+    TVirtualMC * vmc = TVirtualMC::GetMC();
+
+  ((TGeant3*)vmc)->SetSWIT(4,100);
 
     AliRunLoader* rl=0x0;
 
@@ -199,7 +139,7 @@ void Config()
       break;
     }
     decayer->Init();
-    gMC->SetExternalDecayer(decayer);
+    vmc->SetExternalDecayer(decayer);
     //
     //
     //=======================================================================
@@ -209,35 +149,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);
@@ -1427,7 +1367,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);        
@@ -1435,7 +1375,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);
diff --git a/test/ppbench/aod.C b/test/ppbench/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 fcc88ff..4cf4348 100644 (file)
@@ -1,4 +1,10 @@
 void monsim(Int_t nev=20){ 
+  // Geant3 and Pythia
+  gSystem->Load("liblhapdf");
+  gSystem->Load("libEGPythia6");
+  gSystem->Load("libpythia6");
+  gSystem->Load("libAliPythia6");
+  gSystem->Load("libgeant321");
   // MonaLisa monitoring
   gSystem->Load("libNet.so");
   gSystem->Load("libMonaLisa.so");
index 93e9df6..bf8446d 100644 (file)
@@ -14,8 +14,8 @@ void rec() {
   reco.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
   
   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) ; 
   }
   
   TStopwatch timer;
diff --git a/test/ppbench/recraw/aod.C b/test/ppbench/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 c8c28c8..285ef55 100644 (file)
@@ -20,8 +20,8 @@ void rec() {
   reco.SetQARefDefaultStorage("local://$ALICE_ROOT/QAref") ;
   
   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) ; 
   }
 
   TStopwatch timer;
index 5982d2a..41ff65b 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 c88e6d9..baf8eeb 100644 (file)
@@ -1,4 +1,13 @@
 void sim(Int_t nev=20) {
+
+  gSystem->Load("liblhapdf");
+  gSystem->Load("libEGPythia6");
+  gSystem->Load("libpythia6");
+  gSystem->Load("libAliPythia6");
+  gSystem->Load("libhijing");
+  gSystem->Load("libTHijing");
+  gSystem->Load("libgeant321");
+
   if (gSystem->Getenv("EVENT"))
    nev = atoi(gSystem->Getenv("EVENT")) ;   
   
@@ -16,7 +25,7 @@ void sim(Int_t nev=20) {
   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;