CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
HardEventHypothesis.h
Go to the documentation of this file.
1 #ifndef DataFormats_PatCandidates_interface_HardEventHypothesis_h
2 #define DataFormats_PatCandidates_interface_HardEventHypothesis_h
3 
4 
5 
6 // -*- C++ -*-
8 //
9 // Package: HardEventHypothesis
10 // Class: HardEventHypothesis
11 //
16 //-------------------------------------------------------------------------------------
85 //-------------------------------------------------------------------------------------
86 //
87 // Original Author: Salvatore Rappoccio
88 // Created: Tue Feb 12 14:42:17 CST 2008
89 // $Id: HardEventHypothesis.h,v 1.2 2008/02/16 15:27:58 srappocc Exp $
90 //
91 // Revision History:
92 //
93 
94 
95 
96 
105 #include <vector>
106 
107 class StarterKit;
108 
109 namespace pat {
110 
112  public:
113 
114  // Allow StarterKit to access the internal members of this class
115  friend class StarterKit;
116 
117  // Setting quality member
118  inline void setQuality( float q ) { quality_ = q;}
119 
120  // Getting quality member
121  inline float getQuality() const { return quality_; }
122 
123  // This will return static event-wide definitions of the candidate roles.
124  virtual const char * getCandidateRole ( int i = 0 ) const = 0;
125  // This will return static event-wide boolean to see if the role is a vector or not
126  virtual bool getIsVector(int i = 0) const = 0;
127 
128  protected:
129 
130  // Pure virtual function to access members polymorphically in the StarterKit, etc.
131  // The user should not use these classes.
132  // If irole == -1, then there is no vector access. If it is >= 0, then that corresponds
133  // to the role index (for instance, in Z+jets, getCandidate("jets", 2) would return the 3rd
134  // jet in the jet list.
135  virtual reco::Candidate & getCandidate (std::string name, int irole = -1) = 0;
136 
137  float quality_;
138  };
139 
140 }
141 
142 #endif
int i
Definition: DBlmapReader.cc:9
HardEventHypothesis is a pure virtual base class to implement a &quot;hard&quot; event hypothesis class...
virtual bool getIsVector(int i=0) const =0
virtual const char * getCandidateRole(int i=0) const =0
virtual reco::Candidate & getCandidate(std::string name, int irole=-1)=0