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<std::vector<TrackCand>> *extra_cands,
29  int start_seed,
30  int n_seeds);
31  void begin_layer(int lay);
32  void begin_iteration();
33 
34  void add_cand(int idx, const IdxChi2List &cand_info) {
35  m_hits_to_add[idx].push_back(cand_info);
36 
38  }
39 
40  int num_cands(int idx) { return m_hits_to_add[idx].size(); }
41 
42  void end_iteration();
43  void end_layer();
44  void end_eta_bin();
45 
46  void doWork(int idx);
47 
48  void processSeedRange(int is_beg, int is_end);
49 
50  // Accessor for MkFitter
52 
53  private:
55  std::vector<std::vector<IdxChi2List>> m_hits_to_add;
56 
59  std::vector<UpdateIndices> *mp_kalman_update_list;
60  std::vector<std::vector<TrackCand>> *mp_extra_cands;
61 
62 #if defined(CC_TIME_ETA) or defined(CC_TIME_LAYER)
63  double t_eta, t_lay;
64 #endif
65 
67  int m_layer;
68 
69  // Temporary in processSeedRange(), resized/reserved in constructor.
70  // Size of this one is s_max_seed_range
71  std::vector<std::vector<TrackCand>> t_cands_for_next_lay;
72  };
73 
74 } // end namespace mkfit
75 #endif
EventOfCombCandidates * mp_event_of_comb_candidates
Definition: CandCloner.h:58
std::vector< std::vector< IdxChi2List > > m_hits_to_add
Definition: CandCloner.h:55
static const int s_max_seed_range
Definition: CandCloner.h:19
int num_cands(int idx)
Definition: CandCloner.h:40
std::vector< std::vector< TrackCand > > t_cands_for_next_lay
Definition: CandCloner.h:71
const IterationParams * mp_iteration_params
Definition: CandCloner.h:57
void end_iteration()
Definition: CandCloner.cc:63
CombCandidate & cand(int i)
std::vector< std::vector< TrackCand > > * mp_extra_cands
Definition: CandCloner.h:60
void processSeedRange(int is_beg, int is_end)
Definition: CandCloner.cc:124
void doWork(int idx)
Definition: CandCloner.cc:101
void begin_layer(int lay)
Definition: CandCloner.cc:46
#define MPT_SIZE
Definition: Matrix.h:37
void begin_iteration()
Definition: CandCloner.cc:59
void setup(const IterationParams &ip)
Definition: CandCloner.cc:16
void begin_eta_bin(EventOfCombCandidates *e_o_ccs, std::vector< UpdateIndices > *update_list, std::vector< std::vector< TrackCand >> *extra_cands, int start_seed, int n_seeds)
Definition: CandCloner.cc:25
void add_cand(int idx, const IdxChi2List &cand_info)
Definition: CandCloner.h:34
std::vector< UpdateIndices > * mp_kalman_update_list
Definition: CandCloner.h:59
CombCandidate & combCandWithOriginalIndex(int idx)
Definition: CandCloner.h:51