- fT0 = 0;
- fHits = 0;
- fdigits = 0;
-
- ftimeCFD = new TArrayI(24);
- fADC = new TArrayI(24);
- ftimeLED = new TArrayI(24);
- fADC0 = new TArrayI(24);
-
+ for (Int_t i=0; i<24; i++){
+ TGraph* gr = fParam ->GetAmpLED(i);
+ if(gr) {
+ Int_t np = gr->GetN();
+ Double_t *x = gr->GetX();
+ Double_t *y = gr->GetY();
+
+ Double_t *x1 = new Double_t[np];
+ Double_t *y1 = new Double_t[np];
+ for (Int_t ii=0; ii<np; ii++) {
+ y1[ii]=y[np-ii-1];
+ x1[ii]=x[np-ii-1];
+ }
+ TGraph *grInverse = new TGraph(np,y1,x1);
+ fAmpLED.AddAtAndExpand(grInverse,i);
+ if (x1) delete [] x1;
+ if (y1) delete [] y1;
+ }
+ }
+ for (Int_t i=0; i<24; i++){
+ TGraph* grq = fParam ->GetQTC(i);
+ if(grq){
+ Int_t npq = grq->GetN();
+ Double_t *xq = grq->GetX();
+ Double_t *yq = grq->GetY();
+ Double_t *x1q = new Double_t[npq];
+ Double_t *y1q = new Double_t[npq];
+ for (Int_t ii=1; ii<npq; ii++) {
+ y1q[ii]=yq[ii-1];
+ x1q[ii]=xq[ii-1];
+ }
+ TGraph *grInverseQTC = new TGraph(npq,y1q,x1q);
+ fAmpQTC.AddAtAndExpand(grInverseQTC,i);
+ if (x1q) delete [] x1q;
+ if (y1q) delete [] y1q;