mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 17:47:59 +02:00
general funcs for pedestal subtraction, common mode, photon finding developed and implemented specifically for moench
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@12 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
34
slsDetectorCalibration/moenchCommonMode.h
Normal file
34
slsDetectorCalibration/moenchCommonMode.h
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef MOENCHCOMMONMODE_H
|
||||
#define MOENCHCOMMONMODE_H
|
||||
|
||||
#include "commonModeSubtraction.h"
|
||||
|
||||
class moenchCommonMode : public commonModeSubtraction {
|
||||
|
||||
public:
|
||||
moenchCommonMode(int nn=1000) : commonModeSubtraction(nn,4){} ;
|
||||
|
||||
|
||||
virtual void addToCommonMode(double val, int ix=0, int iy=0) {
|
||||
(void)iy;
|
||||
int isc=ix/40;
|
||||
if (isc>=0 && isc<4) {
|
||||
cmPed[isc]+=val;
|
||||
nCm[isc]++;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
virtual double getCommonMode(int ix=0, int iy=0) {
|
||||
(void)iy;
|
||||
int isc=ix/40;
|
||||
if (isc>=0 && isc<4) {
|
||||
if (nCm[isc]>0) return cmPed[isc]/nCm[isc]-cmStat[isc].Mean();
|
||||
}
|
||||
return 0;};
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user