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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () 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, funct::m, analyzePatCleaning_cfg::overlaps, and edm::View< T >::size().

11  {
12 
13  for(size_t i=0;i<jets.size();i++){
14  for(const auto & m : jets[i].overlaps("muons")) {
15  if(muonBits[m.key()]) jetBits[i]=0; //prefer muons
16  }
17  for(const auto & m : jets[i].overlaps("electrons")) {
18  if(eleBits[m.key()]) jetBits[i]=0; //prefer electrons
19  }
20 
21  }
22  }
size_type size() const