CMS 3D CMS Logo

FlavorHistory.h

Go to the documentation of this file.
00001 #ifndef HepMCCandidate_FlavorHistory_h
00002 #define HepMCCandidate_FlavorHistory_h
00003 
00013 // -------------------------------------------------------------
00014 // Identify the ancestry of the Quark
00015 // 
00016 // 
00017 // Matrix Element:
00018 //    Status 3 parent with precisely 2 "grandparents" that
00019 //    is outside of the "initial" section (0-5) that has the
00020 //    same ID as the status 2 parton in question. 
00021 //    NOTE: This is not the actual ultimate progenitor,
00022 //    but this is the signature of matrix element decays.
00023 //    The ultimate progenitor is the parent of the status 3
00024 //    parton.
00025 //
00026 // Flavor excitation:
00027 //    Almost the same as the matrix element classification,
00028 //    but has only one outgoing parton product instead of two.
00029 //
00030 // Gluon splitting:
00031 //    Parent is a quark of a different flavor than the parton
00032 //    in question, or a gluon. Can come from either ISR or FSR.
00033 //
00034 // True decay:
00035 //    Decays from a resonance like top, Higgs, etc.
00036 // -------------------------------------------------------------
00037 
00038 
00039 #include "DataFormats/Common/interface/Ptr.h"
00040 #include "DataFormats/Common/interface/OwnVector.h"
00041 #include "DataFormats/Common/interface/Handle.h"
00042 #include "DataFormats/Common/interface/View.h"
00043 #include "DataFormats/Candidate/interface/Candidate.h"
00044 #include "DataFormats/Candidate/interface/CandidateFwd.h"
00045 
00046 namespace reco {
00047 
00048 
00049 class FlavorHistory {
00050 public:
00051 
00052   enum FLAVOR_T { FLAVOR_NULL=0,   // No flavor, unset
00053                   FLAVOR_GS,       // gluon splitting
00054                   FLAVOR_EXC,      // flavor excitation
00055                   FLAVOR_ME,       // matrix element
00056                   FLAVOR_DECAY,    // flavor decay
00057                   N_FLAVOR_TYPES };// total number
00058 
00059   static const int  gluonId=21;
00060   static const int  tQuarkId=6;
00061   static const int  bQuarkId=5;
00062   static const int  cQuarkId=4;
00063   
00064 
00065   FlavorHistory(); 
00066   FlavorHistory( FLAVOR_T flavorSource,
00067                  reco::CandidatePtr const & parton,
00068                  reco::CandidatePtr const & progenitor,
00069                  reco::CandidatePtr const & sister );
00070   FlavorHistory( FLAVOR_T flavorSource,
00071                  edm::Handle<edm::View<reco::Candidate> > h_partons,
00072                  int iparton,
00073                  int iprogenitor,
00074                  int isister);
00075   FlavorHistory( FLAVOR_T flavorSource,
00076                  edm::Handle<reco::CandidateCollection > h_partons,
00077                  int iparton,
00078                  int iprogenitor,
00079                  int isister);
00080   ~FlavorHistory(){}
00081 
00082 
00083   // Accessors
00084   FLAVOR_T       flavorSource          () const { return flavorSource_; }
00085   bool           hasParton             () const { return parton_.key() > 0; }
00086   bool           hasSister             () const { return sister_.key() > 0; }
00087   bool           hasProgenitor         () const { return progenitor_.key() > 0 ;}
00088   const reco::CandidatePtr & parton    () const { return parton_; }
00089   const reco::CandidatePtr & sister    () const { return sister_; }
00090   const reco::CandidatePtr & progenitor() const { return progenitor_; }
00091 
00092   // Operators for sorting and keys
00093   bool operator< ( FlavorHistory const & right ) {
00094     return parton_.key() < right.parton_.key();
00095   }
00096   bool operator> ( FlavorHistory const & right ) {
00097     return parton_.key() > right.parton_.key();
00098   }
00099   bool operator== ( FlavorHistory const & right ) {
00100     return parton_.key() == right.parton_.key();
00101   }
00102   
00103   
00104 
00105 protected:
00106   FLAVOR_T              flavorSource_;
00107   reco::CandidatePtr    parton_;
00108   reco::CandidatePtr    progenitor_;
00109   reco::CandidatePtr    sister_;
00110 };
00111 
00112 }
00113 
00114 #endif

Generated on Tue Jun 9 17:31:00 2009 for CMSSW by  doxygen 1.5.4