CMS 3D CMS Logo

Shell.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFitCMS_standalone_Shell_h
2 #define RecoTracker_MkFitCMS_standalone_Shell_h
3 
6 
7 #include <map>
8 
9 namespace mkfit {
10 
11  class DataFile;
12  class Event;
13  class EventOfHits;
14  class MkBuilder;
15 
16  class Shell {
17  public:
19 
20  Shell(std::vector<DeadVec> &dv, const std::string &in_file, int start_ev);
21  void Run();
22 
23  void Status();
24 
25  void GoToEvent(int eid);
26  void NextEvent(int skip = 1);
27  void ProcessEvent(SeedSelect_e seed_select = SS_UseAll, int selected_seed = -1, int count = 1);
28 
29  void SelectIterationIndex(int itidx);
30  void SelectIterationAlgo(int algo);
31  void PrintIterations();
32 
33  void SetDebug(bool b);
34  void SetCleanSeeds(bool b);
35  void SetBackwardFit(bool b);
36  void SetRemoveDuplicates(bool b);
37  void SetUseDeadModules(bool b);
38 
39  Event *event() { return m_event; }
40  EventOfHits *eoh() { return m_eoh; }
41  MkBuilder *builder() { return m_builder; }
42 
43  // --------------------------------------------------------
44  // Analysis helpers
45 
46  int LabelFromHits(Track &t, bool replace, float good_frac);
48 
49  bool CheckMkFitLayerPlanVsReferenceHits(const Track &mkft, const Track &reft, const std::string &name);
50 
51  // --------------------------------------------------------
52  // Analysis drivers / main functions / Comparators
53 
54  void Compare();
55 
56  private:
57  std::vector<DeadVec> &m_deadvectors;
58  DataFile *m_data_file = nullptr;
59  Event *m_event = nullptr;
60  EventOfHits *m_eoh = nullptr;
61  MkBuilder *m_builder = nullptr;
62  int m_evs_in_file = -1;
63  int m_it_index = 0;
64  bool m_clean_seeds = true;
65  bool m_backward_fit = true;
66  bool m_remove_duplicates = true;
67 
70 
71  using map_t = std::map<int, Track *>;
72  using map_i = map_t::iterator;
73 
74  std::map<int, Track *> m_ckf_map, m_sim_map, m_seed_map, m_mkf_map;
75  };
76 
77 } // namespace mkfit
78 
79 #endif
std::map< int, Track * > m_sim_map
Definition: Shell.h:74
void ProcessEvent(SeedSelect_e seed_select=SS_UseAll, int selected_seed=-1, int count=1)
Definition: Shell.cc:120
Shell(std::vector< DeadVec > &dv, const std::string &in_file, int start_ev)
Definition: Shell.cc:40
TrackVec m_seeds
Definition: Shell.h:68
Event * event()
Definition: Shell.h:39
void PrintIterations()
Definition: Shell.cc:302
bool m_remove_duplicates
Definition: Shell.h:66
DataFile * m_data_file
Definition: Shell.h:58
def replace(string, replacements)
std::map< int, Track * > m_mkf_map
Definition: Shell.h:74
bool CheckMkFitLayerPlanVsReferenceHits(const Track &mkft, const Track &reft, const std::string &name)
Definition: Shell.cc:423
bool m_clean_seeds
Definition: Shell.h:64
void SetDebug(bool b)
Definition: Shell.cc:313
void Status()
Definition: Shell.cc:74
void SelectIterationIndex(int itidx)
Definition: Shell.cc:283
EventOfHits * eoh()
Definition: Shell.h:40
void Run()
Definition: Shell.cc:55
MkBuilder * m_builder
Definition: Shell.h:61
std::vector< DeadVec > & m_deadvectors
Definition: Shell.h:57
void FillByLabelMaps_CkfBase()
Definition: Shell.cc:358
EventOfHits * m_eoh
Definition: Shell.h:60
void SetCleanSeeds(bool b)
Definition: Shell.cc:314
void GoToEvent(int eid)
Definition: Shell.cc:87
bool m_backward_fit
Definition: Shell.h:65
void SetRemoveDuplicates(bool b)
Definition: Shell.cc:316
MkBuilder * builder()
Definition: Shell.h:41
void NextEvent(int skip=1)
Definition: Shell.cc:116
TrackVec m_tracks
Definition: Shell.h:69
std::vector< Track > TrackVec
double b
Definition: hdecay.h:120
map_t::iterator map_i
Definition: Shell.h:72
Event * m_event
Definition: Shell.h:59
void SetBackwardFit(bool b)
Definition: Shell.cc:315
int m_it_index
Definition: Shell.h:63
int LabelFromHits(Track &t, bool replace, float good_frac)
Definition: Shell.cc:331
void Compare()
Definition: Shell.cc:446
std::map< int, Track * > map_t
Definition: Shell.h:71
void SetUseDeadModules(bool b)
Definition: Shell.cc:317
void SelectIterationAlgo(int algo)
Definition: Shell.cc:291
std::map< int, Track * > m_ckf_map
Definition: Shell.h:74
int m_evs_in_file
Definition: Shell.h:62
SeedSelect_e
Definition: Shell.h:18
std::map< int, Track * > m_seed_map
Definition: Shell.h:74