]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Updating macros in vmctest:
authorivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2012 09:01:39 +0000 (09:01 +0000)
committerivana <ivana@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Mar 2012 09:01:39 +0000 (09:01 +0000)
- Change default physics list to FTFP_BERT_EMV
- Added different setting for optical physics for Geant4 9.5
- Added commented lines for activating saving random engine status
- Adding parameter for start event in genExtFileConfig.C

test/vmctest/gun/g4Config.C
test/vmctest/gun/genExtFileConfig.C
test/vmctest/gun/runtest.sh
test/vmctest/lego/g4Config.C
test/vmctest/ppbench/g4Config.C
test/vmctest/ppbench/genExtFileConfig.C
test/vmctest/ppbench/runtest.sh

index 64e97678c4890adab6406ef383051876a610dda4..b09f00970e35fd5b6ae6600776c39d81d9773592 100644 (file)
@@ -40,16 +40,16 @@ void Config()
   if ( ! gMC ) {
     TG4RunConfiguration* runConfiguration 
       = new TG4RunConfiguration("geomRoot", 
-                                "QGSP_BERT_EMV+optical", 
+                                "FTFP_BERT_EMV+optical", 
                                 "specialCuts+stackPopper+stepLimiter",
                                  true);
 //      = new TG4RunConfiguration("geomRootToGeant4",
-//                                "emStandard+optical", 
+//                                "FTFP_BERT_EMV+optical", 
 //                                "specialCuts+specialControls+stackPopper+stepLimiter",
 //                                 true);
       
     geant4 = new TGeant4("TGeant4", 
-                         "The Geant4 Monte Carlo : QGSP_BERT_EMV+optical", 
+                         "The Geant4 Monte Carlo : FTFP_BERT_EMV+optical", 
                          runConfiguration);
              // Repeat physics selection in the title; to be removed
              // with new geant4_vmc tag (1.13)            
@@ -68,10 +68,29 @@ void Config()
     geant4->ProcessGeantCommand("/mcVerbose/opGeometryManager 1");  
     geant4->ProcessGeantCommand("/mcTracking/loopVerbose 0");     
     geant4->ProcessGeantCommand("/mcPhysics/rangeCuts 0.01 mm"); 
-    geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
-    geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
     geant4->ProcessGeantCommand("/mcTracking/skipNeutrino true");
     geant4->ProcessGeantCommand("/mcDet/setMaxStepInLowDensityMaterials 1 cm");
+    // for Geant4 <= 9.4.p03
+    //geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
+    //geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
+    // for Geant4 >= 9.5
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess Scintillation");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpWLS");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpMieHG");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    
+    // Activate saving random engine status
+    // (the file per event will be re-written with each new event)
+    //gAlice->GetMCApp()->SetSaveRndmStatus(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+
+    // Activate saving random engine status for each event
+    // (a new file will be written for each event)
+    //gAlice->GetMCApp()->SetSaveRndmStatusPerEvent(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+    //geant4->ProcessGeantCommand("/mcEvent/saveRandom true");
 
   // Uncomment this line to get a detail info from each step 
   //geant4->ProcessGeantCommand("/tracking/verbose 1");  
index 8d732e6b9e053896e8145548a2d242d4bfa476a3..f5a56188ff41c6406685b6829d1137452e078ccd 100644 (file)
@@ -1,7 +1,7 @@
 // $Id$
 //
 // AliRoot Configuration for running aliroot with Monte Carlo.
-// ConfigCommon2() includes the common setting for all MCs
+// genExtFileConfig() includes the common setting for all MCs
 // which has to be called after MC is instantiated.
 // Called from MC specific configs (g3Config.C, g4Config.C).
 //
@@ -10,9 +10,9 @@
 
 // Functions
 Float_t EtaToTheta(Float_t arg);
-AliGenerator* GeneratorFactory();
+AliGenerator* GeneratorFactory(Int_t startEvent);
 
-void genExtFileConfig()
+void genExtFileConfig(Int_t startEvent=0)
 {
   cout << "Running genExtFileConfig.C ... " << endl;
 
@@ -78,7 +78,7 @@ void genExtFileConfig()
   //=======================================================================
 
   // External generator configuration
-  AliGenerator* gener = GeneratorFactory();
+  AliGenerator* gener = GeneratorFactory(startEvent);
   gener->SetOrigin(0, 0, 0);    // vertex position
   //gener->SetSigma(0, 0, 5.3);   // Sigma in (X,Y,Z) (cm) on IP position
   //gener->SetCutVertexZ(1.);     // Truncate at 1 sigma
@@ -93,7 +93,7 @@ Float_t EtaToTheta(Float_t arg){
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
 
-AliGenerator* GeneratorFactory() {
+AliGenerator* GeneratorFactory(Int_t startEvent) {
 
   AliGenExtFile *gener = new AliGenExtFile(-1);
   AliGenReaderTreeK * reader = new AliGenReaderTreeK();
@@ -101,6 +101,7 @@ AliGenerator* GeneratorFactory() {
   reader->SetFileName("galice.root");
   reader->AddDir("gen");
   gener->SetReader(reader);
+  gener->SetStartEvent(startEvent);
      
   return gener; 
 }
index 7a66a2358dba14ce0e3410b436797a19066a0106..8a9962470d1331b3830d2b54ef247a8dbd461a2f 100755 (executable)
@@ -3,9 +3,10 @@
 
 # Before running this script, you should run rungen.sh first.
 
-NEVENTS=20
+NEVENTS=5
 G3CONFIG="$ALICE_ROOT/test/vmctest/gun/g3Config.C" 
 G4CONFIG="$ALICE_ROOT/test/vmctest/gun/g4Config.C" 
+
 G3OUTDIR=g3
 G4OUTDIR=g4
 
@@ -28,6 +29,6 @@ if [ "$RUNG4" = "1" ]; then
   aliroot -b -q rec.C      2>&1 | tee rec.log
   rm -fr $G4OUTDIR
   mkdir $G4OUTDIR
-  mv *.root *.log GRP $G4OUTDIR
+  mv *.root *.log *.rndm GRP $G4OUTDIR
   cp g4Config.C $G4OUTDIR
 fi
index e02c5568a71b4d6f5ee08369ee3e74689b4737d4..4d85f61a80d6c954cd8b9b05d19a31c026cb778a 100644 (file)
@@ -40,11 +40,11 @@ void Config(const TString& det)
   if ( ! gMC ) {
     TG4RunConfiguration* runConfiguration 
       = new TG4RunConfiguration("geomRoot", 
-                                "QGSP_BERT_EMV+optical", 
+                                "FTFP_BERT_EMV+optical", 
                                 "specialCuts+stackPopper+stepLimiter",
                                  true);
 //      = new TG4RunConfiguration("geomRootToGeant4",
-//                                "emStandard+optical", 
+//                                "FTFP_BERT_EMV+optical", 
 //                                "specialCuts+specialControls+stackPopper+stepLimiter",
 //                                 true);
       
@@ -68,10 +68,30 @@ void Config(const TString& det)
     geant4->ProcessGeantCommand("/mcVerbose/opGeometryManager 1");  
     geant4->ProcessGeantCommand("/mcTracking/loopVerbose 0");     
     geant4->ProcessGeantCommand("/mcPhysics/rangeCuts 0.01 mm"); 
-    geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
-    geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
     geant4->ProcessGeantCommand("/mcTracking/skipNeutrino true");
     geant4->ProcessGeantCommand("/mcDet/setMaxStepInLowDensityMaterials 1 cm");
+    // for Geant4 <= 9.4.p03
+    //geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
+    //geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
+    // for Geant4 >= 9.5
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess Scintillation");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpWLS");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpMieHG");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    
+    // Activate saving random engine status
+    // (the file per event will be re-written with each new event)
+    //gAlice->GetMCApp()->SetSaveRndmStatus(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+
+    // Activate saving random engine status for each event
+    // (a new file will be written for each event)
+    //gAlice->GetMCApp()->SetSaveRndmStatusPerEvent(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+    //geant4->ProcessGeantCommand("/mcEvent/saveRandom true");
+
 
   // Uncomment this line to get a detail info from each step 
   //geant4->ProcessGeantCommand("/tracking/verbose 1");  
index f6e1219038b1e989611c4b97f2612f7d86a2b1cc..7e2693533d8488702c06171536a43d5ccc13f242 100644 (file)
@@ -40,16 +40,16 @@ void Config()
   if ( ! gMC ) {
     TG4RunConfiguration* runConfiguration 
       = new TG4RunConfiguration("geomRoot", 
-                                "QGSP_BERT_EMV+optical", 
+                                "FTFP_BERT_EMV+optical", 
                                 "specialCuts+stackPopper+stepLimiter",
                                  true);
 //      = new TG4RunConfiguration("geomRootToGeant4",
-//                                "QGSP_BERT_EMV+optical", 
-//                                "specialCuts+stackPopper+stepLimiter",
+//                                "FTFP_BERT_EMV+optical", 
+//                                "specialCuts+specialControls+stackPopper+stepLimiter",
 //                                 true);
 
     geant4 = new TGeant4("TGeant4", 
-                         "The Geant4 Monte Carlo : QGSP_BERT_EMV+optical", 
+                         "The Geant4 Monte Carlo : FTFP_BERT_EMV+optical", 
                          runConfiguration);
              // Repeat physics selection in the title; to be removed
              // with new geant4_vmc tag (1.13)            
@@ -68,13 +68,32 @@ void Config()
     geant4->ProcessGeantCommand("/mcVerbose/opGeometryManager 1");  
     geant4->ProcessGeantCommand("/mcTracking/loopVerbose 1");     
     geant4->ProcessGeantCommand("/mcPhysics/rangeCuts 0.01 mm"); 
-    geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
-    geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
     geant4->ProcessGeantCommand("/mcTracking/skipNeutrino true");
     geant4->ProcessGeantCommand("/mcDet/setMaxStepInLowDensityMaterials 1 cm");
+    // for Geant4 <= 9.4.p03
+    //geant4->ProcessGeantCommand("/mcPhysics/selectOpProcess Scintillation");
+    //geant4->ProcessGeantCommand("/mcPhysics/setOpProcessActivation false");
+    // for Geant4 >= 9.5
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess Scintillation");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpWLS");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    geant4->ProcessGeantCommand("/optics_engine/selectOpProcess OpMieHG");
+    geant4->ProcessGeantCommand("/optics_engine/setOpProcessUse false");
+    
+    // Activate saving random engine status
+    // (the file per event will be re-written with each new event)
+    //gAlice->GetMCApp()->SetSaveRndmStatus(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+
+    // Activate saving random engine status for each event
+    // (a new file will be written for each event)
+    //gAlice->GetMCApp()->SetSaveRndmStatusPerEvent(kTRUE);
+    //geant4->ProcessGeantCommand("/mcRun/saveRandom true");
+    //geant4->ProcessGeantCommand("/mcEvent/saveRandom true");
 
   // Uncomment this line to get a detail info from each step 
-  // geant4->ProcessGeantCommand("/tracking/verbose 1");  
+  //geant4->ProcessGeantCommand("/tracking/verbose 1");  
   
   // More info from the physics list
   // the verbosity level is passed to all contained physics lists and their
@@ -93,9 +112,8 @@ void Config()
   
   // More info about regions construction 
   // and conversion of VMC cuts in cuts in range per regions 
-  //geant4->ProcessGeantCommand("/mcVerbose/regionsManager 2");
-  //geant4->ProcessGeantCommand("/mcRegions/print true");
-
+  // geant4->ProcessGeantCommand("/mcVerbose/regionsManager 2");
+  // geant4->ProcessGeantCommand("/mcRegions/print true");
   
   // Suppress verbose info from tracks which reached maximum number of steps
   // (default value is 30000)  
index 21d9cd0e977b6906532c24fa581297ecbb434f41..f51fbdbddb5900e7912327701bdeb544cae30d0e 100644 (file)
@@ -10,9 +10,9 @@
 
 // Functions
 Float_t EtaToTheta(Float_t arg);
-AliGenerator* GeneratorFactory();
+AliGenerator* GeneratorFactory(Int_t startEvent);
 
-void genExtFileConfig(const TString& srun)
+void genExtFileConfig(const TString& srun, Int_t startEvent=0)
 {
   cout << "Running genExtFileConfig.C ... " << endl;
 
@@ -79,7 +79,7 @@ void genExtFileConfig(const TString& srun)
   //=======================================================================
 
   // External generator configuration
-  AliGenerator* gener = GeneratorFactory();
+  AliGenerator* gener = GeneratorFactory(startEvent);
   gener->SetOrigin(0, 0, 0);    // vertex position
   //gener->SetSigma(0, 0, 5.3);   // Sigma in (X,Y,Z) (cm) on IP position
   //gener->SetCutVertexZ(1.);     // Truncate at 1 sigma
@@ -94,14 +94,15 @@ Float_t EtaToTheta(Float_t arg){
   return (180./TMath::Pi())*2.*atan(exp(-arg));
 }
 
-AliGenerator* GeneratorFactory() {
+AliGenerator* GeneratorFactory(Int_t startEvent) {
 
   AliGenExtFile *gener = new AliGenExtFile(-1);
   AliGenReaderTreeK * reader = new AliGenReaderTreeK();
 
   reader->SetFileName("galice.root");
-  reader->AddDir("$ALICE_ROOT/test/vmctest/ppbench/gen");
+  reader->AddDir("gen");
   gener->SetReader(reader);
+  gener->SetStartEvent(startEvent);
      
   return gener; 
 }
index dc946bc98a532239c90c7ca08f6d58e765f8651f..6c64d247cd8deb99c9c0ab195c498684f4018351 100755 (executable)
@@ -36,6 +36,6 @@ if [ "$RUNG4" = "1" ]; then
   aliroot -b -q ${ALICE_ROOT}/STEER/CreateAODfromESD.C 2>&1 | tee aod.log
   rm -fr $G4OUTDIR
   mkdir $G4OUTDIR
-  mv *.root *.log *.ps GRP $G4OUTDIR
+  mv *.root *.log *.rndm *.ps GRP $G4OUTDIR
   cp g4Config.C $G4OUTDIR
 fi