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

View File

@ -101,6 +101,9 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
row=200+i/sc_width; row=200+i/sc_width;
} }
dataMap[row][col]=sizeof(sls_detector_header)+(nadc*i+iadc)*2;//+16*(ip+1); dataMap[row][col]=sizeof(sls_detector_header)+(nadc*i+iadc)*2;//+16*(ip+1);
#ifdef HIGHZ
dataMask[row][col]=0x3fff; //invert data
#endif
if (dataMap[row][col]<0 || dataMap[row][col]>=nSamples*2*32) if (dataMap[row][col]<0 || dataMap[row][col]>=nSamples*2*32)
cout << "Error: pointer " << dataMap[row][col] << " out of range "<< endl; cout << "Error: pointer " << dataMap[row][col] << " out of range "<< endl;
} }

View File

@ -13,6 +13,13 @@ all: moenchClusterFinder moenchMakeEta moenchInterpolation moenchNoInterpolation
moenchClusterFinder: moench03ClusterFinder.cpp $(INCS) clean moenchClusterFinder: moench03ClusterFinder.cpp $(INCS) clean
g++ -o moenchClusterFinder moench03ClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DNEWRECEIVER g++ -o moenchClusterFinder moench03ClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DNEWRECEIVER
moenchClusterFinderHighZ: moench03ClusterFinder.cpp $(INCS) clean
g++ -o moenchClusterFinderHighZ moench03ClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DNEWRECEIVER -DHIGHZ
moenchMakeEta: moench03Interpolation.cpp $(INCS) clean moenchMakeEta: moench03Interpolation.cpp $(INCS) clean
g++ -o moenchMakeEta moench03Interpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DFF g++ -o moenchMakeEta moench03Interpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DFF
@ -28,6 +35,12 @@ moenchPhotonCounter: moenchPhotonCounter.cpp $(INCS) clean
moenchAnalog: moenchPhotonCounter.cpp $(INCS) clean moenchAnalog: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchAnalog moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG g++ -o moenchAnalog moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG
moenchPhotonCounterHighZ: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchPhotonCounterHighZ moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DHIGHZ
moenchAnalogHighZ: moenchPhotonCounter.cpp $(INCS) clean
g++ -o moenchAnalogHighZ moenchPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG -DHIGHZ
clean: clean:
rm -f moenchClusterFinder moenchMakeEta moenchInterpolation moenchNoInterpolation moenchPhotonCounter moenchAnalog rm -f moenchClusterFinder moenchMakeEta moenchInterpolation moenchNoInterpolation moenchPhotonCounter moenchAnalog