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)
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");
// $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).
//
// 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;
//=======================================================================
// 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
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("gen");
gener->SetReader(reader);
+ gener->SetStartEvent(startEvent);
return gener;
}
# 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
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
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->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");
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)
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
// 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)
// 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;
//=======================================================================
// 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
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;
}
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