CMS 3D CMS Logo

Classes | Public Member Functions | Private Member Functions | Private Attributes

muonisolation::Cuts Class Reference

#include <Cuts.h>

List of all members.

Classes

struct  CutSpec

Public Member Functions

 Cuts ()
 dummy constructor
 Cuts (const edm::ParameterSet &pset)
 ctor by PSet
 Cuts (const std::vector< double > &etaBounds, const std::vector< double > &coneSizes, const std::vector< double > &thresholds)
 constructor from valid parameters
const CutSpecoperator() (double eta) const
const CutSpecoperator[] (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< CutSpectheCuts

Detailed Description

Definition at line 12 of file Cuts.h.


Constructor & Destructor Documentation

muonisolation::Cuts::Cuts ( ) [inline]

dummy constructor

Definition at line 18 of file Cuts.h.

{}
Cuts::Cuts ( const edm::ParameterSet pset)

ctor by PSet

Definition at line 10 of file Cuts.cc.

References edm::ParameterSet::getParameter(), and init.

{
  vector<double> etaBounds  = pset.getParameter<std::vector<double> >("EtaBounds");
  vector<double> coneSizes  = pset.getParameter<std::vector<double> >("ConeSizes");
  vector<double> thresholds = pset.getParameter<std::vector<double> >("Thresholds");
  init(etaBounds,coneSizes,thresholds);
}
muonisolation::Cuts::Cuts ( const std::vector< double > &  etaBounds,
const std::vector< double > &  coneSizes,
const std::vector< double > &  thresholds 
)

constructor from valid parameters


Member Function Documentation

void muonisolation::Cuts::init ( const std::vector< double > &  etaBounds,
const std::vector< double > &  coneSizes,
const std::vector< double > &  thresholds 
) [private]
const Cuts::CutSpec & Cuts::operator() ( double  eta) const

Definition at line 44 of file Cuts.cc.

References MuonErrorMatrixValues_cff::etaRange, and i.

{
  double absEta = fabs(eta);
  unsigned int nCuts = theCuts.size();
  unsigned int idx_eta = nCuts-1;
  for (unsigned int i = 0; i < nCuts; i++) {
    if (absEta < theCuts[i].etaRange.max() ) { idx_eta = i; break; }
  }
  return theCuts[idx_eta];
}
const CutSpec& muonisolation::Cuts::operator[] ( unsigned int  i) const [inline]

Definition at line 30 of file Cuts.h.

References i, and theCuts.

{return theCuts[i];};
std::string Cuts::print ( void  ) const

Definition at line 55 of file Cuts.cc.

References query::result.

Referenced by L3MuonCombinedRelativeIsolationProducer::beginJob(), and L3MuonIsolationProducer::beginJob().

{
  std::ostringstream result;
  typedef std::vector<CutSpec>::const_iterator IT;
  result << "Cuts : " << std::endl;
  for (IT it = theCuts.begin(), itEnd = theCuts.end(); it < itEnd; ++it) {
    result << "eta: "<<(*it).etaRange
           <<", cone: "<< (*it).conesize
           <<", cut: "<<(*it).threshold
           <<std::endl;
  }  
  return result.str();
}
unsigned int muonisolation::Cuts::size ( void  ) [inline]

Definition at line 32 of file Cuts.h.

References theCuts.

{return theCuts.size();};

Member Data Documentation

std::vector<CutSpec> muonisolation::Cuts::theCuts [private]

Definition at line 42 of file Cuts.h.

Referenced by operator[](), and size().