CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/DataFormats/PatCandidates/interface/HardEventHypothesis.h

Go to the documentation of this file.
00001 #ifndef DataFormats_PatCandidates_interface_HardEventHypothesis_h
00002 #define DataFormats_PatCandidates_interface_HardEventHypothesis_h
00003 
00004 
00005 
00006 // -*- C++ -*-
00008 //
00009 // Package:    HardEventHypothesis
00010 // Class:      HardEventHypothesis
00011 //
00016 //-------------------------------------------------------------------------------------
00085 //-------------------------------------------------------------------------------------
00086 //
00087 // Original Author:  Salvatore Rappoccio
00088 //         Created:  Tue Feb 12 14:42:17 CST 2008
00089 // $Id: HardEventHypothesis.h,v 1.3 2008/03/05 14:47:33 fronga Exp $
00090 //
00091 // Revision History:
00092 //
00093 
00094 
00095 
00096 
00097 #include "DataFormats/Candidate/interface/Candidate.h"
00098 #include "DataFormats/PatCandidates/interface/Electron.h"
00099 #include "DataFormats/PatCandidates/interface/Muon.h"
00100 #include "DataFormats/PatCandidates/interface/Jet.h"
00101 #include "DataFormats/PatCandidates/interface/Photon.h"
00102 #include "DataFormats/PatCandidates/interface/MET.h"
00103 #include "DataFormats/PatCandidates/interface/Tau.h"
00104 #include "DataFormats/Candidate/interface/CompositeCandidate.h"
00105 #include <vector>
00106 
00107 class StarterKit;
00108 
00109 namespace pat {
00110 
00111   class HardEventHypothesis {
00112   public:
00113 
00114     // Allow StarterKit to access the internal members of this class
00115     friend class StarterKit;
00116 
00117     // Setting quality member
00118     inline void           setQuality( float q ) { quality_ = q;}
00119 
00120     // Getting quality member
00121     inline float          getQuality() const { return quality_; }
00122 
00123     // This will return static event-wide definitions of the candidate roles.
00124     virtual const char *  getCandidateRole ( int i = 0 ) const = 0;
00125     // This will return static event-wide boolean to see if the role is a vector or not
00126     virtual bool          getIsVector(int i = 0) const = 0;
00127 
00128   protected:
00129 
00130     // Pure virtual function to access members polymorphically in the StarterKit, etc.
00131     // The user should not use these classes.
00132     // If irole == -1, then there is no vector access. If it is >= 0, then that corresponds
00133     // to the role index (for instance, in Z+jets,  getCandidate("jets", 2) would return the 3rd
00134     // jet in the jet list. 
00135     virtual reco::Candidate &                getCandidate       (std::string name, int irole = -1) = 0;
00136 
00137     float              quality_;
00138   };
00139 
00140 }
00141 
00142 #endif