from Configurables import GeoSvc detectors_to_use = [ 'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', 'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml' ] geoservice = GeoSvc("GeoSvc", detectors=detectors_to_use, OutputLevel=INFO) #Configure tools for calo reconstruction from Configurables import ConstNoiseTool noiseTool = ConstNoiseTool("ConstNoiseTool") #Configure tools for calo cell positions from Configurables import CellPositionsECalBarrelTool, CellPositionsHCalBarrelNoSegTool, CellPositionsCaloDiscsTool ECalBcells = CellPositionsECalBarrelTool("CellPositionsECalBarrel", readoutName=ecalBarrelReadoutName, OutputLevel=INFO) EMECcells = CellPositionsCaloDiscsTool("CellPositionsEMEC", readoutName=ecalEndcapReadoutName, OutputLevel=INFO) ECalFwdcells = CellPositionsCaloDiscsTool("CellPositionsECalFwd", readoutName=ecalFwdReadoutName, OutputLevel=INFO) HCalBcells = CellPositionsHCalBarrelNoSegTool( "CellPositionsHCalBarrelVols", readoutName=hcalBarrelReadoutName, OutputLevel=INFO) HCalExtBcells = CellPositionsHCalBarrelNoSegTool( "CellPositionsHCalExtBarrel", readoutName=hcalExtBarrelReadoutName, OutputLevel=INFO)
'file:Detector/DetFCChhBaseline1/compact/FCChh_DectEmptyMaster.xml', #'file:Detector/DetFCChhTrackerTkLayout/compact/Tracker.xml', 'file:Detector/DetFCChhECalInclined/compact/FCChh_ECalBarrel_withCryostat.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalBarrel_TileCal.xml', 'file:Detector/DetFCChhHCalTile/compact/FCChh_HCalExtendedBarrel_TileCal.xml', 'file:Detector/DetFCChhCalDiscs/compact/Endcaps_coneCryo.xml', 'file:Detector/DetFCChhCalDiscs/compact/Forward_coneCryo.xml', ] geoservice.OutputLevel = WARNING ApplicationMgr().ExtSvc += [geoservice] #Configure tools for calo cell positions from Configurables import CellPositionsECalBarrelTool, CellPositionsHCalBarrelNoSegTool, CellPositionsHCalBarrelTool, CellPositionsCaloDiscsTool, CellPositionsTailCatcherTool from Configurables import CellPositionsECalBarrelTool ECalBcells = CellPositionsECalBarrelTool("CellPositionsECalBarrel") ECalBcells.readoutName = ecalBarrelReadoutName ECalBcells.OutputLevel = INFO from Configurables import CellPositionsCaloDiscsTool EMECcells = CellPositionsCaloDiscsTool("CellPositionsEMEC") EMECcells.readoutName = ecalBarrelReadoutName from Configurables import CellPositionsCaloDiscsTool ECalFwdcells = CellPositionsCaloDiscsTool("CellPositionsECalFwd") ECalFwdcells.readoutName = ecalFwdReadoutName ECalFwdcells.OutputLevel = INFO from Configurables import CellPositionsHCalBarrelNoSegTool HCalBcellVols = CellPositionsHCalBarrelNoSegTool("CellPositionsHCalBarrelVols") HCalBcellVols.readoutName = "HCalBarrelReadout"
smeartool = SimG4ParticleSmearFormula() smeartool.resolutionMomentum = momentumResolutionFormula smear = SimG4SmearGenParticles("smear", inParticles = "GenParticles", smearedParticles = "SmearedParticles", smearTool = smeartool, OutputLevel=DEBUG) #Configure tools for calo reconstruction from Configurables import ConstNoiseTool noiseTool = ConstNoiseTool("ConstNoiseTool") #Configure tools for calo cell positions from Configurables import CellPositionsECalBarrelTool, CellPositionsHCalBarrelTool, CellPositionsHCalBarrelNoSegTool, CellPositionsCaloDiscsTool, CellPositionsTailCatcherTool ECalBcells = CellPositionsECalBarrelTool("CellPositionsECalBarrel", readoutName = ecalBarrelReadoutName) HCalBcells = CellPositionsHCalBarrelTool("CellPositionsHCalBarrel", readoutName = hcalBarrelReadoutName, #"BarHCal_Readout_phieta", radii = [291.05, 301.05, 313.55, 328.55, 343.55, 358.55, 378.55, 413.55, 428.55, 453.55], OutputLevel = INFO) HCalExtBcells = CellPositionsHCalBarrelNoSegTool("CellPositionsHCalExtBarrel", readoutName = hcalExtBarrelReadoutName) EMECcells = CellPositionsCaloDiscsTool("CellPositionsEMEC", readoutName = ecalEndcapReadoutName, OutputLevel = INFO) ECalFwdcells = CellPositionsCaloDiscsTool("CellPositionsECalFwd", readoutName = ecalFwdReadoutName, OutputLevel = INFO) HECcells = CellPositionsCaloDiscsTool("CellPositionsHEC", readoutName = hcalEndcapReadoutName, OutputLevel = INFO)
resegmentEcalBarrel.outhits = "ECalBarrelCellsStep2" ApplicationMgr().TopAlg += [resegmentEcalBarrel] EcalBarrelCellsName = "ECalBarrelCells" from Configurables import CreateCaloCells createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells") createEcalBarrelCells.doCellCalibration = False createEcalBarrelCells.addCellNoise = False createEcalBarrelCells.filterCellNoise = False createEcalBarrelCells.hits = "ECalBarrelCellsStep2" createEcalBarrelCells.cells = "ECalBarrelCells" ApplicationMgr().TopAlg += [createEcalBarrelCells] # Ecal barrel cell positions (good for physics, all coordinates set properly) from Configurables import CellPositionsECalBarrelTool cellPositionEcalBarrelTool = CellPositionsECalBarrelTool("CellPositionsECalBarrel") cellPositionEcalBarrelTool.readoutName = "ECalBarrelPhiEta" from Configurables import CreateCaloCellPositionsFCCee createEcalBarrelPositionedCells = CreateCaloCellPositionsFCCee("ECalBarrelPositionedCells") createEcalBarrelPositionedCells.positionsECalBarrelTool = cellPositionEcalBarrelTool createEcalBarrelPositionedCells.hits.Path = "ECalBarrelCells" createEcalBarrelPositionedCells.positionedHits.Path = "ECalBarrelPositionedCells" ApplicationMgr().TopAlg += [createEcalBarrelPositionedCells] # Create cells in HCal # 1. step - merge hits into cells with the default readout createHcalBarrelCells = CreateCaloCells("CreateHCaloCells") createHcalBarrelCells.doCellCalibration = True createHcalBarrelCells.calibTool = calibHcells createHcalBarrelCells.addPosition = True