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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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 ( const edm::ParameterSet p)
inline

Definition at line 5 of file NanoAODSimpleCrossCleaner.cc.

NanoAODBaseCrossCleaner(const edm::ParameterSet &)
NanoAODSimpleCrossCleaner::~NanoAODSimpleCrossCleaner ( )
inlineoverride

Definition at line 6 of file NanoAODSimpleCrossCleaner.cc.

6 {}

Member Function Documentation

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 DEFINE_FWK_MODULE, mps_fire::i, visualization-live-secondInstance_cfg::m, analyzePatCleaning_cfg::overlaps, and edm::View< T >::size().

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  }
size_type size() const