Removing compilation warnings (gcc)
[u/mrichter/AliRoot.git] / THbtp / THBTprocessor.cxx
1 #include "THBTprocessor.h"
2 //_____________________________________________________________________________
3 ///////////////////////////////////////////////////////////////////////////////
4 //                                                                           //
5 // class THBTprocessor                                                       //
6 //                                                                           //
7 // Wrapper class to HBT processor fortran code.                              //
8 // For more information see AliGenHBTprocessor class                         //
9 // HBT processor is written by Lanny Ray                                     //
10 //                                                                           //
11 // Comunication is done via COMMON BLOCKS declared in HBTprocCOMMON.h        //
12 // using cfortran.h routines                                                 //
13 // User should use class AliGenHBTprocessor and all their interface          //
14 // see there for more description                                            //
15 //                                                                           //
16 // Wrapper class written by                                                  //
17 // Piotr Krzysztof Skowronski (Piotr.Skowronski@cern.ch)                     //
18 //                                                                           //
19 ///////////////////////////////////////////////////////////////////////////////
20
21
22 #include <TParticle.h>
23 #include <TMath.h>
24 #include "HBTprocCOMMON.h"
25
26 #include <Riostream.h>
27 #ifndef WIN32
28 # define hbtprocessor hbtprocessor_
29 # define ctest ctest_
30 # define type_of_call
31 #else
32 # define hbtprocessor HBTPROCESSOR
33 # define ctest CTEST
34 # define type_of_call _stdcall
35 #endif    
36
37
38 ClassImp(THBTprocessor)
39  
40 extern "C" void  type_of_call hbtprocessor();   
41 extern "C" void  type_of_call ctest();
42
43
44 /*************************************************/
45 THBTprocessor::THBTprocessor()// it is better not to intialize it:TGenerator("THBTprocessor","THBTprocessor")
46                               //because it allocates memmory for TObjArray::fParticles which is not used in our case
47                               //and we are using TClonesArray in import paerticles
48  {
49  //constructor
50   PARAMETERS.ALICE            = 1; //flag that we are working in AliRoot (0==STAR stand alone mode)
51   PARAMETERS.pi               = TMath::Pi();//3.141592654;
52   PARAMETERS.rad              = 180.0/TMath::Pi();
53   PARAMETERS.hbc              = 0.19732891;
54   
55   fParticles = 0;
56   Initialize(); //Enforce initialization (cleaning all commons)
57  }
58 /*****************************************************************************************/
59
60 void THBTprocessor::GenerateEvent() const
61 {
62 //Starts processing
63
64   Info("GenerateEvent","Entering Fortran");
65   ctest();
66   hbtprocessor();
67   Info("GenerateEvent","Exited Fortran");
68   if(PARAMETERS.errorcode)
69     {
70       TString message("HBT Processor (fortran part) finished with errors\n");
71       message+="Error code is ";
72       message+=PARAMETERS.errorcode;
73       message+="\n";
74       message+="See hbt_simulation.out file for more detailed information.";
75       Fatal("GenerateEvent","%s",message.Data());
76     }
77   else
78     Info("GenerateEvent","GOOD ! HBT Processor finished without errors");
79 }
80 /*****************************************************************************************/
81
82 void THBTprocessor::Initialize() const
83
84   //IT RESETS ALL THE PREVIOUS SETTINGS
85   //Call this method to set default values in PARAMETERS & MESH
86   //and zero other common block
87   
88   if(gDebug) 
89    Info("Initialize","Setting Default valuses in all COMMON BLOCKS");
90   
91   PARAMETERS.ref_control      = 2;
92   PARAMETERS.switch_1d        = 3;
93   PARAMETERS.switch_3d        = 1;
94   PARAMETERS.switch_type      = 3;
95   PARAMETERS.switch_coherence = 0;
96   PARAMETERS.switch_coulomb   = 3;
97   PARAMETERS.switch_fermi_bose= 1;
98   PARAMETERS.trk_accep        = 1.0;
99   PARAMETERS.print_full       = 1;
100   PARAMETERS.print_sector_data= 1;
101
102   PARAMETERS.n_pid_types      = 2;
103   PARAMETERS.pid[0]           = 8;
104   PARAMETERS.pid[1]           = 9;
105   PARAMETERS.deltap           = 0.1;
106   PARAMETERS.maxit            = 50;
107   PARAMETERS.delchi           = 1.0;
108   PARAMETERS.irand            = 76564;
109   PARAMETERS.lambda           = 0.6;
110   PARAMETERS.R_1d             = 7.0;
111   PARAMETERS.Rside            = 6.0;
112
113   PARAMETERS.Rout             = 7.0;
114   PARAMETERS.Rlong            = 4.0;
115   PARAMETERS.Rperp            = 6.0;
116   PARAMETERS.Rparallel        = 4.0;
117   PARAMETERS.R0               = 4.0;
118   PARAMETERS.Q0               = 9.0;
119
120   PARAMETERS.n_part_1_trk         = 0;
121   PARAMETERS.n_part_2_trk         = 0;
122   PARAMETERS.n_part_tot_trk       = 0;
123   PARAMETERS.n_part_used_1_trk    = 0;
124
125   PARAMETERS.n_part_used_2_trk    = 0;
126   PARAMETERS.n_part_1_trk2        = 0;
127   PARAMETERS.n_part_2_trk2        = 0;
128   PARAMETERS.n_part_tot_trk2      = 0;
129   PARAMETERS.n_part_used_1_trk2   = 0;
130   PARAMETERS.n_part_used_2_trk2   = 0;
131   PARAMETERS.n_part_used_1_ref    = 0;
132   PARAMETERS.n_part_used_2_ref    = 0;
133   PARAMETERS.n_part_used_1_inc    = 0;
134   PARAMETERS.n_part_used_2_inc    = 0;
135  
136   PARAMETERS.num_pairs_like       = 0;
137   PARAMETERS.num_pairs_unlike     = 0;
138   PARAMETERS.num_pairs_like_ref   = 0;
139   PARAMETERS.num_pairs_like_inc   = 0;
140   PARAMETERS.num_pairs_unlike_inc = 0;
141   PARAMETERS.event_line_counter   = 0;
142   PARAMETERS.file10_line_counter  = 0;
143
144   PARAMETERS.chisq_wt_like_1d         = 1.0;
145   PARAMETERS.chisq_wt_unlike_1d       = 1.0;
146   PARAMETERS.chisq_wt_like_3d_fine    = 1.0;
147
148   PARAMETERS.chisq_wt_unlike_3d_fine  = 1.0;
149   PARAMETERS.chisq_wt_like_3d_coarse  = 1.0;
150   PARAMETERS.chisq_wt_unlike_3d_coarse= 1.0;
151   PARAMETERS.chisq_wt_hist1_1         = 1.0;
152   PARAMETERS.chisq_wt_hist1_2         = 1.0; // /////internal comment 25 fields
153
154 /*********************************************/
155
156  
157   MESH.n_pt_bins        = 50;                            //OK
158   MESH.pt_min           = 0.1;  //Pt in GeV/c            //OK
159   MESH.pt_max           = 0.98; //Pt in GeV/c
160   MESH.n_phi_bins       = 50;                          //OK
161   MESH.phi_min          = 0.0;                              //OK
162   MESH.phi_max          = 360.0;                          //OK
163   MESH.n_eta_bins       = 50;                          //OK
164   MESH.eta_min          =-1.5;                          //OK
165   MESH.eta_max          = 1.5;                          //OK
166   MESH.n_1d_fine        = 10;                          //OK
167   MESH.binsize_1d_fine  = 0.01;                         //ok 
168   MESH.n_1d_coarse      = 2;                          //O
169   MESH.binsize_1d_coarse= 0.05;                       //ok
170   MESH.n_3d_fine        = 8;                          //OK
171   MESH.binsize_3d_fine  = 0.01;                       //ok
172   MESH.n_3d_coarse      = 2;                          //OK
173   MESH.binsize_3d_coarse= 0.08;                       //ok
174   MESH.n_3d_fine_project= 3;                          //OK
175   MESH.n_px_bins        = 20;                          //OK
176   MESH.px_min           =-1.0;                          //OK
177   MESH.px_max           = 1.0;                          //OK
178   MESH.n_py_bins        = 20;                          //OK
179   MESH.py_min           =-1.0;                          //OK
180   MESH.py_max           = 1.0;                          //OK
181   MESH.n_pz_bins        = 70;                          //OK
182   MESH.pz_min           =-3.6;                          //OK
183   MESH.pz_max           = 3.6;                          //OK
184   
185 /*********************************************/
186
187   Int_t i; //loop variable
188   
189   for (i =0; i<TRK_MAXLEN;i++)
190    {
191     TRACK1.trk_id[i] = 0;
192     TRACK1.trk_px_sec[i] = 0; 
193     TRACK1.trk_py_sec[i] = 0;
194     TRACK1.trk_pz_sec[i] = 0;
195     TRACK1.trk_sector[i] = 0;
196     TRACK1.trk_flag[i] = 0;
197     TRACK1.trk_out_flag[i] = 0;
198     TRACK1.trk_merge_flag[i] = 0;
199     TRACK1.trk_ge_pid[i] = 0;
200     TRACK1.trk_start_vertex[i] = 0;
201     TRACK1.trk_stop_vertex[i] = 0;
202     TRACK1.trk_event_line[i] = 0;
203     TRACK1.trk_px[i] = 0;
204     TRACK1.trk_py[i] = 0;
205     TRACK1.trk_pz[i] = 0;
206     TRACK1.trk_E[i] = 0;
207     TRACK1.trk_pt[i] = 0;
208     TRACK1.trk_phi[i] = 0;
209     TRACK1.trk_eta[i] = 0; 
210    }
211   
212 /*********************************************/
213
214   for (i =0; i<TRK2_MAXLEN;i++)
215    {
216     TRACK2.trk2_id[i] = 0;
217     TRACK2.trk2_px_sec[i] = 0; 
218     TRACK2.trk2_py_sec[i] = 0;
219     TRACK2.trk2_pz_sec[i] = 0;
220     TRACK2.trk2_sector[i] = 0;
221     TRACK2.trk2_flag[i] = 0;
222     TRACK2.trk2_out_flag[i] = 0;
223     TRACK2.trk2_merge_flag[i] = 0;
224     TRACK2.trk2_ge_pid[i] = 0;
225     TRACK2.trk2_start_vertex[i] = 0;
226     TRACK2.trk2_stop_vertex[i] = 0;
227     TRACK2.trk2_event_line[i] = 0;
228     TRACK2.trk2_px[i] = 0;
229     TRACK2.trk2_py[i] = 0;
230     TRACK2.trk2_pz[i] = 0;
231     TRACK2.trk2_E[i] = 0;
232     TRACK2.trk2_pt[i] = 0;
233     TRACK2.trk2_phi[i] = 0;
234     TRACK2.trk2_eta[i] = 0; 
235    }
236
237 /*********************************************/
238
239   for (i =0; i<SEC_MAXLEN;i++)
240    {
241     SEC_TRK_MAP.stm_sec_id [i] = 0;
242     SEC_TRK_MAP.stm_n_trk_sec[i] = 0; 
243     SEC_TRK_MAP.stm_flag[i] = 0;
244     
245     for (Int_t j=0; j<MAX_TRK_SEC;j++)
246        SEC_TRK_MAP.stm_track_id[i][j] = 0;
247    }
248
249 /*********************************************/
250
251   for (i =0; i<SEC_MAXLEN2;i++)
252    {
253     SEC_TRK_MAP2.stm_sec_id2[i] = 0;
254     SEC_TRK_MAP2.stm_n_trk_sec2[i] = 0; 
255     SEC_TRK_MAP2.stm_flag2[i] = 0;
256     
257     for (Int_t j=0; j<MAX_TRK_SEC;j++)
258        SEC_TRK_MAP2.stm_track_id2[i][j] = 0;
259    }
260
261 /*********************************************/
262
263   for (i =0; i<PART_MAXLEN;i++)
264    {
265      PARTICLE.part_id[i] = 0;
266      PARTICLE.part_charge[i] = 0;
267      PARTICLE.part_mass[i] = 0;
268      PARTICLE.part_lifetime[i] = 0;
269    }
270
271
272 /*********************************************/
273   for (i =0; i<MAX_C2_1D;i++)
274    {
275      CORRELATIONS.c2mod_like_1d[i] = 0; 
276      CORRELATIONS.c2mod_unlike_1d[i] = 0;
277      CORRELATIONS.c2fit_like_1d[i] = 0;
278      CORRELATIONS.c2fit_unlike_1d[i] = 0;
279      CORRELATIONS.c2err_like_1d[i] = 0;
280      CORRELATIONS.c2err_unlike_1d[i] = 0;
281    }
282 /*********************************************/
283   for (i =0; i<MAX_C2_3D;i++)
284    for (Int_t j =0; j<MAX_C2_3D;j++)
285     for (Int_t k =0; k<MAX_C2_3D;k++)
286      {
287       CORRELATIONS.c2mod_like_3d_fine[i][j][k] = 0.0;
288       CORRELATIONS.c2mod_unlike_3d_fine[i][j][k] = 0.0;
289       CORRELATIONS.c2mod_like_3d_coarse[i][j][k] = 0.0;
290       CORRELATIONS.c2mod_unlike_3d_coarse[i][j][k] = 0.0;
291       CORRELATIONS.c2fit_like_3d_fine[i][j][k] = 0.0;
292       CORRELATIONS.c2fit_unlike_3d_fine[i][j][k] = 0.0;
293       CORRELATIONS.c2fit_like_3d_coarse[i][j][k] = 0.0;
294       CORRELATIONS.c2fit_unlike_3d_coarse[i][j][k] = 0.0;
295       CORRELATIONS.c2err_like_3d_fine[i][j][k] = 0.0;
296       CORRELATIONS.c2err_unlike_3d_fine[i][j][k] = 0.0;
297       CORRELATIONS.c2err_like_3d_coarse[i][j][k] = 0.0;
298       CORRELATIONS.c2err_unlike_3d_coarse[i][j][k] = 0.0;
299      }
300 /*********************************************/
301
302    EVENT_SUMMARY.niter_mean = 0.0; 
303    EVENT_SUMMARY.niter_rms = 0.0;
304  
305    EVENT_SUMMARY.npart1_mean = 0.0; 
306    EVENT_SUMMARY.npart1_rms = 0.0;
307  
308    EVENT_SUMMARY.npart2_mean = 0.0; 
309    EVENT_SUMMARY.npart2_rms = 0.0;
310  
311    EVENT_SUMMARY.npart_tot_mean = 0.0; 
312    EVENT_SUMMARY.npart_tot_rms = 0.0;
313  
314    EVENT_SUMMARY.nsec_flag_mean = 0.0; 
315    EVENT_SUMMARY.nsec_flag_rms = 0.0;
316  
317    EVENT_SUMMARY.frac_trks_out_mean = 0.0;
318    EVENT_SUMMARY.frac_trks_out_rms = 0.0;
319  
320    EVENT_SUMMARY.frac_trks_flag_mean = 0.0;
321    EVENT_SUMMARY.frac_trks_flag_rms = 0.0;
322  
323    EVENT_SUMMARY.chi_l1d_mean = 0.0;
324    EVENT_SUMMARY.chi_l1d_rms = 0.0;
325
326    EVENT_SUMMARY.chi_u1d_mean = 0.0;
327    EVENT_SUMMARY.chi_u1d_rms = 0.0;
328
329  for (i =0; i<MAX_EVENTS;i++) 
330   {
331     EVENT_SUMMARY.n_part_used_1_store[i] = 0.0; 
332     EVENT_SUMMARY.n_part_used_2_store[i] = 0.0; 
333     EVENT_SUMMARY.n_part_tot_store[i] = 0.0; 
334     EVENT_SUMMARY.num_sec_flagged_store[i] = 0.0; 
335     EVENT_SUMMARY.frac_trks_out[i] = 0.0; 
336     EVENT_SUMMARY.frac_trks_flag[i] = 0.0;
337     EVENT_SUMMARY.chisq_like_1d_store[i] = 0.0;         
338     EVENT_SUMMARY.num_iter[i] = 0.0; 
339     EVENT_SUMMARY.chisq_unlike_1d_store[i] = 0.0;       
340   } 
341 /*********************************************/
342  for (i =0; i<MAX_C2_COUL;i++) 
343   {
344       COULMB.c2_coul_like[i] = 0.0;
345       COULMB.c2_coul_unlike[i] = 0.0;
346       COULMB.q_coul[i] = 0.0; 
347  
348   }
349 /*********************************************/
350  for (i =0; i<MAX_H_1D;i++) 
351    {  
352       HISTOGRAMS.hist1_pt_1[i] = 0;
353       HISTOGRAMS.hist1_phi_1[i] = 0;
354       HISTOGRAMS.hist1_eta_1[i] = 0;
355       HISTOGRAMS.hist1_pt_2[i] = 0;
356       HISTOGRAMS.hist1_phi_2[i] = 0;
357       HISTOGRAMS.hist1_eta_2[i] = 0;
358       HISTOGRAMS.htmp1_pt_1[i] = 0;
359       HISTOGRAMS.htmp1_phi_1[i] = 0;
360       HISTOGRAMS.htmp1_eta_1[i] = 0;
361       HISTOGRAMS.htmp1_pt_2[i] = 0;
362       HISTOGRAMS.htmp1_phi_2[i] = 0;
363       HISTOGRAMS.htmp1_eta_2[i] = 0;
364       HISTOGRAMS.href1_pt_1[i] = 0;
365       HISTOGRAMS.href1_phi_1[i] = 0;
366       HISTOGRAMS.href1_eta_1[i] = 0;
367       HISTOGRAMS.href1_pt_2[i] = 0;
368       HISTOGRAMS.href1_phi_2[i] = 0;
369       HISTOGRAMS.href1_eta_2[i] = 0;
370       HISTOGRAMS.hinc1_pt_1[i] = 0;
371       HISTOGRAMS.hinc1_phi_1[i] = 0;
372       HISTOGRAMS.hinc1_eta_1[i] = 0;
373       HISTOGRAMS.hinc1_pt_2[i] = 0;
374       HISTOGRAMS.hinc1_phi_2[i] = 0;
375       HISTOGRAMS.hinc1_eta_2[i] = 0;
376       HISTOGRAMS.hist_like_1d[i] = 0;
377       HISTOGRAMS.hist_unlike_1d[i] = 0;
378       HISTOGRAMS.htmp_like_1d[i] = 0;
379       HISTOGRAMS.htmp_unlike_1d[i] = 0;
380       HISTOGRAMS.href_like_1d[i] = 0;
381       HISTOGRAMS.href_unlike_1d[i] = 0;
382       HISTOGRAMS.hinc_like_1d[i] = 0;
383       HISTOGRAMS.hinc_unlike_1d[i] = 0;
384   }
385
386  for (i =0; i<MAX_H_3D;i++) 
387    for (Int_t j =0; j<MAX_H_3D;j++) 
388      for (Int_t k =0; k<MAX_H_3D;k++) 
389        {
390           HISTOGRAMS.hist_like_3d_fine[i][j][k] = 0;
391           HISTOGRAMS.hist_unlike_3d_fine[i][j][k] = 0;
392           HISTOGRAMS.hist_like_3d_coarse[i][j][k] = 0;
393           HISTOGRAMS.hist_unlike_3d_coarse[i][j][k] = 0;
394           HISTOGRAMS.htmp_like_3d_fine[i][j][k] = 0;
395           HISTOGRAMS.htmp_unlike_3d_fine[i][j][k] = 0;
396           HISTOGRAMS.htmp_like_3d_coarse[i][j][k] = 0;
397           HISTOGRAMS.htmp_unlike_3d_coarse[i][j][k] = 0;
398           HISTOGRAMS.href_like_3d_fine[i][j][k] = 0;
399           HISTOGRAMS.href_unlike_3d_fine[i][j][k] = 0;
400           HISTOGRAMS.href_like_3d_coarse[i][j][k] = 0;
401           HISTOGRAMS.href_unlike_3d_coarse[i][j][k] = 0;
402           HISTOGRAMS.hinc_like_3d_fine[i][j][k] = 0;
403           HISTOGRAMS.hinc_unlike_3d_fine[i][j][k] = 0;
404           HISTOGRAMS.hinc_like_3d_coarse[i][j][k] = 0;
405           HISTOGRAMS.hinc_unlike_3d_coarse[i][j][k] = 0;
406        }
407 /*********************************************/
408
409
410 /*********************************************/
411
412 //  cout<<" FINISHED"<<endl;
413   
414 }
415
416
417 /*****************************************************************************************/
418
419
420 Int_t THBTprocessor::ImportParticles(TClonesArray *particles, Option_t */*option*/)
421  {
422   //Copy particle data into TClonesArray
423   if (particles == 0) return 0;
424   TClonesArray &rparticles = *particles;
425   rparticles.Clear();
426  
427   Int_t nrpart = 0;
428   for (Int_t i=0; i < TRK_MAXLEN; i++) 
429    {
430    
431     
432       if (TRACK1.trk_E[i] == 0.) continue;
433     
434       Float_t px   = TRACK1.trk_px[i];
435       Float_t py   = TRACK1.trk_py[i];
436       Float_t pz   = TRACK1.trk_pz[i];
437 //    Float_t pE   = TRACK.trk_E[i];
438       Float_t mass = PARTICLE.part_mass[TRACK1.trk_ge_pid[i]];
439     
440       new(rparticles[nrpart++]) TParticle(0,0,0,0,0,0,px,py,pz,
441                                          TMath::Sqrt(mass*mass+px*px+py*py+pz*pz),
442                                          0,0,0,0);
443    }
444   return nrpart;        
445  }
446
447 /*****************************************************************************************/
448 TObjArray * THBTprocessor::ImportParticles(Option_t */*option*/)
449  {
450   //Copy particle data into TObjArray
451   fParticles->Clear();
452  
453   for (Int_t i=0; i < TRK_MAXLEN; i++) 
454    {
455    
456     
457       if (TRACK1.trk_E[i] == 0.) continue;
458     
459       Float_t px   = TRACK1.trk_px[i];
460       Float_t py   = TRACK1.trk_py[i];
461       Float_t pz   = TRACK1.trk_pz[i];
462 //    Float_t pE   = TRACK.trk_E[i];
463       Float_t mass = PARTICLE.part_mass[TRACK1.trk_ge_pid[i]];
464     
465       TParticle * p =new TParticle(0,0,0,0,0,0,px,py,pz,
466                                    TMath::Sqrt(mass*mass+px*px+py*py+pz*pz),
467                                    0,0,0,0);
468       fParticles->Add(p);
469    }
470   return fParticles;        
471  }
472
473 /*****************************************************************************************/
474
475 void THBTprocessor::PrintEvent() const
476  {
477  //Prints all particles (common block data)  
478    cout<<"Print Event"<<endl;
479    for (Int_t i=0; i<TRK_MAXLEN;i++)
480     {
481       if(TRACK1.trk_E[i]==0.) continue;
482
483       cout<<"trk_id: "<<TRACK1.trk_id[i]<<"  trk_px :"<<TRACK1.trk_px[i]<<"  trk_py :"<<TRACK1.trk_py[i]<<"  trk_pz :"<<TRACK1.trk_pz[i]<<endl;
484       cout<<"                trk_E: "<<TRACK1.trk_E[i]<<"  trk_pt: "<<TRACK1.trk_pt[i]<<"  trk_phi: "<<TRACK1.trk_phi[i]<<"  trk_eta: "<<TRACK1.trk_eta[i]<<endl;
485     }
486  }
487
488
489 /*****************************************************************************************/
490 void THBTprocessor::DumpSettings() const
491 {
492  //prints values set in common blocks
493   ctest();
494 }
495 void THBTprocessor::SetTrackRejectionFactor(Float_t trf) const 
496 {
497  //setter
498  PARAMETERS.trk_accep = trf;
499 }
500 void THBTprocessor::SetRefControl(Int_t rc) const 
501 {
502  //setter
503  PARAMETERS.ref_control = rc;
504 }
505 void THBTprocessor::SetPIDs(Int_t pid1,Int_t pid2) const 
506 {
507  //setter
508  PARAMETERS.pid[0]=pid1; PARAMETERS.pid[1]=pid2;
509 }
510 void THBTprocessor::SetNPIDtypes(Int_t npidt)const 
511 {
512  //setter
513  PARAMETERS.n_pid_types = npidt;
514 }
515 void THBTprocessor::SetDeltap(Float_t deltp) const 
516 {
517  //setter
518  PARAMETERS.deltap=deltp; 
519 }
520 void THBTprocessor::SetMaxIterations(Int_t maxiter) const 
521 {
522  //setter
523  PARAMETERS.maxit = maxiter;
524 }
525 void THBTprocessor::SetDelChi(Float_t dc)const 
526 {
527  //setter
528  PARAMETERS.delchi = dc;
529 }
530 void THBTprocessor::SetIRand(Int_t irnd) const 
531 {
532  //setter
533  PARAMETERS.irand = irnd;
534 }
535 void THBTprocessor::SetLambda(Float_t lam) const 
536
537  //setter
538  PARAMETERS.lambda = lam;
539 }
540 void THBTprocessor::SetR1d(Float_t r) const 
541 {
542  //setter
543  PARAMETERS.R_1d=r;
544 }
545 void THBTprocessor::SetRSide(Float_t rs) const 
546 {
547  //setter
548  PARAMETERS.Rside=rs;
549 }
550 void THBTprocessor::SetROut(Float_t ro) const 
551 {
552  //setter
553  PARAMETERS.Rout=ro;
554 }
555 void THBTprocessor::SetRLong(Float_t rl) const 
556 {
557  //setter
558  PARAMETERS.Rlong=rl;
559 }
560 void THBTprocessor::SetRPerp(Float_t rp) const 
561 {
562  //setter
563  PARAMETERS.Rperp=rp;
564 }
565 void THBTprocessor::SetRParallel(Float_t rprl) const 
566 {
567  //setter
568  PARAMETERS.Rparallel=rprl;
569 }
570 void THBTprocessor::SetR0(Float_t r0) const 
571 {
572  //setter
573  PARAMETERS.R0=r0;
574 }
575 void THBTprocessor::SetQ0(Float_t q0) const 
576 {
577  //setter
578 PARAMETERS.Q0=q0;
579 }
580 void THBTprocessor::SetSwitch1D(Int_t s1d) const 
581 {
582  //setter
583  PARAMETERS.switch_1d = s1d;
584 }
585 void THBTprocessor::SetSwitch3D(Int_t s3d) const 
586 {
587  //setter
588  PARAMETERS.switch_3d = s3d;
589 }
590 void THBTprocessor::SetSwitchType(Int_t st) const 
591 {
592  //setter
593  PARAMETERS.switch_type = st;
594 }
595
596 void THBTprocessor::SetSwitchCoherence(Int_t sc) const 
597 {
598  //setter
599  PARAMETERS. switch_coherence = sc;
600 }
601 void THBTprocessor::SetSwitchCoulomb(Int_t scol) const 
602 {
603  //setter
604  PARAMETERS. switch_coulomb = scol;
605 }
606 void THBTprocessor::SetSwitchFermiBose(Int_t sfb) const 
607 {
608  //setter
609  PARAMETERS.switch_fermi_bose = sfb;
610 }
611       
612 void THBTprocessor::SetPtRange(Float_t ptmin, Float_t ptmax)const  //Pt in GeV/c
613
614  //setter
615   MESH.pt_min=ptmin;MESH.pt_max=ptmax;
616 }
617
618 void THBTprocessor::SetPxRange(Float_t pxmin, Float_t pxmax) const
619
620  //setter
621  MESH.px_min=pxmin;MESH.px_max=pxmax;
622 }
623
624 void THBTprocessor::SetPyRange(Float_t pymin, Float_t pymax)const 
625
626  //setter
627  MESH.py_min=pymin;MESH.py_max=pymax;
628 }
629
630 void THBTprocessor::SetPzRange(Float_t pzmin, Float_t pzmax) const
631
632  //setter
633  MESH.pz_min=pzmin;MESH.pz_max=pzmax;
634 }
635
636 void THBTprocessor::SetPhiRange(Float_t phimin, Float_t phimax)const //Angle in degrees
637
638  //setter
639  MESH.phi_min=phimin;MESH.phi_max=phimax;
640 }
641
642 void THBTprocessor::SetEtaRange(Float_t etamin, Float_t etamax)const //Pseudorapidity  !!!!!!!!!
643
644  //setter
645  MESH.eta_min=etamin;MESH.eta_max=etamax;
646 }
647
648 void THBTprocessor::SetNPtBins(Int_t nptbin)const
649 {
650 //setter
651 MESH.n_pt_bins=nptbin;
652 }
653 void THBTprocessor::SetNPhiBins(Int_t nphibin)const
654 {
655 //setter
656 MESH.n_phi_bins=nphibin;
657 }
658 void THBTprocessor::SetNEtaBins(Int_t netabin)const
659 {
660 //setter
661 MESH.n_eta_bins=netabin;
662 }
663       
664 void THBTprocessor::SetNPxBins(Int_t npxbin)const
665 {
666 //setter
667 MESH.n_px_bins=npxbin;
668 }
669 void THBTprocessor::SetNPyBins(Int_t npybin)const
670 {
671 //setter
672 MESH.n_py_bins=npybin;
673 }
674 void THBTprocessor::SetNPzBins(Int_t npzbin)const
675 {
676 //setter
677 MESH.n_pz_bins=npzbin;
678 }
679
680 void THBTprocessor::SetNBins1DFineMesh(Int_t n)const
681 {
682 //setter
683 MESH.n_1d_fine=n;
684 }
685 void THBTprocessor::SetBinSize1DFineMesh(Float_t x)const
686 {
687 //setter
688 MESH.binsize_1d_fine=x;
689 }
690       
691 void THBTprocessor::SetNBins1DCoarseMesh(Int_t n)const
692 {
693 //setter
694 MESH.n_1d_coarse =n;
695 }
696 void THBTprocessor::SetBinSize1DCoarseMesh(Float_t x)const
697 {
698 //setter
699 MESH.binsize_1d_coarse=x;
700 }
701       
702 void THBTprocessor::SetNBins3DFineMesh(Int_t n)const
703 {
704 //setter
705 MESH.n_3d_fine =n;
706 }
707 void THBTprocessor::SetBinSize3DFineMesh(Float_t x)const
708 {
709 //setter
710 MESH.binsize_3d_fine=x;
711 }
712       
713 void THBTprocessor::SetNBins3DCoarseMesh(Int_t n)const
714 {
715 //setter
716 MESH.n_3d_coarse=n;
717 }
718 void THBTprocessor::SetBinSize3DCoarseMesh(Float_t x)const
719 {
720 //setter
721 MESH.binsize_3d_coarse=x;
722 }      
723       
724 void THBTprocessor::SetNBins3DFineProjectMesh(Int_t n )const
725 {
726 //setter
727 MESH.n_3d_fine_project=n;
728 }
729
730 void THBTprocessor::SetPrintFull(Int_t flag) const 
731 {
732  //setter
733  PARAMETERS.print_full=flag;
734