84{
86 {
89
91
92
93 bool oldSimulation = false;
96 oldSimulation = true;
97 }
98 }
99
100 m_pad = std::make_unique<Pad>(0,0,
m_debug,subsystem,logic_sector,
m_pad_id,1,oldSimulation, NOBXS);
101
102
103 bool eta_and_phi{}, feet_on{};
104 unsigned short int cma_mask{}, feet_th0{}, feet_th1{}, feet_th2{};
105 auto canBeUShort = [](
auto a){
return std::in_range<unsigned short>(
a);};
107 throw std::out_of_range("PADpatterns::give_pad: m_pad_id or m_sector are not within the range of an unsigned short int");
108 }
109 const unsigned short shortPad =
static_cast<unsigned short int>(
m_pad_id);
110 const unsigned short shortSector =
static_cast<unsigned short int>(
m_sector);
112 shortPad,
113 feet_on,eta_and_phi,cma_mask,
114 feet_th0,feet_th1,feet_th2)){
115 m_pad->setFeetOn(feet_on);
116 m_pad->setFeetThresholds(0,feet_th0);
117 m_pad->setFeetThresholds(1,feet_th1);
118 m_pad->setFeetThresholds(2,feet_th2);
119
120
121
122 }else {
123 std::runtime_error("PADpatterns::give_pad: Could not retrieve Pad Parameters m_sector, m_pad_id = " +
125 }
126
127
129 {
130 Matrix* low_pt_matrix = (*cma)->give_low_pt_matrix(NOBXS, BCZERO);
131 Matrix* high_pt_matrix = (*cma)->give_high_pt_matrix(NOBXS, BCZERO);
132
133 CMAidentity id = (*cma)->cma_parameters().id();
134 int matrix_view = (
id.type() ==
Phi)? 1 : 0;
135 int matrix_id = id.Ixx_index();
136
137 for (int bunch=0;bunch< NOBXS;++bunch)
138 {
139 m_pad->load(0,matrix_view,matrix_id,bunch,
142
143 m_pad->load(1,matrix_view,matrix_id,bunch,
146 }
147 ++cma;
148 }
149
151 }
153}
ubit16 getOutputThres(ubit16 bunch) const
ubit16 getOutputOverl(ubit16 bunch) const
std::unique_ptr< Pad > m_pad
virtual bool give_Pad_Parameters(unsigned short int logic_sector, unsigned short int PADId, bool &feet, bool &eta_and_phi, unsigned short int &cma_mask, unsigned short int &feet_th0, unsigned short int &feet_th1, unsigned short int &feet_th2) const