CMS 3D CMS Logo

PixelCPEGeneric_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoLocalTracker.SiPixelRecHits._generic_default_cfi import _generic_default
4 PixelCPEGenericESProducer = _generic_default.clone()
5 
6 # This customizes the Run3 Pixel CPE generic reconstruction in order to activate the IrradiationBiasCorrection
7 # because of the expected resolution loss due to radiation damage
8 from Configuration.Eras.Modifier_run3_common_cff import run3_common
9 run3_common.toModify(PixelCPEGenericESProducer, IrradiationBiasCorrection = True)
10 
11 # customize the Pixel CPE generic producer for phase2
12 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
13 phase2_tracker.toModify(PixelCPEGenericESProducer,
14  UseErrorsFromTemplates = True,
15  LoadTemplatesFromDB = True,
16  NoTemplateErrorsWhenNoTrkAngles = True,
17  TruncatePixelCharge = False,
18  IrradiationBiasCorrection = False, # set IBC off
19  DoCosmics = False,
20  Upgrade = True, # use 'upgrade' version of hardcoded CPE errors
21  xerr_barrel_ln = [0.00025, 0.00030, 0.00035, 0.00035],
22  xerr_barrel_ln_def = 0.00035,
23  yerr_barrel_ln = [0.00210, 0.00115, 0.00125],
24  yerr_barrel_ln_def = 0.00125,
25  xerr_endcap = [0.00072, 0.00025],
26  xerr_endcap_def = 0.00060,
27  yerr_endcap = [0.00289, 0.00025],
28  yerr_endcap_def = 0.00180,
29  # if SmallPitch
30  # xerr_barrel_l1 = [0.00104, 0.000691, 0.00122],
31  # xerr_barrel_l1_def = 0.00321,
32  # yerr_barrel_l1 = [0.00199, 0.00136, 0.0015, 0.00153, 0.00152, 0.00171, 0.00154, 0.00157, 0.00154],
33  # yerr_barrel_l1_def = 0.00164
34  # else
35  xerr_barrel_l1 = [0.00025, 0.00030, 0.00035, 0.00035],
36  xerr_barrel_l1_def = 0.00035,
37  yerr_barrel_l1 = [0.00210, 0.00115, 0.00125],
38  yerr_barrel_l1_def = 0.00125
39 )
40 
41 # customize the Pixel CPE generic producer for phase2 3D pixels
42 # Will remove any usage of template / genError payloads from the reconstruction
43 from Configuration.Eras.Modifier_phase2_3DPixels_cff import phase2_3DPixels
44 from Configuration.ProcessModifiers.PixelCPEGeneric_cff import PixelCPEGeneric
45 (phase2_tracker & (phase2_3DPixels & PixelCPEGeneric)).toModify(PixelCPEGenericESProducer,
46  UseErrorsFromTemplates = False, # no GenErrors
47  LoadTemplatesFromDB = False # do not load templates
48  )
49 # customize the Pixel CPE generic producer for phase2 square pixels
50 # Do use Template errors for square pixels even in the first tracking step
51 # This is needed because hardcoded errors in https://github.com/cms-sw/cmssw/blob/master/RecoLocalTracker/SiPixelRecHits/src/PixelCPEGeneric.cc#L113
52 # have been optimized for rectangular 25x100 pixels, and in the current generic reco setup we use hardcoded errors for the first tracking pass
53 from Configuration.Eras.Modifier_phase2_squarePixels_cff import phase2_squarePixels
54 (phase2_tracker & (phase2_squarePixels | phase2_3DPixels)).toModify(PixelCPEGenericESProducer,
55  NoTemplateErrorsWhenNoTrkAngles = False # use genErrors in the seeding step (when no track angles are available)
56  )