CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MonoPhotonSkimmer Class Reference
Inheritance diagram for MonoPhotonSkimmer:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MonoPhotonSkimmer (const edm::ParameterSet &)
 
 ~MonoPhotonSkimmer () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob () override
 
void endJob () override
 
bool filter (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

double _ecalisoOffsetEB
 
double _ecalisoOffsetEE
 
double _ecalisoSlopeEB
 
double _ecalisoSlopeEE
 
double _etawidthEB
 
double _etawidthEE
 
double _hadoveremEB
 
double _hadoveremEE
 
double _hcalisoOffsetEB
 
double _hcalisoOffsetEE
 
double _hcalisoSlopeEB
 
double _hcalisoSlopeEE
 
double _minPhoEtEB
 
double _minPhoEtEE
 
edm::EDGetTokenT< reco::PhotonCollection_phoToken
 
bool _selectEE
 
double _trackisoOffsetEB
 
double _trackisoOffsetEE
 
double _trackisoSlopeEB
 
double _trackisoSlopeEE
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
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 &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 41 of file Skim_MonoPhotonSkimmer.cc.

Constructor & Destructor Documentation

◆ MonoPhotonSkimmer()

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

Definition at line 94 of file Skim_MonoPhotonSkimmer.cc.

94  {
95  //now do what ever initialization is needed
96  _phoToken = consumes<reco::PhotonCollection>(iConfig.getParameter<edm::InputTag>("phoTag"));
97  _selectEE = iConfig.getParameter<bool>("selectEE");
98 
99  _ecalisoOffsetEB = iConfig.getParameter<double>("ecalisoOffsetEB");
100  _ecalisoSlopeEB = iConfig.getParameter<double>("ecalisoSlopeEB");
101 
102  _hcalisoOffsetEB = iConfig.getParameter<double>("hcalisoOffsetEB");
103  _hcalisoSlopeEB = iConfig.getParameter<double>("hcalisoSlopeEB");
104 
105  _hadoveremEB = iConfig.getParameter<double>("hadoveremEB");
106  _minPhoEtEB = iConfig.getParameter<double>("minPhoEtEB");
107 
108  _trackisoOffsetEB = iConfig.getParameter<double>("trackIsoOffsetEB");
109  _trackisoSlopeEB = iConfig.getParameter<double>("trackIsoSlopeEB");
110  _etawidthEB = iConfig.getParameter<double>("etaWidthEB");
111 
112  _ecalisoOffsetEE = iConfig.getParameter<double>("ecalisoOffsetEE");
113  _ecalisoSlopeEE = iConfig.getParameter<double>("ecalisoSlopeEE");
114 
115  _hcalisoOffsetEE = iConfig.getParameter<double>("hcalisoOffsetEE");
116  _hcalisoSlopeEE = iConfig.getParameter<double>("hcalisoSlopeEE");
117 
118  _hadoveremEE = iConfig.getParameter<double>("hadoveremEE");
119  _minPhoEtEE = iConfig.getParameter<double>("minPhoEtEE");
120 
121  _trackisoOffsetEE = iConfig.getParameter<double>("trackIsoOffsetEE");
122  _trackisoSlopeEE = iConfig.getParameter<double>("trackIsoSlopeEE");
123 
124  _etawidthEE = iConfig.getParameter<double>("etaWidthEE");
125 }

References _ecalisoOffsetEB, _ecalisoOffsetEE, _ecalisoSlopeEB, _ecalisoSlopeEE, _etawidthEB, _etawidthEE, _hadoveremEB, _hadoveremEE, _hcalisoOffsetEB, _hcalisoOffsetEE, _hcalisoSlopeEB, _hcalisoSlopeEE, _minPhoEtEB, _minPhoEtEE, _phoToken, _selectEE, _trackisoOffsetEB, _trackisoOffsetEE, _trackisoSlopeEB, _trackisoSlopeEE, and edm::ParameterSet::getParameter().

◆ ~MonoPhotonSkimmer()

MonoPhotonSkimmer::~MonoPhotonSkimmer ( )
override

Definition at line 127 of file Skim_MonoPhotonSkimmer.cc.

127  {
128  // do anything here that needs to be done at desctruction time
129  // (e.g. close files, deallocate resources etc.)
130 }

Member Function Documentation

◆ beginJob()

void MonoPhotonSkimmer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 184 of file Skim_MonoPhotonSkimmer.cc.

184 {}

◆ endJob()

void MonoPhotonSkimmer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 187 of file Skim_MonoPhotonSkimmer.cc.

187 {}

◆ filter()

bool MonoPhotonSkimmer::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDFilter.

Definition at line 137 of file Skim_MonoPhotonSkimmer.cc.

137  {
138  using namespace edm;
140  iEvent.getByToken(_phoToken, photonColl);
141  const reco::PhotonCollection* photons = photonColl.product();
142  //Iterate over photon collection.
143  // std::vector<reco::Photon> PreselPhotons;
144  int PreselPhotons = 0;
145  reco::PhotonCollection::const_iterator pho;
146  for (pho = (*photons).begin(); pho != (*photons).end(); pho++) {
147  if (!pho->isEB() && !_selectEE)
148  continue;
149 
150  double ecalisocut = 0;
151  double hcalisocut = 0;
152  double hadoverem = 0;
153  double minphoet = 0;
154  double trackiso = 0;
155  double etawidth = 0;
156  if (pho->isEB()) {
157  ecalisocut = _ecalisoOffsetEB + _ecalisoSlopeEB * pho->pt();
158  hcalisocut = _hcalisoOffsetEB + _hcalisoSlopeEB * pho->pt();
159  hadoverem = _hadoveremEB;
160  minphoet = _minPhoEtEB;
161  trackiso = _trackisoOffsetEB + _trackisoSlopeEB * pho->pt();
162  etawidth = _etawidthEB;
163  } else {
164  ecalisocut = _ecalisoOffsetEE + _ecalisoSlopeEE * pho->pt();
165  hcalisocut = _hcalisoOffsetEE + _hcalisoSlopeEE * pho->pt();
166  hadoverem = _hadoveremEE;
167  minphoet = _minPhoEtEE;
168  trackiso = _trackisoOffsetEE + _trackisoSlopeEE * pho->pt();
169  etawidth = _etawidthEE;
170  }
171 
172  if (pho->ecalRecHitSumEtConeDR04() < ecalisocut && pho->hcalTowerSumEtConeDR04() < hcalisocut &&
173  pho->hadronicOverEm() < hadoverem && pho->pt() > minphoet && pho->trkSumPtHollowConeDR04() < trackiso &&
174  pho->sigmaIetaIeta() < etawidth)
175  PreselPhotons++;
176 
177  } //Loop over Photons
178  if (PreselPhotons > 0)
179  return true;
180  return false;
181 }

References _ecalisoOffsetEB, _ecalisoOffsetEE, _ecalisoSlopeEB, _ecalisoSlopeEE, _etawidthEB, _etawidthEE, _hadoveremEB, _hadoveremEE, _hcalisoOffsetEB, _hcalisoOffsetEE, _hcalisoSlopeEB, _hcalisoSlopeEE, _minPhoEtEB, _minPhoEtEE, _phoToken, _selectEE, _trackisoOffsetEB, _trackisoOffsetEE, _trackisoSlopeEB, _trackisoSlopeEE, iEvent, BPHMonitor_cfi::photons, and edm::Handle< T >::product().

Member Data Documentation

◆ _ecalisoOffsetEB

double MonoPhotonSkimmer::_ecalisoOffsetEB
private

Definition at line 56 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _ecalisoOffsetEE

double MonoPhotonSkimmer::_ecalisoOffsetEE
private

Definition at line 72 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _ecalisoSlopeEB

double MonoPhotonSkimmer::_ecalisoSlopeEB
private

Definition at line 57 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _ecalisoSlopeEE

double MonoPhotonSkimmer::_ecalisoSlopeEE
private

Definition at line 73 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _etawidthEB

double MonoPhotonSkimmer::_etawidthEB
private

Definition at line 70 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _etawidthEE

double MonoPhotonSkimmer::_etawidthEE
private

Definition at line 80 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hadoveremEB

double MonoPhotonSkimmer::_hadoveremEB
private

Definition at line 63 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hadoveremEE

double MonoPhotonSkimmer::_hadoveremEE
private

Definition at line 76 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hcalisoOffsetEB

double MonoPhotonSkimmer::_hcalisoOffsetEB
private

Definition at line 60 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hcalisoOffsetEE

double MonoPhotonSkimmer::_hcalisoOffsetEE
private

Definition at line 74 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hcalisoSlopeEB

double MonoPhotonSkimmer::_hcalisoSlopeEB
private

Definition at line 61 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _hcalisoSlopeEE

double MonoPhotonSkimmer::_hcalisoSlopeEE
private

Definition at line 75 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _minPhoEtEB

double MonoPhotonSkimmer::_minPhoEtEB
private

Definition at line 65 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _minPhoEtEE

double MonoPhotonSkimmer::_minPhoEtEE
private

Definition at line 77 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _phoToken

edm::EDGetTokenT<reco::PhotonCollection> MonoPhotonSkimmer::_phoToken
private

Definition at line 52 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _selectEE

bool MonoPhotonSkimmer::_selectEE
private

Definition at line 53 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _trackisoOffsetEB

double MonoPhotonSkimmer::_trackisoOffsetEB
private

Definition at line 67 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _trackisoOffsetEE

double MonoPhotonSkimmer::_trackisoOffsetEE
private

Definition at line 78 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _trackisoSlopeEB

double MonoPhotonSkimmer::_trackisoSlopeEB
private

Definition at line 68 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

◆ _trackisoSlopeEE

double MonoPhotonSkimmer::_trackisoSlopeEE
private

Definition at line 79 of file Skim_MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

edm::Handle::product
T const * product() const
Definition: Handle.h:70
MonoPhotonSkimmer::_ecalisoOffsetEB
double _ecalisoOffsetEB
Definition: Skim_MonoPhotonSkimmer.cc:56
edm
HLT enums.
Definition: AlignableModifier.h:19
MonoPhotonSkimmer::_hcalisoOffsetEB
double _hcalisoOffsetEB
Definition: Skim_MonoPhotonSkimmer.cc:60
MonoPhotonSkimmer::_hcalisoOffsetEE
double _hcalisoOffsetEE
Definition: Skim_MonoPhotonSkimmer.cc:74
MonoPhotonSkimmer::_trackisoSlopeEB
double _trackisoSlopeEB
Definition: Skim_MonoPhotonSkimmer.cc:68
MonoPhotonSkimmer::_phoToken
edm::EDGetTokenT< reco::PhotonCollection > _phoToken
Definition: Skim_MonoPhotonSkimmer.cc:52
MonoPhotonSkimmer::_hadoveremEB
double _hadoveremEB
Definition: Skim_MonoPhotonSkimmer.cc:63
edm::Handle< reco::PhotonCollection >
MonoPhotonSkimmer::_minPhoEtEB
double _minPhoEtEB
Definition: Skim_MonoPhotonSkimmer.cc:65
MonoPhotonSkimmer::_ecalisoOffsetEE
double _ecalisoOffsetEE
Definition: Skim_MonoPhotonSkimmer.cc:72
MonoPhotonSkimmer::_minPhoEtEE
double _minPhoEtEE
Definition: Skim_MonoPhotonSkimmer.cc:77
MonoPhotonSkimmer::_trackisoSlopeEE
double _trackisoSlopeEE
Definition: Skim_MonoPhotonSkimmer.cc:79
MonoPhotonSkimmer::_hcalisoSlopeEB
double _hcalisoSlopeEB
Definition: Skim_MonoPhotonSkimmer.cc:61
iEvent
int iEvent
Definition: GenABIO.cc:224
MonoPhotonSkimmer::_etawidthEB
double _etawidthEB
Definition: Skim_MonoPhotonSkimmer.cc:70
BPHMonitor_cfi.photons
photons
Definition: BPHMonitor_cfi.py:91
MonoPhotonSkimmer::_trackisoOffsetEB
double _trackisoOffsetEB
Definition: Skim_MonoPhotonSkimmer.cc:67
MonoPhotonSkimmer::_hcalisoSlopeEE
double _hcalisoSlopeEE
Definition: Skim_MonoPhotonSkimmer.cc:75
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
MonoPhotonSkimmer::_trackisoOffsetEE
double _trackisoOffsetEE
Definition: Skim_MonoPhotonSkimmer.cc:78
reco::PhotonCollection
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9
MonoPhotonSkimmer::_hadoveremEE
double _hadoveremEE
Definition: Skim_MonoPhotonSkimmer.cc:76
MonoPhotonSkimmer::_ecalisoSlopeEE
double _ecalisoSlopeEE
Definition: Skim_MonoPhotonSkimmer.cc:73
MonoPhotonSkimmer::_selectEE
bool _selectEE
Definition: Skim_MonoPhotonSkimmer.cc:53
MonoPhotonSkimmer::_ecalisoSlopeEB
double _ecalisoSlopeEB
Definition: Skim_MonoPhotonSkimmer.cc:57
edm::InputTag
Definition: InputTag.h:15
MonoPhotonSkimmer::_etawidthEE
double _etawidthEE
Definition: Skim_MonoPhotonSkimmer.cc:80