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.
2 
3 /* class PFRecoTauDiscriminationByTauPolarization
4  * created : May 26 2010,
5  * contributors : Sami Lehti (sami.lehti@cern.ch ; HIP, Helsinki)
6  */
7 
8 using namespace reco;
9 using namespace std;
10 using namespace edm;
11 
14  public:
16  const ParameterSet& iConfig)
17  :PFTauDiscriminationProducerBase(iConfig) { // retrieve quality cuts
18  rTauMin = iConfig.getParameter<double>("rtau");
19  booleanOutput = iConfig.getParameter<bool>("BooleanOutput");
20  }
21 
23 
24  void beginEvent(const Event&, const EventSetup&) override;
25  double discriminate(const PFTauRef&) override;
26 
27  private:
29  double rTauMin;
30 };
31 
33  const Event& event, const EventSetup& eventSetup){}
34 
35 double
37 
38  double rTau = 0;
39  // rtau for PFTau has to be calculated for leading PF charged hadronic candidate
40  // calculating it from leadingTrack can (and will) give rtau > 1!
41  if(tau.isNonnull() && tau->p() > 0
42  && tau->leadPFChargedHadrCand().isNonnull()) {
43  rTau = tau->leadPFChargedHadrCand()->p()/tau->p();
44  }
45 
46  if(booleanOutput) return ( rTau > rTauMin ? 1. : 0. );
47  return rTau;
48 }
49 
T getParameter(std::string const &) const
void beginEvent(const Event &, const EventSetup &) override
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
DEFINE_FWK_MODULE(CosmicTrackingParticleSelector)