Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 10:02:32

0001 #ifndef RecoTracker_MkFitCore_interface_MkJob_h
0002 #define RecoTracker_MkFitCore_interface_MkJob_h
0003 
0004 #include "RecoTracker/MkFitCore/interface/IterationConfig.h"
0005 
0006 namespace mkfit {
0007 
0008   class MkJob {
0009   public:
0010     const TrackerInfo &m_trk_info;
0011     // Config &config; // If we want to get rid of namespace / global config
0012     const IterationConfig &m_iter_config;
0013     const EventOfHits &m_event_of_hits;
0014     const BeamSpot &m_beam_spot;
0015 
0016     const IterationMaskIfcBase *m_iter_mask_ifc = nullptr;
0017 
0018     bool m_in_fwd = true;
0019     void switch_to_backward() { m_in_fwd = false; }
0020 
0021     int num_regions() const { return m_iter_config.m_n_regions; }
0022     const auto regions_begin() const { return m_iter_config.m_region_order.begin(); }
0023     const auto regions_end() const { return m_iter_config.m_region_order.end(); }
0024 
0025     const auto &steering_params(int i) { return m_iter_config.m_steering_params[i]; }
0026 
0027     const auto &params() const { return m_iter_config.m_params; }
0028     const auto &params_bks() const { return m_iter_config.m_backward_params; }
0029     const auto &params_cur() const { return m_in_fwd ? params() : params_bks(); }
0030 
0031     int max_max_cands() const { return std::max(params().maxCandsPerSeed, params_bks().maxCandsPerSeed); }
0032 
0033     const std::vector<bool> *get_mask_for_layer(int layer) {
0034       return m_iter_mask_ifc ? m_iter_mask_ifc->get_mask_for_layer(layer) : nullptr;
0035     }
0036   };
0037 
0038 }  // namespace mkfit
0039 
0040 #endif