7dae8538 |
1 | #include "TParticle.h" |
2 | #include "TSystem.h" |
3 | #include "TIsajet.h" |
4 | #include "Icommon.h" |
5 | #include "iostream.h" |
6 | #include "fstream.h" |
7 | #include "math.h" |
8 | #include "TROOT.h" |
9 | #include "TMath.h" |
10 | |
11 | ClassImp(TIsajet) |
12 | |
13 | /**************************************************************************/ |
14 | |
15 | TIsajet::TIsajet() : TGenerator("Isajet", "Isajet") |
16 | { |
17 | // Default constructor |
18 | // Set random number |
19 | if (!sRandom) sRandom=fRandom; |
20 | |
21 | // Initialising equivalence structures in FRGPAR : |
22 | // EQUIVALENCE (PMIX1(1,1),PMIXX1(1)) |
23 | // EQUIVALENCE (PMIX2(1,1),PMIXX2(1)) |
24 | // EQUIVALENCE (FRPAR(1),PUD) |
25 | |
26 | FRGPAR.pmixx1[0] = &FRGPAR.pmix1[0][0]; |
27 | FRGPAR.pmixx2[0] = &FRGPAR.pmix2[0][0]; |
28 | FRGPAR.frpar[0] = &FRGPAR.pud; |
29 | |
30 | for (Int_t i = 1; i < 6; i++) { |
31 | FRGPAR.pmixx1[i] = FRGPAR.pmixx1[i-1] + 1; |
32 | FRGPAR.pmixx1[i] = FRGPAR.pmixx1[i-1] + 1; |
33 | } |
34 | |
35 | for (Int_t i = 1; i < 32; i++) { |
36 | FRGPAR.frpar[i] = FRGPAR.frpar[i-1] +1; |
37 | } |
38 | |
39 | // Internal logical flags ensuring that theta and y limits are not simultaneously set : |
40 | |
41 | DYLIM.ywset = DYLIM.thwset = false; |
42 | |
43 | // Defaults : |
44 | |
45 | title = ("Default title."); |
46 | jobtype = ("TWOJET"); |
47 | |
48 | RestoreDefaults(); |
49 | } |
50 | |
51 | /**************************************************************************/ |
52 | |
53 | TIsajet::~TIsajet() |
54 | { |
55 | // No housekeeping required at the moment. |
56 | } |
57 | |
58 | /**************************************************************************/ |
59 | |
60 | void TIsajet::Initialise() |
61 | { |
62 | |
63 | // Writes parameter file and stores common block variables in |
64 | // data members, according to booleans. |
65 | // If TIsajet is being used in online-control mode, the parameter file is |
66 | // unnecessary, hence the output is echoed to the screen instead. |
67 | |
68 | const char *fname = gSystem->ExpandPathName("$ALICE_ROOT/ISAJET/data/myjob.par"); |
69 | ofstream Write(fname, ios::out); |
70 | |
71 | ostream *Writer = &Write; |
72 | |
73 | if (online) Writer = &cout; |
74 | |
75 | *Writer << title << '\n'; |
76 | *Writer << PRIMAR.ecm << ',' << PRIMAR.nevent << ",1,1/\n"; |
77 | *Writer << jobtype << '\n'; |
78 | |
79 | center_energy = PRIMAR.ecm; |
80 | |
81 | if (setBeams) { |
82 | beam1_type = PRIMAR.idin[0]; |
83 | beam2_type = PRIMAR.idin[1]; |
84 | |
85 | *Writer << "BEAMS\n"; |
86 | if (PRIMAR.idin[0] == -1120) *Writer << "AP,"; |
87 | else if (PRIMAR.idin[0] == 1220) *Writer << "N,"; |
88 | else if (PRIMAR.idin[0] == -1220) *Writer << "AN,"; |
89 | else *Writer << "P,"; |
90 | |
91 | if (PRIMAR.idin[1] == -1120) *Writer << "AP/\n"; |
92 | else if (PRIMAR.idin[1] == 1220) *Writer << "N/\n"; |
93 | else if (PRIMAR.idin[1] == -1220) *Writer << "AN/\n"; |
94 | else *Writer << "P/\n"; |
95 | } |
96 | |
97 | if (setCutjet) { |
98 | cutoff_mass = QCDPAR.cutjet; |
99 | *Writer << "CUTJET\n" << QCDPAR.cutjet << "/\n"; |
100 | } |
101 | |
102 | if (setFragment) { |
103 | for (Int_t i = 0; i < 32; i++) frag_params[i] = *FRGPAR.frpar[i]; |
104 | |
105 | *Writer << "FRAGMENT\n"; |
106 | for (Int_t i = 0; i < 31; i++) *Writer << FRGPAR.frpar[i] << ','; |
107 | *Writer << FRGPAR.frpar[31] << "/\n"; |
108 | } |
109 | |
110 | if (setJettype1) { |
111 | for (Int_t i = 0; i < TYPES.njttyp[0]; i++) jet1_type[i] = XTYPES.jetyp[0][i]; |
112 | num_jet_type[0] = TYPES.njttyp[0]; |
113 | |
114 | *Writer << "JETTYPE1\n"; |
115 | for (Int_t i = 0; i < TYPES.njttyp[0]-1; i++) *Writer << XTYPES.jetyp[0][i] << ','; |
116 | *Writer << XTYPES.jetyp[0][TYPES.njttyp[0]-1] << "/\n"; |
117 | } |
118 | if (setJettype2) { |
119 | for (Int_t i = 0; i < TYPES.njttyp[1]; i++) jet2_type[i] = XTYPES.jetyp[1][i]; |
120 | num_jet_type[0] = TYPES.njttyp[0]; |
121 | |
122 | *Writer << "JETTYPE2\n"; |
123 | for (Int_t i = 0; i < TYPES.njttyp[1]-1; i++) *Writer << XTYPES.jetyp[1][i] << ','; |
124 | *Writer << XTYPES.jetyp[1][TYPES.njttyp[1]-1] << "/\n"; |
125 | } |
126 | if (setJettype3) { |
127 | for (Int_t i = 0; i < TYPES.njttyp[2]; i++) jet3_type[i] = XTYPES.jetyp[2][i]; |
128 | num_jet_type[0] = TYPES.njttyp[0]; |
129 | |
130 | *Writer << "JETTYPE3\n"; |
131 | for (Int_t i = 0; i < TYPES.njttyp[2]-1; i++) *Writer << XTYPES.jetyp[2][i] << ','; |
132 | *Writer << XTYPES.jetyp[2][TYPES.njttyp[2]-1] << "/\n"; |
133 | } |
134 | |
135 | |
136 | if (setLambda) { |
137 | qcd_lambda = QCDPAR.alam; |
138 | *Writer << "LAMBDA\n" << QCDPAR.alam << "/\n"; |
139 | } |
140 | |
141 | |
142 | if (setNodcay) { |
143 | forbid_decay = NODCAY.nodcay; |
144 | |
145 | *Writer << "NODCAY\n"; |
146 | if (NODCAY.nodcay) *Writer << "TRUE/\n"; |
147 | else *Writer << "FALSE/\n"; |
148 | } |
149 | |
150 | if (setNoeta) { |
151 | forbid_eta = NODCAY.noeta; |
152 | |
153 | *Writer << "NOETA\n"; |
154 | if (NODCAY.noeta) *Writer << "TRUE/\n"; |
155 | else *Writer << "FALSE/\n"; |
156 | } |
157 | |
158 | if (setNoevolve) { |
159 | forbid_evolve = NODCAY.noevol; |
160 | |
161 | *Writer << "NOEVOLVE\n"; |
162 | if (NODCAY.noevol) *Writer << "TRUE/\n"; |
163 | else *Writer << "FALSE/\n"; |
164 | } |
165 | |
166 | if (setNohadron) { |
167 | forbid_hadron = NODCAY.nohadr; |
168 | |
169 | *Writer << "NOHADRON\n"; |
170 | if (NODCAY.nohadr) *Writer << "TRUE/\n"; |
171 | else *Writer << "FALSE/\n"; |
172 | } |
173 | |
174 | if (setNopi0) { |
175 | forbid_pi0 = NODCAY.nopi0; |
176 | |
177 | *Writer << "NOPI0\n"; |
178 | if (NODCAY.nopi0) *Writer << "TRUE/\n"; |
179 | else *Writer << "FALSE/\n"; |
180 | } |
181 | |
182 | if (setNsigma) { |
183 | generate_sigma = PRIMAR.nsigma; |
184 | *Writer << "NSIGMA\n" << PRIMAR.nsigma << "/\n"; |
185 | } |
186 | |
187 | if (setP) { |
188 | for (Int_t i = 0; i < 3; i++) { |
189 | p_limits[2 * i] = JETLIM.pmin[i]; |
190 | p_limits[2 * i + 1] = JETLIM.pmax[i]; |
191 | } |
192 | |
193 | *Writer << "P\n"; |
194 | *Writer << JETLIM.pmin[0] << ',' << JETLIM.pmax[0] << ','; |
195 | *Writer << JETLIM.pmin[1] << ',' << JETLIM.pmax[1] << ','; |
196 | *Writer << JETLIM.pmin[2] << ',' << JETLIM.pmax[2] << "/\n"; |
197 | } |
198 | |
199 | if (setPhi) { |
200 | for (Int_t i = 0; i < 3; i++) { |
201 | phi_limits[2 * i] = JETLIM.phimin[i]; |
202 | phi_limits[2 * i + 1] = JETLIM.phimax[i]; |
203 | } |
204 | |
205 | *Writer << "PHI\n"; |
206 | *Writer << JETLIM.phimin[0] << ',' << JETLIM.phimax[0] << ','; |
207 | *Writer << JETLIM.phimin[1] << ',' << JETLIM.phimax[1] << ','; |
208 | *Writer << JETLIM.phimin[2] << ',' << JETLIM.phimax[2] << "/\n"; |
209 | } |
210 | |
211 | if (setPt) { |
212 | for (Int_t i = 0; i < 3; i++) { |
213 | pt_limits[2 * i] = JETLIM.ptmin[i]; |
214 | pt_limits[2 * i + 1] = JETLIM.ptmax[i]; |
215 | } |
216 | |
217 | *Writer << "PT\n"; |
218 | *Writer << JETLIM.ptmin[0] << ',' << JETLIM.ptmax[0] << ','; |
219 | *Writer << JETLIM.ptmin[1] << ',' << JETLIM.ptmax[1] << ','; |
220 | *Writer << JETLIM.ptmin[2] << ',' << JETLIM.ptmax[2] << "/\n"; |
221 | } |
222 | |
223 | if (setTheta) { |
224 | for (Int_t i = 0; i < 3; i++) { |
225 | theta_limits[2 * i] = JETLIM.thmin[i]; |
226 | theta_limits[2 * i + 1] = JETLIM.thmax[i]; |
227 | } |
228 | |
229 | *Writer << "THETA\n"; |
230 | *Writer << JETLIM.thmin[0] << ',' << JETLIM.thmax[0] << ','; |
231 | *Writer << JETLIM.thmin[1] << ',' << JETLIM.thmax[1] << ','; |
232 | *Writer << JETLIM.thmin[2] << ',' << JETLIM.thmax[2] << "/\n"; |
233 | } |
234 | |
235 | if (setX) { |
236 | for (Int_t i = 0; i < 3; i++) { |
237 | x_limits[2 * i] = JETLIM.xjmin[i]; |
238 | x_limits[2 * i + 1] = JETLIM.xjmax[i]; |
239 | } |
240 | |
241 | *Writer << "X\n"; |
242 | *Writer << JETLIM.xjmin[0] << ',' << JETLIM.xjmax[0] << ','; |
243 | *Writer << JETLIM.xjmin[1] << ',' << JETLIM.xjmax[1] << ','; |
244 | *Writer << JETLIM.xjmin[2] << ',' << JETLIM.xjmax[2] << "/\n"; |
245 | } |
246 | |
247 | if (setY) { |
248 | for (Int_t i = 0; i < 3; i++) { |
249 | y_limits[2 * i] = JETLIM.yjmin[i]; |
250 | y_limits[2 * i + 1] = JETLIM.yjmax[i]; |
251 | } |
252 | |
253 | *Writer << "Y\n"; |
254 | *Writer << JETLIM.yjmin[0] << ',' << JETLIM.yjmax[0] << ','; |
255 | *Writer << JETLIM.yjmin[1] << ',' << JETLIM.yjmax[1] << ','; |
256 | *Writer << JETLIM.yjmin[2] << ',' << JETLIM.yjmax[2] << "/\n"; |
257 | } |
258 | |
259 | if (setXgen) { |
260 | for (Int_t i = 0; i < 8; i++) peter_jet_frag[i] = FRGPAR.xgen[i]; |
261 | |
262 | *Writer << "XGEN\n"; |
263 | for (Int_t i = 0; i < 7; i++) *Writer << FRGPAR.xgen[i] << ','; |
264 | *Writer << FRGPAR.xgen[7] << "/\n"; |
265 | } |
266 | |
267 | if (setPdf) { |
268 | *Writer << "PDFLIB\n"; |
269 | for (Int_t i = 0; i < num_Pdf; i++) *Writer << "\'" << pdfpar[i] << "\'" << ',' << pdfval[i] << "/\n"; |
270 | } |
271 | |
272 | |
273 | *Writer << "END\n"; |
274 | *Writer << "STOP\n"; |
275 | Write.close(); |
276 | |
277 | // Stuff for online-control mode : |
278 | |
279 | if (online) { |
280 | KEYS.reac = jobtype; |
281 | KEYS.keyon = false; |
282 | for (Int_t i = 0; i < KEYS.mxkeys; i++) KEYS.keys[i] = false; |
283 | |
284 | if (!strcmp(KEYS.reac, "TWOJET")) { |
285 | KEYS.keys[0] = true; |
286 | KEYS.ikey = 1; |
287 | PRIMAR.njet = 2; |
288 | } |
289 | else if (!strcmp(KEYS.reac, "MINBIAS")) { |
290 | KEYS.keys[3] = true; |
291 | KEYS.ikey = 4; |
292 | PRIMAR.njet = 0; |
293 | } |
294 | else { |
295 | printf("Error in TIsajet::Initialise :\n"); |
296 | printf("Invalid job type %s.\n", KEYS.reac); |
297 | printf("Only TWOJET and MINBIAS are currently supported for online mode.\n"); |
298 | return; |
299 | } |
300 | |
301 | if (setPdf) { |
302 | PDFinit(); |
303 | } |
304 | } |
305 | } |
306 | |
307 | /**************************************************************************/ |
308 | |
309 | void TIsajet::Reload() |
310 | { |
311 | // |
312 | // Sets the common block variables to the data member values. |
313 | // |
314 | |
315 | SetECM(center_energy); |
316 | |
317 | if (setBeams) { |
318 | SetIDIN(0, beam1_type); |
319 | SetIDIN(1, beam2_type); |
320 | } |
321 | |
322 | if (setCutjet) SetCUTJET(cutoff_mass); |
323 | |
324 | if (setFragment) SetAllFRPAR(frag_params, 32); |
325 | |
326 | if (setJettype1) for (Int_t i = 0; i < num_jet_type[0]; i++) SetJETYP(0, jet1_type[i]); |
327 | |
328 | if (setJettype2) for (Int_t i = 0; i < num_jet_type[1]; i++) SetJETYP(1, jet2_type[i]); |
329 | |
330 | if (setJettype3) for (Int_t i = 0; i < num_jet_type[2]; i++) SetJETYP(2, jet3_type[i]); |
331 | |
332 | if (setLambda) SetALAM(qcd_lambda); |
333 | |
334 | if (setNodcay) SetNODCAY(forbid_decay); |
335 | |
336 | if (setNoeta) SetNOETA(forbid_eta); |
337 | |
338 | if (setNoevolve) SetNOEVOL(forbid_evolve); |
339 | |
340 | if (setNohadron) SetNOHADR(forbid_hadron); |
341 | |
342 | if (setNopi0) SetNOPI0(forbid_pi0); |
343 | |
344 | if (setNsigma) SetNSIGMA(generate_sigma); |
345 | |
346 | if (setP) { |
347 | for (Int_t i = 0; i < 3; i++) { |
348 | SetPMIN(p_limits[2 * i], i); |
349 | SetPMAX(p_limits[2 * i + 1], i); |
350 | } |
351 | } |
352 | |
353 | if (setPhi) { |
354 | for (Int_t i = 0; i < 3; i++) { |
355 | SetPHIMIN(phi_limits[2 * i], i); |
356 | SetPHIMAX(phi_limits[2 * i + 1], i); |
357 | } |
358 | } |
359 | |
360 | if (setPt) { |
361 | for (Int_t i = 0; i < 3; i++) { |
362 | SetPTMIN(pt_limits[2 * i], i); |
363 | SetPTMAX(pt_limits[2 * i + 1], i); |
364 | } |
365 | } |
366 | |
367 | if (setTheta) { |
368 | for (Int_t i = 0; i < 3; i++) { |
369 | SetTHMIN(theta_limits[2 * i], i); |
370 | SetTHMAX(theta_limits[2 * i + 1], i); |
371 | } |
372 | } |
373 | |
374 | if (setX) { |
375 | for (Int_t i = 0; i < 3; i++) { |
376 | SetXJMIN(x_limits[2 * i], i); |
377 | SetXJMAX(x_limits[2 * i + 1], i); |
378 | } |
379 | } |
380 | |
381 | if (setY) { |
382 | for (Int_t i = 0; i < 3; i++) { |
383 | SetYJMIN(y_limits[2 * i], i); |
384 | SetYJMAX(y_limits[2 * i + 1], i); |
385 | } |
386 | } |
387 | |
388 | if (setXgen) SetAllXGEN(peter_jet_frag, 8); |
389 | } |
390 | |
391 | /**************************************************************************/ |
392 | |
393 | void TIsajet::RestoreDefaults() |
394 | { |
395 | // Booleans indicating which keywords should be written into the parameter file. |
396 | |
397 | setBeams = setCutjet = setFragment = setJettype1 = false; |
398 | setJettype2 = setJettype3 = setLambda = setNodcay = false; |
399 | setNoeta = setNoevolve = setNohadron = setNopi0 = false; |
400 | setNsigma = setP = setPhi = setPt = setTheta = false; |
401 | setX = setXgen = setY = setPdf = false; |
402 | num_Pdf = 0; |
403 | |
404 | // Calling on FORTRAN for initialisation of variables |
405 | |
406 | Openfiles(); |
407 | Int_t a, b, c, d, e; |
408 | |
409 | a = -54; |
410 | b = 0; |
411 | c = 51; |
412 | d = 53; |
413 | |
414 | Isaini(a, b, c, d); |
415 | e = 0; |
416 | Isabeg(e); |
417 | } |
418 | |
419 | /**************************************************************************/ |
420 | |
421 | Int_t TIsajet::ImportParticles(TClonesArray *particles, Option_t *option) |
422 | { |
423 | // |
424 | // Default primary creation method. It reads the /HEPEVT/ common block which |
425 | // has been filled by the GenerateEvent method. If the event generator does |
426 | // not use the HEPEVT common block, this routine has to be overloaded by |
427 | // the subclasses. |
428 | // The function loops on the generated particles and stores them in |
429 | // the TClonesArray pointed by the argument particles. |
430 | // The default action is to store only the stable particles (ISTHEP = 1) |
431 | // This can be demanded explicitly by setting the option = "Final" |
432 | // If the option = "All", all the particles are stored. |
433 | // |
434 | if (particles == 0) return 0; |
435 | TClonesArray &Particles = *particles; |
436 | Particles.Clear(); |
437 | TDatabasePDG* converter = TDatabasePDG::Instance(); |
438 | Int_t numpart = PARTCL.nptcl; |
439 | printf("\n TIsajet: ISAJET stack contains %d particles.", numpart); |
440 | printf("\n TIsajet: Total energy: %f ", PRIMAR.ecm); |
441 | Int_t nump = 0; |
442 | if ((!strcmp(option,"")) || (!strcmp(option,"Final"))) { |
443 | for (Int_t i = 0; i < numpart; i++) { |
444 | |
445 | if (PARTCL.idcay[i] == 0) { // Check whether particle is stable. |
446 | // |
447 | // Use the common block values for the TParticle constructor |
448 | // |
449 | nump++; |
450 | new(Particles[i]) TParticle( |
451 | converter->ConvertIsajetToPdg(PARTCL.ident[i]) , // PDG code |
452 | 0 , // Status - currently a default |
453 | |
454 | -1, // Mothers and daughters - not used for stable particles |
455 | -1, |
456 | -1, |
457 | -1, |
458 | |
459 | PARTCL.pptcl[i][0] , // x, y, z and 0 momenta |
460 | PARTCL.pptcl[i][1] , |
461 | PARTCL.pptcl[i][2] , |
462 | PARTCL.pptcl[i][3] , |
463 | |
464 | 0, // Velocities - currently not used. |
465 | 0, |
466 | 0, |
467 | 0); |
468 | } |
469 | } |
470 | } |
471 | else if (!strcmp(option,"All")) { |
472 | nump=numpart; |
473 | for (Int_t i = 0; i < numpart; i++) { |
474 | |
475 | // Determine mother particle. Set to -1 if the particle originates from |
476 | // a parton or is a beam particle. |
477 | |
478 | Int_t origin = PARTCL.iorig[i]; |
479 | Int_t jet = origin / PARTCL.ipack; |
480 | origin = origin - (jet * PARTCL.ipack); |
481 | |
482 | if (origin < 0) origin = 0; |
483 | |
484 | // Determine first and last decay products. Both are -1 if the particle is stable. |
485 | // Note this means they are set to 0, because one is subtracted after decoding; |
486 | // this avoid off-by-one errors relative to the FORTRAN. |
487 | |
488 | Int_t first_Daughter = 0; |
489 | Int_t last_Daughter = 0; |
490 | |
491 | if (PARTCL.idcay[i] != 0) { |
492 | first_Daughter = PARTCL.idcay[i] / PARTCL.ipack; |
493 | last_Daughter = PARTCL.idcay[i] - (first_Daughter * PARTCL.ipack); |
494 | } |
495 | new(Particles[i]) TParticle( |
496 | converter->ConvertIsajetToPdg(PARTCL.ident[i]) , |
497 | 0, |
498 | |
499 | origin - 1, |
500 | -1, |
501 | first_Daughter - 1, |
502 | last_Daughter - 1, |
503 | |
504 | PARTCL.pptcl[i][0] , |
505 | PARTCL.pptcl[i][1] , |
506 | PARTCL.pptcl[i][2] , |
507 | PARTCL.pptcl[i][3] , |
508 | |
509 | 0, |
510 | 0, |
511 | 0, |
512 | 0); |
513 | } |
514 | } |
515 | return nump; |
516 | } |
517 | |
518 | /**************************************************************************/ |
519 | |
520 | void TIsajet::GenerateEvent() |
521 | { |
522 | Int_t e, ok, done; |
523 | |
524 | // e = 0; |
525 | |
526 | // if (online) Isabg2(e); |
527 | // else Isabeg(e); |
528 | |
529 | e = 1; |
530 | Isaevt(e, ok, done); |
531 | } |
532 | |
533 | /**************************************************************************/ |
534 | |
535 | void TIsajet::SetJobtype(Char_t *val) |
536 | { |
537 | if ((!strcmp(val, "TWOJET")) || (!strcmp(val, "E+E-")) || |
538 | (!strcmp(val, "DRELLYAN")) || (!strcmp(val, "MINBIAS")) || |
539 | (!strcmp(val, "SUSY")) || (!strcmp(val, "WPAIR")) || |
540 | (!strcmp(val, "HIGGS")) || (!strcmp(val, "PHOTON")) || |
541 | (!strcmp(val, "TCOLOR")) || (!strcmp(val, "WHIGGS")) || |
542 | (!strcmp(val, "EXTRADIM")) || (!strcmp(val, "ZJJ"))) { |
543 | jobtype = val; |
544 | } |
545 | else { |
546 | printf("Error in TIsajet::SetJobtype :\n"); |
547 | printf("Invalid reaction keyword %s.\n", val); |
548 | printf("Valid keywords are : TWOJET, E+E-, DRELLYAN,\n"); |
549 | printf("MINBIAS, SUSY, WPAIR, HIGGS, PHOTON, TCOLOR,\n"); |
550 | printf("WHIGGS, EXTRADIM and ZJJ.\n"); |
551 | } |
552 | } |
553 | |
554 | /**************************************************************************/ |
555 | |
556 | void TIsajet::GetJobtype() const |
557 | { |
558 | printf ("Current job type is %s.\n", jobtype); |
559 | } |
560 | |
561 | /**************************************************************************/ |
562 | |
563 | void TIsajet::SetOnline(Bool_t val) |
564 | { |
565 | online = val; |
566 | } |
567 | |
568 | /**************************************************************************/ |
569 | |
570 | Bool_t TIsajet::GetOnline() const |
571 | { |
572 | return online; |
573 | } |
574 | |
575 | /**************************************************************************/ |
576 | |
577 | void TIsajet::SetPDF(Char_t *name, Float_t val) |
578 | { |
579 | if (num_Pdf < 19) { |
580 | pdfpar[num_Pdf] = name; |
581 | pdfval[num_Pdf] = val; |
582 | num_Pdf++; |
583 | setPdf = true; |
584 | } |
585 | else { |
586 | printf ("Error in TIsajet::SetPDF :\n"); |
587 | printf ("Maximum of twenty PDF parameters may be set.\n"); |
588 | } |
589 | } |
590 | |
591 | /**************************************************************************/ |
592 | |
593 | // Access routines for common blocks. |
594 | // Begins DYLIM access. |
595 | |
596 | /**************************************************************************/ |
597 | |
598 | void TIsajet::SetQMIN(Float_t val) |
599 | { |
600 | if (val > DYLIM.qmax) { |
601 | printf("Error in TIsajet::SetQMIN : \n"); |
602 | printf("You may not set QMIN to a value larger than QMAX = %f.\n", DYLIM.qmax); |
603 | return; |
604 | } |
605 | |
606 | DYLIM.qmin = val; |
607 | if (!DYLIM.ywset) SetYWLIMS(); |
608 | } |
609 | |
610 | /**************************************************************************/ |
611 | |
612 | Float_t TIsajet::GetQMIN() const |
613 | { |
614 | return DYLIM.qmin; |
615 | } |
616 | |
617 | /**************************************************************************/ |
618 | |
619 | void TIsajet::SetQMAX(Float_t val) |
620 | { |
621 | if (val < DYLIM.qmin) { |
622 | printf("Error in TIsajet::SetQMAX : \n"); |
623 | printf("You may not set QMAX to a value less than QMIN = %f.\n", DYLIM.qmin); |
624 | return; |
625 | } |
626 | |
627 | DYLIM.qmax = val; |
628 | } |
629 | |
630 | /**************************************************************************/ |
631 | |
632 | Float_t TIsajet::GetQMAX() const |
633 | { |
634 | return DYLIM.qmax; |
635 | } |
636 | |
637 | /**************************************************************************/ |
638 | |
639 | void TIsajet::SetQTMIN(Float_t val) |
640 | { |
641 | if (val > DYLIM.qtmax) { |
642 | printf("Error in TIsajet::SetQTMIN : \n"); |
643 | printf("You may not set QTMIN to a value larger than QTMAX = %f.\n", DYLIM.qtmax); |
644 | return; |
645 | } |
646 | DYLIM.qtmin = val; |
647 | if (!DYLIM.ywset) SetYWLIMS(); |
648 | } |
649 | |
650 | /**************************************************************************/ |
651 | |
652 | Float_t TIsajet::GetQTMIN() const |
653 | { |
654 | return DYLIM.qtmin; |
655 | } |
656 | |
657 | /**************************************************************************/ |
658 | |
659 | void TIsajet::SetQTMAX(Float_t val) |
660 | { |
661 | if (val < DYLIM.qtmin) { |
662 | printf("Error in TIsajet::SetQTMAX : \n"); |
663 | printf("You may not set QTMAX to a value less than QTMIN = %f.\n", DYLIM.qtmin); |
664 | return; |
665 | } |
666 | |
667 | DYLIM.qtmax = val; |
668 | if (!DYLIM.ywset) SetYWLIMS(); |
669 | } |
670 | |
671 | /**************************************************************************/ |
672 | |
673 | Float_t TIsajet::GetQTMAX() const |
674 | { |
675 | return DYLIM.qtmax; |
676 | } |
677 | |
678 | /**************************************************************************/ |
679 | |
680 | void TIsajet::SetYWMIN(Float_t val) |
681 | { |
682 | if (val > DYLIM.ywmax) { |
683 | printf("Error in TIsajet::SetYWMIN : \n"); |
684 | printf("You may not set YWMIN to a value larger than YWMAX = %f.\n", DYLIM.ywmax); |
685 | return; |
686 | } |
687 | |
688 | if (DYLIM.thwset) { |
689 | printf("Error in TIsajet::SetYWMIN :\n"); |
690 | printf("May not set both theta and y limits. Use SetTHWLIMS, then set YWMIN.\n"); |
691 | } |
692 | else { |
693 | DYLIM.ywset = true; |
694 | DYLIM.ywmin = val; |
695 | } |
696 | } |
697 | |
698 | /**************************************************************************/ |
699 | |
700 | Float_t TIsajet::GetYWMIN() const |
701 | { |
702 | return DYLIM.ywmin; |
703 | } |
704 | |
705 | /**************************************************************************/ |
706 | |
707 | void TIsajet::SetYWMAX(Float_t val) |
708 | { |
709 | if (val < DYLIM.ywmin) { |
710 | printf("Error in TIsajet::SetYWMAX : \n"); |
711 | printf("You may not set YWMAX to a value less than YWMIN = %f.\n", DYLIM.ywmin); |
712 | return; |
713 | } |
714 | |
715 | if (DYLIM.thwset) { |
716 | printf("Error in TIsajet::SetYWMAX :\n"); |
717 | printf("May not set both theta and y limits. Use SetTHWLIMS, then set YWMAX.\n"); |
718 | } |
719 | else { |
720 | DYLIM.ywset = true; |
721 | DYLIM.ywmax = val; |
722 | } |
723 | } |
724 | |
725 | /**************************************************************************/ |
726 | |
727 | Float_t TIsajet::GetYWMAX() const |
728 | { |
729 | return DYLIM.ywmax; |
730 | } |
731 | |
732 | /**************************************************************************/ |
733 | |
734 | void TIsajet::SetYWLIMS() |
735 | { |
736 | Float_t rot = sqrt(DYLIM.qmin * DYLIM.qmin + DYLIM.qtmin * DYLIM.qtmin); |
737 | DYLIM.ywmax = acosh(PRIMAR.halfe / rot); |
738 | DYLIM.ywmin = -DYLIM.ywmax; |
739 | DYLIM.ywset = false; |
740 | } |
741 | |
742 | /**************************************************************************/ |
743 | |
744 | void TIsajet::SetXWMIN(Float_t val) |
745 | { |
746 | if (val > DYLIM.xwmax) { |
747 | printf("Error in TIsajet::SetXWMIN : \n"); |
748 | printf("You may not set XWMIN to a value larger than XWMAX = %f.\n", DYLIM.xwmax); |
749 | return; |
750 | } |
751 | DYLIM.xwmin = val; |
752 | } |
753 | |
754 | /**************************************************************************/ |
755 | |
756 | Float_t TIsajet::GetXWMIN() const |
757 | { |
758 | return DYLIM.xwmin; |
759 | } |
760 | |
761 | /**************************************************************************/ |
762 | |
763 | void TIsajet::SetXWMAX(Float_t val) |
764 | { |
765 | if (val < DYLIM.xwmin) { |
766 | printf("Error in TIsajet::SetXWMAX : \n"); |
767 | printf("You may not set XWMAX to a value less than XWMIN = %f.\n", DYLIM.xwmin); |
768 | return; |
769 | } |
770 | |
771 | DYLIM.xwmax = val; |
772 | } |
773 | |
774 | /**************************************************************************/ |
775 | |
776 | Float_t TIsajet::GetXWMAX() const |
777 | { |
778 | return DYLIM.xwmax; |
779 | } |
780 | |
781 | /**************************************************************************/ |
782 | |
783 | void TIsajet::SetTHWMIN(Float_t val) |
784 | { |
785 | if (val > DYLIM.thwmax) { |
786 | printf("Error in TIsajet::SetTHWMIN : \n"); |
787 | printf("You may not set THWMIN to a value larger than THWMAX = %f.\n", DYLIM.thwmax); |
788 | return; |
789 | } |
790 | |
791 | if (DYLIM.ywset) { |
792 | printf("Error in TIsajet::SetTHWMIN :\n"); |
793 | printf("May not set both theta and y limits. Use SetYWLIMS, then set THWMIN.\n"); |
794 | } |
795 | else { |
796 | DYLIM.thwset = true; |
797 | DYLIM.thwmin = val; |
798 | } |
799 | } |
800 | |
801 | /**************************************************************************/ |
802 | |
803 | Float_t TIsajet::GetTHWMIN() const |
804 | { |
805 | return DYLIM.thwmin; |
806 | } |
807 | |
808 | /**************************************************************************/ |
809 | |
810 | void TIsajet::SetTHWMAX(Float_t val) |
811 | { |
812 | if (val < DYLIM.thwmin) { |
813 | printf("Error in TIsajet::SetTHWMAX : \n"); |
814 | printf("You may not set THWMAX to a value less than THWMIN = %f.\n", DYLIM.thwmin); |
815 | return; |
816 | } |
817 | |
818 | if (DYLIM.ywset) { |
819 | printf("Error in TIsajet::SetTHWMAX :\n"); |
820 | printf("May not set both theta and y limits. Use SetYWLIMS, then set THWMAX.\n"); |
821 | } |
822 | else { |
823 | DYLIM.thwset = true; |
824 | DYLIM.thwmax = val; |
825 | } |
826 | } |
827 | |
828 | /**************************************************************************/ |
829 | |
830 | Float_t TIsajet::GetTHWMAX() const |
831 | { |
832 | return DYLIM.thwmax; |
833 | } |
834 | |
835 | /**************************************************************************/ |
836 | |
837 | void TIsajet::SetTHWLIMS() |
838 | { |
839 | DYLIM.thwmin = 0; |
840 | DYLIM.thwmax = TMath::Pi(); |
841 | DYLIM.thwset = false; |
842 | } |
843 | |
844 | /**************************************************************************/ |
845 | |
846 | void TIsajet::SetPHWMIN(Float_t val) |
847 | { |
848 | if (val > DYLIM.phwmax) { |
849 | printf("Error in TIsajet::SetPHWMIN : \n"); |
850 | printf("You may not set PHWMIN to a value larger than PHWMAX = %f.\n", DYLIM.phwmax); |
851 | return; |
852 | } |
853 | DYLIM.phwmin = val; |
854 | } |
855 | |
856 | /**************************************************************************/ |
857 | |
858 | Float_t TIsajet::GetPHWMIN() const |
859 | { |
860 | return DYLIM.phwmin; |
861 | } |
862 | |
863 | /**************************************************************************/ |
864 | |
865 | void TIsajet::SetPHWMAX(Float_t val) |
866 | { |
867 | if (val < DYLIM.phwmin) { |
868 | printf("Error in TIsajet::SetPHWMAX : \n"); |
869 | printf("You may not set PHWMAX to a value less than PHWMIN = %f.\n", DYLIM.phwmin); |
870 | return; |
871 | } |
872 | |
873 | DYLIM.phwmax = val; |
874 | } |
875 | |
876 | /**************************************************************************/ |
877 | |
878 | Float_t TIsajet::GetPHWMAX() const |
879 | { |
880 | return DYLIM.phwmax; |
881 | } |
882 | |
883 | /**************************************************************************/ |
884 | |
885 | Bool_t TIsajet::GetSETLMQ(Int_t index) const |
886 | { |
887 | Int_t length = (sizeof DYLIM.setlmq / sizeof DYLIM.setlmq[0]); |
888 | if ((index < 0) || (index >= length)) { |
889 | printf ("Error in TIsajet::GetSETLMQ : \n"); |
890 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
891 | return 0; |
892 | } |
893 | |
894 | return DYLIM.setlmq[index]; |
895 | } |
896 | |
897 | /**************************************************************************/ |
898 | |
899 | // End of DYLIM access. |
900 | // Begins EEPAR access. |
901 | |
902 | /**************************************************************************/ |
903 | |
904 | void TIsajet::SetPLEP(Float_t val) |
905 | { |
906 | EEPAR.plep = val; |
907 | } |
908 | |
909 | /**************************************************************************/ |
910 | |
911 | Float_t TIsajet::GetPLEP() const |
912 | { |
913 | return EEPAR.plep; |
914 | } |
915 | |
916 | /**************************************************************************/ |
917 | |
918 | void TIsajet::SetPLEM(Float_t val) |
919 | { |
920 | EEPAR.plem = val; |
921 | } |
922 | |
923 | /**************************************************************************/ |
924 | |
925 | Float_t TIsajet::GetPLEM() const |
926 | { |
927 | return EEPAR.plem; |
928 | } |
929 | |
930 | /**************************************************************************/ |
931 | |
932 | void TIsajet::SetRSHMIN(Float_t val) |
933 | { |
934 | if (val > EEPAR.rshmax) { |
935 | printf("Error in TIsajet::SetRSHMIN : \n"); |
936 | printf("You may not set RSHMIN to a value larger than RSHMAX = %f.\n", EEPAR.rshmax); |
937 | return; |
938 | } |
939 | EEPAR.rshmin = val; |
940 | } |
941 | |
942 | /**************************************************************************/ |
943 | |
944 | Float_t TIsajet::GetRSHMIN() const |
945 | { |
946 | return EEPAR.rshmin; |
947 | } |
948 | |
949 | /**************************************************************************/ |
950 | |
951 | void TIsajet::SetRSHMAX(Float_t val) |
952 | { |
953 | if (val < EEPAR.rshmin) { |
954 | printf("Error in TIsajet::SetRSHMAX : \n"); |
955 | printf("You may not set RSHMAX to a value less than RSHMIN = %f.\n", EEPAR.rshmin); |
956 | return; |
957 | } |
958 | |
959 | EEPAR.rshmax = val; |
960 | } |
961 | |
962 | /**************************************************************************/ |
963 | |
964 | Float_t TIsajet::GetRSHMAX() const |
965 | { |
966 | return EEPAR.rshmax; |
967 | } |
968 | |
969 | /**************************************************************************/ |
970 | |
971 | void TIsajet::SetUPSLON(Float_t val) |
972 | { |
973 | EEPAR.upslon = val; |
974 | } |
975 | |
976 | /**************************************************************************/ |
977 | |
978 | Float_t TIsajet::GetUPSLON() const |
979 | { |
980 | return EEPAR.upslon; |
981 | } |
982 | |
983 | /**************************************************************************/ |
984 | |
985 | void TIsajet::SetSIGZ(Float_t val) |
986 | { |
987 | EEPAR.sigz = val; |
988 | } |
989 | |
990 | /**************************************************************************/ |
991 | |
992 | Float_t TIsajet::GetSIGZ() const |
993 | { |
994 | return EEPAR.sigz; |
995 | } |
996 | |
997 | /**************************************************************************/ |
998 | |
999 | Bool_t TIsajet::GetIBREM() const |
1000 | { |
1001 | return EEPAR.ibrem; |
1002 | } |
1003 | |
1004 | /**************************************************************************/ |
1005 | |
1006 | Bool_t TIsajet::GetIBEAM() const |
1007 | { |
1008 | return EEPAR.ibeam; |
1009 | } |
1010 | |
1011 | /**************************************************************************/ |
1012 | |
1013 | Float_t TIsajet::GetSGMXEE() const |
1014 | { |
1015 | return EEPAR.sgmxee; |
1016 | } |
1017 | |
1018 | /**************************************************************************/ |
1019 | |
1020 | // End of EEPAR access. |
1021 | // Begins FORCE access. |
1022 | |
1023 | /**************************************************************************/ |
1024 | |
1025 | Int_t TIsajet::GetNFORCE() const |
1026 | { |
1027 | return FORCE.nforce; |
1028 | } |
1029 | |
1030 | /**************************************************************************/ |
1031 | |
1032 | void TIsajet::SetIFORCE(const Int_t val[], Int_t arraySize, Bool_t anti = true) |
1033 | { |
1034 | if (GetNFORCE() >= FORCE.mxforc - anti) { |
1035 | printf ("ERROR in TIsajet::SetIFORCE :\n"); |
1036 | printf ("Cannot have more than %d forced decays.\n", FORCE.mxforc ); |
1037 | return; |
1038 | } |
1039 | |
1040 | if ((arraySize > 6) || (arraySize < 2)) { |
1041 | printf ("Error in TIsajet::SetIFORCE : \n"); |
1042 | printf ("Invalid array size %d; must be 2-6.\n", arraySize); |
1043 | return; |
1044 | } |
1045 | |
1046 | for (Int_t i = 0; i < FORCE.nforce; i++) { |
1047 | if (FORCE.iforce[i] == val[0]) { |
1048 | printf ("Error in TIsajet::SetIFORCE : \n"); |
1049 | printf ("Particle %d has already been forced, index %d.\n", val[0], i); |
1050 | return; |
1051 | } |
1052 | } |
1053 | |
1054 | |
1055 | FORCE.iforce[FORCE.nforce] = val[0]; |
1056 | for (Int_t i = 1; i < arraySize; i++) { |
1057 | FORCE.mforce[FORCE.nforce][i-1] = val[i]; |
1058 | } |
1059 | |
1060 | FORCE.nforce++; |
1061 | |
1062 | printf ("Decay channel %d -> ", val[0]); |
1063 | for (Int_t i = 1; i < arraySize; i++) { |
1064 | printf ("%d, ", val[i]); |
1065 | } |
1066 | printf ("set. \n"); |
1067 | |
1068 | if (anti) { |
1069 | Int_t antivals[arraySize]; |
1070 | for (Int_t i = 0; i < arraySize; i++){ |
1071 | antivals[i] = (0 - val[i]); |
1072 | } |
1073 | SetIFORCE(antivals, arraySize, false); |
1074 | } |
1075 | } |
1076 | |
1077 | /**************************************************************************/ |
1078 | |
1079 | void TIsajet::UnForce(Int_t index, Bool_t anti = true) |
1080 | { |
1081 | if (FORCE.nforce == 0) { |
1082 | printf ("Error in TIsajet::UnForce : \n"); |
1083 | printf ("No decays have been forced.\n"); |
1084 | return; |
1085 | } |
1086 | |
1087 | if ((index < 0) || (index >= FORCE.nforce)) { |
1088 | printf ("Error in TIsajet::UnForce : \n"); |
1089 | printf ("Invalid decay index %d; range is 0-%d.\n", index, FORCE.nforce-1); |
1090 | return; |
1091 | } |
1092 | |
1093 | Int_t particle_ID = FORCE.iforce[index]; |
1094 | |
1095 | for (Int_t i = index; i < FORCE.mxforc - 1; i++) { |
1096 | FORCE.iforce[i] = FORCE.iforce[i+1]; |
1097 | for (Int_t j = 0; j < 5; j++) { |
1098 | FORCE.mforce[i][j] = FORCE.mforce[i+1][j]; |
1099 | } |
1100 | } |
1101 | FORCE.iforce[FORCE.mxforc - 1] = 0; |
1102 | for (Int_t j = 0; j < 5; j++) { |
1103 | FORCE.mforce[FORCE.mxforc - 1][j] = 0; |
1104 | } |
1105 | |
1106 | FORCE.nforce--; |
1107 | |
1108 | printf ("Decay of %d unforced.\n", particle_ID); |
1109 | |
1110 | if (anti) UnForceID(-particle_ID, false); |
1111 | } |
1112 | |
1113 | /**************************************************************************/ |
1114 | |
1115 | void TIsajet::UnForceID(Int_t particle_ID, Bool_t anti = true) |
1116 | { |
1117 | if (FORCE.nforce == 0) { |
1118 | printf ("Error in TIsajet::UnForceID : \n"); |
1119 | printf ("No decays have been forced.\n"); |
1120 | return; |
1121 | } |
1122 | |
1123 | for (Int_t i = 0; i < FORCE.nforce; i++) { |
1124 | if (FORCE.iforce[i] == particle_ID) { |
1125 | UnForce(i, anti); |
1126 | return; |
1127 | } |
1128 | } |
1129 | |
1130 | printf ("Error in TIsajet::UnForceID : \n"); |
1131 | printf ("Cannot find particle %d.\n", particle_ID); |
1132 | } |
1133 | |
1134 | /**************************************************************************/ |
1135 | |
1136 | Int_t* TIsajet::GetIFORCE(Int_t index) const |
1137 | { |
1138 | if (FORCE.nforce == 0) { |
1139 | printf ("Error in TIsajet::GetIFORCE : \n"); |
1140 | printf ("No decays have been forced.\n"); |
1141 | return 0; |
1142 | } |
1143 | |
1144 | if ((index < 0) || (index >= FORCE.nforce)) { |
1145 | printf ("Error in TIsajet::GetIFORCE : \n"); |
1146 | printf ("Invalid decay index %d; range is 0-%d.\n", index, FORCE.nforce-1); |
1147 | return 0; |
1148 | } |
1149 | |
1150 | Int_t decay[6]; |
1151 | decay[0] = FORCE.iforce[index]; |
1152 | |
1153 | for (Int_t i = 1; i < 6; i++) { |
1154 | decay[i] = FORCE.mforce[index][i-1]; |
1155 | } |
1156 | |
1157 | return decay; |
1158 | } |
1159 | |
1160 | /**************************************************************************/ |
1161 | |
1162 | Int_t TIsajet::GetMEFORC(Int_t index) const |
1163 | { |
1164 | if (FORCE.nforce == 0) { |
1165 | printf ("Error in TIsajet::GetMEFORCE : \n"); |
1166 | printf ("No decays have been forced.\n"); |
1167 | return 0; |
1168 | } |
1169 | |
1170 | if ((index < 0) || (index >= FORCE.nforce)) { |
1171 | printf ("Error in TIsajet::GetMEFORC : \n"); |
1172 | printf ("Invalid array index %d; range is 0-%d.\n", index, FORCE.nforce-1); |
1173 | return 0; |
1174 | } |
1175 | |
1176 | return FORCE.meforc[index]; |
1177 | } |
1178 | |
1179 | /**************************************************************************/ |
1180 | |
1181 | // End of FORCE access. |
1182 | // Begins FRGPAR access. |
1183 | |
1184 | /**************************************************************************/ |
1185 | |
1186 | void TIsajet::SetFRPAR(Float_t val, Int_t index) |
1187 | { |
1188 | Int_t length = (sizeof FRGPAR.frpar / sizeof FRGPAR.frpar[0]); |
1189 | if ((index < 0) || (index >= length)) { |
1190 | printf ("Error in TIsajet::SetFRPAR : \n"); |
1191 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1192 | return; |
1193 | } |
1194 | |
1195 | *FRGPAR.frpar[index] = val; |
1196 | setFragment = true; |
1197 | } |
1198 | |
1199 | /**************************************************************************/ |
1200 | |
1201 | void TIsajet::SetAllFRPAR(const Float_t val[], Int_t arraySize) |
1202 | { |
1203 | Int_t length = (sizeof FRGPAR.frpar / sizeof FRGPAR.frpar[0]); |
1204 | if (arraySize != length) { |
1205 | printf ("Error in TIsajet::SetAllFRPAR : \n"); |
1206 | printf ("Array must have %d elements.\n", length); |
1207 | return; |
1208 | } |
1209 | |
1210 | for (Int_t i = 0; i < arraySize; i++) { |
1211 | SetFRPAR(val[i], i); |
1212 | } |
1213 | } |
1214 | |
1215 | /**************************************************************************/ |
1216 | |
1217 | Float_t TIsajet::GetFRPAR(Int_t index) const |
1218 | { |
1219 | Int_t length = (sizeof FRGPAR.frpar / sizeof FRGPAR.frpar[0]); |
1220 | if ((index < 0) || (index >= length)) { |
1221 | printf ("Error in TIsajet::GetFRPAR : \n"); |
1222 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1223 | return 0; |
1224 | } |
1225 | |
1226 | return *FRGPAR.frpar[index]; |
1227 | } |
1228 | |
1229 | /**************************************************************************/ |
1230 | |
1231 | void TIsajet::SetPUD(Float_t val) |
1232 | { |
1233 | SetFRPAR(val, 0); |
1234 | } |
1235 | |
1236 | /**************************************************************************/ |
1237 | |
1238 | Float_t TIsajet::GetPUD() const |
1239 | { |
1240 | return GetFRPAR(0); |
1241 | } |
1242 | |
1243 | /**************************************************************************/ |
1244 | |
1245 | void TIsajet::SetPBARY(Float_t val) |
1246 | { |
1247 | SetFRPAR(val, 1); |
1248 | } |
1249 | |
1250 | /**************************************************************************/ |
1251 | |
1252 | Float_t TIsajet::GetPBARY() const |
1253 | { |
1254 | return GetFRPAR(1); |
1255 | } |
1256 | |
1257 | /**************************************************************************/ |
1258 | |
1259 | void TIsajet::SetSIGQT(Float_t val) |
1260 | { |
1261 | SetFRPAR(val, 2); |
1262 | } |
1263 | |
1264 | /**************************************************************************/ |
1265 | |
1266 | Float_t TIsajet::GetSIGQT() const |
1267 | { |
1268 | return GetFRPAR(2); |
1269 | } |
1270 | |
1271 | /**************************************************************************/ |
1272 | |
1273 | void TIsajet::SetPEND(Float_t val) |
1274 | { |
1275 | SetFRPAR(val, 3); |
1276 | } |
1277 | |
1278 | /**************************************************************************/ |
1279 | |
1280 | Float_t TIsajet::GetPEND() const |
1281 | { |
1282 | return GetFRPAR(3); |
1283 | } |
1284 | |
1285 | /**************************************************************************/ |
1286 | |
1287 | void TIsajet::SetXGEN(Float_t val, Int_t index) |
1288 | { |
1289 | Int_t length = (sizeof FRGPAR.xgen / sizeof FRGPAR.xgen[0]); |
1290 | if ((index < 0) || (index >= length)) { |
1291 | printf ("Error in TIsajet::SetXGEN : \n"); |
1292 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1293 | return; |
1294 | } |
1295 | SetFRPAR(val, index + 4); |
1296 | setXgen = true; |
1297 | } |
1298 | |
1299 | /**************************************************************************/ |
1300 | |
1301 | void TIsajet::SetAllXGEN(const Float_t val[], Int_t arraySize) |
1302 | { |
1303 | Int_t length = (sizeof FRGPAR.xgen / sizeof FRGPAR.xgen[0]); |
1304 | if (arraySize != length) { |
1305 | printf ("Error in TIsajet::SetAllXGEN : \n"); |
1306 | printf ("Array must have %d elements.\n", length); |
1307 | return; |
1308 | } |
1309 | |
1310 | for (Int_t i = 0; i < arraySize; i++) { |
1311 | SetXGEN(val[i], i); |
1312 | } |
1313 | } |
1314 | |
1315 | /**************************************************************************/ |
1316 | |
1317 | Float_t TIsajet::GetXGEN(Int_t index) const |
1318 | { |
1319 | Int_t length = (sizeof FRGPAR.xgen / sizeof FRGPAR.xgen[0]); |
1320 | if ((index < 0) || (index >= length)) { |
1321 | printf ("Error in TIsajet::GetXGEN : \n"); |
1322 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1323 | return 0; |
1324 | } |
1325 | |
1326 | return GetFRPAR(index + 4); |
1327 | } |
1328 | |
1329 | /**************************************************************************/ |
1330 | |
1331 | void TIsajet::SetPSPIN1(Float_t val, Int_t index) |
1332 | { |
1333 | Int_t length = (sizeof FRGPAR.pspin1 / sizeof FRGPAR.pspin1[0]); |
1334 | if ((index < 0) || (index >= length)) { |
1335 | printf ("Error in TIsajet::SetPSPIN1 : \n"); |
1336 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1337 | return; |
1338 | } |
1339 | |
1340 | SetFRPAR(val, index + 12); |
1341 | } |
1342 | |
1343 | /**************************************************************************/ |
1344 | |
1345 | void TIsajet::SetAllPSPIN1(const Float_t val[], Int_t arraySize) |
1346 | { |
1347 | Int_t length = (sizeof FRGPAR.pspin1 / sizeof FRGPAR.pspin1[0]); |
1348 | if (arraySize != length) { |
1349 | printf ("Error in TIsajet::SetAllPSPIN1 : \n"); |
1350 | printf ("Array must have %d elements.\n", length); |
1351 | return; |
1352 | } |
1353 | |
1354 | for (Int_t i = 0; i < arraySize; i++) { |
1355 | SetPSPIN1(val[i], i); |
1356 | } |
1357 | } |
1358 | |
1359 | /**************************************************************************/ |
1360 | |
1361 | Float_t TIsajet::GetPSPIN1(Int_t index) const |
1362 | { |
1363 | Int_t length = (sizeof FRGPAR.xgen / sizeof FRGPAR.xgen[0]); |
1364 | if ((index < 0) || (index >= length)) { |
1365 | printf ("Error in TIsajet::GetPSPIN1 : \n"); |
1366 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1367 | return 0; |
1368 | } |
1369 | |
1370 | return GetFRPAR(index + 12); |
1371 | } |
1372 | |
1373 | /**************************************************************************/ |
1374 | |
1375 | void TIsajet::SetPMIX1(Float_t val, Int_t index1, Int_t index2) |
1376 | { |
1377 | Int_t col_num = (sizeof FRGPAR.pmix1[0] / sizeof FRGPAR.pmix1[0][0]); |
1378 | Int_t row_num = (sizeof FRGPAR.pmix1 / (sizeof FRGPAR.pmix1[0][0] * col_num)); |
1379 | |
1380 | if ((index1 < 0) || (index1 >= row_num)) { |
1381 | printf ("Error in TIsajet::SetPMIX1 : \n"); |
1382 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
1383 | return; |
1384 | } |
1385 | |
1386 | if ((index2 < 0) || (index2 >= col_num)) { |
1387 | printf ("Error in TIsajet::SetPMIX1 : \n"); |
1388 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
1389 | return; |
1390 | } |
1391 | |
1392 | FRGPAR.pmix1[index1][index2] = val; |
1393 | setFragment = true; |
1394 | } |
1395 | |
1396 | /**************************************************************************/ |
1397 | |
1398 | void TIsajet::SetAllPMIX1(const Float_t val[2][3]) |
1399 | { |
1400 | for (Int_t i = 0; i < 2; i++) { |
1401 | for (Int_t j = 0; j < 3; j++) { |
1402 | SetPMIX1(val[i][j], i, j); |
1403 | } |
1404 | } |
1405 | } |
1406 | |
1407 | /**************************************************************************/ |
1408 | |
1409 | void TIsajet::SetColumnPMIX1(const Float_t val[], Int_t col) |
1410 | { |
1411 | Int_t col_num = (sizeof FRGPAR.pmix1[0] / sizeof FRGPAR.pmix1[0][0]); |
1412 | Int_t row_num = (sizeof FRGPAR.pmix1 / (sizeof FRGPAR.pmix1[0][0] * col_num)); |
1413 | |
1414 | if ((col < 0) || (col >= col_num)) { |
1415 | printf ("Error in TIsajet::SetColumnPMIX1 : \n"); |
1416 | printf ("Invalid column index %d, range is 0-%d.\n", col, col_num-1); |
1417 | return; |
1418 | } |
1419 | |
1420 | for (Int_t i = 0; i < row_num; i++) { |
1421 | SetPMIX1(val[i], i, col); |
1422 | } |
1423 | } |
1424 | |
1425 | /**************************************************************************/ |
1426 | |
1427 | Float_t TIsajet::GetPMIX1(Int_t index1, Int_t index2) const |
1428 | { |
1429 | Int_t col_num = (sizeof FRGPAR.pmix1[0] / sizeof FRGPAR.pmix1[0][0]); |
1430 | Int_t row_num = (sizeof FRGPAR.pmix1 / (sizeof FRGPAR.pmix1[0][0] * col_num)); |
1431 | |
1432 | if ((index1 < 0) || (index1 >= row_num)) { |
1433 | printf ("Error in TIsajet::GetPMIX1 : \n"); |
1434 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
1435 | return 0; |
1436 | } |
1437 | |
1438 | if ((index2 < 0) || (index2 >= col_num)) { |
1439 | printf ("Error in TIsajet::GetPMIX1 : \n"); |
1440 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
1441 | return 0; |
1442 | } |
1443 | |
1444 | return FRGPAR.pmix1[index1][index2]; |
1445 | } |
1446 | |
1447 | /**************************************************************************/ |
1448 | |
1449 | void TIsajet::SetPMIX2(Float_t val, Int_t index1, Int_t index2) |
1450 | { |
1451 | Int_t col_num = (sizeof FRGPAR.pmix2[0] / sizeof FRGPAR.pmix2[0][0]); |
1452 | Int_t row_num = (sizeof FRGPAR.pmix2 / (sizeof FRGPAR.pmix2[0][0] * col_num)); |
1453 | |
1454 | if ((index1 < 0) || (index1 >= row_num)) { |
1455 | printf ("Error in TIsajet::SetPMIX2 : \n"); |
1456 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
1457 | return; |
1458 | } |
1459 | |
1460 | if ((index2 < 0) || (index2 >= col_num)) { |
1461 | printf ("Error in TIsajet::SetPMIX2 : \n"); |
1462 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
1463 | return; |
1464 | } |
1465 | |
1466 | FRGPAR.pmix2[index1][index2] = val; |
1467 | setFragment = true; |
1468 | } |
1469 | |
1470 | /**************************************************************************/ |
1471 | |
1472 | void TIsajet::SetAllPMIX2(const Float_t val[2][3]) |
1473 | { |
1474 | for (Int_t i = 0; i < 2; i++) { |
1475 | for (Int_t j = 0; j < 3; j++) { |
1476 | SetPMIX2(val[i][j], i, j); |
1477 | } |
1478 | } |
1479 | } |
1480 | |
1481 | /**************************************************************************/ |
1482 | |
1483 | void TIsajet::SetColumnPMIX2(const Float_t val[], Int_t col) |
1484 | { |
1485 | Int_t col_num = (sizeof FRGPAR.pmix2[0] / sizeof FRGPAR.pmix2[0][0]); |
1486 | Int_t row_num = (sizeof FRGPAR.pmix2 / (sizeof FRGPAR.pmix2[0][0] * col_num)); |
1487 | |
1488 | if ((col < 0) || (col >= col_num)) { |
1489 | printf ("Error in TIsajet::SetColumnPMIX2 : \n"); |
1490 | printf ("Invalid column index %d, range is 0-%d.\n", col, col_num-1); |
1491 | return; |
1492 | } |
1493 | |
1494 | for (Int_t i = 0; i < row_num; i++) { |
1495 | SetPMIX2(val[i], i, col); |
1496 | } |
1497 | } |
1498 | |
1499 | /**************************************************************************/ |
1500 | |
1501 | Float_t TIsajet::GetPMIX2(Int_t index1, Int_t index2) const |
1502 | { |
1503 | Int_t col_num = (sizeof FRGPAR.pmix2[0] / sizeof FRGPAR.pmix2[0][0]); |
1504 | Int_t row_num = (sizeof FRGPAR.pmix2 / (sizeof FRGPAR.pmix2[0][0] * col_num)); |
1505 | |
1506 | if ((index1 < 0) || (index1 >= row_num)) { |
1507 | printf ("Error in TIsajet::GetPMIX2 : \n"); |
1508 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
1509 | return 0; |
1510 | } |
1511 | |
1512 | if ((index2 < 0) || (index2 >= col_num)) { |
1513 | printf ("Error in TIsajet::GetPMIX2 : \n"); |
1514 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
1515 | return 0; |
1516 | } |
1517 | |
1518 | return FRGPAR.pmix2[index1][index2]; |
1519 | } |
1520 | |
1521 | /**************************************************************************/ |
1522 | |
1523 | void TIsajet::SetPMIXX1(Float_t val, Int_t index) |
1524 | { |
1525 | Int_t length = (sizeof FRGPAR.pmixx1 / sizeof FRGPAR.pmixx1[0]); |
1526 | if ((index < 0) || (index >= length)) { |
1527 | printf ("Error in TIsajet::SetPMIXX1 : \n"); |
1528 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1529 | return; |
1530 | } |
1531 | |
1532 | *FRGPAR.pmixx1[index] = val; |
1533 | setFragment = true; |
1534 | } |
1535 | |
1536 | /**************************************************************************/ |
1537 | |
1538 | void TIsajet::SetAllPMIXX1(const Float_t val[], Int_t arraySize) |
1539 | { |
1540 | Int_t length = (sizeof FRGPAR.pmixx1 / sizeof FRGPAR.pmixx1[0]); |
1541 | if (arraySize != length) { |
1542 | printf ("Error in TIsajet::SetAllPMIXX1 : \n"); |
1543 | printf ("Array must have %d elements.\n", length); |
1544 | return; |
1545 | } |
1546 | |
1547 | for (Int_t i = 0; i < arraySize; i++) { |
1548 | SetPMIXX1(val[i], i); |
1549 | } |
1550 | } |
1551 | |
1552 | /**************************************************************************/ |
1553 | |
1554 | Float_t TIsajet::GetPMIXX1(Int_t index) const |
1555 | { |
1556 | Int_t length = (sizeof FRGPAR.pmixx1 / sizeof FRGPAR.pmixx1[0]); |
1557 | if ((index < 0) || (index >= length)) { |
1558 | printf ("Error in TIsajet::GetPMIXX1 : \n"); |
1559 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1560 | return 0; |
1561 | } |
1562 | |
1563 | return *FRGPAR.pmixx1[index]; |
1564 | } |
1565 | |
1566 | /**************************************************************************/ |
1567 | |
1568 | void TIsajet::SetPMIXX2(Float_t val, Int_t index) |
1569 | { |
1570 | Int_t length = (sizeof FRGPAR.pmixx2 / sizeof FRGPAR.pmixx2[0]); |
1571 | if ((index < 0) || (index >= length)) { |
1572 | printf ("Error in TIsajet::SetPMIXX2 : \n"); |
1573 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1574 | return; |
1575 | } |
1576 | |
1577 | *FRGPAR.pmixx2[index] = val; |
1578 | setFragment = true; |
1579 | } |
1580 | |
1581 | /**************************************************************************/ |
1582 | |
1583 | void TIsajet::SetAllPMIXX2(const Float_t val[], Int_t arraySize) |
1584 | { |
1585 | Int_t length = (sizeof FRGPAR.pmixx2 / sizeof FRGPAR.pmixx2[0]); |
1586 | if (arraySize != length) { |
1587 | printf ("Error in TIsajet::SetAllPMIXX2 : \n"); |
1588 | printf ("Array must have %d elements.\n", length); |
1589 | return; |
1590 | } |
1591 | |
1592 | for (Int_t i = 0; i < arraySize; i++) { |
1593 | SetPMIXX2(val[i], i); |
1594 | } |
1595 | } |
1596 | |
1597 | /**************************************************************************/ |
1598 | |
1599 | Float_t TIsajet::GetPMIXX2(Int_t index) const |
1600 | { |
1601 | Int_t length = (sizeof FRGPAR.pmixx2 / sizeof FRGPAR.pmixx2[0]); |
1602 | if ((index < 0) || (index >= length)) { |
1603 | printf ("Error in TIsajet::GetPMIXX2 : \n"); |
1604 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1605 | return 0; |
1606 | } |
1607 | |
1608 | return *FRGPAR.pmixx2[index]; |
1609 | } |
1610 | |
1611 | /**************************************************************************/ |
1612 | |
1613 | void TIsajet::SetXGENSS(Float_t val, Int_t index) |
1614 | { |
1615 | Int_t length = (sizeof FRGPAR.xgenss / sizeof FRGPAR.xgenss[0]); |
1616 | if ((index < 0) || (index >= length)) { |
1617 | printf ("Error in TIsajet::SetXGENSS : \n"); |
1618 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1619 | return; |
1620 | } |
1621 | |
1622 | FRGPAR.xgenss[index] = val; |
1623 | } |
1624 | |
1625 | /**************************************************************************/ |
1626 | |
1627 | void TIsajet::SetAllXGENSS(const Float_t val[], Int_t arraySize) |
1628 | { |
1629 | Int_t length = (sizeof FRGPAR.xgenss / sizeof FRGPAR.xgenss[0]); |
1630 | if (arraySize != length) { |
1631 | printf ("Error in TIsajet::SetAllXGENSS : \n"); |
1632 | printf ("Array must have %d elements.\n", length); |
1633 | return; |
1634 | } |
1635 | |
1636 | for (Int_t i = 0; i < arraySize; i++) { |
1637 | SetXGENSS(val[i], i); |
1638 | } |
1639 | } |
1640 | |
1641 | /**************************************************************************/ |
1642 | |
1643 | Float_t TIsajet::GetXGENSS(Int_t index) const |
1644 | { |
1645 | Int_t length = (sizeof FRGPAR.xgenss / sizeof FRGPAR.xgenss[0]); |
1646 | if ((index < 0) || (index >= length)) { |
1647 | printf ("Error in TIsajet::GetXGENSS : \n"); |
1648 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1649 | return 0; |
1650 | } |
1651 | |
1652 | return FRGPAR.xgenss[index]; |
1653 | } |
1654 | |
1655 | /**************************************************************************/ |
1656 | |
1657 | // End of FRGPAR access. |
1658 | // Begins HCON access. |
1659 | |
1660 | /**************************************************************************/ |
1661 | |
1662 | Float_t TIsajet::GetANWWWW(Int_t index1, Int_t index2, Int_t index3) const |
1663 | { |
1664 | Int_t elem_Size = sizeof HCON.anwwww[0][0][0]; |
1665 | Int_t thd_Dim_Length = (sizeof HCON.anwwww[0][0] / elem_Size); |
1666 | Int_t sec_Dim_Length = (sizeof HCON.anwwww[0] / (elem_Size * thd_Dim_Length)); |
1667 | Int_t fst_Dim_Length = (sizeof HCON.anwwww / (elem_Size * thd_Dim_Length * sec_Dim_Length)); |
1668 | |
1669 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
1670 | printf ("Error in TIsajet::GetANWWWW : \n"); |
1671 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
1672 | return 0; |
1673 | } |
1674 | |
1675 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
1676 | printf ("Error in TIsajet::GetANWWWW : \n"); |
1677 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
1678 | return 0; |
1679 | } |
1680 | |
1681 | if ((index3 < 0) || (index3 >= thd_Dim_Length)) { |
1682 | printf ("Error in TIsajet::GetANWWWW : \n"); |
1683 | printf ("Invalid third index %d; range is 0-%d.\n", index3, thd_Dim_Length-1); |
1684 | return 0; |
1685 | } |
1686 | |
1687 | return HCON.anwwww[index1][index2][index3]; |
1688 | } |
1689 | |
1690 | /**************************************************************************/ |
1691 | |
1692 | Float_t TIsajet::GetADWWWW(Int_t index1, Int_t index2) const |
1693 | { |
1694 | Int_t elem_Size = sizeof HCON.adwwww[0][0]; |
1695 | Int_t sec_Dim_Length = (sizeof HCON.adwwww[0] / elem_Size); |
1696 | Int_t fst_Dim_Length = (sizeof HCON.adwwww / (elem_Size * sec_Dim_Length)); |
1697 | |
1698 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
1699 | printf ("Error in TIsajet::GetADWWWW : \n"); |
1700 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
1701 | return 0; |
1702 | } |
1703 | |
1704 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
1705 | printf ("Error in TIsajet::GetADWWWW : \n"); |
1706 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
1707 | return 0; |
1708 | } |
1709 | |
1710 | return HCON.adwwww[index1][index2]; |
1711 | } |
1712 | |
1713 | /**************************************************************************/ |
1714 | |
1715 | Float_t TIsajet::GetAIWWWW(Int_t index) const |
1716 | { |
1717 | Int_t length = (sizeof HCON.aiwwww / sizeof HCON.aiwwww[0]); |
1718 | if ((index < 0) || (index >= length)) { |
1719 | printf ("Error in TIsajet::GetAIWWWW : \n"); |
1720 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1721 | return 0; |
1722 | } |
1723 | |
1724 | return HCON.aiwwww[index]; |
1725 | } |
1726 | |
1727 | /**************************************************************************/ |
1728 | |
1729 | Float_t TIsajet::GetHMASS() const |
1730 | { |
1731 | return HCON.hmass; |
1732 | } |
1733 | |
1734 | /**************************************************************************/ |
1735 | |
1736 | Float_t TIsajet::GetHGAM() const |
1737 | { |
1738 | return HCON.hgam; |
1739 | } |
1740 | |
1741 | /**************************************************************************/ |
1742 | |
1743 | Float_t TIsajet::GetHGAMS(Int_t index) const |
1744 | { |
1745 | Int_t length = (sizeof HCON.hgams / sizeof HCON.hgams[0]); |
1746 | if ((index < 0) || (index >= length)) { |
1747 | printf ("Error in TIsajet::GetHGAMS : \n"); |
1748 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1749 | return 0; |
1750 | } |
1751 | |
1752 | return HCON.hgams[index]; |
1753 | } |
1754 | |
1755 | /**************************************************************************/ |
1756 | |
1757 | Float_t TIsajet::GetETAHGG() const |
1758 | { |
1759 | return HCON.etahgg; |
1760 | } |
1761 | |
1762 | /**************************************************************************/ |
1763 | |
1764 | Int_t TIsajet::GetMATCHH(Int_t index) const |
1765 | { |
1766 | Int_t length = (sizeof HCON.matchh / sizeof HCON.matchh[0]); |
1767 | if ((index < 0) || (index >= length)) { |
1768 | printf ("Error in TIsajet::GetMATCHH : \n"); |
1769 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1770 | return 0; |
1771 | } |
1772 | |
1773 | return HCON.matchh[index]; |
1774 | } |
1775 | |
1776 | /**************************************************************************/ |
1777 | |
1778 | Float_t TIsajet::GetZSTARS(Int_t index1, Int_t index2) const |
1779 | { |
1780 | Int_t elem_Size = sizeof HCON.zstars[0][0]; |
1781 | Int_t sec_Dim_Length = (sizeof HCON.zstars[0] / elem_Size); |
1782 | Int_t fst_Dim_Length = (sizeof HCON.zstars / (elem_Size * sec_Dim_Length)); |
1783 | |
1784 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
1785 | printf ("Error in TIsajet::GetZSTARS : \n"); |
1786 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
1787 | return 0; |
1788 | } |
1789 | |
1790 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
1791 | printf ("Error in TIsajet::GetZSTARS : \n"); |
1792 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
1793 | return 0; |
1794 | } |
1795 | |
1796 | return HCON.zstars[index1][index2]; |
1797 | } |
1798 | |
1799 | /**************************************************************************/ |
1800 | |
1801 | void TIsajet::SetIHTYPE(Int_t val) |
1802 | { |
1803 | if ((val < 82) || (val > 84)) { |
1804 | printf ("Error in TIsajet::SetIHTYPE : \n"); |
1805 | printf ("Invalid input value %d. Possible values are 82, 83, 84.\n", val); |
1806 | return; |
1807 | } |
1808 | |
1809 | HCON.ihtype = val; |
1810 | } |
1811 | |
1812 | /**************************************************************************/ |
1813 | |
1814 | void TIsajet::SetIHTYPE(Char_t val[]) |
1815 | { |
1816 | if (!strcmp("HL0", val)) { |
1817 | HCON.ihtype = 82; |
1818 | } |
1819 | else if (!strcmp("HH0", val)) { |
1820 | HCON.ihtype = 83; |
1821 | } |
1822 | else if (!strcmp("HA0", val)){ |
1823 | HCON.ihtype = 84; |
1824 | } |
1825 | else { |
1826 | printf ("Error in TIsajet::SetIHTYPE : \n"); |
1827 | printf ("Invalid input string %s. Possible strings are HL0, HH0, HA0.\n", val); |
1828 | } |
1829 | } |
1830 | |
1831 | /**************************************************************************/ |
1832 | |
1833 | Int_t TIsajet::GetIHTYPE() const |
1834 | { |
1835 | return HCON.ihtype; |
1836 | } |
1837 | |
1838 | /**************************************************************************/ |
1839 | |
1840 | Float_t TIsajet::GetHGAMSS(Int_t index1, Int_t index2) const |
1841 | { |
1842 | Int_t elem_Size = sizeof HCON.hgamss[0][0]; |
1843 | Int_t sec_Dim_Length = (sizeof HCON.hgamss[0] / elem_Size); |
1844 | Int_t fst_Dim_Length = (sizeof HCON.hgamss / (elem_Size * sec_Dim_Length)); |
1845 | |
1846 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
1847 | printf ("Error in TIsajet::GetHGAMSS : \n"); |
1848 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
1849 | return 0; |
1850 | } |
1851 | |
1852 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
1853 | printf ("Error in TIsajet::GetHGAMSS : \n"); |
1854 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
1855 | return 0; |
1856 | } |
1857 | |
1858 | return HCON.hgamss[index1][index2]; |
1859 | } |
1860 | |
1861 | /**************************************************************************/ |
1862 | |
1863 | // End of HCON access |
1864 | // Begins JETLIM access |
1865 | |
1866 | /**************************************************************************/ |
1867 | |
1868 | void TIsajet::SetPMIN(Float_t val, Int_t index) |
1869 | { |
1870 | Int_t length = (sizeof JETLIM.pmin / sizeof JETLIM.pmin[0]); |
1871 | if ((index < 0) || (index >= length)) { |
1872 | printf ("Error in TIsajet::SetPMIN : \n"); |
1873 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1874 | return; |
1875 | } |
1876 | |
1877 | if (val > JETLIM.pmax[index]) { |
1878 | printf("Error in TIsajet::SetPMIN : \n"); |
1879 | printf("You may not set PMIN to a value larger than PMAX = %f.\n", JETLIM.pmax[index]); |
1880 | return; |
1881 | } |
1882 | |
1883 | JETLIM.pmin[index] = val; |
1884 | setP = true; |
1885 | } |
1886 | |
1887 | /**************************************************************************/ |
1888 | |
1889 | void TIsajet::SetAllPMIN(const Float_t val[], Int_t arraySize) |
1890 | { |
1891 | Int_t length = (sizeof JETLIM.pmin / sizeof JETLIM.pmin[0]); |
1892 | if (arraySize != length) { |
1893 | printf ("Error in TIsajet::SetAllPMIN : \n"); |
1894 | printf ("Array must have %d elements.\n", length); |
1895 | return; |
1896 | } |
1897 | |
1898 | for (Int_t i = 0; i < arraySize; i++) { |
1899 | SetPMIN(val[i], i); |
1900 | } |
1901 | } |
1902 | |
1903 | /**************************************************************************/ |
1904 | |
1905 | Float_t TIsajet::GetPMIN(Int_t index) const |
1906 | { |
1907 | Int_t length = (sizeof JETLIM.pmin / sizeof JETLIM.pmin[0]); |
1908 | if ((index < 0) || (index >= length)) { |
1909 | printf ("Error in TIsajet::GetPMIN : \n"); |
1910 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1911 | return 0; |
1912 | } |
1913 | |
1914 | return JETLIM.pmin[index]; |
1915 | } |
1916 | |
1917 | /**************************************************************************/ |
1918 | |
1919 | void TIsajet::SetPMAX(Float_t val, Int_t index) |
1920 | { |
1921 | Int_t length = (sizeof JETLIM.pmax / sizeof JETLIM.pmax[0]); |
1922 | if ((index < 0) || (index >= length)) { |
1923 | printf ("Error in TIsajet::SetPMAX : \n"); |
1924 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1925 | return; |
1926 | } |
1927 | |
1928 | if (val < JETLIM.pmin[index]) { |
1929 | printf("Error in TIsajet::SetPMAX : \n"); |
1930 | printf("You may not set PMAX to a value larger than PMIN = %f.\n", JETLIM.pmin[index]); |
1931 | return; |
1932 | } |
1933 | |
1934 | JETLIM.pmax[index] = val; |
1935 | setP = true; |
1936 | } |
1937 | |
1938 | /**************************************************************************/ |
1939 | |
1940 | void TIsajet::SetAllPMAX(const Float_t val[], Int_t arraySize) |
1941 | { |
1942 | Int_t length = (sizeof JETLIM.pmax / sizeof JETLIM.pmax[0]); |
1943 | if (arraySize != length) { |
1944 | printf ("Error in TIsajet::SetAllPMAX : \n"); |
1945 | printf ("Array must have %d elements.\n", length); |
1946 | return; |
1947 | } |
1948 | |
1949 | for (Int_t i = 0; i < arraySize; i++) { |
1950 | SetPMAX(val[i], i); |
1951 | } |
1952 | } |
1953 | |
1954 | /**************************************************************************/ |
1955 | |
1956 | Float_t TIsajet::GetPMAX(Int_t index) const |
1957 | { |
1958 | Int_t length = (sizeof JETLIM.pmax / sizeof JETLIM.pmax[0]); |
1959 | if ((index < 0) || (index >= length)) { |
1960 | printf ("Error in TIsajet::GetPMAX : \n"); |
1961 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1962 | return 0; |
1963 | } |
1964 | |
1965 | return JETLIM.pmax[index]; |
1966 | } |
1967 | |
1968 | /**************************************************************************/ |
1969 | |
1970 | void TIsajet::SetPTMIN(Float_t val, Int_t index) |
1971 | { |
1972 | Int_t length = (sizeof JETLIM.ptmin / sizeof JETLIM.ptmin[0]); |
1973 | if ((index < 0) || (index >= length)) { |
1974 | printf ("Error in TIsajet::SetPTMIN : \n"); |
1975 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
1976 | return; |
1977 | } |
1978 | /* andreas 7/8/2001 |
1979 | if (val > JETLIM.ptmax[index]) { |
1980 | printf("Error in TIsajet::SetPTMIN : \n"); |
1981 | printf("You may not set PTMIN to a value larger than PTMAX = %f.\n", JETLIM.ptmax[index]); |
1982 | return; |
1983 | } |
1984 | */ |
1985 | JETLIM.ptmin[index] = val; |
1986 | // if (!setY) SetYJLIMS(); |
1987 | // if (!setTheta) SetTHLIMS(); |
1988 | setPt = true; |
1989 | } |
1990 | |
1991 | /**************************************************************************/ |
1992 | |
1993 | void TIsajet::SetAllPTMIN(const Float_t val[], Int_t arraySize) |
1994 | { |
1995 | Int_t length = (sizeof JETLIM.ptmin / sizeof JETLIM.ptmin[0]); |
1996 | if (arraySize != length) { |
1997 | printf ("Error in TIsajet::SetAllPTMIN : \n"); |
1998 | printf ("Array must have %d elements.\n", length); |
1999 | return; |
2000 | } |
2001 | |
2002 | for (Int_t i = 0; i < arraySize; i++) { |
2003 | SetPTMIN(val[i], i); |
2004 | } |
2005 | } |
2006 | |
2007 | /**************************************************************************/ |
2008 | |
2009 | Float_t TIsajet::GetPTMIN(Int_t index) const |
2010 | { |
2011 | Int_t length = (sizeof JETLIM.ptmin / sizeof JETLIM.ptmin[0]); |
2012 | if ((index < 0) || (index >= length)) { |
2013 | printf ("Error in TIsajet::GetPTMIN : \n"); |
2014 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2015 | return 0; |
2016 | } |
2017 | |
2018 | return JETLIM.ptmin[index]; |
2019 | } |
2020 | |
2021 | /**************************************************************************/ |
2022 | |
2023 | void TIsajet::SetPTMAX(Float_t val, Int_t index) |
2024 | { |
2025 | Int_t length = (sizeof JETLIM.ptmax / sizeof JETLIM.ptmax[0]); |
2026 | if ((index < 0) || (index >= length)) { |
2027 | printf ("Error in TIsajet::SetPTMAX : \n"); |
2028 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2029 | return; |
2030 | } |
2031 | |
2032 | if (val < JETLIM.ptmin[index]) { |
2033 | printf("Error in TIsajet::SetPTMAX : \n"); |
2034 | printf("You may not set PTMAX to a value larger than PTMIN = %f.\n", JETLIM.ptmin[index]); |
2035 | return; |
2036 | } |
2037 | |
2038 | JETLIM.ptmax[index] = val; |
2039 | setPt = true; |
2040 | } |
2041 | |
2042 | /**************************************************************************/ |
2043 | |
2044 | void TIsajet::SetAllPTMAX(const Float_t val[], Int_t arraySize) |
2045 | { |
2046 | Int_t length = (sizeof JETLIM.ptmax / sizeof JETLIM.ptmax[0]); |
2047 | if (arraySize != length) { |
2048 | printf ("Error in TIsajet::SetAllPTMAX : \n"); |
2049 | printf ("Array must have %d elements.\n", length); |
2050 | return; |
2051 | } |
2052 | |
2053 | for (Int_t i = 0; i < arraySize; i++) { |
2054 | SetPTMAX(val[i], i); |
2055 | } |
2056 | } |
2057 | |
2058 | /**************************************************************************/ |
2059 | |
2060 | Float_t TIsajet::GetPTMAX(Int_t index) const |
2061 | { |
2062 | Int_t length = (sizeof JETLIM.ptmax / sizeof JETLIM.ptmax[0]); |
2063 | if ((index < 0) || (index >= length)) { |
2064 | printf ("Error in TIsajet::GetPTMAX : \n"); |
2065 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2066 | return 0; |
2067 | } |
2068 | |
2069 | return JETLIM.ptmax[index]; |
2070 | } |
2071 | |
2072 | /**************************************************************************/ |
2073 | |
2074 | void TIsajet::SetYJMIN(Float_t val, Int_t index) |
2075 | { |
2076 | Int_t length = (sizeof JETLIM.yjmin / sizeof JETLIM.yjmin[0]); |
2077 | if ((index < 0) || (index >= length)) { |
2078 | printf ("Error in TIsajet::SetYJMIN : \n"); |
2079 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2080 | return; |
2081 | } |
2082 | |
2083 | if (val > JETLIM.yjmax[index]) { |
2084 | printf("Error in TIsajet::SetYJMIN : \n"); |
2085 | printf("You may not set YJMIN to a value larger than YJMAX = %f.\n", JETLIM.yjmax[index]); |
2086 | return; |
2087 | } |
2088 | |
2089 | if (setTheta) { |
2090 | printf("Error in TIsajet::SetYJMIN :\n"); |
2091 | printf("May not set both theta and y limits. Use SetTHLIMS, then set YJMIN.\n"); |
2092 | return; |
2093 | } |
2094 | |
2095 | setY = true; |
2096 | JETLIM.yjmin[index] = val; |
2097 | } |
2098 | |
2099 | /**************************************************************************/ |
2100 | |
2101 | void TIsajet::SetAllYJMIN(const Float_t val[], Int_t arraySize) |
2102 | { |
2103 | Int_t length = (sizeof JETLIM.yjmin / sizeof JETLIM.yjmin[0]); |
2104 | if (arraySize != length) { |
2105 | printf ("Error in TIsajet::SetAllYJMIN : \n"); |
2106 | printf ("Array must have %d elements.\n", length); |
2107 | return; |
2108 | } |
2109 | |
2110 | for (Int_t i = 0; i < arraySize; i++) { |
2111 | SetYJMIN(val[i], i); |
2112 | } |
2113 | } |
2114 | |
2115 | /**************************************************************************/ |
2116 | |
2117 | Float_t TIsajet::GetYJMIN(Int_t index) const |
2118 | { |
2119 | Int_t length = (sizeof JETLIM.yjmin / sizeof JETLIM.yjmin[0]); |
2120 | if ((index < 0) || (index >= length)) { |
2121 | printf ("Error in TIsajet::GetYJMIN : \n"); |
2122 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2123 | return 0; |
2124 | } |
2125 | |
2126 | return JETLIM.yjmin[index]; |
2127 | } |
2128 | |
2129 | /**************************************************************************/ |
2130 | |
2131 | void TIsajet::SetYJMAX(Float_t val, Int_t index) |
2132 | { |
2133 | Int_t length = (sizeof JETLIM.yjmax / sizeof JETLIM.yjmax[0]); |
2134 | if ((index < 0) || (index >= length)) { |
2135 | printf ("Error in TIsajet::SetYJMAX : \n"); |
2136 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2137 | return; |
2138 | } |
2139 | |
2140 | if (val < JETLIM.yjmin[index]) { |
2141 | printf("Error in TIsajet::SetYJMAX : \n"); |
2142 | printf("You may not set YJMAX to a value larger than YJMIN = %f.\n", JETLIM.yjmin[index]); |
2143 | return; |
2144 | } |
2145 | |
2146 | if (setTheta) { |
2147 | printf("Error in TIsajet::SetYJMAX :\n"); |
2148 | printf("May not set both theta and y limits. Use SetTHLIMS, then set YJMAX.\n"); |
2149 | return; |
2150 | } |
2151 | |
2152 | setY = true; |
2153 | JETLIM.yjmax[index] = val; |
2154 | } |
2155 | |
2156 | /**************************************************************************/ |
2157 | |
2158 | void TIsajet::SetAllYJMAX(const Float_t val[], Int_t arraySize) |
2159 | { |
2160 | Int_t length = (sizeof JETLIM.yjmax / sizeof JETLIM.yjmax[0]); |
2161 | if (arraySize != length) { |
2162 | printf ("Error in TIsajet::SetAllYJMAX : \n"); |
2163 | printf ("Array must have %d elements.\n", length); |
2164 | return; |
2165 | } |
2166 | |
2167 | for (Int_t i = 0; i < arraySize; i++) { |
2168 | SetYJMAX(val[i], i); |
2169 | } |
2170 | } |
2171 | |
2172 | /**************************************************************************/ |
2173 | |
2174 | Float_t TIsajet::GetYJMAX(Int_t index) const |
2175 | { |
2176 | Int_t length = (sizeof JETLIM.yjmax / sizeof JETLIM.yjmax[0]); |
2177 | if ((index < 0) || (index >= length)) { |
2178 | printf ("Error in TIsajet::GetYJMAX : \n"); |
2179 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2180 | return 0; |
2181 | } |
2182 | |
2183 | return JETLIM.yjmax[index]; |
2184 | } |
2185 | |
2186 | /**************************************************************************/ |
2187 | |
2188 | void TIsajet::SetYJLIMS() |
2189 | { |
2190 | for (Int_t i = 0; i < JETLIM.mxlim; i++) { |
2191 | JETLIM.yjmax[i] = acosh(PRIMAR.halfe / JETLIM.ptmin[i]); |
2192 | JETLIM.yjmax[i] = -JETLIM.yjmin[i]; |
2193 | } |
2194 | setY = false; |
2195 | } |
2196 | |
2197 | /**************************************************************************/ |
2198 | |
2199 | void TIsajet::SetPHIMIN(Float_t val, Int_t index) |
2200 | { |
2201 | Int_t length = (sizeof JETLIM.phimin / sizeof JETLIM.phimin[0]); |
2202 | if ((index < 0) || (index >= length)) { |
2203 | printf ("Error in TIsajet::SetPHIMIN : \n"); |
2204 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2205 | return; |
2206 | } |
2207 | |
2208 | if (val > JETLIM.phimax[index]) { |
2209 | printf("Error in TIsajet::SetPHIMIN : \n"); |
2210 | printf("You may not set PHIMIN to a value larger than PHIMAX = %f.\n", JETLIM.phimax[index]); |
2211 | return; |
2212 | } |
2213 | |
2214 | JETLIM.phimin[index] = val; |
2215 | setPhi = true; |
2216 | } |
2217 | |
2218 | /**************************************************************************/ |
2219 | |
2220 | void TIsajet::SetAllPHIMIN(const Float_t val[], Int_t arraySize) |
2221 | { |
2222 | Int_t length = (sizeof JETLIM.phimin / sizeof JETLIM.phimin[0]); |
2223 | if (arraySize != length) { |
2224 | printf ("Error in TIsajet::SetAllPHIMIN : \n"); |
2225 | printf ("Array must have %d elements.\n", length); |
2226 | return; |
2227 | } |
2228 | |
2229 | for (Int_t i = 0; i < arraySize; i++) { |
2230 | SetPHIMIN(val[i], i); |
2231 | } |
2232 | } |
2233 | |
2234 | /**************************************************************************/ |
2235 | |
2236 | Float_t TIsajet::GetPHIMIN(Int_t index) const |
2237 | { |
2238 | Int_t length = (sizeof JETLIM.phimin / sizeof JETLIM.phimin[0]); |
2239 | if ((index < 0) || (index >= length)) { |
2240 | printf ("Error in TIsajet::GetPHIMIN : \n"); |
2241 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2242 | return 0; |
2243 | } |
2244 | |
2245 | return JETLIM.phimin[index]; |
2246 | } |
2247 | |
2248 | /**************************************************************************/ |
2249 | |
2250 | void TIsajet::SetPHIMAX(Float_t val, Int_t index) |
2251 | { |
2252 | Int_t length = (sizeof JETLIM.phimax / sizeof JETLIM.phimax[0]); |
2253 | if ((index < 0) || (index >= length)) { |
2254 | printf ("Error in TIsajet::SetPHIMAX : \n"); |
2255 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2256 | return; |
2257 | } |
2258 | |
2259 | if (val < JETLIM.phimin[index]) { |
2260 | printf("Error in TIsajet::SetPHIMAX : \n"); |
2261 | printf("You may not set PHIMAX to a value larger than PHIMIN = %f.\n", JETLIM.phimin[index]); |
2262 | return; |
2263 | } |
2264 | |
2265 | JETLIM.phimax[index] = val; |
2266 | setPhi = true; |
2267 | } |
2268 | |
2269 | /**************************************************************************/ |
2270 | |
2271 | void TIsajet::SetAllPHIMAX(const Float_t val[], Int_t arraySize) |
2272 | { |
2273 | Int_t length = (sizeof JETLIM.phimax / sizeof JETLIM.phimax[0]); |
2274 | if (arraySize != length) { |
2275 | printf ("Error in TIsajet::SetAllPHIMAX : \n"); |
2276 | printf ("Array must have %d elements.\n", length); |
2277 | return; |
2278 | } |
2279 | |
2280 | for (Int_t i = 0; i < arraySize; i++) { |
2281 | SetPHIMAX(val[i], i); |
2282 | } |
2283 | } |
2284 | |
2285 | /**************************************************************************/ |
2286 | |
2287 | Float_t TIsajet::GetPHIMAX(Int_t index) const |
2288 | { |
2289 | Int_t length = (sizeof JETLIM.phimax / sizeof JETLIM.phimax[0]); |
2290 | if ((index < 0) || (index >= length)) { |
2291 | printf ("Error in TIsajet::GetPHIMAX : \n"); |
2292 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2293 | return 0; |
2294 | } |
2295 | |
2296 | return JETLIM.phimax[index]; |
2297 | } |
2298 | |
2299 | /**************************************************************************/ |
2300 | |
2301 | void TIsajet::SetXJMIN(Float_t val, Int_t index) |
2302 | { |
2303 | Int_t length = (sizeof JETLIM.xjmin / sizeof JETLIM.xjmin[0]); |
2304 | if ((index < 0) || (index >= length)) { |
2305 | printf ("Error in TIsajet::SetXJMIN : \n"); |
2306 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2307 | return; |
2308 | } |
2309 | if (val > JETLIM.xjmax[index]) { |
2310 | printf("Error in TIsajet::SetXJMIN : \n"); |
2311 | printf("You may not set XJMIN to a value larger than XJMAX = %f.\n", JETLIM.xjmax[index]); |
2312 | return; |
2313 | } |
2314 | |
2315 | JETLIM.xjmin[index] = val; |
2316 | setX = true; |
2317 | } |
2318 | |
2319 | /**************************************************************************/ |
2320 | |
2321 | void TIsajet::SetAllXJMIN(const Float_t val[], Int_t arraySize) |
2322 | { |
2323 | Int_t length = (sizeof JETLIM.xjmin / sizeof JETLIM.xjmin[0]); |
2324 | if (arraySize != length) { |
2325 | printf ("Error in TIsajet::SetAllXJMIN : \n"); |
2326 | printf ("Array must have %d elements.\n", length); |
2327 | return; |
2328 | } |
2329 | |
2330 | for (Int_t i = 0; i < arraySize; i++) { |
2331 | SetXJMIN(val[i], i); |
2332 | } |
2333 | } |
2334 | |
2335 | /**************************************************************************/ |
2336 | |
2337 | Float_t TIsajet::GetXJMIN(Int_t index) const |
2338 | { |
2339 | Int_t length = (sizeof JETLIM.xjmin / sizeof JETLIM.xjmin[0]); |
2340 | if ((index < 0) || (index >= length)) { |
2341 | printf ("Error in TIsajet::GetXJMIN : \n"); |
2342 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2343 | return 0; |
2344 | } |
2345 | |
2346 | return JETLIM.xjmin[index]; |
2347 | } |
2348 | |
2349 | /**************************************************************************/ |
2350 | |
2351 | void TIsajet::SetXJMAX(Float_t val, Int_t index) |
2352 | { |
2353 | Int_t length = (sizeof JETLIM.xjmax / sizeof JETLIM.xjmax[0]); |
2354 | if ((index < 0) || (index >= length)) { |
2355 | printf ("Error in TIsajet::SetXJMAX : \n"); |
2356 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2357 | return; |
2358 | } |
2359 | |
2360 | if (val < JETLIM.xjmin[index]) { |
2361 | printf("Error in TIsajet::SetXJMAX : \n"); |
2362 | printf("You may not set XJMAX to a value larger than XJMIN = %f.\n", JETLIM.xjmin[index]); |
2363 | return; |
2364 | } |
2365 | |
2366 | JETLIM.xjmax[index] = val; |
2367 | setX = true; |
2368 | } |
2369 | |
2370 | /**************************************************************************/ |
2371 | |
2372 | void TIsajet::SetAllXJMAX(const Float_t val[], Int_t arraySize) |
2373 | { |
2374 | Int_t length = (sizeof JETLIM.xjmax / sizeof JETLIM.xjmax[0]); |
2375 | if (arraySize != length) { |
2376 | printf ("Error in TIsajet::SetAllXJMAX : \n"); |
2377 | printf ("Array must have %d elements.\n", length); |
2378 | return; |
2379 | } |
2380 | |
2381 | for (Int_t i = 0; i < arraySize; i++) { |
2382 | SetXJMAX(val[i], i); |
2383 | } |
2384 | } |
2385 | |
2386 | /**************************************************************************/ |
2387 | |
2388 | Float_t TIsajet::GetXJMAX(Int_t index) const |
2389 | { |
2390 | Int_t length = (sizeof JETLIM.xjmax / sizeof JETLIM.xjmax[0]); |
2391 | if ((index < 0) || (index >= length)) { |
2392 | printf ("Error in TIsajet::GetXJMAX : \n"); |
2393 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2394 | return 0; |
2395 | } |
2396 | |
2397 | return JETLIM.xjmax[index]; |
2398 | } |
2399 | |
2400 | /**************************************************************************/ |
2401 | |
2402 | void TIsajet::SetTHMIN(Float_t val, Int_t index) |
2403 | { |
2404 | Int_t length = (sizeof JETLIM.thmin / sizeof JETLIM.thmin[0]); |
2405 | if ((index < 0) || (index >= length)) { |
2406 | printf ("Error in TIsajet::SetTHMIN : \n"); |
2407 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2408 | return; |
2409 | } |
2410 | |
2411 | if (val > JETLIM.thmax[index]) { |
2412 | printf("Error in TIsajet::SetTHMIN : \n"); |
2413 | printf("You may not set THMIN to a value larger than THMAX = %f.\n", JETLIM.thmax[index]); |
2414 | return; |
2415 | } |
2416 | |
2417 | if (setY) { |
2418 | printf("Error in TIsajet::SetTHMIN :\n"); |
2419 | printf("May not set both theta and y limits. Use SetYJLIMS, then set THMIN.\n"); |
2420 | return; |
2421 | } |
2422 | |
2423 | setTheta = true; |
2424 | JETLIM.thmin[index] = val; |
2425 | |
2426 | } |
2427 | |
2428 | /**************************************************************************/ |
2429 | |
2430 | void TIsajet::SetAllTHMIN(const Float_t val[], Int_t arraySize) |
2431 | { |
2432 | Int_t length = (sizeof JETLIM.thmin / sizeof JETLIM.thmin[0]); |
2433 | if (arraySize != length) { |
2434 | printf ("Error in TIsajet::SetAllTHMIN : \n"); |
2435 | printf ("Array must have %d elements.\n", length); |
2436 | return; |
2437 | } |
2438 | |
2439 | for (Int_t i = 0; i < arraySize; i++) { |
2440 | SetTHMIN(val[i], i); |
2441 | } |
2442 | } |
2443 | |
2444 | /**************************************************************************/ |
2445 | |
2446 | Float_t TIsajet::GetTHMIN(Int_t index) const |
2447 | { |
2448 | Int_t length = (sizeof JETLIM.thmin / sizeof JETLIM.thmin[0]); |
2449 | if ((index < 0) || (index >= length)) { |
2450 | printf ("Error in TIsajet::GetTHMIN : \n"); |
2451 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2452 | return 0; |
2453 | } |
2454 | |
2455 | return JETLIM.thmin[index]; |
2456 | } |
2457 | |
2458 | /**************************************************************************/ |
2459 | |
2460 | void TIsajet::SetTHMAX(Float_t val, Int_t index) |
2461 | { |
2462 | Int_t length = (sizeof JETLIM.thmax / sizeof JETLIM.thmax[0]); |
2463 | if ((index < 0) || (index >= length)) { |
2464 | printf ("Error in TIsajet::SetTHMAX : \n"); |
2465 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2466 | return; |
2467 | } |
2468 | |
2469 | if (val < JETLIM.thmin[index]) { |
2470 | printf("Error in TIsajet::SetTHMAX : \n"); |
2471 | printf("You may not set THMAX to a value larger than THMIN = %f.\n", JETLIM.thmin[index]); |
2472 | return; |
2473 | } |
2474 | |
2475 | if (setY) { |
2476 | printf("Error in TIsajet::SetTHMAX :\n"); |
2477 | printf("May not set both theta and y limits. Use SetYJLIMS, then set THMAX.\n"); |
2478 | return; |
2479 | } |
2480 | |
2481 | setTheta = true; |
2482 | JETLIM.thmax[index] = val; |
2483 | } |
2484 | |
2485 | /**************************************************************************/ |
2486 | |
2487 | void TIsajet::SetAllTHMAX(const Float_t val[], Int_t arraySize) |
2488 | { |
2489 | Int_t length = (sizeof JETLIM.thmax / sizeof JETLIM.thmax[0]); |
2490 | if (arraySize != length) { |
2491 | printf ("Error in TIsajet::SetAllTHMAX : \n"); |
2492 | printf ("Array must have %d elements.\n", length); |
2493 | return; |
2494 | } |
2495 | |
2496 | for (Int_t i = 0; i < arraySize; i++) { |
2497 | SetTHMAX(val[i], i); |
2498 | } |
2499 | } |
2500 | |
2501 | /**************************************************************************/ |
2502 | |
2503 | Float_t TIsajet::GetTHMAX(Int_t index) const |
2504 | { |
2505 | Int_t length = (sizeof JETLIM.thmax / sizeof JETLIM.thmax[0]); |
2506 | if ((index < 0) || (index >= length)) { |
2507 | printf ("Error in TIsajet::GetTHMAX : \n"); |
2508 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2509 | return 0; |
2510 | } |
2511 | |
2512 | return JETLIM.thmax[index]; |
2513 | } |
2514 | |
2515 | /**************************************************************************/ |
2516 | |
2517 | void TIsajet::SetTHLIMS() |
2518 | { |
2519 | Float_t tmin; |
2520 | for (Int_t i = 0; i < JETLIM.mxlim; i++) { |
2521 | tmin = acosh(PRIMAR.halfe / JETLIM.ptmin[i]); |
2522 | JETLIM.thmin[i] = 2*atan(exp(tmin)); |
2523 | JETLIM.thmax[i] = 2*atan(exp(-tmin)); |
2524 | } |
2525 | setTheta = false; |
2526 | } |
2527 | |
2528 | /**************************************************************************/ |
2529 | |
2530 | Bool_t TIsajet::GetSETLMJ(Int_t index) const |
2531 | { |
2532 | Int_t length = (sizeof JETLIM.setlmj / sizeof JETLIM.setlmj[0]); |
2533 | if ((index < 0) || (index >= length)) { |
2534 | printf ("Error in TIsajet::GetSETLMJ : \n"); |
2535 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2536 | return 0; |
2537 | } |
2538 | |
2539 | return JETLIM.setlmj[index]; |
2540 | } |
2541 | |
2542 | /**************************************************************************/ |
2543 | |
2544 | // Ends JETLIM access. |
2545 | // Begins JETPAR access. |
2546 | |
2547 | /**************************************************************************/ |
2548 | |
2549 | Float_t TIsajet::GetP(Int_t index) const |
2550 | { |
2551 | Int_t length = (sizeof JETPAR.p / sizeof JETPAR.p[0]); |
2552 | if ((index < 0) || (index >= length)) { |
2553 | printf ("Error in TIsajet::GetP : \n"); |
2554 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2555 | return 0; |
2556 | } |
2557 | |
2558 | return JETPAR.p[index]; |
2559 | } |
2560 | |
2561 | /**************************************************************************/ |
2562 | |
2563 | Float_t TIsajet::GetPT(Int_t index) const |
2564 | { |
2565 | Int_t length = (sizeof JETPAR.pt / sizeof JETPAR.pt[0]); |
2566 | if ((index < 0) || (index >= length)) { |
2567 | printf ("Error in TIsajet::GetPT : \n"); |
2568 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2569 | return 0; |
2570 | } |
2571 | |
2572 | return JETPAR.pt[index]; |
2573 | } |
2574 | |
2575 | /**************************************************************************/ |
2576 | |
2577 | Float_t TIsajet::GetYJ(Int_t index) const |
2578 | { |
2579 | Int_t length = (sizeof JETPAR.yj / sizeof JETPAR.yj[0]); |
2580 | if ((index < 0) || (index >= length)) { |
2581 | printf ("Error in TIsajet::GetYJ : \n"); |
2582 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2583 | return 0; |
2584 | } |
2585 | |
2586 | return JETPAR.yj[index]; |
2587 | } |
2588 | |
2589 | /**************************************************************************/ |
2590 | |
2591 | Float_t TIsajet::GetPHI(Int_t index) const |
2592 | { |
2593 | Int_t length = (sizeof JETPAR.phi / sizeof JETPAR.phi[0]); |
2594 | if ((index < 0) || (index >= length)) { |
2595 | printf ("Error in TIsajet::GetPHI : \n"); |
2596 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2597 | return 0; |
2598 | } |
2599 | |
2600 | return JETPAR.phi[index]; |
2601 | } |
2602 | |
2603 | /**************************************************************************/ |
2604 | |
2605 | Float_t TIsajet::GetXJ(Int_t index) const |
2606 | { |
2607 | Int_t length = (sizeof JETPAR.xj / sizeof JETPAR.xj[0]); |
2608 | if ((index < 0) || (index >= length)) { |
2609 | printf ("Error in TIsajet::GetXJ : \n"); |
2610 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2611 | return 0; |
2612 | } |
2613 | |
2614 | return JETPAR.xj[index]; |
2615 | } |
2616 | |
2617 | /**************************************************************************/ |
2618 | |
2619 | Float_t TIsajet::GetTH(Int_t index) const |
2620 | { |
2621 | Int_t length = (sizeof JETPAR.th / sizeof JETPAR.th[0]); |
2622 | if ((index < 0) || (index >= length)) { |
2623 | printf ("Error in TIsajet::GetTH : \n"); |
2624 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2625 | return 0; |
2626 | } |
2627 | |
2628 | return JETPAR.th[index]; |
2629 | } |
2630 | |
2631 | /**************************************************************************/ |
2632 | |
2633 | Float_t TIsajet::GetCTH(Int_t index) const |
2634 | { |
2635 | Int_t length = (sizeof JETPAR.cth / sizeof JETPAR.cth[0]); |
2636 | if ((index < 0) || (index >= length)) { |
2637 | printf ("Error in TIsajet::GetCTH : \n"); |
2638 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2639 | return 0; |
2640 | } |
2641 | |
2642 | return JETPAR.cth[index]; |
2643 | } |
2644 | |
2645 | /**************************************************************************/ |
2646 | |
2647 | Float_t TIsajet::GetSTH(Int_t index) const |
2648 | { |
2649 | Int_t length = (sizeof JETPAR.sth / sizeof JETPAR.sth[0]); |
2650 | if ((index < 0) || (index >= length)) { |
2651 | printf ("Error in TIsajet::GetSTH : \n"); |
2652 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2653 | return 0; |
2654 | } |
2655 | |
2656 | return JETPAR.sth[index]; |
2657 | } |
2658 | |
2659 | /**************************************************************************/ |
2660 | |
2661 | Int_t TIsajet::GetJETTYP(Int_t index) const |
2662 | { |
2663 | Int_t length = (sizeof JETPAR.jettyp / sizeof JETPAR.jettyp[0]); |
2664 | if ((index < 0) || (index >= length)) { |
2665 | printf ("Error in TIsajet::GetJETTYP : \n"); |
2666 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2667 | return 0; |
2668 | } |
2669 | |
2670 | return JETPAR.jettyp[index]; |
2671 | } |
2672 | |
2673 | /**************************************************************************/ |
2674 | |
2675 | Float_t TIsajet::GetSHAT() const |
2676 | { |
2677 | return JETPAR.shat; |
2678 | } |
2679 | |
2680 | /**************************************************************************/ |
2681 | |
2682 | Float_t TIsajet::GetTHAT() const |
2683 | { |
2684 | return JETPAR.that; |
2685 | } |
2686 | |
2687 | /**************************************************************************/ |
2688 | |
2689 | Float_t TIsajet::GetUHAT() const |
2690 | { |
2691 | return JETPAR.uhat; |
2692 | } |
2693 | |
2694 | /**************************************************************************/ |
2695 | |
2696 | Float_t TIsajet::GetQSQ() const |
2697 | { |
2698 | return JETPAR.qsq; |
2699 | } |
2700 | |
2701 | /**************************************************************************/ |
2702 | |
2703 | Float_t TIsajet::GetX1() const |
2704 | { |
2705 | return JETPAR.x1; |
2706 | } |
2707 | |
2708 | /**************************************************************************/ |
2709 | |
2710 | Float_t TIsajet::GetX2() const |
2711 | { |
2712 | return JETPAR.x2; |
2713 | } |
2714 | |
2715 | /**************************************************************************/ |
2716 | |
2717 | Float_t TIsajet::GetPBEAM(Int_t index) const |
2718 | { |
2719 | Int_t length = (sizeof JETPAR.pbeam / sizeof JETPAR.pbeam[0]); |
2720 | if ((index < 0) || (index >= length)) { |
2721 | printf ("Error in TIsajet::GetPBEAM : \n"); |
2722 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2723 | return 0; |
2724 | } |
2725 | |
2726 | return JETPAR.pbeam[index]; |
2727 | } |
2728 | |
2729 | /**************************************************************************/ |
2730 | |
2731 | Float_t TIsajet::GetQMW() const |
2732 | { |
2733 | return JETPAR.qmw; |
2734 | } |
2735 | |
2736 | /**************************************************************************/ |
2737 | |
2738 | Float_t TIsajet::GetQW() const |
2739 | { |
2740 | return JETPAR.qw; |
2741 | } |
2742 | |
2743 | /**************************************************************************/ |
2744 | |
2745 | Float_t TIsajet::GetQTW() const |
2746 | { |
2747 | return JETPAR.qtw; |
2748 | } |
2749 | |
2750 | /**************************************************************************/ |
2751 | |
2752 | Float_t TIsajet::GetYW() const |
2753 | { |
2754 | return JETPAR.yw; |
2755 | } |
2756 | |
2757 | /**************************************************************************/ |
2758 | |
2759 | Float_t TIsajet::GetXW() const |
2760 | { |
2761 | return JETPAR.xw; |
2762 | } |
2763 | |
2764 | /**************************************************************************/ |
2765 | |
2766 | Float_t TIsajet::GetTHW() const |
2767 | { |
2768 | return JETPAR.thw; |
2769 | } |
2770 | |
2771 | /**************************************************************************/ |
2772 | |
2773 | Float_t TIsajet::GetQTMW() const |
2774 | { |
2775 | return JETPAR.qtmw; |
2776 | } |
2777 | |
2778 | /**************************************************************************/ |
2779 | |
2780 | Float_t TIsajet::GetPHIW() const |
2781 | { |
2782 | return JETPAR.phiw; |
2783 | } |
2784 | |
2785 | /**************************************************************************/ |
2786 | |
2787 | Float_t TIsajet::GetSHAT1() const |
2788 | { |
2789 | return JETPAR.shat1; |
2790 | } |
2791 | |
2792 | /**************************************************************************/ |
2793 | |
2794 | Float_t TIsajet::GetTHAT1() const |
2795 | { |
2796 | return JETPAR.that1; |
2797 | } |
2798 | |
2799 | /**************************************************************************/ |
2800 | |
2801 | Float_t TIsajet::GetUHAT1() const |
2802 | { |
2803 | return JETPAR.uhat1; |
2804 | } |
2805 | |
2806 | /**************************************************************************/ |
2807 | |
2808 | void TIsajet::SetJWTYP(Int_t val) |
2809 | { |
2810 | if ((val < 1) || (val > 4) || (val == 2)) |
2811 | { |
2812 | printf ("Error in TIsajet::SetJWTYP : \n"); |
2813 | printf ("Invalid value %d; range is 1, 3, and 4.\n", val); |
2814 | return; |
2815 | } |
2816 | |
2817 | JETPAR.jwtyp = val; |
2818 | } |
2819 | |
2820 | /**************************************************************************/ |
2821 | |
2822 | void TIsajet::SetJWTYP(Char_t val[]) |
2823 | { |
2824 | Int_t value; |
2825 | |
2826 | if (!strcmp(val, "GM")) value = 1; |
2827 | else if (!strcmp(val, "W+")) value = 3; |
2828 | else if (!strcmp(val, "W-")) value = 3; |
2829 | else if (!strcmp(val, "Z0")) value = 4; |
2830 | else |
2831 | { |
2832 | printf ("Error in TIsajet::SetJWTYP : \n"); |
2833 | printf ("Invalid value %s; possible are GM, Z0, W+ and W-.\n", val); |
2834 | return; |
2835 | } |
2836 | |
2837 | |
2838 | JETPAR.jwtyp = value; |
2839 | } |
2840 | |
2841 | /**************************************************************************/ |
2842 | |
2843 | Int_t TIsajet::GetJWTYP() const |
2844 | { |
2845 | return JETPAR.jwtyp; |
2846 | } |
2847 | |
2848 | /**************************************************************************/ |
2849 | |
2850 | Float_t TIsajet::GetALFQSQ() const |
2851 | { |
2852 | return JETPAR.alfqsq; |
2853 | } |
2854 | |
2855 | /**************************************************************************/ |
2856 | |
2857 | Float_t TIsajet::GetCTHW() const |
2858 | { |
2859 | return JETPAR.cthw; |
2860 | } |
2861 | |
2862 | /**************************************************************************/ |
2863 | |
2864 | Float_t TIsajet::GetSTHW() const |
2865 | { |
2866 | return JETPAR.sthw; |
2867 | } |
2868 | |
2869 | /**************************************************************************/ |
2870 | |
2871 | Float_t TIsajet::GetQ0W() const |
2872 | { |
2873 | return JETPAR.q0w; |
2874 | } |
2875 | |
2876 | /**************************************************************************/ |
2877 | |
2878 | Int_t TIsajet::GetINITYP(Int_t index) const |
2879 | { |
2880 | Int_t length = (sizeof JETPAR.inityp / sizeof JETPAR.inityp[0]); |
2881 | if ((index < 0) || (index >= length)) { |
2882 | printf ("Error in TIsajet::GetINITYP : \n"); |
2883 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2884 | return 0; |
2885 | } |
2886 | |
2887 | return JETPAR.inityp[index]; |
2888 | } |
2889 | |
2890 | /**************************************************************************/ |
2891 | |
2892 | Int_t TIsajet::GetISIGS() const |
2893 | { |
2894 | return JETPAR.isigs; |
2895 | } |
2896 | |
2897 | /**************************************************************************/ |
2898 | |
2899 | Float_t TIsajet::GetPBEAMS(Int_t index) const |
2900 | { |
2901 | Int_t length = (sizeof JETPAR.pbeams / sizeof JETPAR.pbeams[0]); |
2902 | if ((index < 0) || (index >= length)) { |
2903 | printf ("Error in TIsajet::GetPBEAMS : \n"); |
2904 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2905 | return 0; |
2906 | } |
2907 | |
2908 | return JETPAR.pbeams[index]; |
2909 | } |
2910 | |
2911 | /**************************************************************************/ |
2912 | |
2913 | // Ends JETPAR access. |
2914 | // Begins KKGRAV access. |
2915 | |
2916 | /**************************************************************************/ |
2917 | |
2918 | void TIsajet::SetNEXTRAD(Int_t val) |
2919 | { |
2920 | KKGRAV.nextrad = val; |
2921 | } |
2922 | |
2923 | /**************************************************************************/ |
2924 | |
2925 | Int_t TIsajet::GetNEXTRAD() const |
2926 | { |
2927 | return KKGRAV.nextrad; |
2928 | } |
2929 | |
2930 | /**************************************************************************/ |
2931 | |
2932 | void TIsajet::SetMASSD(Float_t val) |
2933 | { |
2934 | KKGRAV.massd = val; |
2935 | } |
2936 | |
2937 | /**************************************************************************/ |
2938 | |
2939 | Float_t TIsajet::GetMASSD() const |
2940 | { |
2941 | return KKGRAV.massd; |
2942 | } |
2943 | |
2944 | /**************************************************************************/ |
2945 | |
2946 | Float_t TIsajet::GetKKGSD() const |
2947 | { |
2948 | return KKGRAV.kkgsd; |
2949 | } |
2950 | |
2951 | /**************************************************************************/ |
2952 | |
2953 | Float_t TIsajet::GetSURFD() const |
2954 | { |
2955 | return KKGRAV.surfd; |
2956 | } |
2957 | |
2958 | /**************************************************************************/ |
2959 | |
2960 | void TIsajet::SetUVCUT(Bool_t val) |
2961 | { |
2962 | KKGRAV.uvcut = val; |
2963 | } |
2964 | |
2965 | /**************************************************************************/ |
2966 | |
2967 | Bool_t TIsajet::GetUVCUT() const |
2968 | { |
2969 | return KKGRAV.uvcut; |
2970 | } |
2971 | |
2972 | /**************************************************************************/ |
2973 | |
2974 | // Ends KKGRAV access. |
2975 | // Begins MBGEN access. |
2976 | |
2977 | /**************************************************************************/ |
2978 | |
2979 | Float_t TIsajet::GetPOMWT(Int_t index) const |
2980 | { |
2981 | Int_t length = (sizeof MBGEN.pomwt / sizeof MBGEN.pomwt[0]); |
2982 | if ((index < 0) || (index >= length)) { |
2983 | printf ("Error in TIsajet::GetPOMWT : \n"); |
2984 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2985 | return 0; |
2986 | } |
2987 | |
2988 | return MBGEN.pomwt[index]; |
2989 | } |
2990 | |
2991 | /**************************************************************************/ |
2992 | |
2993 | Float_t TIsajet::GetPOMGEN(Int_t index) const |
2994 | { |
2995 | Int_t length = (sizeof MBGEN.pomgen / sizeof MBGEN.pomgen[0]); |
2996 | if ((index < 0) || (index >= length)) { |
2997 | printf ("Error in TIsajet::GetPOMGEN : \n"); |
2998 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
2999 | return 0; |
3000 | } |
3001 | |
3002 | return MBGEN.pomgen[index]; |
3003 | } |
3004 | |
3005 | /**************************************************************************/ |
3006 | |
3007 | void TIsajet::SetMNPOM(Int_t val) |
3008 | { |
3009 | if (val > MBGEN.mxpom) { |
3010 | printf("Error in TIsajet::SetMNPOM : \n"); |
3011 | printf("You may not set MNPOM to a value larger than MXPOM = %d.\n", MBGEN.mxpom); |
3012 | return; |
3013 | } |
3014 | |
3015 | MBGEN.mnpom = val; |
3016 | } |
3017 | |
3018 | /**************************************************************************/ |
3019 | |
3020 | Int_t TIsajet::GetMNPOM() const |
3021 | { |
3022 | return MBGEN.mnpom; |
3023 | } |
3024 | |
3025 | /**************************************************************************/ |
3026 | |
3027 | void TIsajet::SetMXPOM(Int_t val) |
3028 | { |
3029 | if (val < MBGEN.mnpom) { |
3030 | printf("Error in TIsajet::SetMXPOM : \n"); |
3031 | printf("You may not set MXPOM to a value less than MNPOM = %d.\n", MBGEN.mnpom); |
3032 | return; |
3033 | } |
3034 | |
3035 | MBGEN.mxpom = val; |
3036 | } |
3037 | |
3038 | /**************************************************************************/ |
3039 | |
3040 | Int_t TIsajet::GetMXPOM() const |
3041 | { |
3042 | return MBGEN.mxpom; |
3043 | } |
3044 | |
3045 | /**************************************************************************/ |
3046 | |
3047 | Float_t TIsajet::GetPDIFFR() const |
3048 | { |
3049 | return MBGEN.pdiffr; |
3050 | } |
3051 | |
3052 | /**************************************************************************/ |
3053 | |
3054 | Int_t TIsajet::GetNPOM() const |
3055 | { |
3056 | return MBGEN.npom; |
3057 | } |
3058 | |
3059 | /**************************************************************************/ |
3060 | |
3061 | Float_t TIsajet::GetXBARY(Int_t index) const |
3062 | { |
3063 | Int_t length = (sizeof MBGEN.xbary / sizeof MBGEN.xbary[0]); |
3064 | if ((index < 0) || (index >= length)) { |
3065 | printf ("Error in TIsajet::GetXBARY : \n"); |
3066 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3067 | return 0; |
3068 | } |
3069 | |
3070 | return MBGEN.xbary[index]; |
3071 | } |
3072 | |
3073 | /**************************************************************************/ |
3074 | |
3075 | Float_t TIsajet::GetDXBARY(Int_t index) const |
3076 | { |
3077 | Int_t length = (sizeof MBGEN.dxbary / sizeof MBGEN.dxbary[0]); |
3078 | if ((index < 0) || (index >= length)) { |
3079 | printf ("Error in TIsajet::GetDXBARY : \n"); |
3080 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3081 | return 0; |
3082 | } |
3083 | |
3084 | return MBGEN.dxbary[index]; |
3085 | } |
3086 | |
3087 | /**************************************************************************/ |
3088 | |
3089 | Float_t TIsajet::GetXPOM(Int_t index1, Int_t index2) const |
3090 | { |
3091 | Int_t elem_Size = sizeof MBGEN.xpom[0][0]; |
3092 | Int_t sec_Dim_Length = (sizeof MBGEN.xpom[0] / elem_Size); |
3093 | Int_t fst_Dim_Length = (sizeof MBGEN.xpom / (elem_Size * sec_Dim_Length)); |
3094 | |
3095 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
3096 | printf ("Error in TIsajet::GetXPOM : \n"); |
3097 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
3098 | return 0; |
3099 | } |
3100 | |
3101 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
3102 | printf ("Error in TIsajet::GetXPOM : \n"); |
3103 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
3104 | return 0; |
3105 | } |
3106 | |
3107 | return MBGEN.xpom[index1][index2]; |
3108 | } |
3109 | |
3110 | /**************************************************************************/ |
3111 | |
3112 | // Ends MBGEN access. |
3113 | // Begins MGLIMS access. |
3114 | |
3115 | /**************************************************************************/ |
3116 | |
3117 | void TIsajet::SetEHMGMN(Float_t val) |
3118 | { |
3119 | if (val > MGLIMS.ehmgmx) { |
3120 | printf("Error in TIsajet::SetEHMGMN : \n"); |
3121 | printf("You may not set EHMGMN to a value larger than EHMGMX = %f.\n", MGLIMS.ehmgmx); |
3122 | return; |
3123 | } |
3124 | |
3125 | MGLIMS.ehmgmn = val; |
3126 | } |
3127 | |
3128 | /**************************************************************************/ |
3129 | |
3130 | Float_t TIsajet::GetEHMGMN() const |
3131 | { |
3132 | return MGLIMS.ehmgmn; |
3133 | } |
3134 | |
3135 | /**************************************************************************/ |
3136 | |
3137 | void TIsajet::SetEHMGMX(Float_t val) |
3138 | { |
3139 | if (val < MGLIMS.ehmgmn) { |
3140 | printf("Error in TIsajet::SetEHMGMX : \n"); |
3141 | printf("You may not set EHMGMX to a value less than EHMGMN = %f.\n", MGLIMS.ehmgmn); |
3142 | return; |
3143 | } |
3144 | |
3145 | MGLIMS.ehmgmx = val; |
3146 | } |
3147 | |
3148 | /**************************************************************************/ |
3149 | |
3150 | Float_t TIsajet::GetEHMGMX() const |
3151 | { |
3152 | return MGLIMS.ehmgmx; |
3153 | } |
3154 | |
3155 | /**************************************************************************/ |
3156 | |
3157 | Float_t TIsajet::GetYHMGMN() const |
3158 | { |
3159 | return MGLIMS.yhmgmn; |
3160 | } |
3161 | |
3162 | /**************************************************************************/ |
3163 | |
3164 | Float_t TIsajet::GetYHMGMX() const |
3165 | { |
3166 | return MGLIMS.yhmgmx; |
3167 | } |
3168 | |
3169 | /**************************************************************************/ |
3170 | |
3171 | void TIsajet::SetAMIJMN(Float_t val, Int_t index1, Int_t index2) |
3172 | { |
3173 | Int_t col_num = (sizeof MGLIMS.amijmn[0] / sizeof MGLIMS.amijmn[0][0]); |
3174 | Int_t row_num = (sizeof MGLIMS.amijmn / (sizeof MGLIMS.amijmn[0][0] * col_num)); |
3175 | |
3176 | if ((index1 < 0) || (index1 >= row_num)) { |
3177 | printf ("Error in TIsajet::SetAMIJMN : \n"); |
3178 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
3179 | return; |
3180 | } |
3181 | |
3182 | if ((index2 < 0) || (index2 >= col_num)) { |
3183 | printf ("Error in TIsajet::SetAMIJMN : \n"); |
3184 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
3185 | return; |
3186 | } |
3187 | |
3188 | if (val > MGLIMS.amijmx[index1][index2]) { |
3189 | printf("Error in TIsajet::SetAMIJMN : \n"); |
3190 | printf("You may not set AMIJMN to a value larger than AMIJMX = %f.\n", MGLIMS.amijmx[index1][index2]); |
3191 | return; |
3192 | } |
3193 | |
3194 | MGLIMS.amijmn[index1][index2] = val; |
3195 | } |
3196 | |
3197 | /**************************************************************************/ |
3198 | |
3199 | void TIsajet::SetAllAMIJMN(const Float_t val[MGLIMS.mxlim][MGLIMS.mxlim]) |
3200 | { |
3201 | for (Int_t i = 0; i < 2; i++) { |
3202 | for (Int_t j = 0; j < 3; j++) { |
3203 | SetAMIJMN(val[i][j], i, j); |
3204 | } |
3205 | } |
3206 | } |
3207 | |
3208 | /**************************************************************************/ |
3209 | |
3210 | void TIsajet::SetColumnAMIJMN(const Float_t val[], Int_t col) |
3211 | { |
3212 | Int_t col_num = (sizeof MGLIMS.amijmn[0] / sizeof MGLIMS.amijmn[0][0]); |
3213 | Int_t row_num = (sizeof MGLIMS.amijmn / (sizeof MGLIMS.amijmn[0][0] * col_num)); |
3214 | |
3215 | if ((col < 0) || (col >= col_num)) { |
3216 | printf ("Error in TIsajet::SetColumnAMIJMN : \n"); |
3217 | printf ("Invalid column index %d, range is 0-%d.\n", col, col_num-1); |
3218 | return; |
3219 | } |
3220 | |
3221 | for (Int_t i = 0; i < row_num; i++) { |
3222 | SetAMIJMN(val[i], i, col); |
3223 | } |
3224 | } |
3225 | |
3226 | /**************************************************************************/ |
3227 | |
3228 | Float_t TIsajet::GetAMIJMN(Int_t index1, Int_t index2) const |
3229 | { |
3230 | Int_t col_num = (sizeof MGLIMS.amijmn[0] / sizeof MGLIMS.amijmn[0][0]); |
3231 | Int_t row_num = (sizeof MGLIMS.amijmn / (sizeof MGLIMS.amijmn[0][0] * col_num)); |
3232 | |
3233 | if ((index1 < 0) || (index1 >= row_num)) { |
3234 | printf ("Error in TIsajet::GetAMIJMN : \n"); |
3235 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
3236 | return 0; |
3237 | } |
3238 | |
3239 | if ((index2 < 0) || (index2 >= col_num)) { |
3240 | printf ("Error in TIsajet::GetAMIJMN : \n"); |
3241 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
3242 | return 0; |
3243 | } |
3244 | |
3245 | return MGLIMS.amijmn[index1][index2]; |
3246 | } |
3247 | |
3248 | /**************************************************************************/ |
3249 | |
3250 | void TIsajet::SetAMIJMX(Float_t val, Int_t index1, Int_t index2) |
3251 | { |
3252 | Int_t col_num = (sizeof MGLIMS.amijmx[0] / sizeof MGLIMS.amijmx[0][0]); |
3253 | Int_t row_num = (sizeof MGLIMS.amijmx / (sizeof MGLIMS.amijmx[0][0] * col_num)); |
3254 | |
3255 | if ((index1 < 0) || (index1 >= row_num)) { |
3256 | printf ("Error in TIsajet::SetAMIJMX : \n"); |
3257 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
3258 | return; |
3259 | } |
3260 | |
3261 | if ((index2 < 0) || (index2 >= col_num)) { |
3262 | printf ("Error in TIsajet::SetAMIJMX : \n"); |
3263 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
3264 | return; |
3265 | } |
3266 | |
3267 | if (val < MGLIMS.amijmn[index1][index2]) { |
3268 | printf("Error in TIsajet::SetAMIJMX : \n"); |
3269 | printf("You may not set AMIJMX to a value less than AMIJMN = %f.\n", MGLIMS.amijmn[index1][index2]); |
3270 | return; |
3271 | } |
3272 | |
3273 | MGLIMS.amijmx[index1][index2] = val; |
3274 | } |
3275 | |
3276 | /**************************************************************************/ |
3277 | |
3278 | void TIsajet::SetAllAMIJMX(const Float_t val[MGLIMS.mxlim][MGLIMS.mxlim]) |
3279 | { |
3280 | for (Int_t i = 0; i < 2; i++) { |
3281 | for (Int_t j = 0; j < 3; j++) { |
3282 | SetAMIJMX(val[i][j], i, j); |
3283 | } |
3284 | } |
3285 | } |
3286 | |
3287 | /**************************************************************************/ |
3288 | |
3289 | void TIsajet::SetColumnAMIJMX(const Float_t val[], Int_t col) |
3290 | { |
3291 | Int_t col_num = (sizeof MGLIMS.amijmx[0] / sizeof MGLIMS.amijmx[0][0]); |
3292 | Int_t row_num = (sizeof MGLIMS.amijmx / (sizeof MGLIMS.amijmx[0][0] * col_num)); |
3293 | |
3294 | if ((col < 0) || (col >= col_num)) { |
3295 | printf ("Error in TIsajet::SetColumnAMIJMX : \n"); |
3296 | printf ("Invalid column index %d, range is 0-%d.\n", col, col_num-1); |
3297 | return; |
3298 | } |
3299 | |
3300 | for (Int_t i = 0; i < row_num; i++) { |
3301 | SetAMIJMX(val[i], i, col); |
3302 | } |
3303 | } |
3304 | |
3305 | /**************************************************************************/ |
3306 | |
3307 | Float_t TIsajet::GetAMIJMX(Int_t index1, Int_t index2) const |
3308 | { |
3309 | Int_t col_num = (sizeof MGLIMS.amijmx[0] / sizeof MGLIMS.amijmx[0][0]); |
3310 | Int_t row_num = (sizeof MGLIMS.amijmx / (sizeof MGLIMS.amijmx[0][0] * col_num)); |
3311 | |
3312 | if ((index1 < 0) || (index1 >= row_num)) { |
3313 | printf ("Error in TIsajet::GetAMIJMX : \n"); |
3314 | printf ("Invalid array row index %d; range is 0-%d.\n", index1, row_num-1); |
3315 | return 0; |
3316 | } |
3317 | |
3318 | if ((index2 < 0) || (index2 >= col_num)) { |
3319 | printf ("Error in TIsajet::GetAMIJMX : \n"); |
3320 | printf ("Invalid array column index %d; range is 0-%d.\n", index2, col_num-1); |
3321 | return 0; |
3322 | } |
3323 | |
3324 | return MGLIMS.amijmx[index1][index2]; |
3325 | } |
3326 | |
3327 | /**************************************************************************/ |
3328 | |
3329 | Bool_t TIsajet::GetFIXMIJ(Int_t index1, Int_t index2) const |
3330 | { |
3331 | Int_t elem_Size = sizeof MGLIMS.fixmij[0][0]; |
3332 | Int_t sec_Dim_Length = (sizeof MGLIMS.fixmij[0] / elem_Size); |
3333 | Int_t fst_Dim_Length = (sizeof MGLIMS.fixmij / (elem_Size * sec_Dim_Length)); |
3334 | |
3335 | if ((index1 < 0) || (index1 >= fst_Dim_Length)) { |
3336 | printf ("Error in TIsajet::GetFIXMIJ : \n"); |
3337 | printf ("Invalid first index %d; range is 0-%d.\n", index1, fst_Dim_Length-1); |
3338 | return 0; |
3339 | } |
3340 | |
3341 | if ((index2 < 0) || (index2 >= sec_Dim_Length)) { |
3342 | printf ("Error in TIsajet::GetFIXMIJ : \n"); |
3343 | printf ("Invalid second index %d; range is 0-%d.\n", index2, sec_Dim_Length-1); |
3344 | return 0; |
3345 | } |
3346 | |
3347 | return MGLIMS.fixmij[index1][index2]; |
3348 | } |
3349 | |
3350 | /**************************************************************************/ |
3351 | |
3352 | // Ends MGLIMS access. |
3353 | // Begins NODCAY access. |
3354 | |
3355 | /**************************************************************************/ |
3356 | |
3357 | void TIsajet::SetNODCAY(Bool_t val) |
3358 | { |
3359 | NODCAY.nodcay = val; |
3360 | setNodcay = true; |
3361 | } |
3362 | |
3363 | /**************************************************************************/ |
3364 | |
3365 | Bool_t TIsajet::GetNODCAY() const |
3366 | { |
3367 | return NODCAY.nodcay; |
3368 | } |
3369 | |
3370 | /**************************************************************************/ |
3371 | |
3372 | void TIsajet::SetNOETA(Bool_t val) |
3373 | { |
3374 | NODCAY.noeta = val; |
3375 | setNoeta = true; |
3376 | } |
3377 | |
3378 | /**************************************************************************/ |
3379 | |
3380 | Bool_t TIsajet::GetNOETA() const |
3381 | { |
3382 | return NODCAY.noeta; |
3383 | } |
3384 | |
3385 | /**************************************************************************/ |
3386 | |
3387 | void TIsajet::SetNOPI0(Bool_t val) |
3388 | { |
3389 | NODCAY.nopi0 = val; |
3390 | setNopi0 = true; |
3391 | } |
3392 | |
3393 | /**************************************************************************/ |
3394 | |
3395 | Bool_t TIsajet::GetNOPI0() const |
3396 | { |
3397 | return NODCAY.nopi0; |
3398 | } |
3399 | |
3400 | /**************************************************************************/ |
3401 | |
3402 | void TIsajet::SetNONUNU(Bool_t val) |
3403 | { |
3404 | NODCAY.nonunu = val; |
3405 | } |
3406 | |
3407 | /**************************************************************************/ |
3408 | |
3409 | Bool_t TIsajet::GetNONUNU() const |
3410 | { |
3411 | return NODCAY.nonunu; |
3412 | } |
3413 | |
3414 | /**************************************************************************/ |
3415 | |
3416 | void TIsajet::SetNOEVOL(Bool_t val) |
3417 | { |
3418 | NODCAY.noevol = val; |
3419 | setNoevolve = true; |
3420 | } |
3421 | |
3422 | /**************************************************************************/ |
3423 | |
3424 | Bool_t TIsajet::GetNOEVOL() const |
3425 | { |
3426 | return NODCAY.noevol; |
3427 | } |
3428 | |
3429 | /**************************************************************************/ |
3430 | |
3431 | void TIsajet::SetNOHADR(Bool_t val) |
3432 | { |
3433 | NODCAY.nohadr = val; |
3434 | setNohadron = true; |
3435 | } |
3436 | |
3437 | /**************************************************************************/ |
3438 | |
3439 | Bool_t TIsajet::GetNOHADR() const |
3440 | { |
3441 | return NODCAY.nohadr; |
3442 | } |
3443 | |
3444 | /**************************************************************************/ |
3445 | |
3446 | void TIsajet::SetNOGRAV(Bool_t val) |
3447 | { |
3448 | NODCAY.nograv = val; |
3449 | } |
3450 | |
3451 | /**************************************************************************/ |
3452 | |
3453 | Bool_t TIsajet::GetNOGRAV() const |
3454 | { |
3455 | return NODCAY.nograv; |
3456 | } |
3457 | |
3458 | /**************************************************************************/ |
3459 | |
3460 | // Ends NODCAY access. |
3461 | // Begins PARTCL access. |
3462 | |
3463 | /**************************************************************************/ |
3464 | |
3465 | Int_t TIsajet::GetNPTCL() const |
3466 | { |
3467 | return PARTCL.nptcl; |
3468 | } |
3469 | |
3470 | /**************************************************************************/ |
3471 | |
3472 | Float_t TIsajet::GetPX(Int_t index) const |
3473 | { |
3474 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3475 | printf ("Error in TIsajet::GetPX : \n"); |
3476 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3477 | return 0; |
3478 | } |
3479 | |
3480 | return PARTCL.pptcl[index][0]; |
3481 | } |
3482 | |
3483 | /**************************************************************************/ |
3484 | |
3485 | Float_t TIsajet::GetPY(Int_t index) const |
3486 | { |
3487 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3488 | printf ("Error in TIsajet::GetPY : \n"); |
3489 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3490 | return 0; |
3491 | } |
3492 | |
3493 | return PARTCL.pptcl[index][1]; |
3494 | } |
3495 | |
3496 | /**************************************************************************/ |
3497 | |
3498 | Float_t TIsajet::GetPZ(Int_t index) const |
3499 | { |
3500 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3501 | printf ("Error in TIsajet::GetPZ : \n"); |
3502 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3503 | return 0; |
3504 | } |
3505 | |
3506 | return PARTCL.pptcl[index][2]; |
3507 | } |
3508 | |
3509 | /**************************************************************************/ |
3510 | |
3511 | Float_t TIsajet::GetP0(Int_t index) const |
3512 | { |
3513 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3514 | printf ("Error in TIsajet::GetP0 : \n"); |
3515 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3516 | return 0; |
3517 | } |
3518 | |
3519 | return PARTCL.pptcl[index][3]; |
3520 | } |
3521 | |
3522 | /**************************************************************************/ |
3523 | |
3524 | Float_t TIsajet::GetMASS(Int_t index) const |
3525 | { |
3526 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3527 | printf ("Error in TIsajet::GetMASS : \n"); |
3528 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3529 | return 0; |
3530 | } |
3531 | |
3532 | return PARTCL.pptcl[index][4]; |
3533 | } |
3534 | |
3535 | /**************************************************************************/ |
3536 | |
3537 | Float_t TIsajet::GetORIG(Int_t index) const |
3538 | { |
3539 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3540 | printf ("Error in TIsajet::GetORIG : \n"); |
3541 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3542 | return 0; |
3543 | } |
3544 | |
3545 | return PARTCL.iorig[index]; |
3546 | } |
3547 | |
3548 | /**************************************************************************/ |
3549 | |
3550 | Float_t TIsajet::GetIDENT(Int_t index) const |
3551 | { |
3552 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3553 | printf ("Error in TIsajet::GetIDENT : \n"); |
3554 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3555 | return 0; |
3556 | } |
3557 | |
3558 | return PARTCL.ident[index]; |
3559 | } |
3560 | |
3561 | /**************************************************************************/ |
3562 | |
3563 | Float_t TIsajet::GetIDCAY(Int_t index) const |
3564 | { |
3565 | if ((index < 0) || (index >= PARTCL.nptcl)) { |
3566 | printf ("Error in TIsajet::GetIDCAY : \n"); |
3567 | printf ("Invalid array index %d; range is 0-%d.\n", index, PARTCL.nptcl-1); |
3568 | return 0; |
3569 | } |
3570 | |
3571 | return PARTCL.idcay[index]; |
3572 | } |
3573 | |
3574 | /**************************************************************************/ |
3575 | |
3576 | // Ends PARTCL access. |
3577 | // Begins PRIMAR access. |
3578 | |
3579 | /**************************************************************************/ |
3580 | |
3581 | Int_t TIsajet::GetNJET() const |
3582 | { |
3583 | return PRIMAR.njet; |
3584 | } |
3585 | |
3586 | /**************************************************************************/ |
3587 | |
3588 | Float_t TIsajet::GetSCM() const |
3589 | { |
3590 | return PRIMAR.scm; |
3591 | } |
3592 | |
3593 | /**************************************************************************/ |
3594 | |
3595 | Float_t TIsajet::GetHALFE() const |
3596 | { |
3597 | return PRIMAR.halfe; |
3598 | } |
3599 | |
3600 | /**************************************************************************/ |
3601 | |
3602 | void TIsajet::SetECM(Float_t val) |
3603 | { |
3604 | if (val < 0) { |
3605 | printf ("Error in TIsajet::SetECM :\n"); |
3606 | printf ("Cannot set energy to a negative value.\n"); |
3607 | return; |
3608 | } |
3609 | |
3610 | PRIMAR.ecm = val; |
3611 | PRIMAR.scm = val*val; |
3612 | PRIMAR.halfe = val / 2; |
3613 | } |
3614 | |
3615 | /**************************************************************************/ |
3616 | |
3617 | Float_t TIsajet::GetECM() const |
3618 | { |
3619 | return PRIMAR.ecm; |
3620 | } |
3621 | |
3622 | /**************************************************************************/ |
3623 | |
3624 | void TIsajet::SetIDIN(Int_t val, Int_t index) |
3625 | { |
3626 | Int_t length = (sizeof PRIMAR.idin / sizeof PRIMAR.idin[0]); |
3627 | if ((index < 0) || (index >= length)) { |
3628 | printf ("Error in TIsajet::SetIDIN : \n"); |
3629 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3630 | return; |
3631 | } |
3632 | |
3633 | if ((val = 1120) || (val = 1220) || (val = -1120) || (val = -1220)) { |
3634 | PRIMAR.idin[index] = val; |
3635 | } |
3636 | else { |
3637 | printf ("Error in TIsajet::SetIDIN : \n"); |
3638 | printf ("Invalid input value %d. Possible values are 1120, 1220, -1120, -1220.\n", val); |
3639 | return; |
3640 | } |
3641 | |
3642 | setBeams = true; |
3643 | } |
3644 | |
3645 | /**************************************************************************/ |
3646 | |
3647 | void TIsajet::SetIDIN(const Char_t val[], Int_t index) |
3648 | { |
3649 | Int_t length = (sizeof PRIMAR.idin / sizeof PRIMAR.idin[0]); |
3650 | if ((index < 0) || (index >= length)) { |
3651 | printf ("Error in TIsajet::SetIDIN : \n"); |
3652 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3653 | return; |
3654 | } |
3655 | |
3656 | if (!strcmp("P", val)) { |
3657 | PRIMAR.idin[index] = 1120; |
3658 | } |
3659 | else if (!strcmp("AP", val)) { |
3660 | PRIMAR.idin[index] = -1120; |
3661 | } |
3662 | else if (!strcmp("N", val)) { |
3663 | PRIMAR.idin[index] = 1220; |
3664 | } |
3665 | else if (!strcmp("AN", val)) { |
3666 | PRIMAR.idin[index] = -1220; |
3667 | } |
3668 | else { |
3669 | printf ("Error in TIsajet::SetIDIN : \n"); |
3670 | printf ("Invalid input string %s. Possible strings are P, AP, N, and AN.\n", val); |
3671 | return; |
3672 | } |
3673 | } |
3674 | |
3675 | /**************************************************************************/ |
3676 | |
3677 | Int_t TIsajet::GetIDIN(Int_t index) const |
3678 | { |
3679 | Int_t length = (sizeof PRIMAR.idin / sizeof PRIMAR.idin[0]); |
3680 | if ((index < 0) || (index >= length)) { |
3681 | printf ("Error in TIsajet::GetIDIN : \n"); |
3682 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3683 | return 0; |
3684 | } |
3685 | |
3686 | return PRIMAR.idin[index]; |
3687 | } |
3688 | |
3689 | /**************************************************************************/ |
3690 | |
3691 | Int_t TIsajet::GetNEVENT() const |
3692 | { |
3693 | return PRIMAR.nevent; |
3694 | } |
3695 | |
3696 | /**************************************************************************/ |
3697 | |
3698 | void TIsajet::SetNTRIES(Int_t val) |
3699 | { |
3700 | PRIMAR.ntries = val; |
3701 | } |
3702 | |
3703 | /**************************************************************************/ |
3704 | |
3705 | Int_t TIsajet::GetNTRIES() const |
3706 | { |
3707 | return PRIMAR.ntries; |
3708 | } |
3709 | |
3710 | /**************************************************************************/ |
3711 | |
3712 | void TIsajet::SetNSIGMA(Int_t val) |
3713 | { |
3714 | PRIMAR.nsigma = val; |
3715 | setNsigma = true; |
3716 | } |
3717 | |
3718 | /**************************************************************************/ |
3719 | |
3720 | Int_t TIsajet::GetNSIGMA() const |
3721 | { |
3722 | return PRIMAR.nsigma; |
3723 | } |
3724 | |
3725 | /**************************************************************************/ |
3726 | |
3727 | // Ends PRIMAR access. |
3728 | // Begins QCDPAR access. |
3729 | |
3730 | /**************************************************************************/ |
3731 | |
3732 | void TIsajet::SetALAM(Float_t val) |
3733 | { |
3734 | QCDPAR.alam = val; |
3735 | QCDPAR.alam2 = val*val; |
3736 | setLambda = true; |
3737 | } |
3738 | |
3739 | /**************************************************************************/ |
3740 | |
3741 | Float_t TIsajet::GetALAM() const |
3742 | { |
3743 | return QCDPAR.alam; |
3744 | } |
3745 | |
3746 | /**************************************************************************/ |
3747 | |
3748 | Float_t TIsajet::GetALAM2() const |
3749 | { |
3750 | return QCDPAR.alam2; |
3751 | } |
3752 | |
3753 | /**************************************************************************/ |
3754 | |
3755 | void TIsajet::SetCUTJET(Float_t val) |
3756 | { |
3757 | QCDPAR.cutjet = val; |
3758 | setCutjet = true; |
3759 | } |
3760 | |
3761 | /**************************************************************************/ |
3762 | |
3763 | Float_t TIsajet::GetCUTJET() const |
3764 | { |
3765 | return QCDPAR.cutjet; |
3766 | } |
3767 | |
3768 | /**************************************************************************/ |
3769 | |
3770 | void TIsajet::SetISTRUC(Int_t val) |
3771 | { |
3772 | if ((val < 1) || (val > 6)) { |
3773 | printf ("Error in TIsajet::SetISTRUC : \n"); |
3774 | printf ("Invalid input value %d. Possible values are 1 through 6.\n", val); |
3775 | return; |
3776 | } |
3777 | QCDPAR.istruc = val; |
3778 | } |
3779 | |
3780 | /**************************************************************************/ |
3781 | |
3782 | void TIsajet::SetISTRUC(const Char_t val[]) |
3783 | { |
3784 | if (!strcmp("OWENS", val)) { |
3785 | QCDPAR.istruc = 1; |
3786 | } |
3787 | else if (!strcmp("BAIER", val)) { |
3788 | QCDPAR.istruc = 2; |
3789 | } |
3790 | else if ((!strcmp("EICHTEN", val)) || (!strcmp("EHLQ", val))) { |
3791 | QCDPAR.istruc = 3; |
3792 | } |
3793 | else if ((!strcmp("DUKE", val)) || (!strcmp("DO", val))) { |
3794 | QCDPAR.istruc = 4; |
3795 | } |
3796 | else if (!strcmp("CTEQ2L", val)) { |
3797 | QCDPAR.istruc = 5; |
3798 | } |
3799 | else if ((!strcmp("CTEQ", val)) || (!strcmp("CTEQ3L", val))) { |
3800 | QCDPAR.istruc = 6; |
3801 | } |
3802 | else { |
3803 | printf ("Error in TIsajet::SetISTRUC : \n"); |
3804 | printf ("Invalid input string %s. Possible strings are OWENS, BAIER, EICHTEN, \n", val); |
3805 | printf ("EHLQ, DUKE, DO, CTEQ2L, CTEQ, and CTEQ3L.\n"); |
3806 | return; |
3807 | } |
3808 | } |
3809 | |
3810 | /**************************************************************************/ |
3811 | |
3812 | Int_t TIsajet::GetISTRUC() const |
3813 | { |
3814 | return QCDPAR.istruc; |
3815 | } |
3816 | |
3817 | /**************************************************************************/ |
3818 | |
3819 | // Ends QCDPAR access. |
3820 | // Begins QLMASS access. |
3821 | |
3822 | /**************************************************************************/ |
3823 | |
3824 | void TIsajet::SetAMLEP(Float_t val, Int_t index) |
3825 | { |
3826 | Int_t length = (sizeof QLMASS.amlep / sizeof QLMASS.amlep[0]); |
3827 | if ((index < 0) || (index >= length)) { |
3828 | printf ("Error in TIsajet::SetAMLEP : \n"); |
3829 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3830 | return; |
3831 | } |
3832 | |
3833 | if (((index < 5) && (index > 7)) && |
3834 | ((index < 21) && (index > 26)) && |
3835 | ((index < 29) && (index > 36)) && |
3836 | ((index < 39) && (index > 40)) && |
3837 | ((index < 63) && (index > 71))) |
3838 | { |
3839 | printf ("Error in TIsajet::SetAMLEP : \n"); |
3840 | printf ("Index %d may not be set by the user. Valid indices are : \n", index); |
3841 | printf ("5-7, 21-26, 29-36, 39-40 and 63-71.\n"); |
3842 | return; |
3843 | } |
3844 | |
3845 | QLMASS.amlep[index] = val; |
3846 | } |
3847 | |
3848 | /**************************************************************************/ |
3849 | |
3850 | Float_t TIsajet::GetAMLEP(Int_t index) const |
3851 | { |
3852 | Int_t length = (sizeof QLMASS.amlep / sizeof QLMASS.amlep[0]); |
3853 | if ((index < 0) || (index >= length)) { |
3854 | printf ("Error in TIsajet::GetAMLEP : \n"); |
3855 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3856 | return 0; |
3857 | } |
3858 | if ((index < 5) || (index > 71) || |
3859 | ((index > 7) && (index < 21)) || |
3860 | ((index > 26) && (index < 29)) || |
3861 | ((index > 36) && (index < 39)) || |
3862 | ((index > 40) && (index < 63))) |
3863 | { |
3864 | printf ("Possible error in TIsajet::GetAMLEP : \n"); |
3865 | printf ("Index %d may not be set by the user. Valid indices are : \n", index); |
3866 | printf ("5-7, 21-26, 29-36, 39-40 and 63-71. \n"); |
3867 | printf ("To return the value of this index, use GetAnyAMLEP(Int_t index).\n"); |
3868 | return 0; |
3869 | } |
3870 | |
3871 | |
3872 | return QLMASS.amlep[index]; |
3873 | } |
3874 | |
3875 | /**************************************************************************/ |
3876 | |
3877 | Float_t TIsajet::GetAnyAMLEP(Int_t index) const |
3878 | { |
3879 | Int_t length = (sizeof QLMASS.amlep / sizeof QLMASS.amlep[0]); |
3880 | if ((index < 0) || (index >= length)) { |
3881 | printf ("Error in TIsajet::GetAnyAMLEP : \n"); |
3882 | printf ("Invalid array index %d; range is 0-%d.\n", index, length-1); |
3883 | return 0; |
3884 | } |
3885 | |
3886 | return QLMASS.amlep[index]; |
3887 | } |
3888 | |
3889 | /**************************************************************************/ |
3890 | |
3891 | void TIsajet::SetTquarkMass(Float_t val) |
3892 | { |
3893 | QLMASS.amlep[5] = val; |
3894 | } |
3895 | |
3896 | /**************************************************************************/ |
3897 | |
3898 | Float_t TIsajet::GetTquarkMass() const |
3899 | { |
3900 | return QLMASS.amlep[5]; |
3901 | } |
3902 | |
3903 | /**************************************************************************/ |
3904 | |
3905 | void TIsajet::SetXquarkMass(Float_t val) |
3906 | { |
3907 | QLMASS.amlep[6] = val; |
3908 | } |
3909 | |
3910 | /**************************************************************************/ |
3911 | |
3912 | Float_t TIsajet::GetXquarkMass() const |
3913 | { |
3914 | return QLMASS.amlep[6]; |
3915 | } |
3916 | |
3917 | /**************************************************************************/ |
3918 | |
3919 | void TIsajet::SetYquarkMass(Float_t val) |
3920 | { |
3921 | QLMASS.amlep[7] = val; |
3922 | } |
3923 | |
3924 | /**************************************************************************/ |
3925 | |
3926 | Float_t TIsajet::GetYquarkMass() const |
3927 | { |
3928 | return QLMASS.amlep[7]; |
3929 | } |
3930 | |
3931 | /**************************************************************************/ |
3932 | |
3933 | void TIsajet::SetUtildeMass(Float_t val) |
3934 | { |
3935 | QLMASS.amlep[21] = val; |
3936 | } |
3937 | |
3938 | /**************************************************************************/ |
3939 | |
3940 | Float_t TIsajet::GetUtildeMass() const |
3941 | { |
3942 | return QLMASS.amlep[21]; |
3943 | } |
3944 | |
3945 | /**************************************************************************/ |
3946 | |
3947 | void TIsajet::SetDtildeMass(Float_t val) |
3948 | { |
3949 | QLMASS.amlep[22] = val; |
3950 | } |
3951 | |
3952 | /**************************************************************************/ |
3953 | |
3954 | Float_t TIsajet::GetDtildeMass() const |
3955 | { |
3956 | return QLMASS.amlep[22]; |
3957 | } |
3958 | |
3959 | /**************************************************************************/ |
3960 | |
3961 | void TIsajet::SetStildeMass(Float_t val) |
|