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 Attributes
MuIsoByTrackPt Class Reference

#include <MuIsoByTrackPt.h>

Inheritance diagram for MuIsoByTrackPt:
MuIsoBaseAlgorithm

Public Member Functions

virtual
reco::isodeposit::IsoDepositExtractor
extractor ()
 
virtual bool isIsolated (const edm::Event &, const edm::EventSetup &, const reco::Track &muon)
 
virtual bool isIsolated (const edm::Event &ev, const edm::EventSetup &es, const reco::TrackRef &muon)
 
virtual float isolation (const edm::Event &, const edm::EventSetup &, const reco::Track &muon)
 The isolation result for one muon. More...
 
virtual float isolation (const edm::Event &ev, const edm::EventSetup &es, const reco::TrackRef &muon)
 
virtual
muonisolation::IsolatorByDeposit
isolator ()
 
 MuIsoByTrackPt (const edm::ParameterSet &conf)
 
void setConeSize (float dr)
 
void setCut (float cut)
 
virtual ~MuIsoByTrackPt ()
 
- Public Member Functions inherited from MuIsoBaseAlgorithm
virtual ~MuIsoBaseAlgorithm ()
 Destructor. More...
 

Private Attributes

float theCut
 
reco::isodeposit::IsoDepositExtractortheExtractor
 
muonisolation::IsolatorByDeposittheIsolator
 

Detailed Description

Definition at line 15 of file MuIsoByTrackPt.h.

Constructor & Destructor Documentation

MuIsoByTrackPt::MuIsoByTrackPt ( const edm::ParameterSet conf)

Definition at line 22 of file MuIsoByTrackPt.cc.

References reco::get(), edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), theCut, theExtractor, theIsolator, and create_public_pileup_plots::weights.

23  : theExtractor(0), theIsolator(0)
24 {
25  edm::ParameterSet extractorPSet = conf.getParameter<edm::ParameterSet>("ExtractorPSet");
26  string extractorName = extractorPSet.getParameter<string>("ComponentName");
27  theExtractor = IsoDepositExtractorFactory::get()->create(extractorName, extractorPSet);
28 
29  theCut = conf.getUntrackedParameter<double>("Threshold", 0.);
30  float coneSize = conf.getUntrackedParameter<double>("ConeSize", 0.);
31  vector<double> weights(1,1.);
32  theIsolator = new IsolatorByDeposit(coneSize, weights);
33 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
reco::isodeposit::IsoDepositExtractor * theExtractor
muonisolation::IsolatorByDeposit * theIsolator
T get(const Candidate &c)
Definition: component.h:56
MuIsoByTrackPt::~MuIsoByTrackPt ( )
virtual

Definition at line 35 of file MuIsoByTrackPt.cc.

References theExtractor, and theIsolator.

36 {
37  delete theExtractor;
38  delete theIsolator;
39 }
reco::isodeposit::IsoDepositExtractor * theExtractor
muonisolation::IsolatorByDeposit * theIsolator

Member Function Documentation

virtual reco::isodeposit::IsoDepositExtractor* MuIsoByTrackPt::extractor ( )
inlinevirtual

Definition at line 34 of file MuIsoByTrackPt.h.

References theExtractor.

Referenced by isolation().

34 { return theExtractor; }
reco::isodeposit::IsoDepositExtractor * theExtractor
bool MuIsoByTrackPt::isIsolated ( const edm::Event ,
const edm::EventSetup ,
const reco::Track muon 
)
virtual

Return logical result of isolaton is all parameters and cuts are fixe (may remain not implemented for all types of isolation)

Implements MuIsoBaseAlgorithm.

Definition at line 58 of file MuIsoByTrackPt.cc.

References isolation(), and theCut.

Referenced by isIsolated().

59 {
60  return (isolation(ev,es,muon) > theCut);
61 }
virtual float isolation(const edm::Event &, const edm::EventSetup &, const reco::Track &muon)
The isolation result for one muon.
virtual bool MuIsoByTrackPt::isIsolated ( const edm::Event ev,
const edm::EventSetup es,
const reco::TrackRef muon 
)
inlinevirtual

Implements MuIsoBaseAlgorithm.

Definition at line 26 of file MuIsoByTrackPt.h.

References isIsolated().

27  {
28  return isIsolated(ev, es, *muon);
29  }
virtual bool isIsolated(const edm::Event &, const edm::EventSetup &, const reco::Track &muon)
float MuIsoByTrackPt::isolation ( const edm::Event ,
const edm::EventSetup ,
const reco::Track muon 
)
virtual

The isolation result for one muon.

Implements MuIsoBaseAlgorithm.

Definition at line 46 of file MuIsoByTrackPt.cc.

References reco::isodeposit::IsoDepositExtractor::deposit(), extractor(), isolator(), muonisolation::IsolatorByDeposit::result(), and muonisolation::MuIsoBaseIsolator::Result::valFloat.

Referenced by isIsolated(), and isolation().

47 {
48  IsoDeposit dep = extractor()->deposit(ev,es,muon);
50  deposits.push_back(&dep);
51  if (isolator()->resultType() == MuIsoBaseIsolator::ISOL_FLOAT_TYPE){
52  return isolator()->result(deposits).valFloat;
53  }
54 
55  return -999.;
56 }
virtual muonisolation::IsolatorByDeposit * isolator()
virtual reco::isodeposit::IsoDepositExtractor * extractor()
virtual Result result(const DepositContainer &deposits, const edm::Event *=0) const
Compute the deposit within the cone and return the isolation result.
std::vector< DepositAndVetos > DepositContainer
virtual reco::IsoDeposit deposit(const edm::Event &ev, const edm::EventSetup &evSetup, const reco::Track &track) const =0
virtual float MuIsoByTrackPt::isolation ( const edm::Event ev,
const edm::EventSetup es,
const reco::TrackRef muon 
)
inlinevirtual

Implements MuIsoBaseAlgorithm.

Definition at line 21 of file MuIsoByTrackPt.h.

References isolation().

22  {
23  return isolation(ev, es, *muon);
24  }
virtual float isolation(const edm::Event &, const edm::EventSetup &, const reco::Track &muon)
The isolation result for one muon.
virtual muonisolation::IsolatorByDeposit* MuIsoByTrackPt::isolator ( )
inlinevirtual

Definition at line 35 of file MuIsoByTrackPt.h.

References theIsolator.

Referenced by isolation().

35 { return theIsolator; }
muonisolation::IsolatorByDeposit * theIsolator
void MuIsoByTrackPt::setConeSize ( float  dr)

Definition at line 41 of file MuIsoByTrackPt.cc.

References muonisolation::IsolatorByDeposit::setConeSize(), and theIsolator.

42 {
44 }
void setConeSize(float conesize)
Compute the count of deposit within the cone and return the isolation result.
muonisolation::IsolatorByDeposit * theIsolator
void MuIsoByTrackPt::setCut ( float  cut)
inline

Definition at line 32 of file MuIsoByTrackPt.h.

References GOODCOLL_filter_cfg::cut, and theCut.

Member Data Documentation

float MuIsoByTrackPt::theCut
private

Definition at line 38 of file MuIsoByTrackPt.h.

Referenced by isIsolated(), MuIsoByTrackPt(), and setCut().

reco::isodeposit::IsoDepositExtractor* MuIsoByTrackPt::theExtractor
private

Definition at line 39 of file MuIsoByTrackPt.h.

Referenced by extractor(), MuIsoByTrackPt(), and ~MuIsoByTrackPt().

muonisolation::IsolatorByDeposit* MuIsoByTrackPt::theIsolator
private

Definition at line 40 of file MuIsoByTrackPt.h.

Referenced by isolator(), MuIsoByTrackPt(), setConeSize(), and ~MuIsoByTrackPt().