CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisRecoPhoton Class Reference

#include <L1AnalysisRecoPhoton.h>

Public Member Functions

L1AnalysisRecoPhotonDataFormatgetData ()
 
 L1AnalysisRecoPhoton ()
 
void Reset ()
 
void SetPhoton (const edm::Event &event, const edm::EventSetup &setup, const edm::Handle< reco::PhotonCollection > photons, const std::vector< edm::Handle< edm::ValueMap< bool > > > phoVIDDecisionHandles, const unsigned &maxPhoton)
 
 ~L1AnalysisRecoPhoton ()
 

Private Attributes

L1AnalysisRecoPhotonDataFormat recoPhoton_
 

Detailed Description

Definition at line 19 of file L1AnalysisRecoPhoton.h.

Constructor & Destructor Documentation

◆ L1AnalysisRecoPhoton()

L1Analysis::L1AnalysisRecoPhoton::L1AnalysisRecoPhoton ( )

Definition at line 5 of file L1AnalysisRecoPhoton.cc.

5 {}

◆ ~L1AnalysisRecoPhoton()

L1Analysis::L1AnalysisRecoPhoton::~L1AnalysisRecoPhoton ( )

Definition at line 7 of file L1AnalysisRecoPhoton.cc.

7 {}

Member Function Documentation

◆ getData()

L1AnalysisRecoPhotonDataFormat* L1Analysis::L1AnalysisRecoPhoton::getData ( void  )
inline

Definition at line 31 of file L1AnalysisRecoPhoton.h.

References recoPhoton_.

Referenced by L1PhotonRecoTreeProducer::L1PhotonRecoTreeProducer().

31 { return &recoPhoton_; }
L1AnalysisRecoPhotonDataFormat recoPhoton_

◆ Reset()

void L1Analysis::L1AnalysisRecoPhoton::Reset ( )
inline

◆ SetPhoton()

void L1Analysis::L1AnalysisRecoPhoton::SetPhoton ( const edm::Event event,
const edm::EventSetup setup,
const edm::Handle< reco::PhotonCollection photons,
const std::vector< edm::Handle< edm::ValueMap< bool > > >  phoVIDDecisionHandles,
const unsigned &  maxPhoton 
)

Definition at line 9 of file L1AnalysisRecoPhoton.cc.

References l1PhotonRecoTree_cfi::maxPhoton, and BPHMonitor_cfi::photons.

Referenced by L1PhotonRecoTreeProducer::analyze().

15 {
17 
18  for (reco::PhotonCollection::const_iterator ph = photons->begin();
19  ph != photons->end() && recoPhoton_.nPhotons < maxPhoton;
20  ++ph) {
21  recoPhoton_.e.push_back(ph->energy());
22  recoPhoton_.pt.push_back(ph->pt());
23  recoPhoton_.et.push_back(ph->et());
24  recoPhoton_.eta.push_back(ph->eta());
25  recoPhoton_.phi.push_back(ph->phi());
26  recoPhoton_.r9.push_back(ph->r9());
27  recoPhoton_.hasPixelSeed.push_back(ph->hasPixelSeed());
28 
30 
31  recoPhoton_.isTightPhoton.push_back((*(phoVIDDecisionHandles[0]))[photonEdmRef]);
32  recoPhoton_.isLoosePhoton.push_back((*(phoVIDDecisionHandles[1]))[photonEdmRef]);
33 
35  }
36 }
L1AnalysisRecoPhotonDataFormat recoPhoton_

Member Data Documentation

◆ recoPhoton_

L1AnalysisRecoPhotonDataFormat L1Analysis::L1AnalysisRecoPhoton::recoPhoton_
private

Definition at line 35 of file L1AnalysisRecoPhoton.h.

Referenced by getData(), and Reset().