CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RegressionEnergyPatElectronProducer.cc
Go to the documentation of this file.
2 
14 
15 #include <iostream>
16 
17 using namespace edm ;
18 using namespace std ;
19 using namespace reco ;
20 using namespace pat ;
21 
22 
24 {
25 
26  inputGsfElectronsToken_ = mayConsume<GsfElectronCollection>(cfg.getParameter<edm::InputTag>("inputElectronsTag"));
27  inputPatElectronsToken_ = mayConsume<ElectronCollection>(cfg.getParameter<edm::InputTag>("inputElectronsTag"));
28  inputCollectionType_ = cfg.getParameter<uint32_t>("inputCollectionType");
29  rhoInputToken_ = consumes<double>(cfg.getParameter<edm::InputTag>("rhoCollection"));
30  verticesInputToken_ = consumes<VertexCollection>(cfg.getParameter<edm::InputTag>("vertexCollection"));
31  energyRegressionType_ = cfg.getParameter<uint32_t>("energyRegressionType");
32  regressionInputFile_ = cfg.getParameter<std::string>("regressionInputFile");
33  recHitCollectionEBToken_ = mayConsume<EcalRecHitCollection>(cfg.getParameter<edm::InputTag>("recHitCollectionEB"));
34  recHitCollectionEEToken_ = mayConsume<EcalRecHitCollection>(cfg.getParameter<edm::InputTag>("recHitCollectionEE"));
35  nameEnergyReg_ = cfg.getParameter<std::string>("nameEnergyReg");
36  nameEnergyErrorReg_ = cfg.getParameter<std::string>("nameEnergyErrorReg");
37  debug_ = cfg.getUntrackedParameter<bool>("debug");
38  useReducedRecHits_ = cfg.getParameter<bool>("useRecHitCollections");
39  produceValueMaps_ = cfg.getParameter<bool>("produceValueMaps");
40 
41  // if Gsf Electrons; useReducedRecHits should be used)
42  if(inputCollectionType_ == 0 && !useReducedRecHits_) {
43  throw cms::Exception("InconsistentParameters") << " *** Inconsistent configuration : if you read GsfElectrons, you should set useRecHitCollections to true and provide the correcte values to recHitCollectionEB and recHitCollectionEE (most probably reducedEcalRecHitsEB and reducedEcalRecHitsEE )" << std::endl;
44  }
45 
46  if(inputCollectionType_ == 0 && !produceValueMaps_) {
47  std::cout << " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the results. In that case, it does not nothing !! " << std::endl;
48  }
49 
50  if (inputCollectionType_ == 0) {
51  // do nothing
52  } else if (inputCollectionType_ == 1) {
53  produces<ElectronCollection>();
54  } else {
55  throw cms::Exception("InconsistentParameters") << " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) " << std::endl;
56  }
57 
58 
59  //set regression type
61  if (energyRegressionType_ == 1) type = ElectronEnergyRegressionEvaluate::kNoTrkVar;
62  else if (energyRegressionType_ == 2) type = ElectronEnergyRegressionEvaluate::kWithSubCluVar;
63  else if (energyRegressionType_ == 3) type = ElectronEnergyRegressionEvaluate::kWithTrkVar;
64 
65  //load weights and initialize
66  regressionEvaluator_ = new ElectronEnergyRegressionEvaluate();
67  regressionEvaluator_->initialize(regressionInputFile_.c_str(),type);
68 
69  if(produceValueMaps_) {
70  produces<edm::ValueMap<double> >(nameEnergyReg_);
71  produces<edm::ValueMap<double> >(nameEnergyErrorReg_);
72  }
73 
74 
75  //****************************************************************************************
76  //set up regression calculator
77  //****************************************************************************************
78 
79  geomInitialized_ = false;
80 
81  std::cout << " Finished initialization " << std::endl;
82 
83 }
84 
86 {
87  delete regressionEvaluator_;
88 
89 }
90 
92 {
93 
94  assert(regressionEvaluator_->isInitialized());
95  if (!geomInitialized_) {
96  edm::ESHandle<CaloTopology> theCaloTopology;
97  setup.get<CaloTopologyRecord>().get(theCaloTopology);
98  ecalTopology_ = & (*theCaloTopology);
99 
100  edm::ESHandle<CaloGeometry> theCaloGeometry;
101  setup.get<CaloGeometryRecord>().get(theCaloGeometry);
102  caloGeometry_ = & (*theCaloGeometry);
103  geomInitialized_ = true;
104  }
105 
106 
107  //**************************************************************************
108  //Get Number of Vertices
109  //**************************************************************************
110  Handle<reco::VertexCollection> hVertexProduct;
111  event.getByToken(verticesInputToken_,hVertexProduct);
112  const reco::VertexCollection inVertices = *(hVertexProduct.product());
113 
114  // loop through all vertices
115  Int_t nvertices = 0;
116  for (reco::VertexCollection::const_iterator inV = inVertices.begin();
117  inV != inVertices.end(); ++inV) {
118 
119  //pass these vertex cuts
120  if (inV->ndof() >= 4
121  && inV->position().Rho() <= 2.0
122  && fabs(inV->z()) <= 24.0
123  ) {
124  nvertices++;
125  }
126  }
127 
128  //**************************************************************************
129  //Get Rho
130  //**************************************************************************
131  double rho = 0;
132  Handle<double> hRhoKt6PFJets;
133  event.getByToken(rhoInputToken_, hRhoKt6PFJets);
134  rho = (*hRhoKt6PFJets);
135 
136  //*************************************************************************
137  // Get the RecHits
138  //************************************************************************
139 
142  if (useReducedRecHits_) {
143  event.getByToken( recHitCollectionEBToken_, pEBRecHits );
144  event.getByToken( recHitCollectionEEToken_, pEERecHits );
145  }
146 
147  edm::Handle<GsfElectronCollection> gsfCollectionH ;
148  edm::Handle<ElectronCollection> patCollectionH;
149  if ( inputCollectionType_ == 0 ) {
150  event.getByToken ( inputGsfElectronsToken_,gsfCollectionH ) ;
151  nElectrons_ = gsfCollectionH->size();
152  }
153  if ( inputCollectionType_ == 1 ) {
154  event.getByToken ( inputPatElectronsToken_,patCollectionH ) ;
155  nElectrons_ = patCollectionH->size();
156  }
157 
158  // prepare the two even if only one is used
159  std::auto_ptr<ElectronCollection> patElectrons( new ElectronCollection ) ;
160 
161  // Fillers for ValueMaps:
162  std::auto_ptr<edm::ValueMap<double> > regrEnergyMap(new edm::ValueMap<double>() );
163  edm::ValueMap<double>::Filler energyFiller(*regrEnergyMap);
164 
165  std::auto_ptr<edm::ValueMap<double> > regrEnergyErrorMap(new edm::ValueMap<double>() );
166  edm::ValueMap<double>::Filler energyErrorFiller(*regrEnergyErrorMap);
167 
168 
169  // Reserve the vectors with outputs
170  std::vector<double> energyValues;
171  std::vector<double> energyErrorValues;
172  energyValues.reserve(nElectrons_);
173  energyErrorValues.reserve(nElectrons_);
174 
175 
176  for(unsigned iele=0; iele < nElectrons_ ; ++iele) {
177 
178  const GsfElectron * ele = ( inputCollectionType_ == 0 ) ? &(*gsfCollectionH)[iele] : &(*patCollectionH)[iele] ;
179  if (debug_) {
180  std::cout << "***********************************************************************\n";
181  std::cout << "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event() << "\n";
182  std::cout << "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n";
183  }
184 
185  pat::Electron * myPatElectron = (inputCollectionType_ == 0 ) ? 0 : new pat::Electron((*patCollectionH)[iele]);
186  // Get RecHit Collection
187  const EcalRecHitCollection * recHits=0;
188  if (useReducedRecHits_) {
189  if(ele->isEB()) {
190  recHits = pEBRecHits.product();
191  } else
192  recHits = pEERecHits.product();
193  } else {
194  recHits = (*patCollectionH)[iele].recHits();
195  }
196 
197  SuperClusterHelper * mySCHelper = 0 ;
198  if ( inputCollectionType_ == 0 ) {
199  mySCHelper = new SuperClusterHelper(&(*ele),recHits,ecalTopology_,caloGeometry_);
200  } else if ( inputCollectionType_ == 1) {
201  mySCHelper = new SuperClusterHelper( &(*patCollectionH)[iele], recHits,ecalTopology_,caloGeometry_);
202  }
203 
204  // apply regression energy
205  Double_t FinalMomentum = 0;
206  Double_t FinalMomentumError = 0;
207  Double_t RegressionMomentum = 0;
208  Double_t RegressionMomentumError = 0;
209 
210  if (energyRegressionType_ == 1) {
211 
212  RegressionMomentum = regressionEvaluator_->regressionValueNoTrkVar( mySCHelper->rawEnergy(),
213  mySCHelper->eta(),
214  mySCHelper->phi(),
215  mySCHelper->r9(),
216  mySCHelper->etaWidth(),
217  mySCHelper->phiWidth(),
218  mySCHelper->clustersSize(),
219  mySCHelper->hadronicOverEm(),
220  rho,
221  nvertices,
222  mySCHelper->seedEta(),
223  mySCHelper->seedPhi(),
224  mySCHelper->seedEnergy(),
225  mySCHelper->e3x3(),
226  mySCHelper->e5x5(),
227  mySCHelper->sigmaIetaIeta(),
228  mySCHelper->spp(),
229  mySCHelper->sep(),
230  mySCHelper->eMax(),
231  mySCHelper->e2nd(),
232  mySCHelper->eTop(),
233  mySCHelper->eBottom(),
234  mySCHelper->eLeft(),
235  mySCHelper->eRight(),
236  mySCHelper->e2x5Max(),
237  mySCHelper->e2x5Top(),
238  mySCHelper->e2x5Bottom(),
239  mySCHelper->e2x5Left(),
240  mySCHelper->e2x5Right(),
241  mySCHelper->ietaSeed(),
242  mySCHelper->iphiSeed(),
243  mySCHelper->etaCrySeed(),
244  mySCHelper->phiCrySeed(),
245  mySCHelper->preshowerEnergyOverRaw(),
246  debug_);
247  RegressionMomentumError = regressionEvaluator_->regressionUncertaintyNoTrkVar(
248  mySCHelper->rawEnergy(),
249  mySCHelper->eta(),
250  mySCHelper->phi(),
251  mySCHelper->r9(),
252  mySCHelper->etaWidth(),
253  mySCHelper->phiWidth(),
254  mySCHelper->clustersSize(),
255  mySCHelper->hadronicOverEm(),
256  rho,
257  nvertices,
258  mySCHelper->seedEta(),
259  mySCHelper->seedPhi(),
260  mySCHelper->seedEnergy(),
261  mySCHelper->e3x3(),
262  mySCHelper->e5x5(),
263  mySCHelper->sigmaIetaIeta(),
264  mySCHelper->spp(),
265  mySCHelper->sep(),
266  mySCHelper->eMax(),
267  mySCHelper->e2nd(),
268  mySCHelper->eTop(),
269  mySCHelper->eBottom(),
270  mySCHelper->eLeft(),
271  mySCHelper->eRight(),
272  mySCHelper->e2x5Max(),
273  mySCHelper->e2x5Top(),
274  mySCHelper->e2x5Bottom(),
275  mySCHelper->e2x5Left(),
276  mySCHelper->e2x5Right(),
277  mySCHelper->ietaSeed(),
278  mySCHelper->iphiSeed(),
279  mySCHelper->etaCrySeed(),
280  mySCHelper->phiCrySeed(),
281  mySCHelper->preshowerEnergyOverRaw(),
282  debug_);
283 
284  // PAT method
285  if(inputCollectionType_ == 1) {
286  myPatElectron->setEcalRegressionEnergy(RegressionMomentum, RegressionMomentumError);
287  }
288  energyValues.push_back(RegressionMomentum);
289  energyErrorValues.push_back(RegressionMomentumError);
290 
291 
292  } else if (energyRegressionType_ == 2) {// ECAL regression with subcluster information
293  RegressionMomentum = regressionEvaluator_->regressionValueWithSubClusters(
294  mySCHelper->rawEnergy(),
295  mySCHelper->eta(),
296  mySCHelper->phi(),
297  mySCHelper->r9(),
298  mySCHelper->etaWidth(),
299  mySCHelper->phiWidth(),
300  mySCHelper->clustersSize(),
301  mySCHelper->hadronicOverEm(),
302  rho,
303  nvertices,
304  mySCHelper->seedEta(),
305  mySCHelper->seedPhi(),
306  mySCHelper->seedEnergy(),
307  mySCHelper->e3x3(),
308  mySCHelper->e5x5(),
309  mySCHelper->sigmaIetaIeta(),
310  mySCHelper->spp(),
311  mySCHelper->sep(),
312  mySCHelper->eMax(),
313  mySCHelper->e2nd(),
314  mySCHelper->eTop(),
315  mySCHelper->eBottom(),
316  mySCHelper->eLeft(),
317  mySCHelper->eRight(),
318  mySCHelper->e2x5Max(),
319  mySCHelper->e2x5Top(),
320  mySCHelper->e2x5Bottom(),
321  mySCHelper->e2x5Left(),
322  mySCHelper->e2x5Right(),
323  mySCHelper->ietaSeed(),
324  mySCHelper->iphiSeed(),
325  mySCHelper->etaCrySeed(),
326  mySCHelper->phiCrySeed(),
327  mySCHelper->preshowerEnergyOverRaw(),
328  ele->ecalDrivenSeed(),
329  ele->isEBEtaGap(),
330  ele->isEBPhiGap(),
331  ele->isEEDeeGap(),
332  mySCHelper->eSubClusters(),
333  mySCHelper->subClusterEnergy(1),
334  mySCHelper->subClusterEta(1),
335  mySCHelper->subClusterPhi(1),
336  mySCHelper->subClusterEmax(1),
337  mySCHelper->subClusterE3x3(1),
338  mySCHelper->subClusterEnergy(2),
339  mySCHelper->subClusterEta(2),
340  mySCHelper->subClusterPhi(2),
341  mySCHelper->subClusterEmax(2),
342  mySCHelper->subClusterE3x3(2),
343  mySCHelper->subClusterEnergy(3),
344  mySCHelper->subClusterEta(3),
345  mySCHelper->subClusterPhi(3),
346  mySCHelper->subClusterEmax(3),
347  mySCHelper->subClusterE3x3(3),
348  mySCHelper->nPreshowerClusters(),
349  mySCHelper->eESClusters(),
350  mySCHelper->esClusterEnergy(0),
351  mySCHelper->esClusterEta(0),
352  mySCHelper->esClusterPhi(0),
353  mySCHelper->esClusterEnergy(1),
354  mySCHelper->esClusterEta(1),
355  mySCHelper->esClusterPhi(1),
356  mySCHelper->esClusterEnergy(2),
357  mySCHelper->esClusterEta(2),
358  mySCHelper->esClusterPhi(2),
359  ele->isEB(),
360  debug_);
361  RegressionMomentumError = regressionEvaluator_->regressionUncertaintyWithSubClusters(
362  mySCHelper->rawEnergy(),
363  mySCHelper->eta(),
364  mySCHelper->phi(),
365  mySCHelper->r9(),
366  mySCHelper->etaWidth(),
367  mySCHelper->phiWidth(),
368  mySCHelper->clustersSize(),
369  mySCHelper->hadronicOverEm(),
370  rho,
371  nvertices,
372  mySCHelper->seedEta(),
373  mySCHelper->seedPhi(),
374  mySCHelper->seedEnergy(),
375  mySCHelper->e3x3(),
376  mySCHelper->e5x5(),
377  mySCHelper->sigmaIetaIeta(),
378  mySCHelper->spp(),
379  mySCHelper->sep(),
380  mySCHelper->eMax(),
381  mySCHelper->e2nd(),
382  mySCHelper->eTop(),
383  mySCHelper->eBottom(),
384  mySCHelper->eLeft(),
385  mySCHelper->eRight(),
386  mySCHelper->e2x5Max(),
387  mySCHelper->e2x5Top(),
388  mySCHelper->e2x5Bottom(),
389  mySCHelper->e2x5Left(),
390  mySCHelper->e2x5Right(),
391  mySCHelper->ietaSeed(),
392  mySCHelper->iphiSeed(),
393  mySCHelper->etaCrySeed(),
394  mySCHelper->phiCrySeed(),
395  mySCHelper->preshowerEnergyOverRaw(),
396  ele->ecalDrivenSeed(),
397  ele->isEBEtaGap(),
398  ele->isEBPhiGap(),
399  ele->isEEDeeGap(),
400  mySCHelper->eSubClusters(),
401  mySCHelper->subClusterEnergy(1),
402  mySCHelper->subClusterEta(1),
403  mySCHelper->subClusterPhi(1),
404  mySCHelper->subClusterEmax(1),
405  mySCHelper->subClusterE3x3(1),
406  mySCHelper->subClusterEnergy(2),
407  mySCHelper->subClusterEta(2),
408  mySCHelper->subClusterPhi(2),
409  mySCHelper->subClusterEmax(2),
410  mySCHelper->subClusterE3x3(2),
411  mySCHelper->subClusterEnergy(3),
412  mySCHelper->subClusterEta(3),
413  mySCHelper->subClusterPhi(3),
414  mySCHelper->subClusterEmax(3),
415  mySCHelper->subClusterE3x3(3),
416  mySCHelper->nPreshowerClusters(),
417  mySCHelper->eESClusters(),
418  mySCHelper->esClusterEnergy(0),
419  mySCHelper->esClusterEta(0),
420  mySCHelper->esClusterPhi(0),
421  mySCHelper->esClusterEnergy(1),
422  mySCHelper->esClusterEta(1),
423  mySCHelper->esClusterPhi(1),
424  mySCHelper->esClusterEnergy(2),
425  mySCHelper->esClusterEta(2),
426  mySCHelper->esClusterPhi(2),
427  ele->isEB(),
428  debug_);
429 
430  // PAT method
431  if(inputCollectionType_ == 1) {
432  myPatElectron->setEcalRegressionEnergy(RegressionMomentum, RegressionMomentumError);
433  }
434  energyValues.push_back(RegressionMomentum);
435  energyErrorValues.push_back(RegressionMomentumError);
436 
437 
438  }
439 
440  else if (energyRegressionType_ == 3) {
441  RegressionMomentum = regressionEvaluator_->regressionValueWithTrkVar(ele->p(),
442  mySCHelper->rawEnergy(),
443  mySCHelper->eta(),
444  mySCHelper->phi(),
445  mySCHelper->etaWidth(),
446  mySCHelper->phiWidth(),
447  mySCHelper->clustersSize(),
448  mySCHelper->hadronicOverEm(),
449  mySCHelper->r9(),
450  rho,
451  nvertices,
452  mySCHelper->seedEta(),
453  mySCHelper->seedPhi(),
454  mySCHelper->seedEnergy(),
455  mySCHelper->e3x3(),
456  mySCHelper->e5x5(),
457  mySCHelper->sigmaIetaIeta(),
458  mySCHelper->spp(),
459  mySCHelper->sep(),
460  mySCHelper->eMax(),
461  mySCHelper->e2nd(),
462  mySCHelper->eTop(),
463  mySCHelper->eBottom(),
464  mySCHelper->eLeft(),
465  mySCHelper->eRight(),
466  mySCHelper->e2x5Max(),
467  mySCHelper->e2x5Top(),
468  mySCHelper->e2x5Bottom(),
469  mySCHelper->e2x5Left(),
470  mySCHelper->e2x5Right(),
471  ele->pt(),
472  ele->trackMomentumAtVtx().R(),
473  ele->fbrem(),
474  ele->charge(),
475  ele->eSuperClusterOverP(),
476  mySCHelper->ietaSeed(),
477  mySCHelper->iphiSeed(),
478  mySCHelper->etaCrySeed(),
479  mySCHelper->phiCrySeed(),
480  mySCHelper->preshowerEnergy(),
481  debug_);
482  RegressionMomentumError = regressionEvaluator_->regressionUncertaintyWithTrkVar(
483  ele->p(),
484  mySCHelper->rawEnergy(),
485  mySCHelper->eta(),
486  mySCHelper->phi(),
487  mySCHelper->etaWidth(),
488  mySCHelper->phiWidth(),
489  mySCHelper->clustersSize(),
490  mySCHelper->hadronicOverEm(),
491  mySCHelper->r9(),
492  rho,
493  nvertices,
494  mySCHelper->seedEta(),
495  mySCHelper->seedPhi(),
496  mySCHelper->seedEnergy(),
497  mySCHelper->e3x3(),
498  mySCHelper->e5x5(),
499  mySCHelper->sigmaIetaIeta(),
500  mySCHelper->spp(),
501  mySCHelper->sep(),
502  mySCHelper->eMax(),
503  mySCHelper->e2nd(),
504  mySCHelper->eTop(),
505  mySCHelper->eBottom(),
506  mySCHelper->eLeft(),
507  mySCHelper->eRight(),
508  mySCHelper->e2x5Max(),
509  mySCHelper->e2x5Top(),
510  mySCHelper->e2x5Bottom(),
511  mySCHelper->e2x5Left(),
512  mySCHelper->e2x5Right(),
513  ele->pt(),
514  ele->trackMomentumAtVtx().R(),
515  ele->fbrem(),
516  ele->charge(),
517  ele->eSuperClusterOverP(),
518  mySCHelper->ietaSeed(),
519  mySCHelper->iphiSeed(),
520  mySCHelper->etaCrySeed(),
521  mySCHelper->phiCrySeed(),
522  mySCHelper->preshowerEnergy(),
523  debug_);
524  FinalMomentum = RegressionMomentum;
525  FinalMomentumError = RegressionMomentumError;
526  math::XYZTLorentzVector oldMomentum = ele->p4();
528  ( oldMomentum.x()*FinalMomentum/oldMomentum.t(),
529  oldMomentum.y()*FinalMomentum/oldMomentum.t(),
530  oldMomentum.z()*FinalMomentum/oldMomentum.t(),
531  FinalMomentum ) ;
532 
533  myPatElectron->correctEcalEnergy(RegressionMomentum, RegressionMomentumError);
534  myPatElectron->correctMomentum(newMomentum,ele->trackMomentumError(),FinalMomentumError);
535 
536  energyValues.push_back(RegressionMomentum);
537  energyErrorValues.push_back(RegressionMomentumError);
538  } else {
539  cout << "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n";
540  }
541 
542  if(inputCollectionType_ == 1) {
543  patElectrons->push_back(*myPatElectron);
544  }
545  if (myPatElectron) delete myPatElectron;
546  if (mySCHelper) delete mySCHelper;
547  } // loop on electrons
548 
549  // Write the new collection in the event (AOD case)
550  if(inputCollectionType_ == 1) {
551  event.put(patElectrons) ;
552  }
553 
554  // now AOD case: write ValueMaps
555  if (produceValueMaps_) {
556 
557  if ( inputCollectionType_ ==0 ) {
558  energyFiller.insert( gsfCollectionH, energyValues.begin(), energyValues.end() );
559  energyErrorFiller.insert( gsfCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
560  } else if ( inputCollectionType_ ==1 ) {
561  energyFiller.insert( patCollectionH, energyValues.begin(), energyValues.end() );
562  energyErrorFiller.insert( patCollectionH, energyErrorValues.begin(), energyErrorValues.end() );
563  }
564 
565  energyFiller.fill();
566  energyErrorFiller.fill();
567  event.put(regrEnergyMap,nameEnergyReg_);
568  event.put(regrEnergyErrorMap,nameEnergyErrorReg_);
569  }
570 
571 }
572 
573 
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void correctEcalEnergy(float newEnergy, float newEnergyError)
Definition: GsfElectron.h:776
virtual double p() const
magnitude of momentum vector
virtual void produce(edm::Event &, const edm::EventSetup &)
float trackMomentumError() const
Definition: GsfElectron.h:759
tuple cfg
Definition: looper.py:259
float eESClusters() const
float e2x5Max() const
bool isEBEtaGap() const
Definition: GsfElectron.h:355
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:223
float eSuperClusterOverP() const
Definition: GsfElectron.h:243
float esClusterEnergy(unsigned i) const
float sigmaIetaIeta() const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
float subClusterE3x3(unsigned i) const
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:781
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:289
assert(m_qm.get())
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:52
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
float fbrem() const
Definition: GsfElectron.h:684
float eSubClusters() const
float e2x5Right() const
bool isEEDeeGap() const
Definition: GsfElectron.h:358
virtual double eta() const
momentum pseudorapidity
virtual double pt() const
transverse momentum
float eBottom() const
bool isEB() const
Definition: GsfElectron.h:350
float e2x5Bottom() const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
float esClusterEta(unsigned i) const
float etaWidth() const
float rawEnergy() const
float subClusterEnergy(unsigned i) const
float eLeft() const
float preshowerEnergyOverRaw() const
virtual int charge() const
electric charge
Definition: LeafCandidate.h:91
float eRight() const
float e2x5Top() const
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
std::vector< Electron > ElectronCollection
collectin of Electron objects
Definition: ElectronFwd.h:9
float preshowerEnergy() const
float hadronicOverEm() const
float phiWidth() const
float subClusterEmax(unsigned i) const
float esClusterPhi(unsigned i) const
float subClusterPhi(unsigned i) const
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:55
float seedEta() const
Analysis-level electron class.
Definition: Electron.h:52
bool isEBPhiGap() const
Definition: GsfElectron.h:356
float nPreshowerClusters() const
tuple cout
Definition: gather_cfg.py:121
float seedPhi() const
float clustersSize() const
float subClusterEta(unsigned i) const
float seedEnergy() const
virtual double phi() const
momentum azimuthal angle
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
float e2x5Left() const
void setEcalRegressionEnergy(double val, double err)
set regression1
Definition: Electron.h:223
bool ecalDrivenSeed() const
Definition: GsfElectron.h:186