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) ) {
91 if (
cell !=
nullptr) {
105 std::vector<SiCellId> &neighbours)
const
114 neighbours.reserve(8);
125 int etaM = etaIndex-1;
126 int etaP = etaIndex+1;
129 if (phiM >= 0) neighbours.emplace_back(phiM,etaIndex);
131 if (phiM >= 0 && etaM >= 0) neighbours.emplace_back(phiM,etaM);
133 if (etaM >= 0) neighbours.emplace_back(
phiIndex,etaM);
135 if (phiP <
phiDiodes() && etaM >= 0) neighbours.emplace_back(phiP,etaM);
137 if (phiP <
phiDiodes()) neighbours.emplace_back(phiP,etaIndex);
139 if (phiM >= 0 && etaP <
etaDiodes()) neighbours.emplace_back(phiM,etaP);
150 std::vector<SiCellId> &neighbours)
const
156 const double ¢erColumn=diodeCenter.
xColumn();
157 const double ¢erRow=diodeCenter.
xRow();
158 const double halfSizeColumn=diodeSize.
xColumn()/2;
159 const double halfSizeRow=diodeSize.
xRow()/2;
162 const double epsilon=0.01;
165 const double left1=centerColumn-halfSizeColumn*(1+epsilon);
166 const double right1=centerColumn+halfSizeColumn*(1+epsilon);
167 const double left2=centerColumn-halfSizeColumn*(1-epsilon);
168 const double right2=centerColumn+halfSizeColumn*(1-epsilon);
169 const double top1=centerRow+halfSizeRow*(1+epsilon);
170 const double bot1=centerRow-halfSizeRow*(1+epsilon);
171 const double top2=centerRow+halfSizeRow*(1-epsilon);
172 const double bot2=centerRow-halfSizeRow*(1-epsilon);
175 std::vector<SiLocalPosition> positions;
176 positions.reserve(12);
178 position.
xRow(bot1); position.
xColumn(left2); positions.push_back(position);
179 position.
xRow(bot1); position.
xColumn(left1); positions.push_back(position);
180 position.
xRow(bot2); position.
xColumn(left1); positions.push_back(position);
181 position.
xRow(top2); position.
xColumn(left1); positions.push_back(position);
182 position.
xRow(top1); position.
xColumn(left1); positions.push_back(position);
183 position.
xRow(top1); position.
xColumn(left2); positions.push_back(position);
184 position.
xRow(bot1); position.
xColumn(right2); positions.push_back(position);
185 position.
xRow(bot1); position.
xColumn(right1); positions.push_back(position);
186 position.
xRow(bot2); position.
xColumn(right1); positions.push_back(position);
187 position.
xRow(top2); position.
xColumn(right1); positions.push_back(position);
188 position.
xRow(top1); position.
xColumn(right1); positions.push_back(position);
189 position.
xRow(top1); position.
xColumn(right2); positions.push_back(position);
192 neighbours.reserve(8);
195 for(
const auto & position : positions) {
203 std::vector<SiCellId>::const_iterator foundIter
204 =
std::find(neighbours.begin(), neighbours.end(), cellId_neighb );
207 if (foundIter == neighbours.end()) neighbours.push_back(cellId_neighb);
228 if (phiIndexDelta == 1 && etaIndexDelta == 0)
return size.xEta();
229 if (phiIndexDelta == 0 && etaIndexDelta == 1)
return size.xPhi();
261 if (intersectionColumn>0) {
262 if (intersectionRow>0)
return 0;
263 return intersectionColumn;
265 return intersectionRow;
271 const double x2,
const double dx2)