CMS 3D CMS Logo

isolatedTracks_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from TrackingTools.TrackAssociator.default_cfi import TrackAssociatorParameterBlock
3 
4 tkAssocParamBlock = TrackAssociatorParameterBlock.clone()
5 tkAssocParamBlock.TrackAssociatorParameters.useMuon = cms.bool(False)
6 tkAssocParamBlock.TrackAssociatorParameters.useCalo = cms.bool(False)
7 tkAssocParamBlock.TrackAssociatorParameters.useHO = cms.bool(False)
8 tkAssocParamBlock.TrackAssociatorParameters.usePreshower = cms.bool(False)
9 tkAssocParamBlock.TrackAssociatorParameters.EERecHitCollectionLabel = cms.InputTag("reducedEcalRecHitsEE")
10 tkAssocParamBlock.TrackAssociatorParameters.EBRecHitCollectionLabel = cms.InputTag("reducedEcalRecHitsEB")
11 tkAssocParamBlock.TrackAssociatorParameters.HBHERecHitCollectionLabel = cms.InputTag("reducedHcalRecHits","hbhereco")
12 tkAssocParamBlock.TrackAssociatorParameters.HORecHitCollectionLabel = cms.InputTag("reducedHcalRecHits","horeco")
13 
14 _susySoftDisappearingTrackCut = (
15  "pt > 10. && (pt > 15. || hitPattern().pixelLayersWithMeasurement() == hitPattern().trackerLayersWithMeasurement()) && "+
16  " abs(dxy) < 0.02 && abs(dz) < 0.1 && "+
17  " (miniPFIsolation().chargedHadronIso()/pt < 0.2) && "+
18  " !(pfLepOverlap) && "+
19  " pfNeutralSum/pt < 0.2"
20 )
21 _exoHighPtTrackCut = (
22  "pt > 50 && "+
23  " isHighPurityTrack && "+
24  " abs(dxy) < 0.5 && abs(dz) < 0.5 && "+
25  " (miniPFIsolation().chargedHadronIso()/pt < 1.0 || pt > 100)"
26 )
27 _exoDisappearingTrackCut = (
28  "pt > 30 && "+
29  "abs(dxy) < 0.05 && abs(dz) < 1.0 &&"+
30  "lostInnerLayers == 0 &&"+
31  "lostLayers == 0 &&"+
32  "lostOuterLayers >= 1 &&"+
33  "(pfIsolationDR03().chargedHadronIso)/pt < 0.1"
34 )
35 isolatedTracks = cms.EDProducer("PATIsolatedTrackProducer",
36  tkAssocParamBlock,
37  packedPFCandidates = cms.InputTag("packedPFCandidates"),
38  lostTracks = cms.InputTag("lostTracks"),
39  generalTracks = cms.InputTag("generalTracks"),
40  primaryVertices = cms.InputTag("offlinePrimaryVertices"),
41  caloJets = cms.InputTag("ak4CaloJets"),
42  dEdxDataStrip = cms.InputTag("dedxHarmonic2"),
43  dEdxDataPixel = cms.InputTag("dedxPixelHarmonic2"),
44  dEdxHitInfo = cms.InputTag("dedxHitInfo"),
45  dEdxHitInfoPrescale = cms.InputTag("dedxHitInfo","prescale"),
46  addPrescaledDeDxTracks = cms.bool(False),
47  usePrecomputedDeDxStrip = cms.bool(True), # if these are set to True, will get estimated DeDx from DeDxData branches
48  usePrecomputedDeDxPixel = cms.bool(True), # if set to False, will manually compute using dEdxHitInfo
49  pT_cut = cms.double(5.0), # save tracks above this pt
50  pT_cut_noIso = cms.double(20.0), # for tracks with at least this pT, don't apply any iso cut
51  pfIsolation_DR = cms.double(0.3),
52  pfIsolation_DZ = cms.double(0.1),
53  miniIsoParams = cms.vdouble(0.05, 0.2, 10.0), # (minDR, maxDR, kT)
54  # dR for miniiso is max(minDR, min(maxDR, kT/pT))
55  absIso_cut = cms.double(5.0),
56  relIso_cut = cms.double(0.2),
57  miniRelIso_cut = cms.double(0.2),
58 
59  caloJet_DR = cms.double(0.3),
60 
61  pflepoverlap_DR = cms.double(0.001),
62  pflepoverlap_pTmin = cms.double(5.0),
63 
64  pcRefNearest_DR = cms.double(0.3),
65  pcRefNearest_pTmin = cms.double(5.0),
66 
67  pfneutralsum_DR = cms.double(0.05),
68 
69  useHighPurity = cms.bool(False),
70 
71  saveDeDxHitInfo = cms.bool(True),
72  saveDeDxHitInfoCut = cms.string("(%s) || (%s) || (%s)"
73  % (_susySoftDisappearingTrackCut,_exoHighPtTrackCut,_exoDisappearingTrackCut)),
74 )
75 
76 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
77 pp_on_AA.toModify(isolatedTracks, useHighPurity = True)
78 
79 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
80 run3_upc.toModify(isolatedTracks, pT_cut = 0.0, pT_cut_noIso = 0.0, saveDeDxHitInfoCut = "")
81 
83  """Switch off dE/dx hit info on fast sim, as it's not available"""
84  process.isolatedTracks.saveDeDxHitInfo = False
85  return process
def miniAOD_customizeIsolatedTracksFastSim(process)