Public Member Functions | |
double | discriminate (const reco::PFTauRef &) |
PFRecoTauDiscriminationByInvMass (const edm::ParameterSet &pset) | |
~PFRecoTauDiscriminationByInvMass () | |
Private Types | |
typedef std::map< IntPair, DoublePair > | DecayModeCutMap |
typedef std::pair< double, double > | DoublePair |
typedef std::pair< unsigned int, unsigned int > | IntPair |
Private Attributes | |
bool | cut_ |
DecayModeCutMap | decayModeCuts_ |
double | max_default_ |
double | min_default_ |
Definition at line 13 of file PFRecoTauDiscriminationByInvMass.cc.
typedef std::map<IntPair, DoublePair> PFRecoTauDiscriminationByInvMass::DecayModeCutMap [private] |
Definition at line 47 of file PFRecoTauDiscriminationByInvMass.cc.
typedef std::pair<double, double> PFRecoTauDiscriminationByInvMass::DoublePair [private] |
Definition at line 46 of file PFRecoTauDiscriminationByInvMass.cc.
typedef std::pair<unsigned int, unsigned int> PFRecoTauDiscriminationByInvMass::IntPair [private] |
Definition at line 45 of file PFRecoTauDiscriminationByInvMass.cc.
PFRecoTauDiscriminationByInvMass::PFRecoTauDiscriminationByInvMass | ( | const edm::ParameterSet & | pset | ) | [inline, explicit] |
Definition at line 15 of file PFRecoTauDiscriminationByInvMass.cc.
References cut_, decayModeCuts_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), max_default_, min_default_, reco::tau::helpers::nCharged(), and benchmark_cfg::select.
:PFTauDiscriminationProducerBase(pset) { // If select is not set, just return the invariant mass cut_ = pset.exists("select"); if (cut_) { const edm::ParameterSet &select = pset.getParameter<edm::ParameterSet> ("select"); // Get default cuts min_default_ = select.getParameter<double>("min"); max_default_ = select.getParameter<double>("max"); // Get decay mode specific cuts std::vector<std::string> decayModeCutNames = select.getParameterNamesForType<edm::ParameterSet>(); BOOST_FOREACH(const std::string& dmName, decayModeCutNames) { const edm::ParameterSet &dmPSet = select.getParameter<edm::ParameterSet>(dmName); unsigned int nCharged = dmPSet.getParameter<unsigned int>("charged"); unsigned int nPiZero = dmPSet.getParameter<unsigned int>("pizeros"); double minCut = dmPSet.getParameter<double>("min"); double maxCut = dmPSet.getParameter<double>("max"); // Add our dm-specific cut to the map decayModeCuts_[std::make_pair(nCharged, nPiZero)] = std::make_pair(minCut, maxCut); } } }
PFRecoTauDiscriminationByInvMass::~PFRecoTauDiscriminationByInvMass | ( | ) | [inline] |
Definition at line 41 of file PFRecoTauDiscriminationByInvMass.cc.
{}
double PFRecoTauDiscriminationByInvMass::discriminate | ( | const reco::PFTauRef & | tau | ) |
Definition at line 55 of file PFRecoTauDiscriminationByInvMass.cc.
References cut_, decayModeCuts_, scaleCards::mass, max_default_, min_default_, and edm::second().
{ double mass = tau->mass(); if (cut_) { unsigned int charged = tau->signalPFChargedHadrCands().size(); unsigned int pizeros = tau->signalPiZeroCandidates().size(); DecayModeCutMap::const_iterator specificCut = decayModeCuts_.find( std::make_pair(charged, pizeros)); // Cut does not exist for this decay mode if (specificCut == decayModeCuts_.end() ) return (mass > min_default_ && mass < max_default_); else return (mass > specificCut->second.first && mass < specificCut->second.second); } // If we dont' cut, just return the mass return mass; }
bool PFRecoTauDiscriminationByInvMass::cut_ [private] |
Definition at line 51 of file PFRecoTauDiscriminationByInvMass.cc.
Referenced by discriminate(), and PFRecoTauDiscriminationByInvMass().
Definition at line 48 of file PFRecoTauDiscriminationByInvMass.cc.
Referenced by discriminate(), and PFRecoTauDiscriminationByInvMass().
double PFRecoTauDiscriminationByInvMass::max_default_ [private] |
Definition at line 50 of file PFRecoTauDiscriminationByInvMass.cc.
Referenced by discriminate(), and PFRecoTauDiscriminationByInvMass().
double PFRecoTauDiscriminationByInvMass::min_default_ [private] |
Definition at line 49 of file PFRecoTauDiscriminationByInvMass.cc.
Referenced by discriminate(), and PFRecoTauDiscriminationByInvMass().