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  ),
26  lowPtTracksDeDxThreshold = cms.double(3.5), # threshold on tracks
27 )
28 
29 dedxHarmonic2 = cms.EDProducer("DeDxEstimatorProducer",
30  tracks = cms.InputTag("generalTracks"),
31 
32  estimator = cms.string('generic'),
33  fraction = cms.double(0.4), #Used only if estimator='truncated'
34  exponent = cms.double(-2.0), #Used only if estimator='generic'
35 
36  UseStrip = cms.bool(True),
37  UsePixel = cms.bool(False),
38  ShapeTest = cms.bool(True),
39  MeVperADCStrip = cms.double(3.61e-06*265),
40  MeVperADCPixel = cms.double(3.61e-06),
41 
42  Reccord = cms.string("SiStripDeDxMip_3D_Rcd"), #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
43  ProbabilityMode = cms.string("Accumulation"), #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
44 
45  UseCalibration = cms.bool(False),
46  calibrationPath = cms.string(""),
47 )
48 
49 from Configuration.Eras.Modifier_fastSim_cff import fastSim
50 
51 # explicit python dependency
52 import FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi
53 
54 # do this before defining dedxPixelHarmonic2 so it automatically comes out right
55 fastSim.toReplaceWith(dedxHarmonic2,
56  FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi.FastTrackDeDxProducer.clone(
57  ShapeTest = False,
58  simHit2RecHitMap = cms.InputTag("fastMatchedTrackerRecHits","simHit2RecHitMap"),
59  simHits = cms.InputTag("fastSimProducer","TrackerHits"),
60  )
61 )
62 
63 dedxPixelHarmonic2 = dedxHarmonic2.clone(UseStrip = False, UsePixel = True)
64 
65 dedxPixelAndStripHarmonic2T085 = dedxHarmonic2.clone(
66  UseStrip = True, UsePixel = True,
67  estimator = 'genericTruncated',
68  fraction = -0.15, # Drop the lowest 15% of hits
69  exponent = -2.0, # Harmonic02
70 )
71 
72 dedxTruncated40 = dedxHarmonic2.clone()
73 dedxTruncated40.estimator = cms.string('truncated')
74 
75 dedxMedian = dedxHarmonic2.clone()
76 dedxMedian.estimator = cms.string('median')
77 
78 dedxUnbinned = dedxHarmonic2.clone()
79 dedxUnbinned.estimator = cms.string('unbinnedFit')
80 
81 dedxDiscrimProd = dedxHarmonic2.clone()
82 dedxDiscrimProd.estimator = cms.string('productDiscrim')
83 
84 dedxDiscrimBTag = dedxHarmonic2.clone()
85 dedxDiscrimBTag.estimator = cms.string('btagDiscrim')
86 
87 dedxDiscrimSmi = dedxHarmonic2.clone()
88 dedxDiscrimSmi.estimator = cms.string('smirnovDiscrim')
89 
90 dedxDiscrimASmi = dedxHarmonic2.clone()
91 dedxDiscrimASmi.estimator = cms.string('asmirnovDiscrim')
92 
93 doAlldEdXEstimatorsTask = cms.Task(dedxTruncated40 , dedxHarmonic2 , dedxPixelHarmonic2 , dedxPixelAndStripHarmonic2T085 , dedxHitInfo)
94 doAlldEdXEstimators = cms.Sequence(doAlldEdXEstimatorsTask)
95 
96 fastSim.toReplaceWith(doAlldEdXEstimatorsTask, cms.Task(dedxHarmonic2, dedxPixelHarmonic2))