CMS 3D CMS Logo

lst.cc
Go to the documentation of this file.
1 #include "lst.h"
2 
3 #include <typeinfo>
4 
6 using namespace ::lst;
7 
8 //___________________________________________________________________________________________________________________________________________________________________________________________
9 int main(int argc, char **argv) {
10  //********************************************************************************
11  //
12  // 0. Preliminary operations
13  //
14  //********************************************************************************
15 
16  // Checking the TRACKLOOPERDIR is set
17  ana.track_looper_dir_path = gSystem->Getenv("TRACKLOOPERDIR");
18  if (ana.track_looper_dir_path.IsNull()) {
20  "TRACKLOOPERDIR is not set! Did you run $ source setup.sh from TrackLooper/ main repository directory?");
21  }
22  RooUtil::print(TString::Format("TRACKLOOPERDIR=%s", ana.track_looper_dir_path.Data()));
23 
24  // Write the command line used to run it
25  // N.B. This needs to be before the argument parsing as it will change some values
26  std::vector<std::string> allArgs(argv, argv + argc);
27  ana.full_cmd_line = "";
28  for (auto &str : allArgs) {
29  ana.full_cmd_line += TString::Format(" %s", str.c_str());
30  }
31 
32  //********************************************************************************
33  //
34  // 1. Parsing options
35  //
36  //********************************************************************************
37 
38  // cxxopts is just a tool to parse argc, and argv easily
39 
40  // Grand option setting
41  cxxopts::Options options("\n $ lst",
42  "\n **********************\n * *\n * "
43  "Looper *\n * *\n **********************\n");
44 
45  // Read the options
46  options.add_options()("m,mode", "Run mode (NOT DEFINED)", cxxopts::value<int>()->default_value("5"))(
47  "i,input",
48  "Comma separated input file list OR if just a directory is provided it will glob all in the directory BUT must "
49  "end with '/' for the path",
50  cxxopts::value<std::string>()->default_value("muonGun"))(
51  "t,tree",
52  "Name of the tree in the root file to open and loop over",
53  cxxopts::value<std::string>()->default_value("trackingNtuple/tree"))(
54  "o,output", "Output file name", cxxopts::value<std::string>())(
55  "N,nmatch", "N match for MTV-like matching", cxxopts::value<int>()->default_value("9"))(
56  "n,nevents", "N events to loop over", cxxopts::value<int>()->default_value("-1"))(
57  "x,event_index", "specific event index to process", cxxopts::value<int>()->default_value("-1"))(
58  "g,pdg_id", "The simhit pdgId match option", cxxopts::value<int>()->default_value("0"))(
59  "v,verbose",
60  "Verbose mode (0: no print, 1: only final timing, 2: object multiplitcity",
61  cxxopts::value<int>()->default_value("0"))(
62  "w,write_ntuple", "Write Ntuple", cxxopts::value<int>()->default_value("1"))(
63  "s,streams", "Set number of streams", cxxopts::value<int>()->default_value("1"))(
64  "d,debug", "Run debug job. i.e. overrides output option to 'debug.root' and 'recreate's the file.")(
65  "l,lower_level", "write lower level objects ntuple results")("G,gnn_ntuple", "write gnn input variable ntuple")(
66  "j,nsplit_jobs", "Enable splitting jobs by N blocks (--job_index must be set)", cxxopts::value<int>())(
67  "I,job_index",
68  "job_index of split jobs (--nsplit_jobs must be set. index starts from 0. i.e. 0, 1, 2, 3, etc...)",
69  cxxopts::value<int>())("3,tc_pls_triplets", "Allow triplet pLSs in TC collection")(
70  "2,no_pls_dupclean", "Disable pLS duplicate cleaning (both steps)")("h,help", "Print help");
71 
72  auto result = options.parse(argc, argv);
73 
74  // NOTE: When an option was provided (e.g. -i or --input), then the result.count("<option name>") is more than 0
75  // Therefore, the option can be parsed easily by asking the condition if (result.count("<option name>");
76  // That's how the several options are parsed below
77 
78  //_______________________________________________________________________________
79  // --help
80  if (result.count("help")) {
81  std::cout << options.help() << std::endl;
82  exit(1);
83  }
84 
85  //_______________________________________________________________________________
86  // --input
87  ana.input_raw_string = result["input"].as<std::string>();
88 
89  // A default value one
90  TString TrackingNtupleDir = gSystem->Getenv("TRACKINGNTUPLEDIR");
91  if (ana.input_raw_string.EqualTo("muonGun"))
92  ana.input_file_list_tstring = TString::Format("%s/trackingNtuple_10mu_pt_0p5_2.root", TrackingNtupleDir.Data());
93  else if (ana.input_raw_string.EqualTo("muonGun_highPt"))
94  ana.input_file_list_tstring = TString::Format("%s/trackingNtuple_10mu_pt_0p5_50.root", TrackingNtupleDir.Data());
95  else if (ana.input_raw_string.EqualTo("pionGun"))
97  TString::Format("%s/trackingNtuple_6pion_1k_pt_0p5_50.root", TrackingNtupleDir.Data());
98  else if (ana.input_raw_string.EqualTo("PU200"))
99  ana.input_file_list_tstring = TString::Format("%s/trackingNtuple_ttbar_PU200.root", TrackingNtupleDir.Data());
100  else if (ana.input_raw_string.EqualTo("PU200RelVal"))
101  ana.input_file_list_tstring = TString::Format(
102  "%s/RelValTTbar_14TeV_CMSSW_12_5_0_pre3/",
103  (TrackingNtupleDir.Replace(31, 1, "5").Replace(38, 1, "3"))
104  .Data()); // RelVal files under CMSSW_12_5_0_pre3 directory, not CMSSW_12_2_0_pre2 as is the case for the rest of the samples
105  else if (ana.input_raw_string.EqualTo("cube5"))
107  TString::Format("%s/trackingNtuple_10mu_10k_pt_0p5_2_5cm_cube.root", TrackingNtupleDir.Data());
108  else if (ana.input_raw_string.EqualTo("cube5_highPt"))
110  TString::Format("%s/trackingNtuple_10mu_10k_pt_0p5_50_5cm_cube.root", TrackingNtupleDir.Data());
111  else if (ana.input_raw_string.EqualTo("cube50"))
113  TString::Format("%s/trackingNtuple_10mu_10k_pt_0p5_2_50cm_cube.root", TrackingNtupleDir.Data());
114  else if (ana.input_raw_string.EqualTo("cube50_highPt"))
116  TString::Format("%s/trackingNtuple_10mu_10k_pt_0p5_50_50cm_cube.root", TrackingNtupleDir.Data());
117  else {
119  }
120 
121  //_______________________________________________________________________________
122  // --tree
123  ana.input_tree_name = result["tree"].as<std::string>();
124 
125  //_______________________________________________________________________________
126  // --debug
127  if (result.count("debug")) {
128  ana.output_tfile = new TFile("debug.root", "recreate");
129  } else {
130  //_______________________________________________________________________________
131  // --output
132  if (result.count("output")) {
133  ana.output_tfile = new TFile(result["output"].as<std::string>().c_str(), "create");
134  if (not ana.output_tfile->IsOpen()) {
135  std::cout << options.help() << std::endl;
136  std::cout << "ERROR: output already exists! provide new output name or delete old file. OUTPUTFILE="
137  << result["output"].as<std::string>() << std::endl;
138  exit(1);
139  }
140  } else {
141  std::cout
142  << "Warning: Output file name is not provided! Check your arguments. Output file will be set to 'debug.root'"
143  << std::endl;
144  ana.output_tfile = new TFile("debug.root", "recreate");
145  }
146  }
147 
148  //_______________________________________________________________________________
149  // --nmatch
150  ana.nmatch_threshold = result["nmatch"].as<int>();
151 
152  //_______________________________________________________________________________
153  // --nevents
154  ana.n_events = result["nevents"].as<int>();
155  ana.specific_event_index = result["event_index"].as<int>();
156 
157  //_______________________________________________________________________________
158  // --pdg_id
159  ana.pdg_id = result["pdg_id"].as<int>();
160 
161  //_______________________________________________________________________________
162  // --nsplit_jobs
163  if (result.count("nsplit_jobs")) {
164  ana.nsplit_jobs = result["nsplit_jobs"].as<int>();
165  if (ana.nsplit_jobs <= 0) {
166  std::cout << options.help() << std::endl;
167  std::cout << "ERROR: option string --nsplit_jobs" << ana.nsplit_jobs << " has zero or negative value!"
168  << std::endl;
169  std::cout << "I am not sure what this means..." << std::endl;
170  exit(1);
171  }
172  } else {
173  ana.nsplit_jobs = -1;
174  }
175 
176  //_______________________________________________________________________________
177  // --job_index
178  if (result.count("job_index")) {
179  ana.job_index = result["job_index"].as<int>();
180  if (ana.job_index < 0) {
181  std::cout << options.help() << std::endl;
182  std::cout << "ERROR: option string --job_index" << ana.job_index << " has negative value!" << std::endl;
183  std::cout << "I am not sure what this means..." << std::endl;
184  exit(1);
185  }
186  } else {
187  ana.job_index = -1;
188  }
189 
190  // Sanity check for split jobs (if one is set the other must be set too)
191  if (result.count("job_index") or result.count("nsplit_jobs")) {
192  // If one is not provided then throw error
193  if (not(result.count("job_index") and result.count("nsplit_jobs"))) {
194  std::cout << options.help() << std::endl;
195  std::cout << "ERROR: option string --job_index and --nsplit_jobs must be set at the same time!" << std::endl;
196  exit(1);
197  }
198  // If it is set then check for sanity
199  else {
200  if (ana.job_index >= ana.nsplit_jobs) {
201  std::cout << options.help() << std::endl;
202  std::cout << "ERROR: --job_index >= --nsplit_jobs ! This does not make sense..." << std::endl;
203  exit(1);
204  }
205  }
206  }
207 
208  //_______________________________________________________________________________
209  // --verbose
210  ana.verbose = result["verbose"].as<int>();
211 
212  //_______________________________________________________________________________
213  // --streams
214  ana.streams = result["streams"].as<int>();
215 
216  //_______________________________________________________________________________
217  // --mode
218  ana.mode = result["mode"].as<int>();
219 
220  //_______________________________________________________________________________
221  // --write_ntuple
222  ana.do_write_ntuple = result["write_ntuple"].as<int>();
223 
224  //_______________________________________________________________________________
225  // --optimization
226 
227  //_______________________________________________________________________________
228  // --lower_level
229  if (result.count("lower_level")) {
230  ana.do_lower_level = true;
231  } else {
232  ana.do_lower_level = false;
233  }
234 
235  //_______________________________________________________________________________
236  // --gnn_ntuple
237  if (result.count("gnn_ntuple")) {
238  ana.gnn_ntuple = true;
239  // If one is not provided then throw error
240  if (not ana.do_write_ntuple) {
241  std::cout << options.help() << std::endl;
242  std::cout << "ERROR: option string --write_ntuple 1 and --gnn_ntuple must be set at the same time!" << std::endl;
243  exit(1);
244  }
245  } else {
246  ana.gnn_ntuple = false;
247  }
248 
249  //_______________________________________________________________________________
250  // --tc_pls_triplets
251  ana.tc_pls_triplets = result["tc_pls_triplets"].as<bool>();
252 
253  //_______________________________________________________________________________
254  // --no_pls_dupclean
255  ana.no_pls_dupclean = result["no_pls_dupclean"].as<bool>();
256 
257  // Printing out the option settings overview
258  std::cout << "=========================================================" << std::endl;
259  std::cout << " Running for Acc = " << alpaka::getAccName<ALPAKA_ACCELERATOR_NAMESPACE::Acc3D>() << std::endl;
260  std::cout << " Setting of the analysis job based on provided arguments " << std::endl;
261  std::cout << "---------------------------------------------------------" << std::endl;
262  std::cout << " ana.input_file_list_tstring: " << ana.input_file_list_tstring << std::endl;
263  std::cout << " ana.output_tfile: " << ana.output_tfile->GetName() << std::endl;
264  std::cout << " ana.n_events: " << ana.n_events << std::endl;
265  std::cout << " ana.nsplit_jobs: " << ana.nsplit_jobs << std::endl;
266  std::cout << " ana.job_index: " << ana.job_index << std::endl;
267  std::cout << " ana.specific_event_index: " << ana.specific_event_index << std::endl;
268  std::cout << " ana.do_write_ntuple: " << ana.do_write_ntuple << std::endl;
269  std::cout << " ana.mode: " << ana.mode << std::endl;
270  std::cout << " ana.streams: " << ana.streams << std::endl;
271  std::cout << " ana.verbose: " << ana.verbose << std::endl;
272  std::cout << " ana.nmatch_threshold: " << ana.nmatch_threshold << std::endl;
273  std::cout << " ana.tc_pls_triplets: " << ana.tc_pls_triplets << std::endl;
274  std::cout << " ana.no_pls_dupclean: " << ana.no_pls_dupclean << std::endl;
275  std::cout << "=========================================================" << std::endl;
276 
277  // Create the TChain that holds the TTree's of the baby ntuples
280  ana.looper.setSilent();
281 
282  // Set the cutflow object output file
284 
285  // Create ttree to output to the ana.output_tfile
286  ana.output_ttree = new TTree("tree", "tree");
287 
288  // Create TTreeX instance that will take care of the interface part of TTree
290 
291  // Write metadata related to this run
292  writeMetaData();
293 
294  // Run the code
295  run_lst();
296 
297  return 0;
298 }
299 
300 //___________________________________________________________________________________________________________________________________________________________________________________________
301 void run_lst() {
302  ALPAKA_ACCELERATOR_NAMESPACE::Device devAcc = alpaka::getDevByIdx(ALPAKA_ACCELERATOR_NAMESPACE::Platform{}, 0u);
303  std::vector<ALPAKA_ACCELERATOR_NAMESPACE::Queue> queues;
304  for (int s = 0; s < ana.streams; s++) {
305  queues.push_back(ALPAKA_ACCELERATOR_NAMESPACE::Queue(devAcc));
306  }
307 
308  // Load various maps used in the lst reconstruction
309  TStopwatch full_timer;
310  full_timer.Start();
311  auto hostESData = lst::loadAndFillESHost();
312  auto deviceESData =
314  float timeForMapLoading = full_timer.RealTime() * 1000;
315 
316  if (ana.do_write_ntuple) {
318  if (ana.gnn_ntuple) {
320  }
321  }
322 
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;
347  std::vector<TString> file_name;
348 
349  // Looping input file
350  full_timer.Reset();
351  full_timer.Start();
352  while (ana.looper.nextEvent()) {
353  if (ana.verbose >= 1)
354  std::cout << "PreLoading event number = " << ana.looper.getCurrentEventIndex() << std::endl;
355 
356  if (not goodEvent())
357  continue;
358 
360  out_trkY,
361  out_trkZ,
362  out_hitId,
363  out_hitIdxs,
364  out_hitIndices_vec0,
365  out_hitIndices_vec1,
366  out_hitIndices_vec2,
367  out_hitIndices_vec3,
368  out_deltaPhi_vec,
369  out_ptIn_vec,
370  out_ptErr_vec,
371  out_px_vec,
372  out_py_vec,
373  out_pz_vec,
374  out_eta_vec,
375  out_etaErr_vec,
376  out_phi_vec,
377  out_charge_vec,
378  out_seedIdx_vec,
379  out_superbin_vec,
380  out_pixelType_vec,
381  out_isQuad_vec);
382  evt_num.push_back(ana.looper.getCurrentEventIndex());
383  file_name.push_back(ana.looper.getCurrentFileName());
384  }
385  float timeForInputLoading = full_timer.RealTime() * 1000;
386 
387  full_timer.Reset();
388  full_timer.Start();
389  std::vector<LSTEvent *> events;
390  for (int s = 0; s < ana.streams; s++) {
391  LSTEvent *event = new LSTEvent(ana.verbose >= 2, queues[s], &deviceESData);
392  events.push_back(event);
393  }
394  float timeForEventCreation = full_timer.RealTime() * 1000;
395 
396  std::vector<std::vector<float>> timevec;
397  full_timer.Reset();
398  full_timer.Start();
399  float full_elapsed = 0;
400 #pragma omp parallel num_threads(ana.streams) // private(event)
401  {
402  std::vector<std::vector<float>> timing_information;
403  float timing_input_loading;
404  float timing_MD;
405  float timing_LS;
406  float timing_T3;
407  float timing_T5;
408  float timing_pLS;
409  float timing_pT5;
410  float timing_pT3;
411  float timing_TC;
412 
413 #pragma omp for // nowait// private(event)
414  for (int evt = 0; evt < static_cast<int>(out_trkX.size()); evt++) {
415  if (ana.verbose >= 1)
416  std::cout << "Running Event number = " << evt << " " << omp_get_thread_num() << std::endl;
417 
418  events.at(omp_get_thread_num())->initSync();
419  timing_input_loading = addInputsToEventPreLoad(events.at(omp_get_thread_num()),
420  false,
421  out_trkX.at(evt),
422  out_trkY.at(evt),
423  out_trkZ.at(evt),
424  out_hitId.at(evt),
425  out_hitIdxs.at(evt),
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),
433  out_px_vec.at(evt),
434  out_py_vec.at(evt),
435  out_pz_vec.at(evt),
436  out_eta_vec.at(evt),
437  out_etaErr_vec.at(evt),
438  out_phi_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));
444 
445  timing_MD = runMiniDoublet(events.at(omp_get_thread_num()), evt);
446  timing_LS = runSegment(events.at(omp_get_thread_num()));
447  timing_T3 = runT3(events.at(omp_get_thread_num()));
448  timing_T5 = runQuintuplet(events.at(omp_get_thread_num()));
449  timing_pLS = runPixelLineSegment(events.at(omp_get_thread_num()), ana.no_pls_dupclean);
450  timing_pT5 = runPixelQuintuplet(events.at(omp_get_thread_num()));
451  timing_pT3 = runpT3(events.at(omp_get_thread_num()));
452  timing_TC = runTrackCandidate(events.at(omp_get_thread_num()), ana.no_pls_dupclean, ana.tc_pls_triplets);
453 
454  if (ana.verbose == 4) {
455 #pragma omp critical
456  {
457  // TODO BROKEN //
458  // printAllObjects(events.at(omp_get_thread_num()));
459  }
460  }
461 
462  if (ana.verbose == 5) {
463 #pragma omp critical
464  {
465  // TODO: debugPrintOutlierMultiplicities
466  }
467  }
468 
469  if (ana.do_write_ntuple) {
470 #pragma omp critical
471  {
472  unsigned int trkev = evt_num.at(evt);
473  TString fname = file_name.at(evt);
474  TFile *f = TFile::Open(fname.Data(), "open");
475  TTree *t = (TTree *)f->Get(ana.input_tree_name.Data());
476  trk.Init(t);
477  trk.GetEntry(trkev);
478  fillOutputBranches(events.at(omp_get_thread_num()));
479  f->Close();
480  }
481  }
482 
483  // Clear this event
484  TStopwatch my_timer;
485  my_timer.Start();
486  events.at(omp_get_thread_num())->resetEventSync();
487  float timing_resetEvent = my_timer.RealTime();
488 
489  timing_information.push_back({timing_input_loading,
490  timing_MD,
491  timing_LS,
492  timing_T3,
493  timing_T5,
494  timing_pLS,
495  timing_pT5,
496  timing_pT3,
497  timing_TC,
498  timing_resetEvent});
499  }
500 
501  full_elapsed =
502  full_timer.RealTime() *
503  1000.f; // for loop has implicit barrier I think. So this stops onces all cpu threads have finished but before the next critical section.
504 #pragma omp critical
505  timevec.insert(timevec.end(), timing_information.begin(), timing_information.end());
506  }
507 
508  float avg_elapsed = full_elapsed / out_trkX.size();
509 
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";
513  printTimingInformation(timevec, full_elapsed, avg_elapsed);
514 
515  if (ana.do_write_ntuple) {
516  // Writing ttree output to file
517  ana.output_tfile->cd();
519  ana.output_ttree->Write();
520  }
521 
522  for (int s = 0; s < ana.streams; s++) {
523  delete events.at(s);
524  }
525 
526  delete ana.output_tfile;
527 }
RooUtil::TTreeX * tx
void GetEntry(unsigned int idx)
Definition: Trktree.cc:2131
void printTimingInformation(std::vector< std::vector< float >> &timing_information, float fullTime, float fullavg)
Definition: trkCore.cc:909
void print(TString msg="", const char *fname="", int flush_before=0, int flush_after=0)
Definition: printutil.cc:23
void saveOutput()
Definition: anautil.cc:308
int main(int argc, char **argv)
Definition: lst.cc:9
void writeMetaData()
Definition: trkCore.cc:1077
AnalysisConfig ana
RooUtil::Cutflow cutflow
Definition: Common.h:15
Trktree trk
Definition: Trktree.cc:2
void init(TChain *chain, TREECLASS *treeclass, int nEventsToProcess)
Definition: looper.h:245
ALPAKA_ACCELERATOR_NAMESPACE::lst::LSTEvent LSTEvent
Definition: lst.cc:5
float runTrackCandidate(LSTEvent *event, bool no_pls_dupclean, bool tc_pls_triplets)
Definition: trkCore.cc:251
ALPAKA_ACCELERATOR_NAMESPACE::Device Device
Definition: LSTEvent.dev.cc:13
void error(TString msg, const char *fname="", int is_error=1)
Definition: printutil.cc:44
float runT3(LSTEvent *event)
Definition: trkCore.cc:114
float runQuintuplet(LSTEvent *event)
Definition: trkCore.cc:173
TChain * events_tchain
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)
Definition: trkCore.cc:592
ALPAKA_ACCELERATOR_NAMESPACE::Queue Queue
Definition: LSTEvent.dev.cc:14
std::unique_ptr< LSTESData< alpaka_common::DevHost > > loadAndFillESHost()
Definition: LSTESData.cc:81
void fillOutputBranches(LSTEvent *event)
TString input_tree_name
bool goodEvent()
Definition: trkCore.cc:4
void createOutputBranches()
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
void setTFile(TFile *o)
Definition: anautil.h:148
RooUtil::Looper< Trktree > looper
float runPixelQuintuplet(LSTEvent *event)
Definition: trkCore.cc:234
TString track_looper_dir_path
void copyAsync(device::unique_ptr< T > &dst, const host::unique_ptr< T > &src, cudaStream_t stream)
Definition: copyAsync.h:20
double f[11][100]
TString input_raw_string
TTree * output_ttree
void run_lst()
Definition: lst.cc:301
TString input_file_list_tstring
TString full_cmd_line
float runpT3(LSTEvent *event)
Definition: trkCore.cc:156
void createGnnNtupleBranches()
void Init(TTree *tree)
Definition: Trktree.cc:4
TFile * output_tfile
string fname
main script
TChain * createTChain(TString, TString)
Definition: fileutil.cc:6
float runSegment(LSTEvent *event)
Definition: trkCore.cc:76
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)
Definition: trkCore.cc:846
void setSilent(bool s=true)
Definition: looper.h:106
float runMiniDoublet(LSTEvent *event, int evt)
Definition: trkCore.cc:23
#define str(s)
float runPixelLineSegment(LSTEvent *event, bool no_pls_dupclean)
Definition: trkCore.cc:219
TString getCurrentFileName()
Definition: looper.h:125
bool nextEvent()
Definition: looper.h:526
int events
Definition: event.py:1
def exit(msg="")
unsigned int getCurrentEventIndex()
Definition: looper.h:122