예제 #1
0
# common ECAL specific information
# readout name
ecalReadoutName = "ECalHitsPhiEta"
# active material identifier name
ecalIdentifierName = "active_layer"
# 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,
                    outputs=[
                        "SimG4SaveCalHits/saveECalBarrelHits",
                        "SimG4SaveCalHits/saveECalEndcapHits",
                        "SimG4SaveCalHits/saveECalFwdHits",
                        "SimG4SaveCalHits/saveHCalHits",
                        "SimG4SaveCalHits/saveExtHCalHits",
                        "SimG4SaveCalHits/saveHCalEndcapHits",
                        "SimG4SaveCalHits/saveHCalFwdHits"
                    ],
                    eventProvider=pgun,
                    OutputLevel=INFO)

#Configure tools for calo reconstruction
# EM scale calibration
from Configurables import CalibrateCaloHitsTool
calibHcells = CalibrateCaloHitsTool("CalibrateHCal",
                                    invSamplingFraction="41.66")

from Configurables import CalibrateInLayersTool
calibEcalBarrel = CalibrateInLayersTool(
    "CalibrateECalBarrel",
    # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
    samplingFraction=[0.12125] + [0.14283] + [0.16354] + [0.17662] +
    [0.18867] + [0.19890] + [0.20637] + [0.20802],
    readoutName=ecalBarrelReadoutName,
    layerFieldName="layer")

calibEcalEndcap = CalibrateCaloHitsTool("CalibrateECalEndcap",
                                        invSamplingFraction="13.89")
calibEcalFwd = CalibrateCaloHitsTool("CalibrateECalFwd",
                                     invSamplingFraction="303.03")
#invSamplingFractionHEC is approx. invSamplingFractionEMEC * passiveThickness_HEC / activeThickness_HEC
예제 #3
0
                                 "SimG4SaveCalHits/saveHCalBarrelHits",
                       ],
                       eventProvider=particle_converter,
                       OutputLevel=INFO)

############## Digitization (Merging hits into cells, EM scale calibration)
# EM scale calibration (sampling fraction)
from Configurables import CalibrateInLayersTool
calibEcalBarrel = CalibrateInLayersTool("CalibrateECalBarrel",
                                   # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
                                   samplingFraction =  [0.24833] * 1 + [0.09482] * 1  +  [0.12242] * 1  +  [0.14182] * 1  +  [0.15667] * 1  +  [0.16923] * 1  +  [0.17980] * 1  +  [0.20085] * 1,
                                   readoutName = ecalBarrelReadoutName,
                                   layerFieldName = "layer")

from Configurables import CalibrateCaloHitsTool
calibHcells = CalibrateCaloHitsTool("CalibrateHCal", invSamplingFraction="41.66")

# Create cells in ECal barrel
# 1. step - merge hits into cells with default Eta segmentation
# 2. step - rewrite the cellId using the Phi-Eta segmentation
from Configurables import CreateCaloCells
createEcalBarrelCellsStep1 = CreateCaloCells("CreateECalBarrelCellsStep1",
                               doCellCalibration=True,
                               calibTool = calibEcalBarrel,
                               addCellNoise=False, filterCellNoise=False,
                               OutputLevel=INFO,
                               hits="ECalBarrelHits",
                               cells="ECalBarrelCellsStep1")

# Use Phi-Eta segmentation in ECal barrel
from Configurables import RedoSegmentation
예제 #4
0
        numRadialLayers=8)

    createEcalBarrelCellsNoise = CreateCaloCells(
        "CreateECalBarrelCellsNoise",
        geometryTool=barrelEcalGeometry,
        doCellCalibration=False,
        recalibrateBaseline=False,  # already calibrated
        addCellNoise=True,
        filterCellNoise=False,
        noiseTool=noiseEcalBarrel,
        hits=inputCellCollectionECalBarrel,
        cells="ECalBarrelCellsNoise")

    # re-calibrate HCal Barrel cells to correct EM scale
    calibHcells = CalibrateCaloHitsTool("CalibrateHCal",
                                        invSamplingFraction=str(
                                            hadronSampl_hcal / emSampl_hcal))
    if not calib:
        EMscale = True
    else:
        EMscale = False
    # HCal Barrel noise
    noiseHcal = NoiseCaloCellsFlatTool("HCalNoise", cellNoise=0.01)

    if resegmentHCal:
        createHcalBarrelCellsNoise = CreateCaloCells(
            "CreateHCalBarrelCellsNoise",
            geometryTool=barrelHcalGeometry,
            doCellCalibration=EMscale,
            recalibrateBaseline=False,
            addCellNoise=True,