CMS 3D CMS Logo

List of all members | Public Member Functions
reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin Class Reference
Inheritance diagram for reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin:
reco::tau::RecoTauCleanerPlugin reco::tau::RecoTauEventHolderPlugin reco::tau::RecoTauNamedPlugin

Public Member Functions

double operator() (const reco::PFTauRef &) const override
 
 RecoTauChargedHadronMultiplicityCleanerPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
- Public Member Functions inherited from reco::tau::RecoTauCleanerPlugin
void beginEvent () override
 
 RecoTauCleanerPlugin (const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
 
 ~RecoTauCleanerPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauEventHolderPlugin
const edm::Eventevt () const
 
edm::Eventevt ()
 
const edm::EventSetupevtSetup () const
 
 RecoTauEventHolderPlugin (const edm::ParameterSet &pset)
 
void setup (edm::Event &, const edm::EventSetup &)
 
 ~RecoTauEventHolderPlugin () override
 
- Public Member Functions inherited from reco::tau::RecoTauNamedPlugin
const std::string & name () const
 
 RecoTauNamedPlugin (const edm::ParameterSet &pset)
 
virtual ~RecoTauNamedPlugin ()
 

Detailed Description

Definition at line 14 of file RecoTauChargedHadronMultiplicityCleanerPlugin.cc.

Constructor & Destructor Documentation

reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::RecoTauChargedHadronMultiplicityCleanerPlugin ( const edm::ParameterSet pset,
edm::ConsumesCollector &&  iC 
)

Definition at line 23 of file RecoTauChargedHadronMultiplicityCleanerPlugin.cc.

24  : RecoTauCleanerPlugin(pset,std::move(iC))
25 {}
RecoTauCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

double reco::tau::RecoTauChargedHadronMultiplicityCleanerPlugin::operator() ( const reco::PFTauRef tau) const
overridevirtual

Implements reco::tau::RecoTauCleanerPlugin.

Definition at line 27 of file RecoTauChargedHadronMultiplicityCleanerPlugin.cc.

References muons2muons_cfi::chargedHadron, DEFINE_EDM_PLUGIN, reco::PFRecoTauChargedHadron::kChargedPFCandidate, reco::PFRecoTauChargedHadron::kPFNeutralHadron, reco::PFRecoTauChargedHadron::kTrack, and mps_fire::result.

28 {
29  // Get the ranking value for this tau.
30  // N.B. lower value means more "tau like"!
31  double result = 0.;
32  const std::vector<PFRecoTauChargedHadron>& chargedHadrons = tau->signalTauChargedHadronCandidates();
33  for ( std::vector<PFRecoTauChargedHadron>::const_iterator chargedHadron = chargedHadrons.begin();
34  chargedHadron != chargedHadrons.end(); ++chargedHadron ) {
35  if ( chargedHadron->algo() == PFRecoTauChargedHadron::kChargedPFCandidate ) result -= 8.;
36  else if ( chargedHadron->algo() == PFRecoTauChargedHadron::kTrack ) result -= 4.;
37  else if ( chargedHadron->algo() == PFRecoTauChargedHadron::kPFNeutralHadron ) result -= 2.;
38  else result -= 1.;
39  }
40  return result;
41 }