source: trunk/MagicSoft/Simulation/Detector/include-MFadc/MFadc.cxx@ 2444

Last change on this file since 2444 was 2433, checked in by blanch, 22 years ago
Now it writes in the screen its cahracteristiques while the constructor is called.
File size: 18.9 KB
Line 
1////////////////////////////////////////////////////////////////
2//
3// MFadc
4//
5//
6#include "MFadc.hxx"
7
8#include "MMcEvt.hxx"
9
10#include "TROOT.h"
11#include <TApplication.h>
12#include <TVirtualX.h>
13#include <TGClient.h>
14
15#include "TH1.h"
16#include "TObjArray.h"
17
18#include "MGFadcSignal.hxx"
19
20MFadc::MFadc(Int_t pix, Float_t ampl, Float_t fwhm, Float_t amplout, Float_t fwhmout) {
21 //
22 // Constructor overloaded II
23 //
24 // Input variables:
25 // 1. ampl(out) = integration of the single phe response (outer pixels)
26 // 2. fwhm(out) = width at half high of the single phe
27 // response(outer pixels)
28 //
29 // The procedure is the following:
30 // 1. some parameters of the trigger are set to default.
31 // this parameters of the trigger may be changed
32 // 3. Then the all signals are set to zero
33 numpix=pix;
34
35 fwhm_resp = fwhm;
36 ampl_resp = ampl;
37 fwhm_resp_outer = fwhmout;
38 ampl_resp_outer = amplout;
39
40 cout<< "[MFadc] Setting up the MFadc with this values "<< endl ;
41 cout<< "[MFadc] - Inner pixels : "<< endl ;
42 cout<< "[MFadc] Response Are : "<<ampl<<" adc counts"<< endl ;
43 cout<< "[MFadc] Response FWHM : "<<fwhm<<" ns"<< endl ;
44 cout<< "[MFadc] - Inner pixels : "<< endl ;
45 cout<< "[MFadc] Response Are : "<<amplout<<" adc counts"<< endl ;
46 cout<< "[MFadc] Response FWHM : "<<fwhmout<<" ns"<< endl ;
47
48 //
49 // set up the response shape
50 //
51 Int_t i ;
52
53 Float_t sigma ;
54 Float_t x, x0 ;
55
56 sigma = fwhm_resp / 2.35 ;
57 x0 = 3*sigma ;
58
59 Float_t dX, dX2 ;
60
61 dX = WIDTH_FADC_TIMESLICE / SUBBINS ;
62 dX2 = dX/2. ;
63
64 for (i=0; i< RESPONSE_SLICES_MFADC ; i++ ) {
65
66 x = i * dX + dX2 ;
67
68 //
69 // the value 1/(2*Pi*sigma^2) was introduced to normalize
70 // the area at the input value
71 //
72 sing_resp[i] = ampl_resp / sqrt(2*3.1415926*sigma*sigma)*
73 expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
74
75 }
76
77 sigma = fwhm_resp_outer / 2.35 ;
78 x0 = 3*sigma ;
79
80 dX = WIDTH_FADC_TIMESLICE / SUBBINS ;
81 dX2 = dX/2. ;
82
83 for (i=0; i< RESPONSE_SLICES_MFADC ; i++ ) {
84
85 x = i * dX + dX2 ;
86
87 //
88 // the value 1/(2*Pi*sigma^2) was introduced to normalize
89 // the area at the input value
90 //
91 sing_resp_outer[i] = ampl_resp_outer / sqrt(2*3.1415926*sigma*sigma)*
92 expf(-0.5 * (x-x0)*(x-x0) / (sigma*sigma) ) ;
93
94 }
95
96 //
97 // init the Random Generator for Electonic Noise
98 //
99
100 GenElec = new TRandom () ;
101
102 Reset();
103
104 //
105 // set all pedestals to 0
106 //
107
108 for ( i =0 ; i <CAMERA_PIXELS ; i++ ) {
109 pedestal[i] = 0.0 ;
110 }
111
112 cout<<" end of MFadc::MFadc()"<<endl;
113}
114
115void MFadc::Reset() {
116 //
117 // set all values of the signals to zero
118 // set tha values of FADC slices that would be read after trigger to zero
119 //
120 memset(used, 0, CAMERA_PIXELS*sizeof(Bool_t));
121 memset(output, 0, CAMERA_PIXELS*FADC_SLICES*sizeof(UChar_t));
122 memset(output_lowgain, 0, CAMERA_PIXELS*FADC_SLICES*sizeof(UChar_t));
123}
124void MFadc::Fill( Int_t iPix, Float_t time,
125 Float_t amplitude, Int_t isinner ) {
126
127 if(isinner)
128 Fill(iPix, time, amplitude);
129 else
130 FillOuter(iPix, time, amplitude);
131
132}
133void MFadc::Fill( Int_t iPix, Float_t time, Float_t amplitude ) {
134
135 //
136 // fills the information about one single Phe in the Trigger class
137 //
138 // parameter is the number of the pixel and the time-difference to the
139 // first particle
140 //
141 //
142
143 Int_t i, ichan, ichanfadc ;
144
145 //
146 // first we have to check if the pixel iPix is used or not until now
147 // if this is the first use, reset all signal for that pixels
148 //
149 if ( iPix > numpix ) {
150 cout << " WARNING: MFadc::Fill() : iPix greater than Pixels in Camera = "
151 << numpix
152 << endl ;
153 exit(987) ;
154 }
155
156 if ( used[iPix] == FALSE ) {
157 used [iPix] = TRUE ;
158
159 for (i=0; i < (Int_t) SLICES_MFADC; i++ ) {
160 sig[iPix][i] = 0. ;
161 }
162 }
163
164 //
165 // then select the time slice to use (ican)
166 //
167
168
169 if ( time < 0. ) {
170 cout << " WARNING! Fadc::Fill " << time << " below ZERO!! Very strange!!"
171 << endl ;
172 }
173 else if ( time < TOTAL_TRIGGER_TIME ) {
174 //
175 // determine the slices number assuming the WIDTH_RESPONSE_MFADC
176 //
177 ichan = (Int_t) ( time / ((Float_t) WIDTH_RESPONSE_MFADC ));
178
179 //
180 // putting the response slices in the right sig slices.
181 // Be carefull, because both slices have different widths.
182 //
183
184 for ( i = 0 ; i<RESPONSE_SLICES; i++ ) {
185 ichanfadc = (Int_t) ((ichan+i)/SUBBINS) ;
186 if ( (ichanfadc) < (Int_t)SLICES_MFADC ) {
187 sig[iPix][ichanfadc] += (amplitude * sing_resp[i] ) ;
188 }
189 }
190 }
191 else {
192 cout << " WARNING! Fadc::Fill " << time << " out of TriggerTimeRange "
193 << TOTAL_TRIGGER_TIME << endl ;
194 }
195
196}
197
198void MFadc::FillOuter( Int_t iPix, Float_t time, Float_t amplitude ) {
199
200 //
201 // fills the information about one single Phe in the Trigger class
202 // for an outer pixel
203 //
204 // parameter is the number of the pixel and the time-difference to the
205 // first particle
206 //
207 //
208
209 Int_t i, ichan, ichanfadc ;
210
211 //
212 // first we have to check if the pixel iPix is used or not until now
213 // if this is the first use, reset all signal for that pixels
214 //
215 if ( iPix > numpix ) {
216 cout << " WARNING: MFadc::FillOuter() : iPix greater than CAMERA_PIXELS"
217 << endl ;
218 exit(987) ;
219 }
220
221 if ( used[iPix] == FALSE ) {
222 used [iPix] = TRUE ;
223
224 for (i=0; i < (Int_t) SLICES_MFADC; i++ ) {
225 sig[iPix][i] = 0. ;
226 }
227 }
228
229 //
230 // then select the time slice to use (ican)
231 //
232
233
234 if ( time < 0. ) {
235 cout << " WARNING! Fadc::FillOuter " << time << " below ZERO!! Very strange!!"
236 << endl ;
237 }
238 else if ( time < TOTAL_TRIGGER_TIME ) {
239 //
240 // determine the slices number assuming the WIDTH_RESPONSE_MFADC
241 //
242 ichan = (Int_t) ( time / ((Float_t) WIDTH_RESPONSE_MFADC ));
243
244 //
245 // putting the response slices in the right sig slices.
246 // Be carefull, because both slices have different widths.
247 //
248
249 for ( i = 0 ; i<RESPONSE_SLICES; i++ ) {
250 ichanfadc = (Int_t) ((ichan+i)/SUBBINS) ;
251 if ( (ichanfadc) < (Int_t)SLICES_MFADC ) {
252 sig[iPix][ichanfadc] += (amplitude * sing_resp_outer[i] ) ;
253 }
254 }
255 }
256 else {
257 cout << " WARNING! Fadc::FillOuter " << time << " out of TriggerTimeRange "
258 << TOTAL_TRIGGER_TIME << endl ;
259 }
260
261}
262
263void MFadc::Set( Int_t iPix, Float_t resp[(Int_t) SLICES_MFADC]) {
264
265 //
266 // Sets the information about fadc reponse from a given array
267 //
268 // parameter is the number of the pixel and the values to be set
269 //
270 //
271
272 Int_t i ;
273
274 //
275 // first we have to check if the pixel iPix is used or not until now
276 // if this is the first use, reset all signal for that pixels
277 //
278 if ( iPix > numpix ) {
279 cout << " WARNING: MFadc::Fill() : iPix greater than CAMERA_PIXELS"
280 << endl ;
281 exit(987) ;
282 }
283
284 if ( used[iPix] == FALSE ) {
285 used [iPix] = TRUE ;
286
287 for (i=0; i < (Int_t)SLICES_MFADC; i++ ) {
288 sig[iPix][i] = 0. ;
289 }
290 }
291 for ( i = 0 ; i<(Int_t)SLICES_MFADC; i++ ) {
292 sig[iPix][i] = resp[i] ;
293 }
294
295}
296
297void MFadc::AddSignal( Int_t iPix, Float_t resp[(Int_t) SLICES_MFADC]) {
298
299 //
300 // Adds signals to the fadc reponse from a given array
301 //
302 // parameter is the number of the pixel and the values to be added
303 //
304 //
305
306 Int_t i ;
307
308 //
309 // first we have to check if the pixel iPix is used or not until now
310 // if this is the first use, reset all signal for that pixels
311 //
312 if ( iPix > numpix ) {
313 cout << " WARNING: MFadc::Fill() : iPix greater than CAMERA_PIXELS"
314 << endl ;
315 exit(987) ;
316 }
317
318 if ( used[iPix] == FALSE ) {
319 used [iPix] = TRUE ;
320
321 for (i=0; i < (Int_t)SLICES_MFADC; i++ ) {
322 sig[iPix][i] = 0. ;
323 }
324 }
325 for ( i = 0 ; i<(Int_t)SLICES_MFADC; i++ ) {
326 sig[iPix][i] += resp[i] ;
327 }
328
329}
330
331void MFadc::SetPedestals( Int_t ped) {
332 // It sets pedestal for each pixel flat randomly dstributed between 0 and ped
333 // It uses the instance of TRandom GenElec.
334
335 Int_t i;
336
337 for(i=0;i<numpix;i++){
338 pedestal[i]= (Float_t)(ped* GenElec->Rndm());
339 }
340}
341
342void MFadc::SetPedestals( Float_t *ped) {
343 // It sets pedestal for each pixel from ped array
344
345 Int_t i;
346
347 for(i=0;i<numpix;i++){
348 pedestal[i]= ped[i];
349 }
350}
351
352
353void MFadc::Baseline(){
354 //
355 // It simulates the AC behaviour
356
357 int i,j;
358 Float_t baseline;
359
360 for(j=0;j<numpix;j++){
361 baseline=0.0;
362 for(i=0;i<(Int_t) SLICES_MFADC;i++){
363 baseline=+sig[j][i];
364 }
365 baseline=baseline/SLICES_MFADC;
366 for(i=0;i<(Int_t) SLICES_MFADC;i++){
367 sig[j][i]=-baseline;
368 }
369 }
370}
371
372void MFadc::Pedestals(){
373 //
374 // It shifts the FADC contents their pedestal values
375 // It shifts the values in the analog signal,
376 // therefore it has to be done before getting FADC output
377 //
378
379 Int_t i, j;
380
381 for(i=0;i<numpix;i++)
382 for(j=0;j<(Int_t)SLICES_MFADC;j++)
383 sig[i][j]+=pedestal[i];
384
385}
386
387void MFadc::Offset(Float_t offset, Int_t pixel){
388 //
389 // It puts an offset in the FADC signal
390 //
391
392 int i,j;
393 float fdum;
394 TRandom *GenOff = new TRandom () ;
395
396 if (offset<0) {
397 // It cannot be, so the program assumes that
398 // it should generate random values for the offset.
399
400 if (pixel<0) {
401 // It does not exist, so all pixels will have the same offset
402
403 for(i=0;i<numpix;i++){
404 if (used[i]){
405 fdum=(10*GenOff->Rndm());
406 for(j=0;j<(Int_t) SLICES_MFADC;j++)
407 sig[i][j]=+fdum;
408 }
409 }
410 } else {
411 // The program will put the specifies offset to the pixel "pixel".
412
413 if (used[pixel]){
414 fdum=(10*GenOff->Rndm());
415 for(j=0;j<(Int_t) SLICES_MFADC;j++)
416 sig[pixel][j]=+fdum;
417 }
418
419 }
420 }else {
421 // The "offset" will be the offset for the FADC
422
423 if (pixel<0) {
424 // It does not exist, so all pixels will have the same offset
425
426 for(i=0;i<numpix;i++){
427 if (used[i]){
428 for(j=0;j<(Int_t) SLICES_MFADC;j++)
429 sig[i][j]=+offset;
430 }
431 }
432 } else {
433 // The program will put the specifies offset to the pixel "pixel".
434
435 if (used[pixel]){
436 for(j=0;j<(Int_t) SLICES_MFADC;j++)
437 sig[pixel][j]=+offset;
438 }
439 }
440 }
441 delete GenOff;
442}
443
444void MFadc::SetElecNoise(Float_t value){
445
446 UInt_t i;
447
448 cout<<"MFadc::SetElecNoise ... generating database for electronic noise."
449 <<endl;
450
451 for (i=0;i<(UInt_t (SLICES_MFADC))*1001;i++){
452 noise[i]=GenElec->Gaus(0., value );
453 }
454
455 cout<<"MFadc::SetElecNoise ... done"<<endl;
456
457}
458
459void MFadc::ElecNoise(Float_t value) {
460 // ============================================================
461 //
462 // adds the noise due to optronic and electronic
463 // to the signal
464 //
465 UInt_t startslice;
466
467 for ( Int_t i = 0 ; i < numpix; i++) {
468 //
469 // but at the beginning we must check if this pixel is
470 // hitted the first time
471 //
472
473 startslice=GenElec->Integer(((Int_t)SLICES_MFADC)*1000);
474
475 if ( used[i] == FALSE ) {
476 used [i] = TRUE ;
477
478 memcpy( (Float_t*)&sig[i][0],
479 (Float_t*)&noise[startslice],
480 ((Int_t) SLICES_MFADC)*sizeof(Float_t));
481
482 for ( Int_t is=0 ; is< (Int_t)SLICES_MFADC ; is++ ) {
483
484 }
485 }
486 //
487 // Then the noise is introduced for each time slice
488 //
489 else
490 for ( Int_t is=0 ; is< (Int_t)SLICES_MFADC ; is++ ) {
491
492 sig[i][is] += noise[startslice+is] ;
493
494 }
495 }
496}
497
498void MFadc::SetDigitalNoise(Float_t value){
499
500 UInt_t i;
501 Float_t xrdm;
502
503 cout<<"MFadc::SetDigitalNoise ... generating database for electronic noise."
504 <<endl;
505
506 for (i=0;i<UInt_t(SLICES_MFADC*1001);i++){
507 xrdm=GenElec->Gaus(0., value);
508 digital_noise[i]=(xrdm>0?Int_t(xrdm+0.5):Int_t(xrdm-0.5));
509 }
510
511 cout<<"MFadc::SetDigitalNoise ... done"<<endl;
512
513}
514
515void MFadc::DigitalNoise() {
516 // ============================================================
517 //
518 // adds the noise due to optronic and electronic
519 // to the signal
520 //
521 UInt_t startslice;
522
523 for ( Int_t i = 0 ; i < numpix; i++) {
524
525 if ( used[i] == TRUE ) {
526 startslice=GenElec->Integer((Int_t) SLICES_MFADC*999);
527 //
528 // Then the noise is introduced for each time slice
529 //
530 for ( Int_t is=0 ; is< FADC_SLICES; is++ ) {
531
532 if(digital_noise[startslice+is]+Int_t(output[i][is])<0)
533 output[i][is] = 0;
534 else
535 output[i][is] =
536 (digital_noise[startslice+is]+Int_t(output[i][is])>255 ?
537 255 :
538 UChar_t(digital_noise[startslice+is]+Int_t(output[i][is])));
539 if(digital_noise[startslice+FADC_SLICES+is]+Int_t(output_lowgain[i][is])<0)
540 output_lowgain[i][is] = 0;
541 else
542 output_lowgain[i][is] =
543 (digital_noise[startslice+FADC_SLICES+is]
544 +Int_t(output_lowgain[i][is])>255?
545 255:
546 UChar_t(digital_noise[startslice+FADC_SLICES+is]
547 +Int_t(output_lowgain[i][is])));
548 }
549 }
550 }
551}
552
553
554void MFadc::Scan() {
555
556
557 for ( Int_t ip=0; ip<numpix; ip++ ) {
558
559 if ( used[ip] == kTRUE ) {
560
561 printf ("Pid %3d", ip ) ;
562
563 for ( Int_t is=0 ; is < (Int_t)SLICES_MFADC; is++ ) {
564
565 if ( sig[ip][is] > 0. ) {
566 printf (" %4.1f/", sig[ip][is] ) ;
567 }
568 else {
569 printf ("----/" ) ;
570 }
571 }
572
573 printf ("\n");
574
575 }
576 }
577
578}
579
580void MFadc::Scan(Float_t time) {
581
582 //
583 // first of all we subtract from the time a offset (8 ns)
584 //
585
586 Float_t t ;
587
588 (0 > time - TIME_BEFORE_TRIGGER)? t=0: t=(time-TIME_BEFORE_TRIGGER) ; // to show also the start of the pulse before the trigger time
589
590 if ( t < 0. ) {
591 cout << " WARNING!! FROM MFADC::SCAN(t) " << endl ;
592 exit (776) ;
593 }
594
595 //
596 // calculate the first slice to write out
597 //
598
599 Int_t iFirstSlice ;
600
601 iFirstSlice = (Int_t) ( t / WIDTH_FADC_TIMESLICE ) ;
602
603 for ( Int_t ip=0; ip<numpix; ip++ ) {
604
605 if ( used[ip] == kTRUE ) {
606
607 printf ("Pid %3d", ip ) ;
608
609 for ( Int_t is=iFirstSlice ; is < (iFirstSlice+15); is++ ) {
610 printf (" %5.2f /", sig[ip][is] ) ;
611 }
612
613 printf ("\n");
614
615 }
616 }
617}
618
619void MFadc::GetResponse( Float_t *resp ) {
620 // ============================================================
621 //
622 // puts the standard response function into the array resp
623
624 for ( Int_t i=0; i< RESPONSE_SLICES; i++ ) {
625
626 resp[i] = sing_resp[i] ;
627 }
628}
629
630void MFadc::GetPedestals( Float_t *offset) {
631 // ============================================================
632 //
633 // puts the pedestal values into the array offset
634
635 for ( Int_t i=0; i< numpix; i++ ) {
636
637 offset[i] = pedestal[i] ;
638 }
639}
640
641Float_t MFadc::GetPedestalNoise( Int_t pix, Int_t ishigh) {
642 // ============================================================
643 //
644 // computes the pedestal sigma for channel pix
645
646 Float_t sigma=0;
647 UChar_t value=0;
648
649 Float_t factor;
650 UInt_t startslice;
651
652 factor=(ishigh?1.0:high2low_gain);
653
654 startslice=GenElec->Integer((Int_t) SLICES_MFADC*999);
655
656 for ( Int_t is=0; is < (Int_t)SLICES_MFADC ; is++ ) {
657 if (pedestal[pix]+(sig[pix][is]-pedestal[pix])/factor>0.0){
658 value=(pedestal[pix]+(sig[pix][is]-pedestal[pix])/factor > 255.
659 ? 255
660 :UChar_t(pedestal[pix]+(sig[pix][is]-pedestal[pix])/factor+0.5));
661 if(Int_t(value)+digital_noise[startslice+is]<0.0)
662 value=0;
663 else
664 value=(Int_t(value)+digital_noise[startslice+is]>255
665 ?255
666 :UChar_t(Int_t(value)+digital_noise[startslice+is]));
667 }
668 else {
669 value= 0;
670 if(Int_t(value)+digital_noise[startslice+is]<0.0)
671 value=0;
672 else
673 value=(Int_t(value)+digital_noise[startslice+is]>255
674 ?255
675 :UChar_t(Int_t(value)+digital_noise[startslice+is]));
676 }
677 sigma+=((Float_t)value-pedestal[pix])*((Float_t)value-pedestal[pix]);
678 }
679
680 sigma=sqrt(sigma/(SLICES_MFADC-1));
681
682 return sigma;
683}
684
685void MFadc::TriggeredFadc(Float_t time) {
686
687 //
688 // first of all we subtract from the time a offset (8 ns)
689 //
690
691 Float_t t ;
692
693 (0>time-TIME_BEFORE_TRIGGER)? t=0: t=(time-TIME_BEFORE_TRIGGER) ; // to show also the start of the pulse before the trigger time
694
695 if ( t < 0. ) {
696 cout << " WARNING!! FROM MFADC::SCAN(t) " << endl ;
697 exit (776) ;
698 }
699
700 //
701 // calculate the first slice to write out
702 //
703
704 Int_t iFirstSlice ;
705 Int_t i;
706
707 iFirstSlice = (Int_t) ( t / WIDTH_FADC_TIMESLICE ) ;
708
709 for ( Int_t ip=0; ip<numpix; ip++ ) {
710
711 if ( used[ip] == kTRUE ) {
712 i=0;
713 for ( Int_t is=iFirstSlice ; is < (iFirstSlice+FADC_SLICES) ; is++ ) {
714 if (is< (Int_t)SLICES_MFADC && sig[ip][is]>0.0)
715 {
716
717 output[ip][i]=(sig[ip][is] > 255. ? 255 :(UChar_t) (sig[ip][is]+0.5));
718 output_lowgain[ip][i]=
719 (Int_t)(pedestal[ip]+(sig[ip][is]-pedestal[ip])/high2low_gain+0.5) > 255. ? 255 :
720 (UChar_t)(pedestal[ip]+(sig[ip][is]-pedestal[ip])/high2low_gain+0.5);
721 i++;
722
723 }
724 else if(sig[ip][is]>=0.0)
725 {
726 output[ip][i]= (UChar_t)(pedestal[ip]+0.5);
727 output_lowgain[ip][i]= (UChar_t)(pedestal[ip]+0.5);
728 i++;
729 }
730 else
731 {
732 output[ip][i]= 0;
733 if((pedestal[ip]+(sig[ip][is]-pedestal[ip])/high2low_gain)<0)
734 output_lowgain[ip][i]= 0;
735 else
736 output_lowgain[ip][i]=(UChar_t)(pedestal[ip]+(sig[ip][is]-pedestal[ip])/high2low_gain+0.5);
737 i++;
738 }
739 }
740
741 }
742 }
743}
744
745void MFadc::ShowSignal (MMcEvt *McEvt, Float_t trigTime) {
746 // ============================================================
747 //
748 // This method is used to book the histogram to show the signal in
749 // a special gui frame (class MGTriggerSignal). After the look onto the
750 // signals for a better understanding of the things we will expect
751 // the gui frame and all histogramms will be destroyed.
752 //
753
754 //
755 // first of all create a list of the histograms to show
756 //
757 // take only that one with a entry
758
759 TH1F *hist ;
760 Char_t dumm[10];
761 Char_t name[256];
762
763 TObjArray *AList ;
764 AList = new TObjArray(10) ;
765
766 // the list of analog signal histograms
767 // at the beginning we initalise 10 elements
768 // but this array expand automaticly if neccessay
769
770 Int_t ic = 0 ;
771 for ( Int_t i=0 ; i < numpix; i++ ) {
772 if ( used [i] == TRUE ) {
773
774 sprintf (dumm, "FADC_%d", i ) ;
775 sprintf (name, "fadc signal %d", i ) ;
776
777 hist = new TH1F(dumm, name, SLICES_MFADC, 0., TOTAL_TRIGGER_TIME);
778 //
779 // fill the histogram
780 //
781
782 for (Int_t ibin=1; ibin <=(Int_t)SLICES_MFADC; ibin++) {
783 hist->SetBinContent (ibin, sig[i][ibin-1]) ;
784 }
785
786 // hist->SetMaximum( 5.);
787 // hist->SetMinimum(-10.);
788 hist->SetStats(kFALSE);
789
790 // hist->SetAxisRange(0., 80. ) ;
791
792 AList->Add(hist) ;
793
794 ic++ ;
795 }
796 }
797
798 //
799 // create the Gui Tool
800 //
801 //
802
803 new MGFadcSignal(McEvt,
804 AList,
805 trigTime,
806 gClient->GetRoot(),
807 gClient->GetRoot(),
808 400, 400 ) ;
809
810 //
811 // delete the List of histogramms
812 //
813 AList->Delete() ;
814
815 delete AList ;
816}
817
818UChar_t MFadc::GetFadcSignal(Int_t pixel, Int_t slice){
819
820 // It returns the analog signal for a given pixel and a given FADC
821 // time slice which would be read.
822
823 return (output[pixel][slice]);
824}
825
826
827UChar_t MFadc::GetFadcLowGainSignal(Int_t pixel, Int_t slice){
828
829 // It returns the analog signal for a given pixel and a given FADC
830 // time slice which would be read.
831
832 return (output_lowgain[pixel][slice]);
833}
834
835
836
Note: See TracBrowser for help on using the repository browser.