CMS 3D CMS Logo

CSCTightHaloTrkMuUnvetoFilter.cc
Go to the documentation of this file.
6 
8 
9  public:
10 
11  explicit CSCTightHaloTrkMuUnvetoFilter(const edm::ParameterSet & iConfig);
13 
14  private:
15 
16  bool filter(edm::StreamID iID, edm::Event & iEvent, const edm::EventSetup & iSetup) const override;
17 
18  const bool taggingMode_;
20 };
21 
23  : taggingMode_ (iConfig.getParameter<bool> ("taggingMode"))
24  , beamHaloSummaryToken_(consumes<reco::BeamHaloSummary>(edm::InputTag("BeamHaloSummary")))
25 {
26 
27  produces<bool>();
28 }
29 
31 
32  edm::Handle<reco::BeamHaloSummary> beamHaloSummary;
33  iEvent.getByToken(beamHaloSummaryToken_ , beamHaloSummary);
34 
35  const bool pass = !beamHaloSummary->CSCTightHaloIdTrkMuUnveto();
36 
37  iEvent.put(std::make_unique<bool>(pass));
38 
39  return taggingMode_ || pass; // return false if it is a beamhalo event
40 }
41 
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
bool filter(edm::StreamID iID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
fixed size matrix
HLT enums.
const bool CSCTightHaloIdTrkMuUnveto() const
CSCTightHaloTrkMuUnvetoFilter(const edm::ParameterSet &iConfig)
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_