Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-05-02 05:09:38

0001 #ifndef FASTSIM_DECAYER_H
0002 #define FASTSIM_DECAYER_H
0003 
0004 #include <memory>
0005 #include <vector>
0006 
0007 ///////////////////////////////////////////////
0008 // Author: L. Vanelderen
0009 // Date: 13 May 2014
0010 //
0011 // Revision: Class structure modified to match SimplifiedGeometryPropagator
0012 //           S. Kurz, 29 May 2017
0013 //////////////////////////////////////////////////////////
0014 
0015 namespace gen {
0016   class P8RndmEngine;
0017   typedef std::shared_ptr<P8RndmEngine> P8RndmEnginePtr;
0018 }  // namespace gen
0019 
0020 namespace CLHEP {
0021   class HepRandomEngine;
0022 }
0023 
0024 namespace Pythia8 {
0025   class Pythia;
0026 }
0027 
0028 namespace fastsim {
0029   class Particle;
0030 
0031   //! Implementation of non-stable particle decays.
0032   /*!
0033         Inspired by method Pythia8Hadronizer::residualDecay() in GeneratorInterface/Pythia8Interface/src/Py8GunBase.cc
0034     */
0035   class Decayer {
0036   public:
0037     //! Default Constructor.
0038     Decayer();
0039 
0040     //! Default destructor.
0041     ~Decayer();
0042 
0043     //! Decay particle using pythia.
0044     /*!
0045             \param particle The particle that should be decayed.
0046             \param secondaries The decay products.
0047             \param engine The Random Engine.
0048         */
0049     void decay(const Particle& particle,
0050                std::vector<std::unique_ptr<Particle> >& secondaries,
0051                CLHEP::HepRandomEngine& engine) const;
0052 
0053   private:
0054     std::unique_ptr<Pythia8::Pythia> pythia_;  //!< Instance of pythia
0055     gen::P8RndmEnginePtr pythiaRandomEngine_;  //!< Instance of pythia Random Engine
0056   };
0057 }  // namespace fastsim
0058 #endif