From fb4afea596593ceca36b95e093ba17a3ddfd6b9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Val=C3=A9rian=20Alcindor?= <valerian.alcindor@hotmail.fr> Date: Wed, 19 Jan 2022 10:42:08 +0100 Subject: [PATCH] Some Strasse related updates --- NPSimulation/Core/MaterialManager.cc | 43 ++++++++++++++++++++++- NPSimulation/Core/SteppingAction.cc | 3 +- NPSimulation/Detectors/Strasse/Strasse.cc | 9 ++--- 3 files changed, 49 insertions(+), 6 deletions(-) diff --git a/NPSimulation/Core/MaterialManager.cc b/NPSimulation/Core/MaterialManager.cc index 554581bf1..8ae1b918c 100644 --- a/NPSimulation/Core/MaterialManager.cc +++ b/NPSimulation/Core/MaterialManager.cc @@ -985,6 +985,48 @@ G4Material* MaterialManager::GetMaterialFromLibrary(string Name, return material; } + else if (Name == "Al1050") { + if (!density) + density = 2.71 * g / cm3; + G4Material* material = new G4Material("NPS_" + Name, density, 2); + material->AddElement(GetElementFromLibrary("Al"), 99.5/100.); + // To get to 100% + material->AddElement(GetElementFromLibrary("Fe"), 0.5/100.); + // Not 100% from wiki... + // material->AddElement(GetElementFromLibrary("Cu"), 0.05/100.); + // material->AddElement(GetElementFromLibrary("Fe"), 0.4/100.); + // material->AddElement(GetElementFromLibrary("Mg"), 0.05/100.); + // material->AddElement(GetElementFromLibrary("Mn"), 0.05/100.); + // material->AddElement(GetElementFromLibrary("Si"), 0.25/100.); + // material->AddElement(GetElementFromLibrary("Ti"), 0.03/100.); + // material->AddElement(GetElementFromLibrary("V"), 0.05/100.); + // material->AddElement(GetElementFromLibrary("Zn"), 0.05/100.); + m_Material[Name] = material; + return material; + } + + else if (Name == "Al5754") { + if (!density) + density = 2.67 * g / cm3; + G4Material* material = new G4Material("NPS_" + Name, density, 2); + //Realistic + material->AddElement(GetElementFromLibrary("Al"), 97/100.); + material->AddElement(GetElementFromLibrary("Mg"), 3/100.); + // Not 100% from Wiki... + // material->AddElement(GetElementFromLibrary("Al"), 97.4/100.); + // material->AddElement(GetElementFromLibrary("Cr"), 0.3/100.); + // material->AddElement(GetElementFromLibrary("Cu"), 0.1/100.); + // material->AddElement(GetElementFromLibrary("Fe"), 0.4/100.); + // material->AddElement(GetElementFromLibrary("Mg"), 3.6/100.); + // material->AddElement(GetElementFromLibrary("Mn"), 0.5/100.); + // material->AddElement(GetElementFromLibrary("Si"), 0.4/100.); + // material->AddElement(GetElementFromLibrary("Ti"), 0.15/100.); + // material->AddElement(GetElementFromLibrary("Zn"), 0.2/100.); + m_Material[Name] = material; + return material; + } + + else if (Name == "NE213") { if (!density) density = 0.874 * g / cm3; @@ -1194,7 +1236,6 @@ G4Material* MaterialManager::GetGasFromLibrary(string Name, double Pressure, return material; } - else { exit(1); } diff --git a/NPSimulation/Core/SteppingAction.cc b/NPSimulation/Core/SteppingAction.cc index eb2e65e8b..2069571a8 100644 --- a/NPSimulation/Core/SteppingAction.cc +++ b/NPSimulation/Core/SteppingAction.cc @@ -6,7 +6,8 @@ *****************************************************************************/ /***************************************************************************** - * Original Author: ValerianAlcindor contact address: valcindor@@ikp.tu-darmstadt.de + * Original Author: ValerianAlcindor contact address: + *valcindor@@ikp.tu-darmstadt.de * * * Creation Date : September 2021 * * Last update : * diff --git a/NPSimulation/Detectors/Strasse/Strasse.cc b/NPSimulation/Detectors/Strasse/Strasse.cc index b4d7a1c6d..f751000d7 100644 --- a/NPSimulation/Detectors/Strasse/Strasse.cc +++ b/NPSimulation/Detectors/Strasse/Strasse.cc @@ -633,7 +633,9 @@ G4LogicalVolume* Strasse::BuildOuterDetector(){ G4LogicalVolume* Strasse::BuildChamber(){ if(!m_Chamber){ // Needed Element - G4Material* Material = MaterialManager::getInstance()->GetMaterialFromLibrary("Al"); + // G4Material* Material = MaterialManager::getInstance()->GetMaterialFromLibrary("Al"); + G4Material* Material = MaterialManager::getInstance()->GetMaterialFromLibrary("Al5754"); + // G4Material* Material = MaterialManager::getInstance()->GetMaterialFromLibrary("Al1050"); G4RotationMatrix* Rot = new G4RotationMatrix(); // Main Cylinder @@ -694,7 +696,6 @@ G4LogicalVolume* Strasse::BuildChamber(){ m_Chamber = new G4LogicalVolume(Chamber3,Material,"logic_Strasse_Chamber",0,0,0); - m_Chamber->SetVisAttributes(ChamberVisAtt); } @@ -1023,7 +1024,7 @@ void Strasse::ConstructDetector(G4LogicalVolume* world){ } // Chamber - /* + for (unsigned short i = 0 ; i < m_Chamber_Z.size() ; i++) { G4ThreeVector Det_pos = G4ThreeVector(0,0,-m_Chamber_Z[i]) ; G4RotationMatrix* Rot = new G4RotationMatrix(); @@ -1032,7 +1033,7 @@ void Strasse::ConstructDetector(G4LogicalVolume* world){ BuildChamber(), "Strasse",world,false,i+1); } - */ + //G4ThreeVector Det_pos = G4ThreeVector(0,0,+11.5) ; -- GitLab