#include <RecoMuon/MuonIsolation/interface/Cuts.h>
Public Member Functions | |
Cuts (const std::vector< double > &etaBounds, const std::vector< double > &coneSizes, const std::vector< double > &thresholds) | |
constructor from valid parameters | |
Cuts (const edm::ParameterSet &pset) | |
ctor by PSet | |
Cuts () | |
dummy constructor | |
const CutSpec & | operator() (double eta) const |
const CutSpec & | operator[] (unsigned int i) const |
std::string | print () const |
unsigned int | size () |
Private Member Functions | |
void | init (const std::vector< double > &etaBounds, const std::vector< double > &coneSizes, const std::vector< double > &thresholds) |
Private Attributes | |
std::vector< CutSpec > | theCuts |
Classes | |
struct | CutSpec |
Definition at line 12 of file Cuts.h.
muonisolation::Cuts::Cuts | ( | ) | [inline] |
Cuts::Cuts | ( | const edm::ParameterSet & | pset | ) |
ctor by PSet
Definition at line 10 of file Cuts.cc.
References coneSizes, edm::ParameterSet::getParameter(), and init().
00011 { 00012 vector<double> etaBounds = pset.getParameter<std::vector<double> >("EtaBounds"); 00013 vector<double> coneSizes = pset.getParameter<std::vector<double> >("ConeSizes"); 00014 vector<double> thresholds = pset.getParameter<std::vector<double> >("Thresholds"); 00015 init(etaBounds,coneSizes,thresholds); 00016 }
muonisolation::Cuts::Cuts | ( | const std::vector< double > & | etaBounds, | |
const std::vector< double > & | coneSizes, | |||
const std::vector< double > & | thresholds | |||
) |
constructor from valid parameters
void muonisolation::Cuts::init | ( | const std::vector< double > & | etaBounds, | |
const std::vector< double > & | coneSizes, | |||
const std::vector< double > & | thresholds | |||
) | [private] |
Referenced by Cuts().
const Cuts::CutSpec & Cuts::operator() | ( | double | eta | ) | const |
Definition at line 44 of file Cuts.cc.
00045 { 00046 double absEta = fabs(eta); 00047 unsigned int nCuts = theCuts.size(); 00048 unsigned int idx_eta = nCuts-1; 00049 for (unsigned int i = 0; i < nCuts; i++) { 00050 if (absEta < theCuts[i].etaRange.max() ) { idx_eta = i; break; } 00051 } 00052 return theCuts[idx_eta]; 00053 }
std::string Cuts::print | ( | void | ) | const |
Definition at line 55 of file Cuts.cc.
References lat::endl(), it, HLT_VtxMuL3::result, and theCuts.
Referenced by L3MuonIsolationProducer::beginJob().
00056 { 00057 std::ostringstream result; 00058 typedef std::vector<CutSpec>::const_iterator IT; 00059 result << "Cuts : " << std::endl; 00060 for (IT it = theCuts.begin(), itEnd = theCuts.end(); it < itEnd; ++it) { 00061 result << "eta: "<<(*it).etaRange 00062 <<", cone: "<< (*it).conesize 00063 <<", cut: "<<(*it).threshold 00064 <<std::endl; 00065 } 00066 return result.str(); 00067 }
std::vector<CutSpec> muonisolation::Cuts::theCuts [private] |
Definition at line 42 of file Cuts.h.
Referenced by operator()(), operator[](), print(), and size().