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