Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:31:17

0001 //
0002 //
0003 // File: hitfit/gentop.h
0004 // Purpose: Toy ttbar event generator for testing.
0005 // Created: Jul, 2000, sss.
0006 //
0007 // This is a very simple event generator for ttbar events, to allow some
0008 // basic tests of the mass fitting code.  We generate random ttbars,
0009 // with kinematics pulled out of a hat, and then decay them into l+jets
0010 // events.  No radiation or other such luxuries, and, as mentioned, any
0011 // kinematic distribuions will certainly be wrong.  But the generated
0012 // events should satisfy the l+jets mass constraints.
0013 //
0014 // CMSSW File      : interface/gentop.h
0015 // Original Author : Scott Stuart Snyder <snyder@bnl.gov> for D0
0016 // Imported to CMSSW by Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>
0017 //
0018 
0019 /**
0020     @file gentop.h
0021 
0022     @brief A toy event generator for
0023     \f$t\bar{t} \to \ell + 4~\mathrm{jets}\f$ events.
0024 
0025     This is a very simple event generator for
0026     \f$t\bar{t} \to \ell + 4~\mathrm{jets}\f$ events, to allow some
0027     basic tests of the kinematic fitting code.  The code generates random
0028     \f$t\bar{t}\f$ events with kinematics pulled out of a hat (a random
0029     number generator), and then decay them into
0030     \f$t\bar{t} \to \ell + 4~\mathrm{jets}\f$ events.  No physics behind the
0031     generation except for four-momentum conservation and
0032     energy-mass-momentum relation.  No luxuries such as radiation etc, and,
0033     as mentioned, any kinematic distribution will certainly not corresponding
0034     to physical reality.  But the generated events should satisfy the
0035     \f$\ell + 4~\mathrm{jets}\f$ mass constraints, and therefore would be
0036     usable for testing.
0037 
0038     @author Scott Stuart Snyder <snyder@bnl.gov>
0039 
0040     @par Creation date:
0041     Jul 2000.
0042 
0043     @par Modification History:
0044     Apr 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>:
0045     Imported to CMSSW.<br>
0046     Nov 2009: Haryo Sumowidagdo <Suharyo.Sumowidagdo@cern.ch>:
0047     Added doxygen tags for automatic generation of documentation.
0048 
0049     @par Terms of Usage:
0050     With consent for the original author (Scott Snyder).
0051 
0052  */
0053 
0054 #include <string>
0055 #include <iosfwd>
0056 
0057 #include "CLHEP/Random/Random.h"
0058 
0059 namespace hitfit {
0060 
0061   class Defaults;
0062   class Lepjets_Event;
0063 
0064   /**
0065     @class Gentop_Args.
0066 
0067     @brief Hold on to parameters for the toy event generator.
0068  */
0069   class Gentop_Args
0070   //
0071   // Hold on to parameters for the toy event generator.
0072   //   float mt           - Generated top mass.
0073   //   float sigma_mt     - Width of top mass distribution.
0074   //
0075   //   float mh           - Generated Higgs mass.
0076   //   float sigma_mh     - Width of Higgs mass distribution.
0077   //
0078   //   float mw           - Generated W mass.
0079   //   float sigma_mw     - Width of W mass distribution.
0080   //
0081   //   float mb           - Generated b mass.
0082   //   float sigma_mb     - Width of b mass distribution.
0083   //
0084   //   float t_pt_mean    - Mean pt of the generated top quarks.
0085   //                        (It will be drawn from an exponential distribution.)
0086   //   float recoil_pt_mean-Mean pt of ttbar system.
0087   //                        (It will be drawn from an exponential distribution.)
0088   //   float boost_sigma  - Width of z-boost of ttbar system.
0089   //   float m_boost      - Mass of z-boost of ttbar system.
0090   //   float sxv_tageff   - Assumed efficiency of SVX b-tag.
0091   //   bool smear         - If true, smear the event.
0092   //   bool smear_dir     - If false, smear only energies, not directions.
0093   //   bool muon          - If false, decay leptonic ts into electrons.
0094   //                        Otherwise, decay into muons.
0095   //   string ele_res_str - Electron resolution, for Vector_Resolution.
0096   //   string muo_res_str - Muon resolution, for Vector_Resolution.
0097   //   string jet_res_str - Jet resolution, for Vector_Resolution.
0098   //   string kt_res_str  - Kt resolution, for Resolution.
0099   //
0100   {
0101   public:
0102     // Constructor.  Initialize from a Defaults object.
0103     /**
0104      @brief Constructor, initialize an instance of Gentop_Args from
0105      an instance of Defaults object.
0106 
0107      @param defs The defaults instance from which to initialize.
0108      The instance must contain the following parameters with types
0109      and names:
0110      - double <i>t_pt_mean</i>.
0111      - double <i>mt</i>.
0112      - double <i>sigma_mt</i>.
0113      - double <i>mh</i>.
0114      - double <i>sigma_mh</i>.
0115      - double <i>recoil_pt_mean</i>.
0116      - double <i>boost_sigma</i>.
0117      - double <i>m_boost</i>.
0118      - double <i>mb</i>.
0119      - double <i>sigma_mb</i>.
0120      - double <i>mw</i>.
0121      - double <i>sigma_mw</i>.
0122      - double <i>svx_tageff</i>.
0123      - bool <i>smear</i>.
0124      - bool <i>smear_dir</i>.
0125      - bool <i>muon</i>.
0126      - string <i>ele_res_str</i>.
0127      - string <i>muo_res_str</i>.
0128      - string <i>jet_res_str</i>.
0129      - string <i>kt_res_str</i>.
0130    */
0131     Gentop_Args(const Defaults& defs);
0132 
0133     // Retrieve parameter values.
0134 
0135     /**
0136      @brief Return the value of <i>t_pt_mean</i> parameter.
0137    */
0138     double t_pt_mean() const;
0139 
0140     /**
0141      @brief Return the value of <i>mt</i> parameter.
0142    */
0143     double mt() const;
0144 
0145     /**
0146      @brief Return the value of <i>sigma_mt</i> parameter.
0147    */
0148     double sigma_mt() const;
0149 
0150     /**
0151      @brief Return the value of <i>mh</i> parameter.
0152    */
0153     double mh() const;
0154 
0155     /**
0156      @brief Return the value of <i>sigma_mh</i> parameter.
0157    */
0158     double sigma_mh() const;
0159 
0160     /**
0161      @brief Return the value of <i>recoil_pt_mean</i> parameter.
0162    */
0163     double recoil_pt_mean() const;
0164 
0165     /**
0166      @brief Return the value of <i>boost_sigma</i> parameter.
0167    */
0168     double boost_sigma() const;
0169 
0170     /**
0171      @brief Return the value of <i>m_boost</i> parameter.
0172    */
0173     double m_boost() const;
0174 
0175     /**
0176      @brief Return the value of <i>mb</i> parameter.
0177    */
0178     double mb() const;
0179 
0180     /**
0181      @brief Return the value of <i>sigma_mb</i> parameter.
0182    */
0183     double sigma_mb() const;
0184 
0185     /**
0186      @brief Return the value of <i>mw</i> parameter.
0187    */
0188     double mw() const;
0189 
0190     /**
0191      @brief Return the value of <i>sigma_mw</i> parameter.
0192    */
0193     double sigma_mw() const;
0194 
0195     /**
0196      @brief Return the value of <i>svx_tageff</i> parameter.
0197    */
0198     double svx_tageff() const;
0199 
0200     /**
0201      @brief Return the value of <i>smear</i> parameter.
0202    */
0203     bool smear() const;
0204 
0205     /**
0206      @brief Return the value of <i>smear_dir</i> parameter.
0207    */
0208     bool smear_dir() const;
0209 
0210     /**
0211      @brief Return the value of <i>muon</i> parameter.
0212    */
0213     bool muon() const;
0214 
0215     /**
0216      @brief Return the value of <i>ele_res_str</i> parameter.
0217    */
0218     std::string ele_res_str() const;
0219 
0220     /**
0221      @brief Return the value of <i>muon_res_str</i> parameter.
0222    */
0223     std::string muo_res_str() const;
0224 
0225     /**
0226      @brief Return the value of <i>jet_res_str</i> parameter.
0227    */
0228     std::string jet_res_str() const;
0229 
0230     /**
0231      @brief Return the value of <i>kt_res_str</i> parameter.
0232    */
0233     std::string kt_res_str() const;
0234 
0235   private:
0236     // Hold on to parameter values.
0237 
0238     /**
0239      Mean transverse momentum \f$p_{T}\f$ of the generated top quarks, in GeV,
0240      drawn from an exponential distribution.
0241    */
0242     double _t_pt_mean;
0243 
0244     /**
0245      Mass of the generated top quark, in GeV.
0246    */
0247     double _mt;
0248 
0249     /**
0250      Width of the generated top quark mass distribution, in GeV.
0251   */
0252     double _sigma_mt;
0253 
0254     /**
0255      Mass of the generated Higgs boson, in GeV.
0256    */
0257     double _mh;
0258 
0259     /**
0260      Width of the generated Higgs boson mass distribution, in GeV.
0261    */
0262     double _sigma_mh;
0263 
0264     /**
0265      Mean transverse momentum \f$p_{T}\f$ of the generated \f$t\bar{t}\f$
0266      system, in GeV, drawn from an exponential distribution.
0267    */
0268     double _recoil_pt_mean;
0269 
0270     /**
0271      Width of the \f$z-\f$boost of the \f$t\bar{t}\f$ system, in GeV.
0272    */
0273     double _boost_sigma;
0274 
0275     /**
0276      Mass of the \f$z-\f$boost of the \f$t\bar{t}\f$ system, in GeV.
0277    */
0278     double _m_boost;
0279 
0280     /**
0281      Mass of the generated <i>b</i> quark, in GeV.
0282    */
0283     double _mb;
0284 
0285     /**
0286      Width of the generated <i>b</i> quark mass distribution, in GeV.
0287    */
0288     double _sigma_mb;
0289 
0290     /**
0291      Mass of the generated <i>W</i> boson, in GeV.
0292    */
0293     double _mw;
0294 
0295     /**
0296      Width of the generated <i>W</i> boson mass, in GeV.
0297    */
0298     double _sigma_mw;
0299 
0300     /**
0301      Assumed efficiency of SVX (Secondary Vertex) b-tagging, for most cases
0302      it is irrelevant.
0303    */
0304     double _svx_tageff;
0305 
0306     /**
0307      If TRUE, smear the event.<br>
0308      If FALSE, don't smear the event.
0309    */
0310     bool _smear;
0311 
0312     /**
0313      If TRUE, smear the energy and direction of individual particles.<br>
0314      If FALSE, only smear the energy of individual particle.
0315    */
0316     bool _smear_dir;
0317 
0318     /**
0319      If TRUE, decay the leptonic top quark into muon.<br>
0320      If FALSE, decay the leptonic top quark into electron.
0321   */
0322     bool _muon;
0323 
0324     /**
0325      Electron resolution information in format suitable for Vector_Resolution.
0326    */
0327     std::string _ele_res_str;
0328 
0329     /**
0330      Muon resolution information in format suitable for Vector_Resolution.
0331    */
0332     std::string _muo_res_str;
0333 
0334     /**
0335      Jet resolution information in format suitable for Vector_Resolution.
0336    */
0337     std::string _jet_res_str;
0338 
0339     /**
0340      \f$k_{T}\f$ resolution information in format suitable for
0341      Vector_Resolution.
0342    */
0343     std::string _kt_res_str;
0344   };
0345 
0346   // Generate a ttbar -> ljets event.
0347   /**
0348     @brief Generate a \f$t\bar{t} \to \ell + 4~\mathrm{jets}\f$ event.
0349 
0350     @param args The parameter settings for this event.
0351 
0352     @param engine The underlying random number generator.
0353  */
0354   Lepjets_Event gentop(const Gentop_Args& args, CLHEP::HepRandomEngine& engine);
0355 
0356   // Generate a ttH -> ljets+bb event.
0357   /**
0358     @brief Generate a \f$t\bar{t}H \to \ell + b\bar{b} + 4~\mathrm{jets}\f$
0359     event.
0360 
0361     @param args The parameter settings for this event.
0362 
0363     @param engine The underlying random number generator.
0364  */
0365   Lepjets_Event gentth(const Gentop_Args& args, CLHEP::HepRandomEngine& engine);
0366 
0367 }  // namespace hitfit