CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GsfElectronBaseProducer.cc
Go to the documentation of this file.
1 
3 
5 
14 
23 
24 
25 #include <iostream>
26 
27 using namespace reco;
28 
30  {
31  // input collections
32  desc.add<edm::InputTag>("previousGsfElectronsTag",edm::InputTag("ecalDrivenGsfElectrons")) ;
33  desc.add<edm::InputTag>("pflowGsfElectronsTag",edm::InputTag("pflowGsfElectrons")) ;
34  desc.add<edm::InputTag>("gsfElectronCoresTag",edm::InputTag("gsfElectronCores")) ;
35  desc.add<edm::InputTag>("hcalTowers",edm::InputTag("towerMaker")) ;
36  desc.add<edm::InputTag>("barrelRecHitCollectionTag",edm::InputTag("ecalRecHit","EcalRecHitsEB")) ;
37  desc.add<edm::InputTag>("endcapRecHitCollectionTag",edm::InputTag("ecalRecHit","EcalRecHitsEE")) ;
38  //desc.add<edm::InputTag>("pfMvaTag",edm::InputTag("pfElectronTranslator:pf")) ;
39  desc.add<edm::InputTag>("seedsTag",edm::InputTag("ecalDrivenElectronSeeds")) ;
40  desc.add<edm::InputTag>("beamSpotTag",edm::InputTag("offlineBeamSpot")) ;
41  desc.add<edm::InputTag>("gsfPfRecTracksTag",edm::InputTag("pfTrackElec")) ;
42 
43  // backward compatibility mechanism for ctf tracks
44  desc.add<bool>("ctfTracksCheck",true) ;
45  desc.add<edm::InputTag>("ctfTracksTag",edm::InputTag("generalTracks")) ;
46 
47  // steering
48  desc.add<bool>("useGsfPfRecTracks",true) ;
49  desc.add<bool>("applyPreselection",false) ;
50  desc.add<bool>("ecalDrivenEcalEnergyFromClassBasedParameterization",false) ;
51  desc.add<bool>("ecalDrivenEcalErrorFromClassBasedParameterization",false) ;
52  desc.add<bool>("pureTrackerDrivenEcalErrorFromSimpleParameterization",false) ;
53  desc.add<bool>("applyAmbResolution",false) ;
54  desc.add<unsigned>("ambSortingStrategy",1) ;
55  desc.add<unsigned>("ambClustersOverlapStrategy",1) ;
56  //desc.add<bool>("addPflowElectrons",true) ;
57 
58 // // preselection parameters (ecal driven electrons)
59 // desc.add<bool>("seedFromTEC",true) ;
60 // desc.add<double>("minSCEtBarrel",4.0) ;
61 // desc.add<double>("minSCEtEndcaps",4.0) ;
62 // desc.add<double>("minEOverPBarrel",0.0) ;
63 // desc.add<double>("maxEOverPBarrel",999999999.) ;
64 // desc.add<double>("minEOverPEndcaps",0.0) ;
65 // desc.add<double>("maxEOverPEndcaps",999999999.) ;
66 // desc.add<double>("maxDeltaEtaBarrel",0.02) ;
67 // desc.add<double>("maxDeltaEtaEndcaps",0.02) ;
68 // desc.add<double>("maxDeltaPhiBarrel",0.15) ;
69 // desc.add<double>("maxDeltaPhiEndcaps",0.15) ;
70 // desc.add<double>("hOverEConeSize",0.15) ;
71 // desc.add<double>("hOverEPtMin",0.) ;
72 // desc.add<double>("maxHOverEBarrel",0.15) ;
73 // desc.add<double>("maxHOverEEndcaps",0.15) ;
74 // desc.add<double>("maxHBarrel",0.0) ;
75 // desc.add<double>("maxHEndcaps",0.0) ;
76 // desc.add<double>("maxSigmaIetaIetaBarrel",999999999.) ;
77 // desc.add<double>("maxSigmaIetaIetaEndcaps",999999999.) ;
78 // desc.add<double>("maxFbremBarrel",999999999.) ;
79 // desc.add<double>("maxFbremEndcaps",999999999.) ;
80 // desc.add<bool>("isBarrel",false) ;
81 // desc.add<bool>("isEndcaps",false) ;
82 // desc.add<bool>("isFiducial",false) ;
83 // desc.add<double>("maxTIP",999999999.) ;
84 // desc.add<double>("minMVA",-0.4) ;
85 //
86 // // preselection parameters (tracker driven only electrons)
87 // desc.add<double>("minSCEtBarrelPflow",0.0) ;
88 // desc.add<double>("minSCEtEndcapsPflow",0.0) ;
89 // desc.add<double>("minEOverPBarrelPflow",0.0) ;
90 // desc.add<double>("maxEOverPBarrelPflow",999999999.) ;
91 // desc.add<double>("minEOverPEndcapsPflow",0.0) ;
92 // desc.add<double>("maxEOverPEndcapsPflow",999999999.) ;
93 // desc.add<double>("maxDeltaEtaBarrelPflow",999999999.) ;
94 // desc.add<double>("maxDeltaEtaEndcapsPflow",999999999.) ;
95 // desc.add<double>("maxDeltaPhiBarrelPflow",999999999.) ;
96 // desc.add<double>("maxDeltaPhiEndcapsPflow",999999999.) ;
97 // desc.add<double>("hOverEConeSizePflow",0.15) ;
98 // desc.add<double>("hOverEPtMinPflow",0.) ;
99 // desc.add<double>("maxHOverEBarrelPflow",999999999.) ;
100 // desc.add<double>("maxHOverEEndcapsPflow",999999999.) ;
101 // desc.add<double>("maxHBarrelPflow",0.0) ;
102 // desc.add<double>("maxHEndcapsPflow",0.0) ;
103 // desc.add<double>("maxSigmaIetaIetaBarrelPflow",999999999.) ;
104 // desc.add<double>("maxSigmaIetaIetaEndcapsPflow",999999999.) ;
105 // desc.add<double>("maxFbremBarrelPflow",999999999.) ;
106 // desc.add<double>("maxFbremEndcapsPflow",999999999.) ;
107 // desc.add<bool>("isBarrelPflow",false) ;
108 // desc.add<bool>("isEndcapsPflow",false) ;
109 // desc.add<bool>("isFiducialPflow",false) ;
110 // desc.add<double>("maxTIPPflow",999999999.) ;
111 // desc.add<double>("minMVAPflow",-0.4) ;
112 
113  // Ecal rec hits configuration
114  desc.add<std::vector<int> >("recHitFlagsToBeExcludedBarrel") ;
115  desc.add<std::vector<int> >("recHitFlagsToBeExcludedEndcaps") ;
116  desc.add<std::vector<int> >("recHitSeverityToBeExcludedBarrel") ;
117  desc.add<std::vector<int> >("recHitSeverityToBeExcludedEndcaps") ;
118  //desc.add<int>("severityLevelCut",4) ;
119 
120  // Isolation algos configuration
121  desc.add<double>("intRadiusBarrelTk",0.015) ;
122  desc.add<double>("intRadiusEndcapTk",0.015) ;
123  desc.add<double>("stripBarrelTk",0.015) ;
124  desc.add<double>("stripEndcapTk",0.015) ;
125  desc.add<double>("ptMinTk",0.7) ;
126  desc.add<double>("maxVtxDistTk",0.2) ;
127  desc.add<double>("maxDrbTk",999999999.) ;
128  desc.add<double>("intRadiusHcal",0.15) ;
129  desc.add<double>("etMinHcal",0.0) ;
130  desc.add<double>("intRadiusEcalBarrel",3.0) ;
131  desc.add<double>("intRadiusEcalEndcaps",3.0) ;
132  desc.add<double>("jurassicWidth",1.5) ;
133  desc.add<double>("etMinBarrel",0.0) ;
134  desc.add<double>("eMinBarrel",0.08) ;
135  desc.add<double>("etMinEndcaps",0.1) ;
136  desc.add<double>("eMinEndcaps",0.0) ;
137  desc.add<bool>("vetoClustered",false) ;
138  desc.add<bool>("useNumCrystals",true) ;
139 
140  edm::ParameterSetDescription descNested ;
141  descNested.add<std::string>("propagatorAlongTISE","PropagatorWithMaterial") ;
142  descNested.add<std::string>("propagatorOppositeTISE","PropagatorWithMaterialOpposite") ;
143  desc.add<edm::ParameterSetDescription>("TransientInitialStateEstimatorParameters",descNested) ;
144 
145  // Corrections
146  desc.add<std::string>("superClusterErrorFunction","EcalClusterEnergyUncertaintyObjectSpecific") ;
147  desc.add<std::string>("crackCorrectionFunction","EcalClusterCrackCorrection") ;
148  }
149 
151  : ecalSeedingParametersChecked_(false)
152  {
153  produces<GsfElectronCollection>();
154 
155  inputCfg_.previousGsfElectrons = cfg.getParameter<edm::InputTag>("previousGsfElectronsTag");
156  inputCfg_.pflowGsfElectronsTag = cfg.getParameter<edm::InputTag>("pflowGsfElectronsTag");
157  inputCfg_.gsfElectronCores = cfg.getParameter<edm::InputTag>("gsfElectronCoresTag");
158  inputCfg_.hcalTowersTag = cfg.getParameter<edm::InputTag>("hcalTowers") ;
159  //inputCfg_.tracks_ = cfg.getParameter<edm::InputTag>("tracks");
160  inputCfg_.barrelRecHitCollection = cfg.getParameter<edm::InputTag>("barrelRecHitCollectionTag") ;
161  inputCfg_.endcapRecHitCollection = cfg.getParameter<edm::InputTag>("endcapRecHitCollectionTag") ;
162  inputCfg_.pfMVA = cfg.getParameter<edm::InputTag>("pfMvaTag") ;
163  inputCfg_.ctfTracks = cfg.getParameter<edm::InputTag>("ctfTracksTag");
164  inputCfg_.seedsTag = cfg.getParameter<edm::InputTag>("seedsTag"); // used to check config consistency with seeding
165  inputCfg_.beamSpotTag = cfg.getParameter<edm::InputTag>("beamSpotTag") ;
166  inputCfg_.gsfPfRecTracksTag = cfg.getParameter<edm::InputTag>("gsfPfRecTracksTag") ;
167 
168  bool useIsolationValues = cfg.getParameter<bool>("useIsolationValues") ;
169  if ( useIsolationValues ) {
170  if( ! cfg.exists("pfIsolationValues") )
171  throw cms::Exception("GsfElectronBaseProducer|InternalError")
172  <<"Missing ParameterSet pfIsolationValues" ;
173  else
175  cfg.getParameter<edm::ParameterSet> ("pfIsolationValues");
176 
177  if ( ! cfg.exists("edIsolationValues") )
178  throw cms::Exception("GsfElectronBaseProducer|InternalError")
179  <<"Missing ParameterSet edIsolationValues" ;
180  else
182  cfg.getParameter<edm::ParameterSet> ("edIsolationValues");
183  }
184 
185  strategyCfg_.useGsfPfRecTracks = cfg.getParameter<bool>("useGsfPfRecTracks") ;
186  strategyCfg_.applyPreselection = cfg.getParameter<bool>("applyPreselection") ;
187  strategyCfg_.ecalDrivenEcalEnergyFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalEnergyFromClassBasedParameterization") ;
188  strategyCfg_.ecalDrivenEcalErrorFromClassBasedParameterization = cfg.getParameter<bool>("ecalDrivenEcalErrorFromClassBasedParameterization") ;
189  strategyCfg_.pureTrackerDrivenEcalErrorFromSimpleParameterization = cfg.getParameter<bool>("pureTrackerDrivenEcalErrorFromSimpleParameterization") ;
190  strategyCfg_.applyAmbResolution = cfg.getParameter<bool>("applyAmbResolution") ;
191  strategyCfg_.ambSortingStrategy = cfg.getParameter<unsigned>("ambSortingStrategy") ;
192  strategyCfg_.ambClustersOverlapStrategy = cfg.getParameter<unsigned>("ambClustersOverlapStrategy") ;
193  strategyCfg_.addPflowElectrons = cfg.getParameter<bool>("addPflowElectrons") ;
194  strategyCfg_.ctfTracksCheck = cfg.getParameter<bool>("ctfTracksCheck");
195 
196  cutsCfg_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrel") ;
197  cutsCfg_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcaps") ;
198  cutsCfg_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrel") ;
199  cutsCfg_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcaps") ;
200  cutsCfg_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrel") ;
201  cutsCfg_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcaps") ;
202 
203  // H/E
204  cutsCfg_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrel") ;
205  cutsCfg_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcaps") ;
206  cutsCfg_.maxHBarrel = cfg.getParameter<double>("maxHBarrel") ;
207  cutsCfg_.maxHEndcaps = cfg.getParameter<double>("maxHEndcaps") ;
208 
209  cutsCfg_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrel") ;
210  cutsCfg_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcaps") ;
211  cutsCfg_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrel") ;
212  cutsCfg_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcaps") ;
213  cutsCfg_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrel") ;
214  cutsCfg_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcaps") ;
215  cutsCfg_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrel") ;
216  cutsCfg_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcaps") ;
217  cutsCfg_.isBarrel = cfg.getParameter<bool>("isBarrel") ;
218  cutsCfg_.isEndcaps = cfg.getParameter<bool>("isEndcaps") ;
219  cutsCfg_.isFiducial = cfg.getParameter<bool>("isFiducial") ;
220  cutsCfg_.minMVA = cfg.getParameter<double>("minMVA") ;
221  cutsCfg_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolated") ;
222  cutsCfg_.maxTIP = cfg.getParameter<double>("maxTIP") ;
223  cutsCfg_.seedFromTEC = cfg.getParameter<bool>("seedFromTEC") ;
224 
225  cutsCfgPflow_.minSCEtBarrel = cfg.getParameter<double>("minSCEtBarrelPflow") ;
226  cutsCfgPflow_.minSCEtEndcaps = cfg.getParameter<double>("minSCEtEndcapsPflow") ;
227  cutsCfgPflow_.maxEOverPBarrel = cfg.getParameter<double>("maxEOverPBarrelPflow") ;
228  cutsCfgPflow_.maxEOverPEndcaps = cfg.getParameter<double>("maxEOverPEndcapsPflow") ;
229  cutsCfgPflow_.minEOverPBarrel = cfg.getParameter<double>("minEOverPBarrelPflow") ;
230  cutsCfgPflow_.minEOverPEndcaps = cfg.getParameter<double>("minEOverPEndcapsPflow") ;
231 
232  // H/E
233  cutsCfgPflow_.maxHOverEBarrel = cfg.getParameter<double>("maxHOverEBarrelPflow") ;
234  cutsCfgPflow_.maxHOverEEndcaps = cfg.getParameter<double>("maxHOverEEndcapsPflow") ;
235  cutsCfgPflow_.maxHBarrel = cfg.getParameter<double>("maxHBarrelPflow") ;
236  cutsCfgPflow_.maxHEndcaps = cfg.getParameter<double>("maxHEndcapsPflow") ;
237 
238  cutsCfgPflow_.maxDeltaEtaBarrel = cfg.getParameter<double>("maxDeltaEtaBarrelPflow") ;
239  cutsCfgPflow_.maxDeltaEtaEndcaps = cfg.getParameter<double>("maxDeltaEtaEndcapsPflow") ;
240  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
241  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
242  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
243  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
244  cutsCfgPflow_.maxDeltaPhiBarrel = cfg.getParameter<double>("maxDeltaPhiBarrelPflow") ;
245  cutsCfgPflow_.maxDeltaPhiEndcaps = cfg.getParameter<double>("maxDeltaPhiEndcapsPflow") ;
246  cutsCfgPflow_.maxSigmaIetaIetaBarrel = cfg.getParameter<double>("maxSigmaIetaIetaBarrelPflow") ;
247  cutsCfgPflow_.maxSigmaIetaIetaEndcaps = cfg.getParameter<double>("maxSigmaIetaIetaEndcapsPflow") ;
248  cutsCfgPflow_.maxFbremBarrel = cfg.getParameter<double>("maxFbremBarrelPflow") ;
249  cutsCfgPflow_.maxFbremEndcaps = cfg.getParameter<double>("maxFbremEndcapsPflow") ;
250  cutsCfgPflow_.isBarrel = cfg.getParameter<bool>("isBarrelPflow") ;
251  cutsCfgPflow_.isEndcaps = cfg.getParameter<bool>("isEndcapsPflow") ;
252  cutsCfgPflow_.isFiducial = cfg.getParameter<bool>("isFiducialPflow") ;
253  cutsCfgPflow_.minMVA = cfg.getParameter<double>("minMVAPflow") ;
254  cutsCfgPflow_.minMvaByPassForIsolated = cfg.getParameter<double>("minMvaByPassForIsolatedPflow") ;
255  cutsCfgPflow_.maxTIP = cfg.getParameter<double>("maxTIPPflow") ;
256  cutsCfgPflow_.seedFromTEC = true ; // not applied for pflow
257 
258  // hcal helpers
259  hcalCfg_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSize") ;
260  if (hcalCfg_.hOverEConeSize>0)
261  {
263  hcalCfg_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
264  hcalCfg_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMin") ;
265  }
266  hcalCfgPflow_.hOverEConeSize = cfg.getParameter<double>("hOverEConeSizePflow") ;
268  {
270  hcalCfgPflow_.hcalTowers = cfg.getParameter<edm::InputTag>("hcalTowers") ;
271  hcalCfgPflow_.hOverEPtMin = cfg.getParameter<double>("hOverEPtMinPflow") ;
272  }
273 
274  // Ecal rec hits configuration
276  const std::vector<std::string> flagnamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedBarrel");
277  recHitsCfg.recHitFlagsToBeExcludedBarrel = StringToEnumValue<EcalRecHit::Flags>(flagnamesbarrel);
278  const std::vector<std::string> flagnamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitFlagsToBeExcludedEndcaps");
279  recHitsCfg.recHitFlagsToBeExcludedEndcaps = StringToEnumValue<EcalRecHit::Flags>(flagnamesendcaps);
280  const std::vector<std::string> severitynamesbarrel = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedBarrel");
281  recHitsCfg.recHitSeverityToBeExcludedBarrel = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesbarrel);
282  const std::vector<std::string> severitynamesendcaps = cfg.getParameter<std::vector<std::string> >("recHitSeverityToBeExcludedEndcaps");
283  recHitsCfg.recHitSeverityToBeExcludedEndcaps = StringToEnumValue<EcalSeverityLevel::SeverityLevel>(severitynamesendcaps);
284  //recHitsCfg.severityLevelCut = cfg.getParameter<int>("severityLevelCut") ;
285 
286  // isolation
288  isoCfg.intRadiusBarrelTk = cfg.getParameter<double>("intRadiusBarrelTk") ;
289  isoCfg.intRadiusEndcapTk = cfg.getParameter<double>("intRadiusEndcapTk") ;
290  isoCfg.stripBarrelTk = cfg.getParameter<double>("stripBarrelTk") ;
291  isoCfg.stripEndcapTk = cfg.getParameter<double>("stripEndcapTk") ;
292  isoCfg.ptMinTk = cfg.getParameter<double>("ptMinTk") ;
293  isoCfg.maxVtxDistTk = cfg.getParameter<double>("maxVtxDistTk") ;
294  isoCfg.maxDrbTk = cfg.getParameter<double>("maxDrbTk") ;
295  isoCfg.intRadiusHcal = cfg.getParameter<double>("intRadiusHcal") ;
296  isoCfg.etMinHcal = cfg.getParameter<double>("etMinHcal") ;
297  isoCfg.intRadiusEcalBarrel = cfg.getParameter<double>("intRadiusEcalBarrel") ;
298  isoCfg.intRadiusEcalEndcaps = cfg.getParameter<double>("intRadiusEcalEndcaps") ;
299  isoCfg.jurassicWidth = cfg.getParameter<double>("jurassicWidth") ;
300  isoCfg.etMinBarrel = cfg.getParameter<double>("etMinBarrel") ;
301  isoCfg.eMinBarrel = cfg.getParameter<double>("eMinBarrel") ;
302  isoCfg.etMinEndcaps = cfg.getParameter<double>("etMinEndcaps") ;
303  isoCfg.eMinEndcaps = cfg.getParameter<double>("eMinEndcaps") ;
304  isoCfg.vetoClustered = cfg.getParameter<bool>("vetoClustered") ;
305  isoCfg.useNumCrystals = cfg.getParameter<bool>("useNumCrystals") ;
306 
307  // functions for corrector
308  EcalClusterFunctionBaseClass * superClusterErrorFunction = 0 ;
309  std::string superClusterErrorFunctionName
310  = cfg.getParameter<std::string>("superClusterErrorFunction") ;
311  if (superClusterErrorFunctionName!="")
312  {
313  superClusterErrorFunction
314  = EcalClusterFunctionFactory::get()->create(superClusterErrorFunctionName,cfg) ;
315  }
316  else
317  {
318  superClusterErrorFunction
319  = EcalClusterFunctionFactory::get()->create("EcalClusterEnergyUncertaintyObjectSpecific",cfg) ;
320  }
321  EcalClusterFunctionBaseClass * crackCorrectionFunction = 0 ;
322  std::string crackCorrectionFunctionName
323  = cfg.getParameter<std::string>("crackCorrectionFunction") ;
324  if (crackCorrectionFunctionName!="")
325  {
326  crackCorrectionFunction
327  = EcalClusterFunctionFactory::get()->create(crackCorrectionFunctionName,cfg) ;
328  }
329 
330  // create algo
331  algo_ = new GsfElectronAlgo
335  isoCfg,recHitsCfg,
336  superClusterErrorFunction,
337  crackCorrectionFunction ) ;
338  }
339 
341  { delete algo_ ; }
342 
344  {
345  // check configuration
347  {
350  event.getByLabel(inputCfg_.seedsTag,seeds) ;
351  if (!seeds.isValid())
352  {
353  edm::LogWarning("GsfElectronAlgo|UnreachableSeedsProvenance")
354  <<"Cannot check consistency of parameters with ecal seeding ones,"
355  <<" because the original collection of seeds is not any more available." ;
356  }
357  else
358  {
360  }
361  }
362 
363  // init the algo
364  algo_->checkSetup(setup) ;
365  algo_->beginEvent(event) ;
366  }
367 
369  {
370  // all electrons
371  algo_->displayInternalElectrons("GsfElectronAlgo Info (before preselection)") ;
372 
373  // preselection
375  {
377  algo_->displayInternalElectrons("GsfElectronAlgo Info (after preselection)") ;
378  }
379 
380  // ambiguity
383  {
385  algo_->displayInternalElectrons("GsfElectronAlgo Info (after amb. solving)") ;
386  }
387 
388  // final filling
389  std::auto_ptr<GsfElectronCollection> finalCollection( new GsfElectronCollection ) ;
390  algo_->copyElectrons(*finalCollection) ;
391  event.put(finalCollection) ;
392  }
393 
395  {
396  algo_->endEvent() ;
397  }
398 
400  {
401  edm::ParameterSet pset ;
402  edm::pset::Registry::instance()->getMapped(psetid,pset) ;
403  edm::ParameterSet seedConfiguration = pset.getParameter<edm::ParameterSet>("SeedConfiguration") ;
404  //edm::ParameterSet orderedHitsFactoryPSet = seedConfiguration.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet") ;
405  //edm::ParameterSet seedParameters = seedConfiguration.getParameter<edm::ParameterSet>("ecalDrivenElectronSeedsParameters") ;
406 
407  if (seedConfiguration.getParameter<bool>("applyHOverECut"))
408  {
409  if ((hcalCfg_.hOverEConeSize!=0)&&(hcalCfg_.hOverEConeSize!=seedConfiguration.getParameter<double>("hOverEConeSize")))
410  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The H/E cone size ("<<hcalCfg_.hOverEConeSize<<") is different from ecal seeding ("<<seedConfiguration.getParameter<double>("hOverEConeSize")<<")." ; }
411  if (cutsCfg_.maxHOverEBarrel<seedConfiguration.getParameter<double>("maxHOverEBarrel"))
412  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max barrel H/E is lower than during ecal seeding." ; }
413  if (cutsCfg_.maxHOverEEndcaps<seedConfiguration.getParameter<double>("maxHOverEEndcaps"))
414  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The max endcaps H/E is lower than during ecal seeding." ; }
415  }
416 
417  if (cutsCfg_.minSCEtBarrel<seedConfiguration.getParameter<double>("SCEtCut"))
418  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in barrel is lower than during ecal seeding." ; }
419  if (cutsCfg_.minSCEtEndcaps<seedConfiguration.getParameter<double>("SCEtCut"))
420  { edm::LogWarning("GsfElectronAlgo|InconsistentParameters") <<"The minimum super-cluster Et in endcaps is lower than during ecal seeding." ; }
421  }
422 
423 
T getParameter(std::string const &) const
void checkEcalSeedingParameters(edm::ParameterSetID const &)
static void fillDescription(edm::ParameterSetDescription &)
static ThreadSafeRegistry * instance()
void beginEvent(edm::Event &)
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool getMapped(key_type const &k, value_type &result) const
GsfElectronBaseProducer(const edm::ParameterSet &)
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
ParameterSetID psetID() const
Definition: Provenance.cc:72
GsfElectronAlgo::InputTagsConfiguration inputCfg_
GsfElectronAlgo::CutsConfiguration cutsCfg_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool isValid() const
Definition: HandleBase.h:76
ElectronHcalHelper::Configuration hcalCfg_
ElectronHcalHelper::Configuration hcalCfgPflow_
GsfElectronAlgo::StrategyConfiguration strategyCfg_
void beginEvent(edm::Event &, const edm::EventSetup &)
void removeAmbiguousElectrons()
void displayInternalElectrons(const std::string &title) const
void removeNotPreselectedElectrons()
void copyElectrons(reco::GsfElectronCollection &)
void setAmbiguityData(bool ignoreNotPreselected=true)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
T get(const Candidate &c)
Definition: component.h:56
GsfElectronAlgo::CutsConfiguration cutsCfgPflow_
Provenance const * provenance() const
Definition: HandleBase.h:84
void checkSetup(const edm::EventSetup &)