diff --git a/NPSimulation/Hyde2/Hyde2TrackerModule.cc b/NPSimulation/Hyde2/Hyde2TrackerModule.cc index db1fa3e85627f37be3e9b984627854e6b66802ca..9cdf74c80e29b06c217ec348711012b4fe840332 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerModule.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerModule.cc @@ -20,6 +20,7 @@ *****************************************************************************/ #include "Hyde2TrackerModule.hh" +#include "MaterialManager.hh" #include "RootOutput.h" @@ -63,3 +64,12 @@ void Hyde2TrackerModule::InitializeIndex() m_index["Trapezoid1"] = 2200; m_index["Trapezoid2"] = 2300; } + + + +void Hyde2TrackerModule::InitializeMaterial() +{ + m_MaterialSilicon = MaterialManager::getInstance()->GetMaterialFromLibrary("Si"); + m_MaterialVacuum = MaterialManager::getInstance()->GetMaterialFromLibrary("Vacuum"); +} + diff --git a/NPSimulation/Hyde2/Hyde2TrackerModule.hh b/NPSimulation/Hyde2/Hyde2TrackerModule.hh index 0d6966c048bab746091dd94cf8e80fa3bce24e63..2b4addf59da7da7eaaf032f0cdbece4aa75ab051 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerModule.hh +++ b/NPSimulation/Hyde2/Hyde2TrackerModule.hh @@ -89,6 +89,18 @@ protected: // Set to true if you want to see Telescope Frame in your visualisation bool m_non_sensitive_part_visiualisation; +protected: + //////////////////////////////////////////////////// + //////////////////// Material ////////////////////// + //////////////////////////////////////////////////// + // Declare all material used by Gaspard + void InitializeMaterial() ; + // Si + G4Material* m_MaterialSilicon; + // Vacuum + G4Material* m_MaterialVacuum ; + + protected: // First stage Associate Scorer G4MultiFunctionalDetector* m_FirstStageScorer; diff --git a/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc b/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc index 4f125886dde7d00392270c10ff6305f0ada1df85..a1011fa05e8eefff946058b02508943e793818f4 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerSquare1.cc @@ -171,78 +171,13 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, Number << NbrTelescopes ; DetectorNumber = Number.str() ; - ///////////////////////////////////////////////////////////////// - /////////////////Element Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - G4String symbol ; - G4double density = 0. , a = 0, z = 0 ; - G4int ncomponents = 0, natoms = 0 ; - - G4Element* H = new G4Element("Hydrogen" , symbol = "H" , z = 1 , a = 1.01 * g / mole); - G4Element* C = new G4Element("Carbon" , symbol = "C" , z = 6 , a = 12.011 * g / mole); - G4Element* N = new G4Element("Nitrogen" , symbol = "N" , z = 7 , a = 14.01 * g / mole); - G4Element* O = new G4Element("Oxigen" , symbol = "O" , z = 8 , a = 16.00 * g / mole); - G4Element* I = new G4Element("Iode" , symbol = "I" , z = 53 , a = 126.9 * g / mole); - G4Element* Cs = new G4Element("Cesium" , symbol = "Cs" , z = 55 , a = 132.9 * g / mole); - - G4Element* Co = new G4Element("Cobalt" , symbol = "Co" , z = 27 , a = 58.933 * g / mole); - G4Element* Cr = new G4Element("Cromium" , symbol = "Cr" , z = 24 , a = 51.996 * g / mole); - G4Element* Ni = new G4Element("Nickel" , symbol = "Ni" , z = 28 , a = 58.69 * g / mole); - G4Element* Fe = new G4Element("Iron" , symbol = "Fe" , z = 26 , a = 55.847 * g / mole); - G4Element* W = new G4Element("Tungsten" , symbol = "W" , z = 74 , a = 183.5 * g / mole); - - //////////////////////////////////////////////////////////////// - /////////////////Material Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - // Si - a = 28.0855 * g / mole; - density = 2.321 * g / cm3; - G4Material* Silicon = new G4Material("Si", z = 14., a, density); - - // Al - density = 2.702 * g / cm3; - a = 26.98 * g / mole; -// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); - - // Iron -// density = 7.874 * g / cm3; -// a = 55.847 * g / mole; -// G4Material* Iron = new G4Material("Iron", z = 26., a, density); - - // CsI - density = 4.51 * g / cm3; - G4Material* CsI = new G4Material("CsI", density, ncomponents = 2); - CsI->AddElement(Cs , natoms = 1); - CsI->AddElement(I , natoms = 1); - - // Vacuum - density = 0.000000001 * mg / cm3; - G4Material* Vacuum = new G4Material("Vacuum", density, ncomponents = 2); - Vacuum->AddElement(N, .7); - Vacuum->AddElement(O, .3); - - // Mylar - density = 1.397 * g / cm3; - G4Material* Myl = new G4Material("Mylar", density, ncomponents = 3); - Myl->AddElement(C, natoms = 10); - Myl->AddElement(H, natoms = 8); - Myl->AddElement(O, natoms = 4); - - // Havar - G4Material* Harvar = new G4Material("Havar", 8.3*g / cm3, 5); - Harvar->AddElement(Co , 42); - Harvar->AddElement(Cr , 20); - Harvar->AddElement(Ni , 13); - Harvar->AddElement(Fe , 19); - Harvar->AddElement(W , 1); - //////////////////////////////////////////////////////////////// ////////////// Starting Volume Definition ////////////////////// //////////////////////////////////////////////////////////////// G4String Name = "HYD2Square1" + DetectorNumber; G4Box* solidHYD2Square1 = new G4Box(Name, 0.5*FaceFront, 0.5*FaceFront, 0.5*Length); - G4LogicalVolume* logicHYD2Square1 = new G4LogicalVolume(solidHYD2Square1, Vacuum, Name, 0, 0, 0); + G4LogicalVolume* logicHYD2Square1 = new G4LogicalVolume(solidHYD2Square1, m_MaterialVacuum, Name, 0, 0, 0); new G4PVPlacement(G4Transform3D(*MMrot, MMpos), logicHYD2Square1, Name, world, false, 0); @@ -257,7 +192,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, /* G4ThreeVector positionMarkerU = CT*0.98 + MMu*SiliconFace/4; G4Box* solidMarkerU = new G4Box( "solidMarkerU" , SiliconFace/4 , 1*mm , 1*mm ) ; - G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , Vacuum , "logicMarkerU",0,0,0) ; + G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , m_MaterialVacuum , "logicMarkerU",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerU),logicMarkerU,"MarkerU",world,false,0) ; G4VisAttributes* MarkerUVisAtt= new G4VisAttributes(G4Colour(0.,0.,0.5));//blue @@ -265,7 +200,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionMarkerV = CT*0.98 + MMv*SiliconFace/4; G4Box* solidMarkerV = new G4Box( "solidMarkerU" , 1*mm , SiliconFace/4 , 1*mm ) ; - G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , Vacuum , "logicMarkerV",0,0,0) ; + G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , m_MaterialVacuum , "logicMarkerV",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerV),logicMarkerV,"MarkerV",world,false,0) ; G4VisAttributes* MarkerVVisAtt= new G4VisAttributes(G4Colour(0.,0.5,0.5));//green @@ -280,7 +215,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionFirstStage = G4ThreeVector(0, 0, FirstStage_PosZ); G4Box* solidFirstStage = new G4Box("solidFirstStage", 0.5*FirstStageFace, 0.5*FirstStageFace, 0.5*FirstStageThickness); - G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, Silicon, "logicFirstStage", 0, 0, 0); + G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, m_MaterialSilicon, "logicFirstStage", 0, 0, 0); new G4PVPlacement(0, positionFirstStage, @@ -306,7 +241,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionSecondStage = G4ThreeVector(0, 0, SecondStage_PosZ); G4Box* solidSecondStage = new G4Box("solidSecondStage", 0.5*SecondStageFace, 0.5*SecondStageFace, 0.5*SecondStageThickness); - G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, Silicon, "logicSecondStage", 0, 0, 0); + G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, m_MaterialSilicon, "logicSecondStage", 0, 0, 0); new G4PVPlacement(0, positionSecondStage, @@ -332,7 +267,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionThirdStage = G4ThreeVector(0, 0, ThirdStage_PosZ); G4Box* solidThirdStage = new G4Box("solidThirdStage", 0.5*ThirdStageFace, 0.5*ThirdStageFace, 0.5*ThirdStageThickness); - G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, Silicon, "logicThirdStage", 0, 0, 0); + G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, m_MaterialSilicon, "logicThirdStage", 0, 0, 0); new G4PVPlacement(0, positionThirdStage, @@ -358,7 +293,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionFourthStage = G4ThreeVector(0, 0, FourthStage_PosZ); G4Box* solidFourthStage = new G4Box("solidFourthStage", 0.5*FourthStageFace, 0.5*FourthStageFace, 0.5*FourthStageThickness); - G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, Silicon, "logicFourthStage", 0, 0, 0); + G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, m_MaterialSilicon, "logicFourthStage", 0, 0, 0); new G4PVPlacement(0, positionFourthStage, @@ -384,7 +319,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionFifthStage = G4ThreeVector(0, 0, FifthStage_PosZ); G4Box* solidFifthStage = new G4Box("solidFifthStage", 0.5*FifthStageFace, 0.5*FifthStageFace, 0.5*FifthStageThickness); - G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, Silicon, "logicFifthStage", 0, 0, 0); + G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, m_MaterialSilicon, "logicFifthStage", 0, 0, 0); new G4PVPlacement(0, positionFifthStage, @@ -410,7 +345,7 @@ void Hyde2TrackerSquare1::VolumeMaker(G4int TelescopeNumber, G4ThreeVector positionSixthStage = G4ThreeVector(0, 0, SixthStage_PosZ); G4Box* solidSixthStage = new G4Box("solidSixthStage", 0.5*SixthStageFace, 0.5*SixthStageFace, 0.5*SixthStageThickness); - G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, Silicon, "logicSixthStage", 0, 0, 0); + G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, m_MaterialSilicon, "logicSixthStage", 0, 0, 0); new G4PVPlacement(0, positionSixthStage, diff --git a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc index bbe75ebbadd06541cc5764f46fdbd9b43a497e5f..f40cdc188bf8cb4013e6ab5312f24ef8136d948f 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid1.cc @@ -168,71 +168,6 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , Number << NbrTelescopes ; DetectorNumber = Number.str() ; - //////////////////////////////////////////////////////////////// - /////////////////Element Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - G4String symbol ; - G4double density = 0. , a = 0, z = 0 ; - G4int ncomponents = 0, natoms = 0 ; - - G4Element* H = new G4Element("Hydrogen" , symbol = "H" , z = 1 , a = 1.01 * g / mole); - G4Element* C = new G4Element("Carbon" , symbol = "C" , z = 6 , a = 12.011 * g / mole); - G4Element* N = new G4Element("Nitrogen" , symbol = "N" , z = 7 , a = 14.01 * g / mole); - G4Element* O = new G4Element("Oxigen" , symbol = "O" , z = 8 , a = 16.00 * g / mole); - G4Element* I = new G4Element("Iode" , symbol = "I" , z = 53 , a = 126.9 * g / mole); - G4Element* Cs = new G4Element("Cesium" , symbol = "Cs" , z = 55 , a = 132.9 * g / mole); - - G4Element* Co = new G4Element("Cobalt" , symbol = "Co" , z = 27 , a = 58.933 * g / mole); - G4Element* Cr = new G4Element("Cromium" , symbol = "Cr" , z = 24 , a = 51.996 * g / mole); - G4Element* Ni = new G4Element("Nickel" , symbol = "Ni" , z = 28 , a = 58.69 * g / mole); - G4Element* Fe = new G4Element("Iron" , symbol = "Fe" , z = 26 , a = 55.847 * g / mole); - G4Element* W = new G4Element("Tungsten" , symbol = "W" , z = 74 , a = 183.5 * g / mole); - - //////////////////////////////////////////////////////////////// - /////////////////Material Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - // Si - a = 28.0855 * g / mole; - density = 2.321 * g / cm3; - G4Material* Silicon = new G4Material("Si", z = 14., a, density); - - // Al -// density = 2.702 * g / cm3; -// a = 26.98 * g / mole; -// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); - - // Iron -// density = 7.874 * g / cm3; -// a = 55.847 * g / mole; -// G4Material* Iron = new G4Material("Iron", z = 26., a, density); - - // CsI - density = 4.51 * g / cm3; - G4Material* CsI = new G4Material("CsI", density, ncomponents = 2); - CsI->AddElement(Cs , natoms = 1); - CsI->AddElement(I , natoms = 1); - - // Vacuum - density = 0.000000001 * mg / cm3; - G4Material* Vacuum = new G4Material("Vacuum", density, ncomponents = 2); - Vacuum->AddElement(N, .7); - Vacuum->AddElement(O, .3); - - // Mylar - density = 1.397 * g / cm3; - G4Material* Myl = new G4Material("Mylar", density, ncomponents = 3); - Myl->AddElement(C, natoms = 10); - Myl->AddElement(H, natoms = 8); - Myl->AddElement(O, natoms = 4); - - // Havar - G4Material* Harvar = new G4Material("Havar", 8.3*g / cm3, 5); - Harvar->AddElement(Co , 42); - Harvar->AddElement(Cr , 20); - Harvar->AddElement(Ni , 13); - Harvar->AddElement(Fe , 19); - Harvar->AddElement(W , 1); - //////////////////////////////////////////////////////////////// ////////////// Starting Volume Definition ////////////////////// //////////////////////////////////////////////////////////////// @@ -243,7 +178,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , Length/2, 0*deg, 0*deg, Height/2, BaseLarge/2, BaseSmall/2, 0*deg, Height/2, BaseLarge/2, BaseSmall/2, 0*deg); - G4LogicalVolume* logicHYD2Trapezoid1 = new G4LogicalVolume(solidHYD2Trapezoid1, Vacuum, Name, 0, 0, 0); + G4LogicalVolume* logicHYD2Trapezoid1 = new G4LogicalVolume(solidHYD2Trapezoid1, m_MaterialVacuum, Name, 0, 0, 0); new G4PVPlacement(G4Transform3D(*MMrot, MMpos), logicHYD2Trapezoid1, Name, world, false, 0); @@ -258,7 +193,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , /* G4ThreeVector positionMarkerU = CT*0.98 + MMu*SiliconFace/4; G4Box* solidMarkerU = new G4Box( "solidMarkerU" , SiliconFace/4 , 1*mm , 1*mm ) ; - G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , Vacuum , "logicMarkerU",0,0,0) ; + G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , m_MaterialVacuum , "logicMarkerU",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerU),logicMarkerU,"MarkerU",world,false,0) ; G4VisAttributes* MarkerUVisAtt= new G4VisAttributes(G4Colour(0.,0.,0.5));//blue @@ -266,7 +201,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , G4ThreeVector positionMarkerV = CT*0.98 + MMv*SiliconFace/4; G4Box* solidMarkerV = new G4Box( "solidMarkerU" , 1*mm , SiliconFace/4 , 1*mm ) ; - G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , Vacuum , "logicMarkerV",0,0,0) ; + G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , m_MaterialVacuum , "logicMarkerV",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerV),logicMarkerV,"MarkerV",world,false,0) ; G4VisAttributes* MarkerVVisAtt= new G4VisAttributes(G4Colour(0.,0.5,0.5));//green @@ -284,7 +219,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , FirstStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, Silicon, "logicFirstStage", 0, 0, 0); + G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, m_MaterialSilicon, "logicFirstStage", 0, 0, 0); new G4PVPlacement(0, positionFirstStage, @@ -313,7 +248,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , SecondStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, Silicon, "logicSecondStage", 0, 0, 0); + G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, m_MaterialSilicon, "logicSecondStage", 0, 0, 0); new G4PVPlacement(0, positionSecondStage, @@ -342,7 +277,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , ThirdStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, Silicon, "logicThirdStage", 0, 0, 0); + G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, m_MaterialSilicon, "logicThirdStage", 0, 0, 0); new G4PVPlacement(0, positionThirdStage, @@ -371,7 +306,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , FourthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, Silicon, "logicFourthStage", 0, 0, 0); + G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, m_MaterialSilicon, "logicFourthStage", 0, 0, 0); new G4PVPlacement(0, positionFourthStage, @@ -400,7 +335,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , FifthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, Silicon, "logicFifthStage", 0, 0, 0); + G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, m_MaterialSilicon, "logicFifthStage", 0, 0, 0); new G4PVPlacement(0, positionFifthStage, @@ -429,7 +364,7 @@ void Hyde2TrackerTrapezoid1::VolumeMaker(G4int TelescopeNumber , SixthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, Silicon, "logicSixthStage", 0, 0, 0); + G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, m_MaterialSilicon, "logicSixthStage", 0, 0, 0); new G4PVPlacement(0, positionSixthStage, diff --git a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc index dda48be0570d5cfd91359e170b8c83357f02161e..4253178c1c26f767466073f448c3fff738208e25 100644 --- a/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc +++ b/NPSimulation/Hyde2/Hyde2TrackerTrapezoid2.cc @@ -168,71 +168,6 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , Number << NbrTelescopes ; DetectorNumber = Number.str() ; - //////////////////////////////////////////////////////////////// - /////////////////Element Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - G4String symbol ; - G4double density = 0. , a = 0, z = 0 ; - G4int ncomponents = 0, natoms = 0 ; - - G4Element* H = new G4Element("Hydrogen" , symbol = "H" , z = 1 , a = 1.01 * g / mole); - G4Element* C = new G4Element("Carbon" , symbol = "C" , z = 6 , a = 12.011 * g / mole); - G4Element* N = new G4Element("Nitrogen" , symbol = "N" , z = 7 , a = 14.01 * g / mole); - G4Element* O = new G4Element("Oxigen" , symbol = "O" , z = 8 , a = 16.00 * g / mole); - G4Element* I = new G4Element("Iode" , symbol = "I" , z = 53 , a = 126.9 * g / mole); - G4Element* Cs = new G4Element("Cesium" , symbol = "Cs" , z = 55 , a = 132.9 * g / mole); - - G4Element* Co = new G4Element("Cobalt" , symbol = "Co" , z = 27 , a = 58.933 * g / mole); - G4Element* Cr = new G4Element("Cromium" , symbol = "Cr" , z = 24 , a = 51.996 * g / mole); - G4Element* Ni = new G4Element("Nickel" , symbol = "Ni" , z = 28 , a = 58.69 * g / mole); - G4Element* Fe = new G4Element("Iron" , symbol = "Fe" , z = 26 , a = 55.847 * g / mole); - G4Element* W = new G4Element("Tungsten" , symbol = "W" , z = 74 , a = 183.5 * g / mole); - - //////////////////////////////////////////////////////////////// - /////////////////Material Definition /////////////////////////// - //////////////////////////////////////////////////////////////// - // Si - a = 28.0855 * g / mole; - density = 2.321 * g / cm3; - G4Material* Silicon = new G4Material("Si", z = 14., a, density); - - // Al -// density = 2.702 * g / cm3; -// a = 26.98 * g / mole; -// G4Material* Aluminium = new G4Material("Aluminium", z = 13., a, density); - - // Iron -// density = 7.874 * g / cm3; -// a = 55.847 * g / mole; -// G4Material* Iron = new G4Material("Iron", z = 26., a, density); - - // CsI - density = 4.51 * g / cm3; - G4Material* CsI = new G4Material("CsI", density, ncomponents = 2); - CsI->AddElement(Cs , natoms = 1); - CsI->AddElement(I , natoms = 1); - - // Vacuum - density = 0.000000001 * mg / cm3; - G4Material* Vacuum = new G4Material("Vacuum", density, ncomponents = 2); - Vacuum->AddElement(N, .7); - Vacuum->AddElement(O, .3); - - // Mylar - density = 1.397 * g / cm3; - G4Material* Myl = new G4Material("Mylar", density, ncomponents = 3); - Myl->AddElement(C, natoms = 10); - Myl->AddElement(H, natoms = 8); - Myl->AddElement(O, natoms = 4); - - // Havar - G4Material* Harvar = new G4Material("Havar", 8.3*g / cm3, 5); - Harvar->AddElement(Co , 42); - Harvar->AddElement(Cr , 20); - Harvar->AddElement(Ni , 13); - Harvar->AddElement(Fe , 19); - Harvar->AddElement(W , 1); - //////////////////////////////////////////////////////////////// ////////////// Starting Volume Definition ////////////////////// //////////////////////////////////////////////////////////////// @@ -243,7 +178,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , Length/2, 0*deg, 0*deg, Height/2, BaseLarge/2, BaseSmall/2, 0*deg, Height/2, BaseLarge/2, BaseSmall/2, 0*deg); - G4LogicalVolume* logicHYD2Trapezoid2 = new G4LogicalVolume(solidHYD2Trapezoid2, Vacuum, Name, 0, 0, 0); + G4LogicalVolume* logicHYD2Trapezoid2 = new G4LogicalVolume(solidHYD2Trapezoid2, m_MaterialVacuum, Name, 0, 0, 0); new G4PVPlacement(G4Transform3D(*MMrot, MMpos), logicHYD2Trapezoid2, Name, world, false, 0); @@ -258,7 +193,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , /* G4ThreeVector positionMarkerU = CT*0.98 + MMu*SiliconFace/4; G4Box* solidMarkerU = new G4Box( "solidMarkerU" , SiliconFace/4 , 1*mm , 1*mm ) ; - G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , Vacuum , "logicMarkerU",0,0,0) ; + G4LogicalVolume* logicMarkerU = new G4LogicalVolume( solidMarkerU , m_MaterialVacuum , "logicMarkerU",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerU),logicMarkerU,"MarkerU",world,false,0) ; G4VisAttributes* MarkerUVisAtt= new G4VisAttributes(G4Colour(0.,0.,0.5));//blue @@ -266,7 +201,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , G4ThreeVector positionMarkerV = CT*0.98 + MMv*SiliconFace/4; G4Box* solidMarkerV = new G4Box( "solidMarkerU" , 1*mm , SiliconFace/4 , 1*mm ) ; - G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , Vacuum , "logicMarkerV",0,0,0) ; + G4LogicalVolume* logicMarkerV = new G4LogicalVolume( solidMarkerV , m_MaterialVacuum , "logicMarkerV",0,0,0) ; PVPBuffer = new G4PVPlacement(G4Transform3D(*MMrot,positionMarkerV),logicMarkerV,"MarkerV",world,false,0) ; G4VisAttributes* MarkerVVisAtt= new G4VisAttributes(G4Colour(0.,0.5,0.5));//green @@ -284,7 +219,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , FirstStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, Silicon, "logicFirstStage", 0, 0, 0); + G4LogicalVolume* logicFirstStage = new G4LogicalVolume(solidFirstStage, m_MaterialSilicon, "logicFirstStage", 0, 0, 0); new G4PVPlacement(0, positionFirstStage, @@ -313,7 +248,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , SecondStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, Silicon, "logicSecondStage", 0, 0, 0); + G4LogicalVolume* logicSecondStage = new G4LogicalVolume(solidSecondStage, m_MaterialSilicon, "logicSecondStage", 0, 0, 0); new G4PVPlacement(0, positionSecondStage, @@ -342,7 +277,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , ThirdStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, Silicon, "logicThirdStage", 0, 0, 0); + G4LogicalVolume* logicThirdStage = new G4LogicalVolume(solidThirdStage, m_MaterialSilicon, "logicThirdStage", 0, 0, 0); new G4PVPlacement(0, positionThirdStage, @@ -371,7 +306,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , FourthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, Silicon, "logicFourthStage", 0, 0, 0); + G4LogicalVolume* logicFourthStage = new G4LogicalVolume(solidFourthStage, m_MaterialSilicon, "logicFourthStage", 0, 0, 0); new G4PVPlacement(0, positionFourthStage, @@ -400,7 +335,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , FifthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, Silicon, "logicFifthStage", 0, 0, 0); + G4LogicalVolume* logicFifthStage = new G4LogicalVolume(solidFifthStage, m_MaterialSilicon, "logicFifthStage", 0, 0, 0); new G4PVPlacement(0, positionFifthStage, @@ -429,7 +364,7 @@ void Hyde2TrackerTrapezoid2::VolumeMaker(G4int TelescopeNumber , SixthStageThickness/2, 0*deg, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg, FirstStageHeight/2, FirstStageBaseLarge/2, FirstStageBaseSmall/2, 0*deg); - G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, Silicon, "logicSixthStage", 0, 0, 0); + G4LogicalVolume* logicSixthStage = new G4LogicalVolume(solidSixthStage, m_MaterialSilicon, "logicSixthStage", 0, 0, 0); new G4PVPlacement(0, positionSixthStage,