'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'
    ],
    OutputLevel=INFO)

# additionally for HCal
from Configurables import RewriteBitfield
# Use Phi-Eta segmentation in Hcal barrel
rewriteHcal = RewriteBitfield(
    "RewriteHCal",
    # old bitfield (readout)
    oldReadoutName="HCalBarrelReadout",
    # specify which fields are going to be deleted
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
    newReadoutName="BarHCal_Readout_phieta",
    debugPrint=10,
    OutputLevel=INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteHcal.inhits.Path = "HCalBarrelCells"
rewriteHcal.outhits.Path = "newHCalBarrelCells"

rewriteExtHcal = RewriteBitfield(
    "RewriteExtHcal",
    # old bitfield (readout)
    oldReadoutName=hcalExtBarrelReadoutName,
    # specify which fields are going to be altered (deleted/rewritten)
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
Ejemplo n.º 2
0
        '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'
    ],
    OutputLevel=INFO)

# additionally for HCal
from Configurables import RewriteBitfield
# Use Phi-Eta segmentation in Hcal barrel
rewriteHcal = RewriteBitfield(
    "RewriteHCal",
    # old bitfield (readout)
    oldReadoutName="HCalBarrelReadout",
    # specify which fields are going to be deleted
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
    newReadoutName="BarHCal_Readout_phieta",
    debugPrint=10,
    OutputLevel=INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteHcal.inhits.Path = "HCalBarrelCells"
rewriteHcal.outhits.Path = "newHCalBarrelCells"

rewriteExtHcal = RewriteBitfield(
    "RewriteExtHcal",
    # old bitfield (readout)
    oldReadoutName=hcalExtBarrelReadoutName,
    # specify which fields are going to be altered (deleted/rewritten)
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
    newReadoutName=hcalExtBarrelReadoutPhiEtaName,
    debugPrint=10,
    OutputLevel=INFO,
    inhits="HCalExtBarrelPositions",
    outhits="newHCalExtBarrelCells")

##############################################################################################################
#######                                       REWRITE ENDCAP BITFIELD                            #############
##############################################################################################################

from Configurables import RewriteBitfield
rewriteECalEC = RewriteBitfield(
    "RewriteECalEC",
    # old bitfield (readout)
    oldReadoutName="EMECPhiEta",
    # specify which fields are going to be deleted
    removeIds=["sublayer"],
    # new bitfield (readout), with new segmentation
    newReadoutName=ecalEndcapReadoutName,
    debugPrint=10,
    OutputLevel=INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteECalEC.inhits.Path = "ECalEndcapCells"
rewriteECalEC.outhits.Path = "newECalEndcapCells"

rewriteHCalEC = RewriteBitfield(
    "RewriteHCalEC",
    # old bitfield (readout)
    oldReadoutName="HECPhiEta",
    # specify which fields are going to be deleted
    removeIds=["sublayer"],
    # new bitfield (readout), with new segmentation
]
geoservice.OutputLevel = WARNING

ecalBarrelNoisePath = "root://eospublic.cern.ch//eos/experiment/fcc/ee/simulation/NoiseConstants/elecNoise_ecalBarrelFCCee_50Ohm_traces1_4shieldWidth.root"
ecalEndcapNoisePath = "elecNoise_emec_50Ohm_2shieldWidth_6layers.root"
ecalBarrelNoiseHistName = "h_elecNoise_fcc_"
ecalEndcapNoiseHistName = "h_elecNoise_fcc_"

# additionally for HCal
from Configurables import RewriteBitfield
# Use Phi-Eta segmentation in Hcal barrel
rewriteHcal = RewriteBitfield(
    "RewriteHCal",
    # old bitfield (readout)
    oldReadoutName="HCalBarrelReadout",
    # specify which fields are going to be deleted
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
    newReadoutName="BarHCal_Readout_phieta",
    debugPrint=10,
    OutputLevel=INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteHcal.inhits.Path = "HCalBarrelCells"
rewriteHcal.outhits.Path = "newHCalBarrelCells"

rewriteExtHcal = RewriteBitfield(
    "RewriteExtHcal",
    # old bitfield (readout)
    oldReadoutName="HCalExtBarrelReadout",  #hcalExtBarrelReadoutName,
    # specify which fields are going to be altered (deleted/rewritten)
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
HCalBsegcells.radii = [291.05, 301.05, 313.55, 328.55, 343.55, 358.55, 378.55, 413.55, 428.55, 453.55]
HCalBsegcells.OutputLevel = INFO

from Configurables import CellPositionsCaloDiscsTool
HECcells = CellPositionsCaloDiscsTool("CellPositionsHEC")
HECcells.readoutName = hcalEndcapReadoutName

from Configurables import CellPositionsCaloDiscsTool
HCalFwdcells = CellPositionsCaloDiscsTool("CellPositionsHCalFwd")
HCalFwdcells.readoutName = hcalFwdReadoutName


# additionally for HCal                                 
from Configurables import RewriteBitfield
# Use Phi-Eta segmentation in Hcal barrel               
rewriteHcal = RewriteBitfield("RewriteHCal")
# old bitfield (readout)
rewriteHcal.oldReadoutName = "HCalBarrelReadout"
# specify which fields are going to be deleted 
rewriteHcal.removeIds = ["row"]
# new bitfield (readout), with new segmentation
rewriteHcal.newReadoutName = "BarHCal_Readout_phieta"
rewriteHcal.debugPrint = 10
rewriteHcal.OutputLevel= INFO
# clusters are needed, with deposit position and cellID in bits
rewriteHcal.inhits.Path = "HCalBarrelCells"
rewriteHcal.outhits.Path = "newHCalBarrelCells"
ApplicationMgr().TopAlg += [rewriteHcal]

rewriteExtHcal = RewriteBitfield("RewriteExtHcal")
# old bitfield (readout)
                                      OutputLevel=INFO)
HCalFwdcells = CellPositionsCaloDiscsTool("CellPositionsHCalFwd",
                                          readoutName=hcalFwdReadoutName,
                                          OutputLevel=INFO)

#Configure tools for calo reconstruction
from Configurables import RewriteBitfield, CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, LayerPhiEtaCaloTool
calibHcells = CalibrateCaloHitsTool("CalibrateHCal",
                                    invSamplingFraction="41.7 ")
noise = NoiseCaloCellsFlatTool("HCalNoise", cellNoise=0.01)

rewriteHCal = RewriteBitfield(
    "RewriteHCal",
    # old bitfield (readout)
    oldReadoutName="HCalBarrelReadout",
    # specify which fields are going to be deleted
    removeIds=["row"],
    # new bitfield (readout), with new segmentation
    newReadoutName="BarHCal_Readout_phieta",
    debugPrint=10,
    OutputLevel=INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteHCal.inhits.Path = "HCalBarrelCells"
rewriteHCal.outhits.Path = "HCalBarrelCellsStep1"

from Configurables import CreateCaloCells, NoiseCaloCellsFromFileTool, TubeLayerPhiEtaCaloTool, CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, NestedVolumesCaloTool
#ECal Barrel noise
noiseBarrel = NoiseCaloCellsFromFileTool(
    "NoiseBarrel",
    readoutName=ecalBarrelReadoutName,
    noiseFileName=ecalBarrelNoisePath,
    elecNoiseHistoName=ecalBarrelNoiseHistName,
Ejemplo n.º 7
0
                                        saveEdm=True,
                                        particleName="e-",
                                        energyMin=50000,
                                        energyMax=50000,
                                        etaMin=2,
                                        etaMax=2)
geantsim = SimG4Alg("SimG4Alg",
                    outputs=["SimG4SaveCalHits/saveECalHits"],
                    eventProvider=pgun)

from Configurables import RewriteBitfield
rewrite = RewriteBitfield(
    "Rewrite",
    # old bitfield (readout)
    oldReadoutName="EMECPhiEta",
    # specify which fields are going to be deleted
    removeIds=["sublayer"],
    # new bitfield (readout), with new segmentation
    newReadoutName="EMECPhiEtaReco",
    debugPrint=10,
    OutputLevel=DEBUG)
# clusters are needed, with deposit position and cellID in bits
rewrite.inhits.Path = "caloHits"
rewrite.outhits.Path = "caloRecoHits"

# PODIO algorithm
from Configurables import FCCDataSvc, PodioOutput
podiosvc = FCCDataSvc("EventDataSvc")
out = PodioOutput("out")
out.outputCommands = ["keep *"]
out.filename = "rewrittenBitfield_ecalEndcapSim.root"
Ejemplo n.º 8
0
hcalVolumeName = ["moduleVolume", "wedgeVolume", "layerVolume"]
# ECAL bitfield names & values
hcalFieldNames=["system"]
hcalFieldValues=[8]

#Configure tools for calo reconstruction
from Configurables import RewriteBitfield, CalibrateCaloHitsTool, NoiseCaloCellsFlatTool, LayerPhiEtaCaloTool
calibHcells = CalibrateCaloHitsTool("CalibrateHCal", invSamplingFraction="41.7 ")
noise = NoiseCaloCellsFlatTool("HCalNoise",
                               cellNoise = 0.01)

rewriteHCal = RewriteBitfield("RewriteHCal",
                                # old bitfield (readout)
                                oldReadoutName = "HCalBarrelReadout",
                                # specify which fields are going to be deleted
                                removeIds = ["row"],
                                # new bitfield (readout), with new segmentation
                                newReadoutName = "BarHCal_Readout_phieta",
                                debugPrint = 10,
                                OutputLevel= INFO)
# clusters are needed, with deposit position and cellID in bits
rewriteHCal.inhits.Path = "HCalHits"
rewriteHCal.outhits.Path = "HCalBarrelCellsStep1"

# Geometry for layer-eta-phi segmentation
barrelHcalGeometry = LayerPhiEtaCaloTool("BarrelHcalGeo",
                                         readoutName = "BarHCal_Readout_phieta",
                                         activeVolumeName = "layerVolume",
                                         activeFieldName = "layer",
                                         fieldNames = ["system"],
                                         fieldValues = [8],