CMS 3D CMS Logo

RecoTauChargedHadronMultiplicityCleanerPlugin.cc
Go to the documentation of this file.
1 /*
2  * RecoTauChargedHadronMultiplicityCleanerPlugin
3  *
4  * Author: Christian Veelken, NICPB Tallinn
5  *
6  * A reco tau cleaner plugin that ranks the PFTaus by the number of charged hadrons.
7  */
8 
11 
12 namespace reco {
13  namespace tau {
14 
16  public:
18 
19  // Get ranking value for a given tau Ref
20  double operator()(const reco::PFTauRef&) const override;
21  };
22 
25  : RecoTauCleanerPlugin(pset, std::move(iC)) {}
26 
28  // Get the ranking value for this tau.
29  // N.B. lower value means more "tau like"!
30  double result = 0.;
31  const std::vector<PFRecoTauChargedHadron>& chargedHadrons = tau->signalTauChargedHadronCandidates();
32  for (std::vector<PFRecoTauChargedHadron>::const_iterator chargedHadron = chargedHadrons.begin();
33  chargedHadron != chargedHadrons.end();
34  ++chargedHadron) {
36  result -= 8.;
38  result -= 4.;
40  result -= 2.;
41  else
42  result -= 1.;
43  }
44  return result;
45  }
46 
47  } // namespace tau
48 } // namespace reco
49 
50 // Register our plugin
54  "RecoTauChargedHadronMultiplicityCleanerPlugin");
RecoTauChargedHadronMultiplicityCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511