7 #include "G4UIdirectory.hh" 8 #include "G4UIcmdWithAnInteger.hh" 9 #include "G4UIcmdWithADoubleAndUnit.hh" 10 #include "G4UIcmdWithADouble.hh" 11 #include "G4UIcmdWithAString.hh" 12 #include "G4UIcmdWithABool.hh" 13 #include "G4UIcmdWithoutParameter.hh" 16 #include "Randomize.hh" 27 RndmDir =
new G4UIdirectory(
"/LBNE/rndm/");
28 RndmDir->SetGuidance(
"Rndm status control.");
30 readRndmCmd =
new G4UIcmdWithAString(
"/LBNE/rndm/read",
this);
31 readRndmCmd->SetGuidance(
"get rndm status from an external file.");
34 readRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
36 showRndmCmd =
new G4UIcmdWithoutParameter(
"/LBNE/rndm/show",
this);
38 showRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
40 setRndmSeedCmd =
new G4UIcmdWithAnInteger(
"/LBNE/rndm/setRndmSeed",
this);
49 LBNERunDir->SetGuidance(
"LBNE run management");
53 PhysicsListName->SetGuidance(
"set The physics List (QGSP_BERT, FTFP_BERT, etc ");
84 std::string aGuide(
"Turn on the tracking cylinder surrounding the target. Done in Stepping Action \n");
85 aGuide +=
std::string(
" with G4 Stepper going from TargetUsptreamSimpleCylinder to TargetNoSplitHelium \n");
97 SimulationName =
new G4UIcmdWithAString(
"/LBNE/run/Simulation",
this);
98 SimulationName->SetGuidance(
"set external (fluka/mars) ntuple file name");
102 InputNtpTreeName =
new G4UIcmdWithAString(
"/LBNE/run/InputNtpTreeName",
this);
103 InputNtpTreeName->SetGuidance(
"Set the name of the ROOT Tree in the Input Ntuple");
107 InputNtpFileName =
new G4UIcmdWithAString(
"/LBNE/run/InputNtpFileName",
this);
120 DebugLevel =
new G4UIcmdWithAnInteger(
"/LBNE/run/DebugLevel",
this);
121 DebugLevel->SetGuidance(
"Output some debugging info. Level sets the importance of the information printed.");
122 DebugLevel->SetParameterName(
"DebugLevel",
true);
124 DebugLevel->AvailableForStates(G4State_PreInit,G4State_Idle);
126 setNEvents =
new G4UIcmdWithAnInteger(
"/LBNE/run/NEvents",
this);
127 setNEvents->SetGuidance(
"Set the number of Events to process");
130 setNEvents->AvailableForStates(G4State_PreInit,G4State_Idle);
132 setRunID =
new G4UIcmdWithAnInteger(
"/LBNE/run/setRunID",
this);
133 setRunID->SetGuidance(
"set run ID.");
134 setRunID->SetParameterName(
"run ID number",
true);
136 setRunID->AvailableForStates(G4State_PreInit,G4State_Idle);
138 FlukaNumiTgtShiftCmd =
new G4UIcmdWithADoubleAndUnit(
"/LBNE/run/AddExtraFlukaNumiTargetZShift",
this);
139 FlukaNumiTgtShiftCmd->SetGuidance(
"ONLY effects FLUKA05 Numi files. Add an extra shift in z to Fluka05 Numi Target files.");
150 setStepLimit =
new G4UIcmdWithADoubleAndUnit(
"/LBNE/run/setStepLimit",
this);
151 setStepLimit->SetGuidance(
"Maximum step size in magnetized horns");
156 setStepLimit->AvailableForStates(G4State_PreInit,G4State_Idle);
159 useNImpWeight =
new G4UIcmdWithABool(
"/LBNE/run/useNImpWeight",
this);
160 useNImpWeight->SetGuidance(
"use importance weighting (true/false)");
163 useNImpWeight->AvailableForStates(G4State_PreInit,G4State_Idle);
165 useFlukaInput =
new G4UIcmdWithABool(
"/LBNE/run/useFlukaInput",
this);
169 useFlukaInput->AvailableForStates(G4State_PreInit,G4State_Idle);
171 useMarsInput =
new G4UIcmdWithABool(
"/LBNE/run/useMarsInput",
this);
175 useMarsInput->AvailableForStates(G4State_PreInit,G4State_Idle);
177 KillTracking=
new G4UIcmdWithABool(
"/LBNE/run/KillTracking",
this);
178 KillTracking->SetGuidance(
"Sets Kill Tracking on or off");
181 KillTracking->AvailableForStates(G4State_PreInit,G4State_Idle);
189 setNuNtupleFile =
new G4UIcmdWithAString(
"/LBNE/output/OutputNtpFileName",
this);
195 setASCIIFile =
new G4UIcmdWithAString(
"/LBNE/output/setASCIIFile",
this);
199 setASCIIFile->AvailableForStates(G4State_PreInit,G4State_Idle);
201 CreateOutput =
new G4UIcmdWithABool(
"/LBNE/output/CreateOutput",
this);
202 CreateOutput->SetGuidance(
"Create Output Ntuple (true/false)");
205 CreateOutput->AvailableForStates(G4State_PreInit,G4State_Idle);
208 CreateDk2NuOutput->SetGuidance(
"Create Output Ntuple, full Ancestry list based on Dk2nu package (true/false)");
214 setDk2NuNtupleFile->SetGuidance(
"set output ntuple, Dk2Nu (full ancestry) file name");
219 outputASCIIFile =
new G4UIcmdWithABool(
"/LBNE/output/outputASCIIFile",
this);
227 CreateTrkPlaneOutput->SetGuidance(
"Create Tracking Plane Output, stores particles passing through test plane (true/false)");
233 UseRealisticNearDetectorVolume->SetGuidance(
"Calculate location weights spread over a near detector volume, rather than just at the center of the detector (default)");
253 CreateAlcoveTrackingOutput->SetGuidance(
"Create Tracking Plane Output, stores particles passing through sculpted absorber alcove test plane (true/false)");
330 G4cout <<
"\n---> rndm status restored from file: " << newValues << G4endl;
331 G4String rndmFile=
"rndm/";
332 rndmFile.append(newValues);
333 CLHEP::HepRandom::restoreEngineStatus(rndmFile);
338 CLHEP::HepRandom::showEngineStatus();
343 CLHEP::HepRandom::setTheSeed(
setRndmSeedCmd->GetNewIntValue(newValues));
353 std::cerr <<
" Command Simulation Name obsolete, nothing been done " <<
std::endl;
358 std::cerr <<
" Physics List Name is now " << newValues <<
std::endl;
362 std::cerr <<
" G4 Physics has been re-initialized .... " <<
std::endl;
391 std::cout <<
" Selection following Inportance weight will be applied. Importance weight might be computed " <<
std::endl;
392 else std::cout <<
" Selection following Inportance is turned off, importance weight set to 1 at stacking & tracking time " <<
std::endl;
399 std::ostringstream mStrStr;
400 mStrStr <<
" Input NptTreeName not yet supported, Fatal ";
401 G4String mStr(mStrStr.str());
402 G4Exception(
"LBNERunActionMessenger::SetNewValue",
" ", FatalErrorInArgument, mStr.c_str());
412 std::cerr <<
" Command Debug Level obsolete, Use standard Geant4 debug level " <<
std::endl;
420 runManager->SetRunIDCounter(
setRunID->GetNewIntValue(newValues));
425 std::cerr <<
" Command FlukaNumiTgtShiftCmd obsolete, nothing been done " <<
std::endl;
436 std::cerr <<
" Command Step Limit probably obsolete in Geant4, do nothing... " <<
std::endl;
442 std::cerr <<
" use NImpWeight no longer effective. Please use /LBNE/run/SetSelectionByImportanceWeight " <<
std::endl;
443 G4Exception(
"LBNERunActionMessenger::SetNewValue",
" ", FatalException,
444 " Please use /LBNE/run/SetSelectionByImportanceWeight");
457 std::cerr <<
" useKill Tracking not yet implemented... Or obsolete " <<
std::endl;
void SetKillTrackingThreshold(double t)
G4UIcmdWithADoubleAndUnit * KillTrackingThreshold
G4UIcmdWithABool * useNImpWeight
LBNERunActionMessenger(LBNERunAction *)
G4UIcmdWithABool * SetSelectionByImportanceWeight
G4UIcmdWithAString * setASCIIFile
bool GetDoImportanceWeightSelection() const
G4UIcmdWithAString * SimulationName
void SetOutputASCIIFileName(G4String &aName)
G4UIcmdWithABool * TrackingPlaneHorn2Output
void SetUseRealisticNearDetectorVolume(bool t)
void SetCreateTrkPlaneOutput(bool t)
void SetCreateAlcoveTrackingOutput(bool t)
G4UIcmdWithAString * setDk2NuNtupleFile
void SetOutputNtpFileName(G4String &aName)
G4UIcmdWithAString * PhysicsListName
G4UIcmdWithAnInteger * setRndmSeedCmd
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4UIcmdWithABool * UseRealisticNearDetectorVolume
G4UIcmdWithABool * CreateDk2NuOutput
G4UIcmdWithABool * CreateTrkPlaneOutput
void SetNewValue(G4UIcommand *, G4String)
G4UIcmdWithADoubleAndUnit * FlukaNumiTgtShiftCmd
G4UIcmdWithAnInteger * DebugLevel
G4UIcmdWithAnInteger * setRunID
G4UIcmdWithABool * ParticlefromTargetOutputASCII
G4UIcmdWithABool * useMarsInput
void SetDoComputeEDepInGraphite(bool t) const
bool GetDebugLevel() const
G4UIcmdWithABool * DoComputeEDepInArgonGasHorns
void SetCreateDk2NuOutput(bool t)
G4UIcmdWithAString * setNuNtupleFile
G4UIcmdWithABool * TrackingPlaneDecayPipeOutput
G4UIcmdWithABool * CreateAlcoveTrackingOutput
G4UIcmdWithAString * InputNtpFileName
G4UIcmdWithABool * CreateOutput
void SetUseMarsInput(bool t)
void SetDoImportanceWeightSelection(bool t) const
void SetCreateTrkPlaneDPOutput(bool t)
void SetDoComputeEDepInArgonGas(bool t) const
G4UIcmdWithABool * useFlukaInput
G4UIcmdWithAString * setDetectorPositionsFile
G4UIcmdWithAString * readRndmCmd
~LBNERunActionMessenger()
void SetPhysicsListName(G4String &t)
LBNESteppingAction * GetLBNESteppingManager()
G4UIdirectory * LBNERunDir
G4UIcmdWithABool * ParticlefromTargetOutput
G4UIdirectory * LBNEOutputDir
virtual void InitializePhysics()
G4UIcmdWithADoubleAndUnit * setStepLimit
void SetDoComputeEDepInHorns(bool t) const
G4UIcmdWithABool * KillTracking
void SetDoImportanceWeightSelection(bool t) const
G4UIcmdWithABool * outputASCIIFile
G4UIcmdWithABool * DoComputeEDepInGraphite
G4UIcmdWithABool * DoComputeEDepInHornsMARSCmp
void SetCreateTrkPlaneH1Output(bool t)
void SetOutputDk2NuFileName(G4String &aName)
G4UIcmdWithABool * TrackingPlaneHorn1Output
void SetUseFlukaInput(bool t)
void SetCreateTrackingTargetOutASCII(bool t)
void SetCreateOutput(bool t)
void SetDetectorLocationFileName(G4String &sDetLocName)
void SetStackingKillingThreshold(double v) const
G4UIcmdWithAnInteger * setNEvents
void SetCreateTrkPlaneH2Output(bool t)
void SetNptInputFileName(G4String &aName)
void SetCreateASCIIOutput(bool t)
void SetCreateTargetOutput(bool t)
G4UIcmdWithoutParameter * showRndmCmd
QTextStream & endl(QTextStream &s)
G4UIcmdWithAString * InputNtpTreeName