]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliEMCALDigit.cxx
Adding ability to use multiple test functions
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALDigit.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //_________________________________________________________________________
19 //  EMCAL digit: 
20 //      A Digit is the sum of the energy lost in an EMCAL Tower
21 //      It also stores information on Primary, and enterring particle
22 //      tracknumbers Digits are created using AliEMCALSDigitizer, followed
23 //      by AliEMCALDigitizer 
24 //
25 //*-- Author: Sahal Yacoob (LBL)
26 // based on : AliPHOSDigit
27 //__________________________________________________________________________
28
29 // --- ROOT system ---
30 #include <Riostream.h>
31 #include <TMath.h>
32
33 // --- Standard library ---
34
35 // --- AliRoot header files ---
36
37 #include "AliEMCALDigit.h"
38 #include "AliEMCALGeometry.h"
39 #include "AliLog.h" 
40
41 ClassImp(AliEMCALDigit)
42
43 //____________________________________________________________________________
44 AliEMCALDigit::AliEMCALDigit() :  
45 AliDigitNew(), 
46   fAmpFloat(0.),
47   fNSamples(0),
48   fSamples(0x0),
49   fNSamplesHG(0),
50   fSamplesHG(0x0),
51   fNprimary(0),
52   fNMaxPrimary(5),
53   fPrimary(0x0),
54   fDEPrimary(0x0),
55   fNiparent(0),
56   fNMaxiparent(5), 
57   fIparent(0x0),
58   fDEParent(0x0),
59   fMaxIter(0),
60   fTime(0.), 
61   fTimeR(0.),
62   fChi2(0.),
63   fNDF(0),
64   fDigitType(kUnknown),
65   fAmpCalib(-1)
66 {
67   // default ctor 
68
69   // Need to initialise for reading old files
70   fPrimary   = new Int_t[fNMaxPrimary] ;
71   fDEPrimary = new Float_t[fNMaxPrimary] ;
72   fIparent   = new Int_t[fNMaxiparent] ; 
73   fDEParent  = new Float_t[fNMaxiparent] ; 
74   for ( Int_t i = 0; i < fNMaxPrimary ; i++) {
75     fPrimary[i]    = -1 ;
76     fDEPrimary[i]  = 0 ;
77   } 
78
79   for ( Int_t i = 0; i < fNMaxiparent ; i++) {
80     fIparent[i]  = -1 ;
81     fDEParent[i] = 0 ;
82   }
83 }
84
85 //____________________________________________________________________________
86 AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t digEnergy, Float_t time, Int_t type, Int_t index, Float_t chi2, Int_t ndf, Float_t dE) 
87   : AliDigitNew(),
88     fAmpFloat(digEnergy),
89     fNSamples(0),
90     fSamples(0x0),
91     fNSamplesHG(0),
92     fSamplesHG(0x0),
93     fNprimary(0),
94     fNMaxPrimary(25),
95     fPrimary(0x0),
96     fDEPrimary(0x0),
97     fNiparent(0),
98     fNMaxiparent(150),
99     fIparent(0x0),
100     fDEParent(0x0),
101     fMaxIter(5),
102     fTime(time),
103     fTimeR(time),
104     fChi2(chi2),
105     fNDF(ndf),
106     fDigitType(type),
107     fAmpCalib(-1)
108 {  
109   // ctor with all data 
110
111   // data memebrs of the base class (AliNewDigit)
112   fAmp         = 0;
113   fId          = id ;
114   fIndexInList = index ; 
115
116   // data member  
117   fPrimary   = new Int_t[fNMaxPrimary] ;
118   fDEPrimary = new Float_t[fNMaxPrimary] ;
119   fIparent   = new Int_t[fNMaxiparent] ; 
120   fDEParent  = new Float_t[fNMaxiparent] ; 
121   if( primary != -1){
122     fNprimary    = 1 ; 
123     fPrimary[0]  = primary ;  
124     fDEPrimary[0] = dE ;  
125     fNiparent   = 1 ;
126     fIparent[0] = iparent ;    
127     fDEParent[0] = dE ;  
128   }
129   else{  //If the contribution of this primary smaller than fDigitThreshold (AliEMCALv1)
130     fNprimary    = 0 ; 
131     fPrimary[0]  = -1 ;
132     fDEPrimary[0]  = 0 ;
133     fNiparent   = 0 ;
134     fIparent[0] = -1 ;  
135     fDEParent[0]  = 0 ;  
136   }
137   Int_t i ;
138   for ( i = 1; i < fNMaxPrimary ; i++) {
139     fPrimary[i]  = -1 ; 
140     fDEPrimary[i]  = 0 ;
141   } 
142
143   for ( i = 1; i< fNMaxiparent ; i++) {
144     fIparent[i] = -1 ;  
145     fDEParent[i] = 0 ;
146   }  
147 }
148
149 //____________________________________________________________________________
150 AliEMCALDigit::AliEMCALDigit(const AliEMCALDigit & digit) 
151   : AliDigitNew(digit),
152     fAmpFloat(digit.fAmpFloat), 
153     fNSamples(digit.fNSamples),
154     fSamples(),
155     fNSamplesHG(digit.fNSamplesHG),
156     fSamplesHG(),
157     fNprimary(digit.fNprimary),
158     fNMaxPrimary(digit.fNMaxPrimary),
159     fPrimary(),
160     fDEPrimary(),
161     fNiparent(digit.fNiparent),
162     fNMaxiparent(digit.fNMaxiparent),
163     fIparent(),
164     fDEParent(),
165     fMaxIter(digit.fMaxIter),
166     fTime(digit.fTime),
167     fTimeR(digit.fTimeR), 
168     fChi2(digit.fChi2), 
169     fNDF(digit.fNDF),
170     fDigitType(digit.fDigitType),
171     fAmpCalib(digit.fAmpCalib)
172 {
173   // copy ctor
174   // data memebrs of the base class (AliNewDigit)
175   fAmp         = digit.fAmp ;
176   fId          = digit.fId;
177   fIndexInList = digit.fIndexInList ; 
178
179   // data members  
180   if (fSamples )   delete [] fSamples ;   fSamples   = NULL ;
181   if (fSamplesHG ) delete [] fSamplesHG ; fSamplesHG = NULL ;
182   if (fPrimary  )  delete [] fPrimary ;   fPrimary   = NULL ;
183   if (fDEPrimary)  delete [] fDEPrimary ; fDEPrimary = NULL ;
184   if (fIparent )   delete [] fIparent ;   fIparent   = NULL ;
185   if (fDEParent)   delete [] fDEParent ;  fDEParent  = NULL ;
186
187   if (fNSamples){
188     fSamples     = new Int_t[fNSamples]; 
189     for (Int_t i=0; i < digit.fNSamples; i++) fSamples[i] = digit.fSamples[i];
190   }
191   
192   if (fNSamplesHG){
193     fSamplesHG   = new Int_t[fNSamplesHG]; 
194     for (Int_t i=0; i < digit.fNSamplesHG; i++) fSamplesHG[i] = digit.fSamplesHG[i];
195   }
196   
197  
198   if (fNMaxPrimary){
199     fPrimary   = new Int_t  [fNMaxPrimary] ;  
200     fDEPrimary = new Float_t[fNMaxPrimary] ;
201     for ( Int_t i = 0; i < fNMaxPrimary ; i++) {
202       fPrimary[i]   = digit.fPrimary[i] ;
203       fDEPrimary[i] = digit.fDEPrimary[i] ;
204     }
205   }
206   
207   if (fNMaxiparent){
208     fIparent  = new Int_t  [fNMaxiparent] ;
209     fDEParent = new Float_t[fNMaxiparent] ;
210     for (Int_t j = 0; j< fNMaxiparent ; j++) {
211     fIparent[j]  = digit.fIparent[j] ;
212     fDEParent[j] = digit.fDEParent[j] ;
213     }
214   }  
215  
216 }
217
218 //____________________________________________________________________________
219 AliEMCALDigit::~AliEMCALDigit() 
220 {
221   // Delete array of primaries if any
222
223   if (fSamples )   delete [] fSamples ;   fSamples   = NULL ;
224   if (fSamplesHG ) delete [] fSamplesHG ; fSamplesHG = NULL ;
225   if (fPrimary  )  delete [] fPrimary ;   fPrimary   = NULL ;
226   if (fDEPrimary)  delete [] fDEPrimary ; fDEPrimary = NULL ;
227   if (fIparent )   delete [] fIparent ;   fIparent   = NULL ;
228   if (fDEParent)   delete [] fDEParent ;  fDEParent  = NULL ;
229
230 }
231
232
233 //____________________________________________________________________________
234 void AliEMCALDigit::Clear(const Option_t*) 
235 {
236   // Delete array of primaries if any
237   if (fSamples )   delete [] fSamples ;   fSamples   = NULL ;
238   if (fSamplesHG ) delete [] fSamplesHG ; fSamplesHG = NULL ;
239   if (fPrimary  )  delete [] fPrimary ;   fPrimary   = NULL ;
240   if (fDEPrimary)  delete [] fDEPrimary ; fDEPrimary = NULL ;
241   if (fIparent )   delete [] fIparent ;   fIparent   = NULL ;
242   if (fDEParent)   delete [] fDEParent ;  fDEParent  = NULL ;
243
244 }
245
246 //____________________________________________________________________________
247 Int_t AliEMCALDigit::Compare(const TObject * obj) const
248 {
249   // Compares two digits with respect to its Id
250   // to sort according increasing Id
251
252   Int_t rv = 2 ;
253
254   AliEMCALDigit * digit = (AliEMCALDigit *)obj ; 
255
256   Int_t iddiff = fId - digit->GetId() ; 
257
258   if ( iddiff > 0 ) 
259     rv = 1 ;
260   else if ( iddiff < 0 )
261     rv = -1 ; 
262   else
263     rv = 0 ;
264   
265   return rv ; 
266
267 }
268
269 //____________________________________________________________________________
270 Float_t AliEMCALDigit::GetEta() const
271
272   //return pseudorapidity for this digit
273   // should be change in EMCALGeometry - 19-nov-04
274   Float_t eta=-10., phi=-10.;
275   Int_t id = GetId();
276   const AliEMCALGeometry *g = AliEMCALGeometry::GetInstance();
277   g->EtaPhiFromIndex(id,eta,phi);
278   return eta ;
279 }
280
281 //____________________________________________________________________________
282 Float_t AliEMCALDigit::GetPhi() const
283
284   //return phi coordinate of digit
285   // should be change in EMCALGeometry - 19-nov-04
286   Float_t eta=-10., phi=-10.;
287   Int_t id = GetId();
288   const AliEMCALGeometry *g = AliEMCALGeometry::GetInstance();
289   g->EtaPhiFromIndex(id,eta,phi);
290   return phi ;
291 }
292
293 //____________________________________________________________________________
294 Bool_t AliEMCALDigit::GetFALTROSample(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
295 {
296         //Get FALTRO sample in time bin iSample
297         if (iSample >= fNSamples || iSample < 0 || fDigitType==kTrigger) return kFALSE;
298         
299         amp     =  fSamples[iSample] & 0xFFF;
300         timeBin = (fSamples[iSample] >> 12) & 0xFF;
301         
302         return kTRUE;
303 }
304 //____________________________________________________________________________
305 Bool_t AliEMCALDigit::GetALTROSampleLG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
306 {
307         //Get Low Gain ALTRO sample in time bin iSample
308         if (iSample >= fNSamples || iSample < 0 || fDigitType==kLG) return kFALSE;
309         
310         amp     =  fSamples[iSample] & 0xFFF;
311         timeBin = (fSamples[iSample] >> 12) & 0xFF;
312         
313         return kTRUE;
314 }
315
316 //____________________________________________________________________________
317 void AliEMCALDigit::SetALTROSamplesLG(const Int_t nSamples, Int_t *samples)
318 {
319     //Set array of ALTRO samples, Low Gain or FALTRO 
320         fNSamples = nSamples;
321         fSamples  = new Int_t[fNSamples]; 
322         for (Int_t i=0; i < fNSamples; i++) fSamples[i] = samples[i];
323 }
324
325 //____________________________________________________________________________
326 void AliEMCALDigit::SetALTROSamplesHG(const Int_t nSamples, Int_t *samples)
327 {
328         //Set array of ALTRO samples, High Gain.
329         fNSamplesHG = nSamples;
330         fSamplesHG  = new Int_t[fNSamplesHG]; 
331         for (Int_t i=0; i < fNSamplesHG; i++) fSamplesHG[i] = samples[i];
332 }
333
334
335 //____________________________________________________________________________
336 Bool_t AliEMCALDigit::GetALTROSampleHG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
337 {
338         //Get High Gain ALTRO sample in time bin iSample
339         if (iSample >= fNSamplesHG || iSample < 0 || fDigitType==kHG) return kFALSE;
340         
341         amp     =  fSamplesHG[iSample] & 0xFFF;
342         timeBin = (fSamplesHG[iSample] >> 12) & 0xFF;
343         
344         return kTRUE;
345 }
346
347
348 //____________________________________________________________________________
349 Int_t AliEMCALDigit::GetPrimary(Int_t index) const
350 {
351   // retrieves the primary particle number given its index in the list 
352   if ( (index <= fNprimary) && (index > 0)){
353     return fPrimary[index-1] ;
354   } 
355
356   return -1 ; 
357 }
358
359 //____________________________________________________________________________
360 Float_t AliEMCALDigit::GetDEPrimary(Int_t index) const
361 {
362   // retrieves the primary particle energy contribution 
363   // given its index in the list 
364   if ( (index <= fNprimary) && (index > 0)){
365     return fDEPrimary[index-1] ;
366   } 
367
368   return 0 ; 
369   
370 }
371
372 //____________________________________________________________________________
373 Int_t AliEMCALDigit::GetIparent(Int_t index) const
374 {
375   // retrieves the primary particle number given its index in the list 
376   if ( index <= fNiparent && index > 0){
377     return fIparent[index-1] ;
378   } 
379
380   return -1 ; 
381   
382 }
383
384 //____________________________________________________________________________
385 Float_t AliEMCALDigit::GetDEParent(Int_t index) const
386 {
387   // retrieves the parent particle energy contribution 
388   // given its index in the list 
389   if ( (index <= fNiparent) && (index > 0)){
390     return fDEParent[index-1] ;
391   } 
392
393   return 0; 
394 }
395
396 //____________________________________________________________________________
397 void AliEMCALDigit::ShiftPrimary(Int_t shift){
398   //shifts primary number to BIG offset, to separate primary in different TreeK
399   Int_t index  ;
400   for(index = 0; index <fNprimary; index++ ){
401     fPrimary[index] = fPrimary[index]+ shift * 10000000   ;}
402   for(index =0; index <fNiparent; index++){
403     fIparent[index] = fIparent[index] + shift * 10000000 ;}
404 }
405
406
407 //____________________________________________________________________________
408 AliEMCALDigit& AliEMCALDigit::operator= (const AliEMCALDigit &digit)
409 {
410   // assignment operator
411   
412   if(&digit == this) return *this;
413   
414   fAmpFloat    = digit.fAmpFloat;       
415   fNSamples    = digit.fNSamples;
416   fNSamplesHG  = digit.fNSamplesHG;
417   fNprimary    = digit.fNprimary;
418   fNMaxPrimary = digit.fNMaxPrimary;
419   fNiparent    = digit.fNiparent;
420   fNMaxiparent = digit.fNMaxiparent;
421   fMaxIter     = digit.fMaxIter;
422   fTime        = digit.fTime;
423   fTimeR       = digit.fTimeR; 
424   fChi2        = digit.fChi2; 
425   fNDF         = digit.fNDF;
426   fDigitType   = digit.fDigitType;
427   fAmpCalib    = digit.fAmpCalib;
428   fAmp         = digit.fAmp ;
429   fId          = digit.fId;
430   fIndexInList = digit.fIndexInList ; 
431   
432   // data members  
433   if (fSamples )   delete [] fSamples ;   fSamples   = NULL ;
434   if (fSamplesHG ) delete [] fSamplesHG ; fSamplesHG = NULL ;
435   if (fPrimary  )  delete [] fPrimary ;   fPrimary   = NULL ;
436   if (fDEPrimary)  delete [] fDEPrimary ; fDEPrimary = NULL ;
437   if (fIparent )   delete [] fIparent ;   fIparent   = NULL ;
438   if (fDEParent)   delete [] fDEParent ;  fDEParent  = NULL ;
439   
440   if (fNSamples){
441     fSamples     = new Int_t[fNSamples]; 
442     for (Int_t i=0; i < digit.fNSamples; i++) fSamples[i] = digit.fSamples[i];
443   }
444   
445   if (fNSamplesHG){
446     fSamplesHG   = new Int_t[fNSamplesHG]; 
447     for (Int_t i=0; i < digit.fNSamplesHG; i++) fSamplesHG[i] = digit.fSamplesHG[i];
448   }
449   
450   
451   if (fNMaxPrimary){
452     fPrimary   = new Int_t  [fNMaxPrimary] ;  
453     fDEPrimary = new Float_t[fNMaxPrimary] ;
454     for ( Int_t i = 0; i < fNMaxPrimary ; i++) {
455       fPrimary[i]   = digit.fPrimary[i] ;
456       fDEPrimary[i] = digit.fDEPrimary[i] ;
457     }
458   }
459   
460   if (fNMaxiparent){
461     fIparent  = new Int_t  [fNMaxiparent] ;
462     fDEParent = new Float_t[fNMaxiparent] ;
463     for (Int_t j = 0; j< fNMaxiparent ; j++) {
464       fIparent[j]  = digit.fIparent[j] ;
465       fDEParent[j] = digit.fDEParent[j] ;
466     }
467   }  
468   
469   return *this;
470   
471 }  
472
473 //____________________________________________________________________________
474 Bool_t AliEMCALDigit::operator==(AliEMCALDigit const & digit) const 
475 {
476   // Two digits are equal if they have the same Id
477   
478   if ( fId == digit.fId ) 
479     return kTRUE ;
480   else 
481     return kFALSE ;
482 }
483  
484 //____________________________________________________________________________
485 AliEMCALDigit AliEMCALDigit::operator+(const AliEMCALDigit &digit) 
486 {
487   // Adds the amplitude of digits and completes the list of primary particles
488   // if amplitude is larger than 
489   
490   fAmpFloat += digit.fAmpFloat ;
491   for (Int_t i=0; i < fNSamples  ; i++) fSamples[i]   += digit.fSamples[i];
492   for (Int_t i=0; i < fNSamplesHG; i++) fSamplesHG[i] += digit.fSamplesHG[i];
493   
494   fAmp    += digit.fAmp ;
495   if(fTime > digit.fTime)
496     fTime = digit.fTime ;
497   if (digit.fTimeR < fTimeR)
498     fTimeR = digit.fTimeR ; 
499   
500   Int_t max1 = fNprimary ; 
501   Int_t max2 = fNiparent ;  
502   Int_t index ; 
503   for (index = 0 ; index < digit.fNprimary  ; index++){
504     Bool_t newPrim = kTRUE ;
505     Int_t old ;
506     for ( old = 0 ; (old < max1) && newPrim; old++) { //already have this primary?
507       if(fPrimary[old] == digit.fPrimary[index]) {
508         newPrim = kFALSE;
509         fDEPrimary[old] += digit.fDEPrimary[index];
510       }
511     }
512     if (newPrim) {
513       if(max1<fNMaxPrimary){ 
514         fPrimary[max1] = digit.fPrimary[index] ; 
515         fDEPrimary[max1] = digit.fDEPrimary[index] ; 
516         fNprimary++ ;
517         max1++;
518       }
519       if(fNprimary==fNMaxPrimary) {
520         
521         TString mess = " NMaxPrimary  =  " ; 
522         mess += fNMaxPrimary ; 
523         mess += " is too small" ; 
524         AliFatal(mess.Data()) ; 
525         
526       }
527     }
528   }
529   
530   for (index = 0 ; index < digit.fNiparent ; index++){
531     Bool_t newParent = kTRUE ;
532     Int_t old ;
533     for ( old = 0 ; (old < max2) && newParent; old++) { //already have this primary?
534       if(fIparent[old] == digit.fIparent[index]) {
535         newParent = kFALSE;
536         fDEParent[old] += digit.fDEParent[index];
537       }
538     }
539     if(newParent){
540       if(max2<fNMaxiparent) { 
541         fIparent[max2] = digit.fIparent[index] ; 
542         fDEParent[max2] = digit.fDEParent[index] ; 
543         fNiparent++ ;
544         max2++;
545       }
546       if(fNiparent==fNMaxiparent) {
547         
548         TString mess = " NMaxiparent  =  " ; 
549         mess += fNMaxiparent ; 
550         mess += " is too small" ; 
551         AliFatal(mess.Data()) ; 
552         
553       }
554     }
555   }
556   
557   return *this ;
558 }
559
560 //____________________________________________________________________________
561 AliEMCALDigit AliEMCALDigit::operator*(Float_t factor) 
562 {
563   // Multiplies the amplitude by a factor
564   
565   //Float_t tempo = static_cast<Float_t>(fAmp) ; 
566   //tempo *= factor ; 
567   //fAmp = static_cast<Int_t>(TMath::Floor(tempo)) ; 
568         
569   fAmpFloat *= factor;
570   for (Int_t i=0; i < fNSamples  ; i++) fSamples[i]   = Int_t(factor*fSamples[i]);
571   for (Int_t i=0; i < fNSamplesHG; i++) fSamplesHG[i] = Int_t(factor*fSamplesHG[i]);
572
573   for(Int_t i=0; i < fNprimary; i++) 
574     fDEPrimary[i] *= factor;
575   for(Int_t i=0; i < fNiparent; i++) 
576     fDEParent[i] *= factor;
577
578   return *this ;
579 }
580
581 //____________________________________________________________________________
582 ostream& operator << ( ostream& out , const AliEMCALDigit & digit)
583 {
584   // Prints the data of the digit
585   
586   out << "ID " << digit.fId << " Energy = " << digit.fAmp <<  " Time = " << digit.fTime << endl ; 
587   for(Int_t i=0;i<digit.fNprimary;i++) 
588     out << "Primary " << i+1 << " = " << digit.fPrimary[i] 
589         << " : DE " << digit.fDEPrimary[i] << endl ;
590    
591   for(Int_t j=0;j<digit.fNiparent;j++)
592     out << "Iparent " << j+1 << " = " << digit.fIparent[j] 
593         << " : DE " << digit.fDEParent[j] << endl ;
594   out << "Position in list = " << digit.fIndexInList << endl ; 
595   return out ;
596 }
597
598 //____________________________________________________________________________
599 void AliEMCALDigit::Print(const Option_t* /*opt*/) const
600 {
601     //Print
602         printf("===\nDigit id: %4d / Energy %2.3f ; Time %e ; Time samples %d ; Chi2 %2.3f, NDF %d, Type? %d \n",
603                    fId, fAmpFloat,fTime, fNSamples, fChi2, fNDF, fDigitType);
604         if(fDigitType==kTrigger){
605                 printf("FALTRO: ");
606                 for (Int_t i=0; i < GetNFALTROSamples(); i++) 
607                 {
608                         Int_t timeBin, amp;
609                         GetFALTROSample(i, timeBin, amp);
610                         printf(" (%d,%d) ",timeBin,amp);
611                 }
612                 printf("\n");
613         }//trigger
614         else{
615                 printf("ALTRO, Low Gain: ");
616                 for (Int_t i=0; i < GetNALTROSamplesLG(); i++) 
617                 {
618                         Int_t timeBin, amp;
619                         GetALTROSampleLG(i, timeBin, amp);
620                         printf(" (%d,%d) ",timeBin,amp);
621                 }
622                 printf("\n");
623                 printf("ALTRO, High Gain: ");
624                 for (Int_t i=0; i < GetNALTROSamplesHG(); i++) 
625                 {
626                         Int_t timeBin, amp;
627                         GetALTROSampleHG(i, timeBin, amp);
628                         printf(" (%d,%d) ",timeBin,amp);
629                 }
630                 printf("\n");
631         }//trigger
632         
633 }
634
635
636