CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ReggeGribovPartonMCHadronizer.h
Go to the documentation of this file.
1 #ifndef REGGEGRIBOVPARTONMCHADRONIZER_H
2 #define REGGEGRIBOVPARTONMCHADRONIZER_H
3 
7 
8 #include "CLHEP/Random/RandomEngine.h"
9 #include "CLHEP/Random/RandFlat.h"
10 
11 #include "boost/scoped_ptr.hpp"
12 
13 #include <map>
14 #include <string>
15 #include <vector>
16 #include <math.h>
17 
18 boost::scoped_ptr<CLHEP::RandFlat> gFlatDistribution_; // yes, this must be global...
19 
20 namespace HepMC {
21  class GenEvent;
22  class GenParticle;
23  class GenVertex;
24 }
25 
26 extern "C"
27 {
28  //iout,ievent,noutpart,impactpar,outpart,outpx,outpy,outpz,oute,outm,outstat
29  void crmc_f_(int&, int&, int&, double&, int&, double&, double&, double&,
30  double&, double&, int&);
31 
32  //iEvent,iSeed,pproj,ptarg,ipart,itarg,imodel,itab,iout,output,param
33  void crmc_set_f_(int&, int&, double&, double&, int&, int&, int&, int&,
34  int&, const char*, const char*);
35 
36  //iEvent,iSeed,pproj,ptarg,ipart,itarg,imodel,itab,iout,output,param
37  void crmc_init_f_();
38 }
39 
40 #define nmxhep 99990
41 
42 extern "C"
43 {
44 /* extern struct
45  {
46  int nevhep;
47  int nhep;
48 
49  int isthep[nmxhep];
50  int idhep[nmxhep];
51  int jmohep[nmxhep][2];
52  int jdahep[nmxhep][2];
53  double phep[nmxhep][5];
54  double vhep[nmxhep][5];
55  } hepcom_; //epos.inc*/
56 
57  extern struct
58  {
59  float sigtot; // ........ total cross section
60  float sigcut;
61  float sigela;
62  float sloela;
63  float sigsd;
64  float sigine;
65  float sigdif;
66  float sigineaa;
67  float sigtotaa;
68  float sigelaaa;
69  float sigcutaa;
70  } hadr5_; //epos.inc
71 
72  extern struct
73  {
74  float phievt; // ........ angle of impact parameter
75  int nevt; // ........ error code. 1=valid event, 0=invalid event
76  float bimevt; // ........ absolute value of impact parameter
77  int kolevt; // ........ number of collisions
78  int koievt; // ........ number of inelastic collisions
79  float pmxevt; // ........ reference momentum
80  float egyevt; // ........ pp cm energy (hadron) or string energy (lepton)
81  int npjevt; // ........ number of primary projectile participants
82  int ntgevt; // ........ number of primary target participants
83  int npnevt; // ........ number of primary projectile neutron spectators
84  int nppevt; // ........ number of primary projectile proton spectators
85  int ntnevt; // ........ number of primary target neutron spectators
86  int ntpevt; // ........ number of primary target proton spectators
87  int jpnevt; // ........ number of absolute projectile neutron spectators
88  int jppevt; // ........ number of absolute projectile proton spectators
89  int jtnevt; // ........ number of absolute target neutron spectators
90  int jtpevt; // ........ number of absolute target proton spectators
91  float xbjevt; // ........ bjorken x for dis
92  float qsqevt; // ........ q**2 for dis
93  int nglevt; // ........ number of collisions acc to Glauber
94  float zppevt; // ........ average Z-parton-proj
95  float zptevt; // ........ average Z-parton-targ
96  int minfra; //
97  int maxfra; //
98  int kohevt; // ........ number of hard collisions
99  } cevt_; //epos.inc
100 
101  extern struct
102  {
103  int ng1evt; // ........ number of collisions acc to Glauber
104  int ng2evt; // ........ number of Glauber participants with at least two IAs
105  float rglevt; // ........
106  float sglevt; // ........
107  float eglevt; // ........
108  float fglevt; // ........
109  int ikoevt; // ........ number of elementary parton-parton scatterings
110  float typevt; // ........ type of event (1=Non Diff, 2=Double Diff, 3=Single Diff)
111  } c2evt_; //epos.inc
112 
113  extern struct
114  {
115  float bmaxim;
116  float bminim;
117  float phimax;
118  float phimin;
119  } nucl2_; //epos.inc
120 }
121 
122 
123 extern "C"
124 {
125  extern struct
126  {
127  char fnch[500];
128  char fnhi[500];
129  char fndt[500];
130  char fnii[500];
131  char fnid[500];
132  char fnie[500];
133  char fnrj[500];
134  char fnmt[500];
135  char fngrv[500];
136  char fncp[500];
137  char fnnx[500];
138  char fncs[500];
139  char fndr[500];
140  char fnhpf[500];
141  } fname_; //epos.inc
142 
143  extern struct
144  {
145  int nfnch;
146  int nfnhi;
147  int nfndt;
148  int nfnii;
149  int nfnid;
150  int nfnie;
151  int nfnrj;
152  int nfnmt;
153  int nfngrv;
154  int nfncp;
155  int nfnnx;
156  int nfncs;
157  int nfndr;
158  int nfnhpf;
159  } nfname_; //epos.inc
160 
161  extern struct
162  {
163  char fndat[500];
164  char fnncs[500];
165  int ifdat;
166  int ifncs;
167  } qgsfname_; //epos-bas.f
168 
169  extern struct
170  {
171  int nfndat;
172  int nfnncs;
173  } qgsnfname_; //epos-bas.f
174 
175  extern struct
176  {
177  char fniidat[500];
178  char fniincs[500];
179  int ifiidat;
180  int ifiincs;
181  } qgsiifname_; //epos-bas.f
182 
183  extern struct
184  {
185  int nfniidat;
186  int nfniincs;
187  } qgsiinfname_; //epos-bas.f
188 }
189 
190 namespace gen
191 {
192  extern "C" {
193  float rangen_();
194  }
195 
196  extern "C" {
197  double drangen_(int*);
198  }
199 
200 
201  class ReggeGribovPartonMCHadronizer : public BaseHadronizer
202  {
203 
204  public:
207 
209  bool hadronize();
210  bool decay();
211  bool residualDecay();
212  bool readSettings( int ) { return true; }
213  bool initializeForExternalPartons() { return true; }
215  bool declareStableParticles( const std::vector<int> );
216  bool declareSpecialSettings( const std::vector<std::string> ) { return true; }
217  bool initializeTablePaths();
218 
219  void finalizeEvent();
220  void statistics();
221  const char* classname() const;
222 
223  private:
227  int m_BeamID;
230  double m_bMin;
231  double m_bMax;
234  int m_NEvent;
235 
239  double m_PartPx[nmxhep];
240  double m_PartPy[nmxhep];
241  double m_PartPz[nmxhep];
245  };
246 
247 } /*end namespace*/
248 
249 #endif //ifndef REGGEGRIBOVPARTONMCHADRONIZER_H
struct @474 qgsfname_
char fnii[500]
char fnmt[500]
struct @476 qgsiifname_
struct @477 qgsiinfname_
void crmc_f_(int &, int &, int &, double &, int &, double &, double &, double &, double &, double &, int &)
char fnncs[500]
char fnrj[500]
char fncp[500]
char fnid[500]
boost::scoped_ptr< CLHEP::RandFlat > gFlatDistribution_
void crmc_init_f_()
struct @475 qgsnfname_
char fniidat[500]
char fnhpf[500]
struct @468 hadr5_
char fncs[500]
char fnch[500]
char fniincs[500]
struct @471 nucl2_
double drangen_(int *)
char fndat[500]
struct @469 cevt_
struct @473 nfname_
char fnnx[500]
char fndt[500]
struct @470 c2evt_
struct @472 fname_
char fnie[500]
bool declareSpecialSettings(const std::vector< std::string >)
char fndr[500]
void crmc_set_f_(int &, int &, double &, double &, int &, int &, int &, int &, int &, const char *, const char *)
char fnhi[500]
ReggeGribovPartonMCHadronizer(const edm::ParameterSet &)
bool declareStableParticles(const std::vector< int >)
char fngrv[500]