LBNERunActionMessenger.cc
Go to the documentation of this file.
1 //----------------------------------------------------------------------
2 // $Id
3 //----------------------------------------------------------------------
4 
6 #include "LBNERunAction.hh"
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"
14 #include "G4ios.hh"
15 #include "globals.hh"
16 #include "Randomize.hh"
17 #include "LBNERunManager.hh"
18 
20  :runAction (RA)
21 {
22 // LBNEData=LBNEDataInput::GetLBNEDataInput();
23 
24  //
25  //LBNE/rndm
26  //
27  RndmDir = new G4UIdirectory("/LBNE/rndm/");
28  RndmDir->SetGuidance("Rndm status control.");
29 
30  readRndmCmd = new G4UIcmdWithAString("/LBNE/rndm/read",this);
31  readRndmCmd->SetGuidance("get rndm status from an external file.");
32  readRndmCmd->SetParameterName("fileName",true);
33  readRndmCmd->SetDefaultValue ("");
34  readRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
35 
36  showRndmCmd = new G4UIcmdWithoutParameter("/LBNE/rndm/show",this);
37  showRndmCmd->SetGuidance("show rndm status.");
38  showRndmCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
39 
40  setRndmSeedCmd = new G4UIcmdWithAnInteger("/LBNE/rndm/setRndmSeed",this);
41  setRndmSeedCmd->SetGuidance("set rndm seed.");
42  setRndmSeedCmd->SetParameterName("rndmSeed",true);
43  setRndmSeedCmd->SetDefaultValue (0);
44  setRndmSeedCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
45  //
46  //LBNE/run
47  //
48  LBNERunDir = new G4UIdirectory("/LBNE/run/");
49  LBNERunDir->SetGuidance("LBNE run management");
50 
51 
52  PhysicsListName = new G4UIcmdWithAString("/LBNE/run/PhysicsList",this);
53  PhysicsListName->SetGuidance("set The physics List (QGSP_BERT, FTFP_BERT, etc ");
54  PhysicsListName->SetParameterName("PhysicsList",true);
55  PhysicsListName->AvailableForStates(G4State_Idle);
56 
57  //Data Card to enable and disable the Tracking plane outputs Amit Bashyal
58 
59  TrackingPlaneHorn1Output = new G4UIcmdWithABool("/LBNE/run/TrackingPlaneHorn1output",this);
60  TrackingPlaneHorn1Output->SetGuidance("set the tracking plane output on and off ");
61  TrackingPlaneHorn1Output->SetParameterName("TrackingPlaneHorn1output",true);
62  TrackingPlaneHorn1Output->SetDefaultValue (false);
63  TrackingPlaneHorn1Output->AvailableForStates(G4State_Idle);
64 
65  TrackingPlaneHorn2Output = new G4UIcmdWithABool("/LBNE/run/TrackingPlaneHorn2output",this);
66  TrackingPlaneHorn2Output->SetGuidance("set the tracking plane output on and off ");
67  TrackingPlaneHorn2Output->SetParameterName("TrackingPlaneHorn2output",true);
68  TrackingPlaneHorn2Output->SetDefaultValue (false);
69  TrackingPlaneHorn2Output->AvailableForStates(G4State_Idle);
70 
71  TrackingPlaneDecayPipeOutput = new G4UIcmdWithABool("/LBNE/run/TrackingPlaneDecayPipeoutput",this);
72  TrackingPlaneDecayPipeOutput->SetGuidance("set the tracking plane output on and off ");
73  TrackingPlaneDecayPipeOutput->SetParameterName("TrackingPlaneDecayPipeoutput",true);
74  TrackingPlaneDecayPipeOutput->SetDefaultValue (false);
75  TrackingPlaneDecayPipeOutput->AvailableForStates(G4State_Idle);
76 
77  ParticlefromTargetOutput = new G4UIcmdWithABool("/LBNE/run/ParticlefromTargetoutput",this);
78  ParticlefromTargetOutput->SetGuidance("set the tracking plane output on and off ");
79  ParticlefromTargetOutput->SetParameterName("ParticlefromTargetoutput",true);
80  ParticlefromTargetOutput->SetDefaultValue (false);
81  ParticlefromTargetOutput->AvailableForStates(G4State_Idle);
82 
83  ParticlefromTargetOutputASCII = new G4UIcmdWithABool("/LBNE/run/ParticlefromTargetoutputASCII",this);
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");
86  ParticlefromTargetOutputASCII->SetGuidance(aGuide.c_str());
87  ParticlefromTargetOutputASCII->SetParameterName("ParticlefromTargetoutputASCII",true);
88  ParticlefromTargetOutputASCII->SetDefaultValue (false);
89  ParticlefromTargetOutputASCII->AvailableForStates(G4State_Idle);
90 
91  SetSelectionByImportanceWeight = new G4UIcmdWithABool("/LBNE/run/SetSelectionByImportanceWeight",this);
92  SetSelectionByImportanceWeight->SetGuidance("Turn off the pion selection by importance weight (driven solely by pion energy \n");
93  SetSelectionByImportanceWeight->SetParameterName("SetSelectionByImportanceWeight",true);
94  SetSelectionByImportanceWeight->SetDefaultValue (true); // G4numi legacy code , so, to keep tradition, set on.
95  SetSelectionByImportanceWeight->AvailableForStates(G4State_Idle);
96 
97  SimulationName = new G4UIcmdWithAString("/LBNE/run/Simulation",this);
98  SimulationName->SetGuidance("set external (fluka/mars) ntuple file name");
99  SimulationName->SetParameterName("Simulation",true);
100  SimulationName->AvailableForStates(G4State_PreInit,G4State_Idle);
101 
102  InputNtpTreeName = new G4UIcmdWithAString("/LBNE/run/InputNtpTreeName",this);
103  InputNtpTreeName->SetGuidance("Set the name of the ROOT Tree in the Input Ntuple");
104  InputNtpTreeName->SetParameterName("InputNtpTreeName",true);
105  InputNtpTreeName->AvailableForStates(G4State_PreInit,G4State_Idle);
106 
107  InputNtpFileName = new G4UIcmdWithAString("/LBNE/run/InputNtpFileName",this);
108  InputNtpFileName->SetGuidance("set input (fluka/mars) ntuple file name");
109  InputNtpFileName->SetParameterName("extNtupleFileName",true);
110  InputNtpFileName->SetDefaultValue (G4String("none"));
111  InputNtpFileName->AvailableForStates(G4State_PreInit,G4State_Idle);
112 
113  setDetectorPositionsFile = new G4UIcmdWithAString("/LBNE/run/DetectorPositionFileName",this);
114  setDetectorPositionsFile->SetGuidance("User defined Detector Position file name");
115  setDetectorPositionsFile->SetParameterName("DetectorPositionFileName",true);
116  setDetectorPositionsFile->SetDefaultValue (G4String(""));
117  setDetectorPositionsFile->AvailableForStates(G4State_PreInit,G4State_Idle);
118 
119 
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);
123  DebugLevel->SetDefaultValue (RA->GetDebugLevel());
124  DebugLevel->AvailableForStates(G4State_PreInit,G4State_Idle);
125 
126  setNEvents = new G4UIcmdWithAnInteger("/LBNE/run/NEvents",this);
127  setNEvents->SetGuidance("Set the number of Events to process");
128  setNEvents->SetParameterName("NEvents",true);
129  setNEvents->SetDefaultValue (50000);
130  setNEvents->AvailableForStates(G4State_PreInit,G4State_Idle);
131 
132  setRunID = new G4UIcmdWithAnInteger("/LBNE/run/setRunID",this);
133  setRunID->SetGuidance("set run ID.");
134  setRunID->SetParameterName("run ID number",true);
135  setRunID->SetDefaultValue (0);
136  setRunID->AvailableForStates(G4State_PreInit,G4State_Idle);
137 
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.");
140  FlukaNumiTgtShiftCmd->SetParameterName("Size",false);
141  FlukaNumiTgtShiftCmd->SetUnitCategory("Length");
142  FlukaNumiTgtShiftCmd->AvailableForStates(G4State_PreInit,G4State_Idle);
143 
144  KillTrackingThreshold = new G4UIcmdWithADoubleAndUnit("/LBNE/run/KillTrackingThreshold",this);
145  KillTrackingThreshold->SetGuidance("Sets Kill Tracking on or off");
146  KillTrackingThreshold->SetParameterName("KillTrackingThreshold",true);
147  KillTrackingThreshold->SetDefaultValue(0.050*CLHEP::GeV);
148  KillTrackingThreshold->AvailableForStates(G4State_PreInit,G4State_Idle);
149 
150  setStepLimit = new G4UIcmdWithADoubleAndUnit("/LBNE/run/setStepLimit",this);
151  setStepLimit->SetGuidance("Maximum step size in magnetized horns");
152  setStepLimit->SetParameterName("setStepLimit",true);
153  setStepLimit->SetDefaultValue(0.0);
154  setStepLimit->SetRange("setStepLimit>=0.");
155  setStepLimit->SetUnitCategory("Length");
156  setStepLimit->AvailableForStates(G4State_PreInit,G4State_Idle);
157 
158 
159  useNImpWeight = new G4UIcmdWithABool("/LBNE/run/useNImpWeight",this);
160  useNImpWeight->SetGuidance("use importance weighting (true/false)");
161  useNImpWeight->SetParameterName("NImpWeight",true);
162  useNImpWeight->SetDefaultValue (true);
163  useNImpWeight->AvailableForStates(G4State_PreInit,G4State_Idle);
164 
165  useFlukaInput = new G4UIcmdWithABool("/LBNE/run/useFlukaInput",this);
166  useFlukaInput->SetGuidance("use fluka input ntuple");
167  useFlukaInput->SetParameterName("useFlukaInput",true);
168  useFlukaInput->SetDefaultValue (false);
169  useFlukaInput->AvailableForStates(G4State_PreInit,G4State_Idle);
170 
171  useMarsInput = new G4UIcmdWithABool("/LBNE/run/useMarsInput",this);
172  useMarsInput->SetGuidance("use mars input ntuple");
173  useMarsInput->SetParameterName("useMarsInput",true);
174  useMarsInput->SetDefaultValue (false);
175  useMarsInput->AvailableForStates(G4State_PreInit,G4State_Idle);
176 
177  KillTracking=new G4UIcmdWithABool("/LBNE/run/KillTracking",this);
178  KillTracking->SetGuidance("Sets Kill Tracking on or off");
179  KillTracking->SetParameterName("KillTracking",true);
180  KillTracking->SetDefaultValue(true);
181  KillTracking->AvailableForStates(G4State_PreInit,G4State_Idle);
182 
183  //
184  //LBNE/output/
185  //
186  LBNEOutputDir = new G4UIdirectory("/LBNE/output/");
187  LBNEOutputDir->SetGuidance("LBNE output management");
188 
189  setNuNtupleFile = new G4UIcmdWithAString("/LBNE/output/OutputNtpFileName",this);
190  setNuNtupleFile->SetGuidance("set output ntuple file name");
191  setNuNtupleFile->SetParameterName("fileName",true);
192  setNuNtupleFile->SetDefaultValue (G4String(""));
193  setNuNtupleFile->AvailableForStates(G4State_PreInit,G4State_Idle);
194 
195  setASCIIFile = new G4UIcmdWithAString("/LBNE/output/setASCIIFile",this);
196  setASCIIFile->SetGuidance("set ASCII file name");
197  setASCIIFile->SetParameterName("fileName",true);
198  setASCIIFile->SetDefaultValue (G4String(""));
199  setASCIIFile->AvailableForStates(G4State_PreInit,G4State_Idle);
200 
201  CreateOutput = new G4UIcmdWithABool("/LBNE/output/CreateOutput",this);
202  CreateOutput->SetGuidance("Create Output Ntuple (true/false)");
203  CreateOutput->SetParameterName("CreateOutput",true);
204  CreateOutput->SetDefaultValue(false);
205  CreateOutput->AvailableForStates(G4State_PreInit,G4State_Idle);
206 
207  CreateDk2NuOutput = new G4UIcmdWithABool("/LBNE/output/CreateDk2NuOutput",this);
208  CreateDk2NuOutput->SetGuidance("Create Output Ntuple, full Ancestry list based on Dk2nu package (true/false)");
209  CreateDk2NuOutput->SetParameterName("CreateDk2NuOutput",true);
210  CreateDk2NuOutput->SetDefaultValue(false);
211  CreateDk2NuOutput->AvailableForStates(G4State_PreInit,G4State_Idle);
212 
213  setDk2NuNtupleFile = new G4UIcmdWithAString("/LBNE/output/OutputDk2NuFileName",this);
214  setDk2NuNtupleFile->SetGuidance("set output ntuple, Dk2Nu (full ancestry) file name");
215  setDk2NuNtupleFile->SetParameterName("fileNameDk2Nu",true);
216  setDk2NuNtupleFile->SetDefaultValue (G4String(""));
217  setDk2NuNtupleFile->AvailableForStates(G4State_PreInit,G4State_Idle);
218 
219  outputASCIIFile = new G4UIcmdWithABool("/LBNE/output/outputASCIIFile",this);
220  outputASCIIFile->SetGuidance("output ASCII file (true/false)");
221  outputASCIIFile->SetParameterName("outputASCIIFile",true);
222  outputASCIIFile->SetDefaultValue (false);
223  outputASCIIFile->AvailableForStates(G4State_PreInit,G4State_Idle);
224 
225  //----tracking planes
226  CreateTrkPlaneOutput = new G4UIcmdWithABool("/LBNE/output/CreateTrkPlaneOutput",this);
227  CreateTrkPlaneOutput->SetGuidance("Create Tracking Plane Output, stores particles passing through test plane (true/false)");
228  CreateTrkPlaneOutput->SetParameterName("CreateTrkPlaneOutput",true);
229  CreateTrkPlaneOutput->SetDefaultValue(false);
230  CreateTrkPlaneOutput->AvailableForStates(G4State_PreInit,G4State_Idle);
231 
232  UseRealisticNearDetectorVolume = new G4UIcmdWithABool("/LBNE/output/UseRealisticNearDetectorVolume",this);
233  UseRealisticNearDetectorVolume->SetGuidance("Calculate location weights spread over a near detector volume, rather than just at the center of the detector (default)");
234  UseRealisticNearDetectorVolume->SetParameterName("UseRealisticNearDetectorVolume",true);
235  UseRealisticNearDetectorVolume->SetDefaultValue(false);
236  UseRealisticNearDetectorVolume->AvailableForStates(G4State_PreInit,G4State_Idle);
237 
238 
239  DoComputeEDepInGraphite = new G4UIcmdWithABool("/LBNE/output/DoComputeEDepInGraphite",this);
240  DoComputeEDepInGraphite->SetGuidance("All tracks kept in graphite, compute total energy deposition ");
241  DoComputeEDepInGraphite->SetParameterName("DoComputeEDepInGraphite",true);
242  DoComputeEDepInGraphite->SetDefaultValue(false);
243  DoComputeEDepInGraphite->AvailableForStates(G4State_PreInit,G4State_Idle);
244 
245  DoComputeEDepInArgonGasHorns = new G4UIcmdWithABool("/LBNE/output/DoComputeEDepInArgonGasHorns",this);
246  DoComputeEDepInArgonGasHorns->SetGuidance("All tracks kept in ArgonGasHorns, target to compute total energy deposition in Argon ");
247  DoComputeEDepInArgonGasHorns->SetParameterName("DoComputeEDepInArgonGasHorns",true);
248  DoComputeEDepInArgonGasHorns->SetDefaultValue(false);
249  DoComputeEDepInArgonGasHorns->AvailableForStates(G4State_PreInit,G4State_Idle);
250 
251  //----sculpted absorber alcove tracking plane
252  CreateAlcoveTrackingOutput = new G4UIcmdWithABool("/LBNE/output/CreateAlcoveTrackingOutput",this);
253  CreateAlcoveTrackingOutput->SetGuidance("Create Tracking Plane Output, stores particles passing through sculpted absorber alcove test plane (true/false)");
254  CreateAlcoveTrackingOutput->SetParameterName("CreateAlcoveTrackingOutput",true);
255  CreateAlcoveTrackingOutput->SetDefaultValue(false);
256  CreateAlcoveTrackingOutput->AvailableForStates(G4State_PreInit,G4State_Idle);
257 
258  //
259  // June 2017: MARS dedx comapre
260  DoComputeEDepInHornsMARSCmp = new G4UIcmdWithABool("/LBNE/output/DoComputeEDepInHornsMARSCmp",this);
261  DoComputeEDepInHornsMARSCmp->SetGuidance("Tally energy deposition in Horns, to compare with MARS ");
262  DoComputeEDepInHornsMARSCmp->SetParameterName("DoComputeEDepInHornsMARSCmp",true);
263  DoComputeEDepInHornsMARSCmp->SetDefaultValue(false);
264  DoComputeEDepInHornsMARSCmp->AvailableForStates(G4State_PreInit,G4State_Idle);
265 
266 
267 }
268 
270 {
271  delete RndmDir;
272  delete readRndmCmd;
273  delete showRndmCmd;
274  delete setRndmSeedCmd;
275 
276 
277  delete LBNERunDir;
278  delete PhysicsListName;
285 
286  delete SimulationName;
287  delete InputNtpTreeName;
288  delete InputNtpFileName;
289  delete DebugLevel;
290  delete setNEvents;
291  delete setRunID;
292  delete FlukaNumiTgtShiftCmd;
293  delete KillTrackingThreshold;
294  delete setStepLimit;
295  delete useNImpWeight;
296  delete useFlukaInput;
297  delete useMarsInput;
298  delete KillTracking;
299 
300 
301  delete LBNEOutputDir;
302  delete setNuNtupleFile;
303  delete setDk2NuNtupleFile;
304  delete setASCIIFile;
305  delete CreateOutput;
306  delete CreateDk2NuOutput;
307  delete outputASCIIFile;
309  delete CreateTrkPlaneOutput;
315 
316 }
317 
318 void LBNERunActionMessenger::SetNewValue(G4UIcommand* command,G4String newValues)
319 {
320 
321 // LBNEDataInput *LBNEData = LBNEDataInput::GetLBNEDataInput();
322 
323  LBNERunManager* runManager = dynamic_cast<LBNERunManager *>(G4RunManager::GetRunManager());
324 
325  //
326  //LBNE/rndm
327  //
328  if (command == readRndmCmd)
329  {
330  G4cout << "\n---> rndm status restored from file: " << newValues << G4endl;
331  G4String rndmFile="rndm/";
332  rndmFile.append(newValues);
333  CLHEP::HepRandom::restoreEngineStatus(rndmFile);
334  }
335 
336  if (command == showRndmCmd)
337  {
338  CLHEP::HepRandom::showEngineStatus();
339  }
340 
341  if (command == setRndmSeedCmd)
342  {
343  CLHEP::HepRandom::setTheSeed(setRndmSeedCmd->GetNewIntValue(newValues));
344  }
345  //
346 
347 
348  //
349  //LBNE/run
350  //
351  if (command == SimulationName)
352  {
353  std::cerr << " Command Simulation Name obsolete, nothing been done " << std::endl;
354 // LBNEData->SetSimulation(newValues);
355  }
356  if (command == PhysicsListName)
357  {
358  std::cerr << " Physics List Name is now " << newValues << std::endl;
359 // std::cerr << " .... And quit nonsense physics list " << std::endl; exit(2);
360  runManager->SetPhysicsListName(newValues);
361  runManager->InitializePhysics();
362  std::cerr << " G4 Physics has been re-initialized .... " << std::endl;
363 
364 // LBNEData->SetSimulation(newValues);
365  }
366  if (command == TrackingPlaneHorn1Output)
367  {
368  runManager->SetCreateTrkPlaneH1Output(TrackingPlaneHorn1Output->GetNewBoolValue(newValues));
369  }
370  if (command == TrackingPlaneHorn2Output)
371  {
372  runManager->SetCreateTrkPlaneH2Output(TrackingPlaneHorn2Output->GetNewBoolValue(newValues));
373  }
374  if (command == TrackingPlaneDecayPipeOutput)
375  {
376  runManager->SetCreateTrkPlaneDPOutput(TrackingPlaneDecayPipeOutput->GetNewBoolValue(newValues));
377  }
378  if (command == ParticlefromTargetOutput)
379  {
380  runManager->SetCreateTargetOutput(ParticlefromTargetOutput->GetNewBoolValue(newValues));
381  }
382  if (command == ParticlefromTargetOutputASCII)
383  {
384  runManager->SetCreateTrackingTargetOutASCII(ParticlefromTargetOutputASCII->GetNewBoolValue(newValues));
385  }
386  if (command == SetSelectionByImportanceWeight) {
387 
388  const LBNEStackingAction *staAct = reinterpret_cast<const LBNEStackingAction *> (runManager->GetUserStackingAction());
389  staAct->SetDoImportanceWeightSelection(SetSelectionByImportanceWeight->GetNewBoolValue(newValues));
390  if (staAct->GetDoImportanceWeightSelection())
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;
393  const LBNETrackingAction *traAct = reinterpret_cast<const LBNETrackingAction *> (runManager->GetUserTrackingAction());
394  traAct->SetDoImportanceWeightSelection(SetSelectionByImportanceWeight->GetNewBoolValue(newValues));
395 
396  }
397  if (command == InputNtpTreeName)
398  {
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());
403 // LBNEData->SetInputNtpTreeName(newValues);
404  }
405  if (command == InputNtpFileName)
406  {
407  runManager->SetNptInputFileName(newValues);
408  }
409 
410  if (command == DebugLevel)
411  {
412  std::cerr << " Command Debug Level obsolete, Use standard Geant4 debug level " << std::endl;
413  }
414  if (command == setNEvents)
415  {
416  runManager->nEvents = setNEvents->GetNewIntValue(newValues);
417  }
418  if (command == setRunID)
419  {
420  runManager->SetRunIDCounter(setRunID->GetNewIntValue(newValues));
421  }
422 
423  if ( command == FlukaNumiTgtShiftCmd )
424  {
425  std::cerr << " Command FlukaNumiTgtShiftCmd obsolete, nothing been done " << std::endl;
426 // LBNEData->SetExtraFlukaNumiTargetZShift(FlukaNumiTgtShiftCmd->GetNewDoubleValue(newValues));
427  }
428  if (command== KillTrackingThreshold)
429  {
430  runManager->GetLBNESteppingManager()->SetKillTrackingThreshold(KillTrackingThreshold->GetNewDoubleValue(newValues));
431  const LBNEStackingAction *act = reinterpret_cast<const LBNEStackingAction *> (runManager->GetUserStackingAction());
432  act->SetStackingKillingThreshold(KillTrackingThreshold->GetNewDoubleValue(newValues));
433  }
434  if (command == setStepLimit)
435  {
436  std::cerr << " Command Step Limit probably obsolete in Geant4, do nothing... " << std::endl;
437 // runManager->GetSteppingManager()->SetStepLimit(setStepLimit->GetNewDoubleValue(newValues));
438  }
439 
440  if (command == useNImpWeight)
441  {
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");
445 // LBNEData->SetNImpWeightOn(useNImpWeight->GetNewBoolValue(newValues));
446  }
447  if (command == useFlukaInput)
448  {
449  runManager->SetUseFlukaInput(useFlukaInput->GetNewBoolValue(newValues));
450  }
451  if (command == useMarsInput)
452  {
453  runManager->SetUseMarsInput(useMarsInput->GetNewBoolValue(newValues));
454  }
455  if (command== KillTracking)
456  {
457  std::cerr << " useKill Tracking not yet implemented... Or obsolete " << std::endl;
458 // LBNEData->SetKillTracking(KillTracking->GetNewBoolValue(newValues));
459  }
460 
461  if (command == setDetectorPositionsFile)
462  {
463  runManager->SetDetectorLocationFileName(newValues);
464  }
465  //
466 
467  //
468  //LBNE/output
469  //
470  if (command == setNuNtupleFile)
471  {
472  runManager->SetOutputNtpFileName(newValues);
473  }
474  if (command == setASCIIFile)
475  {
476  runManager->SetOutputASCIIFileName(newValues);
477  }
478 
479  if (command == CreateOutput)
480  {
481  runManager->SetCreateOutput(CreateOutput->GetNewBoolValue(newValues));
482  }
483  if (command == outputASCIIFile)
484  {
485  runManager->SetCreateASCIIOutput(outputASCIIFile->GetNewBoolValue(newValues));
486  }
487 
488  //
489 
490  if (command == setDk2NuNtupleFile)
491  {
492  runManager->SetOutputDk2NuFileName(newValues);
493  }
494  if (command == CreateDk2NuOutput)
495  {
496  runManager->SetCreateDk2NuOutput(CreateDk2NuOutput->GetNewBoolValue(newValues));
497  }
498 
499  if (command == UseRealisticNearDetectorVolume)
500  {
501  runManager->SetUseRealisticNearDetectorVolume(UseRealisticNearDetectorVolume->GetNewBoolValue(newValues));
502  std::cout<<"Realistic Detector Volume: "<<UseRealisticNearDetectorVolume->GetNewBoolValue(newValues)<<std::endl;
503  }
504 
505  if (command == CreateTrkPlaneOutput)
506  {
507  runManager->SetCreateTrkPlaneOutput(CreateTrkPlaneOutput->GetNewBoolValue(newValues));
508  }
509 
510  if (command == DoComputeEDepInGraphite)
511  {
512  const LBNERunAction *ra = reinterpret_cast<const LBNERunAction *> (runManager->GetUserRunAction());
513  ra->SetDoComputeEDepInGraphite(DoComputeEDepInGraphite->GetNewBoolValue(newValues));
514  }
515  if (command == DoComputeEDepInArgonGasHorns)
516  {
517  const LBNERunAction *ra = reinterpret_cast<const LBNERunAction *> (runManager->GetUserRunAction());
518  ra->SetDoComputeEDepInArgonGas(DoComputeEDepInArgonGasHorns->GetNewBoolValue(newValues));
519  }
520 
521  if (command == CreateAlcoveTrackingOutput)
522  {
523  runManager->SetCreateAlcoveTrackingOutput(CreateAlcoveTrackingOutput->GetNewBoolValue(newValues));
524 
525  }
526  if (command == DoComputeEDepInHornsMARSCmp) {
527  const LBNERunAction *ra = reinterpret_cast<const LBNERunAction *> (runManager->GetUserRunAction());
528  ra->SetDoComputeEDepInHorns(DoComputeEDepInHornsMARSCmp->GetNewBoolValue(newValues));
529  }
530 
531 }
532 
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
std::string string
Definition: nybbler.cc:12
void SetUseRealisticNearDetectorVolume(bool t)
void SetCreateTrkPlaneOutput(bool t)
void SetCreateAlcoveTrackingOutput(bool t)
int command
G4UIcmdWithAString * setDk2NuNtupleFile
void SetOutputNtpFileName(G4String &aName)
G4UIcmdWithAString * PhysicsListName
G4UIcmdWithAnInteger * setRndmSeedCmd
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:45
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
void SetPhysicsListName(G4String &t)
LBNESteppingAction * GetLBNESteppingManager()
G4UIcmdWithABool * ParticlefromTargetOutput
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