barrelGeometry = TubeLayerPhiEtaCaloTool("EcalBarrelGeo")
barrelGeometry.readoutName = ecalBarrelReadoutName
barrelGeometry.activeVolumeName = "LAr_sensitive"
barrelGeometry.activeFieldName = "layer"
barrelGeometry.fieldNames = ["system"]
barrelGeometry.fieldValues = [5]
barrelGeometry.activeVolumesNumber = 8

from Configurables import CreateCaloCells
createEcalBarrelCells = CreateCaloCells("CreateECalBarrelCells")
createEcalBarrelCells.geometryTool = barrelGeometry
createEcalBarrelCells.doCellCalibration=False # already calibrated
createEcalBarrelCells.addCellNoise=True
createEcalBarrelCells.filterCellNoise=False
createEcalBarrelCells.noiseTool = noiseBarrel
createEcalBarrelCells.hits=ecalBarrelCellsName
createEcalBarrelCells.cells=ecalBarrelCellsName+"Noise"
ApplicationMgr().TopAlg +=[createEcalBarrelCells]

# add noise, create all existing cells in detector
# currently only positive side!
from Configurables import NoiseCaloCellsFromFileTool
noiseEndcap = NoiseCaloCellsFromFileTool("NoiseEndcap")
noiseEndcap.readoutName = ecalEndcapReadoutName
noiseEndcap.noiseFileName = "root://eospublic.cern.ch//eos/experiment/fcc/hh/testsamples/elecNoise_emec_50Ohm_2shieldWidth_6layers.root"
noiseEndcap.elecNoiseHistoName = "h_elecNoise_fcc_"
noiseEndcap.activeFieldName = "layer"
noiseEndcap.addPileup = False
noiseEndcap.cellPositionsTool = EMECcells
noiseEndcap.numRadialLayers = 6
コード例 #2
0
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
createEcalBarrelCellsStep1.filterCellNoise = False
# todo: add when update on cvmfs
createEcalBarrelCellsStep1.addPosition = True
createEcalBarrelCellsStep1.hits = "ECalBarrelPositionedHits"
createEcalBarrelCellsStep1.cells = "ECalBarrelCellsStep1"
ApplicationMgr().TopAlg += [createEcalBarrelCellsStep1]

## Use Phi-Theta segmentation in ECal barrel
from Configurables import RedoSegmentation
resegmentEcalBarrel = RedoSegmentation("ReSegmentationEcal")
# old bitfield (readout)
resegmentEcalBarrel.oldReadoutName = "ECalBarrelEta"
# specify which fields are going to be altered (deleted/rewritten)
resegmentEcalBarrel.oldSegmentationIds = ["module"]
# new bitfield (readout), with new segmentation
resegmentEcalBarrel.newReadoutName = "ECalBarrelPhiEta"
resegmentEcalBarrel.inhits = "ECalBarrelCellsStep1"
resegmentEcalBarrel.outhits = "ECalBarrelCellsStep2"
ApplicationMgr().TopAlg += [resegmentEcalBarrel]