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&) override;
24  double discriminate(const reco::PFTauRef&) override;
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
double discriminate(const reco::PFTauRef &) override
int iEvent
Definition: GenABIO.cc:243
int np
Definition: AMPTWrapper.h:33
void beginEvent(const edm::Event &, const edm::EventSetup &) override
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)
PFRecoTauDiscriminationByNProngs(const ParameterSet &iConfig)