mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-28 17:10:03 +02:00
included without root writing
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorCalibration@45 113b152e-814d-439b-b186-022a431db7b5
This commit is contained in:
parent
eee5f7f743
commit
98c0bd163e
@ -4,10 +4,7 @@
|
||||
|
||||
|
||||
|
||||
#define X_PIXELS 1280
|
||||
#define Y_PIXELS 1
|
||||
#define NPACKETS 2
|
||||
#define BUFFERSIZE 1286
|
||||
|
||||
|
||||
#define FRAMEMASK 0xFFFFFFFE
|
||||
#define PACKETMASK 1
|
||||
@ -28,7 +25,7 @@ public:
|
||||
*/
|
||||
|
||||
|
||||
gotthardModuleData(double c=0): slsReceiverData<uint16_t>(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c) {
|
||||
gotthardModuleData(double c=0): slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize), xtalk(c) {
|
||||
|
||||
uint16_t **dMask;
|
||||
int **dMap;
|
||||
@ -36,23 +33,23 @@ public:
|
||||
int initial_offset = 2;
|
||||
int offset = initial_offset;
|
||||
|
||||
dMask=new uint16_t*[Y_PIXELS];
|
||||
dMap=new int*[Y_PIXELS];
|
||||
for (int i = 0; i < Y_PIXELS; i++) {
|
||||
dMap[i] = new int[X_PIXELS];
|
||||
dMask[i] = new uint16_t[X_PIXELS];
|
||||
dMask=new uint16_t*[ypixels];
|
||||
dMap=new int*[ypixels];
|
||||
for (int i = 0; i < ypixels; i++) {
|
||||
dMap[i] = new int[xpixels];
|
||||
dMask[i] = new uint16_t[xpixels];
|
||||
}
|
||||
|
||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
||||
for(iy=0; iy<X_PIXELS; ++iy)
|
||||
for(ix=0; ix<ypixels; ++ix)
|
||||
for(iy=0; iy<xpixels; ++iy)
|
||||
dMask[ix][iy] = 0x0;
|
||||
|
||||
for(ix=0; ix<Y_PIXELS; ++ix){
|
||||
if(ix == (Y_PIXELS/2)){
|
||||
for(ix=0; ix<ypixels; ++ix){
|
||||
if(ix == (ypixels/2)){
|
||||
offset += initial_offset;//2
|
||||
offset++;
|
||||
}
|
||||
for(iy=0; iy<X_PIXELS; ++iy){
|
||||
for(iy=0; iy<xpixels; ++iy){
|
||||
dMap[ix][iy] = offset;
|
||||
offset++;
|
||||
}
|
||||
@ -138,10 +135,14 @@ public:
|
||||
private:
|
||||
|
||||
double xtalk; /**<output buffer crosstalk correction parameter */
|
||||
|
||||
|
||||
const static int xpixels = 1280;
|
||||
const static int ypixels = 1;
|
||||
const static int npackets = 2;
|
||||
const static int buffersize = 1286;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -4,10 +4,6 @@
|
||||
|
||||
|
||||
|
||||
#define X_PIXELS 256
|
||||
#define Y_PIXELS 1
|
||||
#define NPACKETS 1
|
||||
#define BUFFERSIZE 518
|
||||
|
||||
|
||||
|
||||
@ -25,26 +21,26 @@ public:
|
||||
*/
|
||||
|
||||
|
||||
gotthardShortModuleData(double c=0): slsReceiverData<uint16_t>(X_PIXELS, Y_PIXELS, NPACKETS, BUFFERSIZE), xtalk(c){
|
||||
gotthardShortModuleData(double c=0): slsReceiverData<uint16_t>(xpixels, ypixels, npackets, buffersize), xtalk(c){
|
||||
|
||||
uint16_t **dMask;
|
||||
int **dMap;
|
||||
int ix, iy;
|
||||
int offset = 2;
|
||||
|
||||
dMask=new uint16_t*[Y_PIXELS];
|
||||
dMap=new int*[Y_PIXELS];
|
||||
for (int i = 0; i < Y_PIXELS; i++) {
|
||||
dMap[i] = new int[X_PIXELS];
|
||||
dMask[i] = new uint16_t[X_PIXELS];
|
||||
dMask=new uint16_t*[ypixels];
|
||||
dMap=new int*[ypixels];
|
||||
for (int i = 0; i < ypixels; i++) {
|
||||
dMap[i] = new int[xpixels];
|
||||
dMask[i] = new uint16_t[xpixels];
|
||||
}
|
||||
|
||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
||||
for(iy=0; iy<X_PIXELS; ++iy)
|
||||
for(ix=0; ix<ypixels; ++ix)
|
||||
for(iy=0; iy<xpixels; ++iy)
|
||||
dMask[ix][iy] = 0x0;
|
||||
|
||||
for(ix=0; ix<Y_PIXELS; ++ix)
|
||||
for(iy=0; iy<X_PIXELS; ++iy){
|
||||
for(ix=0; ix<ypixels; ++ix)
|
||||
for(iy=0; iy<xpixels; ++iy){
|
||||
dMap[ix][iy] = offset;
|
||||
offset++;
|
||||
}
|
||||
@ -120,7 +116,10 @@ public:
|
||||
private:
|
||||
|
||||
double xtalk; /**<output buffer crosstalk correction parameter */
|
||||
|
||||
const static int xpixels = 256;
|
||||
const static int ypixels = 1;
|
||||
const static int npackets = 1;
|
||||
const static int buffersize = 518;
|
||||
};
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "commonModeSubtraction.h"
|
||||
|
||||
|
||||
#define MYROOT1
|
||||
//#define MYROOT1
|
||||
|
||||
#ifdef MYROOT1
|
||||
#include <TTree.h>
|
||||
@ -92,6 +92,8 @@ class singlePhotonDetector {
|
||||
setClusterSize(csize);
|
||||
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
destructor. Deletes the cluster structure and the pdestalSubtraction array
|
||||
*/
|
||||
@ -324,7 +326,7 @@ class singlePhotonDetector {
|
||||
\returns event mask enum for the given pixel
|
||||
*/
|
||||
eventType getEventMask(int ic, int ir=0){return eventMask[ir][ic];};
|
||||
|
||||
|
||||
|
||||
#ifdef MYROOT1
|
||||
/** generates a tree and maps the branches
|
||||
@ -349,6 +351,9 @@ class singlePhotonDetector {
|
||||
// tall->Branch("rms",&(cluster->rms),"rms/D");
|
||||
return tall;
|
||||
};
|
||||
#else
|
||||
/** write cluster to filer*/
|
||||
void writeCluster(FILE* myFile){cluster->write(myFile);};
|
||||
#endif
|
||||
|
||||
|
||||
@ -373,7 +378,6 @@ class singlePhotonDetector {
|
||||
double tot; /**< sum of the 3x3 cluster */
|
||||
double quadTot; /**< sum of the maximum 2x2cluster */
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user