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