Root6-enabled test
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Oct 2013 17:51:06 +0000 (17:51 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 24 Oct 2013 17:51:06 +0000 (17:51 +0000)
test/gun/Config.C
test/gun/aod.C [new file with mode: 0644]
test/gun/recraw/aod.C [new file with mode: 0644]
test/gun/runtest.sh
test/gun/sim.C

index c37cbcf..4253a14 100644 (file)
@@ -1,50 +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,"Config.C++")
-
-#if !defined(__CINT__) || defined(__MAKECINT__)
-#include <Riostream.h>
-#include <TPDGCode.h>
-#include <TRandom.h>
-#include <TSystem.h>
-#include <TVirtualMC.h>
-#include <TGeant3TGeo.h>
-#include "STEER/AliRunLoader.h"
-#include "STEER/AliRun.h"
-#include "STEER/AliConfig.h"
-#include "PYTHIA6/AliDecayerPythia.h"
-#include "EVGEN/AliGenCocktail.h"
-#include "EVGEN/AliGenHIJINGpara.h"
-#include "EVGEN/AliGenFixed.h"
-#include "EVGEN/AliGenBox.h"
-#include "STEER/AliMagF.h"
-#include "STEER/AliPID.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 "TRD/AliTRDgeometry.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 PprTrigConf_t
 {
@@ -67,17 +21,9 @@ void Config()
     // Theta range given through pseudorapidity limits 22/6/2001
 
     // Set Random Number seed
-  gRandom->SetSeed(123456); // Set 0 to use the currecnt time
+    gRandom->SetSeed(123456); // Set 0 to use the currecnt time
 
-
-   // libraries required by geant321
-#if defined(__CINT__)
-    gSystem->Load("liblhapdf");
-    gSystem->Load("libEGPythia6");
-    gSystem->Load("libpythia6");
-    gSystem->Load("libAliPythia6");
-    gSystem->Load("libgeant321");
-#endif
+    // The libraries required by Geant3 are loaded in sim.C
 
     new     TGeant3TGeo("C++ Interface to Geant3");
 
@@ -106,42 +52,45 @@ void Config()
 
     decayer->SetForceDecay(kAll);
     decayer->Init();
-    gMC->SetExternalDecayer(decayer);
+
+    TVirtualMC * vmc = TVirtualMC::GetMC();
+
+    vmc->SetExternalDecayer(decayer);
     //=======================================================================
     // ************* 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);
+    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); 
 
     // Special generation for Valgrind tests
     // Each detector is fired by few particles selected 
diff --git a/test/gun/aod.C b/test/gun/aod.C
new file mode 100644 (file)
index 0000000..734d4bf
--- /dev/null
@@ -0,0 +1,18 @@
+void aod(){
+
+    gSystem->Load("libTree");
+    gSystem->Load("libGeom");
+    gSystem->Load("libPhysics");
+    gSystem->Load("libVMC");
+    gSystem->Load("libSTEERBase");
+    gSystem->Load("libESD");
+    gSystem->Load("libAOD");
+    
+    gSystem->Load("libANALYSIS");
+    gSystem->Load("libANALYSISalice");
+    gSystem->Load("libCORRFW");
+    gSystem->Load("libPWGHFbase");
+    gSystem->Load("libPWGmuon");
+
+    gROOT->Macro("${ALICE_ROOT}/STEER/CreateAODfromESD.C");
+}
diff --git a/test/gun/recraw/aod.C b/test/gun/recraw/aod.C
new file mode 100644 (file)
index 0000000..4f341c4
--- /dev/null
@@ -0,0 +1,18 @@
+void aod(){
+
+    gSystem->Load("libTree");
+    gSystem->Load("libGeom");
+    gSystem->Load("libPhysics");
+    gSystem->Load("libVMC");
+    gSystem->Load("libSTEERBase");
+    gSystem->Load("libESD");
+    gSystem->Load("libAOD");
+    
+    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 4735a5e..d97cad1 100755 (executable)
@@ -19,10 +19,10 @@ mv syswatch.log simwatch.log
 aliroot -b -q rec.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
-aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C\(\"AliESDs.root\",\"AliAODs.root\",kFALSE\) 2>&1 | tee aod.log
+aliroot -b -q  2>&1 aod.C | tee aod.log
 
index 184b721..e6ca401 100644 (file)
@@ -1,5 +1,12 @@
 void sim(Int_t nev=4) {
 
+  // libraries required by geant321
+  gSystem->Load("liblhapdf");
+  gSystem->Load("libEGPythia6");
+  gSystem->Load("libpythia6");
+  gSystem->Load("libAliPythia6");
+  gSystem->Load("libgeant321");
+
   AliSimulation simulator;
   simulator.SetMakeSDigits("TRD TOF PHOS HMPID EMCAL MUON FMD ZDC PMD T0 VZERO ACORDE");
   simulator.SetMakeDigitsFromHits("ITS TPC");