Added define for high z cluster finder and fixed gainmap (t.b.t.)

This commit is contained in:
2019-09-10 16:34:29 +02:00
parent 1cf5033c99
commit 400e69cef2
3 changed files with 30 additions and 8 deletions

View File

@ -390,15 +390,21 @@ template <class dataType> class analogDetector {
\returns pedestal rms
*/
virtual double getPedestalRMS(int ix, int iy){
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
return stat[iy][ix].getPedestalRMS();
else return -1;
double g=1;
if (ix>=0 && ix<nx && iy>=0 && iy<ny) {
if (gmap) {
g=gmap[iy*nx+ix];
if (g==0) g=-1.;
}
return stat[iy][ix].getPedestalRMS()/g;//divide by gain?
}
return -1;
};
virtual int getNumpedestals(int ix, int iy){
if (ix>=0 && ix<nx && iy>=0 && iy<ny)
return stat[iy][ix].getNumpedestals();
else return -1;
return -1;
};
/**
gets pedestal (and common mode)
@ -410,10 +416,10 @@ template <class dataType> class analogDetector {
virtual double* getPedestal(double *ped){
if (ped==NULL)
ped=new double[nx*ny];
for (int iy=0; iy<ny; iy++) {
for (int ix=0; ix<nx; ix++) {
for (int iy=0; iy<ny; iy++) {
for (int ix=0; ix<nx; ix++) {
ped[iy*nx+ix]=stat[iy][ix].getPedestal();
//cout << ped[iy*nx+ix] << " " ;
//cout << ped[iy*nx+ix] << " " ;
}
}
return ped;