CMS 3D CMS Logo

HLT1CaloJetEnergy Class Reference

This class is an HLTFilter (-> EDFilter) implementing a single jet requirement with an Energy threshold (not Et!) Based on HLTSinglet. More...

#include <HLTrigger/HLTfilters/interface/HLT1CaloJetEnergy.h>

Inheritance diagram for HLT1CaloJetEnergy:

HLTFilter edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_


Detailed Description

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.

Date
2009/03/26 07:36:18
Revision
1.4

Author:
Jim Brooke
Date
2009/03/26 07:36:19
Revision
1.4

Author:
Jim Brooke

Definition at line 25 of file HLT1CaloJetEnergy.h.


Constructor & Destructor Documentation

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_.

00029                                                                    :
00030   inputTag_ (iConfig.getParameter<edm::InputTag>("inputTag")),
00031   saveTag_  (iConfig.getUntrackedParameter<bool>("saveTag",false)),
00032   min_E_    (iConfig.getParameter<double>       ("MinE"   )),
00033   max_Eta_  (iConfig.getParameter<double>       ("MaxEta"   )),
00034   min_N_    (iConfig.getParameter<int>          ("MinN"   ))
00035 {
00036    LogDebug("") << "Input/ecut/etacut/ncut : "
00037                 << inputTag_.encode() << " "
00038                 << min_E_ << " "
00039                 << max_Eta_ << " "
00040                 << min_N_ ;
00041 
00042    //register your products
00043    produces<trigger::TriggerFilterObjectWithRefs>();
00044 }

HLT1CaloJetEnergy::~HLT1CaloJetEnergy (  ) 

Definition at line 46 of file HLT1CaloJetEnergy.cc.

00047 {
00048 }


Member Function Documentation

bool HLT1CaloJetEnergy::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements HLTFilter.

Definition at line 56 of file HLT1CaloJetEnergy.cc.

References edm::Event::getByLabel(), i, inputTag_, pfTauBenchmarkGeneric_cfi::jets, max_Eta_, min_E_, min_N_, module(), n, path(), edm::Event::put(), HcalSimpleRecAlgoImpl::reco(), saveTag_, std, and trigger::TriggerJet.

00057 {
00058    using namespace std;
00059    using namespace edm;
00060    using namespace reco;
00061    using namespace trigger;
00062 
00063    // All HLT filters must create and fill an HLT filter object,
00064    // recording any reconstructed physics objects satisfying (or not)
00065    // this HLT filter, and place it in the Event.
00066 
00067    // The filter object
00068    auto_ptr<TriggerFilterObjectWithRefs>
00069      filterobject (new TriggerFilterObjectWithRefs(path(),module()));
00070    if (saveTag_) filterobject->addCollectionTag(inputTag_);
00071    // Ref to Candidate object to be recorded in filter object
00072    Ref<CaloJetCollection> ref;
00073 
00074 
00075    // get hold of collection of objects
00076    Handle<CaloJetCollection> jets;
00077    iEvent.getByLabel (inputTag_,jets);
00078 
00079    // look at all objects, check cuts and add to filter object
00080    int n(0);
00081    CaloJetCollection::const_iterator i ( jets->begin() );
00082    for (; i!=jets->end(); i++) {
00083      if ( i->energy() >= min_E_  &&
00084           i->eta() <= max_Eta_   ) {
00085        n++;
00086        ref=Ref<CaloJetCollection>(jets,distance(jets->begin(),i));
00087        filterobject->addObject(TriggerJet,ref);
00088      }
00089    }
00090 
00091    // filter decision
00092    bool accept(n>=min_N_);
00093 
00094    // put filter object into the Event
00095    iEvent.put(filterobject);
00096 
00097    return accept;
00098 }


Member Data Documentation

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().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:20 2009 for CMSSW by  doxygen 1.5.4