test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecoTauDiscriminationByNProngs.cc
Go to the documentation of this file.
3 
4 /* class CaloRecoTauDiscriminationByNProngs
5  * created : September 23 2010,
6  * contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
7  * based on H+ tau ID by Lauri Wendland
8  */
9 
10 using namespace reco;
11 using namespace std;
12 
15  public:
18  nprongs = iConfig.getParameter<uint32_t>("nProngs");
19  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
20  }
22  double discriminate(const reco::CaloTauRef&) override;
23 
24  private:
25  uint32_t nprongs;
27 };
28 
29 
31  bool accepted = false;
32  int np = tau->signalTracks().size();
33  if((np == 1 && (nprongs == 1 || nprongs == 0)) ||
34  (np == 3 && (nprongs == 3 || nprongs == 0)) ) accepted = true;
35  if(!accepted) np = 0;
36  if(booleanOutput) return accepted;
37  return np;
38 }
39 
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
CaloRecoTauDiscriminationByNProngs(const edm::ParameterSet &iConfig)
int np
Definition: AMPTWrapper.h:33
double discriminate(const reco::CaloTauRef &) override