Skip to content
Snippets Groups Projects
Commit 61e9cbcd authored by emile cantacuzene's avatar emile cantacuzene
Browse files

Changed plastic_BEDO orientation

parent 9024f778
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #383586 passed
...@@ -78,8 +78,8 @@ Plastic_BEDO::Plastic_BEDO(){ ...@@ -78,8 +78,8 @@ Plastic_BEDO::Plastic_BEDO(){
// RGB Color + Transparency // RGB Color + Transparency
m_VisSquare = new G4VisAttributes(G4Colour(0, 1, 0, 0.5)); m_VisSquare = new G4VisAttributes(G4Colour(0, 1, 0, 1));
m_VisCylinder = new G4VisAttributes(G4Colour(0, 0, 1, 0.5)); m_VisCylinder = new G4VisAttributes(G4Colour(0, 0, 1, 1));
} }
...@@ -105,7 +105,7 @@ void Plastic_BEDO::AddDetector(double R, double Theta, double Phi){ ...@@ -105,7 +105,7 @@ void Plastic_BEDO::AddDetector(double R, double Theta, double Phi){
G4LogicalVolume* Plastic_BEDO::BuildCylindricalDetector(){ G4LogicalVolume* Plastic_BEDO::BuildCylindricalDetector(){
if(!m_CylindricalDetector){ if(!m_CylindricalDetector){
G4ThreeVector zTrans(0., 0., 3.*mm); G4ThreeVector zTrans(0., 0., -3.*mm);
G4Tubs* tubOut = new G4Tubs("Plastic_BEDO",0,Plastic_BEDO_NS::Radius,Plastic_BEDO_NS::Length*0.5,0,360*deg); G4Tubs* tubOut = new G4Tubs("Plastic_BEDO",0,Plastic_BEDO_NS::Radius,Plastic_BEDO_NS::Length*0.5,0,360*deg);
G4Tubs* tubIn = new G4Tubs("Plastic_BEDO",0,Plastic_BEDO_NS::Radius-Plastic_BEDO_NS::Thickness,Plastic_BEDO_NS::Length*0.5,0,360*deg); G4Tubs* tubIn = new G4Tubs("Plastic_BEDO",0,Plastic_BEDO_NS::Radius-Plastic_BEDO_NS::Thickness,Plastic_BEDO_NS::Length*0.5,0,360*deg);
...@@ -165,12 +165,14 @@ void Plastic_BEDO::ReadConfiguration(NPL::InputParser parser){ ...@@ -165,12 +165,14 @@ void Plastic_BEDO::ReadConfiguration(NPL::InputParser parser){
// Construct detector and inialise sensitive part. // Construct detector and inialise sensitive part.
// Called After DetecorConstruction::AddDetector Method // Called After DetecorConstruction::AddDetector Method
void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){ void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){
for (unsigned short i = 0 ; i < m_R.size() ; i++) { for (unsigned short i = 0 ; i < m_R.size() ; i++) {
G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ; G4double wX = m_R[i] * sin(m_Theta[i] ) * cos(m_Phi[i] ) ;
G4double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ; G4double wY = m_R[i] * sin(m_Theta[i] ) * sin(m_Phi[i] ) ;
G4double wZ = m_R[i] * cos(m_Theta[i] ) ; G4double wZ = m_R[i] * cos(m_Theta[i] ) ;
G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ) ; G4ThreeVector Det_pos = G4ThreeVector(wX, wY, wZ) ;
// So the face of the detector is at R instead of the middle // So the face of the detector is at R instead of the middle
Det_pos+=Det_pos.unit()*Plastic_BEDO_NS::Thickness*0.5; Det_pos+=Det_pos.unit()*Plastic_BEDO_NS::Thickness*0.5;
// Building Detector reference frame // Building Detector reference frame
...@@ -178,14 +180,15 @@ void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){ ...@@ -178,14 +180,15 @@ void Plastic_BEDO::ConstructDetector(G4LogicalVolume* world){
G4double jj = cos(m_Theta[i]) * sin(m_Phi[i]); G4double jj = cos(m_Theta[i]) * sin(m_Phi[i]);
G4double kk = -sin(m_Theta[i]); G4double kk = -sin(m_Theta[i]);
G4ThreeVector Y(ii,jj,kk); G4ThreeVector Y(ii,jj,kk);
G4ThreeVector w = Det_pos.unit(); G4ThreeVector w = Det_pos.unit();
G4ThreeVector u = w.cross(Y); G4ThreeVector u = w.cross(Y);
G4ThreeVector v = w.cross(u); G4ThreeVector v = w.cross(u);
v = v.unit(); v = v.unit();
u = u.unit(); u = u.unit();
G4RotationMatrix* Rot = new G4RotationMatrix(u,v,w); G4RotationMatrix* Rot = new G4RotationMatrix(u, v, w);
new G4PVPlacement(G4Transform3D(*Rot,Det_pos), new G4PVPlacement(G4Transform3D(*Rot,Det_pos),
BuildCylindricalDetector(), BuildCylindricalDetector(),
"Plastic_BEDO",world,false,i+1); "Plastic_BEDO",world,false,i+1);
......
...@@ -14,21 +14,21 @@ Monster ...@@ -14,21 +14,21 @@ Monster
Shape= Cylindrical Shape= Cylindrical
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Plastic_BEDO Plastic_BEDO
R=0 R=0.0001 cm
THETA=0 THETA=-45
PHI=0 PHI=0
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium Coaxial_Germanium
R = 10 cm R = 5 cm
THETA = 90 deg THETA = -135 deg
PHI = 0 PHI = 0 deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium Coaxial_Germanium
R = 10 cm R = 5 cm
THETA = 90 deg THETA = 45 deg
PHI = 180 deg PHI = 0 deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Coaxial_Germanium Coaxial_Germanium
R = 10 cm R = 5 cm
THETA = 90 deg THETA = 90 deg
PHI = 270 deg PHI = 270 deg
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