Skip to content

Commit

Permalink
Fix order of endcap layers, update detailed dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiocos committed Mar 17, 2021
1 parent bb7e921 commit ca328c1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
5 changes: 4 additions & 1 deletion RecoMTD/DetLayers/plugins/ETLDetLayerGeometryBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ pair<vector<DetLayer*>, vector<DetLayer*> > ETLDetLayerGeometryBuilder::buildLay
}
}
}
pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[0], result[1]);
//
// the first entry is Z+ ( MTD side 1), the second is Z- (MTD side 0)
//
pair<vector<DetLayer*>, vector<DetLayer*> > res_pair(result[1], result[0]);
return res_pair;
}

Expand Down
29 changes: 29 additions & 0 deletions RecoMTD/DetLayers/test/MTDRecoGeometryAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ void MTDRecoGeometryAnalyzer::analyze(const Event& ev, const EventSetup& es) {
LogVerbatim("MTDLayerDump") << " " << static_cast<int>(dl - geo->allETLLayers().begin()) << " " << dumpLayer(*dl);
}

LogVerbatim("MTDLayerDump") << "\n*** allForwardLayers(): " << std::fixed << std::setw(14)
<< geo->allForwardLayers().size();
for (auto dl = geo->allForwardLayers().begin(); dl != geo->allForwardLayers().end(); ++dl) {
LogVerbatim("MTDLayerDump") << " " << static_cast<int>(dl - geo->allForwardLayers().begin()) << " "
<< dumpLayer(*dl);
}

LogVerbatim("MTDLayerDump") << "\n*** allBackwardLayers(): " << std::fixed << std::setw(14)
<< geo->allBackwardLayers().size();
for (auto dl = geo->allBackwardLayers().begin(); dl != geo->allBackwardLayers().end(); ++dl) {
LogVerbatim("MTDLayerDump") << " " << static_cast<int>(dl - geo->allBackwardLayers().begin()) << " "
<< dumpLayer(*dl);
}

LogVerbatim("MTDLayerDump") << "\n*** allLayers(): " << std::fixed << std::setw(14) << geo->allLayers().size();
for (auto dl = geo->allLayers().begin(); dl != geo->allLayers().end(); ++dl) {
LogVerbatim("MTDLayerDump") << " " << static_cast<int>(dl - geo->allLayers().begin()) << " " << dumpLayer(*dl);
Expand All @@ -109,6 +123,21 @@ void MTDRecoGeometryAnalyzer::testBTLLayers(const MTDDetLayerGeometry* geo, cons
<< " rods = " << std::setw(14) << layer->rods().size() << " dets = " << std::setw(14)
<< layer->basicComponents().size();

unsigned int irodInd(0);
for (const auto& irod : layer->rods()) {
irodInd++;
LogVerbatim("MTDLayerDump") << std::fixed << "\nRod " << irodInd << " dets = " << irod->basicComponents().size()
<< "\n";
for (const auto& imod : irod->basicComponents()) {
BTLDetId modId(imod->geographicalId().rawId());
LogVerbatim("MTDLayerDump") << std::fixed << "BTLDetId " << modId.rawId() << " side = " << std::setw(4)
<< modId.mtdSide() << " rod = " << modId.mtdRR() << " mod = " << std::setw(4)
<< modId.module() << std::setw(14) << " R = " << imod->position().perp()
<< std::setw(14) << " phi = " << imod->position().phi() << std::setw(14)
<< " Z = " << imod->position().z();
}
}

const BoundCylinder& cyl = layer->specificSurface();

double halfZ = cyl.bounds().length() / 2.;
Expand Down

0 comments on commit ca328c1

Please sign in to comment.