3 #include "Randomize.hh" 4 #include "G4SystemOfUnits.hh" 9 fSetPositionFromToleranceCmd(0),
35 fToleranceCmd =
new G4UIcmdWith3Vector(cmdPathTol.c_str(), this );
36 fToleranceCmd->SetParameterName(
"ToleranceX",
"ToleranceY",
"ToleranceZ",
true);
41 fToleranceCmd->SetDefaultValue(G4ThreeVector(1.0e-6, 1.0e-6, 1.0e-6));
44 fPositionCmd =
new G4UIcmdWith3Vector(cmdPathPos.c_str(), this );
45 fPositionCmd->SetParameterName(
"PositionX",
"PositionY",
"PositionZ",
true);
46 fPositionCmd->SetDefaultValue(G4ThreeVector(0., 0., 0.));
51 if (aName.find(
"UpstreamRightPin") != std::string::npos)
53 " The elevation (Y) coordinate is not very accurate, however, the horizontal (X) was defined to 20 microns " );
59 std::cerr <<
" LBNESurveyorMessenger::LBNESurveyorMessenger copy constructor invoked... " <<
std::endl;
67 fPositionCmd->SetDefaultValue(G4ThreeVector(1.0e-12, 1.0e-13, 1.0e-15));
72 std::cerr <<
" LBNESurveyorMessenger::LBNESurveyorMessenger operator =... " <<
std::endl;
81 fPositionCmd->SetDefaultValue(G4ThreeVector(1.0e-12, 1.0e-13, 1.0e-15));
88 std::cerr <<
" LBNESurveyorMessenger::~LBNESurveyorMessenger invoked " <<
std::endl;
101 std::cerr <<
" LBNESurveyorMessenger::SetNewValue, Position, And quit ! " <<
std::endl; exit(2);
103 G4UIcmdWithABool *cmdB = reinterpret_cast <G4UIcmdWithABool*> (
cmd);
107 G4UIcmdWith3Vector *cmdB = reinterpret_cast <G4UIcmdWith3Vector*> (
cmd);
111 G4UIcmdWith3Vector *cmdB = reinterpret_cast <G4UIcmdWith3Vector*> (
cmd);
112 std::cerr <<
" About to displace " <<
fPoint->
GetName() <<
" by " << cmdB->GetNew3VectorValue(newValue.c_str()) << std::endl;
114 std::cerr <<
" And quit " <<
std::endl; exit(2);
120 fPositionSetByTolerance(false),
121 fTolerance(1.0e-6, 1.0e-6, 1.0e-6),
122 fPosition(0., 0., 0.)
214 AddPoint(
std::string(
"UpstreamLeftPinTargetCanister"));
215 AddPoint(
std::string(
"UpstreamRightPinTargetCanister"));
216 AddPoint(
std::string(
"DownstreamLeftPinTargetCanister"));
217 AddPoint(
std::string(
"DownstreamRightPinTargetCanister"));
219 AddPoint(
std::string(
"UpstreamLeftPinTargetHeTube"));
220 AddPoint(
std::string(
"UpstreamRightPinTargetHeTube"));
221 AddPoint(
std::string(
"DownstreamLeftPinTargetHeTube"));
222 AddPoint(
std::string(
"DownstreamRightPinTargetHeTube"));
244 fAllMessenger->defineAllCommds();
249 fSurvDir =
new G4UIdirectory(
"/LBNE/Surveyor/");
250 fSurvDir->SetGuidance(
"Implement controlled misalignments ");
367 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
369 cmdT->GetNew3VectorValue(newValues.c_str()));
373 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
375 cmdT->GetNew3VectorValue(newValues.c_str()));
379 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
381 cmdT->GetNew3VectorValue(newValues.c_str()));
385 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
387 cmdT->GetNew3VectorValue(newValues.c_str()));
392 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
394 cmdT->GetNew3VectorValue(newValues.c_str()));
398 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
400 cmdT->GetNew3VectorValue(newValues.c_str()));
404 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
406 cmdT->GetNew3VectorValue(newValues.c_str()));
410 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
412 cmdT->GetNew3VectorValue(newValues.c_str()));
418 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
420 cmdT->GetNew3VectorValue(newValues.c_str()));
424 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
426 cmdT->GetNew3VectorValue(newValues.c_str()));
430 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
432 cmdT->GetNew3VectorValue(newValues.c_str()));
436 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
438 cmdT->GetNew3VectorValue(newValues.c_str()));
444 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
446 cmdT->GetNew3VectorValue(newValues.c_str()));
450 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
452 cmdT->GetNew3VectorValue(newValues.c_str()));
456 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
458 cmdT->GetNew3VectorValue(newValues.c_str()));
462 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
464 cmdT->GetNew3VectorValue(newValues.c_str()));
471 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
473 cmdT->GetNew3VectorValue(newValues.c_str()));
477 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
479 cmdT->GetNew3VectorValue(newValues.c_str()));
483 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
485 cmdT->GetNew3VectorValue(newValues.c_str()));
489 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
491 cmdT->GetNew3VectorValue(newValues.c_str()));
495 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
497 cmdT->GetNew3VectorValue(newValues.c_str()));
501 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
503 cmdT->GetNew3VectorValue(newValues.c_str()));
507 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
509 cmdT->GetNew3VectorValue(newValues.c_str()));
513 G4UIcmdWith3Vector *cmdT =
dynamic_cast<G4UIcmdWith3Vector*
>(
cmd);
515 cmdT->GetNew3VectorValue(newValues.c_str()));
G4UIcmdWith3Vector * fSurvPosUpstreamRightPinTargetHeTube
G4UIcmdWith3Vector * fToleranceCmd
G4UIcmdWith3Vector * fSurvPosDownstreamLeftPinTargetHeTube
G4UIcmdWith3Vector * fSurvPosUpstreamRightDecayPipe
G4UIcmdWith3Vector * fSurvPosDownstreamLeftPinTargetCanister
G4UIcmdWith3Vector * fSurvPosUpstreamLeftBallHorn1
void SetNewValue(G4UIcommand *cmd, G4String val)
G4UIcmdWith3Vector * fSurvPosDownstreamRightBallHorn3
G4UIcmdWith3Vector * fSurvPosUpstreamLeftBallHorn3
void SetNewValue(G4UIcommand *, G4String)
void SetPosition(const G4ThreeVector &pos)
G4UIcmdWith3Vector * fSurvPosUpstreamRightBallHorn1
G4UIcmdWith3Vector * fSurvPosDownstreamRightBallHorn1
G4UIcmdWith3Vector * fSurvPosDownstreamLeftDecayPipe
G4UIcmdWith3Vector * fSurvPosUpstreamRightPinTargetCanister
const std::string & GetName() const
G4UIcmdWith3Vector * fSurvPosUpstreamLeftDecayPipe
~LBNEAllSurveyorMessenger()
static LBNESurveyor * Instance()
G4UIcmdWith3Vector * fSurvPosUpstreamLeftPinTargetHeTube
G4UIcmdWith3Vector * fSurvPosDownstreamRightPinTargetCanister
G4UIcmdWith3Vector * fSurvPosDownstreamLeftBallHorn1
G4UIcmdWith3Vector * fSurvPosDownstreamLeftBallHorn3
G4UIcmdWith3Vector * fSurvPosUpstreamRightBallHorn3
bool fPositionSetByTolerance
G4UIcmdWith3Vector * fPositionCmd
G4UIcmdWith3Vector * fSurvPosUpstreamRightBallHorn2
G4UIcmdWith3Vector * fSurvPosUpstreamLeftBallHorn2
void setPointPosition(const std::string &aName, const G4ThreeVector &position)
LBNEAllSurveyorMessenger()
G4UIcmdWith3Vector * fSurvPosDownstreamRightBallHorn2
LBNESurveyorMessenger & operator=(LBNESurveyorMessenger const &other)
static LBNESurveyor * fInstance
G4UIcmdWith3Vector * fSurvPosDownstreamRightPinTargetHeTube
void SetTolerance(const G4ThreeVector &tolerance)
void SetPositionByTolerance(bool t)
G4UIcmdWith3Vector * fSurvPosUpstreamLeftPinTargetCanister
G4UIcmdWithABool * fSetPositionFromToleranceCmd
G4UIcmdWith3Vector * fSurvPosDownstreamRightDecayPipe
QTextStream & endl(QTextStream &s)
G4UIcmdWith3Vector * fSurvPosDownstreamLeftBallHorn2