CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TrackerInfo.cc
Go to the documentation of this file.
2 
3 #include <cassert>
4 
5 namespace mkfit {
6 
7  void LayerInfo::set_limits(float r1, float r2, float z1, float z2) {
8  m_rin = r1;
9  m_rout = r2;
10  m_zmin = z1;
11  m_zmax = z2;
12  }
13 
14  void LayerInfo::set_r_hole_range(float rh1, float rh2) {
15  m_has_r_range_hole = true;
16  m_hole_r_min = rh1;
17  m_hole_r_max = rh2;
18  }
19 
20  //==============================================================================
21  // TrackerInfo
22  //==============================================================================
23 
24  void TrackerInfo::reserve_layers(int n_brl, int n_ec_pos, int n_ec_neg) {
25  m_layers.reserve(n_brl + n_ec_pos + n_ec_neg);
26  m_barrel.reserve(n_brl);
27  m_ecap_pos.reserve(n_ec_pos);
28  m_ecap_neg.reserve(n_ec_neg);
29  }
30 
31  void TrackerInfo::create_layers(int n_brl, int n_ec_pos, int n_ec_neg) {
32  reserve_layers(n_brl, n_ec_pos, n_ec_neg);
33  for (int i = 0; i < n_brl; ++i)
35  for (int i = 0; i < n_ec_pos; ++i)
37  for (int i = 0; i < n_ec_neg; ++i)
39  }
40 
42  int l = (int)m_layers.size();
43  m_layers.emplace_back(LayerInfo(l, type));
44  return l;
45  }
46 
49  return m_layers.back();
50  }
51 
54  return m_layers.back();
55  }
56 
59  return m_layers.back();
60  }
61 
62 } // end namespace mkfit
void set_r_hole_range(float rh1, float rh2)
Definition: TrackerInfo.cc:14
std::vector< int > m_barrel
Definition: TrackerInfo.h:167
LayerInfo & new_barrel_layer()
Definition: TrackerInfo.cc:47
std::vector< int > m_ecap_neg
Definition: TrackerInfo.h:169
LayerInfo & new_ecap_neg_layer()
Definition: TrackerInfo.cc:57
void set_limits(float r1, float r2, float z1, float z2)
Definition: TrackerInfo.cc:7
LayerInfo & new_ecap_pos_layer()
Definition: TrackerInfo.cc:52
int new_layer(LayerInfo::LayerType_e type)
Definition: TrackerInfo.cc:41
void create_layers(int n_brl, int n_ec_pos, int n_ec_neg)
Definition: TrackerInfo.cc:31
std::vector< int > m_ecap_pos
Definition: TrackerInfo.h:168
std::vector< LayerInfo > m_layers
Definition: TrackerInfo.h:165
void reserve_layers(int n_brl, int n_ec_pos, int n_ec_neg)
Definition: TrackerInfo.cc:24