Beispiel #1
0
 def do_Physics(self):
     """
     Physics list from the simFlags.PhysicsList flag with default cut of 1mm.
     """
     atlasphysics = PyG4Atlas.PhysicsList(simFlags.PhysicsList.get_Value(),
                                          1)
     AtlasG4Eng.G4Eng.add_PhysicsList(atlasphysics)
Beispiel #2
0
 def do_GeoSD(self):
     """ Describes the geometry and sensitive detectors.
     """
     ## World volume
     worldvolume = PyG4Atlas.DetFacility("ResizeableBox", "WorldVolume")
     worldvolume.df.SetDx(5000.)  #  half dimension in mm
     worldvolume.df.SetDy(5000.)
     worldvolume.df.SetDz(5000.)
     AtlasG4Eng.G4Eng.add_DetFacility(worldvolume, worldvolume)
     ## Add 2 scintillators: S1 and S2
     s1 = PyG4Atlas.DetFacility("ResizeableBox", "S1")
     s2 = PyG4Atlas.DetFacility("ResizeableBox", "S2")
     ## + dimensions
     s1.df.SetDx(10.)
     s1.df.SetDy(500.)
     s1.df.SetDz(500.)
     s2.df.SetDx(10.)
     s2.df.SetDy(200.)
     s2.df.SetDz(200.)
     ## + material
     from G4AtlasApps import atlas_materials
     s1.df.SetMaterial("Scintillator")
     s2.df.SetMaterial("Scintillator")
     ## + position
     s1.df.MoveTo(AtlasG4Eng.G4Eng.gbl.CLHEP.Hep3Vector(-20.0, 0.0, 0.0))
     s2.df.MoveTo(AtlasG4Eng.G4Eng.gbl.CLHEP.Hep3Vector(+100.0, 10.0, 0.0))
     s2.df.RotateX(0.7854)  # will be also rotated
     ## Adding scintillators to the G4Eng
     AtlasG4Eng.G4Eng.add_DetFacility(s1, worldvolume)
     AtlasG4Eng.G4Eng.add_DetFacility(s2, worldvolume)
     ## Adding a generic scintillator SD
     from G4AtlasApps.atlas_utilities import ScintillatorSD
     GenScintSD = ScintillatorSD(['S1', 'S2'])
     ## A block of iron
     iron = PyG4Atlas.DetFacility("ResizeableBox", "IRON")
     iron.df.SetDx(100.)
     iron.df.SetDy(100.)
     iron.df.SetDz(100.)
     iron.df.MoveTo(AtlasG4Eng.G4Eng.gbl.CLHEP.Hep3Vector(
         +1000.0, 0.0, 0.0))
     iron.df.SetMaterial("Iron")
     AtlasG4Eng.G4Eng.add_DetFacility(iron, worldvolume)
Beispiel #3
0
    def _initPR(self):
        """ Describes the physics regions for LAr H6.
        """
        from G4AtlasApps.SimFlags import simFlags
        from AthenaCommon.DetFlags    import DetFlags

        if (simFlags.SimLayout.get_Value()=="tb_LArH6_2003"):
            if (DetFlags.FCal_on()):
                self.H6_lar_PhysReg=PyG4Atlas.PhysicsReg('FCAL')
                self.H6_lar_PhysReg.add_Volumes('LArMgr::LAr::FCAL::LiquidArgonC')
                self.H6_lar_PhysReg.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg)
        elif (simFlags.SimLayout.get_Value()=="tb_LArH6_2002"):
            if (DetFlags.HEC_on()):
                self.H6_lar_PhysReg=PyG4Atlas.PhysicsReg('HEC')
                self.H6_lar_PhysReg.add_Volumes('LArMgr::LAr::HEC::LiquidArgon')
                self.H6_lar_PhysReg.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg)
        elif (simFlags.SimLayout.get_Value()=="tb_LArH6EC_2002"):
            if (DetFlags.em_on()):
                self.H6_lar_PhysReg=PyG4Atlas.PhysicsReg('EMEC')
                self.H6_lar_PhysReg.add_Volumes('LArMgr::LAr::EMEC::Mother')
                self.H6_lar_PhysReg.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg)
        elif (simFlags.SimLayout.get_Value()=="tb_LArH6_2004"):
            if (simFlags.LArTB_H6Hec.get_Value()):
                self.H6_lar_PhysReg=PyG4Atlas.PhysicsReg('HEC')
                self.H6_lar_PhysReg.add_Volumes('LArMgr::LAr::HEC::LiquidArgon')
                self.H6_lar_PhysReg.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg)
            if (simFlags.LArTB_H6Emec.get_Value()):
                self.H6_lar_PhysReg1=PyG4Atlas.PhysicsReg('EMEC')
                self.H6_lar_PhysReg1.add_Volumes('LArMgr::LAr::EMEC::Mother')
                self.H6_lar_PhysReg1.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg1.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg1.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg1)
            if (simFlags.LArTB_H6Fcal.get_Value()):
                self.H6_lar_PhysReg2=PyG4Atlas.PhysicsReg('FCAL')
                self.H6_lar_PhysReg2.add_Volumes('LArMgr::LAr::FCAL::LiquidArgonC')
                self.H6_lar_PhysReg2.add_Cuts('e-',0.03)
                self.H6_lar_PhysReg2.add_Cuts('e+',0.03)
                self.H6_lar_PhysReg2.add_Cuts('gamma',0.03)
                self.H6_lar.add_PhysicsReg(self.H6_lar_PhysReg2)
Beispiel #4
0
    def __init__(self,mode):
        """ Depending on thee LArH6 TB the world volume box will have
           different dimensions

            + mode can be:
                 'tb_LArH6_2003', 'tb_LArH6_2002', 'tb_LArH6EC_2002', 'tb_LArH6_2004'
        """
        self.world=PyG4Atlas.DetFacility("ResizeableBox","LARTBWORLD")
        if (mode=='tb_LArH6_2003'):
            self.world.df.SetDx(25500.)
            self.world.df.SetDy(25500.)
            self.world.df.SetDz(50500.)
        elif (mode=='tb_LArH6_2002' or mode=='tb_LArH6_2004'):
            self.world.df.SetDx(14500.)
            self.world.df.SetDy(14500.)
            self.world.df.SetDz(50500.)
        elif (mode=='tb_LArH6EC_2002'):
            self.world.df.SetDx(5500.)
            self.world.df.SetDy(5500.)
            self.world.df.SetDz(15500.)
Beispiel #5
0
 def __init__(self):
     """ Inits the geometry of the LAr for the H6 test beam.
     """
     self.H6_lar=PyG4Atlas.DetFacility("GeoDetector","LArMgr:LArMgr")