#include <HLT1CaloJetEnergy.h>
Public Member Functions | |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
HLT1CaloJetEnergy (const edm::ParameterSet &) | |
~HLT1CaloJetEnergy () | |
Static Public Member Functions | |
static void | fillDescriptions (edm::ConfigurationDescriptions &descriptions) |
Private Attributes | |
edm::InputTag | inputTag_ |
double | max_Eta_ |
double | min_E_ |
int | min_N_ |
bool | saveTags_ |
This class is an HLTFilter (-> EDFilter) implementing a single jet requirement with an Energy threshold (not Et!) Based on HLTSinglet
See header file for documentation
Definition at line 29 of file HLT1CaloJetEnergy.h.
HLT1CaloJetEnergy::HLT1CaloJetEnergy | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 33 of file HLT1CaloJetEnergy.cc.
References edm::InputTag::encode(), inputTag_, LogDebug, max_Eta_, min_E_, and min_N_.
: inputTag_ (iConfig.getParameter<edm::InputTag>("inputTag")), saveTags_ (iConfig.getParameter<bool>("saveTags")), min_E_ (iConfig.getParameter<double> ("MinE" )), max_Eta_ (iConfig.getParameter<double> ("MaxEta" )), min_N_ (iConfig.getParameter<int> ("MinN" )) { LogDebug("") << "Input/ecut/etacut/ncut : " << inputTag_.encode() << " " << min_E_ << " " << max_Eta_ << " " << min_N_ ; //register your products produces<trigger::TriggerFilterObjectWithRefs>(); }
HLT1CaloJetEnergy::~HLT1CaloJetEnergy | ( | ) |
Definition at line 50 of file HLT1CaloJetEnergy.cc.
{ }
void HLT1CaloJetEnergy::fillDescriptions | ( | edm::ConfigurationDescriptions & | descriptions | ) | [static] |
Reimplemented from edm::EDFilter.
Definition at line 55 of file HLT1CaloJetEnergy.cc.
References edm::ParameterSetDescription::add(), and edm::ConfigurationDescriptions::add().
{ edm::ParameterSetDescription desc; desc.add<edm::InputTag>("inputTag",edm::InputTag("hltStoppedHSCPIterativeCone5CaloJets")); desc.add<bool>("saveTags",false); desc.add<double>("MinE",20.0); desc.add<double>("MaxEta",3.0); desc.add<int>("MinN",1); descriptions.add("hlt1CaloJetEnergy",desc); }
bool HLT1CaloJetEnergy::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements HLTFilter.
Definition at line 71 of file HLT1CaloJetEnergy.cc.
References accept(), edm::Event::getByLabel(), i, inputTag_, analyzePatCleaning_cfg::jets, max_Eta_, min_E_, min_N_, module(), n, path(), edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, MultipleCompare::ref, saveTags_, and trigger::TriggerJet.
{ using namespace std; using namespace edm; using namespace reco; using namespace trigger; // All HLT filters must create and fill an HLT filter object, // recording any reconstructed physics objects satisfying (or not) // this HLT filter, and place it in the Event. // The filter object auto_ptr<TriggerFilterObjectWithRefs> filterobject (new TriggerFilterObjectWithRefs(path(),module())); if (saveTags_) filterobject->addCollectionTag(inputTag_); // Ref to Candidate object to be recorded in filter object Ref<CaloJetCollection> ref; // get hold of collection of objects Handle<CaloJetCollection> jets; iEvent.getByLabel (inputTag_,jets); // look at all objects, check cuts and add to filter object int n(0); CaloJetCollection::const_iterator i ( jets->begin() ); for (; i!=jets->end(); i++) { if ( i->energy() >= min_E_ && fabs(i->eta()) <= max_Eta_ ) { n++; ref=Ref<CaloJetCollection>(jets,distance(jets->begin(),i)); filterobject->addObject(TriggerJet,ref); } } // filter decision bool accept(n>=min_N_); // put filter object into the Event iEvent.put(filterobject); return accept; }
edm::InputTag HLT1CaloJetEnergy::inputTag_ [private] |
Definition at line 39 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
double HLT1CaloJetEnergy::max_Eta_ [private] |
Definition at line 42 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
double HLT1CaloJetEnergy::min_E_ [private] |
Definition at line 41 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
int HLT1CaloJetEnergy::min_N_ [private] |
Definition at line 43 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
bool HLT1CaloJetEnergy::saveTags_ [private] |
Definition at line 40 of file HLT1CaloJetEnergy.h.
Referenced by filter().