A lot of the files are identical to old ones, but the main changes are: 1) EXFit2.C in sx3cal - Finds front/right gains for each strip using the known middle two pad edges, but gainmatches all backs 2) Define new 'fix' loci, arising from the step-ladder correction to A1C2 events. This is tested in scratch/sx3z_vs_pcz/testmodel.h, will be given a better name in the future. 3) Explore A1C2 and A1C3 loci in detail 4) environment variables to 'flip' and 'offset' wires during sort. All env vars are set in shell scripts that call them 5) environment variables that allow for timestamp bounds to be set and unset. Default limiting values are 0 and dbl_max so no harm done unless these specific env vars are set. 6) Some bookkeeping indicating 27Al instead of 26Al in all places.
65 lines
1.2 KiB
C++
65 lines
1.2 KiB
C++
#ifndef ClassDet_h
|
|
#define ClassDet_h
|
|
|
|
#include <cstdio>
|
|
|
|
#define MAXMULTI 1000
|
|
|
|
class Det{
|
|
public:
|
|
Det(): multi(0) {Clear(); }
|
|
|
|
unsigned short multi; // max 65535
|
|
unsigned short id[MAXMULTI];
|
|
unsigned short ch[MAXMULTI];
|
|
unsigned short e[MAXMULTI];
|
|
unsigned long long t[MAXMULTI];
|
|
|
|
unsigned short sn[MAXMULTI];
|
|
unsigned short digiCh[MAXMULTI];
|
|
|
|
unsigned short index[MAXMULTI]; // id * nCh + ch;
|
|
bool used[MAXMULTI];
|
|
|
|
void Clear(){
|
|
multi = 0;
|
|
for( int i = 0; i < MAXMULTI; i++){
|
|
id[i] = 0;
|
|
ch[i] = 0;
|
|
e[i] = 0;
|
|
t[i] = 0;
|
|
index[i] = 0;
|
|
sn[i] = 0;
|
|
digiCh[i] = 0;
|
|
used[i] = false;
|
|
}
|
|
}
|
|
|
|
void Print(){
|
|
printf("=============================== multi : %u\n", multi);
|
|
for( int i = 0; i < multi; i++) {
|
|
printf(" %3d | %2d-%-2d(%5d) %5u %15llu \n", i, id[i], ch[i], index[i], e[i], t[i]);
|
|
}
|
|
}
|
|
|
|
void SetDetDimension(unsigned short maxID, unsigned maxCh){
|
|
nID = maxID;
|
|
nCh = maxCh;
|
|
}
|
|
|
|
void CalIndex(){
|
|
for( int i = 0; i < multi; i++){
|
|
index[i] = id[i] * nCh + ch[i] ;
|
|
}
|
|
}
|
|
|
|
private:
|
|
|
|
unsigned short nID;
|
|
unsigned short nCh;
|
|
|
|
};
|
|
|
|
|
|
#endif
|