Direct beam scans for modules 066 and 094. Increased granularity by a factor 2.
This commit is contained in:
@@ -190,18 +190,25 @@ int main(int argc, char* argv[]) {
|
||||
jungfrauPedestal *pedestalObjectG1 = new jungfrauPedestal();
|
||||
pedestalObjectG1->pedestalSetNFrames(1000); // using 1000 frames, rolling window
|
||||
|
||||
int nsteps = 0;
|
||||
if (module_str == "094" || module_str == "066") {
|
||||
nsteps = 80;
|
||||
} else {
|
||||
nsteps = 40;
|
||||
}
|
||||
|
||||
// 2D hist for every point, to save
|
||||
// mean, error and number of fills
|
||||
// can be loaded from a file
|
||||
TH2F* avg_adc_g0_map [40];
|
||||
TH2F* avg_adc_g1_map [40];
|
||||
TH2F* avg_adcer_g0_map [40];
|
||||
TH2F* avg_adcer_g1_map [40];
|
||||
TH2F* avg_adc_g0_map [nsteps];
|
||||
TH2F* avg_adc_g1_map [nsteps];
|
||||
TH2F* avg_adcer_g0_map [nsteps];
|
||||
TH2F* avg_adcer_g1_map [nsteps];
|
||||
|
||||
// creating the histograms
|
||||
if (createHistoFile) {
|
||||
|
||||
for (int j = 0; j < 40; j++) {
|
||||
for (int j = 0; j < nsteps; j++) {
|
||||
sprintf(savename,"avg_adc_g0_map_%d", j);
|
||||
avg_adc_g0_map[j] = new TH2F(savename,"",NC,-0.5,NC-0.5,NR,-0.5,NR-0.5);
|
||||
sprintf(savename,"avg_adc_g1_map_%d", j);
|
||||
@@ -213,7 +220,7 @@ int main(int argc, char* argv[]) {
|
||||
avg_adcer_g1_map[j] = new TH2F(savename,"",NC,-0.5,NC-0.5,NR,-0.5,NR-0.5);
|
||||
}
|
||||
|
||||
int nfiles = 4;
|
||||
int nfiles = nsteps/10;
|
||||
int framecounter = 0;
|
||||
for (int filei = 0; filei < nfiles; filei++) {
|
||||
|
||||
@@ -295,7 +302,7 @@ int main(int argc, char* argv[]) {
|
||||
sprintf(savename,"/mnt/pcmoench_jungfrau_data/jungfrau_ana_sophie/M%s_CalibAna/DB_histos_M%s.root", module_str.c_str(), module_str.c_str());
|
||||
TFile* saved_file = new TFile((const char *)(savename),"RECREATE");
|
||||
|
||||
for (int i = 0; i < 40; i++) {
|
||||
for (int i = 0; i < nsteps; i++) {
|
||||
avg_adc_g0_map[i]->Write();
|
||||
avg_adc_g1_map[i]->Write();
|
||||
avg_adcer_g0_map[i]->Write();
|
||||
@@ -308,7 +315,7 @@ int main(int argc, char* argv[]) {
|
||||
sprintf(savename,"/mnt/pcmoench_jungfrau_data/jungfrau_ana_sophie/M%s_CalibAna/DB_histos_M%s.root", module_str.c_str(), module_str.c_str());
|
||||
TFile* saved_file = new TFile((const char *)(savename),"READ");
|
||||
|
||||
for (int i = 0; i < 40; i++) {
|
||||
for (int i = 0; i < nsteps; i++) {
|
||||
sprintf(savename,"avg_adc_g0_map_%d", i);
|
||||
avg_adc_g0_map[i] = (TH2F*)saved_file->Get((const char *)(savename));
|
||||
sprintf(savename,"avg_adc_g1_map_%d", i);
|
||||
@@ -358,8 +365,13 @@ int main(int argc, char* argv[]) {
|
||||
r1_adc.push_back(pedestalsG1->GetBinContent((i%NC)+1,(i/NC)+1));
|
||||
r1_adcer.push_back(pedeRMSG1->GetBinContent((i%NC)+1,(i/NC)+1));
|
||||
|
||||
for (int j = 0; j < 40; j++) {
|
||||
int current = (j+1)*2;
|
||||
for (int j = 0; j < nsteps; j++) {
|
||||
int current = 0;
|
||||
if (nsteps == 40) {
|
||||
current = (j+1)*2;
|
||||
} else if (nsteps == 80) {
|
||||
current = j+2;
|
||||
}
|
||||
|
||||
double this_g0avg = avg_adc_g0_map[j]->GetBinContent((i%NC)+1,(i/NC)+1);
|
||||
double this_g1avg = avg_adc_g1_map[j]->GetBinContent((i%NC)+1,(i/NC)+1);
|
||||
@@ -399,7 +411,7 @@ int main(int argc, char* argv[]) {
|
||||
fit1 = new TF1("fit1","[0]+[1]*x",4,14);
|
||||
} else if (module_str == "008") {
|
||||
fit1 = new TF1("fit1","[0]+[1]*x",2,20);
|
||||
} else if (module_str == "044") {
|
||||
} else if (module_str == "044" || module_str == "066" || module_str == "094") {
|
||||
fit1 = new TF1("fit1","[0]+[1]*x",2,20);
|
||||
}
|
||||
fit1->SetParameter(0, 100.);
|
||||
@@ -424,7 +436,7 @@ int main(int argc, char* argv[]) {
|
||||
fit2 = new TF1("fit2","[0]+[1]*x",60,80);
|
||||
} else if (module_str == "008") {
|
||||
fit2 = new TF1("fit2","[0]+[1]*x",60,80);
|
||||
} else if (module_str == "044") {
|
||||
} else if (module_str == "044" || module_str == "066" || module_str == "094") {
|
||||
fit2 = new TF1("fit2","[0]+[1]*x",60,80);
|
||||
}
|
||||
fit2->SetParameter(0, 1000.);
|
||||
|
||||
@@ -80,6 +80,7 @@ Module 065 - for SOLEIL
|
||||
Module 066 - replacing 027 at ESRF
|
||||
./JFMC_CuFluoPeak 066 /mnt/pcmoench_jungfrau_data1_ib/Module_066_2017-10-24_Calib pedeG0_1021 CuFluo_10us_500Hz
|
||||
./JFMC_CuFluoPeakFit 066
|
||||
./JFMC_DirectBeamScan 066 /mnt/pcmoench_jungfrau_data1_ib/Module_066_2017-10-24_Calib DB_OriginalScan_200Hz_200us_pede DB_DoubleGranularity_500Hz_200us
|
||||
./JFMC_CurrentSourceScan 066 /mnt/pcmoench_jungfrau_data1_ib/Module_066_2017-10-24_Calib CS_scan1
|
||||
|
||||
|
||||
@@ -110,6 +111,7 @@ Module 088 - in the 1M for SLAC
|
||||
Module 094
|
||||
./JFMC_CuFluoPeak 094 /mnt/pcmoench_jungfrau_data1_ib/Module_094_2017-10-24_Calib pedeG0_1041 CuFluo_10us_500Hz
|
||||
./JFMC_CuFluoPeakFit 094
|
||||
./JFMC_DirectBeamScan 094 /mnt/pcmoench_jungfrau_data1_ib/Module_094_2017-10-24_Calib DB_DoubleGranularity_500Hz_200us_pede DB_DoubleGranularity_500Hz_200us
|
||||
./JFMC_CurrentSourceScan 094 /mnt/pcmoench_jungfrau_data1_ib/Module_094_2017-10-24_Calib CS_scan2
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user