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
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () 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
 
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::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 EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
 
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 = 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

Description: Ntuplizer for training and testing electron MVA IDs.

Implementation: [Notes on implementation]

Definition at line 46 of file ElectronMVANtuplizer.cc.

Constructor & Destructor Documentation

◆ ElectronMVANtuplizer()

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

Definition at line 152 of file ElectronMVANtuplizer.cc.

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

References edm::EDConsumerBase::consumesCollector().

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 241 of file ElectronMVANtuplizer.cc.

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

References l1GtPatternGenerator_cfi::bx, doEnergyMatrix_, ebRecHits_, ecalClusterToolsESGetTokens_, eeRecHits_, ele3Q_, eleIsEB_, eleIsEBEEGap_, eleIsEBEtaGap_, eleIsEBPhiGap_, eleIsEE_, eleIsEEDeeGap_, eleIsEERingGap_, eleMapTokens_, eleQ_, energyMatrix_, energyMatrixSize_, genNpu_, genParticles2HepMC_cfi::genParticles, genParticles_, EcalClusterLazyToolsBase::ESGetTokens::get(), 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, fileCollector::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 56 of file ElectronMVANtuplizer.cc.

56 {};

◆ endJob()

void ElectronMVANtuplizer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 58 of file ElectronMVANtuplizer.cc.

58 {};

◆ fillDescriptions()

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

Definition at line 376 of file ElectronMVANtuplizer.cc.

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

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, HLT_FULL_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 341 of file ElectronMVANtuplizer.cc.

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

References funct::abs(), electronAnalyzer_cfi::DeltaR, deltaR_, HGC3DClusterGenMatchSelector_cfi::dR, metsig::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 89 of file ElectronMVANtuplizer.cc.

Referenced by matchToTruth().

◆ doEnergyMatrix_

const bool ElectronMVANtuplizer::doEnergyMatrix_
private

Definition at line 134 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ebRecHits_

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

Definition at line 114 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ecalClusterToolsESGetTokens_

const EcalClusterLazyTools::ESGetTokens ElectronMVANtuplizer::ecalClusterToolsESGetTokens_
private

Definition at line 117 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eeRecHits_

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

Definition at line 115 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ele3Q_

int ElectronMVANtuplizer::ele3Q_
private

Definition at line 73 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEB_

bool ElectronMVANtuplizer::eleIsEB_
private

Definition at line 79 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEBEEGap_

bool ElectronMVANtuplizer::eleIsEBEEGap_
private

Definition at line 83 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEBEtaGap_

bool ElectronMVANtuplizer::eleIsEBEtaGap_
private

Definition at line 81 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEBPhiGap_

bool ElectronMVANtuplizer::eleIsEBPhiGap_
private

Definition at line 82 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEE_

bool ElectronMVANtuplizer::eleIsEE_
private

Definition at line 80 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEEDeeGap_

bool ElectronMVANtuplizer::eleIsEEDeeGap_
private

Definition at line 84 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleIsEERingGap_

bool ElectronMVANtuplizer::eleIsEERingGap_
private

Definition at line 85 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleMapBranchNames_

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

Definition at line 95 of file ElectronMVANtuplizer.cc.

◆ eleMapTags_

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

Definition at line 93 of file ElectronMVANtuplizer.cc.

◆ eleMapTokens_

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

Definition at line 94 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ eleQ_

float ElectronMVANtuplizer::eleQ_
private

Definition at line 72 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ energyMatrix_

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

Definition at line 76 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ energyMatrixSize_

const int ElectronMVANtuplizer::energyMatrixSize_
private

Definition at line 135 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ genNpu_

int ElectronMVANtuplizer::genNpu_
private

Definition at line 68 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ genParticles_

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

Definition at line 113 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ isMC_

const bool ElectronMVANtuplizer::isMC_
private

Definition at line 88 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ matchedToGenEle_

int ElectronMVANtuplizer::matchedToGenEle_
private

Definition at line 74 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ mvaCatBranchNames_

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

Definition at line 106 of file ElectronMVANtuplizer.cc.

◆ mvaCats_

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

Definition at line 122 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ mvaCatTags_

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

Definition at line 104 of file ElectronMVANtuplizer.cc.

◆ mvaCatTokens_

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

Definition at line 105 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ mvaPasses_

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

Definition at line 120 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ mvaValues_

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

Definition at line 121 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ mvaVarMngr_

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

Definition at line 130 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nCats_

const size_t ElectronMVANtuplizer::nCats_
private

Definition at line 107 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nEleMaps_

const size_t ElectronMVANtuplizer::nEleMaps_
private

Definition at line 96 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nEvent_

int ElectronMVANtuplizer::nEvent_
private

Definition at line 65 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nLumi_

int ElectronMVANtuplizer::nLumi_
private

Definition at line 67 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nRun_

int ElectronMVANtuplizer::nRun_
private

Definition at line 66 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nValMaps_

const size_t ElectronMVANtuplizer::nValMaps_
private

Definition at line 102 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ nVars_

const int ElectronMVANtuplizer::nVars_
private

Definition at line 131 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ pileup_

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

Definition at line 112 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ ptThreshold_

const double ElectronMVANtuplizer::ptThreshold_
private

Definition at line 90 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ src_

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

Definition at line 110 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ tree_

TTree* ElectronMVANtuplizer::tree_
private

Definition at line 128 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ valMapBranchNames_

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

Definition at line 101 of file ElectronMVANtuplizer.cc.

◆ valMapTags_

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

Definition at line 99 of file ElectronMVANtuplizer.cc.

◆ valMapTokens_

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

Definition at line 100 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ variableHelper_

const MVAVariableHelper ElectronMVANtuplizer::variableHelper_
private

Definition at line 125 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ vars_

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

Definition at line 132 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ vertices_

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

Definition at line 111 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

◆ vtxN_

int ElectronMVANtuplizer::vtxN_
private

Definition at line 69 of file ElectronMVANtuplizer.cc.

Referenced by analyze().

ElectronMVANtuplizer::eleQ_
float eleQ_
Definition: ElectronMVANtuplizer.cc:72
ElectronMVANtuplizer::valMapTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< float > > > valMapTokens_
Definition: ElectronMVANtuplizer.cc:100
ElectronMVANtuplizer::valMapTags_
const std::vector< std::string > valMapTags_
Definition: ElectronMVANtuplizer.cc:99
TRUE_ELECTRON_FROM_TAU
Definition: ElectronMVANtuplizer.cc:145
mps_fire.i
i
Definition: mps_fire.py:428
ElectronMVANtuplizer::mvaCatTags_
const std::vector< std::string > mvaCatTags_
Definition: ElectronMVANtuplizer.cc:104
genParticles2HepMC_cfi.genParticles
genParticles
Definition: genParticles2HepMC_cfi.py:4
ElectronMVANtuplizer::mvaPasses_
std::vector< int > mvaPasses_
Definition: ElectronMVANtuplizer.cc:120
ElectronMVANtuplizer::eleMapTags_
const std::vector< std::string > eleMapTags_
Definition: ElectronMVANtuplizer.cc:93
ElectronMVANtuplizer::genParticles_
const edm::EDGetTokenT< edm::View< reco::GenParticle > > genParticles_
Definition: ElectronMVANtuplizer.cc:113
MVAVariableManager::getValue
float getValue(int index, const ParticleType &particle, const std::vector< float > &auxVariables) const
Definition: MVAVariableManager.h:50
reco::GenParticle
Definition: GenParticle.h:21
ElectronMVANtuplizer::nCats_
const size_t nCats_
Definition: ElectronMVANtuplizer.cc:107
ElectronMVANtuplizer::mvaValues_
std::vector< float > mvaValues_
Definition: ElectronMVANtuplizer.cc:121
ElectronMVANtuplizer::eleIsEBPhiGap_
bool eleIsEBPhiGap_
Definition: ElectronMVANtuplizer.cc:82
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89353
ElectronMVANtuplizer::mvaCatTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< int > > > mvaCatTokens_
Definition: ElectronMVANtuplizer.cc:105
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ElectronMVANtuplizer::vtxN_
int vtxN_
Definition: ElectronMVANtuplizer.cc:69
ElectronMVANtuplizer::ebRecHits_
const edm::EDGetTokenT< EcalRecHitCollection > ebRecHits_
Definition: ElectronMVANtuplizer.cc:114
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:46
ElectronMVANtuplizer::eeRecHits_
const edm::EDGetTokenT< EcalRecHitCollection > eeRecHits_
Definition: ElectronMVANtuplizer.cc:115
edm::Handle
Definition: AssociativeIterator.h:50
MVAVariableManager::getName
const std::string & getName(int index) const
Definition: MVAVariableManager.h:46
ElectronMVANtuplizer::deltaR_
const double deltaR_
Definition: ElectronMVANtuplizer.cc:89
ElectronMVANtuplizer::vars_
std::vector< float > vars_
Definition: ElectronMVANtuplizer.cc:132
fileCollector.seed
seed
Definition: fileCollector.py:127
ElectronMVANtuplizer::eleIsEBEEGap_
bool eleIsEBEEGap_
Definition: ElectronMVANtuplizer.cc:83
ElectronMVANtuplizer::eleMapTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< bool > > > eleMapTokens_
Definition: ElectronMVANtuplizer.cc:94
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:110
mixOne_premix_on_sim_cfi.pileup
pileup
Definition: mixOne_premix_on_sim_cfi.py:42
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
metsig::electron
Definition: SignAlgoResolutions.h:48
ElectronMVANtuplizer::energyMatrix_
std::vector< float > energyMatrix_
Definition: ElectronMVANtuplizer.cc:76
ElectronMVANtuplizer::eleMapBranchNames_
const std::vector< std::string > eleMapBranchNames_
Definition: ElectronMVANtuplizer.cc:95
ElectronMVANtuplizer::mvaVarMngr_
MVAVariableManager< reco::GsfElectron > mvaVarMngr_
Definition: ElectronMVANtuplizer.cc:130
dqmdumpme.k
k
Definition: dqmdumpme.py:60
TRUE_NON_PROMPT_ELECTRON
Definition: ElectronMVANtuplizer.cc:146
ElectronMVANtuplizer::mvaCats_
std::vector< int > mvaCats_
Definition: ElectronMVANtuplizer.cc:122
ElectronMVANtuplizer::tree_
TTree * tree_
Definition: ElectronMVANtuplizer.cc:128
ElectronMVANtuplizer::eleIsEBEtaGap_
bool eleIsEBEtaGap_
Definition: ElectronMVANtuplizer.cc:81
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:101
edm::View
Definition: CaloClusterFwd.h:14
MVAVariableManager::getNVars
int getNVars() const
Definition: MVAVariableManager.h:48
ElectronMVANtuplizer::isMC_
const bool isMC_
Definition: ElectronMVANtuplizer.cc:88
TrackRefitter_38T_cff.src
src
Definition: TrackRefitter_38T_cff.py:24
MVAVariableHelper::indexMap
static std::unordered_map< std::string, int > indexMap()
Definition: MVAVariableHelper.h:22
ElectronMVANtuplizer::genNpu_
int genNpu_
Definition: ElectronMVANtuplizer.cc:68
ElectronMVANtuplizer::variableHelper_
const MVAVariableHelper variableHelper_
Definition: ElectronMVANtuplizer.cc:125
ElectronMVANtuplizer::nLumi_
int nLumi_
Definition: ElectronMVANtuplizer.cc:67
edm::Service< TFileService >
iEvent
int iEvent
Definition: GenABIO.cc:224
ElectronMVANtuplizer::eleIsEEDeeGap_
bool eleIsEEDeeGap_
Definition: ElectronMVANtuplizer.cc:84
ElectronMVANtuplizer::ele3Q_
int ele3Q_
Definition: ElectronMVANtuplizer.cc:73
electronAnalyzer_cfi.DeltaR
DeltaR
Definition: electronAnalyzer_cfi.py:33
MVAVariableHelper::getAuxVariables
const std::vector< float > getAuxVariables(const edm::Event &iEvent) const
Definition: MVAVariableHelper.h:18
EcalClusterLazyToolsBase::ESGetTokens::get
ESData get(edm::EventSetup const &eventSetup) const
Definition: EcalClusterLazyTools.h:62
ElectronMVANtuplizer::vertices_
const edm::EDGetTokenT< std::vector< reco::Vertex > > vertices_
Definition: ElectronMVANtuplizer.cc:111
ElectronMVANtuplizer::matchToTruth
int matchToTruth(reco::GsfElectron const &electron, edm::View< reco::GenParticle > const &genParticles) const
Definition: ElectronMVANtuplizer.cc:341
ElectronMVANtuplizer::nVars_
const int nVars_
Definition: ElectronMVANtuplizer.cc:131
ElectronMVANtuplizer::eleIsEE_
bool eleIsEE_
Definition: ElectronMVANtuplizer.cc:80
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
ElectronMVANtuplizer::energyMatrixSize_
const int energyMatrixSize_
Definition: ElectronMVANtuplizer.cc:135
ElectronMVANtuplizer::doEnergyMatrix_
const bool doEnergyMatrix_
Definition: ElectronMVANtuplizer.cc:134
ElectronMVANtuplizer::pileup_
const edm::EDGetTokenT< std::vector< PileupSummaryInfo > > pileup_
Definition: ElectronMVANtuplizer.cc:112
ElectronMVANtuplizer::matchedToGenEle_
int matchedToGenEle_
Definition: ElectronMVANtuplizer.cc:74
ElectronMVANtuplizer::nEvent_
int nEvent_
Definition: ElectronMVANtuplizer.cc:65
edm::ValueMap
Definition: ValueMap.h:107
ElectronMVANtuplizer::ecalClusterToolsESGetTokens_
const EcalClusterLazyTools::ESGetTokens ecalClusterToolsESGetTokens_
Definition: ElectronMVANtuplizer.cc:117
TFileService::kSharedResource
static const std::string kSharedResource
Definition: TFileService.h:76
TRUE_PROMPT_ELECTRON
Definition: ElectronMVANtuplizer.cc:144
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ElectronMVANtuplizer::nEleMaps_
const size_t nEleMaps_
Definition: ElectronMVANtuplizer.cc:96
ElectronMVANtuplizer::mvaCatBranchNames_
const std::vector< std::string > mvaCatBranchNames_
Definition: ElectronMVANtuplizer.cc:106
ElectronMVANtuplizer::eleIsEB_
bool eleIsEB_
Definition: ElectronMVANtuplizer.cc:79
muons2muons_cfi.pu
pu
Definition: muons2muons_cfi.py:31
ElectronMVANtuplizer::eleIsEERingGap_
bool eleIsEERingGap_
Definition: ElectronMVANtuplizer.cc:85
UNMATCHED
Definition: ElectronMVANtuplizer.cc:143
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:153
reco::GenParticle::fromHardProcessFinalState
bool fromHardProcessFinalState() const
Definition: GenParticle.h:75
ElectronMVANtuplizer::nValMaps_
const size_t nValMaps_
Definition: ElectronMVANtuplizer.cc:102
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
ElectronMVANtuplizer::ptThreshold_
const double ptThreshold_
Definition: ElectronMVANtuplizer.cc:90
ElectronMVANtuplizer::nRun_
int nRun_
Definition: ElectronMVANtuplizer.cc:66
edm::InputTag
Definition: InputTag.h:15
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