11 if(channel ==
nullptr || channel->GetClassType() != TTAC::Class()) {
14 fOffset[currentIndex] =
static_cast<double>(channel->GetTimeOffset());
16 std::cout <<
"Current TAC offset in the calfile: " <<
fOffset[currentIndex] <<
" for channel #" << channelNumber << std::endl;
22 for(
int i = 0; i <
fOffset.size(); ++i) {
23 fH1[slot][Form(
"TacOffset_%d", i)] =
new TH1D(Form(
"TacOffset_%d", i), Form(
"Time difference between TAC and LaBr %d; time (ns); counts/ns", i), 10000, -5000., 5000.);
24 fH1[slot][Form(
"TacOffsetCorrected_%d", i)] =
new TH1D(Form(
"TacOffsetCorrected_%d", i), Form(
"Time difference between TAC and LaBr %d, corrected by TAC offset; time (ns); counts/ns", i), 10000, -5000., 5000.);
25 fH1[slot][Form(
"TimeDiff_%d", i)] =
new TH1D(Form(
"TimeDiff_%d", i), Form(
"Time difference for LaBr %d - LaBr with TAC coincidence; time (ns); counts/ns", i), 10000, -5000., 5000.);
26 fH1[slot][Form(
"TimeDiffNoTac_%d", i)] =
new TH1D(Form(
"TimeDiffNoTac_%d", i), Form(
"Time difference for LaBr %d - LaBr without TAC coincidence required; time (ns); counts/ns", i), 10000, -5000., 5000.);
27 fH1[slot][Form(
"TimeStampDiff_%d", i)] =
new TH1D(Form(
"TimeStampDiff_%d", i), Form(
"Timestamp difference for LaBr %d - LaBr with TAC coincidence; time (ns); counts/ns", i), 1000, -5000., 5000.);
28 fH1[slot][Form(
"TimeStampDiffNoTac_%d", i)] =
new TH1D(Form(
"TimeStampDiffNoTac_%d", i), Form(
"Timestamp difference for LaBr %d - LaBr without TAC coincidence required; time (ns); counts/ns", i), 1000, -5000., 5000.);
30 fH1[slot][
"TimeStampDiffGriffin"] =
new TH1D(
"TimeStampDiffGriffin",
"Timestamp difference for HPGe - LaBr, with TAC coincidence; time (ns); counts/ns", 1000, -5000., 5000.);
31 fH1[slot][
"TimeDiffGriffin"] =
new TH1D(
"TimeDiffGriffin",
"Time difference for HPGe - LaBr, with TAC coincidence; time (ns); counts/ns", 10000, -5000., 5000.);
44 if(nofLaBr != 2) {
return; }
50 if(labr0->GetDetector() == labr1->GetDetector()) {
return; }
54 fH1[slot].at(Form(
"TimeDiffNoTac_%d", labr1->GetDetector() - 1))->Fill(labr1->GetTime() - labr0->GetTime());
55 fH1[slot].at(Form(
"TimeStampDiffNoTac_%d", labr1->GetDetector() - 1))->Fill(
static_cast<Double_t
>(labr1->GetTimeStampNs() - labr0->GetTimeStampNs()));
58 if(labr0->GetDetector() > labr1->GetDetector()) {
59 std::swap(labr0, labr1);
64 if(labr0->GetDetector() == tac0->GetDetector()) {
65 fH1[slot].at(Form(
"TacOffset_%d", tac0->GetDetector() - 1))->Fill(labr0->GetTime() - tac0->GetTime() -
fOffset[tac0->GetDetector() - 1]);
66 fH1[slot].at(Form(
"TacOffsetCorrected_%d", tac0->GetDetector() - 1))->Fill(labr0->GetTime() - tac0->GetTime());
67 fH1[slot].at(Form(
"TimeDiff_%d", labr1->GetDetector() - 1))->Fill(labr1->GetTime() - labr1->GetTime());
68 fH1[slot].at(Form(
"TimeStampDiff_%d", labr1->GetDetector() - 1))->Fill(
static_cast<Double_t
>(labr1->GetTimeStampNs() - labr0->GetTimeStampNs()));
69 for(
int i = 0; i < nofGrif; ++i) {
71 fH1[slot].at(
"TimeDiffGriffin")->Fill(grif1->GetTime() - labr0->GetTime());
72 fH1[slot].at(
"TimeStampDiffGriffin")->Fill(
static_cast<Double_t
>(grif1->GetTimeStampNs() - labr0->GetTimeStampNs()));