CMS 3D CMS Logo

muonisolation::Cuts Class Reference

#include <RecoMuon/MuonIsolation/interface/Cuts.h>

List of all members.

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 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

Classes

struct  CutSpec


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.

00018 {}

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


Member Function Documentation

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.

References i, and theCuts.

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 }

const CutSpec& muonisolation::Cuts::operator[] ( unsigned int  i  )  const [inline]

Definition at line 30 of file Cuts.h.

References theCuts.

00030 {return theCuts[i];};

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 }

unsigned int muonisolation::Cuts::size ( void   )  [inline]

Definition at line 32 of file Cuts.h.

References theCuts.

00032 {return theCuts.size();};


Member Data Documentation

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

Definition at line 42 of file Cuts.h.

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


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:49:13 2009 for CMSSW by  doxygen 1.5.4