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 { namespace tau {
14 
16 {
17  public:
19 
20  // Get ranking value for a given tau Ref
21  double operator()(const reco::PFTauRef&) const override;
22  private:
23  double minTrackPt_;
24 };
25 
27  : RecoTauCleanerPlugin(pset,std::move(iC))
28 {
29  minTrackPt_ = pset.getParameter<double>("minTrackPt");
30 }
31 
33 {
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(); ++chargedHadron ) {
40  if ( !(track != nullptr && track->pt() > minTrackPt_) ) result += 1.e+3;
41  }
42  }
43  return result;
44 }
45 
46 }} // end namespace reco::tau
47 
48 // Register our plugin
52  "RecoTauSoftTwoProngTausCleanerPlugin");
T getParameter(std::string const &) const
double operator()(const reco::PFTauRef &) const override
RecoTauSoftTwoProngTausCleanerPlugin(const edm::ParameterSet &pset, edm::ConsumesCollector &&iC)
double pt() const
track transverse momentum
Definition: TrackBase.h:660
const reco::Track * getTrackFromChargedHadron(const reco::PFRecoTauChargedHadron &chargedHadron)
fixed size matrix
#define DEFINE_EDM_PLUGIN(factory, type, name)
def move(src, dest)
Definition: eostools.py:511