103 const auto msg = TString::Format(
105 std::cout << msg <<
"\r" << std::flush;
118 LOG(debug) <<
"R3BNeulandCal2HitPar::Exec: Event " <<
fEventNumber - 1;
123 LOG(debug) <<
" Event cannot be used: too few signals : " << nItems <<
"!";
130 Int_t addedPoints = 0;
132 for (Int_t i = 0; i < nItems; i++)
136 const auto id = pmt->
GetBarId() - 1;
137 const auto side = pmt->GetSide() - 1;
139 if (std::isnan(pmt->GetTriggerTime()))
145 fHitCalEngine->Set(
id, side, pmt->GetTime() - pmt->GetTriggerTime(), pmt->GetQdc());
159 LOG(debug) <<
" Event cannot be used: too few Points : " << addedPoints <<
" (" << nItems <<
")!";
167 if (cosmicTrack.Interactions.size() == 0)
169 LOG(debug) <<
" Getting Cosmic Track : Failure!";
173 LOG(debug) <<
" Getting Cosmic Track: Success!";
176 LOG(debug) <<
" Adding data to calibration";
182 LOG(info) <<
"R3BNeulandCal2HitPar::FinishTask: " <<
"Saved " <<
fAcceptedEventNumber <<
" Events.";
184 LOG(info) <<
"R3BNeulandCal2HitPar::FinishTask: " <<
"Starting Neuland Hit Calibration with "
187 const auto batchMode = gROOT->IsBatch();
188 gROOT->SetBatch(kTRUE);
189 const auto defdir = gDirectory;
191 TDirectory* neulandDir =
nullptr;
193 neulandDir = defdir->mkdir(
"NeuLAND");
198 gROOT->SetBatch(batchMode);
202 auto maxThreshold = 0.;
203 for (
auto& parameter : parameters)
207 for (
auto side = 1; side <= 2; ++side)
209 const auto threshold =
210 parameter.GetPMTThreshold(side) * exp(
TotalBarLength / parameter.GetLightAttenuationLength());
211 if (threshold > maxThreshold)
212 maxThreshold = threshold;
217 LOG(info) << TString::Format(
"R3BNeulandCal2HitPar::FinishTask: Recommended Minimum Energy Cutoff : >%4.2f MeV\n",
222 LOG(info) <<
"R3BNeulandCal2HitPar::FinishTask: " <<
"Number of calibrated Bars: "