![]() |
|
|||
File indexing completed on 2023-03-17 11:26:07
0001 // 0002 // 0003 // File: hitfit/Lepjets_Event_Jet.h 0004 // Purpose: Represent a `jet' in a Lepjets_Event. 0005 // Created: Jul, 2000, sss, based on run 1 mass analysis code. 0006 // 0007 // This is like Lepjets_Event_Jet, except that we store some 0008 // additional information: 0009 // 0010 // - svx tag flag 0011 // - slt tag flag 0012 // - slt lepton 4-vector 0013 // - slt lepton energy deposition 0014 // 0015 // CMSSW File : interface/Lepjets_Event_Jet.h 0016 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0 0017 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch> 0018 // 0019 0020 /** 0021 @file Lepjets_Event_Jet.h 0022 0023 @brief Represent a jet in an instance of Lepjets_Event class. 0024 0025 @author Scott Stuart Snyder <snyder@bnl.gov> 0026 0027 @par Creation date: 0028 July 2000. 0029 0030 @par Modification History: 0031 Apr 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>: 0032 Imported to CMSSW.<br> 0033 Nov 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>: 0034 Added doxygen tags for automatic generation of documentation. 0035 0036 @par Terms of Usage: 0037 With consent for the original author (Scott Snyder). 0038 0039 */ 0040 0041 #ifndef HITFIT_LEPJETS_EVENT_JET_H 0042 #define HITFIT_LEPJETS_EVENT_JET_H 0043 0044 #include "TopQuarkAnalysis/TopHitFit/interface/fourvec.h" 0045 #include "TopQuarkAnalysis/TopHitFit/interface/Vector_Resolution.h" 0046 #include "TopQuarkAnalysis/TopHitFit/interface/Lepjets_Event_Lep.h" 0047 #include <iosfwd> 0048 0049 namespace hitfit { 0050 0051 /** 0052 Possible types of jet in an instance of Lepjets_Event class. 0053 */ 0054 enum Jet_Labels { 0055 isr_label = 0, 0056 lepb_label = 11, 0057 hadb_label = 12, 0058 hadw1_label = 13, 0059 hadw2_label = 14, 0060 higgs_label = 15, 0061 unknown_label = 20 0062 }; 0063 0064 /** 0065 @class Lepjets_Event_Jet 0066 0067 @brief A class to represent a jet in an instance of Lepjets_Event class. 0068 The class is derived from the Lepjets_Event_Lep class. In addition 0069 to the information stored in Lepjets_Event_Lep class, this class 0070 holds the following information: 0071 - SVX (Secondary Vertex) tag flag (Irrelevant for non-D0 experiment). 0072 - SLT (Soft Lepton Tag) flag (Irrelevant for non-D0 experiment). 0073 - SLT lepton four-momentum (Irrelevant for non-D0 experiment). 0074 - SLT lepton energy deposition (Irrelevant for non-D0 experiment). 0075 */ 0076 class Lepjets_Event_Jet : public Lepjets_Event_Lep 0077 // 0078 // Purpose: Represent a `jet' in a Lepjets_Event. 0079 // 0080 { 0081 public: 0082 // Constructor. 0083 /** 0084 @brief Constructor. 0085 0086 @param p The four-momemtum. 0087 0088 @param type The type code. 0089 0090 @param res The jet resolution. 0091 0092 @param svx_tag Boolean flag for SVX tag. 0093 0094 @param slt_tag Boolean flag for SLT tag. 0095 0096 @param tag_lep The SLT lepton four-momentum. 0097 0098 @param slt_edep The SLT lepton energy deposition. 0099 */ 0100 Lepjets_Event_Jet(const Fourvec& p, 0101 int type, 0102 const Vector_Resolution& res, 0103 bool svx_tag = false, 0104 bool slt_tag = false, 0105 const Fourvec& tag_lep = Fourvec(), 0106 double slt_edep = 0); 0107 0108 // Access the svx tag flag. 0109 /** 0110 Return the SVX tag flag. 0111 */ 0112 bool svx_tag() const; 0113 0114 /** 0115 Return a reference to the SVX tag flag. 0116 */ 0117 bool& svx_tag(); 0118 0119 // Access the slt tag flag. 0120 /** 0121 Return the SLT tag flag. 0122 */ 0123 0124 bool slt_tag() const; 0125 /** 0126 Return a reference to the SLT tag flag. 0127 */ 0128 bool& slt_tag(); 0129 0130 // Access the tag lepton four-momentum. 0131 /** 0132 Return a reference to the SLT lepton. 0133 */ 0134 Fourvec& tag_lep(); 0135 0136 /** 0137 Return a constant reference to the SLT lepton. 0138 */ 0139 const Fourvec& tag_lep() const; 0140 0141 // Access the tag lepton energy deposition. 0142 /** 0143 Return the SLT lepton energy deposition. 0144 */ 0145 double slt_edep() const; 0146 /** 0147 Return a reference to SLT lepton energy deposition. 0148 */ 0149 double& slt_edep(); 0150 0151 // Access the uncorrected jet energy. 0152 /** 0153 Return the uncorrected jet energy. 0154 */ 0155 double e0() const; 0156 0157 /** 0158 Return a reference of the uncorrected jet energy. 0159 */ 0160 double& e0(); 0161 0162 // Print the content of this object. 0163 /** 0164 @brief Print the content of this object. 0165 0166 @param s The output stream to which to write 0167 0168 @param full If <b>TRUE</b>, print all information about this instance 0169 of Lepjets_Event_Lep.<br> 0170 If <b>FALSE</b>, print partial information about this instance 0171 of Lepjets_Event_Lep. 0172 */ 0173 std::ostream& dump(std::ostream& s, bool full = false) const; 0174 0175 private: 0176 // The object state. 0177 /** 0178 Boolean flag for the SVX tag. 0179 */ 0180 bool _svx_tag; 0181 0182 /** 0183 Boolean flag for the SLT tag. 0184 */ 0185 bool _slt_tag; 0186 0187 /** 0188 The SLT lepton four-momentum. 0189 */ 0190 Fourvec _tag_lep; 0191 0192 /** 0193 The SLT lepton energy deposition. 0194 */ 0195 double _slt_edep; 0196 0197 /** 0198 The uncorrected jet energy. 0199 */ 0200 double _e0; 0201 }; 0202 0203 // Print this object. 0204 std::ostream& operator<<(std::ostream& s, const Lepjets_Event_Jet& ev); 0205 0206 // Helper function to translate jet type from integer to char/string 0207 /** 0208 @brief Helper function: Translate jet type code from integer to char. 0209 The following notation is used for each type of jet: 0210 - g ISR/gluon. 0211 - b leptonic \f$ b- \f$ quark. 0212 - B hadronic \f$ b- \f$ quark. 0213 - w hadronic jet from \f$ W- \f$ boson. 0214 - H \f$ b- \f$ jet from Higgs boson. 0215 - ? Unknown. 0216 0217 @param type The jet type code 0218 */ 0219 char jetTypeChar(int type); 0220 0221 /** 0222 @brief Helper function: Translate jet type code from integer to char. 0223 The following notation is used for each type of jet: 0224 - g ISR/gluon. 0225 - b leptonic \f$ b- \f$ quark. 0226 - B hadronic \f$ b- \f$ quark. 0227 - w hadronic jet from \f$ W- \f$ boson. 0228 - H \f$ b- \f$ jet from Higgs boson. 0229 - ? Unknown. 0230 0231 @param type The jet type code 0232 */ 0233 std::string jetTypeString(int type); 0234 0235 /** 0236 @brief Helper function: Translate jet type code from a list of numbers 0237 to a string. 0238 - g ISR/gluon. 0239 - b leptonic \f$ b- \f$ quark. 0240 - B hadronic \f$ b- \f$ quark. 0241 - w hadronic jet from \f$ W- \f$ boson. 0242 - H \f$ b- \f$ jet from Higgs boson. 0243 - ? Unknown. 0244 0245 @param jet_types The jet type codes in vector form. 0246 */ 0247 template <class T> 0248 std::string jetTypeString(std::vector<T> jet_types) { 0249 std::ostringstream ret; 0250 0251 for (size_t j = 0; j != jet_types.size(); ++j) { 0252 ret << jetTypeChar((int)(jet_types[j])); 0253 } 0254 0255 return ret.str(); 0256 } 0257 0258 } // namespace hitfit 0259 0260 #endif // not HITFIT_LEPJETS_EVENT_JET_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.2.1 LXR engine. The LXR team |
![]() ![]() |