CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PFRecoTauDecayModeIndexProducer.cc
Go to the documentation of this file.
1 /*
2  * class PFRecoTauDecayModeIndexProducer
3  * created : April 16, 2009
4  * revised : ,
5  * Authors : Evan K. Friis, (UC Davis), Simone Gennai (SNS)
6  *
7  * Associates the decay mode index (see enum in DataFormats/TauReco/interface/PFTauDecayMode.h)
8  * reconstruced in the PFTauDecayMode production to its underlying PFTau, in PFTau discriminator format
9  *
10  */
11 
13 
16 
17 using namespace reco;
18 
20  public:
22  PFTauDecayModeProducer_ = iConfig.getParameter<edm::InputTag>("PFTauDecayModeProducer");
23  }
25  double discriminate(const PFTauRef& thePFTauRef);
26  void beginEvent(const edm::Event& evt, const edm::EventSetup& evtSetup);
27  private:
29  edm::Handle<PFTauDecayModeAssociation> decayModes_; // holds the PFTauDecayModes for the current event
30 };
31 
32 
34 {
35  // Get the PFTau Decay Modes
36  event.getByLabel(PFTauDecayModeProducer_, decayModes_);
37 }
38 
40 {
41  int theDecayModeIndex = -1;
42 
43  const PFTauDecayMode& theDecayMode = (*decayModes_)[thePFTauRef];
44 
45  // retrieve decay mode
46  theDecayModeIndex = static_cast<int>(theDecayMode.getDecayMode());
47 
48  if (theDecayModeIndex < 0) theDecayModeIndex = -1;
49 
50  return theDecayModeIndex;
51 }
52 
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
hadronicTauDecayModes getDecayMode() const
void beginEvent(const edm::Event &evt, const edm::EventSetup &evtSetup)
PFRecoTauDecayModeIndexProducer(const edm::ParameterSet &iConfig)
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
edm::Handle< PFTauDecayModeAssociation > decayModes_
double discriminate(const PFTauRef &thePFTauRef)