CMS 3D CMS Logo

Public Member Functions | Private Attributes

HLT1CaloJetEnergy Class Reference

#include <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

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

See header file for documentation

Date:
2009/10/08 11:18:06
Revision:
1.5
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_.

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

{
}

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 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;
}

Member Data Documentation

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

Definition at line 38 of file HLT1CaloJetEnergy.h.

Referenced by filter(), and HLT1CaloJetEnergy().

Definition at line 35 of file HLT1CaloJetEnergy.h.

Referenced by filter().