CMS 3D CMS Logo

NanoAODSimpleCrossCleaner.cc
Go to the documentation of this file.
2 
4 public:
7 
10  std::vector<uint8_t> & jetBits, std::vector<uint8_t> & muonBits, std::vector<uint8_t> & eleBits,
11  std::vector<uint8_t> & tauBits, std::vector<uint8_t> & photonBits) override {
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  }
23 
24 };
26 
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
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
size_type size() const
vector< PseudoJet > jets