CMS 3D CMS Logo

RecoTauSoftTwoProngTausCleanerPlugin.cc
Go to the documentation of this file.
1 /*
2  * RecoTauSoftTwoProngTausCleanerPlugin
3  *
4  * Author: Christian Veelken, NICPB Tallinn
5  *
6  * Remove 2-prong PFTaus with a low pT track, in order to reduce rate of 1-prong taus migrating to 2-prong decay mode
7  */
8 
12 
13 namespace reco {
14  namespace tau {
15 
17  public:
19 
20  // Get ranking value for a given tau Ref
21  double operator()(const reco::PFTauRef&) const override;
22 
23  private:
24  double minTrackPt_;
25  };
26 
30  minTrackPt_ = pset.getParameter<double>("minTrackPt");
31  }
32 
34  double result = 0.;
35  const std::vector<PFRecoTauChargedHadron>& chargedHadrons = tau->signalTauChargedHadronCandidates();
36  if (chargedHadrons.size() == 2) {
37  for (std::vector<PFRecoTauChargedHadron>::const_iterator chargedHadron = chargedHadrons.begin();
38  chargedHadron != chargedHadrons.end();
39  ++chargedHadron) {
41  if (!(track != nullptr && track->pt() > minTrackPt_))
42  result += 1.e+3;
43  }
44  }
45  return result;
46  }
47 
48  } // namespace tau
49 } // namespace reco
50 
51 // Register our plugin
55  "RecoTauSoftTwoProngTausCleanerPlugin");
RecoTauSoftTwoProngTausCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
const reco::Track * getTrackFromChargedHadron(const reco::PFRecoTauChargedHadron &chargedHadron)
fixed size matrix
double operator()(const reco::PFTauRef &) const override
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511