CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecoTauDiscriminationByCharge.cc
Go to the documentation of this file.
2 
3 /* class CaloRecoTauDiscriminationByCharge
4  *
5  * Discriminates taus by a |charge| == 1 requirement,
6  * and optionally nTracks == 1 || 3
7  *
8  * Authors : S.Lehti, copied from PFRecoTauDiscriminationByCharge
9  */
10 
12  public:
15  chargeReq_ = iConfig.getParameter<uint32_t>("AbsChargeReq");
17  iConfig.getParameter<bool>("ApplyOneOrThreeProngCut");
18  }
20  double discriminate(const reco::CaloTauRef& pfTau) override;
21  private:
22  uint32_t chargeReq_;
24 };
25 
27  const reco::CaloTauRef& theTauRef) {
28  uint16_t nSigTk = theTauRef->signalTracks().size();
29  bool chargeok = (abs(theTauRef->charge()) == int(chargeReq_));
30  bool oneOrThreeProngOK = ( (nSigTk==1) || (nSigTk==3) || !oneOrThreeProng_ );
31 
32  return ( (chargeok && oneOrThreeProngOK) ? 1. : 0. );
33 }
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
CaloRecoTauDiscriminationByCharge(const edm::ParameterSet &iConfig)
double discriminate(const reco::CaloTauRef &pfTau) override