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 Member Functions | Private Attributes
HCALHighEnergyFilter Class Reference

#include <HCALHighEnergyFilter.cc>

Inheritance diagram for HCALHighEnergyFilter:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 HCALHighEnergyFilter (const edm::ParameterSet &)
 
 ~HCALHighEnergyFilter ()
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void beginJob () override
 
virtual void endJob () override
 
virtual bool filter (edm::Event &, const edm::EventSetup &) override
 
bool jetGood (reco::CaloJetCollection::const_iterator &)
 

Private Attributes

double eta_cut
 
edm::InputTag jet_tag
 
double jet_threshold
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 49 of file HCALHighEnergyFilter.cc.

Constructor & Destructor Documentation

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

Definition at line 79 of file HCALHighEnergyFilter.cc.

80  :
81  // centralTag(iConfig.getUntrackedParameter<edm::InputTag>("CentralJets")),
82  // tauTag(iConfig.getUntrackedParameter<edm::InputTag>("TauJets")),
83  jet_tag(iConfig.getParameter<edm::InputTag>("JetTag")),
84  jet_threshold(iConfig.getParameter<double>("JetThreshold")),
85  eta_cut(iConfig.getParameter<double>("EtaCut"))
86 {
87  //now do what ever initialization is needed
88 
89 }
T getParameter(std::string const &) const
HCALHighEnergyFilter::~HCALHighEnergyFilter ( )

Definition at line 92 of file HCALHighEnergyFilter.cc.

93 {
94 
95  // do anything here that needs to be done at desctruction time
96  // (e.g. close files, deallocate resources etc.)
97 
98 }

Member Function Documentation

void HCALHighEnergyFilter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 150 of file HCALHighEnergyFilter.cc.

151 {
152 }
void HCALHighEnergyFilter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 156 of file HCALHighEnergyFilter.cc.

156  {
157 }
bool HCALHighEnergyFilter::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 115 of file HCALHighEnergyFilter.cc.

References edm::Event::getByLabel(), and METSkim_cff::Jets.

Referenced by Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

116 {
117  using namespace edm;
118 
119  //Handle<L1JetParticleCollection> JetsCentral;
120  //iEvent.getByLabel(centralTag,JetsCentral);
121 
122  //Handle<L1JetParticleCollection> JetsTau;
123  //iEvent.getByLabel(tauTag,JetsTau);
124 
126  iEvent.getByLabel(jet_tag, Jets);
127 
128  /*
129  for (L1JetParticleCollection::const_iterator cit = JetsCentral->begin();
130  cit != JetsCentral->end(); cit++) {
131  if (jetGood(cit)) return true;
132  }
133 
134  for (L1JetParticleCollection::const_iterator cit = JetsTau->begin();
135  cit != JetsTau->end(); cit++) {
136  if (jetGood(cit)) return true;
137  }
138  */
139 
140  for (reco::CaloJetCollection::const_iterator cit = Jets->begin();
141  cit != Jets->end(); cit++) {
142  if (jetGood(cit)) return true;
143  }
144 
145  return false;
146 }
tuple Jets
Definition: METSkim_cff.py:17
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420
bool jetGood(reco::CaloJetCollection::const_iterator &)
bool HCALHighEnergyFilter::jetGood ( reco::CaloJetCollection::const_iterator &  cit)
private

Definition at line 107 of file HCALHighEnergyFilter.cc.

107  {
108  if (cit->energy() >= jet_threshold && std::fabs(cit->eta()) <= eta_cut)
109  return true;
110  return false;
111 }

Member Data Documentation

double HCALHighEnergyFilter::eta_cut
private

Definition at line 65 of file HCALHighEnergyFilter.cc.

edm::InputTag HCALHighEnergyFilter::jet_tag
private

Definition at line 63 of file HCALHighEnergyFilter.cc.

double HCALHighEnergyFilter::jet_threshold
private

Definition at line 64 of file HCALHighEnergyFilter.cc.