{
//make walk corerction for preprocessor
Int_t npeaks = 20;
- Int_t sigma=3.;
+ Int_t sigma=3;
Bool_t down=false;
Int_t index[20];
Bool_t ok=true;
}
}
- if (nmips<15) ok=false;
+ if (nmips<17) {
+ ok=false;
+ return ok;
+ }
Float_t x1[50], y1[50];
Float_t x2[50], xx2[50],y2[50];
hCFD->GetXaxis()->SetRangeUser(hmin-10,hmax+10);
}
else
- ok=false;
+ {
+ ok=false;
+ printf("no peak in CFD spectrum for PMT %i amplitude %i\n",i,im);
+ return ok;
+ }
+
}
if (im == 0) cfd0[i] = hCFD->GetMean();
y1[im] = hCFD->GetMean() - cfd0[i];
}
- if( hQTC) x1[im] = hQTC->GetMean();
+ if( hQTC) {
+ x1[im] = hQTC->GetMean();
+ if( x1[im] == 0) {
+ ok=false;
+ printf("no peak in QTC signal for PMT %i amplitude %i\n",i,im);
+ return ok;
+ }
+ }
if( hLED){
TSpectrum *s = new TSpectrum(2*npeaks,1);
Double_t hmin = xp-10*sigma;
hLED->GetXaxis()->SetRangeUser(hmin-10,hmax+10);
}
- else
- ok=false;
+ else
+ {
+ ok=false;
+ printf("no peak in LED spectrum for PMT %i amplitude %i\n",i,im);
+ return ok;
+ }
x2[im] = hLED->GetMean();
xx2[im] = x2[nmips-im-1];
}
cout<<"Graphs created..."<<endl;
}
} //if gFile exits
- ok=true;
+
return ok;
}