#include "StripTrackerMessenger.hh" #include "StripTrackerConstruction.hh" #include "G4UIdirectory.hh" #include "G4UIcmdWithAString.hh" #include "G4UIcmdWithADoubleAndUnit.hh" #include "G4UIcmdWithoutParameter.hh" #include "G4UIcmdWithABool.hh" #include "G4UIcmdWith3VectorAndUnit.hh" #include "G4UIcmdWithAnInteger.hh" StripTrackerMessenger::StripTrackerMessenger(StripTrackerConstruction * det) :detector(det) { detDir = new G4UIdirectory("/StripTracker/"); detDir->SetGuidance("detector construction commands"); //**************** GLOBAL DET. PARAMETERS **********************************// set_nb_of_stripsCmd = new G4UIcmdWithAnInteger("/StripTracker/n_strips",this); set_nb_of_stripsCmd->SetGuidance("Select no. of strips in each detector plane"); set_nb_of_stripsCmd->SetParameterName("n_strips",true); set_nb_of_stripsCmd->SetDefaultValue(1024.); set_nb_of_stripsCmd->AvailableForStates(G4State_Idle, G4State_PreInit); set_strip_pitchCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/strip_pitch",this); set_strip_pitchCmd->SetGuidance("Select pitch of strips in each detector plane"); set_strip_pitchCmd->SetParameterName("strip_pitch",true); set_strip_pitchCmd->SetDefaultValue(0.0908); set_strip_pitchCmd->SetUnitCategory("Length"); set_strip_pitchCmd->SetDefaultUnit("mm"); set_strip_pitchCmd->AvailableForStates(G4State_Idle, G4State_PreInit); set_strip_lengthCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/strip_length",this); set_strip_lengthCmd->SetGuidance("Select length of strips in each detector plane"); set_strip_lengthCmd->SetParameterName("strip_length",true); set_strip_lengthCmd->SetDefaultValue(96.0); set_strip_lengthCmd->SetUnitCategory("Length"); set_strip_lengthCmd->SetDefaultUnit("mm"); set_strip_lengthCmd->AvailableForStates(G4State_Idle, G4State_PreInit); //**************** FIRST TRACKER MODULE **********************************// //**************** Commands for x1 sensor **********************************// x1_SensorDir = new G4UIdirectory("/StripTracker/x1_Sensor/"); x1_SensorDir->SetGuidance("commands related to the x1 sensor plane"); position_x1_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/x1_Sensor/position", this); position_x1_SensorCmd->SetGuidance("Define the global position of the x1 sensor plane"); position_x1_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_x1_SensorCmd->SetUnitCategory("Length"); position_x1_SensorCmd->SetDefaultUnit("mm"); xShift_x1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x1_Sensor/xShift",this); xShift_x1_SensorCmd->SetGuidance("Define x-shift of x1 sensor plane"); xShift_x1_SensorCmd->SetParameterName("xShift",true); xShift_x1_SensorCmd->SetDefaultValue(0.); xShift_x1_SensorCmd->SetUnitCategory("Length"); xShift_x1_SensorCmd->SetDefaultUnit("mm"); yShift_x1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x1_Sensor/yShift",this); yShift_x1_SensorCmd->SetGuidance("Define y-shift of x1 sensor plane"); yShift_x1_SensorCmd->SetParameterName("yShift",true); yShift_x1_SensorCmd->SetDefaultValue(0.); yShift_x1_SensorCmd->SetUnitCategory("Length"); yShift_x1_SensorCmd->SetDefaultUnit("mm"); theta_x1_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/x1_Sensor/theta", this); theta_x1_SensorCmd->SetGuidance("Select rotation angle of x1 sensor plane around an axis"); theta_x1_SensorCmd->SetParameterName("thetaDUT",true); theta_x1_SensorCmd->SetUnitCategory("Angle"); theta_x1_SensorCmd->SetDefaultUnit("deg"); set_x1_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/x1_Sensor/DUTsetup",this); set_x1_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: x1 Si plane replaced by DUT"); set_x1_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for u1 sensor **********************************// u1_SensorDir = new G4UIdirectory("/StripTracker/u1_Sensor/"); u1_SensorDir->SetGuidance("commands related to the u1 sensor plane"); position_u1_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/u1_Sensor/position", this); position_u1_SensorCmd->SetGuidance("Define the global position of the u1 sensor plane"); position_u1_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_u1_SensorCmd->SetUnitCategory("Length"); position_u1_SensorCmd->SetDefaultUnit("mm"); xShift_u1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u1_Sensor/xShift",this); xShift_u1_SensorCmd->SetGuidance("Define x-shift of u1 sensor plane"); xShift_u1_SensorCmd->SetParameterName("xShift",true); xShift_u1_SensorCmd->SetDefaultValue(0.); xShift_u1_SensorCmd->SetUnitCategory("Length"); xShift_u1_SensorCmd->SetDefaultUnit("mm"); yShift_u1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u1_Sensor/yShift",this); yShift_u1_SensorCmd->SetGuidance("Define y-shift of u1 sensor plane"); yShift_u1_SensorCmd->SetParameterName("yShift",true); yShift_u1_SensorCmd->SetDefaultValue(0.); yShift_u1_SensorCmd->SetUnitCategory("Length"); yShift_u1_SensorCmd->SetDefaultUnit("mm"); theta_u1_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/u1_Sensor/theta", this); theta_u1_SensorCmd->SetGuidance("Select rotation angle of u1 sensor plane around an axis"); theta_u1_SensorCmd->SetParameterName("thetaDUT",true); theta_u1_SensorCmd->SetUnitCategory("Angle"); theta_u1_SensorCmd->SetDefaultUnit("deg"); set_u1_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/u1_Sensor/DUTsetup",this); set_u1_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: u1 Si plane replaced by DUT"); set_u1_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for v1 sensor **********************************// v1_SensorDir = new G4UIdirectory("/StripTracker/v1_Sensor/"); v1_SensorDir->SetGuidance("commands related to the v1 sensor plane"); position_v1_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/v1_Sensor/position", this); position_v1_SensorCmd->SetGuidance("Define the global position of the v1 sensor plane"); position_v1_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_v1_SensorCmd->SetUnitCategory("Length"); position_v1_SensorCmd->SetDefaultUnit("mm") ; xShift_v1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v1_Sensor/xShift",this); xShift_v1_SensorCmd->SetGuidance("Define x-shift of v1 sensor plane"); xShift_v1_SensorCmd->SetParameterName("xShift",true); xShift_v1_SensorCmd->SetDefaultValue(0.); xShift_v1_SensorCmd->SetUnitCategory("Length"); xShift_v1_SensorCmd->SetDefaultUnit("mm"); yShift_v1_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v1_Sensor/yShift",this); yShift_v1_SensorCmd->SetGuidance("Define y-shift of v1 sensor plane"); yShift_v1_SensorCmd->SetParameterName("yShift",true); yShift_v1_SensorCmd->SetDefaultValue(0.); yShift_v1_SensorCmd->SetUnitCategory("Length"); yShift_v1_SensorCmd->SetDefaultUnit("mm"); theta_v1_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/v1_Sensor/theta", this); theta_v1_SensorCmd->SetGuidance("Select rotation angle of v1 sensor plane around an axis"); theta_v1_SensorCmd->SetParameterName("thetaDUT",true); theta_v1_SensorCmd->SetUnitCategory("Angle"); theta_v1_SensorCmd->SetDefaultUnit("deg"); set_v1_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/v1_Sensor/DUTsetup",this); set_v1_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: v1 Si plane replaced by DUT"); set_v1_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** SECOND TRACKER MODULE **********************************// //**************** Commands for x2 sensor **********************************// x2_SensorDir = new G4UIdirectory("/StripTracker/x2_Sensor/"); x2_SensorDir->SetGuidance("commands related to the x2 sensor plane"); position_x2_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/x2_Sensor/position", this); position_x2_SensorCmd->SetGuidance("Define the global position of the x2 sensor plane"); position_x2_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_x2_SensorCmd->SetUnitCategory("Length"); position_x2_SensorCmd->SetDefaultUnit("mm"); xShift_x2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x2_Sensor/xShift",this); xShift_x2_SensorCmd->SetGuidance("Define x-shift of x2 sensor plane"); xShift_x2_SensorCmd->SetParameterName("xShift",true); xShift_x2_SensorCmd->SetDefaultValue(0.); xShift_x2_SensorCmd->SetUnitCategory("Length"); xShift_x2_SensorCmd->SetDefaultUnit("mm"); yShift_x2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x2_Sensor/yShift",this); yShift_x2_SensorCmd->SetGuidance("Define y-shift of x2 sensor plane"); yShift_x2_SensorCmd->SetParameterName("yShift",true); yShift_x2_SensorCmd->SetDefaultValue(0.); yShift_x2_SensorCmd->SetUnitCategory("Length"); yShift_x2_SensorCmd->SetDefaultUnit("mm"); theta_x2_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/x2_Sensor/theta", this); theta_x2_SensorCmd->SetGuidance("Select rotation angle of x2 sensor plane around an axis"); theta_x2_SensorCmd->SetParameterName("thetaDUT",true); theta_x2_SensorCmd->SetUnitCategory("Angle"); theta_x2_SensorCmd->SetDefaultUnit("deg"); set_x2_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/x2_Sensor/DUTsetup",this); set_x2_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: x2 Si plane replaced by DUT"); set_x2_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for u2 sensor **********************************// u2_SensorDir = new G4UIdirectory("/StripTracker/u2_Sensor/"); u2_SensorDir->SetGuidance("commands related to the u2 sensor plane"); position_u2_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/u2_Sensor/position", this); position_u2_SensorCmd->SetGuidance("Define the global position of the u2 sensor plane"); position_u2_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_u2_SensorCmd->SetUnitCategory("Length"); position_u2_SensorCmd->SetDefaultUnit("mm"); xShift_u2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u2_Sensor/xShift",this); xShift_u2_SensorCmd->SetGuidance("Define x-shift of u2 sensor plane"); xShift_u2_SensorCmd->SetParameterName("xShift",true); xShift_u2_SensorCmd->SetDefaultValue(0.); xShift_u2_SensorCmd->SetUnitCategory("Length"); xShift_u2_SensorCmd->SetDefaultUnit("mm"); yShift_u2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u2_Sensor/yShift",this); yShift_u2_SensorCmd->SetGuidance("Define y-shift of u2 sensor plane"); yShift_u2_SensorCmd->SetParameterName("yShift",true); yShift_u2_SensorCmd->SetDefaultValue(0.); yShift_u2_SensorCmd->SetUnitCategory("Length"); yShift_u2_SensorCmd->SetDefaultUnit("mm"); theta_u2_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/u2_Sensor/theta", this); theta_u2_SensorCmd->SetGuidance("Select rotation angle of u2 sensor plane around an axis"); theta_u2_SensorCmd->SetParameterName("thetaDUT",true); theta_u2_SensorCmd->SetUnitCategory("Angle"); theta_u2_SensorCmd->SetDefaultUnit("deg"); set_u2_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/u2_Sensor/DUTsetup",this); set_u2_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: u2 Si plane replaced by DUT"); set_u2_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for v2 sensor **********************************// v2_SensorDir = new G4UIdirectory("/StripTracker/v2_Sensor/"); v2_SensorDir->SetGuidance("commands related to the v2 sensor plane"); position_v2_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/v2_Sensor/position", this); position_v2_SensorCmd->SetGuidance("Define the global position of the v2 sensor plane"); position_v2_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_v2_SensorCmd->SetUnitCategory("Length"); position_v2_SensorCmd->SetDefaultUnit("mm"); xShift_v2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v2_Sensor/xShift",this); xShift_v2_SensorCmd->SetGuidance("Define x-shift of v2 sensor plane"); xShift_v2_SensorCmd->SetParameterName("xShift",true); xShift_v2_SensorCmd->SetDefaultValue(0.); xShift_v2_SensorCmd->SetUnitCategory("Length"); xShift_v2_SensorCmd->SetDefaultUnit("mm"); yShift_v2_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v2_Sensor/yShift",this); yShift_v2_SensorCmd->SetGuidance("Define y-shift of v2 sensor plane"); yShift_v2_SensorCmd->SetParameterName("yShift",true); yShift_v2_SensorCmd->SetDefaultValue(0.); yShift_v2_SensorCmd->SetUnitCategory("Length"); yShift_v2_SensorCmd->SetDefaultUnit("mm"); theta_v2_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/v2_Sensor/theta", this); theta_v2_SensorCmd->SetGuidance("Select rotation angle of v2 sensor plane around an axis"); theta_v2_SensorCmd->SetParameterName("thetaDUT",true); theta_v2_SensorCmd->SetUnitCategory("Angle"); theta_v2_SensorCmd->SetDefaultUnit("deg"); set_v2_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/v2_Sensor/DUTsetup",this); set_v2_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: v2 Si plane replaced by DUT"); set_v2_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** TRUTH DETECTOR 1 **********************************// TP1Dir = new G4UIdirectory("/StripTracker/TP1/"); TP1Dir->SetGuidance("commands related to the TP1"); xShift_TP1Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP1/xShift",this); xShift_TP1Cmd->SetGuidance("Define x-shift of TP1"); xShift_TP1Cmd->SetParameterName("xShift",true); xShift_TP1Cmd->SetDefaultValue(0.); xShift_TP1Cmd->SetUnitCategory("Length"); xShift_TP1Cmd->SetDefaultUnit("mm"); yShift_TP1Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP1/yShift",this); yShift_TP1Cmd->SetGuidance("Define y-shift of TP1"); yShift_TP1Cmd->SetParameterName("yShift",true); yShift_TP1Cmd->SetDefaultValue(0.); yShift_TP1Cmd->SetUnitCategory("Length"); yShift_TP1Cmd->SetDefaultUnit("mm"); theta_TP1Cmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/TP1/theta", this); theta_TP1Cmd->SetGuidance("Select rotation angle of TP1 around an axis"); theta_TP1Cmd->SetParameterName("thetaDUT",true); theta_TP1Cmd->SetUnitCategory("Angle"); theta_TP1Cmd->SetDefaultUnit("deg"); set_TP1DUTsetupCmd = new G4UIcmdWithABool("/StripTracker/TP1/DUTsetup",this); set_TP1DUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: TP1 replaced by DUT"); set_TP1DUTsetupCmd->AvailableForStates(G4State_Idle); //**************** TRUTH DETECTOR 2 **********************************// TP2Dir = new G4UIdirectory("/StripTracker/TP2/"); TP2Dir->SetGuidance("commands related to the TP2"); xShift_TP2Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP2/xShift",this); xShift_TP2Cmd->SetGuidance("Define x-shift of TP2"); xShift_TP2Cmd->SetParameterName("xShift",true); xShift_TP2Cmd->SetDefaultValue(0.); xShift_TP2Cmd->SetUnitCategory("Length"); xShift_TP2Cmd->SetDefaultUnit("mm"); yShift_TP2Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP2/yShift",this); yShift_TP2Cmd->SetGuidance("Define y-shift of TP2"); yShift_TP2Cmd->SetParameterName("yShift",true); yShift_TP2Cmd->SetDefaultValue(0.); yShift_TP2Cmd->SetUnitCategory("Length"); yShift_TP2Cmd->SetDefaultUnit("mm"); theta_TP2Cmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/TP2/theta", this); theta_TP2Cmd->SetGuidance("Select rotation angle of TP2 around an axis"); theta_TP2Cmd->SetParameterName("thetaDUT",true); theta_TP2Cmd->SetUnitCategory("Angle"); theta_TP2Cmd->SetDefaultUnit("deg"); set_TP2DUTsetupCmd = new G4UIcmdWithABool("/StripTracker/TP2/DUTsetup",this); set_TP2DUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: TP2 replaced by DUT"); set_TP2DUTsetupCmd->AvailableForStates(G4State_Idle); //**************** TRUTH DETECTOR 3 **********************************// TP3Dir = new G4UIdirectory("/StripTracker/TP3/"); TP3Dir->SetGuidance("commands related to the TP3"); xShift_TP3Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP3/xShift",this); xShift_TP3Cmd->SetGuidance("Define x-shift of TP3"); xShift_TP3Cmd->SetParameterName("xShift",true); xShift_TP3Cmd->SetDefaultValue(0.); xShift_TP3Cmd->SetUnitCategory("Length"); xShift_TP3Cmd->SetDefaultUnit("mm"); yShift_TP3Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP3/yShift",this); yShift_TP3Cmd->SetGuidance("Define y-shift of TP3"); yShift_TP3Cmd->SetParameterName("yShift",true); yShift_TP3Cmd->SetDefaultValue(0.); yShift_TP3Cmd->SetUnitCategory("Length"); yShift_TP3Cmd->SetDefaultUnit("mm"); theta_TP3Cmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/TP3/theta", this); theta_TP3Cmd->SetGuidance("Select rotation angle of TP3 around an axis"); theta_TP3Cmd->SetParameterName("thetaDUT",true); theta_TP3Cmd->SetUnitCategory("Angle"); theta_TP3Cmd->SetDefaultUnit("deg"); set_TP3DUTsetupCmd = new G4UIcmdWithABool("/StripTracker/TP3/DUTsetup",this); set_TP3DUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: TP3 replaced by DUT"); set_TP3DUTsetupCmd->AvailableForStates(G4State_Idle); //**************** TRUTH DETECTOR 4 **********************************// TP4Dir = new G4UIdirectory("/StripTracker/TP4/"); TP4Dir->SetGuidance("commands related to the TP4"); xShift_TP4Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP4/xShift",this); xShift_TP4Cmd->SetGuidance("Define x-shift of TP4"); xShift_TP4Cmd->SetParameterName("xShift",true); xShift_TP4Cmd->SetDefaultValue(0.); xShift_TP4Cmd->SetUnitCategory("Length"); xShift_TP4Cmd->SetDefaultUnit("mm"); yShift_TP4Cmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/TP4/yShift",this); yShift_TP4Cmd->SetGuidance("Define y-shift of TP4"); yShift_TP4Cmd->SetParameterName("yShift",true); yShift_TP4Cmd->SetDefaultValue(0.); yShift_TP4Cmd->SetUnitCategory("Length"); yShift_TP4Cmd->SetDefaultUnit("mm"); theta_TP4Cmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/TP4/theta", this); theta_TP4Cmd->SetGuidance("Select rotation angle of TP4 around an axis"); theta_TP4Cmd->SetParameterName("thetaDUT",true); theta_TP4Cmd->SetUnitCategory("Angle"); theta_TP4Cmd->SetDefaultUnit("deg"); set_TP4DUTsetupCmd = new G4UIcmdWithABool("/StripTracker/TP4/DUTsetup",this); set_TP4DUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: TP4 replaced by DUT"); set_TP4DUTsetupCmd->AvailableForStates(G4State_Idle); //**************** THIRD TRACKER MODULE **********************************// //**************** Commands for x3 sensor **********************************// x3_SensorDir = new G4UIdirectory("/StripTracker/x3_Sensor/"); x3_SensorDir->SetGuidance("commands related to the x3 sensor plane"); position_x3_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/x3_Sensor/position", this); position_x3_SensorCmd->SetGuidance("Define the global position of the x3 sensor plane"); position_x3_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_x3_SensorCmd->SetUnitCategory("Length"); position_x3_SensorCmd->SetDefaultUnit("mm") ; xShift_x3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x3_Sensor/xShift",this); xShift_x3_SensorCmd->SetGuidance("Define x-shift of x3 sensor plane"); xShift_x3_SensorCmd->SetParameterName("xShift",true); xShift_x3_SensorCmd->SetDefaultValue(0.); xShift_x3_SensorCmd->SetUnitCategory("Length"); xShift_x3_SensorCmd->SetDefaultUnit("mm"); yShift_x3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x3_Sensor/yShift",this); yShift_x3_SensorCmd->SetGuidance("Define y-shift of x3 sensor plane"); yShift_x3_SensorCmd->SetParameterName("yShift",true); yShift_x3_SensorCmd->SetDefaultValue(0.); yShift_x3_SensorCmd->SetUnitCategory("Length"); yShift_x3_SensorCmd->SetDefaultUnit("mm"); theta_x3_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/x3_Sensor/theta", this); theta_x3_SensorCmd->SetGuidance("Select rotation angle of x3 sensor plane around an axis"); theta_x3_SensorCmd->SetParameterName("thetaDUT",true); theta_x3_SensorCmd->SetUnitCategory("Angle"); theta_x3_SensorCmd->SetDefaultUnit("deg"); set_x3_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/x3_Sensor/DUTsetup",this); set_x3_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: x3 Si plane replaced by DUT"); set_x3_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for u3 sensor **********************************// u3_SensorDir = new G4UIdirectory("/StripTracker/u3_Sensor/"); u3_SensorDir->SetGuidance("commands related to the u3 sensor plane"); position_u3_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/u3_Sensor/position", this); position_u3_SensorCmd->SetGuidance("Define the global position of the u3 sensor plane"); position_u3_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_u3_SensorCmd->SetUnitCategory("Length"); position_u3_SensorCmd->SetDefaultUnit("mm"); xShift_u3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u3_Sensor/xShift",this); xShift_u3_SensorCmd->SetGuidance("Define x-shift of u3 sensor plane"); xShift_u3_SensorCmd->SetParameterName("xShift",true); xShift_u3_SensorCmd->SetDefaultValue(0.); xShift_u3_SensorCmd->SetUnitCategory("Length"); xShift_u3_SensorCmd->SetDefaultUnit("mm"); yShift_u3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u3_Sensor/yShift",this); yShift_u3_SensorCmd->SetGuidance("Define y-shift of u3 sensor plane"); yShift_u3_SensorCmd->SetParameterName("yShift",true); yShift_u3_SensorCmd->SetDefaultValue(0.); yShift_u3_SensorCmd->SetUnitCategory("Length"); yShift_u3_SensorCmd->SetDefaultUnit("mm"); theta_u3_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/u3_Sensor/theta", this); theta_u3_SensorCmd->SetGuidance("Select rotation angle of u3 sensor plane around an axis"); theta_u3_SensorCmd->SetParameterName("thetaDUT",true); theta_u3_SensorCmd->SetUnitCategory("Angle"); theta_u3_SensorCmd->SetDefaultUnit("deg"); set_u3_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/u3_Sensor/DUTsetup",this); set_u3_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: u3 Si plane replaced by DUT"); set_u3_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for v3 sensor **********************************// v3_SensorDir = new G4UIdirectory("/StripTracker/v3_Sensor/"); v3_SensorDir->SetGuidance("commands related to the v3 sensor plane"); position_v3_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/v3_Sensor/position", this); position_v3_SensorCmd->SetGuidance("Define the global position of the v3 sensor plane"); position_v3_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_v3_SensorCmd->SetUnitCategory("Length"); position_v3_SensorCmd->SetDefaultUnit("mm"); xShift_v3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v3_Sensor/xShift",this); xShift_v3_SensorCmd->SetGuidance("Define x-shift of v3 sensor plane"); xShift_v3_SensorCmd->SetParameterName("xShift",true); xShift_v3_SensorCmd->SetDefaultValue(0.); xShift_v3_SensorCmd->SetUnitCategory("Length"); xShift_v3_SensorCmd->SetDefaultUnit("mm"); yShift_v3_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v3_Sensor/yShift",this); yShift_v3_SensorCmd->SetGuidance("Define y-shift of v3 sensor plane"); yShift_v3_SensorCmd->SetParameterName("yShift",true); yShift_v3_SensorCmd->SetDefaultValue(0.); yShift_v3_SensorCmd->SetUnitCategory("Length"); yShift_v3_SensorCmd->SetDefaultUnit("mm"); theta_v3_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/v3_Sensor/theta", this); theta_v3_SensorCmd->SetGuidance("Select rotation angle of v3 sensor plane around an axis"); theta_v3_SensorCmd->SetParameterName("thetaDUT",true); theta_v3_SensorCmd->SetUnitCategory("Angle"); theta_v3_SensorCmd->SetDefaultUnit("deg"); set_v3_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/v3_Sensor/DUTsetup",this); set_v3_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: v3 Si plane replaced by DUT"); set_v3_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** FOURTH TRACKER MODULE **********************************// //**************** Commands for x4 sensor **********************************// x4_SensorDir = new G4UIdirectory("/StripTracker/x4_Sensor/"); x4_SensorDir->SetGuidance("commands related to the x4 sensor plane"); position_x4_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/x4_Sensor/position", this); position_x4_SensorCmd->SetGuidance("Define the global position of the x4 sensor plane"); position_x4_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_x4_SensorCmd->SetUnitCategory("Length"); position_x4_SensorCmd->SetDefaultUnit("mm"); xShift_x4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x4_Sensor/xShift",this); xShift_x4_SensorCmd->SetGuidance("Define x-shift of x4 sensor plane"); xShift_x4_SensorCmd->SetParameterName("xShift",true); xShift_x4_SensorCmd->SetDefaultValue(0.); xShift_x4_SensorCmd->SetUnitCategory("Length"); xShift_x4_SensorCmd->SetDefaultUnit("mm"); yShift_x4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/x4_Sensor/yShift",this); yShift_x4_SensorCmd->SetGuidance("Define y-shift of x4 sensor plane"); yShift_x4_SensorCmd->SetParameterName("yShift",true); yShift_x4_SensorCmd->SetDefaultValue(0.); yShift_x4_SensorCmd->SetUnitCategory("Length"); yShift_x4_SensorCmd->SetDefaultUnit("mm"); theta_x4_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/x4_Sensor/theta", this); theta_x4_SensorCmd->SetGuidance("Select rotation angle of x4 sensor plane around an axis"); theta_x4_SensorCmd->SetParameterName("thetaDUT",true); theta_x4_SensorCmd->SetUnitCategory("Angle"); theta_x4_SensorCmd->SetDefaultUnit("deg"); set_x4_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/x4_Sensor/DUTsetup",this); set_x4_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: x4 Si plane replaced by DUT"); set_x4_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for u4 sensor **********************************// u4_SensorDir = new G4UIdirectory("/StripTracker/u4_Sensor/"); u4_SensorDir->SetGuidance("commands related to the u4 sensor plane"); position_u4_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/u4_Sensor/position", this); position_u4_SensorCmd->SetGuidance("Define the global position of the u4 sensor plane"); position_u4_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_u4_SensorCmd->SetUnitCategory("Length"); position_u4_SensorCmd->SetDefaultUnit("mm"); xShift_u4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u4_Sensor/xShift",this); xShift_u4_SensorCmd->SetGuidance("Define x-shift of u4 sensor plane"); xShift_u4_SensorCmd->SetParameterName("xShift",true); xShift_u4_SensorCmd->SetDefaultValue(0.); xShift_u4_SensorCmd->SetUnitCategory("Length"); xShift_u4_SensorCmd->SetDefaultUnit("mm"); yShift_u4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/u4_Sensor/yShift",this); yShift_u4_SensorCmd->SetGuidance("Define y-shift of u4 sensor plane"); yShift_u4_SensorCmd->SetParameterName("yShift",true); yShift_u4_SensorCmd->SetDefaultValue(0.); yShift_u4_SensorCmd->SetUnitCategory("Length"); yShift_u4_SensorCmd->SetDefaultUnit("mm"); theta_u4_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/u4_Sensor/theta", this); theta_u4_SensorCmd->SetGuidance("Select rotation angle of u4 sensor plane around an axis"); theta_u4_SensorCmd->SetParameterName("thetaDUT",true); theta_u4_SensorCmd->SetUnitCategory("Angle"); theta_u4_SensorCmd->SetDefaultUnit("deg"); set_u4_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/u4_Sensor/DUTsetup",this); set_u4_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: u4 Si plane replaced by DUT"); set_u4_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //**************** Commands for v4 sensor **********************************// v4_SensorDir = new G4UIdirectory("/StripTracker/v4_Sensor/"); v4_SensorDir->SetGuidance("commands related to the v4 sensor plane"); position_v4_SensorCmd = new G4UIcmdWith3VectorAndUnit("/StripTracker/v4_Sensor/position", this); position_v4_SensorCmd->SetGuidance("Define the global position of the v4 sensor plane"); position_v4_SensorCmd->SetParameterName("xPos", "yPos", "zPos",true); position_v4_SensorCmd->SetUnitCategory("Length"); position_v4_SensorCmd->SetDefaultUnit("mm"); xShift_v4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v4_Sensor/xShift",this); xShift_v4_SensorCmd->SetGuidance("Define x-shift of v4 sensor plane"); xShift_v4_SensorCmd->SetParameterName("xShift",true); xShift_v4_SensorCmd->SetDefaultValue(0.); xShift_v4_SensorCmd->SetUnitCategory("Length"); xShift_v4_SensorCmd->SetDefaultUnit("mm"); yShift_v4_SensorCmd = new G4UIcmdWithADoubleAndUnit("/StripTracker/v4_Sensor/yShift",this); yShift_v4_SensorCmd->SetGuidance("Define y-shift of v4 sensor plane"); yShift_v4_SensorCmd->SetParameterName("yShift",true); yShift_v4_SensorCmd->SetDefaultValue(0.); yShift_v4_SensorCmd->SetUnitCategory("Length"); yShift_v4_SensorCmd->SetDefaultUnit("mm"); theta_v4_SensorCmd = new G4UIcmdWithADoubleAndUnit ("/StripTracker/v4_Sensor/theta", this); theta_v4_SensorCmd->SetGuidance("Select rotation angle of v4 sensor plane around an axis"); theta_v4_SensorCmd->SetParameterName("thetaDUT",true); theta_v4_SensorCmd->SetUnitCategory("Angle"); theta_v4_SensorCmd->SetDefaultUnit("deg"); set_v4_SensorDUTsetupCmd = new G4UIcmdWithABool("/StripTracker/v4_Sensor/DUTsetup",this); set_v4_SensorDUTsetupCmd->SetGuidance("Select setup. true to have DUT (Device Under Test) setup: v4 Si plane replaced by DUT"); set_v4_SensorDUTsetupCmd->AvailableForStates(G4State_PreInit, G4State_Idle); //************************************************************************// //**************************** GEOMETRY POSITIONING PARAMETERS *******************************// geomDir = new G4UIdirectory("/geom/"); geomDir->SetGuidance("parameters for positioning of all geometry"); set_inter_plane_distCmd = new G4UIcmdWithADoubleAndUnit("/geom/plane_dist",this); set_inter_plane_distCmd->SetGuidance("Define distance between individual detector planes"); set_inter_plane_distCmd->SetParameterName("plane_dist",true); set_inter_plane_distCmd->SetDefaultValue(10.); set_inter_plane_distCmd->SetUnitCategory("Length"); set_inter_plane_distCmd->SetDefaultUnit("mm"); set_inter_module_distCmd = new G4UIcmdWithADoubleAndUnit("/geom/module_dist",this); set_inter_module_distCmd->SetGuidance("Define distance between (x,u,v) detector modules"); set_inter_module_distCmd->SetParameterName("module_dist",true); set_inter_module_distCmd->SetDefaultValue(20.); set_inter_module_distCmd->SetUnitCategory("Length"); set_inter_module_distCmd->SetDefaultUnit("mm"); set_phantom_gapCmd = new G4UIcmdWithADoubleAndUnit("/geom/phantom_gap",this); set_phantom_gapCmd->SetGuidance("Define gap between front and back of tracker into which phantom will fit"); set_phantom_gapCmd->SetParameterName("phantom_gap",true); set_phantom_gapCmd->SetDefaultValue(85.); set_phantom_gapCmd->SetUnitCategory("Length"); set_phantom_gapCmd->SetDefaultUnit("mm"); set_halfPhantomSizeZCmd = new G4UIcmdWithADoubleAndUnit("/geom/halfPhantomSizeZ",this); set_halfPhantomSizeZCmd->SetGuidance("Define phantom radius"); set_halfPhantomSizeZCmd->SetParameterName("halfPhantomSizeZ",true); set_halfPhantomSizeZCmd->SetDefaultValue(37.5); set_halfPhantomSizeZCmd->SetUnitCategory("Length"); set_halfPhantomSizeZCmd->SetDefaultUnit("mm"); set_halfCalorimeterSizeZCmd = new G4UIcmdWithADoubleAndUnit("/geom/halfCalorimeterSizeZ",this); set_halfCalorimeterSizeZCmd->SetGuidance("Define half calorimeter length"); set_halfCalorimeterSizeZCmd->SetParameterName("halfCalorimeterSizeZ",true); set_halfCalorimeterSizeZCmd->SetDefaultValue(125.); set_halfCalorimeterSizeZCmd->SetUnitCategory("Length"); set_halfCalorimeterSizeZCmd->SetDefaultUnit("mm"); //************************************************************************// ConstructCmd = new G4UIcmdWithABool("/StripTracker/Construct",this); ConstructCmd->SetGuidance("force to recompute geometry."); ConstructCmd->SetGuidance("This command MUST be applied before \"beamOn\" "); ConstructCmd->SetGuidance("if you changed geometrical value(s)."); ConstructCmd->SetParameterName("ConstructST", false); ConstructCmd->AvailableForStates(G4State_PreInit, G4State_Idle); } StripTrackerMessenger::~StripTrackerMessenger() { delete set_nb_of_stripsCmd; delete set_strip_pitchCmd; delete set_strip_lengthCmd; delete set_inter_plane_distCmd; delete set_inter_module_distCmd; delete set_phantom_gapCmd; delete set_halfPhantomSizeZCmd; delete set_halfCalorimeterSizeZCmd; delete phantomDir; delete xShift_PhantomCmd; delete yShift_PhantomCmd; delete theta_PhantomCmd; delete position_x1_SensorCmd; delete xShift_x1_SensorCmd; delete yShift_x1_SensorCmd; delete theta_x1_SensorCmd; delete set_x1_SensorDUTsetupCmd; delete x1_SensorDir; delete position_u1_SensorCmd; delete xShift_u1_SensorCmd; delete yShift_u1_SensorCmd; delete theta_u1_SensorCmd; delete set_u1_SensorDUTsetupCmd; delete u1_SensorDir; delete position_v1_SensorCmd; delete xShift_v1_SensorCmd; delete yShift_v1_SensorCmd; delete theta_v1_SensorCmd; delete set_v1_SensorDUTsetupCmd; delete v1_SensorDir; delete position_x2_SensorCmd; delete xShift_x2_SensorCmd; delete yShift_x2_SensorCmd; delete theta_x2_SensorCmd; delete set_x2_SensorDUTsetupCmd; delete x2_SensorDir; delete position_u2_SensorCmd; delete xShift_u2_SensorCmd; delete yShift_u2_SensorCmd; delete theta_u2_SensorCmd; delete set_u2_SensorDUTsetupCmd; delete u2_SensorDir; delete position_v2_SensorCmd; delete xShift_v2_SensorCmd; delete yShift_v2_SensorCmd; delete theta_v2_SensorCmd; delete set_v2_SensorDUTsetupCmd; delete v2_SensorDir; delete xShift_TP1Cmd; delete yShift_TP1Cmd; delete theta_TP1Cmd; delete set_TP1DUTsetupCmd; delete TP1Dir; delete xShift_TP2Cmd; delete yShift_TP2Cmd; delete theta_TP2Cmd; delete set_TP2DUTsetupCmd; delete TP2Dir; delete xShift_TP3Cmd; delete yShift_TP3Cmd; delete theta_TP3Cmd; delete set_TP3DUTsetupCmd; delete TP3Dir; delete xShift_TP4Cmd; delete yShift_TP4Cmd; delete theta_TP4Cmd; delete set_TP4DUTsetupCmd; delete TP4Dir; delete position_x3_SensorCmd; delete xShift_x3_SensorCmd; delete yShift_x3_SensorCmd; delete theta_x3_SensorCmd; delete set_x3_SensorDUTsetupCmd; delete x3_SensorDir; delete position_u3_SensorCmd; delete xShift_u3_SensorCmd; delete yShift_u3_SensorCmd; delete theta_u3_SensorCmd; delete set_u3_SensorDUTsetupCmd; delete u3_SensorDir; delete position_v3_SensorCmd; delete xShift_v3_SensorCmd; delete yShift_v3_SensorCmd; delete theta_v3_SensorCmd; delete set_v3_SensorDUTsetupCmd; delete v3_SensorDir; delete position_x4_SensorCmd; delete xShift_x4_SensorCmd; delete yShift_x4_SensorCmd; delete theta_x4_SensorCmd; delete set_x4_SensorDUTsetupCmd; delete x4_SensorDir; delete position_u4_SensorCmd; delete xShift_u4_SensorCmd; delete yShift_u4_SensorCmd; delete theta_u4_SensorCmd; delete set_u4_SensorDUTsetupCmd; delete u4_SensorDir; delete position_v4_SensorCmd; delete xShift_v4_SensorCmd; delete yShift_v4_SensorCmd; delete theta_v4_SensorCmd; delete set_v4_SensorDUTsetupCmd; delete v4_SensorDir; delete ConstructCmd; delete detDir; } void StripTrackerMessenger::SetNewValue(G4UIcommand* command,G4String newValue) { if ( command == ConstructCmd ) detector->ConstructStripTracker(ConstructCmd->GetNewBoolValue(newValue)); if ( command == set_nb_of_stripsCmd ) {detector->Set_nb_of_strips(set_nb_of_stripsCmd->GetNewIntValue(newValue));} if ( command == set_strip_pitchCmd ) {detector->Set_strip_pitch(set_strip_pitchCmd->GetNewDoubleValue(newValue));} if ( command == set_strip_lengthCmd ) {detector->Set_strip_length(set_strip_lengthCmd->GetNewDoubleValue(newValue));} //********************************* GEOM **************************************// if ( command == set_inter_plane_distCmd ) {detector->Set_inter_plane_dist(set_inter_plane_distCmd->GetNewDoubleValue(newValue));} if ( command == set_inter_module_distCmd ) {detector->Set_inter_module_dist(set_inter_module_distCmd->GetNewDoubleValue(newValue));} if ( command == set_phantom_gapCmd ) {detector->Set_phantom_gap(set_phantom_gapCmd->GetNewDoubleValue(newValue));} // if ( command == set_halfPhantomSizeZCmd ) // {detector->Set_halfPhantomSizeZ(set_halfPhantomSizeZCmd->GetNewDoubleValue(newValue));} // // if ( command == set_halfCalorimeterSizeZCmd ) // {detector->Set_halfCalorimeterSizeZ(set_halfCalorimeterSizeZCmd->GetNewDoubleValue(newValue));} //******************************** PHANTOM *************************************// //********************** FIRST TRACKER MODULE **********************************// //**************** Commands for x1 sensor **********************************// if ( command == position_x1_SensorCmd ) detector->Set_x1_SensorPosition(position_x1_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_x1_SensorCmd ) { G4ThreeVector pos= detector->Get_x1_SensorPosition(); pos.setX( xShift_x1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x1_SensorPosition(pos); } if ( command == yShift_x1_SensorCmd ) { G4ThreeVector pos= detector->Get_x1_SensorPosition(); pos.setY( yShift_x1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x1_SensorPosition(pos); } if ( command == theta_x1_SensorCmd ) detector->Set_x1_SensorAngle(theta_x1_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_x1_SensorDUTsetupCmd ) detector->Set_x1_SensorDUTSetup( set_x1_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for u1 sensor **********************************// if ( command == position_u1_SensorCmd ) detector->Set_u1_SensorPosition(position_u1_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_u1_SensorCmd ) { G4ThreeVector pos= detector->Get_u1_SensorPosition(); pos.setX( xShift_u1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u1_SensorPosition(pos); } if ( command == yShift_u1_SensorCmd ) { G4ThreeVector pos= detector->Get_u1_SensorPosition(); pos.setY( yShift_u1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u1_SensorPosition(pos); } if ( command == theta_u1_SensorCmd ) detector->Set_u1_SensorAngle(theta_u1_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_u1_SensorDUTsetupCmd ) detector->Set_u1_SensorDUTSetup( set_u1_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for v1 sensor **********************************// if ( command == position_v1_SensorCmd ) detector->Set_v1_SensorPosition(position_v1_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_v1_SensorCmd ) { G4ThreeVector pos= detector->Get_v1_SensorPosition(); pos.setX( xShift_v1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v1_SensorPosition(pos); } if ( command == yShift_v1_SensorCmd ) { G4ThreeVector pos= detector->Get_v1_SensorPosition(); pos.setY( yShift_v1_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v1_SensorPosition(pos); } if ( command == theta_v1_SensorCmd ) detector->Set_v1_SensorAngle(theta_v1_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_v1_SensorDUTsetupCmd ) detector->Set_v1_SensorDUTSetup( set_v1_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //********************** SECOND TRACKER MODULE *********************************// //**************** Commands for x2 sensor **********************************// if ( command == position_x2_SensorCmd ) detector->Set_x2_SensorPosition(position_x2_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_x2_SensorCmd ) { G4ThreeVector pos= detector->Get_x2_SensorPosition(); pos.setX( xShift_x2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x2_SensorPosition(pos); } if ( command == yShift_x2_SensorCmd ) { G4ThreeVector pos= detector->Get_x2_SensorPosition(); pos.setY( yShift_x2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x2_SensorPosition(pos); } if ( command == theta_x2_SensorCmd ) detector->Set_x2_SensorAngle(theta_x2_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_x2_SensorDUTsetupCmd ) detector->Set_x2_SensorDUTSetup( set_x2_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for u2 sensor **********************************// if ( command == position_u2_SensorCmd ) detector->Set_u2_SensorPosition(position_u2_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_u2_SensorCmd ) { G4ThreeVector pos= detector->Get_u2_SensorPosition(); pos.setX( xShift_u2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u2_SensorPosition(pos); } if ( command == yShift_u2_SensorCmd ) { G4ThreeVector pos= detector->Get_u2_SensorPosition(); pos.setY( yShift_u2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u2_SensorPosition(pos); } if ( command == theta_u2_SensorCmd ) detector->Set_u2_SensorAngle(theta_u2_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_u2_SensorDUTsetupCmd ) detector->Set_u2_SensorDUTSetup( set_u2_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for v2 sensor **********************************// if ( command == position_v2_SensorCmd ) detector->Set_v2_SensorPosition(position_v2_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_v2_SensorCmd ) { G4ThreeVector pos= detector->Get_v2_SensorPosition(); pos.setX( xShift_v2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v2_SensorPosition(pos); } if ( command == yShift_v2_SensorCmd ) { G4ThreeVector pos= detector->Get_v2_SensorPosition(); pos.setY( yShift_v2_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v2_SensorPosition(pos); } if ( command == theta_v2_SensorCmd ) detector->Set_v2_SensorAngle(theta_v2_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_v2_SensorDUTsetupCmd ) detector->Set_v2_SensorDUTSetup( set_v2_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //******************** TRUTH DETECTOR 1 *********************************// /* if ( command == xShift_TP1Cmd ) { G4ThreeVector pos= detector->Get_TP1_Position(); pos.setX( xShift_TP1Cmd->GetNewDoubleValue(newValue) ); detector->Set_TP1_Position(pos); } if ( command == yShift_TP1Cmd ) { G4ThreeVector pos= detector->Get_TP1_Position(); pos.setY( yShift_TP1Cmd->GetNewDoubleValue(newValue) ); detector->Set_TP1_Position(pos); } if ( command == theta_TP1Cmd ) detector->Set_TP1_Angle(theta_TP1Cmd->GetNewDoubleValue(newValue)); if ( command == set_TP1DUTsetupCmd ) detector->Set_TP1_DUTSetup( set_TP1DUTsetupCmd->GetNewBoolValue(newValue) );*/ //******************** TRUTH DETECTOR 2 *********************************// // if ( command == xShift_TP2Cmd ) { // G4ThreeVector pos= detector->Get_TP2_Position(); // pos.setX( xShift_TP2Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP2_Position(pos); // } // // if ( command == yShift_TP2Cmd ) { // G4ThreeVector pos= detector->Get_TP2_Position(); // pos.setY( yShift_TP2Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP2_Position(pos); // } // // if ( command == theta_TP2Cmd ) // detector->Set_TP2_Angle(theta_TP2Cmd->GetNewDoubleValue(newValue)); // // if ( command == set_TP2DUTsetupCmd ) // detector->Set_TP2_DUTSetup( set_TP2DUTsetupCmd->GetNewBoolValue(newValue) ); //******************** TRUTH DETECTOR 3 *********************************// // if ( command == xShift_TP3Cmd ) { // G4ThreeVector pos= detector->Get_TP3_Position(); // pos.setX( xShift_TP3Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP3_Position(pos); // } // // if ( command == yShift_TP3Cmd ) { // G4ThreeVector pos= detector->Get_TP3_Position(); // pos.setY( yShift_TP3Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP3_Position(pos); // } // // if ( command == theta_TP3Cmd ) // detector->Set_TP3_Angle(theta_TP3Cmd->GetNewDoubleValue(newValue)); // // if ( command == set_TP3DUTsetupCmd ) // detector->Set_TP3_DUTSetup( set_TP3DUTsetupCmd->GetNewBoolValue(newValue) ); //******************** TRUTH DETECTOR 4 *********************************// // if ( command == xShift_TP4Cmd ) { // G4ThreeVector pos= detector->Get_TP4_Position(); // pos.setX( xShift_TP4Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP4_Position(pos); // } // // if ( command == yShift_TP4Cmd ) { // G4ThreeVector pos= detector->Get_TP4_Position(); // pos.setY( yShift_TP4Cmd->GetNewDoubleValue(newValue) ); // detector->Set_TP4_Position(pos); // } // // if ( command == theta_TP4Cmd ) // detector->Set_TP4_Angle(theta_TP4Cmd->GetNewDoubleValue(newValue)); // // if ( command == set_TP4DUTsetupCmd ) // detector->Set_TP4_DUTSetup( set_TP4DUTsetupCmd->GetNewBoolValue(newValue) ); //********************** THIRD TRACKER MODULE **********************************// //**************** Commands for x3 sensor **********************************// if ( command == position_x3_SensorCmd ) detector->Set_x3_SensorPosition(position_x3_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_x3_SensorCmd ) { G4ThreeVector pos= detector->Get_x3_SensorPosition(); pos.setX( xShift_x3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x3_SensorPosition(pos); } if ( command == yShift_x3_SensorCmd ) { G4ThreeVector pos= detector->Get_x3_SensorPosition(); pos.setY( yShift_x3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x3_SensorPosition(pos); } if ( command == theta_x3_SensorCmd ) detector->Set_x3_SensorAngle(theta_x3_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_x3_SensorDUTsetupCmd ) detector->Set_x3_SensorDUTSetup( set_x3_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for u3 sensor **********************************// if ( command == position_u3_SensorCmd ) detector->Set_u3_SensorPosition(position_u3_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_u3_SensorCmd ) { G4ThreeVector pos= detector->Get_u3_SensorPosition(); pos.setX( xShift_u3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u3_SensorPosition(pos); } if ( command == yShift_u3_SensorCmd ) { G4ThreeVector pos= detector->Get_u3_SensorPosition(); pos.setY( yShift_u3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u3_SensorPosition(pos); } if ( command == theta_u3_SensorCmd ) detector->Set_u3_SensorAngle(theta_u3_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_u3_SensorDUTsetupCmd ) detector->Set_u3_SensorDUTSetup( set_u3_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for v3 sensor **********************************// if ( command == position_v3_SensorCmd ) detector->Set_v3_SensorPosition(position_v3_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_v3_SensorCmd ) { G4ThreeVector pos= detector->Get_v3_SensorPosition(); pos.setX( xShift_v3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v3_SensorPosition(pos); } if ( command == yShift_v3_SensorCmd ) { G4ThreeVector pos= detector->Get_v3_SensorPosition(); pos.setY( yShift_v3_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v3_SensorPosition(pos); } if ( command == theta_v3_SensorCmd ) detector->Set_v3_SensorAngle(theta_v3_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_v3_SensorDUTsetupCmd ) detector->Set_v3_SensorDUTSetup( set_v3_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //********************** FOURTH TRACKER MODULE *********************************// //**************** Commands for x4 sensor **********************************// if ( command == position_x4_SensorCmd ) detector->Set_x4_SensorPosition(position_x4_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_x4_SensorCmd ) { G4ThreeVector pos= detector->Get_x4_SensorPosition(); pos.setX( xShift_x4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x4_SensorPosition(pos); } if ( command == yShift_x4_SensorCmd ) { G4ThreeVector pos= detector->Get_x4_SensorPosition(); pos.setY( yShift_x4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_x4_SensorPosition(pos); } if ( command == theta_x4_SensorCmd ) detector->Set_x4_SensorAngle(theta_x4_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_x4_SensorDUTsetupCmd ) detector->Set_x4_SensorDUTSetup( set_x4_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for u4 sensor **********************************// if ( command == position_u4_SensorCmd ) detector->Set_u4_SensorPosition(position_u4_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_u4_SensorCmd ) { G4ThreeVector pos= detector->Get_u4_SensorPosition(); pos.setX( xShift_u4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u4_SensorPosition(pos); } if ( command == yShift_u4_SensorCmd ) { G4ThreeVector pos= detector->Get_u4_SensorPosition(); pos.setY( yShift_u4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_u4_SensorPosition(pos); } if ( command == theta_u4_SensorCmd ) detector->Set_u4_SensorAngle(theta_u4_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_u4_SensorDUTsetupCmd ) detector->Set_u4_SensorDUTSetup( set_u4_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //**************** Commands for v4 sensor **********************************// if ( command == position_v4_SensorCmd ) detector->Set_v4_SensorPosition(position_v4_SensorCmd->GetNew3VectorValue(newValue)); if ( command == xShift_v4_SensorCmd ) { G4ThreeVector pos= detector->Get_v4_SensorPosition(); pos.setX( xShift_v4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v4_SensorPosition(pos); } if ( command == yShift_v4_SensorCmd ) { G4ThreeVector pos= detector->Get_v4_SensorPosition(); pos.setY( yShift_v4_SensorCmd->GetNewDoubleValue(newValue) ); detector->Set_v4_SensorPosition(pos); } if ( command == theta_v4_SensorCmd ) detector->Set_v4_SensorAngle(theta_v4_SensorCmd->GetNewDoubleValue(newValue)); if ( command == set_v4_SensorDUTsetupCmd ) detector->Set_v4_SensorDUTSetup( set_v4_SensorDUTsetupCmd->GetNewBoolValue(newValue) ); //******************************************************************************// }