Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 11:03:57

0001 #ifndef AMPTHadronizer_h
0002 #define AMPTHadronizer_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0006 
0007 #include <map>
0008 #include <string>
0009 #include <vector>
0010 #include <cmath>
0011 
0012 namespace HepMC {
0013   class GenEvent;
0014   class GenParticle;
0015   class GenVertex;
0016 }  // namespace HepMC
0017 
0018 namespace CLHEP {
0019   class HepRandomEngine;
0020 }
0021 
0022 namespace gen {
0023 
0024   extern "C" {
0025   float ranart_(int*);
0026   }
0027 
0028   extern "C" {
0029   float ran1_(int*);
0030   }
0031 
0032   class AMPTHadronizer : public BaseHadronizer {
0033   public:
0034     AMPTHadronizer(const edm::ParameterSet&);
0035     ~AMPTHadronizer() override;
0036 
0037     bool generatePartonsAndHadronize();
0038     bool hadronize();
0039     bool decay();
0040     bool residualDecay();
0041     bool readSettings(int) { return true; }
0042     bool initializeForExternalPartons();
0043     bool initializeForInternalPartons();
0044     bool declareStableParticles(const std::vector<int>&);
0045     bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0046 
0047     void finalizeEvent();
0048     void statistics();
0049     const char* classname() const;
0050 
0051   private:
0052     void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0053 
0054     void add_heavy_ion_rec(HepMC::GenEvent* evt);
0055     HepMC::GenParticle* build_ampt(int index, int barcode);
0056     HepMC::GenVertex* build_ampt_vertex(int i, int id);
0057     bool get_particles(HepMC::GenEvent* evt);
0058     bool ampt_init(const edm::ParameterSet& pset);
0059     bool call_amptset(
0060         double efrm, std::string frame, std::string proj, std::string targ, int iap, int izp, int iat, int izt);
0061     //    inline double                 nuclear_radius() const;
0062     void rotateEvtPlane();
0063 
0064     HepMC::GenEvent* evt;
0065     edm::ParameterSet pset_;
0066     double bmax_;  // max impact param;
0067                    // units of nucl radius
0068     double bmin_;  // min impact param;
0069                    // units of nucl radius
0070     double efrm_;  // collision energy
0071     std::string frame_;
0072     std::string proj_;
0073     std::string targ_;
0074     int iap_;
0075     int izp_;
0076     int iat_;
0077     int izt_;
0078     int amptmode_;
0079     int ntmax_;
0080     double dt_;
0081     double stringFragA_;
0082     double stringFragB_;
0083     bool popcornmode_;
0084     double popcornpar_;
0085     bool shadowingmode_;
0086     bool quenchingmode_;
0087     double quenchingpar_;
0088     double pthard_;
0089     double mu_;
0090     int izpc_;
0091     double alpha_;
0092     double dpcoal_;
0093     double drcoal_;
0094     bool ks0decay_;
0095     bool phidecay_;
0096     int deuteronmode_;
0097     int deuteronfactor_;
0098     int deuteronxsec_;
0099     double minijetpt_;
0100     int maxmiss_;
0101     int doInitialAndFinalRadiation_;
0102     int ktkick_;
0103     int diquarkembedding_;
0104     double diquarkpx_;
0105     double diquarkpy_;
0106     double diquarkx_;
0107     double diquarky_;
0108     int nsembd_;
0109     double psembd_;
0110     double tmaxembd_;
0111     bool shadowingmodflag_;
0112     double shadowingfactor_;
0113     double phi0_;  // Event plane angle
0114     double sinphi0_;
0115     double cosphi0_;
0116     bool rotate_;  // Switch to rotate event plane
0117   };
0118 }  // namespace gen
0119 
0120 #endif