Skip to content
Merged
71 changes: 71 additions & 0 deletions RecoLocalCalo/HGCalRecProducers/python/HGCalRecHit_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,63 @@
from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import *
from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import *

from Configuration.Eras.Modifier_phase2_hgcalV16_cff import phase2_hgcalV16

# There is no layer zero, while no average is taken for the last layer
dummy_weight = 0.0
def calcWeights(weightsPerLayer): res = [sum(wei)/2. for wei in zip(weightsPerLayer[:], weightsPerLayer[1:] + [weightsPerLayer[-1]])]; res[0] = dummy_weight; return res;


weightsPerLayer_V16 = cms.vdouble(dummy_weight,
5.55, # MeV
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
9.4,
12.86,
13.54,
12.86,
13.54,
12.86,
13.54,
12.86,
13.54,
12.86,
58.63,
60.7,
60.7,
60.7,
60.7,
60.7,
60.7,
60.7,
60.7,
60.7,
60.7,
83.08,
83.08,
83.43,
83.61,
83.61,
83.61,
83.61,
83.61,
83.61,
83.61)


dEdX = cms.PSet(
# for v10 geometry
weights = cms.vdouble(0.0, # there is no layer zero
Expand Down Expand Up @@ -67,6 +124,14 @@
92.283895)
)


# for v16 geometry
dEdX_v16 = cms.PSet(
weights = cms.vdouble(calcWeights(weightsPerLayer_V16))
)



# HGCAL rechit producer
HGCalRecHit = cms.EDProducer(
"HGCalRecHitProducer",
Expand Down Expand Up @@ -133,3 +198,9 @@
phase2_hgcalV10.toModify( HGCalRecHit , thicknessCorrection = [0.77, 0.77, 0.77, 0.84, 0.84, 0.84] , sciThicknessCorrection = 0.90 )

phase2_hfnose.toModify( HGCalRecHit , thicknessNoseCorrection = [0.58,0.58,0.58])

phase2_hgcalV16.toModify(HGCalRecHit,
thicknessCorrection = [0.75, 0.76, 0.75, 0.85, 0.85, 0.84] ,
sciThicknessCorrection = 0.69,
layerWeights = dEdX_v16.weights)

15 changes: 8 additions & 7 deletions RecoLocalCalo/HGCalRecProducers/python/HGCalUncalibRecHit_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer

fCPerMIP_v10 = cms.vdouble(2.06,3.43,5.15) #120um, 200um, 300um
fCPerMIP_mpv = cms.vdouble(1.25,2.57,3.88) #120um, 200um, 300um
fCPerMIP_mean = cms.vdouble(2.06,3.43,5.15) #120um, 200um, 300um

# HGCAL producer of rechits starting from digis
HGCalUncalibRecHit = cms.EDProducer(
Expand All @@ -26,7 +27,7 @@
tdcSaturation = hgceeDigitizer.digiCfg.feCfg.tdcSaturation_fC,
tdcOnset = hgceeDigitizer.digiCfg.feCfg.tdcOnset_fC,
toaLSB_ns = hgceeDigitizer.digiCfg.feCfg.toaLSB_ns,
fCPerMIP = cms.vdouble(1.25,2.57,3.88) #100um, 200um, 300um
fCPerMIP = fCPerMIP_mpv
),

HGCHEFConfig = cms.PSet(
Expand All @@ -39,7 +40,7 @@
tdcSaturation = hgchefrontDigitizer.digiCfg.feCfg.tdcSaturation_fC,
tdcOnset = hgchefrontDigitizer.digiCfg.feCfg.tdcOnset_fC,
toaLSB_ns = hgchefrontDigitizer.digiCfg.feCfg.toaLSB_ns,
fCPerMIP = cms.vdouble(1.25,2.57,3.88) #100um, 200um, 300um
fCPerMIP = fCPerMIP_mpv
),

HGCHEBConfig = cms.PSet(
Expand All @@ -65,18 +66,18 @@
tdcSaturation = hfnoseDigitizer.digiCfg.feCfg.tdcSaturation_fC,
tdcOnset = hfnoseDigitizer.digiCfg.feCfg.tdcOnset_fC,
toaLSB_ns = hfnoseDigitizer.digiCfg.feCfg.toaLSB_ns,
fCPerMIP = cms.vdouble(1.25,2.57,3.88) #100um, 200um, 300um
fCPerMIP = fCPerMIP_mpv
),

algo = cms.string("HGCalUncalibRecHitWorkerWeights")
)

from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
phase2_hgcalV10.toModify( HGCalUncalibRecHit.HGCEEConfig , fCPerMIP = fCPerMIP_v10 )
phase2_hgcalV10.toModify( HGCalUncalibRecHit.HGCHEFConfig , fCPerMIP = fCPerMIP_v10 )
phase2_hgcalV10.toModify( HGCalUncalibRecHit.HGCEEConfig , fCPerMIP = fCPerMIP_mean )
phase2_hgcalV10.toModify( HGCalUncalibRecHit.HGCHEFConfig , fCPerMIP = fCPerMIP_mean )

from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
phase2_hfnose.toModify( HGCalUncalibRecHit.HGCHFNoseConfig ,
isSiFE = True ,
fCPerMIP = fCPerMIP_v10
fCPerMIP = fCPerMIP_mean
)