StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
diginitialize.cxx
1 // //
3 // DIGInitialize //
4 // //
5 // Class performing the initialization (reads the input data card and store it) //
6 // //
7 // //
8 // //
9 // //
10 // //
11 // //
13 #include <diginitialize.h>
14 
15 #include <TROOT.h> // for gROOT object
16 #include <TMath.h>
17 #include <TMatrixD.h>
18 #include <TCanvas.h>
19 #include <TGraph.h>
20 #include <TAxis.h>
21 #include <TRandom3.h>
22 #include <TFile.h>
23 #include <TTree.h>
24 #include <TBranch.h>
25 #include <TClonesArray.h>
26 #include <TString.h>
27 
28 #include <stdio.h>
29 #include <string.h>
30 
31 using namespace std;
32 
33 //==============================================================================
34 //==============================================================================
35 ClassImp(DIGInitialize)
36 
38  : TNamed("DIG Initialize","Initialize")
39 {
40  //
41  // default constructor
42  //
43 
44 }
45 
46 //______________________________________________________________________________
47 //
48 
49 DIGInitialize::DIGInitialize(const char *name, const char *title, TString aCP, TString aCFN, TString action) : TNamed(name,title)
50 {
51 
52 // --- open config file:
53 
54 
55  SetConfigPathAndFileName(aCP,aCFN);
56  printf(" Reading Setup from %s\n", fConfigPathAndFileName.Data());
57 
58  fConfigFileStream.open(fConfigPathAndFileName);
59  Bool_t answer=fConfigFileStream.fail();
60  while( answer ) {
61  cout << "enter correct file name \n";
62  cin >> fConfigFileName;
63  fConfigPathAndFileName = fConfigPath + fConfigFileName;
64  printf(" Reading Setup from %s\n", fConfigPathAndFileName.Data());
65  fConfigFileStream.open(fConfigPathAndFileName);
66  answer=fConfigFileStream.fail();
67  }
68 
69  // Char_t char_buffer;
70 
71  //----------------------------------------------
72  //--------------------READ Action PARAMETERS
73  //----------------------------------------------
74  Char_t c;
75  Int_t k;
76 
77  /*
78  nextItem(':');
79  nextItem('"'); k = 0;
80  do {
81  fConfigFileStream >> c;
82  if ((c != '"') && (k < ActionParameter.actionnum)) {
83  ActionParameter.Doit[k] = c;
84  k++;
85  }
86  } while (c != '"');
87  */
88  //string copy to char:
89  ActionParameter.Doit[action.Sizeof()]=0;
90  string temp;
91  temp = action;
92  memcpy(ActionParameter.Doit,temp.c_str() ,action.Sizeof());
93 
94  nextItem(':');
95  nextItem('"'); k = 0;
96  do {
97  fConfigFileStream >> c;
98  if ((c != '"') && (k < ActionParameter.actionnum)) {
99  ActionParameter.Model[k] = c;
100  k++;
101  }
102  } while (c != '"');
103 
104 
105 
106 
107  //----------------------------------------------
108  //--------------------READ BEAM PARAMETERS
109  //----------------------------------------------
110 
111  read_item(BeamParameter.RunNumber);
112  read_item(BeamParameter.NumberOfEvents);
113  read_item(BeamParameter.BeamOption);
114  read_item(BeamParameter.ParticleDensity);
115  //read_item(BeamParameter.NumberOfPlanes);
116  read_item(BeamParameter.NAngles);
117  nextItem(':');
118  for (Int_t j = 0; j < BeamParameter.NAngles; j++) {
119  fConfigFileStream >> BeamParameter.ThetaIncidentDeg[j];
120  }
121  nextItem(':');
122  for (Int_t j = 0; j < BeamParameter.NAngles; j++) {
123  fConfigFileStream >> BeamParameter.PhiIncidentDeg[j];
124  }
125  // printf(" Reading Setup from %s\n", fConfigPathAndFileName.Data());
126 
127  //----------------------------------------------
128  //--------------------READ PLANE PARAMETERS
129  //----------------------------------------------
130 
131  read_item(PlaneParameter.NGeom);
132 
133  nextItem(':');
134  for (Int_t j = 0; j < PlaneParameter.NGeom; j++) {
135  fConfigFileStream >> PlaneParameter.PitchX[j];
136  }
137 
138  nextItem(':');
139  for (Int_t j = 0; j < PlaneParameter.NGeom; j++) {
140  fConfigFileStream >> PlaneParameter.PitchY[j];
141  }
142 
143  nextItem(':');
144  for (Int_t j = 0; j < PlaneParameter.NGeom; j++) {
145  fConfigFileStream >> PlaneParameter.NoiseElectrons[j];
146  }
147 
148  nextItem(':');
149  for (Int_t j = 0; j < PlaneParameter.NGeom; j++) {
150  fConfigFileStream >> PlaneParameter.EpitaxialThickness[j];
151  }
152 
153 
154  read_item(PlaneParameter.NPixelsX);
155  read_item(PlaneParameter.NPixelsY);
156 
157  read_item(PlaneParameter.NTemperature);
158 
159  nextItem(':');
160  for (Int_t j = 0; j < PlaneParameter.NTemperature; j++) {
161  fConfigFileStream >> PlaneParameter.Temperature[j];
162  }
163 
164  read_item(PlaneParameter.IonizationEnergy);
165  read_item(PlaneParameter.SegmentSize);
166  read_item(PlaneParameter.MaximumSegmentSize);
167  read_item(PlaneParameter.MaximumChargePerSegment);
168  read_item(PlaneParameter.DiffusionMaximumRangeInX);
169  read_item(PlaneParameter.DiffusionMaximumRangeInY);
170  read_item(PlaneParameter.ReflexionCoefficient);
171  read_item(PlaneParameter.BasicModel_SigmaTenMicrons);
172 
173  //----------------------------------------------
174  //--------------------READ TRANSPORT PARAMETERS
175  //----------------------------------------------
176 
177  read_item(PlaneParameter.NTransport);
178  pTransportParameter = new TransportParameter_t[PlaneParameter.NTransport];
179 
180  //---loop over all TRANSPORT models
181  for (Int_t p = 0; p < PlaneParameter.NTransport; p++) {
182  read_item(pTransportParameter[p].ChargeModel);
183  read_item(pTransportParameter[p].RangeLimit_InPitchUnit);
184  if(pTransportParameter[p].ChargeModel==1){
185  read_item(pTransportParameter[p].Lorentz2DModel_Cp0);
186  read_item(pTransportParameter[p].Lorentz2DModel_Cp1);
187  }
188  if(pTransportParameter[p].ChargeModel==2){
189  read_item(pTransportParameter[p].Gauss2DModel_sigma1_Cp0);
190  read_item(pTransportParameter[p].Gauss2DModel_sigma1_Cp1);
191  read_item(pTransportParameter[p].Gauss2DModel_sigma2_Cp0);
192  read_item(pTransportParameter[p].Gauss2DModel_sigma2_Cp1);
193  read_item(pTransportParameter[p].Gauss2DModel_weight);
194  }
195  if(pTransportParameter[p].ChargeModel==3){
196  read_item(pTransportParameter[p].LorGaussModel_Norm1_Cp0);
197  read_item(pTransportParameter[p].LorGaussModel_Norm1_Cp1);
198  read_item(pTransportParameter[p].LorGaussModel_Norm1_Cp2);
199  read_item(pTransportParameter[p].LorGaussModel_sigma_Cp0);
200  read_item(pTransportParameter[p].LorGaussModel_sigma_Cp1);
201  read_item(pTransportParameter[p].LorGaussModel_C_Cp0);
202  read_item(pTransportParameter[p].LorGaussModel_C_Cp1);
203  read_item(pTransportParameter[p].LorGaussModel_Norm_Cp0);
204  read_item(pTransportParameter[p].LorGaussModel_Norm_Cp1);
205  }
206  if(pTransportParameter[p].ChargeModel==4){
207  read_item(pTransportParameter[p].lorlorgausModel_Norm1_Cp0) ;
208  read_item(pTransportParameter[p].lorlorgausModel_Norm1_Cp1) ;
209  read_item(pTransportParameter[p].lorlorgausModel_x01_Cp0) ;
210  read_item(pTransportParameter[p].lorlorgausModel_x01_Cp1) ;
211  read_item(pTransportParameter[p].lorlorgausModel_sigmax1_Cp0) ;
212  read_item(pTransportParameter[p].lorlorgausModel_sigmax1_Cp1) ;
213  read_item(pTransportParameter[p].lorlorgausModel_y01_Cp0) ;
214  read_item(pTransportParameter[p].lorlorgausModel_y01_Cp1) ;
215  read_item(pTransportParameter[p].lorlorgausModel_sigmay1_Cp0) ;
216  read_item(pTransportParameter[p].lorlorgausModel_sigmay1_Cp1) ;
217  read_item(pTransportParameter[p].lorlorgausModel_Gamma_Cp0) ;
218  read_item(pTransportParameter[p].lorlorgausModel_Gamma_Cp1) ;
219  read_item(pTransportParameter[p].lorlorgausModel_x0_Cp0) ;
220  read_item(pTransportParameter[p].lorlorgausModel_x0_Cp1) ;
221  read_item(pTransportParameter[p].lorlorgausModel_y0_Cp0) ;
222  read_item(pTransportParameter[p].lorlorgausModel_y0_Cp1) ;
223  read_item(pTransportParameter[p].lorlorgausModel_norm_Cp0) ;
224  read_item(pTransportParameter[p].lorlorgausModel_norm_Cp1) ;
225  read_item(pTransportParameter[p].lorlorgausModel_normgaus2_Cp0) ;
226  read_item(pTransportParameter[p].lorlorgausModel_normgaus2_Cp1) ;
227  read_item(pTransportParameter[p].lorlorgausModel_sigma2_Cp0) ;
228  read_item(pTransportParameter[p].lorlorgausModel_sigma2_Cp1) ;
229  }
230  if(pTransportParameter[p].ChargeModel==5){
231  read_item(pTransportParameter[p].l1dimgauslor_Norm_g_1st);
232  read_item(pTransportParameter[p].l1dimgauslor_x0_g_1st);
233  read_item(pTransportParameter[p].l1dimgauslor_sigma_g_1st);
234  read_item(pTransportParameter[p].l1dimgauslor_Gamma_lor_1st);
235  read_item(pTransportParameter[p].l1dimgauslor_x0_lor_1st);
236  read_item(pTransportParameter[p].l1dimgauslor_norm_lor_1st);
237  read_item(pTransportParameter[p].l1dimgauslor_Norm_g_2nd);
238  read_item(pTransportParameter[p].l1dimgauslor_x0_g_2nd);
239  read_item(pTransportParameter[p].l1dimgauslor_sigma_g_2nd);
240  read_item(pTransportParameter[p].l1dimgauslor_Gamma_lor_2nd);
241  read_item(pTransportParameter[p].l1dimgauslor_x0_lor_2nd);
242  read_item(pTransportParameter[p].l1dimgauslor_norm_lor_2nd);
243  }
244  }
245  //----------------------------------------------
246  //READ ADC PARAMETERS
247  //----------------------------------------------
248 
249  read_item(PlaneParameter.NADC);
250  pADCParameter = new ADCParameter_t[PlaneParameter.NADC];
251 
252  //---loop over all ADCs
253  for (Int_t p = 0; p < PlaneParameter.NADC; p++) {
254  //---read number of bits of the ADC:
255  read_item(pADCParameter[p].Nbits);
256  //----compute number of thresholds needed:
257  pADCParameter[p].NThresholds = int(TMath::Power(2.0,pADCParameter[p].Nbits) - 1);
258  read_item(pADCParameter[p].ADC_linear);
259  if(pADCParameter[p].ADC_linear){ //-------linear case (enter LSB and step size)
260  read_item(pADCParameter[p].LSB);
261  read_item(pADCParameter[p].Electron_Conversion);
262  nextItem(':');
263  for (Int_t j = 0; j < pADCParameter[p].NThresholds; j++) {
264  pADCParameter[p].ADC_thresholds[j] = pADCParameter[p].LSB+float(j)* (pADCParameter[p].Electron_Conversion);
265  }
266  }else{ //non linear case (read each value instead)
267  nextItem(':');
268  nextItem(':');
269  nextItem(':');
270  for (Int_t j = 0; j < pADCParameter[p].NThresholds; j++) {
271  fConfigFileStream >> pADCParameter[p].ADC_thresholds[j];
272  }
273  pADCParameter[p].LSB=pADCParameter[p].ADC_thresholds[0];
274  pADCParameter[p].Electron_Conversion = -999; // dummy value since not needed.
275  }
276  }
277 
278 
279  PrintInfo();
280 
281  //----------------------------------------------
282  //Configure
283  //----------------------------------------------
284 
285 
286 
287 
288 }
289 //______________________________________________________________________________
290 //
291 
292 
293 DIGInitialize::~DIGInitialize() { //
294  // virtual destructor
295  //
296  // delete fLayers;
297 }
298 
299 
300 
301 //______________________________________________________________________________
302 //
303 void DIGInitialize::SetConfigPath(TString aCP)
304 {
305  fConfigPath = aCP;
306 }
307 
308 
309 //______________________________________________________________________________
310 //
311 void DIGInitialize::SetConfigFileName(TString aCFN)
312 {
313  fConfigFileName = aCFN;
314 }
315 
316 //______________________________________________________________________________
317 //
318 void DIGInitialize::SetConfigPathAndFileName()
319 {
320  fConfigPathAndFileName = fConfigPath + fConfigFileName;
321 }
322 
323 //______________________________________________________________________________
324 //
325 void DIGInitialize::SetConfigPathAndFileName(TString aCP,TString aCFN)
326 {
327  fConfigPath = aCP;
328  fConfigFileName = aCFN;
329  fConfigPathAndFileName = fConfigPath + fConfigFileName;
330 }
331 //______________________________________________________________________________
332 //
333 TString DIGInitialize::GetConfigPath()
334 {
335  return fConfigPath;
336 }
337 //______________________________________________________________________________
338 //
339 TString DIGInitialize::GetConfigFileName()
340 {
341  return fConfigFileName;
342 }
343 //______________________________________________________________________________
344 //
345 TString DIGInitialize::GetConfigPathAndFileName()
346 {
347  return fConfigPathAndFileName;
348 }
349 //______________________________________________________________________________
350 //
351 
352 void DIGInitialize::PrintInfo() {
353 
354  std::cout<<"------------------------------------------- "<<endl;
355  std::cout<<"---------Action configuration------------- "<<endl;
356  std::cout<<"------------------------------------------- "<<endl;
357  std::cout<<" Action: "<<ActionParameter.Doit <<endl;
358  //printf("%s\n",ActionParameter.Doit);
359  std::cout<<" Model: "<<ActionParameter.Model << endl;
360  //printf("%s\n",ActionParameter.Model);
361  std::cout<<"------------------------------------------- "<<endl;
362  std::cout<<"---------General configuration------------- "<<endl;
363  std::cout<<"------------------------------------------- "<<endl;
364  std::cout<<"-- RunNumber: "<<BeamParameter.RunNumber<<endl;
365  std::cout<<"-- NumberOfEvents: "<<BeamParameter.NumberOfEvents<<endl;
366  std::cout<<"-- BeamOption: "<<BeamParameter.BeamOption<<endl;
367  std::cout<<"-- ParticleDensity: "<<BeamParameter.ParticleDensity<<endl;
368  std::cout<<"--Number of different Angles: "<<BeamParameter.NAngles<<endl;
369  for (Int_t j = 0; j < BeamParameter.NAngles; j++) {
370  std::cout<<" Theta(deg): "<<BeamParameter.ThetaIncidentDeg[j]<<" Phi(deg): "<<BeamParameter.PhiIncidentDeg[j]<<endl;
371  }
372  //std::cout<<" NumberOfPlanes: "<<BeamParameter.NumberOfPlanes<<endl;
373  std::cout<<"------------------------------------------- "<<endl;
374  std::cout<<"----------Plane configuration-------------- "<<endl;
375  std::cout<<"------------------------------------------- "<<endl;
376  std::cout<<"--Number of different Geometries: "<<PlaneParameter.NGeom<<endl;
377  for (Int_t j = 0; j < PlaneParameter.NGeom ; j++) {
378  std::cout<<" PitchX: "<<PlaneParameter.PitchX[j]<<" PitchY: "<<PlaneParameter.PitchY[j]<<endl;
379  std::cout<<" Epitaxial_thickness: "<<PlaneParameter.EpitaxialThickness[j]<<endl;
380  std::cout<<" Noise: "<<PlaneParameter.NoiseElectrons[j]<<endl;
381  }
382 
383  std::cout<<"--Number pixels in X and Y: "<<PlaneParameter.NPixelsX<<" x "<<PlaneParameter.NPixelsY<<endl;
384 
385  std::cout<<"--Number different temperatures "<<PlaneParameter.NTemperature<<endl;
386  for (Int_t j = 0; j < PlaneParameter.NTemperature; j++) {
387  std::cout<<" Temperature: "<<PlaneParameter.Temperature[j]<<endl;
388  }
389  std::cout<<"--IonizationEnergy "<< PlaneParameter.IonizationEnergy<<endl;
390  std::cout<<"--SegmentSize "<<PlaneParameter.SegmentSize<<endl;
391  std::cout<<"--MaximumSegmentSize "<<PlaneParameter.MaximumSegmentSize<<endl;
392  std::cout<<"--MaximumChargePerSegment "<<PlaneParameter.MaximumChargePerSegment<<endl;
393  std::cout<<"--DiffusionMaximumRangeInX "<<PlaneParameter.DiffusionMaximumRangeInX<<endl;
394  std::cout<<"--DiffusionMaximumRangeInY "<<PlaneParameter.DiffusionMaximumRangeInY<<endl;
395  std::cout<<"--ReflexionCoefficient "<<PlaneParameter.ReflexionCoefficient<<endl;
396  std::cout<<"--BasicModel_SigmaTenMicrons "<<PlaneParameter.BasicModel_SigmaTenMicrons<<endl;
397  std::cout<<"------------------------------------------- "<<endl;
398  std::cout<<"----------Transport configuration-------------- "<<endl;
399  std::cout<<"------------------------------------------- "<<endl;
400  std::cout<<"-- Number of Transport models = "<<PlaneParameter.NTransport<<endl;
401  for (Int_t p = 0; p < PlaneParameter.NTransport; p++) {
402  std::cout<<"-> Transport Model number "<<p<<endl;
403  std::cout<<"--ChargeModel "<<pTransportParameter[p].ChargeModel<<endl;
404  std::cout<<"--RangeLimit_InPitchUnit "<<pTransportParameter[p].RangeLimit_InPitchUnit<<endl;
405  if(pTransportParameter[p].ChargeModel==1){
406  std::cout<<"--Lorentz2DModel_Cp0 "<<pTransportParameter[p].Lorentz2DModel_Cp0<<endl;
407  std::cout<<"--Lorentz2DModel_Cp1 "<<pTransportParameter[p].Lorentz2DModel_Cp1<<endl;
408  }
409  if(pTransportParameter[p].ChargeModel==2){
410  std::cout<<"--Gauss2DModel_sigma1_Cp0 "<<pTransportParameter[p].Gauss2DModel_sigma1_Cp0<<endl;
411  std::cout<<"--Gauss2DModel_sigma1_Cp1 "<<pTransportParameter[p].Gauss2DModel_sigma1_Cp1<<endl;
412  std::cout<<"--Gauss2DModel_sigma2_Cp0 "<<pTransportParameter[p].Gauss2DModel_sigma2_Cp0<<endl;
413  std::cout<<"--Gauss2DModel_sigma2_Cp1 "<<pTransportParameter[p].Gauss2DModel_sigma2_Cp1<<endl;
414  std::cout<<"--Gauss2DModel_weight "<<pTransportParameter[p].Gauss2DModel_weight<<endl;
415  }
416  if(pTransportParameter[p].ChargeModel==3){
417  std::cout<<"--LorGaussModel_Norm1_Cp0 "<<pTransportParameter[p].LorGaussModel_Norm1_Cp0<<endl;
418  std::cout<<"--LorGaussModel_Norm1_Cp1 "<<pTransportParameter[p].LorGaussModel_Norm1_Cp1<<endl;
419  std::cout<<"--LorGaussModel_Norm1_Cp2 "<<pTransportParameter[p].LorGaussModel_Norm1_Cp2<<endl;
420  std::cout<<"--LorGaussModel_sigma_Cp0 "<<pTransportParameter[p].LorGaussModel_sigma_Cp0<<endl;
421  std::cout<<"--LorGaussModel_sigma_Cp1 "<<pTransportParameter[p].LorGaussModel_sigma_Cp1<<endl;
422  std::cout<<"--LorGaussModel_C_Cp0 "<<pTransportParameter[p].LorGaussModel_C_Cp0<<endl;
423  std::cout<<"--LorGaussModel_C_Cp1 "<<pTransportParameter[p].LorGaussModel_C_Cp1<<endl;
424  std::cout<<"--LorGaussModel_Norm_Cp0 "<<pTransportParameter[p].LorGaussModel_Norm_Cp0<<endl;
425  std::cout<<"--LorGaussModel_Norm_Cp1 "<<pTransportParameter[p].LorGaussModel_Norm_Cp1<<endl;
426  }
427  if(pTransportParameter[p].ChargeModel==4){
428  std::cout<<"--lorlorgausModel_Norm1_Cp0 "<<pTransportParameter[p].lorlorgausModel_Norm1_Cp0<<endl;
429  std::cout<<"--lorlorgausModel_Norm1_Cp1 "<<pTransportParameter[p].lorlorgausModel_Norm1_Cp1<<endl;
430  std::cout<<"--lorlorgausModel_x01_Cp0 "<<pTransportParameter[p].lorlorgausModel_x01_Cp0<<endl;
431  std::cout<<"--lorlorgausModel_x01_Cp1 "<<pTransportParameter[p].lorlorgausModel_x01_Cp1<<endl;
432  std::cout<<"--lorlorgausModel_sigmax1_Cp0 "<<pTransportParameter[p].lorlorgausModel_sigmax1_Cp0<<endl;
433  std::cout<<"--lorlorgausModel_sigmax1_Cp1 "<<pTransportParameter[p].lorlorgausModel_sigmax1_Cp1<<endl;
434  std::cout<<"--lorlorgausModel_y01_Cp0 "<<pTransportParameter[p].lorlorgausModel_y01_Cp0<<endl;
435  std::cout<<"--lorlorgausModel_y01_Cp1 "<<pTransportParameter[p].lorlorgausModel_y01_Cp1<<endl;
436  std::cout<<"--lorlorgausModel_sigmay1_Cp0 "<<pTransportParameter[p].lorlorgausModel_sigmay1_Cp0<<endl;
437  std::cout<<"--lorlorgausModel_sigmay1_Cp1 "<<pTransportParameter[p].lorlorgausModel_sigmay1_Cp1<<endl;
438  std::cout<<"--lorlorgausModel_Gamma_Cp0 "<<pTransportParameter[p].lorlorgausModel_Gamma_Cp0<<endl;
439  std::cout<<"--lorlorgausModel_Gamma_Cp1 "<<pTransportParameter[p].lorlorgausModel_Gamma_Cp1<<endl;
440  std::cout<<"--lorlorgausModel_x0_Cp0 "<<pTransportParameter[p].lorlorgausModel_x0_Cp0<<endl;
441  std::cout<<"--lorlorgausModel_x0_Cp1 "<<pTransportParameter[p].lorlorgausModel_x0_Cp1<<endl;
442  std::cout<<"--lorlorgausModel_y0_Cp0 "<<pTransportParameter[p].lorlorgausModel_y0_Cp0<<endl;
443  std::cout<<"--lorlorgausModel_y0_Cp1 "<<pTransportParameter[p].lorlorgausModel_y0_Cp1<<endl;
444  std::cout<<"--lorlorgausModel_norm_Cp0 "<<pTransportParameter[p].lorlorgausModel_norm_Cp0<<endl;
445  std::cout<<"--lorlorgausModel_norm_Cp1 "<<pTransportParameter[p].lorlorgausModel_norm_Cp1<<endl;
446  std::cout<<"--lorlorgausModel_normgaus2_Cp0 "<<pTransportParameter[p].lorlorgausModel_normgaus2_Cp0<<endl;
447  std::cout<<"--lorlorgausModel_normgaus2_Cp1 "<<pTransportParameter[p].lorlorgausModel_normgaus2_Cp1<<endl;
448  std::cout<<"--lorlorgausModel_sigma2_Cp0 "<<pTransportParameter[p].lorlorgausModel_sigma2_Cp0<<endl;
449  std::cout<<"--lorlorgausModel_sigma2_Cp1 "<<pTransportParameter[p].lorlorgausModel_sigma2_Cp1<<endl;
450  }
451  if(pTransportParameter[p].ChargeModel==5){
452  std::cout<<"--l1dimgauslor_Norm_g_1st "<<pTransportParameter[p].l1dimgauslor_Norm_g_1st<<endl;
453  std::cout<<"--l1dimgauslor_x0_g_1st "<<pTransportParameter[p].l1dimgauslor_x0_g_1st<<endl;
454  std::cout<<"--l1dimgauslor_sigma_g_1st "<<pTransportParameter[p].l1dimgauslor_sigma_g_1st<<endl;
455  std::cout<<"--l1dimgauslor_Gamma_lor_1st "<<pTransportParameter[p].l1dimgauslor_Gamma_lor_1st<<endl;
456  std::cout<<"--l1dimgauslor_x0_lor_1st "<<pTransportParameter[p].l1dimgauslor_x0_lor_1st<<endl;
457  std::cout<<"--l1dimgauslor_norm_lor_1st "<<pTransportParameter[p].l1dimgauslor_norm_lor_1st<<endl;
458  std::cout<<"--l1dimgauslor_Norm_g_2nd "<<pTransportParameter[p].l1dimgauslor_Norm_g_2nd<<endl;
459  std::cout<<"--l1dimgauslor_x0_g_2nd "<<pTransportParameter[p].l1dimgauslor_x0_g_2nd<<endl;
460  std::cout<<"--l1dimgauslor_sigma_g_2nd "<<pTransportParameter[p].l1dimgauslor_sigma_g_2nd<<endl;
461  std::cout<<"--l1dimgauslor_Gamma_lor_2nd "<<pTransportParameter[p].l1dimgauslor_Gamma_lor_2nd<<endl;
462  std::cout<<"--l1dimgauslor_x0_lor_2nd "<<pTransportParameter[p].l1dimgauslor_x0_lor_2nd<<endl;
463  std::cout<<"--l1dimgauslor_norm_lor_2nd "<<pTransportParameter[p].l1dimgauslor_norm_lor_2nd<<endl;
464  }
465  }
466  std::cout<<"------------------------------------------- "<<endl;
467  std::cout<<"-----------ADC configuration--------------- "<<endl;
468  std::cout<<"------------------------------------------- "<<endl;
469  std::cout<<"-- Number of ADCs = "<<PlaneParameter.NADC<<endl;
470  for (Int_t p = 0; p < PlaneParameter.NADC; p++) {
471  std::cout<<"-> ADC "<<p<<endl;
472  std::cout<<"Nbits= "<<pADCParameter[p].Nbits<<"; ADC_linear="<<pADCParameter[p].ADC_linear<<endl;
473  std::cout<<"NThresholds= "<<pADCParameter[p].NThresholds<<"; LSB= "<<pADCParameter[p].LSB <<endl;
474  std::cout<<"Electron_Conversion= "<<pADCParameter[p].Electron_Conversion<<endl;
475  Int_t Nthtoprint = pADCParameter[p].NThresholds;
476  if(Nthtoprint < 33){
477  for (Int_t j = 0; j < pADCParameter[p].NThresholds; j++) {
478  std::cout<<"thresholds["<<j<<"]="<<pADCParameter[p].ADC_thresholds[j]<<endl;
479  }
480  }else{
481  Nthtoprint = 32;
482  for (Int_t j = 0; j < Nthtoprint; j++) {
483  std::cout<<"thresholds["<<j<<"]="<<pADCParameter[p].ADC_thresholds[j]<<endl;
484  }
485  std::cout<<" etc. "<<endl;
486  }
487  }
488 
489  std::cout<<"------------------------------------------- "<<endl;
490  std::cout<<"------------------------------------------- "<<endl;
491  std::cout<<"------------------------------------------- "<<endl;
492 
493  std::cout<<" "<<endl;
494  std::cout<<"------------------------------------------- "<<endl;
495  std::cout<<"----------END OF READ OUT FILE------------- "<<endl;
496  std::cout<<"------------------------------------------- "<<endl;
497 }
498 
499 //______________________________________________________________________________
500 //
501 void DIGInitialize::nextItem(Char_t delimiter)
502 {
503  Char_t c;
504  do {
505  fConfigFileStream >> c;
506  } while (c != delimiter);
507 }
508 
509 
510 //______________________________________________________________________________
511 //
512 void DIGInitialize::read_item(Int_t &arg)
513 {
514  nextItem(':');
515  fConfigFileStream >> arg;
516 }
517 
518 //______________________________________________________________________________
519 //
520 void DIGInitialize::read_item(Float_t &arg)
521 {
522 
523  // reads values from configuration file
524 
525  nextItem(':');
526  fConfigFileStream >> arg;
527 }
528 //______________________________________________________________________________
529 //
530 void DIGInitialize::read_item(Double_t &arg)
531 {
532 
533  // reads values from configuration file
534 
535  nextItem(':');
536  fConfigFileStream >> arg;
537 }
538 //______________________________________________________________________________
539 //
540 void DIGInitialize::read_item(Bool_t &arg)
541 {
542 
543  // reads values from configuration file
544 
545  nextItem(':');
546  fConfigFileStream >> arg;
547 }
548 //______________________________________________________________________________
549 //