Skip to content

Commit

Permalink
Fix StandaloneTrackerTopology for split phase-2 sensors
Browse files Browse the repository at this point in the history
- In the case of the phase-2 IT there is an additional layer of hierarcy, due ot split sensors in Layer 1. First introduced in PR #41880
  • Loading branch information
mmusich committed Oct 19, 2023
1 parent f05c656 commit e165f7f
Showing 1 changed file with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "CalibTracker/StandaloneTrackerTopology/interface/StandaloneTrackerTopology.h"

#include <iostream>
#include "tinyxml2.h"
#include "FWCore/Utilities/interface/Exception.h"
#include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
Expand Down Expand Up @@ -38,13 +39,33 @@ namespace {
const auto subDet = std::stoi(att_name.substr(SubdetName.size()));
switch (subDet) {
case PixelSubdetector::PixelBarrel: // layer, ladder module
pxbVals_.layerStartBit_ = vals[0];
pxbVals_.ladderStartBit_ = vals[1];
pxbVals_.moduleStartBit_ = vals[2];

pxbVals_.layerMask_ = vals[3];
pxbVals_.ladderMask_ = vals[4];
pxbVals_.moduleMask_ = vals[5];
/*
In the case of the phase-2 IT there is an additional
layer of hierarcy, due ot split sensors in Layer 1
What follow is a ugly hack, but at least is consistent with
TrackerTopologyEP.cc
*/

if (vals.size() > 6) { // Phase 2: extra hierarchy level for 3D sensors
pxbVals_.layerStartBit_ = vals[0];
pxbVals_.ladderStartBit_ = vals[1];
pxbVals_.moduleStartBit_ = vals[2];
pxbVals_.doubleStartBit_ = vals[3];

pxbVals_.layerMask_ = vals[4];
pxbVals_.ladderMask_ = vals[5];
pxbVals_.moduleMask_ = vals[6];
pxbVals_.doubleMask_ = vals[7];
} else { // Phase-0 or Phase-1
pxbVals_.layerStartBit_ = vals[0];
pxbVals_.ladderStartBit_ = vals[1];
pxbVals_.moduleStartBit_ = vals[2];

pxbVals_.layerMask_ = vals[3];
pxbVals_.ladderMask_ = vals[4];
pxbVals_.moduleMask_ = vals[5];
}

foundPXB = true;
break;
Expand Down

0 comments on commit e165f7f

Please sign in to comment.