Example #1
0
        'file:Detector/DetFCChhBaseline1/compact/FCChh_TrackerAir.xml',
        'file:Detector/DetFCChhECalSimple/compact/FCChh_ECalBarrel_Gflash.xml'
    ])

# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
from Configurables import SimG4Svc, SimG4FastSimPhysicsList, SimG4ParticleSmearFormula, SimG4FastSimTrackerRegion, SimG4GflashSamplingCalo, SimG4FastSimCalorimeterRegion
## create particle smearing tool, used for smearing in the tracker
smeartool = SimG4ParticleSmearFormula("smear", resolutionMomentum="0.013")
## create region and a parametrisation model, pass smearing tool
regiontooltracker = SimG4FastSimTrackerRegion(
    "modelTracker", volumeNames=["TrackerEnvelopeBarrel"], smearing=smeartool)
## create parametrisation of the calorimeter
gflash = SimG4GflashSamplingCalo("gflash",
                                 materialActive="G4_lAr",
                                 materialPassive="G4_Pb",
                                 thicknessActive=4,
                                 thicknessPassive=2)
regiontoolcalo = SimG4FastSimCalorimeterRegion("modelCalo",
                                               volumeNames=["ECalBarrel"],
                                               parametrisation=gflash)
## create overlay on top of FTFP_BERT physics list, attaching fast sim/parametrization process
physicslisttool = SimG4FastSimPhysicsList("Physics",
                                          fullphysics="SimG4FtfpBert")
## attach those tools to the G4 service
geantservice = SimG4Svc("SimG4Svc",
                        physicslist=physicslisttool,
                        regions=[
                            "SimG4FastSimTrackerRegion/modelTracker",
                            "SimG4FastSimCalorimeterRegion/modelCalo"
                        ])
Example #2
0
# Geant4 service
# Configures the Geant simulation: geometry, physics list and user actions
from Configurables import SimG4ParticleSmearFormula
## create particle smearing tool, used for smearing in the tracker
smeartool = SimG4ParticleSmearFormula("smear")
smeartool.resolutionMomentum = "0.013"

from Configurables import SimG4FastSimTrackerRegion
## create region and a parametrisation model, pass smearing tool
regiontooltracker = SimG4FastSimTrackerRegion("modelTracker")
regiontooltracker.volumeNames = ["TrackerEnvelopeBarrel"]
regiontooltracker.smearing = smeartool

from Configurables import SimG4GflashSamplingCalo
## create parametrisation of the calorimeter
gflash = SimG4GflashSamplingCalo("gflash")
gflash.materialActive = "G4_lAr"
gflash.materialPassive = "G4_Pb"
gflash.thicknessActive = 4
gflash.thicknessPassive = 2

from Configurables import SimG4FastSimCalorimeterRegion
regiontoolcalo = SimG4FastSimCalorimeterRegion("modelCalo")
regiontoolcalo.volumeNames = ["ECalBarrel"]
regiontoolcalo.parametrisation = gflash

from Configurables import SimG4FastSimPhysicsList
## create overlay on top of FTFP_BERT physics list, attaching fast sim/parametrization process
physicslisttool = SimG4FastSimPhysicsList("Physics")
physicslisttool.fullphysics = "SimG4FtfpBert"