diff --git a/data/MuSIC_v1.json b/data/MuSIC_v1.json index 1923ab0..a26547a 100644 --- a/data/MuSIC_v1.json +++ b/data/MuSIC_v1.json @@ -57,7 +57,7 @@ }, "geo-tgeo-layer-z-ranges": { "negative": { - "lower": -305.0, + "lower": -405.0, "upper": -140.0 }, "central": { @@ -66,7 +66,7 @@ }, "positive": { "lower": 140.0, - "upper": 305.0 + "upper": 405.0 } }, "geo-tgeo-layer-r-split": { diff --git a/src/ACTSSeededCKFTrackingProc.cxx b/src/ACTSSeededCKFTrackingProc.cxx index 376c51d..88971ef 100644 --- a/src/ACTSSeededCKFTrackingProc.cxx +++ b/src/ACTSSeededCKFTrackingProc.cxx @@ -283,11 +283,19 @@ void ACTSSeededCKFTrackingProc::processEvent(LCEvent *evt) { sortedHits) { // Convert to Acts hit const Acts::Surface *surface = trackingGeometry()->findSurface(hit.first); - if (surface == nullptr) throw std::runtime_error("Surface not found"); + + std::cout << "hit: " << hit.first.volume() << " " << hit.first.boundary() << " " << hit.first.layer() << " " << hit.first.approach() << " " << hit.first.sensitive() << std::endl; + + // if (surface == nullptr) throw std::runtime_error("Surface not found"); const double *lcioglobalpos = hit.second->getPosition(); Acts::Vector3 globalPos = {lcioglobalpos[0], lcioglobalpos[1], lcioglobalpos[2]}; + //print position + std::cout << "globalPos: " << globalPos[0] << " " << globalPos[1] << " " << globalPos[2] << std::endl; + + if (surface == nullptr) throw std::runtime_error("Surface not found"); + Acts::Result lpResult = surface->globalToLocal(geometryContext(), globalPos, {0, 0, 0}, 0.5_um); if (!lpResult.ok()) diff --git a/src/GeometryIdMappingTool.cxx b/src/GeometryIdMappingTool.cxx index 9c76aa3..ef17197 100644 --- a/src/GeometryIdMappingTool.cxx +++ b/src/GeometryIdMappingTool.cxx @@ -18,12 +18,11 @@ const int32_t GeometryIdMappingTool::OuterTrackerBarrel = 5; const int32_t GeometryIdMappingTool::OuterTrackerEndCapPositive = 6; const std::unordered_map - GeometryIdMappingTool::NLad_VertexBarrel = {{0, 5}, {1, 5}, {2, 5}, {3, 5}, - {4, 5}, {5, 5}, {6, 5}, {7, 5}}; + GeometryIdMappingTool::NLad_VertexBarrel = {{0, 5}, {2, 5}, {4, 5}, {6, 5}}; const std::unordered_map GeometryIdMappingTool::NRng_VertexEndCap = { - {0, 16}, {1, 16}, {2, 16}, {3, 16}, {4, 16}, {5, 16}, {6, 16}, {7, 16}}; + {2, 16}, {4, 16}, {6, 16}, {8,16}}; const std::unordered_map GeometryIdMappingTool::NLad_InnerTrackerBarrel = { @@ -117,18 +116,23 @@ uint64_t GeometryIdMappingTool::getGeometryID(uint32_t systemID, : signSystemID; geometry_id |= volume_id << (14 * 4); + + std::cout << systemID << " " << layerID << " " << sideID << " " << ladderID << " " << moduleID << std::endl; + // Layer ID is counting within sub detector, with pairings depending on the // sub detector uint64_t layer_id; switch (signSystemID) { case VertexEndCapNegative: - layer_id = 2 * (7 - layerID) + 2; + //layer_id = 2 * (7 - layerID) + 2; + layer_id = (0 - layerID) + 8; break; case VertexEndCapPositive: - layer_id = 2 * (layerID) + 2; + //layer_id = 2 * (layerID) + 2; + layer_id = layerID + 2; break; case VertexBarrel: - layer_id = 2 * (layerID + 1); + layer_id = layerID + 2; break; case InnerTrackerBarrel: case OuterTrackerBarrel: {