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