238 std::shared_ptr<const PixelDiodeMatrix> fullMatrix =
nullptr;
240 if (etaPitchLongEnd == etaPitchLong && etaPitchLong != etaPitch) {
244 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
245 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
247 std::shared_ptr<const PixelDiodeMatrix> singleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
253 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
254 nullptr, singleChipRow, circuitsEta,
nullptr);
256 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
257 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);
258 }
else if (etaPitchLongEnd == etaPitchLong && (etaPitchLong == etaPitch || circuitsEta == 1)) {
261 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
262 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
263 nullptr, normalCell, circuitsEta*diodeColPerCirc,
nullptr);
264 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
265 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);
266 }
else if (etaPitchLongEnd == etaPitch && etaPitchLong != etaPitch && circuitsEta > 2) {
269 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
270 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
272 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
277 std::shared_ptr<const PixelDiodeMatrix> middleSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
282 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
287 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
288 lowerSingleChipRow, middleSingleChipRow, circuitsEta-2, upperSingleChipRow);
289 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
290 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);
291 }
else if (etaPitchLongEnd == etaPitch && etaPitchLong != etaPitch && circuitsEta == 2) {
294 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
295 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
297 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
302 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
307 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
308 lowerSingleChipRow, upperSingleChipRow, 1,
nullptr);
309 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
310 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);
311 }
else if (circuitsEta == 1 || (etaPitchLongEnd != etaPitch && etaPitchLong == etaPitch )){
315 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
316 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLongEnd);
318 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
321 circuitsEta*diodeColPerCirc-2,
323 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
324 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);
328 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
329 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
330 std::shared_ptr<const PixelDiodeMatrix> endCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLongEnd);
332 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
337 std::shared_ptr<const PixelDiodeMatrix> middleSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
342 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
347 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
348 lowerSingleChipRow, middleSingleChipRow, circuitsEta-2, upperSingleChipRow);
349 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
350 nullptr, singleRow, circuitsPhi*diodeRowPerCirc,
nullptr);