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
MonoPhotonSkimmer Class Reference

#include <MonoPhotonSkimmer/MonoPhotonSkimmer/src/MonoPhotonSkimmer.cc>

Inheritance diagram for MonoPhotonSkimmer:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

 MonoPhotonSkimmer (const edm::ParameterSet &)
 
 ~MonoPhotonSkimmer ()
 
- 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 Member Functions

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

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::InputTag _phoTag
 
bool _selectEE
 
double _trackisoOffsetEB
 
double _trackisoOffsetEE
 
double _trackisoSlopeEB
 
double _trackisoSlopeEE
 

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

Description: [one line class summary]

Implementation: [Notes on implementation]

Definition at line 43 of file MonoPhotonSkimmer.cc.

Constructor & Destructor Documentation

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

Definition at line 96 of file MonoPhotonSkimmer.cc.

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

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

Definition at line 134 of file MonoPhotonSkimmer.cc.

135 {
136 
137  // do anything here that needs to be done at desctruction time
138  // (e.g. close files, deallocate resources etc.)
139 
140 }

Member Function Documentation

void MonoPhotonSkimmer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDFilter.

Definition at line 200 of file MonoPhotonSkimmer.cc.

201 {
202 }
void MonoPhotonSkimmer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDFilter.

Definition at line 206 of file MonoPhotonSkimmer.cc.

206  {
207 }
bool MonoPhotonSkimmer::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDFilter.

Definition at line 149 of file MonoPhotonSkimmer.cc.

References _ecalisoOffsetEB, _ecalisoOffsetEE, _ecalisoSlopeEB, _ecalisoSlopeEE, _etawidthEB, _etawidthEE, _hadoveremEB, _hadoveremEE, _hcalisoOffsetEB, _hcalisoOffsetEE, _hcalisoSlopeEB, _hcalisoSlopeEE, _minPhoEtEB, _minPhoEtEE, _phoTag, _selectEE, _trackisoOffsetEB, _trackisoOffsetEE, _trackisoSlopeEB, _trackisoSlopeEE, edm::Event::getByLabel(), and interactiveExample::photons.

150 {
151  using namespace edm;
153  iEvent.getByLabel(_phoTag, photonColl);
154  const reco::PhotonCollection *photons = photonColl.product();
155  //Iterate over photon collection.
156 // std::vector<reco::Photon> PreselPhotons;
157  int PreselPhotons=0;
158  reco::PhotonCollection::const_iterator pho;
159  for (pho = (*photons).begin(); pho!= (*photons).end(); pho++){
160  if (!pho->isEB() && !_selectEE) continue;
161 
162  double ecalisocut = 0;
163  double hcalisocut = 0;
164  double hadoverem = 0;
165  double minphoet = 0;
166  double trackiso = 0;
167  double etawidth = 0;
168  if (pho->isEB()){
169  ecalisocut = _ecalisoOffsetEB + _ecalisoSlopeEB * pho->pt();
170  hcalisocut = _hcalisoOffsetEB + _hcalisoSlopeEB * pho->pt();
171  hadoverem = _hadoveremEB;
172  minphoet = _minPhoEtEB;
173  trackiso = _trackisoOffsetEB + _trackisoSlopeEB * pho->pt();
174  etawidth = _etawidthEB;
175  }
176  else{
177  ecalisocut = _ecalisoOffsetEE + _ecalisoSlopeEE * pho->pt();
178  hcalisocut = _hcalisoOffsetEE + _hcalisoSlopeEE * pho->pt();
179  hadoverem = _hadoveremEE;
180  minphoet = _minPhoEtEE;
181  trackiso = _trackisoOffsetEE + _trackisoSlopeEE * pho->pt();
182  etawidth = _etawidthEE;
183  }
184 
185  if (pho->ecalRecHitSumEtConeDR04() < ecalisocut
186  && pho->hcalTowerSumEtConeDR04() < hcalisocut
187  && pho->hadronicOverEm() < hadoverem
188  && pho->pt() > minphoet
189  && pho->trkSumPtHollowConeDR04()<trackiso
190  && pho->sigmaIetaIeta() <etawidth
191  ) PreselPhotons++;
192 
193  }//Loop over Photons
194  if (PreselPhotons > 0 ) return true;
195  return false;
196 }
edm::InputTag _phoTag
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
std::vector< Photon > PhotonCollection
collectin of Photon objects
Definition: PhotonFwd.h:9

Member Data Documentation

double MonoPhotonSkimmer::_ecalisoOffsetEB
private

Definition at line 58 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_ecalisoOffsetEE
private

Definition at line 74 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_ecalisoSlopeEB
private

Definition at line 59 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_ecalisoSlopeEE
private

Definition at line 75 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_etawidthEB
private

Definition at line 72 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_etawidthEE
private

Definition at line 82 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hadoveremEB
private

Definition at line 65 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hadoveremEE
private

Definition at line 78 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hcalisoOffsetEB
private

Definition at line 62 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hcalisoOffsetEE
private

Definition at line 76 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hcalisoSlopeEB
private

Definition at line 63 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_hcalisoSlopeEE
private

Definition at line 77 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_minPhoEtEB
private

Definition at line 67 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_minPhoEtEE
private

Definition at line 79 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

edm::InputTag MonoPhotonSkimmer::_phoTag
private

Definition at line 54 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

bool MonoPhotonSkimmer::_selectEE
private

Definition at line 55 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_trackisoOffsetEB
private

Definition at line 69 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_trackisoOffsetEE
private

Definition at line 80 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_trackisoSlopeEB
private

Definition at line 70 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().

double MonoPhotonSkimmer::_trackisoSlopeEE
private

Definition at line 81 of file MonoPhotonSkimmer.cc.

Referenced by filter(), and MonoPhotonSkimmer().