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 { namespace tau {
13 
15 {
16  public:
18 
19  // Get ranking value for a given tau Ref
20  double operator()(const reco::PFTauRef&) const override;
21 };
22 
24  : RecoTauCleanerPlugin(pset,std::move(iC))
25 {}
26 
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 }
42 
43 }} // end namespace reco::tau
44 
45 // Register our plugin
49  "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:510