Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-12 07:47:46

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 dedxHitInfo = cms.EDProducer("DeDxHitInfoProducer",
0004     tracks             = cms.InputTag("generalTracks"),
0005 
0006     minTrackHits       = cms.uint32(0),
0007     minTrackPt         = cms.double(10),
0008     minTrackPtPrescale = cms.double(0.5), # minimal pT for prescaled low pT tracks
0009     maxTrackEta        = cms.double(5.0),
0010 
0011     useStrip           = cms.bool(True),
0012     usePixel           = cms.bool(True),
0013     MeVperADCStrip     = cms.double(3.61e-06*265),
0014     MeVperADCPixel     = cms.double(3.61e-06),
0015 
0016     useCalibration     = cms.bool(False),
0017     calibrationPath    = cms.string("file:Gains.root"),
0018     shapeTest          = cms.bool(True),
0019 
0020     lowPtTracksPrescalePass = cms.uint32(100),   # prescale factor for low pt tracks above the dEdx cut
0021     lowPtTracksPrescaleFail = cms.uint32(2000), # prescale factor for low pt tracks below the dEdx cut
0022     lowPtTracksEstimatorParameters = cms.PSet( # generalized truncated average
0023         fraction = cms.double(-0.15), # negative = throw away the 15% with lowest charge
0024         exponent = cms.double(-2.0),
0025         truncate = cms.bool(True),
0026     ),
0027     lowPtTracksDeDxThreshold = cms.double(3.5), # threshold on tracks
0028     usePixelForPrescales = cms.bool(True)
0029 )
0030 
0031 import RecoTracker.DeDx.DeDxEstimatorProducer_cfi as _mod
0032 
0033 dedxHarmonic2 = _mod.DeDxEstimatorProducer.clone(
0034     estimator      = 'generic',
0035     fraction       = 0.4,        #Used only if estimator='truncated'
0036     exponent       = -2.0,       #Used only if estimator='generic'
0037 
0038     Record            = "SiStripDeDxMip_3D_Rcd", #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
0039     ProbabilityMode    = "Accumulation",          #used only for discriminators : estimators='productDiscrim' or 'btagDiscrim' or 'smirnovDiscrim' or 'asmirnovDiscrim'
0040 )
0041 
0042 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0043 
0044 # explicit python dependency
0045 import FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi
0046 
0047 # do this before defining dedxPixelHarmonic2 so it automatically comes out right
0048 fastSim.toReplaceWith(dedxHarmonic2,
0049     FastSimulation.SimplifiedGeometryPropagator.FastTrackDeDxProducer_cfi.FastTrackDeDxProducer.clone(
0050         ShapeTest = False,
0051         simHit2RecHitMap = "fastMatchedTrackerRecHits:simHit2RecHitMap",
0052         simHits = "fastSimProducer:TrackerHits",
0053     )
0054 )
0055 
0056 dedxPixelHarmonic2 = dedxHarmonic2.clone(UseStrip = False, UsePixel = True)
0057 
0058 dedxPixelAndStripHarmonic2T085 = dedxHarmonic2.clone(
0059         UseStrip = True, UsePixel = True,
0060         estimator = 'genericTruncated',
0061         fraction  = -0.15, # Drop the lowest 15% of hits
0062         exponent  = -2.0, # Harmonic02
0063 )
0064 
0065 dedxTruncated40 = dedxHarmonic2.clone(estimator = 'truncated')
0066 
0067 dedxMedian = dedxHarmonic2.clone(estimator = 'median')
0068 
0069 dedxUnbinned = dedxHarmonic2.clone(estimator = 'unbinnedFit')
0070 
0071 dedxDiscrimProd =  dedxHarmonic2.clone(estimator = 'productDiscrim')
0072 
0073 dedxDiscrimBTag = dedxHarmonic2.clone(estimator = 'btagDiscrim')
0074 
0075 dedxDiscrimSmi  = dedxHarmonic2.clone(estimator = 'smirnovDiscrim')
0076 
0077 dedxDiscrimASmi = dedxHarmonic2.clone(estimator = 'asmirnovDiscrim')
0078 
0079 doAlldEdXEstimatorsTask = cms.Task(dedxTruncated40 , dedxHarmonic2 , dedxPixelHarmonic2 , dedxPixelAndStripHarmonic2T085 , dedxHitInfo)
0080 doAlldEdXEstimators = cms.Sequence(doAlldEdXEstimatorsTask)
0081 
0082 fastSim.toReplaceWith(doAlldEdXEstimatorsTask, cms.Task(dedxHarmonic2, dedxPixelHarmonic2))
0083 
0084 # use only the strips for Run-3
0085 from Configuration.Eras.Modifier_run3_common_cff import run3_common
0086 run3_common.toModify(dedxHitInfo,
0087     lowPtTracksEstimatorParameters = dict(fraction = 0., exponent = -2.0,truncate = False),
0088     usePixelForPrescales = False
0089 )