303 std::vector<ALPAKA_ACCELERATOR_NAMESPACE::Queue> queues;
309 TStopwatch full_timer;
314 float timeForMapLoading = full_timer.RealTime() * 1000;
323 std::vector<std::vector<float>> out_trkX;
324 std::vector<std::vector<float>> out_trkY;
325 std::vector<std::vector<float>> out_trkZ;
326 std::vector<std::vector<unsigned int>> out_hitId;
327 std::vector<std::vector<unsigned int>> out_hitIdxs;
328 std::vector<std::vector<unsigned int>> out_hitIndices_vec0;
329 std::vector<std::vector<unsigned int>> out_hitIndices_vec1;
330 std::vector<std::vector<unsigned int>> out_hitIndices_vec2;
331 std::vector<std::vector<unsigned int>> out_hitIndices_vec3;
332 std::vector<std::vector<float>> out_deltaPhi_vec;
333 std::vector<std::vector<float>> out_ptIn_vec;
334 std::vector<std::vector<float>> out_ptErr_vec;
335 std::vector<std::vector<float>> out_px_vec;
336 std::vector<std::vector<float>> out_py_vec;
337 std::vector<std::vector<float>> out_pz_vec;
338 std::vector<std::vector<float>> out_eta_vec;
339 std::vector<std::vector<float>> out_etaErr_vec;
340 std::vector<std::vector<float>> out_phi_vec;
341 std::vector<std::vector<int>> out_charge_vec;
342 std::vector<std::vector<unsigned int>> out_seedIdx_vec;
343 std::vector<std::vector<int>> out_superbin_vec;
344 std::vector<std::vector<PixelType>> out_pixelType_vec;
345 std::vector<std::vector<char>> out_isQuad_vec;
346 std::vector<int> evt_num;
385 float timeForInputLoading = full_timer.RealTime() * 1000;
389 std::vector<LSTEvent *>
events;
394 float timeForEventCreation = full_timer.RealTime() * 1000;
396 std::vector<std::vector<float>> timevec;
399 float full_elapsed = 0;
400 #pragma omp parallel num_threads(ana.streams) // private(event) 402 std::vector<std::vector<float>> timing_information;
403 float timing_input_loading;
413 #pragma omp for // nowait// private(event) 414 for (
int evt = 0; evt < static_cast<int>(out_trkX.size()); evt++) {
416 std::cout <<
"Running Event number = " << evt <<
" " << omp_get_thread_num() << std::endl;
418 events.at(omp_get_thread_num())->initSync();
426 out_hitIndices_vec0.at(evt),
427 out_hitIndices_vec1.at(evt),
428 out_hitIndices_vec2.at(evt),
429 out_hitIndices_vec3.at(evt),
430 out_deltaPhi_vec.at(evt),
431 out_ptIn_vec.at(evt),
432 out_ptErr_vec.at(evt),
437 out_etaErr_vec.at(evt),
439 out_charge_vec.at(evt),
440 out_seedIdx_vec.at(evt),
441 out_superbin_vec.at(evt),
442 out_pixelType_vec.at(evt),
443 out_isQuad_vec.at(evt));
447 timing_T3 =
runT3(
events.at(omp_get_thread_num()));
472 unsigned int trkev = evt_num.at(evt);
474 TFile *
f = TFile::Open(
fname.Data(),
"open");
486 events.at(omp_get_thread_num())->resetEventSync();
487 float timing_resetEvent = my_timer.RealTime();
489 timing_information.push_back({timing_input_loading,
502 full_timer.RealTime() *
505 timevec.insert(timevec.end(), timing_information.begin(), timing_information.end());
508 float avg_elapsed = full_elapsed / out_trkX.size();
510 std::cout <<
"Time for map loading = " << timeForMapLoading <<
" ms\n";
511 std::cout <<
"Time for input loading = " << timeForInputLoading <<
" ms\n";
512 std::cout <<
"Time for event creation = " << timeForEventCreation <<
" ms\n";
void GetEntry(unsigned int idx)
void printTimingInformation(std::vector< std::vector< float >> &timing_information, float fullTime, float fullavg)
ALPAKA_ACCELERATOR_NAMESPACE::lst::LSTEvent LSTEvent
float runTrackCandidate(LSTEvent *event, bool no_pls_dupclean, bool tc_pls_triplets)
ALPAKA_ACCELERATOR_NAMESPACE::Device Device
float runT3(LSTEvent *event)
float runQuintuplet(LSTEvent *event)
void addInputsToLineSegmentTrackingPreLoad(std::vector< std::vector< float >> &out_trkX, std::vector< std::vector< float >> &out_trkY, std::vector< std::vector< float >> &out_trkZ, std::vector< std::vector< unsigned int >> &out_hitId, std::vector< std::vector< unsigned int >> &out_hitIdxs, std::vector< std::vector< unsigned int >> &out_hitIndices_vec0, std::vector< std::vector< unsigned int >> &out_hitIndices_vec1, std::vector< std::vector< unsigned int >> &out_hitIndices_vec2, std::vector< std::vector< unsigned int >> &out_hitIndices_vec3, std::vector< std::vector< float >> &out_deltaPhi_vec, std::vector< std::vector< float >> &out_ptIn_vec, std::vector< std::vector< float >> &out_ptErr_vec, std::vector< std::vector< float >> &out_px_vec, std::vector< std::vector< float >> &out_py_vec, std::vector< std::vector< float >> &out_pz_vec, std::vector< std::vector< float >> &out_eta_vec, std::vector< std::vector< float >> &out_etaErr_vec, std::vector< std::vector< float >> &out_phi_vec, std::vector< std::vector< int >> &out_charge_vec, std::vector< std::vector< unsigned int >> &out_seedIdx_vec, std::vector< std::vector< int >> &out_superbin_vec, std::vector< std::vector< PixelType >> &out_pixelType_vec, std::vector< std::vector< char >> &out_isQuad_vec)
ALPAKA_ACCELERATOR_NAMESPACE::Queue Queue
std::unique_ptr< LSTESData< alpaka_common::DevHost > > loadAndFillESHost()
void fillOutputBranches(LSTEvent *event)
void createOutputBranches()
RooUtil::Looper< Trktree > looper
float runPixelQuintuplet(LSTEvent *event)
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
float runpT3(LSTEvent *event)
void createGnnNtupleBranches()
float runSegment(LSTEvent *event)
float addInputsToEventPreLoad(LSTEvent *event, bool useOMP, std::vector< float > trkX, std::vector< float > trkY, std::vector< float > trkZ, std::vector< unsigned int > hitId, std::vector< unsigned int > hitIdxs, std::vector< unsigned int > hitIndices_vec0, std::vector< unsigned int > hitIndices_vec1, std::vector< unsigned int > hitIndices_vec2, std::vector< unsigned int > hitIndices_vec3, std::vector< float > deltaPhi_vec, std::vector< float > ptIn_vec, std::vector< float > ptErr_vec, std::vector< float > px_vec, std::vector< float > py_vec, std::vector< float > pz_vec, std::vector< float > eta_vec, std::vector< float > etaErr_vec, std::vector< float > phi_vec, std::vector< int > charge_vec, std::vector< unsigned int > seedIdx_vec, std::vector< int > superbin_vec, std::vector< PixelType > pixelType_vec, std::vector< char > isQuad_vec)
float runMiniDoublet(LSTEvent *event, int evt)
float runPixelLineSegment(LSTEvent *event, bool no_pls_dupclean)
TString getCurrentFileName()
unsigned int getCurrentEventIndex()