Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:07:27

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 }  // namespace HepMC
0018 
0019 namespace CLHEP {
0020   class HepRandomEngine;
0021 }
0022 
0023 extern "C" {
0024 //iout,ievent,noutpart,impactpar,outpart,outpx,outpy,outpz,oute,outm,outstat
0025 void crmc_f_(int&, int&, int&, double&, int&, double&, double&, double&, double&, double&, int&);
0026 
0027 //iEvent,iSeed,pproj,ptarg,ipart,itarg,imodel,itab,iout,output,param
0028 void crmc_set_f_(int&, int&, double&, double&, int&, int&, int&, int&, int&, const char*, const char*);
0029 
0030 //iEvent,iSeed,pproj,ptarg,ipart,itarg,imodel,itab,iout,output,param
0031 void crmc_init_f_();
0032 }
0033 
0034 #define nmxhep 99990
0035 
0036 extern "C" {
0037 /*  extern struct
0038   {
0039     int nevhep;
0040     int nhep;
0041 
0042     int isthep[nmxhep];
0043     int idhep[nmxhep];
0044     int jmohep[nmxhep][2];
0045     int jdahep[nmxhep][2];
0046     double phep[nmxhep][5]; 
0047     double vhep[nmxhep][5];
0048   } hepcom_; //epos.inc*/
0049 
0050 extern struct {
0051   float sigtot;  // ........ total cross section
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_;  //epos.inc
0063 
0064 extern struct {
0065   float phievt;  // ........ angle of impact parameter
0066   int nevt;      // ........ error code. 1=valid event, 0=invalid event
0067   float bimevt;  // ........ absolute value of impact parameter
0068   int kolevt;    // ........ number of collisions
0069   int koievt;    // ........ number of inelastic collisions
0070   float pmxevt;  // ........ reference momentum
0071   float egyevt;  // ........ pp cm energy (hadron) or string energy (lepton)
0072   int npjevt;    // ........ number of primary projectile participants
0073   int ntgevt;    // ........ number of primary target participants
0074   int npnevt;    // ........ number of primary projectile neutron spectators
0075   int nppevt;    // ........ number of primary projectile proton spectators
0076   int ntnevt;    // ........ number of primary target neutron spectators
0077   int ntpevt;    // ........ number of primary target proton spectators
0078   int jpnevt;    // ........ number of absolute projectile neutron spectators
0079   int jppevt;    // ........ number of absolute projectile proton spectators
0080   int jtnevt;    // ........ number of absolute target neutron spectators
0081   int jtpevt;    // ........ number of absolute target proton spectators
0082   float xbjevt;  // ........ bjorken x for dis
0083   float qsqevt;  // ........ q**2 for dis
0084   int nglevt;    // ........ number of collisions acc to  Glauber
0085   float zppevt;  // ........ average Z-parton-proj
0086   float zptevt;  // ........ average Z-parton-targ
0087   int minfra;    //
0088   int maxfra;    //
0089   int kohevt;    // ........ number of hard collisions
0090 } cevt_;         //epos.inc
0091 
0092 extern struct {
0093   int ng1evt;    // ........ number of collisions acc to  Glauber
0094   int ng2evt;    // ........ number of Glauber participants with at least two IAs
0095   float rglevt;  // ........
0096   float sglevt;  // ........
0097   float eglevt;  // ........
0098   float fglevt;  // ........
0099   int ikoevt;    // ........ number of elementary parton-parton scatterings
0100   float typevt;  // ........ type of event (1=Non Diff, 2=Double Diff, 3=Single Diff)
0101 } c2evt_;        //epos.inc
0102 
0103 extern struct {
0104   float bmaxim;
0105   float bminim;
0106   float phimax;
0107   float phimin;
0108 } nucl2_;  //epos.inc
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_;  //epos.inc
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_;  //epos.inc
0145 
0146 extern struct {
0147   char fndat[500];
0148   char fnncs[500];
0149   int ifdat;
0150   int ifncs;
0151 } qgsfname_;  //epos-bas.f
0152 
0153 extern struct {
0154   int nfndat;
0155   int nfnncs;
0156 } qgsnfname_;  //epos-bas.f
0157 
0158 extern struct {
0159   char fniidat[500];
0160   char fniincs[500];
0161   int ifiidat;
0162   int ifiincs;
0163 } qgsiifname_;  //epos-bas.f
0164 
0165 extern struct {
0166   int nfniidat;
0167   int nfniincs;
0168 } qgsiinfname_;  //epos-bas.f
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 }  // namespace gen
0229 
0230 #endif  //ifndef REGGEGRIBOVPARTONMCHADRONIZER_H