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 
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  private:
22  double minTrackPt_;
23 };
24 
26  : RecoTauCleanerPlugin(pset,std::move(iC))
27 {
28  minTrackPt_ = pset.getParameter<double>("minTrackPt");
29 }
30 
32 {
33  double result = 0.;
34  const std::vector<PFRecoTauChargedHadron>& chargedHadrons = tau->signalTauChargedHadronCandidates();
35  if ( chargedHadrons.size() == 2 ) {
36  for ( std::vector<PFRecoTauChargedHadron>::const_iterator chargedHadron = chargedHadrons.begin();
37  chargedHadron != chargedHadrons.end(); ++chargedHadron ) {
38  if ( !(chargedHadron->getTrack().get() && chargedHadron->getTrack()->pt() > minTrackPt_) ) result += 1.e+3;
39  }
40  }
41  return result;
42 }
43 
44 }} // end namespace reco::tau
45 
46 // Register our plugin
50  "RecoTauSoftTwoProngTausCleanerPlugin");
T getParameter(std::string const &) const
double operator()(const reco::PFTauRef &) const override
RecoTauSoftTwoProngTausCleanerPlugin(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