diff --git a/CS_analysis.cpp b/CS_analysis.cpp index 81b4704..c96ec65 100644 --- a/CS_analysis.cpp +++ b/CS_analysis.cpp @@ -33,7 +33,7 @@ double checkRangeMinForRCEffect(double range_min) { } - +bool isHGX=false; int main(int argc, char* argv[]) { jungfrauStyle(); @@ -63,14 +63,28 @@ int main(int argc, char* argv[]) { - - + string plotfolder_str; + string str2 ("HG0G1G2"); + string str3 =("HGOG1G2"); //filename creator had this bug string module_str = argv[1]; string data_loc = argv[2]; string data_file = argv[3]; string anadata_loc = argv[4]; //uncomment for VH 210906 +if (data_file.find(str2) != string::npos) isHGX=true; +if (data_file.find(str3) != string::npos) isHGX=true; + +if (isHGX) { + cout << " HG0->HG1->HG2 sequence - dynamicHG0" <G1->G2 sequence - dynamicG0" <rewind(); - sprintf(savename,"plots/M%s/CurrentSource/pixelmask_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixelmask_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); pixelMaskObject->plotPixelMask(pixel_mask,savename); cout << "after chip mask, n masked pixels is " << pixelMaskObject->getNMasked(pixel_mask) << endl; @@ -461,21 +545,21 @@ int main(int argc, char* argv[]) { pedestalsG0->GetYaxis()->SetTitle("Row"); pedestalsG0->GetYaxis()->SetTitleOffset(0.7); pedestalsG0->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/pedeG0_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pedeG0_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); pedestalsG1->GetXaxis()->SetTitle("Column"); pedestalsG1->GetYaxis()->SetTitle("Row"); pedestalsG1->GetYaxis()->SetTitleOffset(0.7); pedestalsG1->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/pedeG1_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pedeG1_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); pedestalsG2->GetXaxis()->SetTitle("Column"); pedestalsG2->GetYaxis()->SetTitle("Row"); pedestalsG2->GetYaxis()->SetTitleOffset(0.7); pedestalsG2->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/pedeG2_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pedeG2_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); pedeRMSG0->GetXaxis()->SetTitle("Column"); @@ -487,7 +571,7 @@ int main(int argc, char* argv[]) { pedeRMSG0->GetZaxis()->SetRangeUser(0,25); } pedeRMSG0->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/pedeRMSG0_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pedeRMSG0_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); TH2F *adcmap_avg_g0 [97]; @@ -664,26 +748,26 @@ int main(int argc, char* argv[]) { adcmap_sel->GetYaxis()->SetTitle("Row"); adcmap_sel->GetYaxis()->SetTitleOffset(0.7); adcmap_sel->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/adcmap_%i_sel_M%s.png", module_str.c_str(), j-1, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/adcmap_%i_sel_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j-1, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); adcmap_all->GetXaxis()->SetTitle("Column"); adcmap_all->GetYaxis()->SetTitle("Row"); adcmap_all->GetYaxis()->SetTitleOffset(0.7); adcmap_all->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/adcmap_%i_all_M%s.png", module_str.c_str(), j-1, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/adcmap_%i_all_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j-1, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); gainmap_sel->GetXaxis()->SetTitle("Column"); gainmap_sel->GetYaxis()->SetTitle("Row"); gainmap_sel->GetYaxis()->SetTitleOffset(0.7); gainmap_sel->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/gainmap_%i_sel_M%s.png", module_str.c_str(), j-1, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/gainmap_%i_sel_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j-1, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); gainmap_all->GetXaxis()->SetTitle("Column"); gainmap_all->GetYaxis()->SetTitle("Row"); gainmap_all->GetYaxis()->SetTitleOffset(0.7); gainmap_all->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/gainmap_%i_all_M%s.png", module_str.c_str(), j-1, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/gainmap_%i_all_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j-1, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); adcmap_sel->Reset(); @@ -747,14 +831,14 @@ int main(int argc, char* argv[]) { gain_avg->GetXaxis()->SetTitleOffset(1.1); gain_avg->GetYaxis()->SetTitleOffset(1.5); gain_avg->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/gain_avg_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/gain_avg_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); c1->SaveAs((const char *)(savename)); mapcanvas->cd(); gainmap_avg->GetXaxis()->SetTitle("Column"); gainmap_avg->GetYaxis()->SetTitle("Row"); gainmap_avg->GetYaxis()->SetTitleOffset(0.7); gainmap_avg->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/perStep/gainmap_avg_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/gainmap_avg_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); c1->cd(); @@ -762,7 +846,7 @@ int main(int argc, char* argv[]) { adc_avg_g0->GetXaxis()->SetTitleOffset(1.1); adc_avg_g0->GetYaxis()->SetTitleOffset(1.5); adc_avg_g0->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adc_avg_g0_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adc_avg_g0_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); c1->SaveAs((const char *)(savename)); mapcanvas->cd(); adcmap_avg_g0[j/640-1]->GetXaxis()->SetTitle("Column"); @@ -770,14 +854,14 @@ int main(int argc, char* argv[]) { adcmap_avg_g0[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcmap_avg_g0[j/640-1]->Draw("colz"); mapcanvas->Update(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcmap_avg_g0_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcmap_avg_g0_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); adcermap_avg_g0[j/640-1]->GetXaxis()->SetTitle("Column"); adcermap_avg_g0[j/640-1]->GetYaxis()->SetTitle("Row"); adcermap_avg_g0[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcermap_avg_g0[j/640-1]->Draw("colz"); mapcanvas->Update(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcermap_avg_g0_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcermap_avg_g0_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); c1->cd(); @@ -785,7 +869,7 @@ int main(int argc, char* argv[]) { adc_avg_g1->GetXaxis()->SetTitleOffset(1.1); adc_avg_g1->GetYaxis()->SetTitleOffset(1.5); adc_avg_g1->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adc_avg_g1_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adc_avg_g1_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); c1->SaveAs((const char *)(savename)); mapcanvas->cd(); adcmap_avg_g1[j/640-1]->GetXaxis()->SetTitle("Column"); @@ -793,14 +877,14 @@ int main(int argc, char* argv[]) { adcmap_avg_g1[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcmap_avg_g1[j/640-1]->Draw("colz"); mapcanvas->Update(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcmap_avg_g1_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcmap_avg_g1_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); adcermap_avg_g1[j/640-1]->GetXaxis()->SetTitle("Column"); adcermap_avg_g1[j/640-1]->GetYaxis()->SetTitle("Row"); adcermap_avg_g1[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcermap_avg_g1[j/640-1]->Draw("colz"); mapcanvas->Update(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcermap_avg_g1_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcermap_avg_g1_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); c1->cd(); @@ -808,20 +892,20 @@ int main(int argc, char* argv[]) { adc_avg_g2->GetXaxis()->SetTitleOffset(1.1); adc_avg_g2->GetYaxis()->SetTitleOffset(1.5); adc_avg_g2->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adc_avg_g2_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adc_avg_g2_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); c1->SaveAs((const char *)(savename)); mapcanvas->cd(); adcmap_avg_g2[j/640-1]->GetXaxis()->SetTitle("Column"); adcmap_avg_g2[j/640-1]->GetYaxis()->SetTitle("Row"); adcmap_avg_g2[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcmap_avg_g2[j/640-1]->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcmap_avg_g2_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcmap_avg_g2_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); adcermap_avg_g2[j/640-1]->GetXaxis()->SetTitle("Column"); adcermap_avg_g2[j/640-1]->GetYaxis()->SetTitle("Row"); adcermap_avg_g2[j/640-1]->GetYaxis()->SetTitleOffset(0.7); adcermap_avg_g2[j/640-1]->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/perStep/adcermap_avg_g2_%i_M%s.png", module_str.c_str(), j/640, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/perStep/adcermap_avg_g2_%i_M%s.png", module_str.c_str(),plotfolder_str.c_str(), j/640, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1177,7 +1261,7 @@ int main(int argc, char* argv[]) { grap_g0->Draw("P"); } mapcanvas->SetLogx(); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); mapcanvas->SetLogx(0); @@ -1247,7 +1331,7 @@ int main(int argc, char* argv[]) { st0->SetBorderSize(0); st0->SetTextColor(kBlue); mapcanvas->SetLogx(); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g0_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g0_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); mapcanvas->SetLogx(0); @@ -1271,7 +1355,7 @@ int main(int argc, char* argv[]) { norm_g0->SetMaximum(100); norm_g0->Draw("AP"); flat_g0->Draw("same"); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g0norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g0norm_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); delete norm_g0; @@ -1342,7 +1426,7 @@ int main(int argc, char* argv[]) { st0->SetBorderSize(0); st0->SetTextColor(kGreen+2); mapcanvas->SetLogx(); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g1_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g1_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); mapcanvas->SetLogx(0); @@ -1391,7 +1475,7 @@ int main(int argc, char* argv[]) { lin_g1_m02pc->Draw("same"); lin_g1_m05pc->Draw("same"); norm_g1->Draw("P"); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g1norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g1norm_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); delete norm_g1; @@ -1462,7 +1546,7 @@ int main(int argc, char* argv[]) { st0->SetBorderSize(0); st0->SetTextColor(kRed); mapcanvas->SetLogx(); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g2_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g2_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); mapcanvas->SetLogx(0); @@ -1511,7 +1595,7 @@ int main(int argc, char* argv[]) { lin_g2_m02pc->Draw("same"); lin_g2_m05pc->Draw("same"); norm_g2->Draw("P"); - sprintf(savename,"plots/M%s/CurrentSource/pixel_%s_%d_g2norm_M%s.png", module_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); + sprintf(savename,"plots/M%s/%s/pixel_%s_%d_g2norm_M%s.png", module_str.c_str(),plotfolder_str.c_str(), pixel_type.c_str(), i, module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); delete norm_g2; @@ -1609,14 +1693,14 @@ int main(int argc, char* argv[]) { g0hist->GetXaxis()->SetTitleOffset(1.1); g0hist->GetYaxis()->SetTitleOffset(1.5); g0hist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0hist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0hist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); g0erhist->GetXaxis()->SetTitle("Fitted G0 uncert"); g0erhist->GetXaxis()->SetTitleOffset(1.1); g0erhist->GetYaxis()->SetTitleOffset(1.5); g0erhist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0erhist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0erhist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1625,14 +1709,14 @@ int main(int argc, char* argv[]) { g1hist->GetXaxis()->SetTitleOffset(1.1); g1hist->GetYaxis()->SetTitleOffset(1.5); g1hist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1hist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1hist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); g1erhist->GetXaxis()->SetTitle("Fitted G1 uncert"); g1erhist->GetXaxis()->SetTitleOffset(1.1); g1erhist->GetYaxis()->SetTitleOffset(1.5); g1erhist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1erhist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1erhist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1641,14 +1725,14 @@ int main(int argc, char* argv[]) { g2hist->GetXaxis()->SetTitleOffset(1.1); g2hist->GetYaxis()->SetTitleOffset(1.5); g2hist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g2hist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g2hist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); g2erhist->GetXaxis()->SetTitle("Fitted G2 uncert"); g2erhist->GetXaxis()->SetTitleOffset(1.1); g2erhist->GetYaxis()->SetTitleOffset(1.5); g2erhist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g2erhist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g2erhist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1657,7 +1741,7 @@ int main(int argc, char* argv[]) { g0overg1hist->GetXaxis()->SetTitleOffset(1.1); g0overg1hist->GetYaxis()->SetTitleOffset(1.5); g0overg1hist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1hist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1hist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); TPaveText *pave2 = new TPaveText(0.6,0.8,0.94,0.94,"blNDC"); @@ -1676,7 +1760,7 @@ int main(int argc, char* argv[]) { pave2->AddText((const char *)(savename)); pave2->Draw(); g0overg1hist->SetStats(kFALSE); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1hist_fit_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1hist_fit_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1684,7 +1768,7 @@ int main(int argc, char* argv[]) { g0overg1erhist->GetXaxis()->SetTitleOffset(1.1); g0overg1erhist->GetYaxis()->SetTitleOffset(1.5); g0overg1erhist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1erhist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1erhist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); g0overg1_isEdge->SetLineColor(kBlue); @@ -1718,7 +1802,7 @@ int main(int argc, char* argv[]) { g0overg1_isNextToDouble->Draw("same"); g0overg1_isBulk->Draw("same"); leg1->Draw("same"); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1_perType_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1_perType_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1727,7 +1811,7 @@ int main(int argc, char* argv[]) { g1overg2hist->GetXaxis()->SetTitleOffset(1.1); g1overg2hist->GetYaxis()->SetTitleOffset(1.5); g1overg2hist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2hist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2hist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); TPaveText *pave2 = new TPaveText(0.6,0.8,0.94,0.94,"blNDC"); @@ -1746,7 +1830,7 @@ int main(int argc, char* argv[]) { pave2->AddText((const char *)(savename)); pave2->Draw(); g1overg2hist->SetStats(kFALSE); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2hist_fit_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2hist_fit_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1754,7 +1838,7 @@ int main(int argc, char* argv[]) { g1overg2erhist->GetXaxis()->SetTitleOffset(1.1); g1overg2erhist->GetYaxis()->SetTitleOffset(1.5); g1overg2erhist->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2erhist_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2erhist_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); g1overg2_isEdge->SetLineColor(kBlue); @@ -1788,7 +1872,7 @@ int main(int argc, char* argv[]) { g1overg2_isNextToDouble->Draw("same"); g1overg2_isBulk->Draw("same"); leg->Draw("same"); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2_perType_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2_perType_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); c1->SaveAs((const char *)(savename)); } @@ -1802,7 +1886,7 @@ int main(int argc, char* argv[]) { g0map->Draw("colz"); pave->AddText("G0 [ADU/#mus]"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); g0ermap->GetXaxis()->SetTitle("Column"); @@ -1813,7 +1897,7 @@ int main(int argc, char* argv[]) { pave->AddText("#sigma_{G0}"); pave->Draw(); g0ermap->GetZaxis()->SetRangeUser(0,200); - sprintf(savename,"plots/M%s/CurrentSource/g0ermap_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0ermap_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1830,7 +1914,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G1 [ADU/#mus]"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); g1ermap->GetXaxis()->SetTitle("Column"); @@ -1841,7 +1925,7 @@ int main(int argc, char* argv[]) { pave->AddText("#sigma_{G1}"); pave->Draw(); g1ermap->GetZaxis()->SetRangeUser(0,50); - sprintf(savename,"plots/M%s/CurrentSource/g1ermap_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1ermap_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1860,7 +1944,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G2 [ADU/#mus]"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g2map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g2map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); g2ermap->GetXaxis()->SetTitle("Column"); @@ -1871,7 +1955,7 @@ int main(int argc, char* argv[]) { pave->AddText("#sigma_{G2}"); pave->Draw(); g2ermap->GetZaxis()->SetRangeUser(0,5); - sprintf(savename,"plots/M%s/CurrentSource/g2ermap_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g2ermap_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1888,7 +1972,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G0/G1"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); g0overg1ermap->GetXaxis()->SetTitle("Column"); @@ -1899,7 +1983,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("#sigma_{G0/G1}"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g0overg1ermap_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g0overg1ermap_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1918,7 +2002,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("G1/G2"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); g1overg2ermap->GetXaxis()->SetTitle("Column"); @@ -1929,7 +2013,7 @@ int main(int argc, char* argv[]) { pave->Clear(); pave->AddText("#sigma_{G1/G2}"); pave->Draw(); - sprintf(savename,"plots/M%s/CurrentSource/g1overg2ermap_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/g1overg2ermap_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); } @@ -1937,17 +2021,27 @@ int main(int argc, char* argv[]) { no_g0g1_calib_map->GetYaxis()->SetTitle("Row"); no_g0g1_calib_map->GetYaxis()->SetTitleOffset(0.7); no_g0g1_calib_map->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/no_g0g1_calib_map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/no_g0g1_calib_map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); no_g1g2_calib_map->GetXaxis()->SetTitle("Column"); no_g1g2_calib_map->GetYaxis()->SetTitle("Row"); no_g1g2_calib_map->GetYaxis()->SetTitleOffset(0.7); no_g1g2_calib_map->Draw("colz"); - sprintf(savename,"plots/M%s/CurrentSource/no_g1g2_calib_map_M%s.png", module_str.c_str(), module_str.c_str()); + sprintf(savename,"plots/M%s/%s/no_g1g2_calib_map_M%s.png", module_str.c_str(),plotfolder_str.c_str(), module_str.c_str()); mapcanvas->SaveAs((const char *)(savename)); + + +if (isHGX) { + sprintf(savename,"data/M%s/CS_ratio_M%s_HG0G1G2.root", module_str.c_str(), module_str.c_str()); + + } + else + { + sprintf(savename,"data/M%s/CS_ratio_M%s.root", module_str.c_str(), module_str.c_str()); + } + - sprintf(savename,"data/M%s/CS_ratio_M%s.root", module_str.c_str(), module_str.c_str()); TFile* saved_file2 = new TFile((const char *)(savename),"RECREATE"); g1overg2map->Write(); g1overg2ermap->Write(); diff --git a/run_JFCalibration.txt b/run_JFCalibration.txt index c92fea7..d0ccd0f 100644 --- a/run_JFCalibration.txt +++ b/run_JFCalibration.txt @@ -1598,6 +1598,14 @@ M305 (Calib for VELA beamtime) ./JFMC_CalibWriter_wBP 305 +M306 (strixel) +./BP_analysis 306 /mnt/sls_det_storage/jungfrau_calib/data/Module_306_Calib/BP_M306_2022-06-14 /mnt/sls_det_storage/jungfrau_calib/ana/M306_CalibAna/ +./CS_analysis 306 /mnt/sls_det_storage/jungfrau_calib/data/Module_306_Calib/ CS_M306_2022-06-15 /mnt/sls_det_storage/jungfrau_calib/ana/M306_CalibAna/ +./CuFluo_analysis 306 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_306_Calib/ pedeG0_M306_2022-06-15 CuFluoG0_M306_2022-06-15 /mnt/sls_det_storage/jungfrau_calib/ana/M306_CalibAna/ +./CuFluo_analysis 306 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_306_Calib/ pedeHG0_M306_2022-06-15 CuFluoHG0_M306_2022-06-15 /mnt/sls_det_storage/jungfrau_calib/ana/M306_CalibAna/ +./JFMC_CalibWriter_wBP 306 + + Module 307 ./CuFluo_analysis 307 G0 /mnt/pcmoench_jungfrau_calib/data/Module_307_Calib pedeG0_M307_2020-01-17 CuFluoG0_M307_2020-01-17 ./CuFluo_analysis 307 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_307_Calib pedeHG0_M307_2020-01-17 CuFluoHG0_M307_2020-01-17 @@ -1897,6 +1905,14 @@ M349 ./JFMC_CalibWriter_wBP 349 +M350 (strixel) +./BP_analysis 350 /mnt/sls_det_storage/jungfrau_calib/data/Module_350_Calib/BP_M350_2022-06-14 /mnt/sls_det_storage/jungfrau_calib/ana/M350_CalibAna/ +./CS_analysis 350 /mnt/sls_det_storage/jungfrau_calib/data/Module_350_Calib/ CS_M350_2022-06-14 /mnt/sls_det_storage/jungfrau_calib/ana/M350_CalibAna/ +./CuFluo_analysis 350 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_350_Calib/ pedeG0_M350_2022-06-15 CuFluoG0_M350_2022-06-15 /mnt/sls_det_storage/jungfrau_calib/ana/M350_CalibAna/ +./CuFluo_analysis 350 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_350_Calib/ pedeHG0_M350_2022-06-15 CuFluoHG0_M350_2022-06-15 /mnt/sls_det_storage/jungfrau_calib/ana/M350_CalibAna/ +./JFMC_CalibWriter_wBP 350 + + Module 351 ./CuFluo_analysis 351 G0 /mnt/pcmoench_jungfrau_calib/data/Module_351_Calib pedeG0_M351_2020-01-17 CuFluoG0_M351_2020-01-17 ./CuFluo_analysis 351 HG0 /mnt/pcmoench_jungfrau_calib/data/Module_351_Calib pedeHG0_M351_2020-01-17 CuFluoHG0_M351_2020-01-17 @@ -2404,6 +2420,30 @@ M533 ./JFMC_CalibWriter_wBP 533 +M534 +./BP_analysis 534 /mnt/sls_det_storage/jungfrau_calib/data/Module_534_Calib/BP_M534_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M534_CalibAna/ +./CS_analysis 534 /mnt/sls_det_storage/jungfrau_calib/data/Module_534_Calib/ CS_M534_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M534_CalibAna/ +./CuFluo_analysis 534 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_534_Calib/ pedeG0_M534_2022-12-12 CuFluoG0_M534_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M534_CalibAna/ +./CuFluo_analysis 534 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_534_Calib/ pedeHG0_M534_2022-12-12 CuFluoHG0_M534_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M534_CalibAna/ +./JFMC_CalibWriter_wBP 534 + + +M537 +./BP_analysis 537 /mnt/sls_det_storage/jungfrau_calib/data/Module_537_Calib/BP_M537_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M537_CalibAna/ +./CS_analysis 537 /mnt/sls_det_storage/jungfrau_calib/data/Module_537_Calib/ CS_M537_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M537_CalibAna/ +./CuFluo_analysis 537 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_537_Calib/ pedeG0_M537_2022-12-12 CuFluoG0_M537_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M537_CalibAna/ +./CuFluo_analysis 537 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_537_Calib/ pedeHG0_M537_2022-12-12 CuFluoHG0_M537_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M537_CalibAna/ +./JFMC_CalibWriter_wBP 537 + + +M538 +./BP_analysis 538 /mnt/sls_det_storage/jungfrau_calib/data/Module_538_Calib/BP_M538_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M538_CalibAna/ +./CS_analysis 538 /mnt/sls_det_storage/jungfrau_calib/data/Module_538_Calib/ CS_M538_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M538_CalibAna/ +./CuFluo_analysis 538 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_538_Calib/ pedeG0_M538_2022-12-12 CuFluoG0_M538_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M538_CalibAna/ +./CuFluo_analysis 538 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_538_Calib/ pedeHG0_M538_2022-12-12 CuFluoHG0_M538_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M538_CalibAna/ +./JFMC_CalibWriter_wBP 538 + + M539 ./BP_analysis 539 /mnt/sls_det_storage/jungfrau_calib/data/Module_539_Calib/BP_M539_2022-01-26 /mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M539_CalibAna ./CS_analysis 539 /mnt/sls_det_storage/jungfrau_calib/data/Module_539_Calib/ CS_M539_2022-01-26 /mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M539_CalibAna @@ -2412,6 +2452,30 @@ M539 ./JFMC_CalibWriter_wBP 539 +M542 +./BP_analysis 542 /mnt/sls_det_storage/jungfrau_calib/data/Module_542_Calib/BP_M542_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M542_CalibAna/ +./CS_analysis 542 /mnt/sls_det_storage/jungfrau_calib/data/Module_542_Calib/ CS_M542_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M542_CalibAna/ +./CuFluo_analysis 542 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_542_Calib/ pedeG0_M542_2022-12-12 CuFluoG0_M542_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M542_CalibAna/ +./CuFluo_analysis 542 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_542_Calib/ pedeHG0_M542_2022-12-12 CuFluoHG0_M542_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M542_CalibAna/ +./JFMC_CalibWriter_wBP 542 + + +M543 +./BP_analysis 543 /mnt/sls_det_storage/jungfrau_calib/data/Module_543_Calib/BP_M543_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M543_CalibAna/ +./CS_analysis 543 /mnt/sls_det_storage/jungfrau_calib/data/Module_543_Calib/ CS_M543_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M543_CalibAna/ +./CuFluo_analysis 543 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_543_Calib/ pedeG0_M543_2022-12-12 CuFluoG0_M543_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M543_CalibAna/ +./CuFluo_analysis 543 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_543_Calib/ pedeHG0_M543_2022-12-12 CuFluoHG0_M543_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M543_CalibAna/ +./JFMC_CalibWriter_wBP 543 + + +M544 +./BP_analysis 544 /mnt/sls_det_storage/jungfrau_calib/data/Module_544_Calib/BP_M544_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M544_CalibAna/ +./CS_analysis 544 /mnt/sls_det_storage/jungfrau_calib/data/Module_544_Calib/ CS_M544_2022-12-09 /mnt/sls_det_storage/jungfrau_calib/ana/M544_CalibAna/ +./CuFluo_analysis 544 G0 /mnt/sls_det_storage/jungfrau_calib/data/Module_544_Calib/ pedeG0_M544_2022-12-12 CuFluoG0_M544_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M544_CalibAna/ +./CuFluo_analysis 544 HG0 /mnt/sls_det_storage/jungfrau_calib/data/Module_544_Calib/ pedeHG0_M544_2022-12-12 CuFluoHG0_M544_2022-12-12 /mnt/sls_det_storage/jungfrau_calib/ana/M544_CalibAna/ +./JFMC_CalibWriter_wBP 544 + + M555 ./BP_analysis 555 /mnt/sls_det_storage/jungfrau_calib/data/Module_555_Calib/BP_M555_2022-01-26 /mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M555_CalibAna ./CS_analysis 555 /mnt/sls_det_storage/jungfrau_calib/data/Module_555_Calib/ CS_M555_2022-01-26 /mnt/sls_det_storage/jungfrau_data1/jungfrau_ana_sophie/M555_CalibAna