CMS 3D CMS Logo

List of all members | Public Member Functions
NanoAODSimpleCrossCleaner Class Reference
Inheritance diagram for NanoAODSimpleCrossCleaner:
NanoAODBaseCrossCleaner edm::stream::EDProducer<>

Public Member Functions

 NanoAODSimpleCrossCleaner (const edm::ParameterSet &p)
 
void objectSelection (const edm::View< pat::Jet > &jets, const edm::View< pat::Muon > &muons, const edm::View< pat::Electron > &eles, const edm::View< pat::Tau > &taus, const edm::View< pat::Photon > &photons, std::vector< uint8_t > &jetBits, std::vector< uint8_t > &muonBits, std::vector< uint8_t > &eleBits, std::vector< uint8_t > &tauBits, std::vector< uint8_t > &photonBits) override
 
 ~NanoAODSimpleCrossCleaner () override
 
- Public Member Functions inherited from NanoAODBaseCrossCleaner
 NanoAODBaseCrossCleaner (const edm::ParameterSet &)
 
 ~NanoAODBaseCrossCleaner () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from NanoAODBaseCrossCleaner
static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 3 of file NanoAODSimpleCrossCleaner.cc.

Constructor & Destructor Documentation

◆ NanoAODSimpleCrossCleaner()

NanoAODSimpleCrossCleaner::NanoAODSimpleCrossCleaner ( const edm::ParameterSet p)
inline

◆ ~NanoAODSimpleCrossCleaner()

NanoAODSimpleCrossCleaner::~NanoAODSimpleCrossCleaner ( )
inlineoverride

Definition at line 6 of file NanoAODSimpleCrossCleaner.cc.

6 {}

Member Function Documentation

◆ objectSelection()

void NanoAODSimpleCrossCleaner::objectSelection ( const edm::View< pat::Jet > &  jets,
const edm::View< pat::Muon > &  muons,
const edm::View< pat::Electron > &  eles,
const edm::View< pat::Tau > &  taus,
const edm::View< pat::Photon > &  photons,
std::vector< uint8_t > &  jetBits,
std::vector< uint8_t > &  muonBits,
std::vector< uint8_t > &  eleBits,
std::vector< uint8_t > &  tauBits,
std::vector< uint8_t > &  photonBits 
)
inlineoverridevirtual

Reimplemented from NanoAODBaseCrossCleaner.

Definition at line 8 of file NanoAODSimpleCrossCleaner.cc.

References mps_fire::i, singleTopDQM_cfi::jets, visualization-live-secondInstance_cfg::m, and analyzePatCleaning_cfg::overlaps.

17  {
18  for (size_t i = 0; i < jets.size(); i++) {
19  for (const auto& m : jets[i].overlaps("muons")) {
20  if (muonBits[m.key()])
21  jetBits[i] = 0; //prefer muons
22  }
23  for (const auto& m : jets[i].overlaps("electrons")) {
24  if (eleBits[m.key()])
25  jetBits[i] = 0; //prefer electrons
26  }
27  }
28  }