CMS 3D CMS Logo

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

#include <RecoEgamma/ElectronIdentification/plugins/ElectronMVANtuplizer.cc>

Inheritance diagram for ElectronMVANtuplizer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 ElectronMVANtuplizer (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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
 
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::vector< ModuleDescription const * > &modules, 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)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
int matchToTruth (reco::GsfElectron const &electron, edm::View< reco::GenParticle > const &genParticles) const
 

Private Attributes

const double deltaR_
 
const bool doEnergyMatrix_
 
const edm::EDGetTokenT< EcalRecHitCollectionebRecHits_
 
const edm::EDGetTokenT< EcalRecHitCollectioneeRecHits_
 
int ele3Q_
 
bool eleIsEB_
 
bool eleIsEBEEGap_
 
bool eleIsEBEtaGap_
 
bool eleIsEBPhiGap_
 
bool eleIsEE_
 
bool eleIsEEDeeGap_
 
bool eleIsEERingGap_
 
const std::vector< std::string > eleMapBranchNames_
 
const std::vector< std::string > eleMapTags_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > eleMapTokens_
 
float eleQ_
 
std::vector< float > energyMatrix_
 
const int energyMatrixSize_
 
int genNpu_
 
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticles_
 
const bool isMC_
 
int matchedToGenEle_
 
const std::vector< std::string > mvaCatBranchNames_
 
std::vector< int > mvaCats_
 
const std::vector< std::string > mvaCatTags_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< int > > > mvaCatTokens_
 
std::vector< int > mvaPasses_
 
std::vector< float > mvaValues_
 
MVAVariableManager< reco::GsfElectronmvaVarMngr_
 
const size_t nCats_
 
const size_t nEleMaps_
 
int nEvent_
 
int nLumi_
 
int nRun_
 
const size_t nValMaps_
 
const int nVars_
 
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileup_
 
const double ptThreshold_
 
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > src_
 
TTree * tree_
 
const std::vector< std::string > valMapBranchNames_
 
const std::vector< std::string > valMapTags_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > valMapTokens_
 
const MVAVariableHelper variableHelper_
 
std::vector< float > vars_
 
const edm::EDGetTokenT< std::vector< reco::Vertex > > vertices_
 
int vtxN_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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>
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<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Description: Ntuplizer for training and testing electron MVA IDs.

Implementation: [Notes on implementation]

Definition at line 45 of file ElectronMVANtuplizer.cc.

Constructor & Destructor Documentation

◆ ElectronMVANtuplizer()

ElectronMVANtuplizer::ElectronMVANtuplizer ( const edm::ParameterSet iConfig)
explicit

Definition at line 149 of file ElectronMVANtuplizer.cc.

150  : isMC_(iConfig.getParameter<bool>("isMC")),
151  deltaR_(iConfig.getParameter<double>("deltaR")),
152  ptThreshold_(iConfig.getParameter<double>("ptThreshold")),
153  eleMapTags_(iConfig.getParameter<std::vector<std::string>>("eleMVAs")),
154  eleMapBranchNames_(iConfig.getParameter<std::vector<std::string>>("eleMVALabels")),
156  valMapTags_(iConfig.getParameter<std::vector<std::string>>("eleMVAValMaps")),
157  valMapBranchNames_(iConfig.getParameter<std::vector<std::string>>("eleMVAValMapLabels")),
159  mvaCatTags_(iConfig.getParameter<std::vector<std::string>>("eleMVACats")),
160  mvaCatBranchNames_(iConfig.getParameter<std::vector<std::string>>("eleMVACatLabels")),
161  nCats_(mvaCatBranchNames_.size()),
163  vertices_(consumes<std::vector<reco::Vertex>>(iConfig.getParameter<edm::InputTag>("vertices"))),
164  pileup_(consumes<std::vector<PileupSummaryInfo>>(iConfig.getParameter<edm::InputTag>("pileup"))),
166  ebRecHits_(consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("ebReducedRecHitCollection"))),
167  eeRecHits_(consumes<EcalRecHitCollection>(iConfig.getParameter<edm::InputTag>("eeReducedRecHitCollection"))),
170  mvaCats_(nCats_),
172  mvaVarMngr_(iConfig.getParameter<std::string>("variableDefinition")),
174  vars_(nVars_),
175  doEnergyMatrix_(iConfig.getParameter<bool>("doEnergyMatrix")),
176  energyMatrixSize_(iConfig.getParameter<int>("energyMatrixSize")) {
177  // eleMaps
178  for (auto const& tag : eleMapTags_) {
180  }
181  // valMaps
182  for (auto const& tag : valMapTags_) {
184  }
185  // categories
186  for (auto const& tag : mvaCatTags_) {
188  }
189 
190  // Book tree
191  usesResource(TFileService::kSharedResource);
193  tree_ = fs->make<TTree>("tree", "tree");
194 
195  tree_->Branch("nEvent", &nEvent_);
196  tree_->Branch("nRun", &nRun_);
197  tree_->Branch("nLumi", &nLumi_);
198  if (isMC_)
199  tree_->Branch("genNpu", &genNpu_);
200  tree_->Branch("vtxN", &vtxN_);
201 
202  tree_->Branch("ele_q", &eleQ_);
203  tree_->Branch("ele_3q", &ele3Q_);
204 
205  if (doEnergyMatrix_)
206  tree_->Branch("energyMatrix", &energyMatrix_);
207 
208  if (isMC_)
209  tree_->Branch("matchedToGenEle", &matchedToGenEle_);
210 
211  for (int i = 0; i < nVars_; ++i)
212  tree_->Branch(mvaVarMngr_.getName(i).c_str(), &vars_[i]);
213 
214  tree_->Branch("ele_isEB", &eleIsEB_);
215  tree_->Branch("ele_isEE", &eleIsEE_);
216  tree_->Branch("ele_isEBEtaGap", &eleIsEBEtaGap_);
217  tree_->Branch("ele_isEBPhiGap", &eleIsEBPhiGap_);
218  tree_->Branch("ele_isEBEEGap", &eleIsEBEEGap_);
219  tree_->Branch("ele_isEEDeeGap", &eleIsEEDeeGap_);
220  tree_->Branch("ele_isEERingGap", &eleIsEERingGap_);
221 
222  // IDs
223  for (size_t k = 0; k < nValMaps_; ++k) {
224  tree_->Branch(valMapBranchNames_[k].c_str(), &mvaValues_[k]);
225  }
226 
227  for (size_t k = 0; k < nEleMaps_; ++k) {
228  tree_->Branch(eleMapBranchNames_[k].c_str(), &mvaPasses_[k]);
229  }
230 
231  for (size_t k = 0; k < nCats_; ++k) {
232  tree_->Branch(mvaCatBranchNames_[k].c_str(), &mvaCats_[k]);
233  }
234 }

References edm::EDConsumerBase::consumes(), doEnergyMatrix_, ele3Q_, eleIsEB_, eleIsEBEEGap_, eleIsEBEtaGap_, eleIsEBPhiGap_, eleIsEE_, eleIsEEDeeGap_, eleIsEERingGap_, eleMapBranchNames_, eleMapTags_, eleMapTokens_, eleQ_, energyMatrix_, genNpu_, MVAVariableManager< ParticleType >::getName(), mps_fire::i, isMC_, dqmdumpme::k, TFileService::kSharedResource, TFileService::make(), matchedToGenEle_, mvaCatBranchNames_, mvaCats_, mvaCatTags_, mvaCatTokens_, mvaPasses_, mvaValues_, mvaVarMngr_, nCats_, nEleMaps_, nEvent_, nLumi_, nRun_, nValMaps_, nVars_, GlobalPosition_Frontier_DevDB_cff::tag, tree_, valMapBranchNames_, valMapTags_, valMapTokens_, vars_, and vtxN_.

Member Function Documentation

◆ analyze()

void ElectronMVANtuplizer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 237 of file ElectronMVANtuplizer.cc.

237  {
238  // Fill global event info
239  nEvent_ = iEvent.id().event();
240  nRun_ = iEvent.id().run();
241  nLumi_ = iEvent.luminosityBlock();
242 
243  // Get Handles
244  auto src = iEvent.getHandle(src_);
245  auto vertices = iEvent.getHandle(vertices_);
246 
247  // initialize cluster tools
248  std::unique_ptr<noZS::EcalClusterLazyTools> lazyTools;
249  if (doEnergyMatrix_) {
250  // Configure Lazy Tools, which will compute 5x5 quantities
251  lazyTools = std::make_unique<noZS::EcalClusterLazyTools>(iEvent, iSetup, ebRecHits_, eeRecHits_);
252  }
253 
254  // Get MC only Handles, which are allowed to be non-valid
255  auto genParticles = iEvent.getHandle(genParticles_);
256  auto pileup = iEvent.getHandle(pileup_);
257 
258  vtxN_ = vertices->size();
259 
260  // Fill with true number of pileup
261  if (isMC_) {
262  for (const auto& pu : *pileup) {
263  int bx = pu.getBunchCrossing();
264  if (bx == 0) {
265  genNpu_ = pu.getPU_NumInteractions();
266  break;
267  }
268  }
269  }
270 
271  // Get MVA decisions
273  for (size_t k = 0; k < nEleMaps_; ++k) {
274  iEvent.getByToken(eleMapTokens_[k], decisions[k]);
275  }
276 
277  // Get MVA values
279  for (size_t k = 0; k < nValMaps_; ++k) {
280  iEvent.getByToken(valMapTokens_[k], values[k]);
281  }
282 
283  // Get MVA categories
285  for (size_t k = 0; k < nCats_; ++k) {
286  iEvent.getByToken(mvaCatTokens_[k], mvaCats[k]);
287  }
288 
289  std::vector<float> extraVariables = variableHelper_.getAuxVariables(iEvent);
290 
291  for (auto const& ele : src->ptrs()) {
292  if (ele->pt() < ptThreshold_)
293  continue;
294 
295  // Fill the energy matrix around the seed
296  if (doEnergyMatrix_) {
297  const auto& seed = *(ele->superCluster()->seed());
298  energyMatrix_ = lazyTools->energyMatrix(seed, energyMatrixSize_);
299  }
300 
301  // Fill various tree variable
302  eleQ_ = ele->charge();
303  ele3Q_ = ele->chargeInfo().isGsfCtfScPixConsistent;
304 
305  for (int iVar = 0; iVar < nVars_; ++iVar) {
306  vars_[iVar] = mvaVarMngr_.getValue(iVar, *ele, extraVariables);
307  }
308 
309  if (isMC_) {
311  }
312 
313  // gap variables
314  eleIsEB_ = ele->isEB();
315  eleIsEE_ = ele->isEE();
316  eleIsEBEEGap_ = ele->isEBEEGap();
317  eleIsEBEtaGap_ = ele->isEBEtaGap();
318  eleIsEBPhiGap_ = ele->isEBPhiGap();
319  eleIsEEDeeGap_ = ele->isEEDeeGap();
320  eleIsEERingGap_ = ele->isEERingGap();
321 
322  //
323  // Look up and save the ID decisions
324  //
325  for (size_t k = 0; k < nEleMaps_; ++k)
326  mvaPasses_[k] = static_cast<int>((*decisions[k])[ele]);
327  for (size_t k = 0; k < nValMaps_; ++k)
328  mvaValues_[k] = (*values[k])[ele];
329  for (size_t k = 0; k < nCats_; ++k)
330  mvaCats_[k] = (*mvaCats[k])[ele];
331 
332  tree_->Fill();
333  }
334 }

References simKBmtfDigis_cfi::bx, doEnergyMatrix_, ebRecHits_, eeRecHits_, ele3Q_, eleIsEB_, eleIsEBEEGap_, eleIsEBEtaGap_, eleIsEBPhiGap_, eleIsEE_, eleIsEEDeeGap_, eleIsEERingGap_, eleMapTokens_, eleQ_, energyMatrix_, energyMatrixSize_, genNpu_, genParticles2HepMC_cfi::genParticles, genParticles_, MVAVariableHelper::getAuxVariables(), MVAVariableManager< ParticleType >::getValue(), iEvent, isMC_, dqmdumpme::k, matchedToGenEle_, matchToTruth(), mvaCats_, mvaCatTokens_, mvaPasses_, mvaValues_, mvaVarMngr_, nCats_, nEleMaps_, nEvent_, nLumi_, nRun_, nValMaps_, nVars_, mixOne_premix_on_sim_cfi::pileup, pileup_, ptThreshold_, muons2muons_cfi::pu, SurveyInfoScenario_cff::seed, TrackRefitter_38T_cff::src, src_, tree_, valMapTokens_, contentValuesCheck::values, variableHelper_, vars_, pwdgSkimBPark_cfi::vertices, vertices_, and vtxN_.

◆ beginJob()

void ElectronMVANtuplizer::beginJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 55 of file ElectronMVANtuplizer.cc.

55 {};

◆ endJob()

void ElectronMVANtuplizer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 57 of file ElectronMVANtuplizer.cc.

57 {};

◆ fillDescriptions()

void ElectronMVANtuplizer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 371 of file ElectronMVANtuplizer.cc.

371  {
373  desc.add<edm::InputTag>("src", edm::InputTag("slimmedElectrons"));
374  desc.add<edm::InputTag>("vertices", edm::InputTag("offlineSlimmedPrimaryVertices"));
375  desc.add<edm::InputTag>("pileup", edm::InputTag("slimmedAddPileupInfo"));
376  desc.add<edm::InputTag>("genParticles", edm::InputTag("prunedGenParticles"));
377  desc.add<edm::InputTag>("ebReducedRecHitCollection", edm::InputTag("reducedEgamma", "reducedEBRecHits"));
378  desc.add<edm::InputTag>("eeReducedRecHitCollection", edm::InputTag("reducedEgamma", "reducedEERecHits"));
379  desc.add<std::string>("variableDefinition");
380  desc.add<bool>("doEnergyMatrix", false);
381  desc.add<int>("energyMatrixSize", 2)->setComment("extension of crystals in each direction away from the seed");
382  desc.add<bool>("isMC", true);
383  desc.add<double>("deltaR", 0.1);
384  desc.add<double>("ptThreshold", 5.0);
385  desc.add<std::vector<std::string>>("eleMVAs", {});
386  desc.add<std::vector<std::string>>("eleMVALabels", {});
387  desc.add<std::vector<std::string>>("eleMVAValMaps", {});
388  desc.add<std::vector<std::string>>("eleMVAValMapLabels", {});
389  desc.add<std::vector<std::string>>("eleMVACats", {});
390  desc.add<std::vector<std::string>>("eleMVACatLabels", {});
391  descriptions.addDefault(desc);
392 }

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addDefault(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ matchToTruth()

int ElectronMVANtuplizer::matchToTruth ( reco::GsfElectron const &  electron,
edm::View< reco::GenParticle > const &  genParticles 
) const
private

Definition at line 336 of file ElectronMVANtuplizer.cc.

337  {
338  //
339  // Explicit loop and geometric matching method (advised by Josh Bendavid)
340  //
341 
342  // Find the closest status 1 gen electron to the reco electron
343  double dR = 999;
344  reco::GenParticle const* closestElectron = nullptr;
345  for (auto const& particle : genParticles) {
346  // Drop everything that is not electron or not status 1
347  if (std::abs(particle.pdgId()) != 11 || particle.status() != 1)
348  continue;
349  //
350  double dRtmp = ROOT::Math::VectorUtil::DeltaR(electron.p4(), particle.p4());
351  if (dRtmp < dR) {
352  dR = dRtmp;
353  closestElectron = &particle;
354  }
355  }
356  // See if the closest electron is close enough. If not, no match found.
357  if (closestElectron == nullptr || dR >= deltaR_)
358  return UNMATCHED;
359 
360  if (closestElectron->fromHardProcessFinalState())
361  return TRUE_PROMPT_ELECTRON;
362 
363  if (closestElectron->isDirectHardProcessTauDecayProductFinalState())
364  return TRUE_ELECTRON_FROM_TAU;
365 
366  // What remains is true non-prompt electrons
368 }

References funct::abs(), electronAnalyzer_cfi::DeltaR, deltaR_, HGC3DClusterGenMatchSelector_cfi::dR, HPSPFTauProducerPuppi_cfi::electron, reco::GenParticle::fromHardProcessFinalState(), genParticles2HepMC_cfi::genParticles, reco::GenParticle::isDirectHardProcessTauDecayProductFinalState(), TRUE_ELECTRON_FROM_TAU, TRUE_NON_PROMPT_ELECTRON, TRUE_PROMPT_ELECTRON, and UNMATCHED.

Referenced by analyze().

Member Data Documentation

◆ deltaR_

const double ElectronMVANtuplizer::deltaR_
private

Definition at line 88 of file ElectronMVANtuplizer.cc.

Referenced by matchToTruth().

◆ doEnergyMatrix_

const bool ElectronMVANtuplizer::doEnergyMatrix_
private

Definition at line 131 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ ebRecHits_

const edm::EDGetTokenT<EcalRecHitCollection> ElectronMVANtuplizer::ebRecHits_
private

Definition at line 113 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eeRecHits_

const edm::EDGetTokenT<EcalRecHitCollection> ElectronMVANtuplizer::eeRecHits_
private

Definition at line 114 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ele3Q_

int ElectronMVANtuplizer::ele3Q_
private

Definition at line 72 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEB_

bool ElectronMVANtuplizer::eleIsEB_
private

Definition at line 78 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEBEEGap_

bool ElectronMVANtuplizer::eleIsEBEEGap_
private

Definition at line 82 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEBEtaGap_

bool ElectronMVANtuplizer::eleIsEBEtaGap_
private

Definition at line 80 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEBPhiGap_

bool ElectronMVANtuplizer::eleIsEBPhiGap_
private

Definition at line 81 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEE_

bool ElectronMVANtuplizer::eleIsEE_
private

Definition at line 79 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEEDeeGap_

bool ElectronMVANtuplizer::eleIsEEDeeGap_
private

Definition at line 83 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleIsEERingGap_

bool ElectronMVANtuplizer::eleIsEERingGap_
private

Definition at line 84 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleMapBranchNames_

const std::vector<std::string> ElectronMVANtuplizer::eleMapBranchNames_
private

Definition at line 94 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ eleMapTags_

const std::vector<std::string> ElectronMVANtuplizer::eleMapTags_
private

Definition at line 92 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ eleMapTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<bool> > > ElectronMVANtuplizer::eleMapTokens_
private

Definition at line 93 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ eleQ_

float ElectronMVANtuplizer::eleQ_
private

Definition at line 71 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ energyMatrix_

std::vector<float> ElectronMVANtuplizer::energyMatrix_
private

Definition at line 75 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ energyMatrixSize_

const int ElectronMVANtuplizer::energyMatrixSize_
private

Definition at line 132 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ genNpu_

int ElectronMVANtuplizer::genNpu_
private

Definition at line 67 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ genParticles_

const edm::EDGetTokenT<edm::View<reco::GenParticle> > ElectronMVANtuplizer::genParticles_
private

Definition at line 112 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ isMC_

const bool ElectronMVANtuplizer::isMC_
private

Definition at line 87 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ matchedToGenEle_

int ElectronMVANtuplizer::matchedToGenEle_
private

Definition at line 73 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ mvaCatBranchNames_

const std::vector<std::string> ElectronMVANtuplizer::mvaCatBranchNames_
private

Definition at line 105 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ mvaCats_

std::vector<int> ElectronMVANtuplizer::mvaCats_
private

Definition at line 119 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ mvaCatTags_

const std::vector<std::string> ElectronMVANtuplizer::mvaCatTags_
private

Definition at line 103 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ mvaCatTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<int> > > ElectronMVANtuplizer::mvaCatTokens_
private

Definition at line 104 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ mvaPasses_

std::vector<int> ElectronMVANtuplizer::mvaPasses_
private

Definition at line 117 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ mvaValues_

std::vector<float> ElectronMVANtuplizer::mvaValues_
private

Definition at line 118 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ mvaVarMngr_

MVAVariableManager<reco::GsfElectron> ElectronMVANtuplizer::mvaVarMngr_
private

Definition at line 127 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nCats_

const size_t ElectronMVANtuplizer::nCats_
private

Definition at line 106 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nEleMaps_

const size_t ElectronMVANtuplizer::nEleMaps_
private

Definition at line 95 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nEvent_

int ElectronMVANtuplizer::nEvent_
private

Definition at line 64 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nLumi_

int ElectronMVANtuplizer::nLumi_
private

Definition at line 66 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nRun_

int ElectronMVANtuplizer::nRun_
private

Definition at line 65 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nValMaps_

const size_t ElectronMVANtuplizer::nValMaps_
private

Definition at line 101 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ nVars_

const int ElectronMVANtuplizer::nVars_
private

Definition at line 128 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ pileup_

const edm::EDGetTokenT<std::vector<PileupSummaryInfo> > ElectronMVANtuplizer::pileup_
private

Definition at line 111 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ptThreshold_

const double ElectronMVANtuplizer::ptThreshold_
private

Definition at line 89 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ src_

const edm::EDGetTokenT<edm::View<reco::GsfElectron> > ElectronMVANtuplizer::src_
private

Definition at line 109 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ tree_

TTree* ElectronMVANtuplizer::tree_
private

Definition at line 125 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ valMapBranchNames_

const std::vector<std::string> ElectronMVANtuplizer::valMapBranchNames_
private

Definition at line 100 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ valMapTags_

const std::vector<std::string> ElectronMVANtuplizer::valMapTags_
private

Definition at line 98 of file ElectronMVANtuplizer.cc.

Referenced by ElectronMVANtuplizer().

◆ valMapTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<float> > > ElectronMVANtuplizer::valMapTokens_
private

Definition at line 99 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ variableHelper_

const MVAVariableHelper ElectronMVANtuplizer::variableHelper_
private

Definition at line 122 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ vars_

std::vector<float> ElectronMVANtuplizer::vars_
private

Definition at line 129 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

◆ vertices_

const edm::EDGetTokenT<std::vector<reco::Vertex> > ElectronMVANtuplizer::vertices_
private

Definition at line 110 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ vtxN_

int ElectronMVANtuplizer::vtxN_
private

Definition at line 68 of file ElectronMVANtuplizer.cc.

Referenced by analyze(), and ElectronMVANtuplizer().

ElectronMVANtuplizer::eleQ_
float eleQ_
Definition: ElectronMVANtuplizer.cc:71
ElectronMVANtuplizer::valMapTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > valMapTokens_
Definition: ElectronMVANtuplizer.cc:99
ElectronMVANtuplizer::valMapTags_
const std::vector< std::string > valMapTags_
Definition: ElectronMVANtuplizer.cc:98
TRUE_ELECTRON_FROM_TAU
Definition: ElectronMVANtuplizer.cc:142
mps_fire.i
i
Definition: mps_fire.py:355
ElectronMVANtuplizer::mvaCatTags_
const std::vector< std::string > mvaCatTags_
Definition: ElectronMVANtuplizer.cc:103
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
ElectronMVANtuplizer::mvaPasses_
std::vector< int > mvaPasses_
Definition: ElectronMVANtuplizer.cc:117
ElectronMVANtuplizer::eleMapTags_
const std::vector< std::string > eleMapTags_
Definition: ElectronMVANtuplizer.cc:92
ElectronMVANtuplizer::genParticles_
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticles_
Definition: ElectronMVANtuplizer.cc:112
MVAVariableManager::getValue
float getValue(int index, const ParticleType &particle, const std::vector< float > &auxVariables) const
Definition: MVAVariableManager.h:51
reco::GenParticle
Definition: GenParticle.h:21
ElectronMVANtuplizer::nCats_
const size_t nCats_
Definition: ElectronMVANtuplizer.cc:106
ElectronMVANtuplizer::mvaValues_
std::vector< float > mvaValues_
Definition: ElectronMVANtuplizer.cc:118
ElectronMVANtuplizer::eleIsEBPhiGap_
bool eleIsEBPhiGap_
Definition: ElectronMVANtuplizer.cc:81
ElectronMVANtuplizer::mvaCatTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< int > > > mvaCatTokens_
Definition: ElectronMVANtuplizer.cc:104
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ElectronMVANtuplizer::vtxN_
int vtxN_
Definition: ElectronMVANtuplizer.cc:68
ElectronMVANtuplizer::ebRecHits_
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHits_
Definition: ElectronMVANtuplizer.cc:113
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:71
ElectronMVANtuplizer::eeRecHits_
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHits_
Definition: ElectronMVANtuplizer.cc:114
edm::Handle
Definition: AssociativeIterator.h:50
MVAVariableManager::getName
const std::string & getName(int index) const
Definition: MVAVariableManager.h:47
ElectronMVANtuplizer::deltaR_
const double deltaR_
Definition: ElectronMVANtuplizer.cc:88
ElectronMVANtuplizer::vars_
std::vector< float > vars_
Definition: ElectronMVANtuplizer.cc:129
simKBmtfDigis_cfi.bx
bx
Definition: simKBmtfDigis_cfi.py:55
ElectronMVANtuplizer::eleIsEBEEGap_
bool eleIsEBEEGap_
Definition: ElectronMVANtuplizer.cc:82
ElectronMVANtuplizer::eleMapTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > eleMapTokens_
Definition: ElectronMVANtuplizer.cc:93
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
ElectronMVANtuplizer::src_
const edm::EDGetTokenT< edm::View< reco::GsfElectron > > src_
Definition: ElectronMVANtuplizer.cc:109
MVAVariableHelper::getAuxVariables
const std::vector< float > getAuxVariables(const edm::Event &iEvent) const
Definition: MVAVariableHelper.cc:7
mixOne_premix_on_sim_cfi.pileup
pileup
Definition: mixOne_premix_on_sim_cfi.py:42
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
ElectronMVANtuplizer::energyMatrix_
std::vector< float > energyMatrix_
Definition: ElectronMVANtuplizer.cc:75
ElectronMVANtuplizer::eleMapBranchNames_
const std::vector< std::string > eleMapBranchNames_
Definition: ElectronMVANtuplizer.cc:94
ElectronMVANtuplizer::mvaVarMngr_
MVAVariableManager< reco::GsfElectron > mvaVarMngr_
Definition: ElectronMVANtuplizer.cc:127
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TRUE_NON_PROMPT_ELECTRON
Definition: ElectronMVANtuplizer.cc:143
ElectronMVANtuplizer::mvaCats_
std::vector< int > mvaCats_
Definition: ElectronMVANtuplizer.cc:119
ElectronMVANtuplizer::tree_
TTree * tree_
Definition: ElectronMVANtuplizer.cc:125
ElectronMVANtuplizer::eleIsEBEtaGap_
bool eleIsEBEtaGap_
Definition: ElectronMVANtuplizer.cc:80
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::GenParticle::isDirectHardProcessTauDecayProductFinalState
bool isDirectHardProcessTauDecayProductFinalState() const
Definition: GenParticle.h:85
ElectronMVANtuplizer::valMapBranchNames_
const std::vector< std::string > valMapBranchNames_
Definition: ElectronMVANtuplizer.cc:100
edm::View
Definition: CaloClusterFwd.h:14
MVAVariableManager::getNVars
int getNVars() const
Definition: MVAVariableManager.h:49
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
ElectronMVANtuplizer::isMC_
const bool isMC_
Definition: ElectronMVANtuplizer.cc:87
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
ElectronMVANtuplizer::genNpu_
int genNpu_
Definition: ElectronMVANtuplizer.cc:67
ElectronMVANtuplizer::variableHelper_
const MVAVariableHelper variableHelper_
Definition: ElectronMVANtuplizer.cc:122
ElectronMVANtuplizer::nLumi_
int nLumi_
Definition: ElectronMVANtuplizer.cc:66
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
ElectronMVANtuplizer::eleIsEEDeeGap_
bool eleIsEEDeeGap_
Definition: ElectronMVANtuplizer.cc:83
ElectronMVANtuplizer::ele3Q_
int ele3Q_
Definition: ElectronMVANtuplizer.cc:72
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
HPSPFTauProducerPuppi_cfi.electron
electron
Definition: HPSPFTauProducerPuppi_cfi.py:13
ElectronMVANtuplizer::vertices_
const edm::EDGetTokenT< std::vector< reco::Vertex > > vertices_
Definition: ElectronMVANtuplizer.cc:110
ElectronMVANtuplizer::matchToTruth
int matchToTruth(reco::GsfElectron const &electron, edm::View< reco::GenParticle > const &genParticles) const
Definition: ElectronMVANtuplizer.cc:336
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
ElectronMVANtuplizer::nVars_
const int nVars_
Definition: ElectronMVANtuplizer.cc:128
ElectronMVANtuplizer::eleIsEE_
bool eleIsEE_
Definition: ElectronMVANtuplizer.cc:79
ElectronMVANtuplizer::energyMatrixSize_
const int energyMatrixSize_
Definition: ElectronMVANtuplizer.cc:132
ElectronMVANtuplizer::doEnergyMatrix_
const bool doEnergyMatrix_
Definition: ElectronMVANtuplizer.cc:131
ElectronMVANtuplizer::pileup_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileup_
Definition: ElectronMVANtuplizer.cc:111
ElectronMVANtuplizer::matchedToGenEle_
int matchedToGenEle_
Definition: ElectronMVANtuplizer.cc:73
ElectronMVANtuplizer::nEvent_
int nEvent_
Definition: ElectronMVANtuplizer.cc:64
edm::ValueMap
Definition: ValueMap.h:107
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
TRUE_PROMPT_ELECTRON
Definition: ElectronMVANtuplizer.cc:141
ElectronMVANtuplizer::nEleMaps_
const size_t nEleMaps_
Definition: ElectronMVANtuplizer.cc:95
ElectronMVANtuplizer::mvaCatBranchNames_
const std::vector< std::string > mvaCatBranchNames_
Definition: ElectronMVANtuplizer.cc:105
ElectronMVANtuplizer::eleIsEB_
bool eleIsEB_
Definition: ElectronMVANtuplizer.cc:78
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
ElectronMVANtuplizer::eleIsEERingGap_
bool eleIsEERingGap_
Definition: ElectronMVANtuplizer.cc:84
UNMATCHED
Definition: ElectronMVANtuplizer.cc:140
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:126
reco::GenParticle::fromHardProcessFinalState
bool fromHardProcessFinalState() const
Definition: GenParticle.h:75
ElectronMVANtuplizer::nValMaps_
const size_t nValMaps_
Definition: ElectronMVANtuplizer.cc:101
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
ElectronMVANtuplizer::ptThreshold_
const double ptThreshold_
Definition: ElectronMVANtuplizer.cc:89
ElectronMVANtuplizer::nRun_
int nRun_
Definition: ElectronMVANtuplizer.cc:65
edm::InputTag
Definition: InputTag.h:15
SurveyInfoScenario_cff.seed
seed
Definition: SurveyInfoScenario_cff.py:295
TFileService::make
T * make(const Args &... args) const
make new ROOT object
Definition: TFileService.h:64
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7