CMS 3D CMS Logo

CSCTightHalo2015Filter.cc
Go to the documentation of this file.
6 
8 
9  public:
10 
11  explicit CSCTightHalo2015Filter(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->CSCTightHaloId2015();
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
CSCTightHalo2015Filter(const edm::ParameterSet &iConfig)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
bool filter(edm::StreamID iID, edm::Event &iEvent, const edm::EventSetup &iSetup) const override
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
const bool CSCTightHaloId2015() const
fixed size matrix
HLT enums.
edm::EDGetTokenT< reco::BeamHaloSummary > beamHaloSummaryToken_