CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
muonisolation::CandViewExtractor Class Reference

#include <CandViewExtractor.h>

Inheritance diagram for muonisolation::CandViewExtractor:
reco::isodeposit::IsoDepositExtractor

Public Member Functions

 CandViewExtractor ()
 
 CandViewExtractor (const edm::ParameterSet &par, edm::ConsumesCollector &&iC)
 
reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &muon) const override
 
reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &muon) const override
 
void fillVetos (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackCollection &cand) override
 
void initEvent (const edm::Event &ev, const edm::EventSetup &evSetup) override
 perform some constly initialization More...
 
 ~CandViewExtractor () override
 
- Public Member Functions inherited from reco::isodeposit::IsoDepositExtractor
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 make single IsoDeposit based on a CandidateBaseRef as input More...
 
virtual reco::IsoDeposit deposit (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 make single IsoDeposit based on trackRef as input More...
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Candidate &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::CandidateBaseRef &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const
 
virtual std::vector< reco::IsoDepositdeposits (const edm::Event &ev, const edm::EventSetup &evSetup, const reco::TrackBaseRef &track) const
 
virtual ~IsoDepositExtractor ()
 Destructor. More...
 

Private Member Functions

template<typename T >
reco::IsoDeposit depositFromObject (const edm::Event &ev, const edm::EventSetup &evSetup, const T &cand) const
 
reco::IsoDeposit::Veto veto (const reco::IsoDeposit::Direction &dir) const
 

Private Attributes

edm::Event::CacheIdentifier_t theCacheID
 
edm::Handle< edm::View< reco::Candidate > > theCandViewH
 
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandViewToken
 
std::string theDepositLabel
 
double theDiff_r
 
double theDiff_z
 
double theDR_Max
 
double theDR_Veto
 

Detailed Description

Definition at line 18 of file CandViewExtractor.h.

Constructor & Destructor Documentation

◆ CandViewExtractor() [1/2]

muonisolation::CandViewExtractor::CandViewExtractor ( )
inline

Definition at line 20 of file CandViewExtractor.h.

20 {};

◆ CandViewExtractor() [2/2]

CandViewExtractor::CandViewExtractor ( const edm::ParameterSet par,
edm::ConsumesCollector &&  iC 
)

Definition at line 16 of file CandViewExtractor.cc.

19  theDiff_r(par.getParameter<double>("Diff_r")),
20  theDiff_z(par.getParameter<double>("Diff_z")),
21  theDR_Max(par.getParameter<double>("DR_Max")),
22  theDR_Veto(par.getParameter<double>("DR_Veto")) {}

◆ ~CandViewExtractor()

muonisolation::CandViewExtractor::~CandViewExtractor ( )
inlineoverride

Definition at line 23 of file CandViewExtractor.h.

23 {}

Member Function Documentation

◆ deposit() [1/2]

reco::IsoDeposit muonisolation::CandViewExtractor::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Candidate track 
) const
inlineoverridevirtual

make single IsoDeposit based on a candidate as input purely virtual: have to implement in concrete implementations

Reimplemented from reco::isodeposit::IsoDepositExtractor.

Definition at line 42 of file CandViewExtractor.h.

44  {
45  return depositFromObject(ev, evSetup, muon);
46  }

References depositFromObject(), and ev.

◆ deposit() [2/2]

reco::IsoDeposit muonisolation::CandViewExtractor::deposit ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::Track track 
) const
inlineoverridevirtual

make single IsoDeposit based on track as input purely virtual: have to implement in concrete implementations

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 36 of file CandViewExtractor.h.

38  {
39  return depositFromObject(ev, evSetup, muon);
40  }

References depositFromObject(), and ev.

◆ depositFromObject()

template<typename T >
reco::IsoDeposit muonisolation::CandViewExtractor::depositFromObject ( const edm::Event ev,
const edm::EventSetup evSetup,
const T cand 
) const
private

Referenced by deposit().

◆ fillVetos()

void muonisolation::CandViewExtractor::fillVetos ( const edm::Event ev,
const edm::EventSetup evSetup,
const reco::TrackCollection tracks 
)
inlineoverridevirtual

fill vetoes: to exclude deposits at IsoDeposit creation stage check concrete extractors if it's no-op !

Implements reco::isodeposit::IsoDepositExtractor.

Definition at line 25 of file CandViewExtractor.h.

25 {}

◆ initEvent()

void CandViewExtractor::initEvent ( const edm::Event ,
const edm::EventSetup  
)
overridevirtual

perform some constly initialization

Reimplemented from reco::isodeposit::IsoDepositExtractor.

Definition at line 39 of file CandViewExtractor.cc.

39  {
40  ev.getByToken(theCandViewToken, theCandViewH);
41  theCacheID = ev.cacheIdentifier();
42 }

References ev, theCacheID, theCandViewH, and theCandViewToken.

◆ veto()

reco::IsoDeposit::Veto CandViewExtractor::veto ( const reco::IsoDeposit::Direction dir) const
private

Definition at line 32 of file CandViewExtractor.cc.

32  {
34  result.vetoDir = dir;
35  result.dR = theDR_Veto;
36  return result;
37 }

References DeadROC_duringRun::dir, mps_fire::result, and theDR_Veto.

Member Data Documentation

◆ theCacheID

edm::Event::CacheIdentifier_t muonisolation::CandViewExtractor::theCacheID
private

Definition at line 58 of file CandViewExtractor.h.

Referenced by initEvent().

◆ theCandViewH

edm::Handle<edm::View<reco::Candidate> > muonisolation::CandViewExtractor::theCandViewH
private

Definition at line 57 of file CandViewExtractor.h.

Referenced by initEvent().

◆ theCandViewToken

edm::EDGetTokenT<edm::View<reco::Candidate> > muonisolation::CandViewExtractor::theCandViewToken
private

Definition at line 55 of file CandViewExtractor.h.

Referenced by initEvent().

◆ theDepositLabel

std::string muonisolation::CandViewExtractor::theDepositLabel
private

Definition at line 56 of file CandViewExtractor.h.

◆ theDiff_r

double muonisolation::CandViewExtractor::theDiff_r
private

Definition at line 59 of file CandViewExtractor.h.

◆ theDiff_z

double muonisolation::CandViewExtractor::theDiff_z
private

Definition at line 60 of file CandViewExtractor.h.

◆ theDR_Max

double muonisolation::CandViewExtractor::theDR_Max
private

Definition at line 61 of file CandViewExtractor.h.

◆ theDR_Veto

double muonisolation::CandViewExtractor::theDR_Veto
private

Definition at line 62 of file CandViewExtractor.h.

Referenced by veto().

muon
Definition: MuonCocktails.h:17
muonisolation::CandViewExtractor::depositFromObject
reco::IsoDeposit depositFromObject(const edm::Event &ev, const edm::EventSetup &evSetup, const T &cand) const
reco::IsoDeposit::Veto
Definition: IsoDeposit.h:59
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
muonisolation::CandViewExtractor::theDiff_z
double theDiff_z
Definition: CandViewExtractor.h:60
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::View
Definition: CaloClusterFwd.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
muonisolation::CandViewExtractor::theDR_Max
double theDR_Max
Definition: CandViewExtractor.h:61
muonisolation::CandViewExtractor::theCacheID
edm::Event::CacheIdentifier_t theCacheID
Definition: CandViewExtractor.h:58
muonisolation::CandViewExtractor::theCandViewToken
edm::EDGetTokenT< edm::View< reco::Candidate > > theCandViewToken
Definition: CandViewExtractor.h:55
muonisolation::CandViewExtractor::theDiff_r
double theDiff_r
Definition: CandViewExtractor.h:59
muonisolation::CandViewExtractor::theCandViewH
edm::Handle< edm::View< reco::Candidate > > theCandViewH
Definition: CandViewExtractor.h:57
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
muonisolation::CandViewExtractor::theDR_Veto
double theDR_Veto
Definition: CandViewExtractor.h:62
mps_fire.result
result
Definition: mps_fire.py:311
edm::InputTag
Definition: InputTag.h:15
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
muonisolation::CandViewExtractor::theDepositLabel
std::string theDepositLabel
Definition: CandViewExtractor.h:56