#include <SelectHFMinBias.h>
Public Member Functions | |
SelectHFMinBias (const edm::ParameterSet &) | |
~SelectHFMinBias () | |
Private Member Functions | |
virtual bool | filter (edm::Event &, const edm::EventSetup &) override |
Definition at line 34 of file SelectHFMinBias.h.
SelectHFMinBias::SelectHFMinBias | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 32 of file SelectHFMinBias.cc.
{ }
SelectHFMinBias::~SelectHFMinBias | ( | ) |
Definition at line 36 of file SelectHFMinBias.cc.
{ }
bool SelectHFMinBias::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [override, private, virtual] |
Implements edm::EDFilter.
Definition at line 40 of file SelectHFMinBias.cc.
References edm::Event::getByLabel(), DetId::Hcal, HcalForward, and i.
{ edm::Handle<CaloTowerCollection> towers; iEvent.getByLabel("towerMaker",towers); int negTowers = 0; int posTowers = 0; for(CaloTowerCollection::const_iterator cal = towers->begin(); cal != towers->end(); ++cal) { for(unsigned int i = 0; i < cal->constituentsSize(); i++) { const DetId id = cal->constituent(i); if(id.det() == DetId::Hcal) { HcalSubdetector subdet=(HcalSubdetector(id.subdetId())); if(subdet == HcalForward) { if(cal->energy()>3. && cal->eta()<-3.) negTowers++; if(cal->energy()>3. && cal->eta()>3.) posTowers++; } } } } if(negTowers>0 && posTowers>0) return true; return false; }