CMS 3D CMS Logo

Public Member Functions | Static 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 ()

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 saveTag_

Detailed Description

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

Date:
2011/02/11 20:55:23
Revision:
1.5
Author:
Jim Brooke

See header file for documentation

Date:
2011/04/28 06:12:49
Revision:
1.8
Author:
Jim Brooke

Definition at line 29 of file HLT1CaloJetEnergy.h.


Constructor & Destructor Documentation

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")),
  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 50 of file HLT1CaloJetEnergy.cc.

{
}

Member Function Documentation

void HLT1CaloJetEnergy::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]

Reimplemented from edm::EDFilter.

Definition at line 55 of file HLT1CaloJetEnergy.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::add(), and edm::ParameterSetDescription::addUntracked().

                                                                              {
  edm::ParameterSetDescription desc;
  desc.add<edm::InputTag>("inputTag",edm::InputTag("hltStoppedHSCPIterativeCone5CaloJets"));
  desc.addUntracked<bool>("saveTag",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, 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 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().

Definition at line 43 of file HLT1CaloJetEnergy.h.

Referenced by filter(), and HLT1CaloJetEnergy().

Definition at line 40 of file HLT1CaloJetEnergy.h.

Referenced by filter().