240 std::shared_ptr<const PixelDiodeMatrix> fullMatrix =
nullptr;
242 if (etaPitchLongEnd == etaPitchLong && etaPitchLong != etaPitch) {
246 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
247 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
249 std::shared_ptr<const PixelDiodeMatrix> singleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
251 std::move(normalCell),
255 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
256 nullptr, std::move(singleChipRow), circuitsEta,
nullptr);
258 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
259 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);
260 }
else if (etaPitchLongEnd == etaPitchLong && (etaPitchLong == etaPitch || circuitsEta == 1)) {
263 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
264 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
265 nullptr, std::move(normalCell), circuitsEta*diodeColPerCirc,
nullptr);
266 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
267 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);
268 }
else if (etaPitchLongEnd == etaPitch && etaPitchLong != etaPitch && circuitsEta > 2) {
271 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
272 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
274 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
279 std::shared_ptr<const PixelDiodeMatrix> middleSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
284 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
286 std::move(normalCell),
289 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
290 std::move(lowerSingleChipRow), std::move(middleSingleChipRow), circuitsEta-2, std::move(upperSingleChipRow));
291 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
292 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);
293 }
else if (etaPitchLongEnd == etaPitch && etaPitchLong != etaPitch && circuitsEta == 2) {
296 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
297 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
299 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
304 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
306 std::move(normalCell),
309 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
310 std::move(lowerSingleChipRow), std::move(upperSingleChipRow), 1,
nullptr);
311 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
312 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);
313 }
else if (circuitsEta == 1 || (etaPitchLongEnd != etaPitch && etaPitchLong == etaPitch )){
317 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
318 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLongEnd);
320 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
322 std::move(normalCell),
323 circuitsEta*diodeColPerCirc-2,
325 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
326 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);
330 std::shared_ptr<const PixelDiodeMatrix> normalCell = PixelDiodeMatrix::construct(phiPitch, etaPitch);
331 std::shared_ptr<const PixelDiodeMatrix> bigCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLong);
332 std::shared_ptr<const PixelDiodeMatrix> endCell = PixelDiodeMatrix::construct(phiPitch, etaPitchLongEnd);
334 std::shared_ptr<const PixelDiodeMatrix> lowerSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
339 std::shared_ptr<const PixelDiodeMatrix> middleSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
344 std::shared_ptr<const PixelDiodeMatrix> upperSingleChipRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
346 std::move(normalCell),
349 std::shared_ptr<const PixelDiodeMatrix> singleRow = PixelDiodeMatrix::construct(PixelDiodeMatrix::etaDir,
350 std::move(lowerSingleChipRow), std::move(middleSingleChipRow), circuitsEta-2, std::move(upperSingleChipRow));
351 fullMatrix = PixelDiodeMatrix::construct(PixelDiodeMatrix::phiDir,
352 nullptr, std::move(singleRow), circuitsPhi*diodeRowPerCirc,
nullptr);