#include <HLT1CaloJetEnergy.h>
Public Member Functions | |
virtual bool | filter (edm::Event &, const edm::EventSetup &) |
HLT1CaloJetEnergy (const edm::ParameterSet &) | |
~HLT1CaloJetEnergy () | |
Private Attributes | |
edm::InputTag | inputTag_ |
double | max_Eta_ |
double | min_E_ |
int | min_N_ |
bool | saveTag_ |
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 25 of file HLT1CaloJetEnergy.h.
HLT1CaloJetEnergy::HLT1CaloJetEnergy | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
Definition at line 29 of file HLT1CaloJetEnergy.cc.
References edm::InputTag::encode(), inputTag_, LogDebug, max_Eta_, min_E_, and min_N_.
: inputTag_ (iConfig.getParameter<edm::InputTag>("inputTag")), saveTag_ (iConfig.getUntrackedParameter<bool>("saveTag",false)), 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 46 of file HLT1CaloJetEnergy.cc.
{ }
bool HLT1CaloJetEnergy::filter | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [virtual] |
Implements HLTFilter.
Definition at line 56 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_offlineAnalysis_common_cff::reco, saveTag_, 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 (saveTag_) 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 34 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
double HLT1CaloJetEnergy::max_Eta_ [private] |
Definition at line 37 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
double HLT1CaloJetEnergy::min_E_ [private] |
Definition at line 36 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
int HLT1CaloJetEnergy::min_N_ [private] |
Definition at line 38 of file HLT1CaloJetEnergy.h.
Referenced by filter(), and HLT1CaloJetEnergy().
bool HLT1CaloJetEnergy::saveTag_ [private] |
Definition at line 35 of file HLT1CaloJetEnergy.h.
Referenced by filter().