Skip to content
Snippets Groups Projects
Commit 20476dac authored by Oliver Kirsebom's avatar Oliver Kirsebom
Browse files

next step: implement SetBetaDetectorV2On and SetMuonTelescopeOn methods in DetectorConstruct

parent 418170bf
No related branches found
No related tags found
No related merge requests found
...@@ -75,11 +75,23 @@ class VKDetectorConstruction : public G4VUserDetectorConstruction ...@@ -75,11 +75,23 @@ class VKDetectorConstruction : public G4VUserDetectorConstruction
void SetMagnetOn(G4bool b); void SetMagnetOn(G4bool b);
/* /*
* Add or remove the beta detector from setup * Add or remove the beta detector (v1.0) from setup
* @param b If true, detector is created. If false, detector is removed/not created * @param b If true, detector is created. If false, detector is removed/not created
*/ */
void SetBetaDetectorOn(G4bool b); void SetBetaDetectorOn(G4bool b);
/*
* Add or remove the beta detector (v2.0) from setup
* @param b If true, detector is created. If false, detector is removed/not created
*/
void SetBetaDetectorV2On(G4bool b);
/*
* Add or remove the muon telescope from setup
* @param b If true, telescope is created. If false, telescope is removed/not created
*/
void SetMuonTelescopeOn(G4bool b);
/* /*
* Add or remove the catcher foil from the setup * Add or remove the catcher foil from the setup
* @param b If true, catcher foil is created. If false, catcher foil is removed/not created * @param b If true, catcher foil is created. If false, catcher foil is removed/not created
......
...@@ -55,6 +55,8 @@ class VKDetectorMessenger: public G4UImessenger ...@@ -55,6 +55,8 @@ class VKDetectorMessenger: public G4UImessenger
G4UIdirectory *fFieldDir; G4UIdirectory *fFieldDir;
G4UIcmdWithABool *fMagnetCmd; G4UIcmdWithABool *fMagnetCmd;
G4UIcmdWithABool *fBetaDetectorCmd; G4UIcmdWithABool *fBetaDetectorCmd;
G4UIcmdWithABool *fBetaDetectorV2Cmd;
G4UIcmdWithABool *fMuonTelescopeCmd;
G4UIcmdWithABool *fCatcherFoilCmd; G4UIcmdWithABool *fCatcherFoilCmd;
G4UIcmdWithABool *fShieldCmd; G4UIcmdWithABool *fShieldCmd;
G4UIcmdWithABool *fLeadBlockCmd; G4UIcmdWithABool *fLeadBlockCmd;
......
...@@ -21,60 +21,60 @@ ...@@ -21,60 +21,60 @@
/gps/energy 975.657 keV /gps/energy 975.657 keV
#/gps/energy 1682.232 keV #/gps/energy 1682.232 keV
/VK/field/maxbfield 0.0700 tesla /VK/field/maxbfield 0.12 tesla
/VK/output/openFile output/scan/e2/bmax0700.root /VK/output/openFile output/test.root
/run/beamOn 10000 /run/beamOn 10000
/VK/field/maxbfield 0.0750 tesla #/VK/field/maxbfield 0.0750 tesla
/VK/output/openFile output/scan/e2/bmax0750.root #/VK/output/openFile output/scan/e2/bmax0750.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.0800 tesla #/VK/field/maxbfield 0.0800 tesla
/VK/output/openFile output/scan/e2/bmax0800.root #/VK/output/openFile output/scan/e2/bmax0800.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.0850 tesla #/VK/field/maxbfield 0.0850 tesla
/VK/output/openFile output/scan/e2/bmax0850.root #/VK/output/openFile output/scan/e2/bmax0850.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.0900 tesla #/VK/field/maxbfield 0.0900 tesla
/VK/output/openFile output/scan/e2/bmax0900.root #/VK/output/openFile output/scan/e2/bmax0900.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.0950 tesla #/VK/field/maxbfield 0.0950 tesla
/VK/output/openFile output/scan/e2/bmax0950.root #/VK/output/openFile output/scan/e2/bmax0950.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1000 tesla #/VK/field/maxbfield 0.1000 tesla
/VK/output/openFile output/scan/e2/bmax1000.root #/VK/output/openFile output/scan/e2/bmax1000.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1050 tesla #/VK/field/maxbfield 0.1050 tesla
/VK/output/openFile output/scan/e2/bmax1050.root #/VK/output/openFile output/scan/e2/bmax1050.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1100 tesla #/VK/field/maxbfield 0.1100 tesla
/VK/output/openFile output/scan/e2/bmax1100.root #/VK/output/openFile output/scan/e2/bmax1100.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1150 tesla #/VK/field/maxbfield 0.1150 tesla
/VK/output/openFile output/scan/e2/bmax1150.root #/VK/output/openFile output/scan/e2/bmax1150.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1200 tesla #/VK/field/maxbfield 0.1200 tesla
/VK/output/openFile output/scan/e2/bmax1200.root #/VK/output/openFile output/scan/e2/bmax1200.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1250 tesla #/VK/field/maxbfield 0.1250 tesla
/VK/output/openFile output/scan/e2/bmax1250.root #/VK/output/openFile output/scan/e2/bmax1250.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1300 tesla #/VK/field/maxbfield 0.1300 tesla
/VK/output/openFile output/scan/e2/bmax1300.root #/VK/output/openFile output/scan/e2/bmax1300.root
/run/beamOn 10000 #/run/beamOn 10000
/VK/field/maxbfield 0.1350 tesla #/VK/field/maxbfield 0.1350 tesla
/VK/output/openFile output/scan/e2/bmax1350.root #/VK/output/openFile output/scan/e2/bmax1350.root
/run/beamOn 10000 #/run/beamOn 10000
...@@ -34,6 +34,13 @@ ...@@ -34,6 +34,13 @@
#include "G4PhysicalVolumeStore.hh" #include "G4PhysicalVolumeStore.hh"
/* /*
* -------------------------------------------------------------
* OBS!!! In this simplified GEANT4 model of the detector,
* no SiPMs have been attached to the FRONT detector.
* Also, no reflective layer has been inserted at the
* interface of the FRONT and SIGNAL detectors.
* -------------------------------------------------------------
*
* The beta detector consists of stacked, cylindrical FRONT * The beta detector consists of stacked, cylindrical FRONT
* and SIGNAL detectors surrounded by a cup-shaped active * and SIGNAL detectors surrounded by a cup-shaped active
* cosmic-ray VETO shield. * cosmic-ray VETO shield.
...@@ -123,6 +130,23 @@ VKBetaDetectorV2::VKBetaDetectorV2(G4RotationMatrix *pRot, ...@@ -123,6 +130,23 @@ VKBetaDetectorV2::VKBetaDetectorV2(G4RotationMatrix *pRot,
fContainer_log = new G4LogicalVolume(fContainer_sol, fLabVacuum, "betaDetector_log"); fContainer_log = new G4LogicalVolume(fContainer_sol, fLabVacuum, "betaDetector_log");
// ----------------------------------------------- //
// FRONT scintillator //
// ----------------------------------------------- //
// solid
fFront_sol = new G4Tubs("front_sol", 0., fFrontDiameter/2,
fFrontLength/2, 0.*deg, 360.*deg);
// logical
fFront_log = new G4LogicalVolume(fFront_sol, fEJ200, "front_log");
// physical
displ = -(fContainerLength - fFrontLength)/2 + fReflectorThickness;
pos = G4ThreeVector(0, 0, displ);
new G4PVPlacement(0, pos, fFront_log, "front", fContainer_log, false, 0, fCheckOverlaps);
// ----------------------------------------------- // // ----------------------------------------------- //
// SIGNAL scintillator // // SIGNAL scintillator //
// ----------------------------------------------- // // ----------------------------------------------- //
...@@ -135,7 +159,8 @@ VKBetaDetectorV2::VKBetaDetectorV2(G4RotationMatrix *pRot, ...@@ -135,7 +159,8 @@ VKBetaDetectorV2::VKBetaDetectorV2(G4RotationMatrix *pRot,
fSignal_log = new G4LogicalVolume(fSignal_sol, fEJ200, "signal_log"); fSignal_log = new G4LogicalVolume(fSignal_sol, fEJ200, "signal_log");
// physical // physical
displ = -(fContainerLength - fSignalLength)/2 + fReflectorThickness; displ = -(fContainerLength - fSignalLength)/2 + fReflectorThickness
+ fFrontLength; //+ fReflectorThickness;
pos = G4ThreeVector(0, 0, displ); pos = G4ThreeVector(0, 0, displ);
new G4PVPlacement(0, pos, fSignal_log, "signal", fContainer_log, false, 0, fCheckOverlaps); new G4PVPlacement(0, pos, fSignal_log, "signal", fContainer_log, false, 0, fCheckOverlaps);
...@@ -269,8 +294,10 @@ void VKBetaDetectorV2::SetDefaults() ...@@ -269,8 +294,10 @@ void VKBetaDetectorV2::SetDefaults()
fCheckOverlaps = fDetConstr -> GetCheckOverlaps(); fCheckOverlaps = fDetConstr -> GetCheckOverlaps();
// dimensions // dimensions
fFrontDiameter = 45*mm;
fFrontLength = 5*mm;
fSignalDiameter = 45*mm; fSignalDiameter = 45*mm;
fSignalLength = 45*mm; fSignalLength = 40*mm;
fReflectorThickness = 0.5*mm; fReflectorThickness = 0.5*mm;
fVetoThickness = 5*mm; fVetoThickness = 5*mm;
fVetoLength = 75*mm; fVetoLength = 75*mm;
...@@ -282,8 +309,8 @@ void VKBetaDetectorV2::SetDefaults() ...@@ -282,8 +309,8 @@ void VKBetaDetectorV2::SetDefaults()
fSiPMLength = 10*mm; fSiPMLength = 10*mm;
// deduce container size // deduce container size
fContainerDiameter = 2*(fSignalDiameter/2 + 2*fReflectorThickness + fVetoThickness); fContainerDiameter = 2*(fSignalDiameter/2 + 2*fReflectorThickness + fVetoThickness);
fContainerLength = fVetoLength + fReflectorThickness + fSiPMLength; fContainerLength = fVetoLength + fReflectorThickness + fSiPMLength;
// coating reflectivity // coating reflectivity
fRefl = fDetConstr -> GetCoatingReflectivity(); fRefl = fDetConstr -> GetCoatingReflectivity();
...@@ -393,7 +420,7 @@ void VKBetaDetectorV2::ConstructCoatingSolid( G4double& displ ) ...@@ -393,7 +420,7 @@ void VKBetaDetectorV2::ConstructCoatingSolid( G4double& displ )
G4Tubs* c2 = new G4Tubs("coating2_sol", r2min, r2max, l2/2, 0.*deg, 360.*deg); G4Tubs* c2 = new G4Tubs("coating2_sol", r2min, r2max, l2/2, 0.*deg, 360.*deg);
// relative placement of 1 and 2 // relative placement of 1 and 2
dz = (l2-l1)/2 + fSignalLength + l2; dz = (l2-l1)/2 + fSignalLength + fFrontLength + l2;
translation = G4ThreeVector(0, 0, dz); translation = G4ThreeVector(0, 0, dz);
transform = G4Transform3D(doNotRotate, translation); transform = G4Transform3D(doNotRotate, translation);
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "VKMaterials.hh" #include "VKMaterials.hh"
#include "VKMagnet.hh" #include "VKMagnet.hh"
#include "VKBetaDetector.hh" #include "VKBetaDetector.hh"
#include "VKBetaDetectorV2.hh"
#include "VKCatcherFoil.hh" #include "VKCatcherFoil.hh"
#include "VKShield.hh" #include "VKShield.hh"
#include "VKLeadBlock.hh" #include "VKLeadBlock.hh"
...@@ -313,6 +314,18 @@ void VKDetectorConstruction::SetBetaDetectorOn(G4bool b) ...@@ -313,6 +314,18 @@ void VKDetectorConstruction::SetBetaDetectorOn(G4bool b)
} }
void VKDetectorConstruction::SetBetaDetectorV2On(G4bool b)
{
// not implemented yet !!!
}
void VKDetectorConstruction::SetMuonTelescopeOn(G4bool b)
{
// not implemented yet !!!
}
void VKDetectorConstruction::SetCatcherFoilOn(G4bool b) void VKDetectorConstruction::SetCatcherFoilOn(G4bool b)
{ {
fCatcherFoilOn = b; fCatcherFoilOn = b;
......
...@@ -53,10 +53,20 @@ VKDetectorMessenger::VKDetectorMessenger(VKDetectorConstruction* pDetConstr) ...@@ -53,10 +53,20 @@ VKDetectorMessenger::VKDetectorMessenger(VKDetectorConstruction* pDetConstr)
fMagnetCmd->SetToBeBroadcasted(false); fMagnetCmd->SetToBeBroadcasted(false);
fBetaDetectorCmd = new G4UIcmdWithABool("/VK/detector/volumes/betaDetector", this); fBetaDetectorCmd = new G4UIcmdWithABool("/VK/detector/volumes/betaDetector", this);
fBetaDetectorCmd->SetGuidance("Enable/Disable the beta detector."); fBetaDetectorCmd->SetGuidance("Enable/Disable the old beta detector (v1).");
fBetaDetectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle); fBetaDetectorCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fBetaDetectorCmd->SetToBeBroadcasted(false); fBetaDetectorCmd->SetToBeBroadcasted(false);
fBetaDetectorV2Cmd = new G4UIcmdWithABool("/VK/detector/volumes/betaDetectorV2", this);
fBetaDetectorV2Cmd->SetGuidance("Enable/Disable the new beta detector (v2).");
fBetaDetectorV2Cmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fBetaDetectorV2Cmd->SetToBeBroadcasted(false);
fMuonTelescopeCmd = new G4UIcmdWithABool("/VK/detector/volumes/muonTelescope", this);
fMuonTelescopeCmd->SetGuidance("Enable/Disable the muon telescope.");
fMuonTelescopeCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
fMuonTelescopeCmd->SetToBeBroadcasted(false);
fCatcherFoilCmd = new G4UIcmdWithABool("/VK/detector/volumes/catcherFoil", this); fCatcherFoilCmd = new G4UIcmdWithABool("/VK/detector/volumes/catcherFoil", this);
fCatcherFoilCmd->SetGuidance("Enable/Disable the catcher foil."); fCatcherFoilCmd->SetGuidance("Enable/Disable the catcher foil.");
fCatcherFoilCmd->AvailableForStates(G4State_PreInit, G4State_Idle); fCatcherFoilCmd->AvailableForStates(G4State_PreInit, G4State_Idle);
...@@ -109,6 +119,8 @@ VKDetectorMessenger::~VKDetectorMessenger() ...@@ -109,6 +119,8 @@ VKDetectorMessenger::~VKDetectorMessenger()
{ {
delete fMagnetCmd; delete fMagnetCmd;
delete fBetaDetectorCmd; delete fBetaDetectorCmd;
delete fBetaDetectorV2Cmd;
delete fMuonTelescopeCmd;
delete fCatcherFoilCmd; delete fCatcherFoilCmd;
delete fShieldCmd; delete fShieldCmd;
delete fLeadBlockCmd; delete fLeadBlockCmd;
...@@ -130,6 +142,14 @@ void VKDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue) ...@@ -130,6 +142,14 @@ void VKDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newValue)
{ {
fDetConstr -> SetBetaDetectorOn(fBetaDetectorCmd -> GetNewBoolValue(newValue)); fDetConstr -> SetBetaDetectorOn(fBetaDetectorCmd -> GetNewBoolValue(newValue));
} }
else if (command == fBetaDetectorV2Cmd)
{
fDetConstr -> SetBetaDetectorV2On(fBetaDetectorV2Cmd -> GetNewBoolValue(newValue));
}
else if (command == fMuonTelescopeCmd)
{
fDetConstr -> SetMuonTelescopeOn(fMuonTelescopeCmd -> GetNewBoolValue(newValue));
}
else if (command == fCatcherFoilCmd) else if (command == fCatcherFoilCmd)
{ {
fDetConstr -> SetCatcherFoilOn(fCatcherFoilCmd -> GetNewBoolValue(newValue)); fDetConstr -> SetCatcherFoilOn(fCatcherFoilCmd -> GetNewBoolValue(newValue));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment