CMS 3D CMS Logo

dedxEstimators_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 dedxHitInfo = cms.EDProducer("DeDxHitInfoProducer",
4  tracks = cms.InputTag("generalTracks"),
5 
6  minTrackHits = cms.uint32(0),
7  minTrackPt = cms.double(10),
8  minTrackPtPrescale = cms.double(0.5), # minimal pT for prescaled low pT tracks
9  maxTrackEta = cms.double(5.0),
10 
11  useStrip = cms.bool(True),
12  usePixel = cms.bool(True),
13  MeVperADCStrip = cms.double(3.61e-06*265),
14  MeVperADCPixel = cms.double(3.61e-06),
15 
16  useCalibration = cms.bool(False),
17  calibrationPath = cms.string("file:Gains.root"),
18  shapeTest = cms.bool(True),
19 
20  lowPtTracksPrescalePass = cms.uint32(100), # prescale factor for low pt tracks above the dEdx cut
21  lowPtTracksPrescaleFail = cms.uint32(2000), # prescale factor for low pt tracks below the dEdx cut
22  lowPtTracksEstimatorParameters = cms.PSet( # generalized truncated average
23  fraction = cms.double(-0.15), # negative = throw away the 15% with lowest charge
24  exponent = cms.double(-2.0),
25  truncate = cms.bool(True),
26  ),
27  lowPtTracksDeDxThreshold = cms.double(3.5), # threshold on tracks
28  usePixelForPrescales = cms.bool(True)
29 )
30 
31 import RecoTracker.DeDx.DeDxEstimatorProducer_cfi as _mod
32 
33 dedxHarmonic2 = _mod.DeDxEstimatorProducer.clone(
34  estimator = 'generic',
35  fraction = 0.4, #Used only if estimator='truncated'
36  exponent = -2.0, #Used only if estimator='generic'
37 
38  Record = "SiStripDeDxMip_3D_Rcd", #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
39  ProbabilityMode = "Accumulation", #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
40 )
41 
42 from Configuration.Eras.Modifier_fastSim_cff import fastSim
43 
44 # explicit python dependency
45 import FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi
46 
47 # do this before defining dedxPixelHarmonic2 so it automatically comes out right
48 fastSim.toReplaceWith(dedxHarmonic2,
49  FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi.FastTrackDeDxProducer.clone(
50  ShapeTest = False,
51  simHit2RecHitMap = "fastMatchedTrackerRecHits:simHit2RecHitMap",
52  simHits = "fastSimProducer:TrackerHits",
53  )
54 )
55 
56 dedxPixelHarmonic2 = dedxHarmonic2.clone(UseStrip = False, UsePixel = True)
57 
58 dedxPixelAndStripHarmonic2T085 = dedxHarmonic2.clone(
59  UseStrip = True, UsePixel = True,
60  estimator = 'genericTruncated',
61  fraction = -0.15, # Drop the lowest 15% of hits
62  exponent = -2.0, # Harmonic02
63 )
64 
65 dedxTruncated40 = dedxHarmonic2.clone(estimator = 'truncated')
66 
67 dedxMedian = dedxHarmonic2.clone(estimator = 'median')
68 
69 dedxUnbinned = dedxHarmonic2.clone(estimator = 'unbinnedFit')
70 
71 dedxDiscrimProd = dedxHarmonic2.clone(estimator = 'productDiscrim')
72 
73 dedxDiscrimBTag = dedxHarmonic2.clone(estimator = 'btagDiscrim')
74 
75 dedxDiscrimSmi = dedxHarmonic2.clone(estimator = 'smirnovDiscrim')
76 
77 dedxDiscrimASmi = dedxHarmonic2.clone(estimator = 'asmirnovDiscrim')
78 
79 doAlldEdXEstimatorsTask = cms.Task(dedxTruncated40 , dedxHarmonic2 , dedxPixelHarmonic2 , dedxPixelAndStripHarmonic2T085 , dedxHitInfo)
80 doAlldEdXEstimators = cms.Sequence(doAlldEdXEstimatorsTask)
81 
82 fastSim.toReplaceWith(doAlldEdXEstimatorsTask, cms.Task(dedxHarmonic2, dedxPixelHarmonic2))
83 
84 # use only the strips for Run-3
85 from Configuration.Eras.Modifier_run3_common_cff import run3_common
86 run3_common.toModify(dedxHitInfo,
87  lowPtTracksEstimatorParameters = dict(fraction = 0., exponent = -2.0,truncate = False),
88  usePixelForPrescales = False
89 )