CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFRecoTauDiscriminationByTauPolarization.cc
Go to the documentation of this file.
3 
4 /* class PFRecoTauDiscriminationByTauPolarization
5  * created : May 26 2010,
6  * contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
7  */
8 
9 using namespace reco;
10 using namespace std;
11 using namespace edm;
12 
15  public:
17  const ParameterSet& iConfig)
18  :PFTauDiscriminationProducerBase(iConfig) { // retrieve quality cuts
19  rTauMin = iConfig.getParameter<double>("rtau");
20  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
21  }
22 
24 
25  void beginEvent(const Event&, const EventSetup&);
26  double discriminate(const PFTauRef&);
27 
28  private:
30  double rTauMin;
31 };
32 
34  const Event& event, const EventSetup& eventSetup){}
35 
36 double
38 
39  double rTau = 0;
40  // rtau for PFTau has to be calculated for leading PF charged hadronic candidate
41  // calculating it from leadingTrack can (and will) give rtau > 1!
42  if(tau.isNonnull() && tau->p() > 0
43  && tau->leadPFChargedHadrCand().isNonnull()) {
44  rTau = tau->leadPFChargedHadrCand()->p()/tau->p();
45  }
46 
47  if(booleanOutput) return ( rTau > rTauMin ? 1. : 0. );
48  return rTau;
49 }
50 
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
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past