File indexing completed on 2023-03-17 11:22:29
0001 #ifndef RecoTracker_MkFitCMS_standalone_Shell_h
0002 #define RecoTracker_MkFitCMS_standalone_Shell_h
0003
0004 #include "RecoTracker/MkFitCore/interface/Hit.h"
0005 #include "RecoTracker/MkFitCore/interface/Track.h"
0006
0007 #include <map>
0008
0009 namespace mkfit {
0010
0011 class DataFile;
0012 class Event;
0013 class EventOfHits;
0014 class MkBuilder;
0015
0016 class Shell {
0017 public:
0018 enum SeedSelect_e { SS_UseAll = 0, SS_Label, SS_IndexPreCleaning, SS_IndexPostCleaning };
0019
0020 Shell(std::vector<DeadVec> &dv, const std::string &in_file, int start_ev);
0021 void Run();
0022
0023 void Status();
0024
0025 void GoToEvent(int eid);
0026 void NextEvent(int skip = 1);
0027 void ProcessEvent(SeedSelect_e seed_select = SS_UseAll, int selected_seed = -1, int count = 1);
0028
0029 void SelectIterationIndex(int itidx);
0030 void SelectIterationAlgo(int algo);
0031 void PrintIterations();
0032
0033 void SetDebug(bool b);
0034 void SetCleanSeeds(bool b);
0035 void SetBackwardFit(bool b);
0036 void SetRemoveDuplicates(bool b);
0037 void SetUseDeadModules(bool b);
0038
0039 Event *event() { return m_event; }
0040 EventOfHits *eoh() { return m_eoh; }
0041 MkBuilder *builder() { return m_builder; }
0042
0043
0044
0045
0046 int LabelFromHits(Track &t, bool replace, float good_frac);
0047 void FillByLabelMaps_CkfBase();
0048
0049 bool CheckMkFitLayerPlanVsReferenceHits(const Track &mkft, const Track &reft, const std::string &name);
0050
0051
0052
0053
0054 void Compare();
0055
0056 private:
0057 std::vector<DeadVec> &m_deadvectors;
0058 DataFile *m_data_file = nullptr;
0059 Event *m_event = nullptr;
0060 EventOfHits *m_eoh = nullptr;
0061 MkBuilder *m_builder = nullptr;
0062 int m_evs_in_file = -1;
0063 int m_it_index = 0;
0064 bool m_clean_seeds = true;
0065 bool m_backward_fit = true;
0066 bool m_remove_duplicates = true;
0067
0068 TrackVec m_seeds;
0069 TrackVec m_tracks;
0070
0071 using map_t = std::map<int, Track *>;
0072 using map_i = map_t::iterator;
0073
0074 std::map<int, Track *> m_ckf_map, m_sim_map, m_seed_map, m_mkf_map;
0075 };
0076
0077 }
0078
0079 #endif