Pixel mask as bool, and some repointing.

This commit is contained in:
redford_s
2018-05-07 16:18:27 +02:00
parent b50bd83c4c
commit 500ef26b36
9 changed files with 90 additions and 93 deletions

View File

@ -1,7 +1,7 @@
// to compare the results of backplane pulsing with direct beam
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "TFile.h"
#include "TH2F.h"

View File

@ -1,11 +1,11 @@
// to analyse the backplane pulsing data per module
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "TGraphErrors.h"
#include "TF1.h"
@ -36,7 +36,7 @@ int main(int argc, char* argv[]) {
jungfrauFile *thisfile = new jungfrauFile();
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask[NCH];
bool pixel_mask[NCH];
pixelMaskObject->initialisePixelMask(pixel_mask);
if (module_str == "006") {
pixelMaskObject->maskChip(6, pixel_mask);
@ -195,7 +195,7 @@ int main(int argc, char* argv[]) {
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
avg_adcG0_map[framecounter/100]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->pedestalOfChannel(i));
avg_adcG0er_map[framecounter/100]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->semOfChannel(i));
@ -285,7 +285,7 @@ int main(int argc, char* argv[]) {
if (i%100000==0) {cout << "another 100k" << endl;}
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
vector<double> r0_adc;
vector<double> r0_filter;
@ -499,17 +499,17 @@ int main(int argc, char* argv[]) {
} else {
pixelmask_map->Fill(i%NC,i/NC,1);
pixel_mask[i] = 0;
pixel_mask[i] = false;
}
} else {
pixelmask_map->Fill(i%NC,i/NC,1);
pixel_mask[i] = 0;
pixel_mask[i] = false;
}
} else {
pixelmask_map->Fill(i%NC,i/NC,1);
pixel_mask[i] = 0;
pixel_mask[i] = false;
}
}
@ -679,7 +679,7 @@ int main(int argc, char* argv[]) {
double this_g1 = 0;
for (int i = 0; i < NCH; i ++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
this_g0 = g0_grad_map->GetBinContent((i%NC)+1,(i/NC)+1);
this_g1 = g1_grad_map->GetBinContent((i%NC)+1,(i/NC)+1);

View File

@ -1,10 +1,10 @@
// file to check the integration time alone doesn't alter the baseline
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "TGraph.h"
#include "TGraphErrors.h"
@ -30,7 +30,6 @@ int main(int argc, char* argv[]) {
cout << "arg 3: specify CS data file" << endl;
cout << "arg 4: specify Baseline G1 data file" << endl;
cout << "arg 5: specify Baseline G2 data file" << endl;
cout << "eg: ./JFMC_CurrentSourceScan 006 ..." << endl;
cout << " " << endl;
exit(1);
}
@ -44,7 +43,7 @@ int main(int argc, char* argv[]) {
jungfrauFile *thisfile = new jungfrauFile();
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask [NCH];
bool pixel_mask [NCH];
char savename[128];
@ -163,7 +162,7 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < NCH; i++) {
if ((j-1) < 10 || (j > 8075 && j < 8085)) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
uint16_t adc = imagedptr[i]&0x3fff;
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
adcmap_all->Fill(i%NC,i/NC,adc);
@ -174,7 +173,7 @@ int main(int argc, char* argv[]) {
if (((i/NC <= 255) && (i%64 == (j-1)%64)) ||
((i/NC >= 256) &&((-1*(i-524287))%64 == (j-1)%64))) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
uint16_t adc = imagedptr[i]&0x3fff;
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
@ -234,7 +233,7 @@ int main(int argc, char* argv[]) {
if (j%640 == 0) {
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
gainmap_avg->Fill(i%NC,i/NC,gain_histos[i]->GetMean());
adcmap_avg_g1[typeOfScan][j/640-1]->Fill(i%NC,i/NC,adc_histos_g1[i]->GetMean());
@ -420,7 +419,7 @@ int main(int argc, char* argv[]) {
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
// original CS
vector<double> r1_adc;

View File

@ -1,11 +1,11 @@
// file to take current source scan files, analyse and plot them.
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "TGraph.h"
#include "TGraphErrors.h"
@ -104,7 +104,7 @@ int main(int argc, char* argv[]) {
jungfrauFile *thisfile = new jungfrauFile();
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask [NCH];
bool pixel_mask [NCH];
jungfrauPedestal *pedestalObject = new jungfrauPedestal();
pedestalObject->pedestalSetNFrames(640);
@ -167,19 +167,19 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < 640; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), pixel_mask);
}
cout << "after G0, n masked pixels is " << pixelMaskObject->getNMasked(pixel_mask) << endl;
for (int i = 0; i < 640; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), pixel_mask);
}
cout << "after G1, n masked pixels is " << pixelMaskObject->getNMasked(pixel_mask) << endl;
for (int i = 0; i < 640; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), pixel_mask);
}
cout << "after G2, n masked pixels is " << pixelMaskObject->getNMasked(pixel_mask) << endl;
@ -195,7 +195,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG0->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG0->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -207,7 +207,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG1->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG1->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -219,7 +219,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG2->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG2->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -387,7 +387,7 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < NCH; i++) {
if ((j-1) < 10 || (j > 8075 && j < 8085)) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
uint16_t adc = imagedptr[i]&0x3fff;
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
adcmap_all->Fill(i%NC,i/NC,adc);
@ -398,7 +398,7 @@ int main(int argc, char* argv[]) {
if (((i/NC <= 255) && (i%64 == (j-1)%64)) ||
((i/NC >= 256) &&((-1*(i-524287))%64 == (j-1)%64))) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
uint16_t adc = imagedptr[i]&0x3fff;
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
@ -474,7 +474,7 @@ int main(int argc, char* argv[]) {
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
gainmap_avg->Fill(i%NC,i/NC,gain_histos[i]->GetMean());
adcmap_avg_g0[j/640-1]->Fill(i%NC,i/NC,adc_histos_g0[i]->GetMean());
@ -799,7 +799,7 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
vector<double> r0_adc;
vector<double> r0_filter;

View File

@ -1,15 +1,15 @@
// file to fit fluo spectrum per pixel with Kalpha and Kalpha plus Kbeta
// and compare the differences
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauPedestal.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/energyCalibration.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/energyCalibration.cpp"
#include "../sls_detector_calibration/energyCalibration.h"
#include "../sls_detector_calibration/energyCalibration.cpp"
#include "TGraph.h"
#include "TGraphErrors.h"
@ -27,7 +27,6 @@ int main(int argc, char* argv[]) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "arg 2: specify HG0 or G0" << endl;
cout << "eg: ./CuFluo_Ka_KaKb_Comp 109 G0" << endl;
cout << " " << endl;
exit(1);
}
@ -43,7 +42,7 @@ int main(int argc, char* argv[]) {
TFile* comb_file = new TFile((const char *)(savename),"READ");
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask [NCH];
bool pixel_mask [NCH];
pixelMaskObject->initialisePixelMask(pixel_mask);
int low_ADU_peak = 0;
@ -344,7 +343,7 @@ int main(int argc, char* argv[]) {
delete proj;
} else {
pixel_mask[i] = 0;
pixel_mask[i] = false;
}
}
}

View File

@ -3,15 +3,15 @@
// then fit fluo spectrum per pixel
// and save peak position and uncertainty
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauPedestal.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/energyCalibration.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/energyCalibration.cpp"
#include "../sls_detector_calibration/energyCalibration.h"
#include "../sls_detector_calibration/energyCalibration.cpp"
#include "TGraph.h"
#include "TGraphErrors.h"
@ -33,7 +33,6 @@ int main(int argc, char* argv[]) {
cout << "arg 3: specify data location" << endl;
cout << "arg 4: specify pede file" << endl;
cout << "arg 5: specify data file" << endl;
cout << "eg: ./JFMC_CuFluoPeak 126 G0 /mnt/pcmoench_jungfrau_data/Module_126_2017-11-22_Calib pedeG0_1820 CuFluo_G0" << endl;
cout << " " << endl;
exit(1);
}
@ -51,7 +50,7 @@ int main(int argc, char* argv[]) {
int filen = 20;
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask [NCH];
bool pixel_mask [NCH];
TCanvas *mapcanvas = new TCanvas("mapcanvas","",150,10,800,400);
mapcanvas->SetLeftMargin(0.1);
@ -128,21 +127,21 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < 1000; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), pixel_mask);
}
for (int i = 0; i < 1000; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), pixel_mask);
}
for (int i = 0; i < 999; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), pixel_mask);
}
} else {
while (thisfile->readNextFrame()) {
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), pixel_mask);
}
}
@ -160,7 +159,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG0->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG0->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -173,7 +172,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG1->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG1->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -185,7 +184,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG2->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG2->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -198,7 +197,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG0->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG0->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -278,7 +277,7 @@ int main(int argc, char* argv[]) {
uint16_t* imagedptr = thisfile->getFrameDataHandle();
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
uint16_t gain = (imagedptr[i]&0xc000) >> 14;
@ -587,7 +586,7 @@ int main(int argc, char* argv[]) {
delete proj;
} else {
pixel_mask[i] = 0;
pixel_mask[i] = false;
}
}
}

View File

@ -1,9 +1,9 @@
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauFile.C"
#include "../sls_detector_calibration/jungfrauPixelMask.C"
#include "../sls_detector_calibration/jungfrauPedestal.C"
#include "TGraphErrors.h"
#include "TF1.h"
@ -22,7 +22,6 @@ int main(int argc, char* argv[]) {
cout << "arg 2: specify data location" << endl;
cout << "arg 3: specify pede file" << endl;
cout << "arg 4: specify data file" << endl;
cout << "eg: ./JFMC_DirectBeamScan 006 /data_pool/Module_006_161116 100us_500Hz_QS_allgain_pede_1055 100us_500Hz_QS_beam_scan_a" << endl;
cout << " " << endl;
exit(1);
}
@ -35,7 +34,7 @@ int main(int argc, char* argv[]) {
jungfrauFile *thisfile = new jungfrauFile();
jungfrauPixelMask *pixelMaskObject = new jungfrauPixelMask();
static int pixel_mask [NCH];
bool pixel_mask [NCH];
jungfrauPedestal *pedestalObject = new jungfrauPedestal();
pedestalObject->pedestalSetNFrames(1000); // using 1000 frames, rolling window
@ -80,15 +79,15 @@ int main(int argc, char* argv[]) {
for (int i = 0; i < 1000; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(0, thisfile->getFrameDataHandle(), pixel_mask);
}
for (int i = 0; i < 1000; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(1, thisfile->getFrameDataHandle(), pixel_mask);
}
for (int i = 0; i < 999; i++) {
thisfile->readNextFrame();
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), (int*)(&pixel_mask));
pixelMaskObject->maskIfGainNot(3, thisfile->getFrameDataHandle(), pixel_mask);
}
thisfile->rewind();
@ -102,7 +101,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG0->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG0->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -114,7 +113,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG1->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG1->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -126,7 +125,7 @@ int main(int argc, char* argv[]) {
pedestalObject->addFrameToPedestalCalculation(thisfile->getFrameDataHandle());
}
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
pedestalsG2->Fill(i%NC,i/NC,pedestalObject->pedestalOfChannel(i));
pedeRMSG2->Fill(i%NC,i/NC,pedestalObject->rmsOfChannel(i));
}
@ -247,7 +246,7 @@ int main(int argc, char* argv[]) {
if (framecounter%1000 == 0) {
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
avg_adc_g0_map[framecounter/1000 -1]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->pedestalOfChannel(i));
avg_adcer_g0_map[framecounter/1000 -1]->SetBinContent((i%NC)+1,(i/NC)+1,pedestalObjectG0->semOfChannel(i));
@ -352,7 +351,7 @@ int main(int argc, char* argv[]) {
TH2F* range1minmap = new TH2F("range1minmap","",NC,-0.5,NC-0.5,NR,-0.5,NR-0.5);
for (int i = 0; i < NCH; i++) {
if (pixel_mask[i] == 1) {
if (pixel_mask[i] == true) {
vector<double> r0_adc;
vector<double> r0_adcer;

View File

@ -1,16 +1,18 @@
// file to combine the four sets of results
// to write the calibration constants for the junfgrau module
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauFile.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPixelMask.C"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauPedestal.C"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include "TCanvas.h"
#include "TFile.h"
#include "TH1F.h"
#include "TH2F.h"
#include "TPaveText.h"
#include <fstream>
#include <iomanip>
struct GainMaps
{
static double g0VALs[NCH]; // declaration, incomplete type
@ -30,7 +32,6 @@ int main(int argc, char* argv[]) {
if (argc != 2) {
cout << "Correct usage:" << endl;
cout << "arg 1: specify module number" << endl;
cout << "eg: ./JFMC_CalibWriter 006" << endl;
cout << " " << endl;
exit(1);
}

View File

@ -1,7 +1,7 @@
// to extract the calibration constants of all modules from the gain maps and compare
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonHeader.h"
#include "/afs/psi.ch/project/mythen/sophie/sls_detector_calibration/jungfrauCommonFunctions.h"
#include "../sls_detector_calibration/jungfrauCommonHeader.h"
#include "../sls_detector_calibration/jungfrauCommonFunctions.h"
#include <fstream>