78 LOG(error) <<
"There are no TCal parameters in container LandTCalPar";
82 LOG(info) <<
"R3BNeulandMapped2Cal::Init : read " <<
fNofTcalPars <<
" calibrated modules";
84 FairRootManager* mgr = FairRootManager::Instance();
87 LOG(fatal) <<
"FairRootManager not found";
93 LOG(fatal) <<
"Branch R3BEventHeader not found";
96 fMapped =
dynamic_cast<TClonesArray*
>(mgr->GetObject(
"NeulandMappedData"));
99 LOG(fatal) <<
"Branch NeulandMapped not found";
101 fMappedTrigger =
dynamic_cast<TClonesArray*
>(mgr->GetObject(
"NeulandTrigMappedData"));
104 LOG(info) <<
"Branch NeulandTrigMapped not found";
107 mgr->Register(
"NeulandCalData",
"Neuland",
fCal, kTRUE);
110 htcal1 =
new TH2F(
"htcal1",
"htcal1", 800, 0.5, 800.5, 500, -1., 6.);
111 htcal2 =
new TH2F(
"htcal2",
"htcal2", 800, 0.5, 800.5, 500, -1., 6.);
112 htcal3 =
new TH2F(
"htcal3",
"htcal3", 800, 0.5, 800.5, 500, -1., 6.);
113 htcal4 =
new TH2F(
"htcal4",
"htcal4", 800, 0.5, 800.5, 500, -1., 6.);
197 std::vector<double> trig_map(13 *
fNofPlanes);
201 for (
int i = 0; i < nHits; ++i)
205 auto par =
fTcalPar->GetModuleParAt(100, iBar, 10);
210 auto time = par->GetTimeVFTX(mapped->fFineTime1LE);
214 nHits =
fMapped->GetEntriesFast();
216 R3BTCalModulePar* par;
222 for (Int_t ihit = 0; ihit < nHits; ihit++)
236 auto trig_i =
fMapPar->GetTrigMap(iPlane, iBar, iSide);
237 double trig_ns = NAN;
239 trig_ns = trig_map.at(trig_i);
249 LOG(info) <<
"R3BNeulandMapped2TCal::Exec : Plane number out of range: " << iPlane;
254 LOG(info) <<
"R3BNeulandMapped2TCal::Exec : Bar number out of range: " << iBar;
258 int edge = 2 * iSide - 1;
261 if (!(par =
fTcalPar->GetModuleParAt(iPlane, iBar, edge)))
263 LOG(debug) <<
"R3BNeulandTcal::Exec : Tcal par not found, barId: " << iBar <<
", side: " << iSide;
268 timeLE = par->GetTimeVFTX(tdc);
271 if (!(par =
fTcalPar->GetModuleParAt(iPlane, iBar, edge + 1)))
273 LOG(debug) <<
"R3BNeulandTcal::Exec : Tcal par not found, barId: " << iBar <<
", side: " << iSide;
278 timeTE = par->GetTimeVFTX(tdc);
282 LOG(error) <<
"R3BNeulandMapped2Tcal::Exec : error in time calibration: ch= " << iPlane << iBar << iSide
283 <<
", tdc= " << tdc <<
", time leading edge = " << timeLE <<
", time trailing edge = " << timeTE;
289 htcal1->Fill((iPlane - 1) * 50 + iBar, timeLE);
290 htcal2->Fill((iPlane - 1) * 50 + iBar, timeTE);
294 htcal3->Fill((iPlane - 1) * 50 + iBar, timeLE);
295 htcal4->Fill((iPlane - 1) * 50 + iBar, timeTE);
303 if (timeTE - timeLE < 0)
309 qdc = timeTE - timeLE;
317 LOG(debug2) <<
"tot: " << qdc <<
"lt: " << timeLE <<
"trigT: " << trig_ns <<
"\n";