]> git.uio.no Git - u/mrichter/AliRoot.git/blame - THerwig/THerwig6.cxx
FMD module
[u/mrichter/AliRoot.git] / THerwig / THerwig6.cxx
CommitLineData
2d8d4543 1// definition of c++ Class THerwig6 to be used in ROOT
2// this is a c++ interface to the F77 Herwig6 program
3// author: j. g. contreras jgcn@moni.mda.cinvestav.mx
4// date: december 22, 2000
884ccf6a 5// Class THerwig6 is an interface to the Herwig program
6//
7// C-----------------------------------------------------------------------
8// C H E R W I G
9// C
10// C a Monte Carlo event generator for simulating
11// C +---------------------------------------------------+
12// C | Hadron Emission Reactions With Interfering Gluons |
13// C +---------------------------------------------------+
14// C I.G. Knowles(*), G. Marchesini(+), M.H. Seymour($) and B.R. Webber(#)
15// C-----------------------------------------------------------------------
16// C with Minimal Supersymmetric Standard Model Matrix Elements by
17// C S. Moretti($) and K. Odagiri($)
18// C-----------------------------------------------------------------------
19// C R parity violating Supersymmetric Decays and Matrix Elements by
20// C P. Richardson(&)
21// C-----------------------------------------------------------------------
22// C matrix element corrections to top decay and Drell-Yan type processes
23// C by G. Corcella(+)
24// C-----------------------------------------------------------------------
25// C Deep Inelastic Scattering and Heavy Flavour Electroproduction by
26// C G. Abbiendi(@) and L. Stanco(%)
27// C-----------------------------------------------------------------------
28// C and Jet Photoproduction in Lepton-Hadron Collisions by J. Chyla(~)
29// C-----------------------------------------------------------------------
30// C(*) Department of Physics & Astronomy, University of Edinburgh
31// C(+) Dipartimento di Fisica, Universita di Milano
32// C($) Rutherford Appleton Laboratory
33// C(#) Cavendish Laboratory, Cambridge
34// C(&) Department of Physics, University of Oxford
35// C(@) Dipartimento di Fisica, Universita di Bologna
36// C(%) Dipartimento di Fisica, Universita di Padova
37// C(~) Institute of Physics, Prague
38// C-----------------------------------------------------------------------
39// C Version 6.100 - 16th December 1999
40// C-----------------------------------------------------------------------
41// C Main reference:
42// C G.Marchesini, B.R.Webber, G.Abbiendi, I.G.Knowles, M.H.Seymour,
43// C and L.Stanco, Computer Physics Communications 67 (1992) 465.
44// C-----------------------------------------------------------------------
45// C Please send e-mail about this program to one of the authors at the
46// C following Internet addresses:
47// C I.Knowles@ed.ac.uk Giuseppe.Marchesini@mi.infn.it
48// C M.Seymour@rl.ac.uk webber@hep.phy.cam.ac.uk
49// C-----------------------------------------------------------------------
50
2d8d4543 51
2d8d4543 52#include "THerwig6.h"
455f128d 53#include "HCommon.h"
2d8d4543 54#include "TClonesArray.h"
55#include "TParticle.h"
884ccf6a 56#include "TObjArray.h"
616d81ca 57#include "Riostream.h"
2d8d4543 58
59
c64cb1f6 60using std::cout;
61using std::endl;
62
2d8d4543 63ClassImp(THerwig6)
64
65extern "C" {
2d8d4543 66 void herwig6_open_fortran_file_ (int* lun, char* name, int);
67 void herwig6_close_fortran_file_(int* lun);
68}
69
616d81ca 70THerwig6 *THerwig6::fgInstance = 0;
2d8d4543 71
455f128d 72THerwig6::THerwig6() : TGenerator("Herwig6","Herwig6")
2d654757 73{
2d8d4543 74
75// THerwig6 constructor: creates a TClonesArray in which it will store all
76// particles. Note that there may be only one functional THerwig6 object
77// at a time, so it's not use to create more than one instance of it.
78
79 delete fParticles; // was allocated as TObjArray in TGenerator
2d8d4543 80 fParticles = new TClonesArray("TParticle",50);
81
82 // initialize common-blocks
616d81ca 83
84 if (fgInstance)
85 cout << "WARNING: creating second instance of THerwig6" << endl;
86 fgInstance = this;
2d8d4543 87 }
88
455f128d 89THerwig6::THerwig6(const THerwig6 & source): TGenerator(source)
2d654757 90{
91 Fatal("THerwig6","Copy constructor not implemented yet");
92}
2d8d4543 93//------------------------------------------------------------------------------
94 THerwig6::~THerwig6()
95 {
bbc19b09 96 // Destructor. The data members of TGenerator are delete by itself
616d81ca 97 fgInstance = 0;
2d8d4543 98 }
99
616d81ca 100//------------------------------------------------------------------------------
101THerwig6 *THerwig6::Instance()
102 {
103 return fgInstance ? fgInstance : new THerwig6;
104 }
2d8d4543 105//______________________________________________________________________________
7677b281 106void THerwig6::GenerateEvent()
2d8d4543 107{
7677b281 108
2d8d4543 109 //initialize event
110 hwuine_();
111 // generate hard subprocess
112 hwepro_();
113 // generate parton cascades
114 hwbgen_();
115 // do heavy objects decay
116 hwdhob_();
117 // do cluster formation
118 hwcfor_();
119 // do cluster decays
120 hwcdec_();
121 // do unstable particle decays
122 hwdhad_();
123 // do heavy flavor hadrons decay
124 hwdhvy_();
125 // add soft underlying event
126 hwmevt_();
127 // finish event
128 hwufne_();
129}
2d8d4543 130//______________________________________________________________________________
131void THerwig6::OpenFortranFile(int lun, char* name) {
132 herwig6_open_fortran_file_(&lun, name, strlen(name));
133}
134
135//______________________________________________________________________________
136void THerwig6::CloseFortranFile(int lun) {
137 herwig6_close_fortran_file_(&lun);
138}
139
140void THerwig6::Initialize(const char *beam, const char *target, double pbeam1, double pbeam2, int iproc)
141
142{
143 // perform the initialization for Herwig6
7677b281 144 // sets correct title.
2d8d4543 145 // after calling this method all parameters are set to their default
146 // values. If you want to modify any parameter you have to set the new
147 // value after calling Initialize and before PrepareRun.
148
28216c85 149 char cbeam[9];
150 strncpy(cbeam,beam, 8);
151 char ctarget[9];
152 strncpy(ctarget,target, 8);
2d8d4543 153 printf("\n Initializing Herwig !! \n");
154 if ( (!strncmp(beam, "E+" ,2)) &&
155 (!strncmp(beam, "E-" ,2)) &&
156 (!strncmp(beam, "MU+" ,3)) &&
157 (!strncmp(beam, "MU-" ,3)) &&
158 (!strncmp(beam, "NUE" ,3)) &&
159 (!strncmp(beam, "NUEB" ,4)) &&
160 (!strncmp(beam, "NUMU" ,4)) &&
161 (!strncmp(beam, "NMUB" ,4)) &&
162 (!strncmp(beam, "NTAU" ,4)) &&
163 (!strncmp(beam, "NTAB" ,4)) &&
164 (!strncmp(beam, "GAMA" ,4)) &&
165 (!strncmp(beam, "P ",8)) &&
166 (!strncmp(beam, "PBAR ",8)) &&
167 (!strncmp(beam, "N" ,1)) &&
168 (!strncmp(beam, "NBAR" ,4)) &&
169 (!strncmp(beam, "PI+" ,3)) &&
170 (!strncmp(beam, "PI-" ,3)) ) {
171 printf("WARNING! In THerwig6:Initialize():\n");
172 printf(" specified beam=%s is unrecognized .\n",beam);
173 printf(" resetting to \"P\" .");
171abbda 174 snprintf(cbeam, 8, "P");
2d8d4543 175 }
176
177 if ( (!strncmp(target, "E+" ,2)) &&
178 (!strncmp(target, "E-" ,2)) &&
179 (!strncmp(target, "MU+" ,3)) &&
180 (!strncmp(target, "MU-" ,3)) &&
181 (!strncmp(target, "NUE" ,3)) &&
182 (!strncmp(target, "NUEB" ,4)) &&
183 (!strncmp(target, "NUMU" ,4)) &&
184 (!strncmp(target, "NMUB" ,4)) &&
185 (!strncmp(target, "NTAU" ,4)) &&
186 (!strncmp(target, "NTAB" ,4)) &&
187 (!strncmp(target, "GAMA" ,4)) &&
188 (!strncmp(target, "P ",8)) &&
189 (!strncmp(target, "PBAR ",8)) &&
190 (!strncmp(target, "N" ,1)) &&
191 (!strncmp(target, "NBAR" ,4)) &&
192 (!strncmp(target, "PI+" ,3)) &&
193 (!strncmp(target, "PI-" ,3)) ) {
194 printf("WARNING! In THerwig6:Initialize():\n");
195 printf(" specified target=%s is unrecognized .\n",target);
196 printf(" resetting to \"P\" .");
171abbda 197 snprintf(ctarget,8, "P");
2d8d4543 198 }
199
200 // initialization:
201 // type of beams
4579e8dc 202 memcpy(HWBMCH.PART1,beam, 8);
203 memcpy(HWBMCH.PART2,target, 8);
2d8d4543 204 // momentum of beams
455f128d 205 HWPROC.PBEAM1=pbeam1;
206 HWPROC.PBEAM2=pbeam2;
2d8d4543 207 // process to generate
455f128d 208 HWPROC.IPROC=iproc;
7677b281 209 // not used in the class definition
455f128d 210 HWPROC.MAXEV=1;
73096b8c 211
2d8d4543 212 // reset all parameters
213 hwigin_();
7677b281 214
2d8d4543 215 // set correct title
73096b8c 216 //char atitle[132];
2d8d4543 217 double win=pbeam1+pbeam2;
73096b8c 218 printf("\n %s - %s at %g GeV \n",beam,target,win);
219 //sprintf(atitle,"%s-%s at %g GeV",cbeam,ctarget,win);
220 //SetTitle(atitle);
7677b281 221}
222
223void THerwig6::InitializeJimmy(const char *beam, const char *target, double pbeam1, double pbeam2, int iproc)
224
225{
226 // perform the initialization for Herwig6
227 // sets correct title.
228 // after calling this method all parameters are set to their default
229 // values. If you want to modify any parameter you have to set the new
230 // value after calling Initialize and before PrepareRun.
231
28216c85 232 char cbeam[9];
7677b281 233 strncpy(cbeam,beam,8);
28216c85 234 char ctarget[9];
7677b281 235 strncpy(ctarget,target,8);
236 printf("\n Initializing Herwig !! \n");
237 if ( (!strncmp(beam, "E+" ,2)) &&
238 (!strncmp(beam, "E-" ,2)) &&
239 (!strncmp(beam, "MU+" ,3)) &&
240 (!strncmp(beam, "MU-" ,3)) &&
241 (!strncmp(beam, "NUE" ,3)) &&
242 (!strncmp(beam, "NUEB" ,4)) &&
243 (!strncmp(beam, "NUMU" ,4)) &&
244 (!strncmp(beam, "NMUB" ,4)) &&
245 (!strncmp(beam, "NTAU" ,4)) &&
246 (!strncmp(beam, "NTAB" ,4)) &&
247 (!strncmp(beam, "GAMA" ,4)) &&
248 (!strncmp(beam, "P ",8)) &&
249 (!strncmp(beam, "PBAR ",8)) &&
250 (!strncmp(beam, "N" ,1)) &&
251 (!strncmp(beam, "NBAR" ,4)) &&
252 (!strncmp(beam, "PI+" ,3)) &&
253 (!strncmp(beam, "PI-" ,3)) ) {
254 printf("WARNING! In THerwig6:Initialize():\n");
255 printf(" specified beam=%s is unrecognized .\n",beam);
256 printf(" resetting to \"P\" .");
ed9d61d8 257 snprintf(cbeam, 8, "P");
7677b281 258 }
259
260 if ( (!strncmp(target, "E+" ,2)) &&
261 (!strncmp(target, "E-" ,2)) &&
262 (!strncmp(target, "MU+" ,3)) &&
263 (!strncmp(target, "MU-" ,3)) &&
264 (!strncmp(target, "NUE" ,3)) &&
265 (!strncmp(target, "NUEB" ,4)) &&
266 (!strncmp(target, "NUMU" ,4)) &&
267 (!strncmp(target, "NMUB" ,4)) &&
268 (!strncmp(target, "NTAU" ,4)) &&
269 (!strncmp(target, "NTAB" ,4)) &&
270 (!strncmp(target, "GAMA" ,4)) &&
271 (!strncmp(target, "P ",8)) &&
272 (!strncmp(target, "PBAR ",8)) &&
273 (!strncmp(target, "N" ,1)) &&
274 (!strncmp(target, "NBAR" ,4)) &&
275 (!strncmp(target, "PI+" ,3)) &&
276 (!strncmp(target, "PI-" ,3)) ) {
277 printf("WARNING! In THerwig6:Initialize():\n");
278 printf(" specified target=%s is unrecognized .\n",target);
279 printf(" resetting to \"P\" .");
ed9d61d8 280 snprintf(ctarget, 8, "P");
7677b281 281 }
282
283 // initialization:
284 // type of beams
4579e8dc 285 memcpy(HWBMCH.PART1,beam,8);
286 memcpy(HWBMCH.PART2,target,8);
7677b281 287 // momentum of beams
455f128d 288 HWPROC.PBEAM1=pbeam1;
289 HWPROC.PBEAM2=pbeam2;
7677b281 290 // process to generate
455f128d 291 HWPROC.IPROC=iproc;
7677b281 292 // not used in the class definition
455f128d 293 HWPROC.MAXEV=1;
7677b281 294
295 // reset all parameters
296 hwigin_();
297 // JIMMY initialization
298 jimmin_();
299
300 // set correct title
4936c799 301// char atitle[132];
7677b281 302 double win=pbeam1+pbeam2;
303 printf("\n %s - %s at %g GeV",beam,target,win);
73096b8c 304// sprintf(atitle,"%s-%s at %g GeV",cbeam,ctarget,win);
305// SetTitle(atitle);
2d8d4543 306}
307
308void THerwig6::PrepareRun()
309{
310 // compute parameter dependent constants
311 hwuinc_();
312 // initialize elementary processes
313 hweini_();
314}
315
7677b281 316void THerwig6::PrepareRunJimmy()
317{
318 // compute parameter dependent constants
319 hwuinc_();
320 // initialize elementary processes
321 hweini_();
322 // more initializations for JIMMY
323 jminit_();
324}
2d8d4543 325//______________________________________________________________________________
326TObjArray* THerwig6::ImportParticles(Option_t *option)
327{
328//
329// Default primary creation method. It reads the /HEPEVT/ common block which
330// has been filled by the GenerateEvent method. If the event generator does
331// not use the HEPEVT common block, This routine has to be overloaded by
332// the subclasses.
333// The default action is to store only the stable particles (ISTHEP = 1)
334// This can be demanded explicitly by setting the option = "Final"
335// If the option = "All", all the particles are stored.
336//
337 fParticles->Clear();
455f128d 338 Int_t numpart = HEPEVT.NHEP;
2d8d4543 339 TClonesArray &a = *((TClonesArray*)fParticles);
340 if (!strcmp(option,"") || !strcmp(option,"Final")) {
d1e3482a 341 for (Int_t i = 0; i < numpart; i++) {
455f128d 342 if (HEPEVT.ISTHEP[i] == 1) {
2d8d4543 343//
344// Use the common block values for the TParticle constructor
345//
346 new(a[i]) TParticle(
455f128d 347 HEPEVT.IDHEP[i],
348 HEPEVT.ISTHEP[i],
349 HEPEVT.JMOHEP[i][0]-1,
350 HEPEVT.JMOHEP[i][1]-1,
351 HEPEVT.JDAHEP[i][0]-1,
352 HEPEVT.JDAHEP[i][1]-1,
353
354 HEPEVT.PHEP[i][0],
355 HEPEVT.PHEP[i][1],
356 HEPEVT.PHEP[i][2],
357 HEPEVT.PHEP[i][3],
358 HEPEVT.VHEP[i][0],
359 HEPEVT.VHEP[i][1],
360 HEPEVT.VHEP[i][2],
361 HEPEVT.VHEP[i][3]);
2d8d4543 362 }
363 }
364 }
365 else if (!strcmp(option,"All")) {
d1e3482a 366 for (Int_t i = 0; i < numpart; i++) {
2d8d4543 367 new(a[i]) TParticle(
455f128d 368 HEPEVT.IDHEP[i],
369 HEPEVT.ISTHEP[i],
370 HEPEVT.JMOHEP[i][0]-1,
371 HEPEVT.JMOHEP[i][1]-1,
372 HEPEVT.JDAHEP[i][0]-1,
373 HEPEVT.JDAHEP[i][1]-1,
374
375 HEPEVT.PHEP[i][0],
376 HEPEVT.PHEP[i][1],
377 HEPEVT.PHEP[i][2],
378 HEPEVT.PHEP[i][3],
379 HEPEVT.VHEP[i][0],
380 HEPEVT.VHEP[i][1],
381 HEPEVT.VHEP[i][2],
382 HEPEVT.VHEP[i][3]);
2d8d4543 383 }
384 }
385 return fParticles;
386}
387
388//______________________________________________________________________________
389Int_t THerwig6::ImportParticles(TClonesArray *particles, Option_t *option)
390{
391//
392// Default primary creation method. It reads the /HEPEVT/ common block which
393// has been filled by the GenerateEvent method. If the event generator does
394// not use the HEPEVT common block, This routine has to be overloaded by
395// the subclasses.
396// The function loops on the generated particles and store them in
397// the TClonesArray pointed by the argument particles.
398// The default action is to store only the stable particles (ISTHEP = 1)
399// This can be demanded explicitly by setting the option = "Final"
400// If the option = "All", all the particles are stored.
401//
402 if (particles == 0) return 0;
884ccf6a 403 TClonesArray &refParticles = *particles;
404 refParticles.Clear();
455f128d 405 Int_t numpart = HEPEVT.NHEP;
2d8d4543 406 if (!strcmp(option,"") || !strcmp(option,"Final")) {
d1e3482a 407 for (Int_t i = 0; i < numpart; i++) {
455f128d 408 if (HEPEVT.ISTHEP[i] == 1) {
2d8d4543 409//
410// Use the common block values for the TParticle constructor
411//
884ccf6a 412 new(refParticles[i]) TParticle(
455f128d 413 HEPEVT.IDHEP[i],
414 HEPEVT.ISTHEP[i],
415 HEPEVT.JMOHEP[i][0]-1,
416 HEPEVT.JMOHEP[i][1]-1,
417 HEPEVT.JDAHEP[i][0]-1,
418 HEPEVT.JDAHEP[i][1]-1,
419
420 HEPEVT.PHEP[i][0],
421 HEPEVT.PHEP[i][1],
422 HEPEVT.PHEP[i][2],
423 HEPEVT.PHEP[i][3],
424 HEPEVT.VHEP[i][0],
425 HEPEVT.VHEP[i][1],
426 HEPEVT.VHEP[i][2],
427 HEPEVT.VHEP[i][3]);
2d8d4543 428 }
429 }
430 }
431 else if (!strcmp(option,"All")) {
432 for (Int_t i = 0; i< numpart; i++) {
884ccf6a 433 new(refParticles[i]) TParticle(
455f128d 434 HEPEVT.IDHEP[i],
435 HEPEVT.ISTHEP[i],
436 HEPEVT.JMOHEP[i][0]-1,
437 HEPEVT.JMOHEP[i][1]-1,
438 HEPEVT.JDAHEP[i][0]-1,
439 HEPEVT.JDAHEP[i][1]-1,
440
441 HEPEVT.PHEP[i][0],
442 HEPEVT.PHEP[i][1],
443 HEPEVT.PHEP[i][2],
444 HEPEVT.PHEP[i][3],
445 HEPEVT.VHEP[i][0],
446 HEPEVT.VHEP[i][1],
447 HEPEVT.VHEP[i][2],
448 HEPEVT.VHEP[i][3]); //
2d8d4543 449 }
450 }
451 return numpart;
452}
453
454void THerwig6::Hwigin()
455{
456 hwigin_();
457}
458
459void THerwig6::Hwuinc()
460{
461 hwuinc_();
462}
463
4936c799 464void THerwig6::Hwusta(const char* name)
2d8d4543 465
466{
467 hwusta_(name,8);
468}
469
470void THerwig6::Hweini()
471
472{
473 hweini_();
474}
475
476void THerwig6::Hwuine()
477
478{
479 hwuine_();
480}
481
482void THerwig6::Hwepro()
483
484{
485 hwepro_();
486}
487
488void THerwig6::Hwbgen()
489
490{
491 hwbgen_();
492}
493
494void THerwig6::Hwdhob()
495
496{
497 hwdhob_();
498}
499
500void THerwig6::Hwcfor()
501
502{
503 hwcfor_();
504}
505
506void THerwig6::Hwcdec()
507
508{
509 hwcdec_();
510}
511
512void THerwig6::Hwdhad()
513
514{
515 hwdhad_();
516}
517
518void THerwig6::Hwdhvy()
519
520{
521 hwdhvy_();
522}
523
524void THerwig6::Hwmevt()
525
526{
527 hwmevt_();
528}
529
530void THerwig6::Hwufne()
531
532{
533 hwufne_();
534}
535
536void THerwig6::Hwefin()
537
538{
539 hwefin_();
540}
541
e2054d85 542void THerwig6::Hwiodk(int iopt)
543
544{
545 hwiodk_(iopt);
546}
547
2d8d4543 548void THerwig6::SetupTest()
549{
550 // exampe of running herwig and generating one event
551 // after changing some options
552 Initialize("P","PBAR",900.,900.,1500);
553 // here you can set some parameters
554 SetPTMIN(15.); // Min pt in hadronic jet production
555 SetYJMIN(-4.); // Min jet rapidity
556 SetYJMAX(4.); // Max jet rapidity
557 // after you set your wished parameters
558 // herwig can do its work
559 PrepareRun();
884ccf6a 560 int nEvToGenerate=1;
561 for (int i=0;i<nEvToGenerate;i++)
2d8d4543 562 {
563 GenerateEvent();
564 // do your stuff. For ex:
884ccf6a 565 int nOfPar=GetNumberOfParticles(); // from TGenerator
566 for (int j=0; j<nOfPar; j++)
2d8d4543 567 {
568 TParticle* p=GetParticle(j);
569 // here you do whatever you want with the particle
570 p->Print();
571 };
572 };
573}
574
7677b281 575// Jimmy subroutines
576
577void THerwig6::Jminit()
578{
579 jminit_();
580}
581
582void THerwig6::Jimmin()
583{
584 jimmin_();
585}
586
587void THerwig6::Jmefin()
588{
589 jmefin_();
590}
591
455f128d 592void THerwig6::PrintEvt()
593{
594 hwuepr_();
595
596}
7677b281 597
455f128d 598 // acces to hep common block
599int THerwig6::GetNEVHEP () const { return HEPEVT.NEVHEP; }
600int THerwig6::GetNhep () const { return HEPEVT.NHEP; }
601int THerwig6::GetISTHEP (int i)const { return HEPEVT.ISTHEP[i-1]; }
602int THerwig6::GetIDHEP (int i)const { return HEPEVT.IDHEP[i-1]; }
603int THerwig6::GetJMOHEP (int i, int j) const
604{ return HEPEVT.JMOHEP[i-1][j-1]; }
605int THerwig6::GetJDAHEP (int i, int j) const
606{ return HEPEVT.JDAHEP[i-1][j-1]; }
607double THerwig6::GetPHEP (int i, int j) const
608{ return HEPEVT.PHEP[i-1][j-1]; }
609double THerwig6::GetVHEP (int i, int j) const
610{ return HEPEVT.VHEP[i-1][j-1]; }
611
612// access to Herwig6 common-blocks
613// WARNING: Some arrays start in 1, others in 0. Look up the manual!
614
615// /HWBEAM/
616
617int THerwig6::GetIPART1 () const { return HWBEAM.IPART1; }
618int THerwig6::GetIPART2 () const { return HWBEAM.IPART2; }
619
620// /HWBMCH/
621char* THerwig6::GetPART1 () const { return HWBMCH.PART1; }
622char* THerwig6::GetPART2 () const { return HWBMCH.PART2; }
623
624
625// /HWPROC/
626double THerwig6::GetEBEAM1 () const { return HWPROC.EBEAM1; }
627double THerwig6::GetEBEAM2 () const { return HWPROC.EBEAM2; }
628double THerwig6::GetPBEAM1 () const { return HWPROC.PBEAM1; }
629double THerwig6::GetPBEAM2 () const { return HWPROC.PBEAM2; }
630int THerwig6::GetIPROC () const { return HWPROC.IPROC; }
631int THerwig6::GetMAXEV () const { return HWPROC.MAXEV; }
632
633// /HWPRAM/
552f205f 634double THerwig6::GetQCDLAM () const { return HWPRAM.QCDLAM; }
635void THerwig6::SetQCDLAM (double q) const { HWPRAM.QCDLAM = q; }
636double THerwig6::GetVQCUT () const { return HWPRAM.VQCUT; }
637void THerwig6::SetVQCUT (double v) const { HWPRAM.VQCUT = v; }
638double THerwig6::GetVGCUT () const { return HWPRAM.VGCUT; }
639void THerwig6::SetVGCUT (double v) const { HWPRAM.VGCUT = v; }
640double THerwig6::GetVPCUT () const { return HWPRAM.VPCUT; }
641void THerwig6::SetVPCUT (double v) const { HWPRAM.VPCUT = v; }
642double THerwig6::GetCLMAX () const { return HWPRAM.CLMAX; }
643void THerwig6::SetCLMAX (double c) const { HWPRAM.CLMAX = c; }
644double THerwig6::GetCLPOW () const { return HWPRAM.CLPOW; }
645void THerwig6::SetCLPOW (double c) const { HWPRAM.CLPOW = c; }
646double THerwig6::GetPSPLT (int i) const { return HWPRAM.PSPLT[i-1];}
647void THerwig6::SetPSPLT (int i, double p) const { HWPRAM.PSPLT[i-1] = p;}
648double THerwig6::GetQDIQK () const { return HWPRAM.QDIQK; }
649void THerwig6::SetQDIQK (double q) const { HWPRAM.QDIQK = q; }
650double THerwig6::GetPDIQK () const { return HWPRAM.PDIQK; }
651void THerwig6::SetPDIQK (double p) const { HWPRAM.PDIQK = p; }
652double THerwig6::GetQSPAC () const { return HWPRAM.QSPAC; }
653void THerwig6::SetQSPAC (double q) const { HWPRAM.QSPAC = q; }
654double THerwig6::GetPTRMS () const { return HWPRAM.PTRMS; }
655void THerwig6::SetPTRMS (double p) const { HWPRAM.PTRMS = p; }
656double THerwig6::GetENSOF () const { return HWPRAM.ENSOF; }
657void THerwig6::SetENSOF (double e) const { HWPRAM.ENSOF = e; }
658int THerwig6::GetIPRINT () const { return HWPRAM.IPRINT; }
659void THerwig6::SetIPRINT (int i) const { HWPRAM.IPRINT = i; }
660int THerwig6::GetMODPDF (int i) const { return HWPRAM.MODPDF[i-1];}
661void THerwig6::SetMODPDF (int i, int j) const { HWPRAM.MODPDF[i-1] = j; }
662int THerwig6::GetNSTRU () const { return HWPRAM.NSTRU; }
663void THerwig6::SetNSTRU (int i) const { HWPRAM.NSTRU = i; }
455f128d 664
665// /HWPRCH/
552f205f 666char* THerwig6::GetAUTPDF (int i) const { return HWPRCH.AUTPDF[i-1]; }
667void THerwig6::SetAUTPDF(int i,const char* s)const { strncpy(HWPRCH.AUTPDF[i-1], s, 19);}
668char* THerwig6::GetBDECAY () const { return HWPRCH.BDECAY; }
455f128d 669
670// /HWEVNT/
552f205f 671double THerwig6::GetAVWGT () const { return HWEVNT.AVWGT; }
672int THerwig6::GetMAXPR () const { return HWEVNT.MAXPR; }
673void THerwig6::SetMAXPR (int i) const { HWEVNT.MAXPR = i; }
674int THerwig6::GetMAXER () const { return HWEVNT.MAXER; }
675void THerwig6::SetMAXER (int i) const { HWEVNT.MAXER = i; }
676int THerwig6::GetNRN (int i) const { return HWEVNT.NRN[i-1]; }
677void THerwig6::SetNRN (int i, int j) const { HWEVNT.NRN[i-1] = j; }
678double THerwig6::GetEVWGT () const { return HWEVNT.EVWGT; }
455f128d 679
552f205f 680int THerwig6::GetIDHW (int i) const { return HWEVNT.IDHW[i]; }
455f128d 681
552f205f 682int THerwig6::GetIERROR () const { return HWEVNT.IERROR; }
455f128d 683
684// /HWHARD/
552f205f 685double THerwig6::GetPTMIN () const { return HWHARD.PTMIN; }
686void THerwig6::SetPTMIN (double d) const { HWHARD.PTMIN = d; }
687double THerwig6::GetPTMAX () const { return HWHARD.PTMAX; }
688void THerwig6::SetPTMAX (double d) const { HWHARD.PTMAX = d; }
689double THerwig6::GetPTPOW () const { return HWHARD.PTPOW; }
690void THerwig6::SetPTPOW (double d) const { HWHARD.PTPOW = d; }
691double THerwig6::GetYJMIN () const { return HWHARD.YJMIN; }
692void THerwig6::SetYJMIN (double d) const { HWHARD.YJMIN = d; }
693double THerwig6::GetYJMAX () const { return HWHARD.YJMAX; }
694void THerwig6::SetYJMAX (double d) const { HWHARD.YJMAX = d; }
695double THerwig6::GetQ2MIN () const { return HWHARD.Q2MIN; }
696void THerwig6::SetQ2MIN (double d) const { HWHARD.Q2MIN = d; }
697double THerwig6::GetQ2MAX () const { return HWHARD.Q2MAX; }
698void THerwig6::SetQ2MAX (double d) const { HWHARD.Q2MAX = d; }
699double THerwig6::GetYBMIN () const { return HWHARD.YBMIN; }
700void THerwig6::SetYBMIN (double d) const { HWHARD.YBMIN = d; }
701double THerwig6::GetYBMAX () const { return HWHARD.YBMAX; }
702void THerwig6::SetYBMAX (double d) const { HWHARD.YBMAX = d; }
703double THerwig6::GetZJMAX () const { return HWHARD.ZJMAX; }
704void THerwig6::SetZJMAX (double d) const { HWHARD.ZJMAX = d; }
705int THerwig6::GetIHPRO () const { return HWHARD.IHPRO; }
455f128d 706// /HWPROP/
552f205f 707double THerwig6::GetRMASS (int i) const { return HWPROP.RMASS[i]; }
708void THerwig6::SetRMASS (int i, double r) const { HWPROP.RMASS[i] = r; }
455f128d 709
710
552f205f 711void THerwig6::GetRNAME (int i, char a[9]) const { for (int j=0;j<8;j++) a[j] = HWUNAM.RNAME[i][j]; a[8] = '\0';}