28 for(
int det_num = 1; det_num <= 16; ++det_num) {
29 std::string aedet_str = Form(
"aEdet%d", det_num);
30 std::string gedet_str = Form(
"gEdet%d", det_num);
31 std::string ae2det_str = Form(
"aE2det%d", det_num);
32 fH1[slot][aedet_str] =
new TH1D(Form(
"aEdet%d", det_num), Form(
"Addback detector %d", det_num), 1500, 0, 1500);
33 fH1[slot][gedet_str] =
new TH1D(Form(
"geEdet%d", det_num), Form(
"Singles detector %d", det_num), 1500, 0, 1500);
34 fH1[slot][ae2det_str] =
new TH1D(Form(
"aE2det%d", det_num), Form(
"Addback with 2 hits, detector %d", det_num), 1500, 0, 1500);
35 for(
int crys_1 = 0; crys_1 < 4; ++crys_1) {
36 for(
int crys_2 = crys_1 + 1; crys_2 < 4; ++crys_2) {
37 std::string name_str = Form(
"det_%d_%d_%d", det_num, crys_1, crys_2);
38 const char* hist_name = name_str.c_str();
39 std::cout <<
"Creating histogram: " << hist_name;
40 fH2[slot][name_str] =
new TH2I(hist_name, hist_name, 1500, 0, 1500, 1500, 0, 1500);
41 std::cout <<
" at address: " <<
fH2[slot][hist_name] << std::endl;
46 fH1[slot][
"aMult"] =
new TH1D(
"aMult",
"addback multilpicity", 20, 0, 20);
47 fH2[slot][
"gE_chan"] =
new TH2D(
"gE_chan",
"gE_chan", 65, 0, 65, 1500, 0, 1500);
48 fH1[slot][
"aE"] =
new TH1D(
"aE",
"Summed Addback", 1500, 0, 1500);
49 fH1[slot][
"gE"] =
new TH1D(
"gE",
"Summed Singles", 1500, 0, 1500);
50 fH1[slot][
"gEnoCT"] =
new TH1D(
"gEnoCT",
"Singles, no CT correction", 1500, 0, 1500);
57 std::array<Int_t, 17> detMultiplicity = {0};
65 fH1[slot].at(Form(
"gEdet%d", grif1->GetDetector()))->Fill(grif1->GetEnergy());
66 fH2[slot].at(
"gE_chan")->Fill(grif1->GetArrayNumber(), grif1->GetEnergy());
67 fH1[slot].at(
"gE")->Fill(grif1->GetEnergy());
68 fH1[slot].at(
"gEnoCT")->Fill(grif1->GetNoCTEnergy());
72 if((detMultiplicity[grif1->GetDetector()] == 2) &&
Addback(grif1, grif2)) {
74 if(grif1->GetCrystal() < grif2->GetCrystal()) {
76 high_crys_hit = grif2;
79 high_crys_hit = grif1;
91 fH1[slot].at(
"aE")->Fill(grif1->GetEnergy());
92 fH1[slot].at(Form(
"aEdet%d", grif1->GetDetector()))->Fill(grif1->GetEnergy());