@@ -56,6 +56,7 @@ int main(int argc, char **argv) {
5656 " o,output" , " Output file name" , cxxopts::value<std::string>())(
5757 " N,nmatch" , " N match for MTV-like matching" , cxxopts::value<int >()->default_value (" 9" ))(
5858 " p,ptCut" , " Min pT cut In GeV" , cxxopts::value<float >()->default_value (" 0.8" ))(
59+ " c,clustSizeCut" , " Max cluster size cut" , cxxopts::value<uint16_t >()->default_value (" 16" ))(
5960 " n,nevents" , " N events to loop over" , cxxopts::value<int >()->default_value (" -1" ))(
6061 " x,event_index" , " specific event index to process" , cxxopts::value<int >()->default_value (" -1" ))(
6162 " g,pdg_id" , " The simhit pdgId match option" , cxxopts::value<int >()->default_value (" 0" ))(
@@ -161,6 +162,10 @@ int main(int argc, char **argv) {
161162 // --ptCut
162163 ana.ptCut = result[" ptCut" ].as <float >();
163164
165+ // _______________________________________________________________________________
166+ // --clustSizeCut
167+ ana.clustSizeCut = result[" clustSizeCut" ].as <uint16_t >();
168+
164169 // _______________________________________________________________________________
165170 // --nmatch
166171 ana.nmatch_threshold = result[" nmatch" ].as <int >();
@@ -312,6 +317,8 @@ int main(int argc, char **argv) {
312317 std::cout << " ana.input_file_list_tstring: " << ana.input_file_list_tstring << std::endl;
313318 std::cout << " ana.output_tfile: " << ana.output_tfile ->GetName () << std::endl;
314319 std::cout << " ana.n_events: " << ana.n_events << std::endl;
320+ std::cout << " ana.ptCut: " << ana.ptCut << std::endl;
321+ std::cout << " ana.clustSizeCut: " << ana.clustSizeCut << std::endl;
315322 std::cout << " ana.nsplit_jobs: " << ana.nsplit_jobs << std::endl;
316323 std::cout << " ana.job_index: " << ana.job_index << std::endl;
317324 std::cout << " ana.specific_event_index: " << ana.specific_event_index << std::endl;
@@ -373,6 +380,12 @@ void run_lst() {
373380 std::vector<int > evt_num;
374381 std::vector<TString> file_name;
375382
383+ // Backwards compatibility
384+ const auto hasClustSize = trk.contains (" ph2_clustSize" );
385+ if (ana.verbose >= 1 ) {
386+ std::cout << " hasClustSize = " << hasClustSize << std::endl;
387+ }
388+
376389 // Looping input file
377390 full_timer.Reset ();
378391 full_timer.Start ();
@@ -383,6 +396,10 @@ void run_lst() {
383396 if (not goodEvent ())
384397 continue ;
385398
399+ // Backwards compatibility
400+ const auto trk_ph2_clustSize =
401+ hasClustSize ? trk.getVUS (" ph2_clustSize" ) : std::vector<uint16_t >(trk.getVF (" ph2_x" ).size ());
402+
386403 auto lstInputHC = prepareInput (trk.getVF (" see_px" ),
387404 trk.getVF (" see_py" ),
388405 trk.getVF (" see_pz" ),
@@ -400,6 +417,7 @@ void run_lst() {
400417 trk.getVVI (" see_hitIdx" ),
401418 trk.getVU (" see_algo" ),
402419 trk.getVU (" ph2_detId" ),
420+ trk_ph2_clustSize,
403421 trk.getVF (" ph2_x" ),
404422 trk.getVF (" ph2_y" ),
405423 trk.getVF (" ph2_z" ),
@@ -418,7 +436,7 @@ void run_lst() {
418436 std::vector<LSTEvent *> events;
419437 std::vector<ALPAKA_ACCELERATOR_NAMESPACE::Queue *> event_queues;
420438 for (int s = 0 ; s < ana.streams ; s++) {
421- LSTEvent *event = new LSTEvent (ana.verbose >= 2 , ana.ptCut , queues[s], &deviceESData);
439+ LSTEvent *event = new LSTEvent (ana.verbose >= 2 , ana.ptCut , ana. clustSizeCut , queues[s], &deviceESData);
422440 events.push_back (event);
423441 event_queues.push_back (&queues[s]);
424442 }
0 commit comments