test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CaloRecoTauDiscriminationByTauPolarization.cc
Go to the documentation of this file.
3 
4 /* class CaloRecoTauDiscriminationByTauPolarization
5  * created : September 22 2010,
6  * contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
7  */
8 
9 using namespace reco;
10 using namespace std;
11 
13  public:
15  const edm::ParameterSet& iConfig)
17  rTauMin = iConfig.getParameter<double>("rtau");
18  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
19  }
20 
22  double discriminate(const CaloTauRef&) override;
23 
24  private:
26  double rTauMin;
27 };
28 
29 double
31  double rTau = 0;
32  if(tau.isNonnull() && tau->p() > 0 && tau->leadTrack().isNonnull())
33  rTau = tau->leadTrack()->p()/tau->p();
34  if(booleanOutput) return ( rTau > rTauMin ? 1. : 0. );
35  return rTau;
36 }
37 
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250