# next, create the G4 algorithm, giving the list of names of tools ("XX/YY") from Configurables import SimG4PrimariesFromEdmTool particle_converter = SimG4PrimariesFromEdmTool("EdmConverter") particle_converter.GenParticles.Path = "GenParticles" from Configurables import SimG4Alg geantsim = SimG4Alg("SimG4Alg") geantsim.eventProvider = particle_converter ApplicationMgr().TopAlg += [geantsim] ############## Digitization (Merging hits into cells, EM scale calibration) # EM scale calibration (sampling fraction) from Configurables import CalibrateInLayersTool calibEcalBarrel = CalibrateInLayersTool("CalibrateECalBarrel") calibEcalBarrel.samplingFraction = [0.36571381189697705] * 1 + [0.09779064189677973] * 1 + [0.12564152224404024] * 1 + [0.14350599973146283] * 1 + [0.1557126972314961] * 1 + [0.16444759076233928] * 1 + [0.17097165096847836] * 1 + [0.17684775359805122] * 1 + [0.18181154293837265] * 1 + [0.18544247938196395] * 1 + [0.18922747431624687] * 1 + [0.21187001375505543] * 1 calibEcalBarrel.readoutName = "ECalBarrelEta" calibEcalBarrel.layerFieldName = "layer" from Configurables import CalibrateCaloHitsTool calibHcells = CalibrateCaloHitsTool("CalibrateHCal") calibHcells.invSamplingFraction = "41.66" # Create cells in ECal barrel # 1. step - merge hits into cells with Eta and module segmentation (phi module is a 'physical' cell i.e. lead + LAr + PCB + LAr +lead) # 2. step - rewrite the cellId using the Eta-Phi segmentation (merging several modules into one phi readout cell) from Configurables import CreateCaloCells createEcalBarrelCellsStep1 = CreateCaloCells("CreateECalBarrelCellsStep1") createEcalBarrelCellsStep1.doCellCalibration = True createEcalBarrelCellsStep1.calibTool = calibEcalBarrel createEcalBarrelCellsStep1.addCellNoise = False
particle_converter = SimG4PrimariesFromEdmTool("EdmConverter") particle_converter.GenParticles.Path = "GenParticles" from Configurables import SimG4Alg geantsim = SimG4Alg("SimG4Alg") geantsim.eventProvider = particle_converter ApplicationMgr().TopAlg += [geantsim] ############## Digitization (Merging hits into cells, EM scale calibration) # EM scale calibration (sampling fraction) from Configurables import CalibrateInLayersTool calibEcalBarrel = CalibrateInLayersTool("CalibrateECalBarrel") calibEcalBarrel.samplingFraction = [0.303451138049] * 1 + [ 0.111872504159 ] * 1 + [0.135806495306] * 1 + [0.151772636618] * 1 + [0.163397436122] * 1 + [ 0.172566977313 ] * 1 + [0.179855253903] * 1 + [0.186838417657] * 1 + [0.192865946689] * 1 + [ 0.197420241611 ] * 1 + [0.202066552306] * 1 + [0.22646764465] * 1 calibEcalBarrel.readoutName = "ECalBarrelEta" calibEcalBarrel.layerFieldName = "layer" from Configurables import CalibrateCaloHitsTool calibHcells = CalibrateCaloHitsTool("CalibrateHCal") calibHcells.invSamplingFraction = "41.66" # Create cells in ECal barrel # 1. step - merge hits into cells with Eta and module segmentation (phi module is a 'physical' cell i.e. lead + LAr + PCB + LAr +lead) # 2. step - rewrite the cellId using the Eta-Phi segmentation (merging several modules into one phi readout cell) from Configurables import CreateCaloCells createEcalBarrelCellsStep1 = CreateCaloCells("CreateECalBarrelCellsStep1")