Exemple #1
0
                                        energyMax=50000,
                                        etaMin=2.,
                                        etaMax=2.)
geantsim = SimG4Alg("SimG4Alg",
                    outputs=[
                        "SimG4SaveCalHits/saveECalBarrelHits",
                        "SimG4SaveCalHits/saveECalEndcapHits"
                    ],
                    eventProvider=pgun)

#Configure tools for calo reconstruction
from Configurables import CalibrateInLayersTool
calibcellsBarrel = CalibrateInLayersTool(
    "CalibrateBarrel",
    # 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="ECalBarrelEta",
    layerFieldName="layer")
calibcellsEndcap = CalibrateInLayersTool(
    "CalibrateEndcap",
    # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
    samplingFraction=[0.15] * 118,
    readoutName="EMECPhiEta",
    layerFieldName="layer")

from Configurables import CreateCaloCells
createcellsBarrel = CreateCaloCells("CreateCaloCellsBarrel",
                                    doCellCalibration=True,
                                    calibTool=calibcellsBarrel,
                                    addCellNoise=False,
particle_converter.GenParticles.Path = "GenParticles"

from Configurables import SimG4Alg
geantsim = SimG4Alg("SimG4Alg",
                       outputs= ["SimG4SaveCalHits/saveECalBarrelHits",
                                 "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,
Exemple #3
0
                                        saveEdm=True,
                                        particleName="e-",
                                        energyMin=50000,
                                        energyMax=50000,
                                        etaMin=-1.5,
                                        etaMax=1.5)
geantsim = SimG4Alg("SimG4Alg",
                    outputs=["SimG4SaveCalHits/saveECalHits"],
                    eventProvider=pgun)

#Configure tools for calo reconstruction
from Configurables import CalibrateInLayersTool
calibcells = CalibrateInLayersTool(
    "Calibrate",
    # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
    samplingFraction=[0.168] * 4 + [0.176] * 18 + [0.184] * 18 + [0.191] * 18 +
    [0.198] * 18 + [0.204] * 18 + [0.210] * 18 + [0.215] * 18,
    readoutName="ECalHitsEta",
    layerFieldName="layer")

from Configurables import CreateCaloCells
createcells = CreateCaloCells("CreateCaloCells",
                              doCellCalibration=True,
                              calibTool=calibcells,
                              addCellNoise=False,
                              filterCellNoise=False,
                              OutputLevel=DEBUG)
createcells.hits.Path = "ECalHits"
createcells.cells.Path = "caloCells"

out = PodioOutput("out",
Exemple #4
0
geantsim = SimG4Alg("SimG4Alg",
                    outputs=[
                        "SimG4SaveCalHits/saveECalBarrelHits",
                        "SimG4SaveCalHits/saveHCalHits",
                        "SimG4SaveCalHits/saveExtHCalHits"
                    ],
                    eventProvider=pgun,
                    OutputLevel=DEBUG)

# Configure tools for calo reconstruction
from Configurables import CalibrateInLayersTool
calibEcells = CalibrateInLayersTool(
    "Calibrate",
    # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
    samplingFraction=[0.12125] * 4 + [0.14283] * 18 + [0.16354] * 18 +
    [0.17662] * 18 + [0.18867] * 18 + [0.19890] * 18 + [0.20637] * 18 +
    [0.20802] * 18,
    readoutName=ecalReadoutName,
    layerFieldName="layer")

#Configure tools for calo reconstruction - Calibration to EM scale
from Configurables import CalibrateCaloHitsTool
calibHcells = CalibrateCaloHitsTool("CalibrateHCal",
                                    invSamplingFraction="34.5")

from Configurables import CreateCaloCells
createEcells = CreateCaloCells("CreateECaloCells",
                               doCellCalibration=True,
                               calibTool=calibEcells,
                               addCellNoise=False,
                               filterCellNoise=False,
                            "HCalBarrelCells", "HCalExtBarrelCells",
                            "ECalEndcapCells", "HCalEndcapCells",
                            "ECalFwdCells", "HCalFwdCells", "TailCatcherCells",
                            "GenParticles", "GenVertices"
                        ],
                        OutputLevel=DEBUG)

##############################################################################################################
#######                                       RECALIBRATE ECAL                                   #############
##############################################################################################################

from Configurables import CalibrateInLayersTool, CreateCaloCells
recalibEcalBarrel = CalibrateInLayersTool(
    "RecalibrateEcalBarrel",
    samplingFraction=[0.299654475899 / 0.12125] + [0.148166996525 / 0.14283] +
    [0.163005489744 / 0.16354] + [0.176907220821 / 0.17662] +
    [0.189980731321 / 0.18867] + [0.202201963561 / 0.19890] +
    [0.214090761907 / 0.20637] + [0.224706564289 / 0.20802],
    readoutName=ecalBarrelReadoutName,
    layerFieldName="layer")
recreateEcalBarrelCells = CreateCaloCells("redoEcalBarrelCells",
                                          doCellCalibration=True,
                                          calibTool=recalibEcalBarrel,
                                          addCellNoise=False,
                                          filterCellNoise=False)
recreateEcalBarrelCells.hits.Path = "ECalBarrelCells"
recreateEcalBarrelCells.cells.Path = "ECalBarrelCellsRedo"

##############################################################################################################
#######                                       CELL POSITIONS  TOOLS                              #############
##############################################################################################################
                        "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
calibHcalEndcap = CalibrateCaloHitsTool("CalibrateHCalEndcap",
                                        invSamplingFraction="34.72")
calibHcalFwd = CalibrateCaloHitsTool("CalibrateHCalFwd",
                                     invSamplingFraction="30303.")

# Create cells in ECal barrel
Exemple #7
0
                        "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.299041341789] + [0.1306220735] + [0.163243999965] +
    [0.186360269398] + [0.203778124831] + [0.216211280314] + [0.227140796653] +
    [0.243315422934],
    readoutName=ecalBarrelReadoutName,
    layerFieldName="layer")

calibEcalEndcap = CalibrateCaloHitsTool("CalibrateECalEndcap",
                                        invSamplingFraction="13.89")
calibEcalFwd = CalibrateCaloHitsTool("CalibrateECalFwd",
                                     invSamplingFraction="303.03")
calibHcalEndcap = CalibrateCaloHitsTool("CalibrateHCalEndcap",
                                        invSamplingFraction="33.62")
calibHcalFwd = CalibrateCaloHitsTool("CalibrateHCalFwd",
                                     invSamplingFraction="1207.7")

# Create cells in ECal barrel
# 1. step - merge hits into cells with default Eta segmentation
Exemple #8
0
        # "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.248572114602] * 1 + [0.0992468162487] * 1 +
    [0.119373205045] * 1 + [0.133802832225] * 1 + [0.145763665387] * 1 +
    [0.155451526889] * 1 + [0.164469384154] * 1 + [0.180677722391] * 1,
    readoutName=ecalBarrelReadoutName,
    layerFieldName="layer")

calibEcalEndcap = CalibrateCaloHitsTool("CalibrateECalEndcap",
                                        invSamplingFraction="13.89")
calibEcalFwd = CalibrateCaloHitsTool("CalibrateECalFwd",
                                     invSamplingFraction="303.03")
calibHcalEndcap = CalibrateCaloHitsTool("CalibrateHCalEndcap",
                                        invSamplingFraction="33.62")
calibHcalFwd = CalibrateCaloHitsTool("CalibrateHCalFwd",
                                     invSamplingFraction="1207.7")

# Create cells in ECal barrel
# 1. step - merge hits into cells with default Eta segmentation
# next, create the G4 algorithm, giving the list of names of tools ("XX/YY")
from Configurables import SimG4PrimariesFromEdmTool
particle_converter = SimG4PrimariesFromEdmTool("EdmConverter")
particle_converter.GenParticles.Path = "GenParticles"

from Configurables import SimG4Alg
geantsim = SimG4Alg("SimG4Alg")
geantsim.eventProvider = particle_converter
ApplicationMgr().TopAlg += [geantsim]

############## Digitization (Merging hits into cells, EM scale calibration)
# EM scale calibration (sampling fraction)
from Configurables import CalibrateInLayersTool

calibEcalBarrel = CalibrateInLayersTool("CalibrateECalBarrel")
calibEcalBarrel.samplingFraction = [0.36571381189697705] * 1 + [0.09779064189677973] * 1 + [0.12564152224404024] * 1 + [0.14350599973146283] * 1 + [0.1557126972314961] * 1 + [0.16444759076233928] * 1 + [0.17097165096847836] * 1 + [0.17684775359805122] * 1 + [0.18181154293837265] * 1 + [0.18544247938196395] * 1 + [0.18922747431624687] * 1 + [0.21187001375505543] * 1
calibEcalBarrel.readoutName = "ECalBarrelEta"
calibEcalBarrel.layerFieldName = "layer"

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
Exemple #10
0
                                        etaMax=0.36,
                                        OutputLevel=DEBUG)

geantsim = SimG4Alg(
    "SimG4Alg",
    outputs=["SimG4SaveCalHits/saveECalHits", "SimG4SaveCalHits/saveHCalHits"],
    eventProvider=pgun,
    OutputLevel=DEBUG)

# Configure tools for calo reconstruction
from Configurables import CalibrateInLayersTool

calibEcells = CalibrateInLayersTool(
    "Calibrate",
    # sampling fraction obtained using SamplingFractionInLayers from DetStudies package
    samplingFraction=[0.168] * 4 + [0.176] * 4 + [0.184] * 4 + [0.191] * 4 +
    [0.198] * 4 + [0.204] * 4 + [0.210] * 4 + [0.215] * 4,
    readoutName=ecalReadoutName,
    layerFieldName="cell")

#Configure tools for calo reconstruction
from Configurables import CalibrateCaloHitsTool

calibHcells = CalibrateCaloHitsTool("CalibrateHCal", invSamplingFraction="31")

from Configurables import CreateCaloCells

createEcells = CreateCaloCells("CreateECaloCells",
                               doCellCalibration=True,
                               calibTool=calibEcells,
                               addCellNoise=False,
SimG4Alg("SimG4Alg").outputs += [saveHCalTool]

# next, create the G4 algorithm, giving the list of names of tools ("XX/YY")
from Configurables import SimG4PrimariesFromEdmTool
particle_converter = SimG4PrimariesFromEdmTool("EdmConverter")
particle_converter.GenParticles.Path = "GenParticles"

from Configurables import SimG4Alg
geantsim = SimG4Alg("SimG4Alg")
geantsim.eventProvider = particle_converter
ApplicationMgr().TopAlg += [geantsim]

############## Digitization (Merging hits into cells, EM scale calibration)
# EM scale calibration (sampling fraction)
from Configurables import CalibrateInLayersTool
calibEcalBarrel = CalibrateInLayersTool("CalibrateECalBarrel")
calibEcalBarrel.samplingFraction = [0.303451138049] * 1 + [
    0.111872504159
] * 1 + [0.135806495306] * 1 + [0.151772636618] * 1 + [0.163397436122] * 1 + [
    0.172566977313
] * 1 + [0.179855253903] * 1 + [0.186838417657] * 1 + [0.192865946689] * 1 + [
    0.197420241611
] * 1 + [0.202066552306] * 1 + [0.22646764465] * 1
calibEcalBarrel.readoutName = "ECalBarrelEta"
calibEcalBarrel.layerFieldName = "layer"

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

# Create cells in ECal barrel