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