# active material volume name
ecalVolumeName = "LAr_sensitive"
# ECAL bitfield names & values
ecalFieldNames = ["system", "ECAL_Cryo", "bath", "EM_barrel"]
ecalFieldValues = [5, 1, 1, 1]

#Configure tools for calo reconstruction
from Configurables import CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, TubeLayerPhiEtaCaloTool

calibcells = CalibrateCaloHitsTool("CalibrateCaloHitsTool",
                                   invSamplingFraction="5.4")
noise = NoiseCaloCellsFlatTool("NoiseCaloCellsFlatTool", cellNoise=0.01)
ecalgeo = TubeLayerPhiEtaCaloTool("EcalGeo",
                                  readoutName=ecalReadoutName,
                                  activeVolumeName=ecalVolumeName,
                                  activeFieldName=ecalIdentifierName,
                                  fieldNames=ecalFieldNames,
                                  fieldValues=ecalFieldValues,
                                  OutputLevel=DEBUG)

from Configurables import CreateCaloCells

createcells = CreateCaloCells("CreateCaloCells",
                              geometryTool=ecalgeo,
                              doCellCalibration=True,
                              calibTool=calibcells,
                              addCellNoise=True,
                              filterCellNoise=False,
                              noiseTool=noise,
                              OutputLevel=DEBUG)
createcells.hits.Path = "ECalHits"
rewriteHCalEC.outhits.Path = "newHCalEndcapCells"

# add noise, create all existing cells in detector
from Configurables import NoiseCaloCellsFromFileTool, TubeLayerPhiEtaCaloTool, LayerPhiEtaCaloTool, CreateCaloCells
noiseBarrel = NoiseCaloCellsFromFileTool(
    "NoiseBarrel",
    readoutName=ecalBarrelReadoutName,
    noiseFileName=ecalBarrelNoisePath,
    elecNoiseHistoName=ecalBarrelNoiseHistName,
    activeFieldName="layer",
    addPileup=False,
    numRadialLayers=8)
barrelGeometry = TubeLayerPhiEtaCaloTool("EcalBarrelGeo",
                                         readoutName=ecalBarrelReadoutName,
                                         activeVolumeName="LAr_sensitive",
                                         activeFieldName="layer",
                                         fieldNames=["system"],
                                         fieldValues=[5],
                                         activeVolumesNumber=8)
createEcalBarrelCells = CreateCaloCells(
    "CreateECalBarrelCells",
    geometryTool=barrelGeometry,
    doCellCalibration=False,  # already calibrated
    addCellNoise=True,
    filterCellNoise=False,
    noiseTool=noiseBarrel,
    hits=ecalBarrelCellsName,
    cells=ecalBarrelCellsName + "Noise",
    OutputLevel=DEBUG)

noiseHcal = NoiseCaloCellsFlatTool("HCalNoise", cellNoise=0.009)
rewriteHCalEC.outhits.Path = "newHCalEndcapCells"
ApplicationMgr().TopAlg += [rewriteHCalEC]

# add noise, create all existing cells in detector
from Configurables import NoiseCaloCellsFromFileTool
noiseBarrel = NoiseCaloCellsFromFileTool("NoiseBarrel")
noiseBarrel.readoutName = ecalBarrelReadoutName
noiseBarrel.noiseFileName = "root://eospublic.cern.ch//eos/experiment/fcc/hh/testsamples/elecNoise_ecalBarrel_50Ohm_traces2_2shieldWidth.root"
noiseBarrel.elecNoiseHistoName = "h_elecNoise_fcc_"
noiseBarrel.activeFieldName = "layer"
noiseBarrel.addPileup = False
noiseBarrel.cellPositionsTool = ECalBcells
noiseBarrel.numRadialLayers = 8

from Configurables import TubeLayerPhiEtaCaloTool
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
Esempio n. 4
0
#Configure tools for calo cell positions                    
from Configurables import CellPositionsDummyTool
dummyCells = CellPositionsDummyTool("CellPositions",
                                         OutputLevel = INFO)
#Configure tools for calo reconstruction
from Configurables import CalibrateCaloHitsTool, NoiseCaloCellsFromFileTool, TubeLayerPhiEtaCaloTool
calibcells = CalibrateCaloHitsTool("CalibrateCaloHitsTool", invSamplingFraction="5.4")
noise = NoiseCaloCellsFromFileTool("NoiseCaloCellsFromFileTool",
                                   cellPositionsTool=dummyCells,
    noiseFileName="http://fccsw.web.cern.ch/fccsw/testsamples/fcc_ecalCellNoise_mu1000_3radialLayers_v1.root")

ecalgeo = TubeLayerPhiEtaCaloTool("EcalGeo",
                                  readoutName = ecalReadoutName,
                                  activeVolumeName = ecalVolumeName,
                                  activeFieldName = ecalIdentifierName,
                                  fieldNames = ecalFieldNames,
                                  fieldValues = ecalFieldValues,
                                  # to make it working with MergeLayers algorithm
                                  activeVolumesNumber = ecalNumberOfLayers,
                                  )

from Configurables import CreateCaloCells
createcells = CreateCaloCells("CreateCaloCells",
                              geometryTool = ecalgeo,
                              doCellCalibration = True,
                              calibTool = calibcells,
                              addCellNoise = True, filterCellNoise = False,
                              noiseTool = noise,
                              OutputLevel=DEBUG,
                              )
createcells.hits.Path="mergedECalHits"
Esempio n. 5
0
                                        recalibrateBaseline=False,
                                        addCellNoise=False,
                                        filterCellNoise=False,
                                        hits="HCalBarrelCellsStep2",
                                        cells="newHCalBarrelCells")

##############################################################################################################
#######                                      GEOMETRY DISCRIPTIONS                               #############
##############################################################################################################

from Configurables import NestedVolumesCaloTool, TubeLayerPhiEtaCaloTool, LayerPhiEtaCaloTool
# add noise, create all existing cells in detector
barrelEcalGeometry = TubeLayerPhiEtaCaloTool("BarrelEcalGeo",
                                             readoutName="ECalBarrelPhiEta",
                                             activeVolumeName="LAr_sensitive",
                                             activeFieldName="layer",
                                             fieldNames=["system"],
                                             fieldValues=[5],
                                             activeVolumesNumber=8)

# No segmentation, geometry with nested volumes
hcalgeo = NestedVolumesCaloTool("HcalGeo",
                                activeVolumeName=hcalVolumeName,
                                activeFieldName=hcalIdentifierName,
                                readoutName="HCalBarrelReadout",
                                fieldNames=hcalFieldNames,
                                fieldValues=hcalFieldValues)

# Geometry for layer-eta-phi segmentation
barrelHcalGeometry = LayerPhiEtaCaloTool("BarrelHcalGeo",
                                         readoutName="BarHCal_Readout_phieta",