CMS 3D CMS Logo

Public Member Functions | Private Attributes

SimpleCutsIsolator Class Reference

#include <SimpleCutsIsolator.h>

Inheritance diagram for SimpleCutsIsolator:
muonisolation::MuIsoBaseIsolator

List of all members.

Public Member Functions

virtual Result result (const DepositContainer &deposits, const edm::Event *=0) const
 Compute and return the isolation variable.
virtual Result result (const DepositContainer &deposits, const reco::Track &tk, const edm::Event *=0) const
 Compute and return the isolation variable, with vetoes and the muon.
virtual ResultType resultType () const
 SimpleCutsIsolator (const edm::ParameterSet &par)

Private Attributes

muonisolation::Cuts theCuts

Detailed Description

Definition at line 8 of file SimpleCutsIsolator.h.


Constructor & Destructor Documentation

SimpleCutsIsolator::SimpleCutsIsolator ( const edm::ParameterSet par) [inline]

Definition at line 10 of file SimpleCutsIsolator.h.

                                                 :
    theCuts(par.getParameter<std::vector<double> > ("EtaBounds"),
            par.getParameter<std::vector<double> > ("ConeSizes"),
            par.getParameter<std::vector<double> > ("Thresholds"))
    {
    }

Member Function Documentation

virtual Result SimpleCutsIsolator::result ( const DepositContainer deposits,
const edm::Event = 0 
) const [inline, virtual]

Compute and return the isolation variable.

Implements muonisolation::MuIsoBaseIsolator.

Definition at line 19 of file SimpleCutsIsolator.h.

References submit::answer, muonisolation::MuIsoBaseIsolator::ISOL_BOOL_TYPE, and muonisolation::MuIsoBaseIsolator::Result::valBool.

                                                                                     {
    Result answer(ISOL_BOOL_TYPE);
    answer.valBool = false;
    // fail miserably...
    return answer;
  }
virtual Result SimpleCutsIsolator::result ( const DepositContainer deposits,
const reco::Track muon,
const edm::Event = 0 
) const [inline, virtual]

Compute and return the isolation variable, with vetoes and the muon.

Reimplemented from muonisolation::MuIsoBaseIsolator.

Definition at line 26 of file SimpleCutsIsolator.h.

References submit::answer, muonisolation::Cuts::CutSpec::conesize, reco::TrackBase::eta(), muonisolation::MuIsoBaseIsolator::ISOL_BOOL_TYPE, theCuts, muonisolation::Cuts::CutSpec::threshold, muonisolation::MuIsoBaseIsolator::Result::valBool, and muonisolation::MuIsoBaseIsolator::Result::valFloat.

                                                                                                          {
    Result answer(ISOL_BOOL_TYPE);

    muonisolation::Cuts::CutSpec cuts_here = theCuts(tk.eta());
    
    double conesize = cuts_here.conesize;
    double dephlt = 0;
    unsigned int nDeps = deposits.size();
    for(unsigned int iDep = 0; iDep < nDeps; ++iDep ){
      dephlt += deposits[iDep].dep->depositWithin(conesize);
    }
    answer.valFloat = dephlt;
    if (dephlt<cuts_here.threshold) {
      answer.valBool = true;
    } else {
      answer.valBool = false;
    }
    return answer;
  }
virtual ResultType SimpleCutsIsolator::resultType ( ) const [inline, virtual]

Member Data Documentation

Definition at line 49 of file SimpleCutsIsolator.h.

Referenced by result().