CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
RegressionEnergyPatElectronProducer Class Reference

#include <RegressionEnergyPatElectronProducer.h>

Inheritance diagram for RegressionEnergyPatElectronProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void produce (edm::Event &, const edm::EventSetup &) override
 
 RegressionEnergyPatElectronProducer (const edm::ParameterSet &)
 
 ~RegressionEnergyPatElectronProducer () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const CaloGeometrycaloGeometry_
 
bool debug_
 
const CaloTopologyecalTopology_
 
uint32_t energyRegressionType_
 
bool geomInitialized_
 
uint32_t inputCollectionType_
 
edm::EDGetTokenT< reco::GsfElectronCollectioninputGsfElectronsToken_
 
edm::EDGetTokenT< pat::ElectronCollectioninputPatElectronsToken_
 
std::string nameEnergyErrorReg_
 
std::string nameEnergyReg_
 
unsigned nElectrons_
 
bool producePatElectrons_
 
bool produceValueMaps_
 
edm::EDGetTokenT< EcalRecHitCollectionrecHitCollectionEBToken_
 
edm::EDGetTokenT< EcalRecHitCollectionrecHitCollectionEEToken_
 
ElectronEnergyRegressionEvaluateregressionEvaluator_
 
std::string regressionInputFile_
 
edm::EDGetTokenT< double > rhoInputToken_
 
bool useReducedRecHits_
 
edm::EDGetTokenT< reco::VertexCollectionverticesInputToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 19 of file RegressionEnergyPatElectronProducer.h.

Constructor & Destructor Documentation

◆ RegressionEnergyPatElectronProducer()

RegressionEnergyPatElectronProducer::RegressionEnergyPatElectronProducer ( const edm::ParameterSet cfg)
explicit

Definition at line 17 of file RegressionEnergyPatElectronProducer.cc.

17  {
19  mayConsume<reco::GsfElectronCollection>(cfg.getParameter<edm::InputTag>("inputElectronsTag"));
20  inputPatElectronsToken_ = mayConsume<pat::ElectronCollection>(cfg.getParameter<edm::InputTag>("inputElectronsTag"));
21  inputCollectionType_ = cfg.getParameter<uint32_t>("inputCollectionType");
22  rhoInputToken_ = consumes<double>(cfg.getParameter<edm::InputTag>("rhoCollection"));
23  verticesInputToken_ = consumes<reco::VertexCollection>(cfg.getParameter<edm::InputTag>("vertexCollection"));
24  energyRegressionType_ = cfg.getParameter<uint32_t>("energyRegressionType");
25  regressionInputFile_ = cfg.getParameter<std::string>("regressionInputFile");
26  recHitCollectionEBToken_ = mayConsume<EcalRecHitCollection>(cfg.getParameter<edm::InputTag>("recHitCollectionEB"));
27  recHitCollectionEEToken_ = mayConsume<EcalRecHitCollection>(cfg.getParameter<edm::InputTag>("recHitCollectionEE"));
28  nameEnergyReg_ = cfg.getParameter<std::string>("nameEnergyReg");
29  nameEnergyErrorReg_ = cfg.getParameter<std::string>("nameEnergyErrorReg");
30  debug_ = cfg.getUntrackedParameter<bool>("debug");
31  useReducedRecHits_ = cfg.getParameter<bool>("useRecHitCollections");
32  produceValueMaps_ = cfg.getParameter<bool>("produceValueMaps");
33 
34  // if Gsf Electrons; useReducedRecHits should be used)
36  throw cms::Exception("InconsistentParameters")
37  << " *** Inconsistent configuration : if you read GsfElectrons, you should set useRecHitCollections to true "
38  "and provide the correcte values to recHitCollectionEB and recHitCollectionEE (most probably "
39  "reducedEcalRecHitsEB and reducedEcalRecHitsEE )"
40  << std::endl;
41  }
42 
44  std::cout << " You are running on GsfElectrons and the producer is not configured to produce ValueMaps with the "
45  "results. In that case, it does not nothing !! "
46  << std::endl;
47  }
48 
49  if (inputCollectionType_ == 0) {
50  // do nothing
51  } else if (inputCollectionType_ == 1) {
52  produces<pat::ElectronCollection>();
53  } else {
54  throw cms::Exception("InconsistentParameters")
55  << " inputCollectionType should be either 0 (GsfElectrons) or 1 (pat::Electrons) " << std::endl;
56  }
57 
58  //set regression type
60  if (energyRegressionType_ == 1)
62  else if (energyRegressionType_ == 2)
64  else if (energyRegressionType_ == 3)
66 
67  //load weights and initialize
70 
71  if (produceValueMaps_) {
72  produces<edm::ValueMap<double> >(nameEnergyReg_);
73  produces<edm::ValueMap<double> >(nameEnergyErrorReg_);
74  }
75 
76  //****************************************************************************************
77  //set up regression calculator
78  //****************************************************************************************
79 
80  geomInitialized_ = false;
81 
82  std::cout << " Finished initialization " << std::endl;
83 }

References looper::cfg, gather_cfg::cout, debug_, energyRegressionType_, Exception, geomInitialized_, ElectronEnergyRegressionEvaluate::initialize(), inputCollectionType_, inputGsfElectronsToken_, inputPatElectronsToken_, ElectronEnergyRegressionEvaluate::kNoTrkVar, ElectronEnergyRegressionEvaluate::kWithSubCluVar, ElectronEnergyRegressionEvaluate::kWithTrkVar, nameEnergyErrorReg_, nameEnergyReg_, produceValueMaps_, recHitCollectionEBToken_, recHitCollectionEEToken_, regressionEvaluator_, regressionInputFile_, rhoInputToken_, AlCaHLTBitMon_QueryRunRegistry::string, useReducedRecHits_, and verticesInputToken_.

◆ ~RegressionEnergyPatElectronProducer()

RegressionEnergyPatElectronProducer::~RegressionEnergyPatElectronProducer ( )
override

Definition at line 85 of file RegressionEnergyPatElectronProducer.cc.

85 { delete regressionEvaluator_; }

References regressionEvaluator_.

Member Function Documentation

◆ produce()

void RegressionEnergyPatElectronProducer::produce ( edm::Event event,
const edm::EventSetup setup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 87 of file RegressionEnergyPatElectronProducer.cc.

87  {
89  if (!geomInitialized_) {
90  edm::ESHandle<CaloTopology> theCaloTopology;
91  setup.get<CaloTopologyRecord>().get(theCaloTopology);
92  ecalTopology_ = &(*theCaloTopology);
93 
94  edm::ESHandle<CaloGeometry> theCaloGeometry;
95  setup.get<CaloGeometryRecord>().get(theCaloGeometry);
96  caloGeometry_ = &(*theCaloGeometry);
97  geomInitialized_ = true;
98  }
99 
100  //**************************************************************************
101  //Get Number of Vertices
102  //**************************************************************************
104  event.getByToken(verticesInputToken_, hVertexProduct);
105  const reco::VertexCollection inVertices = *(hVertexProduct.product());
106 
107  // loop through all vertices
108  Int_t nvertices = 0;
109  for (reco::VertexCollection::const_iterator inV = inVertices.begin(); inV != inVertices.end(); ++inV) {
110  //pass these vertex cuts
111  if (inV->ndof() >= 4 && inV->position().Rho() <= 2.0 && fabs(inV->z()) <= 24.0) {
112  nvertices++;
113  }
114  }
115 
116  //**************************************************************************
117  //Get Rho
118  //**************************************************************************
119  double rho = 0;
120  edm::Handle<double> hRhoKt6PFJets;
121  event.getByToken(rhoInputToken_, hRhoKt6PFJets);
122  rho = (*hRhoKt6PFJets);
123 
124  //*************************************************************************
125  // Get the RecHits
126  //************************************************************************
127 
130  if (useReducedRecHits_) {
131  event.getByToken(recHitCollectionEBToken_, pEBRecHits);
132  event.getByToken(recHitCollectionEEToken_, pEERecHits);
133  }
134 
137  if (inputCollectionType_ == 0) {
138  event.getByToken(inputGsfElectronsToken_, gsfCollectionH);
139  nElectrons_ = gsfCollectionH->size();
140  }
141  if (inputCollectionType_ == 1) {
142  event.getByToken(inputPatElectronsToken_, patCollectionH);
143  nElectrons_ = patCollectionH->size();
144  }
145 
146  // prepare the two even if only one is used
147  std::unique_ptr<pat::ElectronCollection> patElectrons(new pat::ElectronCollection);
148 
149  // Fillers for ValueMaps:
150  std::unique_ptr<edm::ValueMap<double> > regrEnergyMap(new edm::ValueMap<double>());
151  edm::ValueMap<double>::Filler energyFiller(*regrEnergyMap);
152 
153  std::unique_ptr<edm::ValueMap<double> > regrEnergyErrorMap(new edm::ValueMap<double>());
154  edm::ValueMap<double>::Filler energyErrorFiller(*regrEnergyErrorMap);
155 
156  // Reserve the vectors with outputs
157  std::vector<double> energyValues;
158  std::vector<double> energyErrorValues;
159  energyValues.reserve(nElectrons_);
160  energyErrorValues.reserve(nElectrons_);
161 
162  for (unsigned iele = 0; iele < nElectrons_; ++iele) {
163  const reco::GsfElectron* ele = (inputCollectionType_ == 0) ? &(*gsfCollectionH)[iele] : &(*patCollectionH)[iele];
164  if (debug_) {
165  std::cout << "***********************************************************************\n";
166  std::cout << "Run Lumi Event: " << event.id().run() << " " << event.luminosityBlock() << " " << event.id().event()
167  << "\n";
168  std::cout << "Pat Electron : " << ele->pt() << " " << ele->eta() << " " << ele->phi() << "\n";
169  }
170 
171  pat::Electron* myPatElectron = (inputCollectionType_ == 0) ? nullptr : new pat::Electron((*patCollectionH)[iele]);
172  // Get RecHit Collection
173  const EcalRecHitCollection* recHits = nullptr;
174  if (useReducedRecHits_) {
175  if (ele->isEB()) {
176  recHits = pEBRecHits.product();
177  } else
178  recHits = pEERecHits.product();
179  } else {
180  recHits = (*patCollectionH)[iele].recHits();
181  }
182 
183  SuperClusterHelper* mySCHelper = nullptr;
184  if (inputCollectionType_ == 0) {
185  mySCHelper = new SuperClusterHelper(&(*ele), recHits, ecalTopology_, caloGeometry_);
186  } else if (inputCollectionType_ == 1) {
187  mySCHelper = new SuperClusterHelper(&(*patCollectionH)[iele], recHits, ecalTopology_, caloGeometry_);
188  }
189 
190  // apply regression energy
191  Double_t FinalMomentum = 0;
192  Double_t FinalMomentumError = 0;
193  Double_t RegressionMomentum = 0;
194  Double_t RegressionMomentumError = 0;
195 
196  if (energyRegressionType_ == 1) {
197  RegressionMomentum = regressionEvaluator_->regressionValueNoTrkVar(mySCHelper->rawEnergy(),
198  mySCHelper->eta(),
199  mySCHelper->phi(),
200  mySCHelper->r9(),
201  mySCHelper->etaWidth(),
202  mySCHelper->phiWidth(),
203  mySCHelper->clustersSize(),
204  mySCHelper->hadronicOverEm(),
205  rho,
206  nvertices,
207  mySCHelper->seedEta(),
208  mySCHelper->seedPhi(),
209  mySCHelper->seedEnergy(),
210  mySCHelper->e3x3(),
211  mySCHelper->e5x5(),
212  mySCHelper->sigmaIetaIeta(),
213  mySCHelper->spp(),
214  mySCHelper->sep(),
215  mySCHelper->eMax(),
216  mySCHelper->e2nd(),
217  mySCHelper->eTop(),
218  mySCHelper->eBottom(),
219  mySCHelper->eLeft(),
220  mySCHelper->eRight(),
221  mySCHelper->e2x5Max(),
222  mySCHelper->e2x5Top(),
223  mySCHelper->e2x5Bottom(),
224  mySCHelper->e2x5Left(),
225  mySCHelper->e2x5Right(),
226  mySCHelper->ietaSeed(),
227  mySCHelper->iphiSeed(),
228  mySCHelper->etaCrySeed(),
229  mySCHelper->phiCrySeed(),
230  mySCHelper->preshowerEnergyOverRaw(),
231  debug_);
232  RegressionMomentumError =
234  mySCHelper->eta(),
235  mySCHelper->phi(),
236  mySCHelper->r9(),
237  mySCHelper->etaWidth(),
238  mySCHelper->phiWidth(),
239  mySCHelper->clustersSize(),
240  mySCHelper->hadronicOverEm(),
241  rho,
242  nvertices,
243  mySCHelper->seedEta(),
244  mySCHelper->seedPhi(),
245  mySCHelper->seedEnergy(),
246  mySCHelper->e3x3(),
247  mySCHelper->e5x5(),
248  mySCHelper->sigmaIetaIeta(),
249  mySCHelper->spp(),
250  mySCHelper->sep(),
251  mySCHelper->eMax(),
252  mySCHelper->e2nd(),
253  mySCHelper->eTop(),
254  mySCHelper->eBottom(),
255  mySCHelper->eLeft(),
256  mySCHelper->eRight(),
257  mySCHelper->e2x5Max(),
258  mySCHelper->e2x5Top(),
259  mySCHelper->e2x5Bottom(),
260  mySCHelper->e2x5Left(),
261  mySCHelper->e2x5Right(),
262  mySCHelper->ietaSeed(),
263  mySCHelper->iphiSeed(),
264  mySCHelper->etaCrySeed(),
265  mySCHelper->phiCrySeed(),
266  mySCHelper->preshowerEnergyOverRaw(),
267  debug_);
268 
269  // PAT method
270  if (inputCollectionType_ == 1) {
271  myPatElectron->setEcalRegressionEnergy(RegressionMomentum, RegressionMomentumError);
272  }
273  energyValues.push_back(RegressionMomentum);
274  energyErrorValues.push_back(RegressionMomentumError);
275 
276  } else if (energyRegressionType_ == 2) { // ECAL regression with subcluster information
277  RegressionMomentum = regressionEvaluator_->regressionValueWithSubClusters(mySCHelper->rawEnergy(),
278  mySCHelper->eta(),
279  mySCHelper->phi(),
280  mySCHelper->r9(),
281  mySCHelper->etaWidth(),
282  mySCHelper->phiWidth(),
283  mySCHelper->clustersSize(),
284  mySCHelper->hadronicOverEm(),
285  rho,
286  nvertices,
287  mySCHelper->seedEta(),
288  mySCHelper->seedPhi(),
289  mySCHelper->seedEnergy(),
290  mySCHelper->e3x3(),
291  mySCHelper->e5x5(),
292  mySCHelper->sigmaIetaIeta(),
293  mySCHelper->spp(),
294  mySCHelper->sep(),
295  mySCHelper->eMax(),
296  mySCHelper->e2nd(),
297  mySCHelper->eTop(),
298  mySCHelper->eBottom(),
299  mySCHelper->eLeft(),
300  mySCHelper->eRight(),
301  mySCHelper->e2x5Max(),
302  mySCHelper->e2x5Top(),
303  mySCHelper->e2x5Bottom(),
304  mySCHelper->e2x5Left(),
305  mySCHelper->e2x5Right(),
306  mySCHelper->ietaSeed(),
307  mySCHelper->iphiSeed(),
308  mySCHelper->etaCrySeed(),
309  mySCHelper->phiCrySeed(),
310  mySCHelper->preshowerEnergyOverRaw(),
311  ele->ecalDrivenSeed(),
312  ele->isEBEtaGap(),
313  ele->isEBPhiGap(),
314  ele->isEEDeeGap(),
315  mySCHelper->eSubClusters(),
316  mySCHelper->subClusterEnergy(1),
317  mySCHelper->subClusterEta(1),
318  mySCHelper->subClusterPhi(1),
319  mySCHelper->subClusterEmax(1),
320  mySCHelper->subClusterE3x3(1),
321  mySCHelper->subClusterEnergy(2),
322  mySCHelper->subClusterEta(2),
323  mySCHelper->subClusterPhi(2),
324  mySCHelper->subClusterEmax(2),
325  mySCHelper->subClusterE3x3(2),
326  mySCHelper->subClusterEnergy(3),
327  mySCHelper->subClusterEta(3),
328  mySCHelper->subClusterPhi(3),
329  mySCHelper->subClusterEmax(3),
330  mySCHelper->subClusterE3x3(3),
331  mySCHelper->nPreshowerClusters(),
332  mySCHelper->eESClusters(),
333  mySCHelper->esClusterEnergy(0),
334  mySCHelper->esClusterEta(0),
335  mySCHelper->esClusterPhi(0),
336  mySCHelper->esClusterEnergy(1),
337  mySCHelper->esClusterEta(1),
338  mySCHelper->esClusterPhi(1),
339  mySCHelper->esClusterEnergy(2),
340  mySCHelper->esClusterEta(2),
341  mySCHelper->esClusterPhi(2),
342  ele->isEB(),
343  debug_);
344  RegressionMomentumError =
346  mySCHelper->eta(),
347  mySCHelper->phi(),
348  mySCHelper->r9(),
349  mySCHelper->etaWidth(),
350  mySCHelper->phiWidth(),
351  mySCHelper->clustersSize(),
352  mySCHelper->hadronicOverEm(),
353  rho,
354  nvertices,
355  mySCHelper->seedEta(),
356  mySCHelper->seedPhi(),
357  mySCHelper->seedEnergy(),
358  mySCHelper->e3x3(),
359  mySCHelper->e5x5(),
360  mySCHelper->sigmaIetaIeta(),
361  mySCHelper->spp(),
362  mySCHelper->sep(),
363  mySCHelper->eMax(),
364  mySCHelper->e2nd(),
365  mySCHelper->eTop(),
366  mySCHelper->eBottom(),
367  mySCHelper->eLeft(),
368  mySCHelper->eRight(),
369  mySCHelper->e2x5Max(),
370  mySCHelper->e2x5Top(),
371  mySCHelper->e2x5Bottom(),
372  mySCHelper->e2x5Left(),
373  mySCHelper->e2x5Right(),
374  mySCHelper->ietaSeed(),
375  mySCHelper->iphiSeed(),
376  mySCHelper->etaCrySeed(),
377  mySCHelper->phiCrySeed(),
378  mySCHelper->preshowerEnergyOverRaw(),
379  ele->ecalDrivenSeed(),
380  ele->isEBEtaGap(),
381  ele->isEBPhiGap(),
382  ele->isEEDeeGap(),
383  mySCHelper->eSubClusters(),
384  mySCHelper->subClusterEnergy(1),
385  mySCHelper->subClusterEta(1),
386  mySCHelper->subClusterPhi(1),
387  mySCHelper->subClusterEmax(1),
388  mySCHelper->subClusterE3x3(1),
389  mySCHelper->subClusterEnergy(2),
390  mySCHelper->subClusterEta(2),
391  mySCHelper->subClusterPhi(2),
392  mySCHelper->subClusterEmax(2),
393  mySCHelper->subClusterE3x3(2),
394  mySCHelper->subClusterEnergy(3),
395  mySCHelper->subClusterEta(3),
396  mySCHelper->subClusterPhi(3),
397  mySCHelper->subClusterEmax(3),
398  mySCHelper->subClusterE3x3(3),
399  mySCHelper->nPreshowerClusters(),
400  mySCHelper->eESClusters(),
401  mySCHelper->esClusterEnergy(0),
402  mySCHelper->esClusterEta(0),
403  mySCHelper->esClusterPhi(0),
404  mySCHelper->esClusterEnergy(1),
405  mySCHelper->esClusterEta(1),
406  mySCHelper->esClusterPhi(1),
407  mySCHelper->esClusterEnergy(2),
408  mySCHelper->esClusterEta(2),
409  mySCHelper->esClusterPhi(2),
410  ele->isEB(),
411  debug_);
412 
413  // PAT method
414  if (inputCollectionType_ == 1) {
415  myPatElectron->setEcalRegressionEnergy(RegressionMomentum, RegressionMomentumError);
416  }
417  energyValues.push_back(RegressionMomentum);
418  energyErrorValues.push_back(RegressionMomentumError);
419 
420  }
421 
422  else if (energyRegressionType_ == 3) {
423  RegressionMomentum = regressionEvaluator_->regressionValueWithTrkVar(ele->p(),
424  mySCHelper->rawEnergy(),
425  mySCHelper->eta(),
426  mySCHelper->phi(),
427  mySCHelper->etaWidth(),
428  mySCHelper->phiWidth(),
429  mySCHelper->clustersSize(),
430  mySCHelper->hadronicOverEm(),
431  mySCHelper->r9(),
432  rho,
433  nvertices,
434  mySCHelper->seedEta(),
435  mySCHelper->seedPhi(),
436  mySCHelper->seedEnergy(),
437  mySCHelper->e3x3(),
438  mySCHelper->e5x5(),
439  mySCHelper->sigmaIetaIeta(),
440  mySCHelper->spp(),
441  mySCHelper->sep(),
442  mySCHelper->eMax(),
443  mySCHelper->e2nd(),
444  mySCHelper->eTop(),
445  mySCHelper->eBottom(),
446  mySCHelper->eLeft(),
447  mySCHelper->eRight(),
448  mySCHelper->e2x5Max(),
449  mySCHelper->e2x5Top(),
450  mySCHelper->e2x5Bottom(),
451  mySCHelper->e2x5Left(),
452  mySCHelper->e2x5Right(),
453  ele->pt(),
454  ele->trackMomentumAtVtx().R(),
455  ele->fbrem(),
456  ele->charge(),
457  ele->eSuperClusterOverP(),
458  mySCHelper->ietaSeed(),
459  mySCHelper->iphiSeed(),
460  mySCHelper->etaCrySeed(),
461  mySCHelper->phiCrySeed(),
462  mySCHelper->preshowerEnergy(),
463  debug_);
464  RegressionMomentumError = regressionEvaluator_->regressionUncertaintyWithTrkVar(ele->p(),
465  mySCHelper->rawEnergy(),
466  mySCHelper->eta(),
467  mySCHelper->phi(),
468  mySCHelper->etaWidth(),
469  mySCHelper->phiWidth(),
470  mySCHelper->clustersSize(),
471  mySCHelper->hadronicOverEm(),
472  mySCHelper->r9(),
473  rho,
474  nvertices,
475  mySCHelper->seedEta(),
476  mySCHelper->seedPhi(),
477  mySCHelper->seedEnergy(),
478  mySCHelper->e3x3(),
479  mySCHelper->e5x5(),
480  mySCHelper->sigmaIetaIeta(),
481  mySCHelper->spp(),
482  mySCHelper->sep(),
483  mySCHelper->eMax(),
484  mySCHelper->e2nd(),
485  mySCHelper->eTop(),
486  mySCHelper->eBottom(),
487  mySCHelper->eLeft(),
488  mySCHelper->eRight(),
489  mySCHelper->e2x5Max(),
490  mySCHelper->e2x5Top(),
491  mySCHelper->e2x5Bottom(),
492  mySCHelper->e2x5Left(),
493  mySCHelper->e2x5Right(),
494  ele->pt(),
495  ele->trackMomentumAtVtx().R(),
496  ele->fbrem(),
497  ele->charge(),
498  ele->eSuperClusterOverP(),
499  mySCHelper->ietaSeed(),
500  mySCHelper->iphiSeed(),
501  mySCHelper->etaCrySeed(),
502  mySCHelper->phiCrySeed(),
503  mySCHelper->preshowerEnergy(),
504  debug_);
505  FinalMomentum = RegressionMomentum;
506  FinalMomentumError = RegressionMomentumError;
507  const math::XYZTLorentzVector& oldMomentum = ele->p4();
508  math::XYZTLorentzVector newMomentum = math::XYZTLorentzVector(oldMomentum.x() * FinalMomentum / oldMomentum.t(),
509  oldMomentum.y() * FinalMomentum / oldMomentum.t(),
510  oldMomentum.z() * FinalMomentum / oldMomentum.t(),
511  FinalMomentum);
512 
513  myPatElectron->correctEcalEnergy(RegressionMomentum, RegressionMomentumError);
514  myPatElectron->correctMomentum(newMomentum, ele->trackMomentumError(), FinalMomentumError);
515 
516  energyValues.push_back(RegressionMomentum);
517  energyErrorValues.push_back(RegressionMomentumError);
518  } else {
519  std::cout << "Error: RegressionType = " << energyRegressionType_ << " is not supported.\n";
520  }
521 
522  if (inputCollectionType_ == 1) {
523  patElectrons->push_back(*myPatElectron);
524  }
525  if (myPatElectron)
526  delete myPatElectron;
527  if (mySCHelper)
528  delete mySCHelper;
529  } // loop on electrons
530 
531  // Write the new collection in the event (AOD case)
532  if (inputCollectionType_ == 1) {
533  event.put(std::move(patElectrons));
534  }
535 
536  // now AOD case: write ValueMaps
537  if (produceValueMaps_) {
538  if (inputCollectionType_ == 0) {
539  energyFiller.insert(gsfCollectionH, energyValues.begin(), energyValues.end());
540  energyErrorFiller.insert(gsfCollectionH, energyErrorValues.begin(), energyErrorValues.end());
541  } else if (inputCollectionType_ == 1) {
542  energyFiller.insert(patCollectionH, energyValues.begin(), energyValues.end());
543  energyErrorFiller.insert(patCollectionH, energyErrorValues.begin(), energyErrorValues.end());
544  }
545 
546  energyFiller.fill();
547  energyErrorFiller.fill();
548  event.put(std::move(regrEnergyMap), nameEnergyReg_);
549  event.put(std::move(regrEnergyErrorMap), nameEnergyErrorReg_);
550  }
551 }

References cms::cuda::assert(), caloGeometry_, reco::LeafCandidate::charge(), SuperClusterHelper::clustersSize(), reco::GsfElectron::correctEcalEnergy(), reco::GsfElectron::correctMomentum(), gather_cfg::cout, debug_, SuperClusterHelper::e2nd(), SuperClusterHelper::e2x5Bottom(), SuperClusterHelper::e2x5Left(), SuperClusterHelper::e2x5Max(), SuperClusterHelper::e2x5Right(), SuperClusterHelper::e2x5Top(), SuperClusterHelper::e3x3(), SuperClusterHelper::e5x5(), SuperClusterHelper::eBottom(), reco::GsfElectron::ecalDrivenSeed(), ecalTopology_, SuperClusterHelper::eESClusters(), SuperClusterHelper::eLeft(), SuperClusterHelper::eMax(), energyRegressionType_, SuperClusterHelper::eRight(), SuperClusterHelper::esClusterEnergy(), SuperClusterHelper::esClusterEta(), SuperClusterHelper::esClusterPhi(), SuperClusterHelper::eSubClusters(), reco::GsfElectron::eSuperClusterOverP(), SuperClusterHelper::eta(), reco::LeafCandidate::eta(), SuperClusterHelper::etaCrySeed(), SuperClusterHelper::etaWidth(), SuperClusterHelper::eTop(), reco::GsfElectron::fbrem(), edm::helper::Filler< Map >::fill(), geomInitialized_, get, SuperClusterHelper::hadronicOverEm(), SuperClusterHelper::ietaSeed(), inputCollectionType_, inputGsfElectronsToken_, inputPatElectronsToken_, edm::helper::Filler< Map >::insert(), SuperClusterHelper::iphiSeed(), reco::GsfElectron::isEB(), reco::GsfElectron::isEBEtaGap(), reco::GsfElectron::isEBPhiGap(), reco::GsfElectron::isEEDeeGap(), ElectronEnergyRegressionEvaluate::isInitialized(), eostools::move(), nameEnergyErrorReg_, nameEnergyReg_, nElectrons_, SuperClusterHelper::nPreshowerClusters(), reco::LeafCandidate::p(), reco::GsfElectron::p4(), patElectronEAIsoCorrectionProducer_cfi::patElectrons, SuperClusterHelper::phi(), reco::LeafCandidate::phi(), SuperClusterHelper::phiCrySeed(), SuperClusterHelper::phiWidth(), SuperClusterHelper::preshowerEnergy(), SuperClusterHelper::preshowerEnergyOverRaw(), produceValueMaps_, edm::Handle< T >::product(), reco::LeafCandidate::pt(), SuperClusterHelper::r9(), SuperClusterHelper::rawEnergy(), recHitCollectionEBToken_, recHitCollectionEEToken_, FastTrackerRecHitMaskProducer_cfi::recHits, regressionEvaluator_, ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueNoTrkVar(), ElectronEnergyRegressionEvaluate::regressionValueWithSubClusters(), ElectronEnergyRegressionEvaluate::regressionValueWithTrkVar(), rho, rhoInputToken_, SuperClusterHelper::seedEnergy(), SuperClusterHelper::seedEta(), SuperClusterHelper::seedPhi(), SuperClusterHelper::sep(), pat::Electron::setEcalRegressionEnergy(), singleTopDQM_cfi::setup, SuperClusterHelper::sigmaIetaIeta(), SuperClusterHelper::spp(), SuperClusterHelper::subClusterE3x3(), SuperClusterHelper::subClusterEmax(), SuperClusterHelper::subClusterEnergy(), SuperClusterHelper::subClusterEta(), SuperClusterHelper::subClusterPhi(), reco::GsfElectron::trackMomentumAtVtx(), reco::GsfElectron::trackMomentumError(), useReducedRecHits_, and verticesInputToken_.

Member Data Documentation

◆ caloGeometry_

const CaloGeometry* RegressionEnergyPatElectronProducer::caloGeometry_
private

Definition at line 52 of file RegressionEnergyPatElectronProducer.h.

Referenced by produce().

◆ debug_

bool RegressionEnergyPatElectronProducer::debug_
private

◆ ecalTopology_

const CaloTopology* RegressionEnergyPatElectronProducer::ecalTopology_
private

Definition at line 51 of file RegressionEnergyPatElectronProducer.h.

Referenced by produce().

◆ energyRegressionType_

uint32_t RegressionEnergyPatElectronProducer::energyRegressionType_
private

◆ geomInitialized_

bool RegressionEnergyPatElectronProducer::geomInitialized_
private

◆ inputCollectionType_

uint32_t RegressionEnergyPatElectronProducer::inputCollectionType_
private

◆ inputGsfElectronsToken_

edm::EDGetTokenT<reco::GsfElectronCollection> RegressionEnergyPatElectronProducer::inputGsfElectronsToken_
private

◆ inputPatElectronsToken_

edm::EDGetTokenT<pat::ElectronCollection> RegressionEnergyPatElectronProducer::inputPatElectronsToken_
private

◆ nameEnergyErrorReg_

std::string RegressionEnergyPatElectronProducer::nameEnergyErrorReg_
private

◆ nameEnergyReg_

std::string RegressionEnergyPatElectronProducer::nameEnergyReg_
private

◆ nElectrons_

unsigned RegressionEnergyPatElectronProducer::nElectrons_
private

Definition at line 53 of file RegressionEnergyPatElectronProducer.h.

Referenced by produce().

◆ producePatElectrons_

bool RegressionEnergyPatElectronProducer::producePatElectrons_
private

Definition at line 48 of file RegressionEnergyPatElectronProducer.h.

◆ produceValueMaps_

bool RegressionEnergyPatElectronProducer::produceValueMaps_
private

◆ recHitCollectionEBToken_

edm::EDGetTokenT<EcalRecHitCollection> RegressionEnergyPatElectronProducer::recHitCollectionEBToken_
private

◆ recHitCollectionEEToken_

edm::EDGetTokenT<EcalRecHitCollection> RegressionEnergyPatElectronProducer::recHitCollectionEEToken_
private

◆ regressionEvaluator_

ElectronEnergyRegressionEvaluate* RegressionEnergyPatElectronProducer::regressionEvaluator_
private

◆ regressionInputFile_

std::string RegressionEnergyPatElectronProducer::regressionInputFile_
private

◆ rhoInputToken_

edm::EDGetTokenT<double> RegressionEnergyPatElectronProducer::rhoInputToken_
private

◆ useReducedRecHits_

bool RegressionEnergyPatElectronProducer::useReducedRecHits_
private

◆ verticesInputToken_

edm::EDGetTokenT<reco::VertexCollection> RegressionEnergyPatElectronProducer::verticesInputToken_
private
SuperClusterHelper::phi
float phi() const
Definition: SuperClusterHelper.h:26
SuperClusterHelper::sigmaIetaIeta
float sigmaIetaIeta() const
Definition: SuperClusterHelper.h:31
ElectronEnergyRegressionEvaluate::isInitialized
bool isInitialized() const
Definition: ElectronEnergyRegressionEvaluate.h:47
reco::GsfElectron::isEB
bool isEB() const
Definition: GsfElectron.h:335
SuperClusterHelper::e2x5Right
float e2x5Right() const
Definition: SuperClusterHelper.h:46
RegressionEnergyPatElectronProducer::nameEnergyReg_
std::string nameEnergyReg_
Definition: RegressionEnergyPatElectronProducer.h:39
RegressionEnergyPatElectronProducer::inputCollectionType_
uint32_t inputCollectionType_
Definition: RegressionEnergyPatElectronProducer.h:43
SuperClusterHelper::spp
float spp()
Definition: SuperClusterHelper.cc:124
edm::Handle::product
T const * product() const
Definition: Handle.h:70
SuperClusterHelper::subClusterE3x3
float subClusterE3x3(unsigned i) const
Definition: SuperClusterHelper.cc:164
SuperClusterHelper::etaWidth
float etaWidth() const
Definition: SuperClusterHelper.h:27
RegressionEnergyPatElectronProducer::inputPatElectronsToken_
edm::EDGetTokenT< pat::ElectronCollection > inputPatElectronsToken_
Definition: RegressionEnergyPatElectronProducer.h:28
pat::ElectronCollection
std::vector< Electron > ElectronCollection
Definition: Electron.h:36
reco::GsfElectron::correctMomentum
void correctMomentum(const LorentzVector &p4, float trackMomentumError, float p4Error)
Definition: GsfElectron.h:827
SuperClusterHelper::eRight
float eRight() const
Definition: SuperClusterHelper.h:41
CaloGeometryRecord
Definition: CaloGeometryRecord.h:30
RegressionEnergyPatElectronProducer::recHitCollectionEBToken_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEBToken_
Definition: RegressionEnergyPatElectronProducer.h:31
SuperClusterHelper::hadronicOverEm
float hadronicOverEm() const
Definition: SuperClusterHelper.h:30
RegressionEnergyPatElectronProducer::ecalTopology_
const CaloTopology * ecalTopology_
Definition: RegressionEnergyPatElectronProducer.h:51
reco::GsfElectron::correctEcalEnergy
void correctEcalEnergy(float newEnergy, float newEnergyError)
Definition: GsfElectron.h:823
ElectronEnergyRegressionEvaluate
Definition: ElectronEnergyRegressionEvaluate.h:31
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
gather_cfg.cout
cout
Definition: gather_cfg.py:144
SuperClusterHelper::seedEnergy
float seedEnergy() const
Definition: SuperClusterHelper.h:54
SuperClusterHelper::e2x5Max
float e2x5Max() const
Definition: SuperClusterHelper.h:42
cms::cuda::assert
assert(be >=bs)
SuperClusterHelper::esClusterPhi
float esClusterPhi(unsigned i) const
Definition: SuperClusterHelper.cc:176
RegressionEnergyPatElectronProducer::nElectrons_
unsigned nElectrons_
Definition: RegressionEnergyPatElectronProducer.h:53
edm::SortedCollection< EcalRecHit >
ElectronEnergyRegressionEvaluate::regressionUncertaintyNoTrkVar
double regressionUncertaintyNoTrkVar(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:726
RegressionEnergyPatElectronProducer::produceValueMaps_
bool produceValueMaps_
Definition: RegressionEnergyPatElectronProducer.h:49
CaloTopologyRecord
Definition: CaloTopologyRecord.h:10
RegressionEnergyPatElectronProducer::useReducedRecHits_
bool useReducedRecHits_
Definition: RegressionEnergyPatElectronProducer.h:35
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
RegressionEnergyPatElectronProducer::geomInitialized_
bool geomInitialized_
Definition: RegressionEnergyPatElectronProducer.h:47
SuperClusterHelper::nPreshowerClusters
float nPreshowerClusters() const
Definition: SuperClusterHelper.h:93
edm::Handle< reco::VertexCollection >
SuperClusterHelper::sep
float sep()
Definition: SuperClusterHelper.cc:129
SuperClusterHelper::iphiSeed
int iphiSeed()
Definition: SuperClusterHelper.h:59
reco::GsfElectron::fbrem
float fbrem() const
Definition: GsfElectron.h:732
SuperClusterHelper::subClusterEnergy
float subClusterEnergy(unsigned i) const
Definition: SuperClusterHelper.cc:148
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
SuperClusterHelper::eMax
float eMax() const
Definition: SuperClusterHelper.h:36
SuperClusterHelper::eESClusters
float eESClusters() const
Definition: SuperClusterHelper.h:94
RegressionEnergyPatElectronProducer::verticesInputToken_
edm::EDGetTokenT< reco::VertexCollection > verticesInputToken_
Definition: RegressionEnergyPatElectronProducer.h:30
SuperClusterHelper::clustersSize
float clustersSize() const
Definition: SuperClusterHelper.h:29
ElectronEnergyRegressionEvaluate::regressionValueNoTrkVar
double regressionValueNoTrkVar(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:564
reco::GsfElectron::trackMomentumAtVtx
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:275
reco::GsfElectron::ecalDrivenSeed
bool ecalDrivenSeed() const
Definition: GsfElectron.h:165
SuperClusterHelper::e2x5Bottom
float e2x5Bottom() const
Definition: SuperClusterHelper.h:44
edm::ESHandle< CaloTopology >
reco::GsfElectron::isEEDeeGap
bool isEEDeeGap() const
Definition: GsfElectron.h:343
ElectronEnergyRegressionEvaluate::ElectronEnergyRegressionType
ElectronEnergyRegressionType
Definition: ElectronEnergyRegressionEvaluate.h:36
reco::GsfElectron
Definition: GsfElectron.h:34
SuperClusterHelper::e2nd
float e2nd() const
Definition: SuperClusterHelper.h:37
ElectronEnergyRegressionEvaluate::kNoTrkVar
Definition: ElectronEnergyRegressionEvaluate.h:37
SuperClusterHelper::rawEnergy
float rawEnergy() const
Definition: SuperClusterHelper.h:24
SuperClusterHelper::phiWidth
float phiWidth() const
Definition: SuperClusterHelper.h:28
RegressionEnergyPatElectronProducer::recHitCollectionEEToken_
edm::EDGetTokenT< EcalRecHitCollection > recHitCollectionEEToken_
Definition: RegressionEnergyPatElectronProducer.h:32
DDAxes::rho
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SuperClusterHelper::esClusterEta
float esClusterEta(unsigned i) const
Definition: SuperClusterHelper.cc:172
RegressionEnergyPatElectronProducer::regressionEvaluator_
ElectronEnergyRegressionEvaluate * regressionEvaluator_
Definition: RegressionEnergyPatElectronProducer.h:46
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
ElectronEnergyRegressionEvaluate::regressionUncertaintyWithTrkVar
double regressionUncertaintyWithTrkVar(double electronP, double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double pt, double GsfTrackPIn, double fbrem, double Charge, double EoP, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:1389
SuperClusterHelper::e2x5Top
float e2x5Top() const
Definition: SuperClusterHelper.h:43
SuperClusterHelper::eSubClusters
float eSubClusters() const
Definition: SuperClusterHelper.h:87
ElectronEnergyRegressionEvaluate::kWithSubCluVar
Definition: ElectronEnergyRegressionEvaluate.h:42
SuperClusterHelper::eta
float eta() const
Definition: SuperClusterHelper.h:25
RegressionEnergyPatElectronProducer::regressionInputFile_
std::string regressionInputFile_
Definition: RegressionEnergyPatElectronProducer.h:44
ElectronEnergyRegressionEvaluate::regressionUncertaintyWithSubClusters
double regressionUncertaintyWithSubClusters(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, double isEcalDriven, double isEtaGap, double isPhiGap, double isDeeGap, double ESubs, double ESub1, double EtaSub1, double PhiSub1, double EMaxSub1, double E3x3Sub1, double ESub2, double EtaSub2, double PhiSub2, double EMaxSub2, double E3x3Sub2, double ESub3, double EtaSub3, double PhiSub3, double EMaxSub3, double E3x3Sub3, double NPshwClusters, double EPshwSubs, double EPshwSub1, double EtaPshwSub1, double PhiPshwSub1, double EPshwSub2, double EtaPshwSub2, double PhiPshwSub2, double EPshwSub3, double EtaPshwSub3, double PhiPshwSub3, bool isEB, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:3327
reco::LeafCandidate::eta
double eta() const final
momentum pseudorapidity
Definition: LeafCandidate.h:152
SuperClusterHelper::e2x5Left
float e2x5Left() const
Definition: SuperClusterHelper.h:45
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
SuperClusterHelper::phiCrySeed
float phiCrySeed()
Definition: SuperClusterHelper.h:67
SuperClusterHelper::seedEta
float seedEta() const
Definition: SuperClusterHelper.h:52
RegressionEnergyPatElectronProducer::debug_
bool debug_
Definition: RegressionEnergyPatElectronProducer.h:45
SuperClusterHelper::preshowerEnergyOverRaw
float preshowerEnergyOverRaw() const
Definition: SuperClusterHelper.h:33
RegressionEnergyPatElectronProducer::nameEnergyErrorReg_
std::string nameEnergyErrorReg_
Definition: RegressionEnergyPatElectronProducer.h:40
SuperClusterHelper::esClusterEnergy
float esClusterEnergy(unsigned i) const
Definition: SuperClusterHelper.cc:168
pat::Electron::setEcalRegressionEnergy
void setEcalRegressionEnergy(double val, double err)
set regression1
Definition: Electron.h:230
SuperClusterHelper::preshowerEnergy
float preshowerEnergy() const
Definition: SuperClusterHelper.h:32
reco::LeafCandidate::charge
int charge() const final
electric charge
Definition: LeafCandidate.h:106
reco::GsfElectron::isEBEtaGap
bool isEBEtaGap() const
Definition: GsfElectron.h:340
RegressionEnergyPatElectronProducer::inputGsfElectronsToken_
edm::EDGetTokenT< reco::GsfElectronCollection > inputGsfElectronsToken_
Definition: RegressionEnergyPatElectronProducer.h:27
get
#define get
RegressionEnergyPatElectronProducer::caloGeometry_
const CaloGeometry * caloGeometry_
Definition: RegressionEnergyPatElectronProducer.h:52
reco::GsfElectron::p4
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:211
SuperClusterHelper::ietaSeed
int ietaSeed()
Definition: SuperClusterHelper.h:55
looper.cfg
cfg
Definition: looper.py:297
SuperClusterHelper
Definition: SuperClusterHelper.h:12
eostools.move
def move(src, dest)
Definition: eostools.py:511
reco::LeafCandidate::phi
double phi() const final
momentum azimuthal angle
Definition: LeafCandidate.h:148
SuperClusterHelper::subClusterEmax
float subClusterEmax(unsigned i) const
Definition: SuperClusterHelper.cc:160
ElectronEnergyRegressionEvaluate::regressionValueWithSubClusters
double regressionValueWithSubClusters(double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, double isEcalDriven, double isEtaGap, double isPhiGap, double isDeeGap, double ESubs, double ESub1, double EtaSub1, double PhiSub1, double EMaxSub1, double E3x3Sub1, double ESub2, double EtaSub2, double PhiSub2, double EMaxSub2, double E3x3Sub2, double ESub3, double EtaSub3, double PhiSub3, double EMaxSub3, double E3x3Sub3, double NPshwClusters, double EPshwSubs, double EPshwSub1, double EtaPshwSub1, double PhiPshwSub1, double EPshwSub2, double EtaPshwSub2, double PhiPshwSub2, double EPshwSub3, double EtaPshwSub3, double PhiPshwSub3, bool isEB, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:3077
SuperClusterHelper::subClusterPhi
float subClusterPhi(unsigned i) const
Definition: SuperClusterHelper.cc:156
math::XYZTLorentzVector
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
edm::ValueMap
Definition: ValueMap.h:107
Exception
Definition: hltDiff.cc:245
reco::LeafCandidate::p
double p() const final
magnitude of momentum vector
Definition: LeafCandidate.h:123
SuperClusterHelper::e5x5
float e5x5() const
Definition: SuperClusterHelper.h:35
reco::GsfElectron::eSuperClusterOverP
float eSuperClusterOverP() const
Definition: GsfElectron.h:228
ElectronEnergyRegressionEvaluate::regressionValueWithTrkVar
double regressionValueWithTrkVar(double electronP, double SCRawEnergy, double scEta, double scPhi, double R9, double etawidth, double phiwidth, double NClusters, double HoE, double rho, double vertices, double EtaSeed, double PhiSeed, double ESeed, double E3x3Seed, double E5x5Seed, double see, double spp, double sep, double EMaxSeed, double E2ndSeed, double ETopSeed, double EBottomSeed, double ELeftSeed, double ERightSeed, double E2x5MaxSeed, double E2x5TopSeed, double E2x5BottomSeed, double E2x5LeftSeed, double E2x5RightSeed, double pt, double GsfTrackPIn, double fbrem, double Charge, double EoP, double IEtaSeed, double IPhiSeed, double EtaCrySeed, double PhiCrySeed, double PreShowerOverRaw, bool printDebug=false)
Definition: ElectronEnergyRegressionEvaluate.cc:1217
reco::GsfElectron::isEBPhiGap
bool isEBPhiGap() const
Definition: GsfElectron.h:341
SuperClusterHelper::eTop
float eTop() const
Definition: SuperClusterHelper.h:38
patElectronEAIsoCorrectionProducer_cfi.patElectrons
patElectrons
Definition: patElectronEAIsoCorrectionProducer_cfi.py:4
reco::GsfElectron::trackMomentumError
float trackMomentumError() const
Definition: GsfElectron.h:806
edm::helper::Filler
Definition: ValueMap.h:22
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
RegressionEnergyPatElectronProducer::rhoInputToken_
edm::EDGetTokenT< double > rhoInputToken_
Definition: RegressionEnergyPatElectronProducer.h:29
SuperClusterHelper::etaCrySeed
float etaCrySeed()
Definition: SuperClusterHelper.h:63
SuperClusterHelper::subClusterEta
float subClusterEta(unsigned i) const
Definition: SuperClusterHelper.cc:152
RegressionEnergyPatElectronProducer::energyRegressionType_
uint32_t energyRegressionType_
Definition: RegressionEnergyPatElectronProducer.h:42
SuperClusterHelper::eBottom
float eBottom() const
Definition: SuperClusterHelper.h:39
SuperClusterHelper::r9
float r9() const
Definition: SuperClusterHelper.h:47
edm::InputTag
Definition: InputTag.h:15
ElectronEnergyRegressionEvaluate::initialize
void initialize(std::string weightsFile, ElectronEnergyRegressionEvaluate::ElectronEnergyRegressionType type)
Definition: ElectronEnergyRegressionEvaluate.cc:25
ElectronEnergyRegressionEvaluate::kWithTrkVar
Definition: ElectronEnergyRegressionEvaluate.h:39
SuperClusterHelper::seedPhi
float seedPhi() const
Definition: SuperClusterHelper.h:53
SuperClusterHelper::eLeft
float eLeft() const
Definition: SuperClusterHelper.h:40
SuperClusterHelper::e3x3
float e3x3() const
Definition: SuperClusterHelper.h:34