FairRoot/PandaRoot
g4Config_Cherenkov.C
Go to the documentation of this file.
1 // Configuration macro for Geant4 VirtualMC
2 void Config()
3 {
27 
28  TG4RunConfiguration* runConfiguration = new TG4RunConfiguration("geomRoot", "QGSP_BERT_EMV+optical","stepLimiter+specialCuts+specialControls");
29 
31  TGeant4* geant4 = new TGeant4("TGeant4", "The Geant4 Monte Carlo", runConfiguration);
32  cout << "Geant4 has been created." << endl;
33  geant4->ProcessGeantCommand("/mcVerbose/all 0");
34  geant4->ProcessGeantCommand("/mcVerbose/eventAction 1");
35 
36  // geant4->ProcessGeantCommand("/optics_engine/selectOpProcess Cerenkov");
37  // geant4->ProcessGeantCommand("/optics_engine/setTrackSecondariesFirst false");
38  // geant4->ProcessGeantCommand("/optics_engine/setCerenkovMaxPhotons 5");
39  // geant4->ProcessGeantCommand("/optics_engine/setCerenkovMaxBetaChange 0.1");
40 
42  PndStack *stack = new PndStack(1000);
43  //stack->StoreSecondaries(kFALSE); //default is kTRUE
44  stack->SetMinPoints(2);
45  geant4->SetStack(stack);
46 
47  if(FairRunSim::Instance()->IsExtDecayer()){
48  TVirtualMCDecayer* decayer = TPythia6Decayer::Instance();
49  geant4->SetExternalDecayer(decayer);
50  }
51 
52  geant4->SetMaxNStep(10000); // default is 30000
53 
54  Text_t buffer[50];
55  sprintf(buffer,"/random/setSeeds %i %i ",gRandom->GetSeed(), gRandom->GetSeed());
56  geant4->ProcessGeantCommand(buffer);
57 }
void SetMinPoints(Int_t min)
Definition: PndStack.h:171