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)
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)
Ejemplo n.º 3
0
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