CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFRecoTauDiscriminationByNProngs.cc
Go to the documentation of this file.
3 
4 /* class PFRecoTauDiscriminationByNProngs
5  * created : August 30 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 using namespace edm;
13 
15  public:
17  nprongs = iConfig.getParameter<uint32_t>("nProngs");
18  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
19  }
20 
22 
23  void beginEvent(const edm::Event&, const edm::EventSetup&);
24  double discriminate(const reco::PFTauRef&);
25 
26  private:
27 
28  uint32_t nprongs;
30 };
31 
33 
35 
36  bool accepted = false;
37  int np = tau->signalTracks().size();
38 
39  if((np == 1 && (nprongs == 1 || nprongs == 0)) ||
40  (np == 3 && (nprongs == 3 || nprongs == 0)) ) accepted = true;
41 
42  if(!accepted) np = 0;
43  if(booleanOutput) return accepted;
44  return np;
45 }
46 
48 
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
int iEvent
Definition: GenABIO.cc:243
int np
Definition: AMPTWrapper.h:33
void beginEvent(const edm::Event &, const edm::EventSetup &)
PFRecoTauDiscriminationByNProngs(const ParameterSet &iConfig)