CMS 3D CMS Logo

CandCloner.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFitCore_src_CandCloner_h
2 #define RecoTracker_MkFitCore_src_CandCloner_h
3 
4 #include "MkFinder.h"
5 
6 #include <vector>
7 
8 namespace mkfit {
9 
10  class IterationParams;
11  class EventOfCombCandidates;
12 
13  //#define CC_TIME_LAYER
14  //#define CC_TIME_ETA
15 
16  class CandCloner {
17  public:
18  // Maximum number of seeds processed in one call to processSeedRange()
19  static const int s_max_seed_range = MPT_SIZE;
20 
22 
23  void setup(const IterationParams &ip);
24  void release();
25 
27  std::vector<UpdateIndices> *update_list,
28  std::vector<UpdateIndices> *overlap_list,
29  std::vector<std::vector<TrackCand>> *extra_cands,
30  int start_seed,
31  int n_seeds);
32  void begin_layer(int lay);
33  void begin_iteration();
34 
35  void add_cand(int idx, const IdxChi2List &cand_info) {
36  m_hits_to_add[idx].push_back(cand_info);
37 
39  }
40 
41  int num_cands(int idx) { return m_hits_to_add[idx].size(); }
42 
43  void end_iteration();
44  void end_layer();
45  void end_eta_bin();
46 
47  void doWork(int idx);
48 
49  void processSeedRange(int is_beg, int is_end);
50 
51  // Accessor for MkFitter
53 
54  private:
56  std::vector<std::vector<IdxChi2List>> m_hits_to_add;
57 
60  std::vector<UpdateIndices> *mp_kalman_update_list, *mp_kalman_overlap_list;
61  std::vector<std::vector<TrackCand>> *mp_extra_cands;
62 
63 #if defined(CC_TIME_ETA) or defined(CC_TIME_LAYER)
64  double t_eta, t_lay;
65 #endif
66 
68  int m_layer;
69 
70  // Temporary in processSeedRange(), resized/reserved in constructor.
71  // Size of this one is s_max_seed_range
72  std::vector<std::vector<TrackCand>> t_cands_for_next_lay;
73  };
74 
75 } // end namespace mkfit
76 #endif
EventOfCombCandidates * mp_event_of_comb_candidates
Definition: CandCloner.h:59
std::vector< std::vector< IdxChi2List > > m_hits_to_add
Definition: CandCloner.h:56
static const int s_max_seed_range
Definition: CandCloner.h:19
int num_cands(int idx)
Definition: CandCloner.h:41
void begin_eta_bin(EventOfCombCandidates *e_o_ccs, std::vector< UpdateIndices > *update_list, std::vector< UpdateIndices > *overlap_list, std::vector< std::vector< TrackCand >> *extra_cands, int start_seed, int n_seeds)
Definition: CandCloner.cc:25
std::vector< std::vector< TrackCand > > t_cands_for_next_lay
Definition: CandCloner.h:72
const IterationParams * mp_iteration_params
Definition: CandCloner.h:58
void end_iteration()
Definition: CandCloner.cc:66
CombCandidate & cand(int i)
std::vector< std::vector< TrackCand > > * mp_extra_cands
Definition: CandCloner.h:61
void processSeedRange(int is_beg, int is_end)
Definition: CandCloner.cc:127
void doWork(int idx)
Definition: CandCloner.cc:104
void begin_layer(int lay)
Definition: CandCloner.cc:48
#define MPT_SIZE
Definition: Matrix.h:37
void begin_iteration()
Definition: CandCloner.cc:62
std::vector< UpdateIndices > * mp_kalman_overlap_list
Definition: CandCloner.h:60
void setup(const IterationParams &ip)
Definition: CandCloner.cc:16
void add_cand(int idx, const IdxChi2List &cand_info)
Definition: CandCloner.h:35
std::vector< UpdateIndices > * mp_kalman_update_list
Definition: CandCloner.h:60
CombCandidate & combCandWithOriginalIndex(int idx)
Definition: CandCloner.h:52