29 m_matrix(std::move(
matrix)),
30 m_generalLayout(false)
47 double halfWidth = 0.5*
width();
48 double halfLength = 0.5*
length();
49 if ( (abs(localPos[
distPhi]) > halfWidth) ||
50 (abs(localPos[
distEta]) > halfLength) ) {
86 double halfWidth = 0.5*
width();
87 double halfLength = 0.5*
length();
94 if (
cell !=
nullptr) {
108 std::vector<SiCellId> &neighbours)
const
117 neighbours.reserve(8);
128 int etaM = etaIndex-1;
129 int etaP = etaIndex+1;
132 if (phiM >= 0) neighbours.emplace_back(phiM,etaIndex);
134 if (phiM >= 0 && etaM >= 0) neighbours.emplace_back(phiM,etaM);
136 if (etaM >= 0) neighbours.emplace_back(
phiIndex,etaM);
138 if (phiP <
phiDiodes() && etaM >= 0) neighbours.emplace_back(phiP,etaM);
140 if (phiP <
phiDiodes()) neighbours.emplace_back(phiP,etaIndex);
142 if (phiM >= 0 && etaP <
etaDiodes()) neighbours.emplace_back(phiM,etaP);
153 std::vector<SiCellId> &neighbours)
const
159 const double ¢erColumn=diodeCenter.
xColumn();
160 const double ¢erRow=diodeCenter.
xRow();
161 const double halfSizeColumn=diodeSize.
xColumn()/2;
162 const double halfSizeRow=diodeSize.
xRow()/2;
165 const double epsilon=0.01;
168 const double left1=centerColumn-halfSizeColumn*(1+epsilon);
169 const double right1=centerColumn+halfSizeColumn*(1+epsilon);
170 const double left2=centerColumn-halfSizeColumn*(1-epsilon);
171 const double right2=centerColumn+halfSizeColumn*(1-epsilon);
172 const double top1=centerRow+halfSizeRow*(1+epsilon);
173 const double bot1=centerRow-halfSizeRow*(1+epsilon);
174 const double top2=centerRow+halfSizeRow*(1-epsilon);
175 const double bot2=centerRow-halfSizeRow*(1-epsilon);
178 std::vector<SiLocalPosition> positions;
179 positions.reserve(12);
181 position.
xRow(bot1); position.
xColumn(left2); positions.push_back(position);
182 position.
xRow(bot1); position.
xColumn(left1); positions.push_back(position);
183 position.
xRow(bot2); position.
xColumn(left1); positions.push_back(position);
184 position.
xRow(top2); position.
xColumn(left1); positions.push_back(position);
185 position.
xRow(top1); position.
xColumn(left1); positions.push_back(position);
186 position.
xRow(top1); position.
xColumn(left2); positions.push_back(position);
187 position.
xRow(bot1); position.
xColumn(right2); positions.push_back(position);
188 position.
xRow(bot1); position.
xColumn(right1); positions.push_back(position);
189 position.
xRow(bot2); position.
xColumn(right1); positions.push_back(position);
190 position.
xRow(top2); position.
xColumn(right1); positions.push_back(position);
191 position.
xRow(top1); position.
xColumn(right1); positions.push_back(position);
192 position.
xRow(top1); position.
xColumn(right2); positions.push_back(position);
195 neighbours.reserve(8);
198 for(
const auto & position : positions) {
206 std::vector<SiCellId>::const_iterator foundIter
207 =
std::find(neighbours.begin(), neighbours.end(), cellId_neighb );
210 if (foundIter == neighbours.end()) neighbours.push_back(cellId_neighb);
231 if (phiIndexDelta == 1 && etaIndexDelta == 0)
return size.xEta();
232 if (phiIndexDelta == 0 && etaIndexDelta == 1)
return size.xPhi();
264 if (intersectionColumn>0) {
265 if (intersectionRow>0)
return 0;
266 return intersectionColumn;
268 return intersectionRow;
274 const double x2,
const double dx2)