CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
HLT2jetGapFilter Class Reference

#include <HLT2jetGapFilter.h>

Inheritance diagram for HLT2jetGapFilter:
HLTFilter edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 HLT2jetGapFilter (const edm::ParameterSet &)
 
virtual bool hltFilter (edm::Event &, const edm::EventSetup &, trigger::TriggerFilterObjectWithRefs &filterproduct)
 
 ~HLT2jetGapFilter ()
 
- Public Member Functions inherited from HLTFilter
 HLTFilter (const edm::ParameterSet &config)
 
int module () const
 
const std::string * moduleLabel () const
 
int path () const
 
const std::string * pathName () const
 
std::pair< int, int > pmid () const
 
bool saveTags () const
 
virtual ~HLTFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

edm::InputTag inputTag_
 
double minEt_
 
double minEta_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from HLTFilter
static void makeHLTFilterDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Author
Monica Vazquez Acosta (CERN)

Definition at line 15 of file HLT2jetGapFilter.h.

Constructor & Destructor Documentation

HLT2jetGapFilter::HLT2jetGapFilter ( const edm::ParameterSet iConfig)
explicit

Definition at line 24 of file HLT2jetGapFilter.cc.

References edm::ParameterSet::getParameter(), inputTag_, minEt_, and minEta_.

24  : HLTFilter(iConfig)
25 {
26  inputTag_ = iConfig.getParameter<edm::InputTag> ("inputTag");
27  minEt_ = iConfig.getParameter<double> ("minEt");
28  minEta_ = iConfig.getParameter<double> ("minEta");
29 }
edm::InputTag inputTag_
T getParameter(std::string const &) const
HLTFilter(const edm::ParameterSet &config)
Definition: HLTFilter.cc:18
HLT2jetGapFilter::~HLT2jetGapFilter ( )

Definition at line 31 of file HLT2jetGapFilter.cc.

31 {}

Member Function Documentation

bool HLT2jetGapFilter::hltFilter ( edm::Event iEvent,
const edm::EventSetup iSetup,
trigger::TriggerFilterObjectWithRefs filterproduct 
)
virtual

Implements HLTFilter.

Definition at line 36 of file HLT2jetGapFilter.cc.

References abs, accept(), trigger::TriggerFilterObjectWithRefs::addCollectionTag(), trigger::TriggerRefsCollections::addObject(), edm::Event::getByLabel(), inputTag_, minEt_, minEta_, n, HLTFilter::saveTags(), and trigger::TriggerJet.

37 {
38  using namespace trigger;
39 
40  // The filter object
41  if (saveTags()) filterproduct.addCollectionTag(inputTag_);
42 
44  iEvent.getByLabel(inputTag_,recocalojets);
45 
46  // look at all candidates, check cuts and add to filter object
47  int n(0);
48 
49 // std::cout << "HLT2jetGapFilter " << recocalojets->size() << " jets in this event" << std::endl;
50 
51 
52  if(recocalojets->size() > 1){
53  // events with two or more jets
54 
55  double etjet1=0.;
56  double etjet2=0.;
57  double etajet1=0.;
58  double etajet2=0.;
59  int countjets =0;
60 
61  for (reco::CaloJetCollection::const_iterator recocalojet = recocalojets->begin();
62  recocalojet<=(recocalojets->begin()+1); recocalojet++) {
63 
64  if(countjets==0) {
65  etjet1 = recocalojet->et();
66  etajet1 = recocalojet->eta();
67  }
68  if(countjets==1) {
69  etjet2 = recocalojet->et();
70  etajet2 = recocalojet->eta();
71  }
72  countjets++;
73  }
74 
75  if(etjet1>minEt_ && etjet2>minEt_ && (etajet1*etajet2)<0 && std::abs(etajet1)>minEta_ && std::abs(etajet2)>minEta_){
76  for (reco::CaloJetCollection::const_iterator recocalojet = recocalojets->begin();
77  recocalojet<=(recocalojets->begin()+1); recocalojet++) {
78  reco::CaloJetRef ref(reco::CaloJetRef(recocalojets,distance(recocalojets->begin(),recocalojet)));
79  filterproduct.addObject(TriggerJet,ref);
80  n++;
81  }
82  }
83 
84  } // events with two or more jets
85 
86 
87 
88  // filter decision
89  bool accept(n>=2);
90 
91  return accept;
92 }
edm::InputTag inputTag_
#define abs(x)
Definition: mlp_lapack.h:159
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:22
void addObject(int id, const reco::RecoEcalCandidateRef &ref)
setters for L3 collections: (id=physics type, and Ref&lt;C&gt;)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
void addCollectionTag(const edm::InputTag &collectionTag)
collectionTags
bool saveTags() const
Definition: HLTFilter.h:45

Member Data Documentation

edm::InputTag HLT2jetGapFilter::inputTag_
private

Definition at line 23 of file HLT2jetGapFilter.h.

Referenced by HLT2jetGapFilter(), and hltFilter().

double HLT2jetGapFilter::minEt_
private

Definition at line 24 of file HLT2jetGapFilter.h.

Referenced by HLT2jetGapFilter(), and hltFilter().

double HLT2jetGapFilter::minEta_
private

Definition at line 25 of file HLT2jetGapFilter.h.

Referenced by HLT2jetGapFilter(), and hltFilter().