File indexing completed on 2024-04-06 12:13:59
0001 #ifndef REGGEGRIBOVPARTONMCHADRONIZER_H
0002 #define REGGEGRIBOVPARTONMCHADRONIZER_H
0003
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "GeneratorInterface/Core/interface/BaseHadronizer.h"
0006 #include "FWCore/ParameterSet/interface/FileInPath.h"
0007
0008 #include <map>
0009 #include <string>
0010 #include <vector>
0011 #include <cmath>
0012
0013 namespace HepMC {
0014 class GenEvent;
0015 class GenParticle;
0016 class GenVertex;
0017 }
0018
0019 namespace CLHEP {
0020 class HepRandomEngine;
0021 }
0022
0023 extern "C" {
0024
0025 void crmc_f_(int&, int&, int&, double&, int&, double&, double&, double&, double&, double&, int&);
0026
0027
0028 void crmc_set_f_(int&, int&, double&, double&, int&, int&, int&, int&, int&, const char*, const char*);
0029
0030
0031 void crmc_init_f_();
0032 }
0033
0034 #define nmxhep 99990
0035
0036 extern "C" {
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050 extern struct {
0051 float sigtot;
0052 float sigcut;
0053 float sigela;
0054 float sloela;
0055 float sigsd;
0056 float sigine;
0057 float sigdif;
0058 float sigineaa;
0059 float sigtotaa;
0060 float sigelaaa;
0061 float sigcutaa;
0062 } hadr5_;
0063
0064 extern struct {
0065 float phievt;
0066 int nevt;
0067 float bimevt;
0068 int kolevt;
0069 int koievt;
0070 float pmxevt;
0071 float egyevt;
0072 int npjevt;
0073 int ntgevt;
0074 int npnevt;
0075 int nppevt;
0076 int ntnevt;
0077 int ntpevt;
0078 int jpnevt;
0079 int jppevt;
0080 int jtnevt;
0081 int jtpevt;
0082 float xbjevt;
0083 float qsqevt;
0084 int nglevt;
0085 float zppevt;
0086 float zptevt;
0087 int minfra;
0088 int maxfra;
0089 int kohevt;
0090 } cevt_;
0091
0092 extern struct {
0093 int ng1evt;
0094 int ng2evt;
0095 float rglevt;
0096 float sglevt;
0097 float eglevt;
0098 float fglevt;
0099 int ikoevt;
0100 float typevt;
0101 } c2evt_;
0102
0103 extern struct {
0104 float bmaxim;
0105 float bminim;
0106 float phimax;
0107 float phimin;
0108 } nucl2_;
0109 }
0110
0111 extern "C" {
0112 extern struct {
0113 char fnch[500];
0114 char fnhi[500];
0115 char fndt[500];
0116 char fnii[500];
0117 char fnid[500];
0118 char fnie[500];
0119 char fnrj[500];
0120 char fnmt[500];
0121 char fngrv[500];
0122 char fncp[500];
0123 char fnnx[500];
0124 char fncs[500];
0125 char fndr[500];
0126 char fnhpf[500];
0127 } fname_;
0128
0129 extern struct {
0130 int nfnch;
0131 int nfnhi;
0132 int nfndt;
0133 int nfnii;
0134 int nfnid;
0135 int nfnie;
0136 int nfnrj;
0137 int nfnmt;
0138 int nfngrv;
0139 int nfncp;
0140 int nfnnx;
0141 int nfncs;
0142 int nfndr;
0143 int nfnhpf;
0144 } nfname_;
0145
0146 extern struct {
0147 char fndat[500];
0148 char fnncs[500];
0149 int ifdat;
0150 int ifncs;
0151 } qgsfname_;
0152
0153 extern struct {
0154 int nfndat;
0155 int nfnncs;
0156 } qgsnfname_;
0157
0158 extern struct {
0159 char fniidat[500];
0160 char fniincs[500];
0161 int ifiidat;
0162 int ifiincs;
0163 } qgsiifname_;
0164
0165 extern struct {
0166 int nfniidat;
0167 int nfniincs;
0168 } qgsiinfname_;
0169 }
0170
0171 namespace gen {
0172 extern "C" {
0173 float rangen_();
0174 }
0175
0176 extern "C" {
0177 double drangen_(int*);
0178 }
0179
0180 class ReggeGribovPartonMCHadronizer : public BaseHadronizer {
0181 public:
0182 ReggeGribovPartonMCHadronizer(const edm::ParameterSet&);
0183 ~ReggeGribovPartonMCHadronizer() override;
0184
0185 bool generatePartonsAndHadronize();
0186 bool hadronize();
0187 bool decay();
0188 bool residualDecay();
0189 bool readSettings(int) { return true; }
0190 bool initializeForExternalPartons() { return true; }
0191 bool initializeForInternalPartons();
0192 bool declareStableParticles(const std::vector<int>&);
0193 bool declareSpecialSettings(const std::vector<std::string>&) { return true; }
0194 bool initializeTablePaths();
0195
0196 void finalizeEvent();
0197 void statistics();
0198 const char* classname() const;
0199
0200 private:
0201 void doSetRandomEngine(CLHEP::HepRandomEngine* v) override;
0202
0203 edm::ParameterSet pset_;
0204 double m_BeamMomentum;
0205 double m_TargetMomentum;
0206 int m_BeamID;
0207 int m_TargetID;
0208 int m_HEModel;
0209 double m_bMin;
0210 double m_bMax;
0211 edm::FileInPath m_ParamFileName;
0212 bool m_SkipNuclFrag;
0213 int m_NEvent;
0214
0215 int m_NParticles;
0216 double m_ImpactParameter;
0217 int m_PartID[nmxhep];
0218 double m_PartPx[nmxhep];
0219 double m_PartPy[nmxhep];
0220 double m_PartPz[nmxhep];
0221 double m_PartEnergy[nmxhep];
0222 double m_PartMass[nmxhep];
0223 int m_PartStatus[nmxhep];
0224
0225 bool m_IsInitialized;
0226 };
0227
0228 }
0229
0230 #endif