Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-06 09:20:04

0001 
0002 /***********************************************************************
0003 * Copyright 1998-2020 CERN for the benefit of the EvtGen authors       *
0004 *                                                                      *
0005 * This file is part of EvtGen.                                         *
0006 *                                                                      *
0007 * EvtGen is free software: you can redistribute it and/or modify       *
0008 * it under the terms of the GNU General Public License as published by *
0009 * the Free Software Foundation, either version 3 of the License, or    *
0010 * (at your option) any later version.                                  *
0011 *                                                                      *
0012 * EvtGen is distributed in the hope that it will be useful,            *
0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
0015 * GNU General Public License for more details.                         *
0016 *                                                                      *
0017 * You should have received a copy of the GNU General Public License    *
0018 * along with EvtGen.  If not, see <https://www.gnu.org/licenses/>.     *
0019 ***********************************************************************/
0020 
0021 #ifdef EVTGEN_PHOTOS
0022 #ifndef EVTPHOTOSENGINE_HH
0023 #define EVTPHOTOSENGINE_HH
0024 
0025 #include "EvtGenBase/EvtHepMCEvent.hh"
0026 #include "EvtGenBase/EvtId.hh"
0027 #include "EvtGenBase/EvtParticle.hh"
0028 #include "EvtGenBase/EvtVector4R.hh"
0029 
0030 #include "EvtGenModels/EvtAbsExternalGen.hh"
0031 #ifdef EVTGEN_HEPMC3
0032 #include "HepMC3/Units.h"
0033 
0034 #include "Photos/PhotosHepMC3Event.h"
0035 #include "Photos/PhotosHepMC3Particle.h"
0036 #else
0037 #include "Photos/PhotosHepMCEvent.h"
0038 #include "Photos/PhotosHepMCParticle.h"
0039 #include "Photos/PhotosParticle.h"
0040 #endif
0041 
0042 #include <string>
0043 
0044 // Description: Interface to the PHOTOS external generator
0045 
0046 class EvtPhotosEngine : public EvtAbsExternalGen {
0047   public:
0048     EvtPhotosEngine( std::string photonType = "gamma",
0049                      bool useEvtGenRandom = true );
0050 
0051     bool doDecay( EvtParticle* theMother ) override;
0052 
0053     void initialise() override;
0054 
0055   private:
0056     std::string _photonType;
0057     EvtId _gammaId;
0058     int _gammaPDG;
0059     double _mPhoton;
0060     bool _initialised;
0061 
0062     GenParticlePtr createGenParticle( EvtParticle* theParticle, bool incoming );
0063     int getNumberOfPhotons( const GenVertexPtr theVertex ) const;
0064 };
0065 
0066 #endif
0067 
0068 #endif