CMS 3D CMS Logo

particleFlow_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 particleFlowTmp = cms.EDProducer("PFProducer",
4 
5  # PF Blocks label
6  blocks = cms.InputTag("particleFlowBlock"),
7 
8  # reco::muons label and Post Muon cleaning
9  muons = cms.InputTag("muons1stStep"),
10  postMuonCleaning = cms.bool(True),
11 
12  # Vertices label
13  vertexCollection = cms.InputTag("offlinePrimaryVertices"),
14  useVerticesForNeutral = cms.bool(True),
15 
16  # Algorithm type ?
17  algoType = cms.uint32(0),
18 
19  # Verbose and debug flags
20  verbose = cms.untracked.bool(False),
21  debug = cms.untracked.bool(False),
22 
23  # Use HO clusters in PF hadron reconstruction
24  useHO = cms.bool(True),
25 
26  # Use electron identification in PFAlgo
27  usePFElectrons = cms.bool(False),
28  pf_electron_output_col=cms.string('electrons'),
29  pf_electronID_mvaWeightFile = cms.string('RecoParticleFlow/PFProducer/data/MVAnalysis_BDT.weights_PfElectrons23Jan_IntToFloat.txt'),
30  pf_electron_mvaCut = cms.double(-0.1),
31 
32  # Use Photon identification in PFAlgo (for now this has NO impact, algo is swicthed off hard-coded
33  usePFPhotons = cms.bool(False),
34  usePhotonReg=cms.bool(False),
35  useRegressionFromDB=cms.bool(True),
36  pf_convID_mvaWeightFile = cms.string('RecoParticleFlow/PFProducer/data/MVAnalysis_BDT.weights_pfConversionAug0411.txt'),
37  pf_conv_mvaCut=cms.double(0.0),
38  pf_locC_mvaWeightFile=cms.string('RecoParticleFlow/PFProducer/data/TMVARegression_BDTG_PFClusterLCorr_14Dec2011.root'),
39  pf_GlobC_mvaWeightFile=cms.string('RecoParticleFlow/PFProducer/data/TMVARegression_BDTG_PFGlobalCorr_14Dec2011.root'),
40  pf_Res_mvaWeightFile=cms.string('RecoParticleFlow/PFProducer/data/TMVARegression_BDTG_PFRes_14Dec2011.root'),
41  X0_Map=cms.string('RecoParticleFlow/PFProducer/data/allX0histos.root'),
42  sumPtTrackIsoForPhoton=cms.double(2.0),
43  sumPtTrackIsoSlopeForPhoton=cms.double(0.001),
44 
45  useEGammaFilters = cms.bool(True),
46  useProtectionsForJetMET = cms.bool(True),
47  # New electron selection cuts for CMSSW_700
48  electron_iso_pt = cms.double(10.0),
49  electron_iso_mva_barrel = cms.double( -0.1875),
50  electron_iso_mva_endcap = cms.double( -0.1075),
51  electron_iso_combIso_barrel = cms.double(10.0),
52  electron_iso_combIso_endcap = cms.double(10.0),
53  electron_noniso_mvaCut = cms.double(-0.1),
54  electron_missinghits = cms.uint32(1),
55  electron_ecalDrivenHademPreselCut = cms.double(0.15),
56  electron_maxElePtForOnlyMVAPresel = cms.double(50.),
57  isolatedElectronID_mvaWeightFile = cms.string('RecoEgamma/ElectronIdentification/data/TMVA_BDTSimpleCat_17Feb2011.weights.xml'),
58  # maxNtracks,maxHcalE,maxTrackPOverEele,maxE,maxEleHcalEOverEcalE,maxEcalEOverPRes
59  # maxEeleOverPoutRes,maxHcalEOverP,maxHcalEOverEcalE,maxEcalEOverP_cut1,axEcalEOverP_cut2,maxEeleOverPout,maxDPhiIN;
60  electron_protectionsForJetMET = cms.PSet(
61  maxNtracks = cms.double(3.0), #max tracks pointing at Ele cluster
62  maxHcalE = cms.double(10.0),
63  maxTrackPOverEele = cms.double(1.0),
64  maxE = cms.double(50.0), #for dphi cut
65  maxEleHcalEOverEcalE = cms.double(0.1),
66  maxEcalEOverPRes = cms.double(0.2),
67  maxEeleOverPoutRes = cms.double(0.5),
68  maxHcalEOverP = cms.double(1.0),
69  maxHcalEOverEcalE = cms.double(0.1),
70  maxEcalEOverP_1 = cms.double(0.5), #pion rejection
71  maxEcalEOverP_2 = cms.double(0.2), #weird events
72  maxEeleOverPout = cms.double(0.2),
73  maxDPhiIN = cms.double(0.1)
74  ),
75  electron_protectionsForBadHcal = cms.PSet(
76  enableProtections = cms.bool(False),
77  full5x5_sigmaIetaIeta = cms.vdouble(0.0106, 0.0387), # EB, EE; 94Xv2 cut-based medium id
78  eInvPInv = cms.vdouble(0.184, 0.0721),
79  dEta = cms.vdouble(0.0032*2, 0.00632*2), # relax factor 2 to be safer against misalignment
80  dPhi = cms.vdouble(0.0547, 0.0394),
81  ),
82  # New photon selection cuts for CMSSW_700
83  photon_MinEt = cms.double(10.),
84  photon_combIso = cms.double(10.),
85  photon_HoE = cms.double(0.05),
86  photon_SigmaiEtaiEta_barrel = cms.double(0.0125),
87  photon_SigmaiEtaiEta_endcap = cms.double(0.034),
88  photon_protectionsForBadHcal = cms.PSet(
89  enableProtections = cms.bool(False),
90  solidConeTrkIsoOffset = cms.double(10.),
91  solidConeTrkIsoSlope = cms.double(0.3),
92  ),
93 
94  # sumPtTrackIso, sumPtTrackIsoSlope
95  photon_protectionsForJetMET = cms.PSet(
96  sumPtTrackIso = cms.double(4.0),
97  sumPtTrackIsoSlope = cms.double(0.001)
98  ),
99  PFEGammaCandidates = cms.InputTag("particleFlowEGamma"),
100  GedElectronValueMap = cms.InputTag("gedGsfElectronsTmp"),
101  GedPhotonValueMap = cms.InputTag("gedPhotonsTmp","valMapPFEgammaCandToPhoton"),
102 
103 
104 
105  # apply the crack corrections
106  pf_electronID_crackCorrection = cms.bool(False),
107  usePFSCEleCalib = cms.bool(True),
108  #new corrections #MM /*
109  calibPFSCEle_Fbrem_barrel = cms.vdouble(0.6, 6, #Range of non constant correction
110  -0.0255975, 0.0576727, 0.975442, -0.000546394, 1.26147, #standard parameters
111  25, #pt value for switch to low pt corrections
112  -0.02025, 0.04537, 0.9728, -0.0008962, 1.172), # low pt parameters
113  calibPFSCEle_Fbrem_endcap = cms.vdouble(0.9, 6.5, #Range of non constant correction
114  -0.0692932, 0.101776, 0.995338, -0.00236548, 0.874998, #standard parameters eta < switch value
115  1.653, #eta value for correction switch
116  -0.0750184, 0.147000, 0.923165, 0.000474665, 1.10782), #standard parameters eta > switch value
117  calibPFSCEle_barrel = cms.vdouble(1.004, -1.536, 22.88, -1.467, #standard
118  0.3555, 0.6227, 14.65, 2051, #parameters
119  25, #pt value for switch to low pt corrections
120  0.9932, -0.5444, 0, 0.5438, #low pt
121  0.7109, 7.645, 0.2904, 0), #parameters
122  calibPFSCEle_endcap = cms.vdouble(1.153, -16.5975, 5.668,
123  -0.1772, 16.22, 7.326,
124  0.0483, -4.068, 9.406),
125  #old corrections #MM */
126 # calibPFSCEle_barrel = cms.vdouble(1.0326,-13.71,339.72,0.4862,0.00182,0.36445,1.411,1.0206,0.0059162,-5.14434e-05,1.42516e-07),
127 # calibPFSCEle_endcap = cms.vdouble(0.9995,-12.313,2.8784,-1.057e-04,10.282,3.059,1.3502e-03,-2.2185,3.4206),
128 
129  useEGammaSupercluster = cms.bool(True),
130  sumEtEcalIsoForEgammaSC_barrel = cms.double(1.),
131  sumEtEcalIsoForEgammaSC_endcap = cms.double(2.),
132  coneEcalIsoForEgammaSC = cms.double(0.3),
133  sumPtTrackIsoForEgammaSC_barrel = cms.double(4.),
134  sumPtTrackIsoForEgammaSC_endcap = cms.double(4.),
135  nTrackIsoForEgammaSC = cms.uint32(2),
136  coneTrackIsoForEgammaSC = cms.double(0.3),
137  useEGammaElectrons = cms.bool(True),
138  egammaElectrons = cms.InputTag('mvaElectrons'),
139 
140  # Input displaced vertices
141  # It is strongly adviced to keep usePFNuclearInteractions = bCorrect
142 
143  rejectTracks_Bad = cms.bool(True),
144  rejectTracks_Step45 = cms.bool(True),
145 
146  usePFNuclearInteractions = cms.bool(True),
147  usePFConversions = cms.bool(True),
148  usePFDecays = cms.bool(False),
149 
150  dptRel_DispVtx = cms.double(10.),
151 
152  iCfgCandConnector = cms.PSet(
153 
154  bCorrect = cms.bool(True),
155  bCalibPrimary = cms.bool(True),
156  dptRel_PrimaryTrack = cms.double(10.),
157  dptRel_MergedTrack = cms.double(5.0),
158  ptErrorSecondary = cms.double(1.0),
159  nuclCalibFactors = cms.vdouble(0.8, 0.15, 0.5, 0.5, 0.05)
160  ),
161 
162 
163 
164  # Treatment of muons :
165  # Expected energy in ECAL and HCAL, and RMS
166  muon_HCAL = cms.vdouble(3.0,3.0),
167  muon_ECAL = cms.vdouble(0.5,0.5),
168  muon_HO = cms.vdouble(0.9,0.9),
169 
170  # Muon ID and post cleaning parameters
171  maxDPtOPt = cms.double(1.),
172  minTrackerHits = cms.int32(8),
173  minPixelHits = cms.int32(1),
174  trackQuality = cms.string('highPurity'),
175  dzPV = cms.double(0.2),
176  ptErrorScale = cms.double(8.),
177  minPtForPostCleaning = cms.double(20.),
178  eventFactorForCosmics =cms.double(10.),
179  metSignificanceForCleaning = cms.double(3.),
180  metSignificanceForRejection = cms.double(4.),
181  metFactorForCleaning = cms.double(4.),
182  eventFractionForCleaning =cms.double(0.5),
183  eventFractionForRejection = cms.double(0.8),
184  metFactorForRejection =cms.double(4.),
185  metFactorForHighEta = cms.double(25.),
186  ptFactorForHighEta = cms.double(2.),
187  metFactorForFakes = cms.double(4.),
188  minMomentumForPunchThrough = cms.double(100.),
189  minEnergyForPunchThrough = cms.double(100.),
190  punchThroughFactor = cms.double(3.),
191  punchThroughMETFactor = cms.double(4.),
192  cosmicRejectionDistance = cms.double(1.),
193 
194  # Treatment of potential fake tracks
195  # Number of sigmas for fake track detection
196  nsigma_TRACK = cms.double(1.0),
197  # Absolute pt error to detect fake tracks in the first three iterations
198  # dont forget to modify also ptErrorSecondary if you modify this parameter
199  pt_Error = cms.double(1.0),
200  # Factors to be applied in the four and fifth steps to the pt error
201  factors_45 = cms.vdouble(10.,100.),
202 
203  # Treatment of tracks in region of bad HCal
204  goodTrackDeadHcal_ptErrRel = cms.double(0.2), # trackRef->ptError()/trackRef->pt() < X
205  goodTrackDeadHcal_chi2n = cms.double(5), # trackRef->normalizedChi2() < X
206  goodTrackDeadHcal_layers = cms.uint32(4), # trackRef->hitPattern().trackerLayersWithMeasurement() >= X
207  goodTrackDeadHcal_validFr = cms.double(0.5), # trackRef->validFraction() > X
208  goodTrackDeadHcal_dxy = cms.double(0.5), # [cm] abs(trackRef->dxy(primaryVertex_.position())) < X
209 
210  goodPixelTrackDeadHcal_minEta = cms.double(2.3), # abs(trackRef->eta()) > X
211  goodPixelTrackDeadHcal_maxPt = cms.double(50.), # trackRef->ptError()/trackRef->pt() < X
212  goodPixelTrackDeadHcal_ptErrRel = cms.double(1.0), # trackRef->ptError()/trackRef->pt() < X
213  goodPixelTrackDeadHcal_chi2n = cms.double(2), # trackRef->normalizedChi2() < X
214  goodPixelTrackDeadHcal_maxLost3Hit = cms.int32(0), # max missing outer hits for a track with 3 valid pixel layers (can set to -1 to reject all these tracks)
215  goodPixelTrackDeadHcal_maxLost4Hit = cms.int32(1), # max missing outer hits for a track with >= 4 valid pixel layers
216  goodPixelTrackDeadHcal_dxy = cms.double(0.02), # [cm] abs(trackRef->dxy(primaryVertex_.position())) < X
217  goodPixelTrackDeadHcal_dz = cms.double(0.05), # [cm] abs(trackRef->dz(primaryVertex_.position())) < X
218 
219 
220  # Post HF cleaning
221  postHFCleaning = cms.bool(False),
222  # Clean only objects with pt larger than this value
223  minHFCleaningPt = cms.double(5.),
224  # Clean only if the initial MET/sqrt(sumet) is larger than this value
225  maxSignificance = cms.double(2.5),
226  # Clean only if the final MET/sqrt(sumet) is smaller than this value
227  minSignificance = cms.double(2.5),
228  # Clean only if the significance reduction is larger than this value
229  minSignificanceReduction = cms.double(1.4),
230  # Clean only if the MET and the to-be-cleaned object satisfy this DeltaPhi * Pt cut
231  # (the MET angular resoution is in 1/MET)
232  maxDeltaPhiPt = cms.double(7.0),
233  # Clean only if the MET relative reduction from the to-be-cleaned object
234  # is larger than this value
235  minDeltaMet = cms.double(0.4),
236 
237  # Check HF cleaning
238  cleanedHF = cms.VInputTag(
239  cms.InputTag("particleFlowRecHitHF","Cleaned"),
240  cms.InputTag("particleFlowClusterHF","Cleaned")
241  ),
242 
243  # number of sigmas for neutral energy detection
244  pf_nsigma_ECAL = cms.double(0.0),
245  pf_nsigma_HCAL = cms.double(1.0),
246 
247  # ECAL/HCAL PF cluster calibration : take it from global tag ?
248  useCalibrationsFromDB = cms.bool(True),
249  calibrationsLabel = cms.string(''),
250 
251  # calibration parameters for HF:
252  calibHF_use = cms.bool(False),
253  calibHF_eta_step = cms.vdouble(0.0,2.90,3.00,3.20,4.20,4.40,4.60,4.80,5.20,5.40),
254 # calibHF_a_EMonly = cms.vdouble(10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00),
255 # calibHF_b_HADonly = cms.vdouble(10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00),
256 # calibHF_a_EMHAD = cms.vdouble(10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00),
257 # calibHF_b_EMHAD = cms.vdouble(10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00,10.00)
258  calibHF_a_EMonly = cms.vdouble(0.96945,0.96701,0.76309,0.82268,0.87583,0.89718,0.98674,1.4681,1.4580,1.4580),
259  calibHF_b_HADonly = cms.vdouble(1.27541,0.85361,0.86333,0.89091,0.94348,0.94348,0.94370,1.0034,1.0444,1.0444),
260  calibHF_a_EMHAD = cms.vdouble(1.42215,1.00496,0.68961,0.81656,0.98504,0.98504,1.00802,1.0593,1.4576,1.4576),
261  calibHF_b_EMHAD = cms.vdouble(1.27541,0.85361,0.86333,0.89091,0.94348,0.94348,0.94370,1.0034,1.0444,1.0444)
262 
263 # toRead = cms.untracked.vstring("PFfa_BARREL",
264 # "PFfa_ENDCAP",
265 # "PFfb_BARREL",
266 # "PFfb_ENDCAP",
267 # "PFfc_BARREL",
268 # "PFfc_ENDCAP",
269 # "PFfaEta_BARREL",
270 # "PFfaEta_ENDCAP",
271 # "PFfbEta_BARREL",
272 # "PFfbEta_ENDCAP") # same strings as fType
273 
274 )
275 
276 
277 
278 from Configuration.Eras.Modifier_pf_badHcalMitigation_cff import pf_badHcalMitigation
279 pf_badHcalMitigation.toModify(particleFlowTmp,
280  electron_protectionsForBadHcal = dict(enableProtections = True),
281  photon_protectionsForBadHcal = dict(enableProtections = True))
282