Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Zuliani INFN Padova - PostDoc committed Sep 12, 2024
1 parent e0cc7ae commit c1bb86c
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
4 changes: 2 additions & 2 deletions data/MuSIC_v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
"geo-tgeo-layer-z-ranges": {
"negative": {
"lower": -305.0,
"lower": -405.0,
"upper": -140.0
},
"central": {
Expand All @@ -66,7 +66,7 @@
},
"positive": {
"lower": 140.0,
"upper": 305.0
"upper": 405.0
}
},
"geo-tgeo-layer-r-split": {
Expand Down
10 changes: 9 additions & 1 deletion src/ACTSSeededCKFTrackingProc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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<Acts::Vector2> lpResult =
surface->globalToLocal(geometryContext(), globalPos, {0, 0, 0}, 0.5_um);
if (!lpResult.ok())
Expand Down
16 changes: 10 additions & 6 deletions src/GeometryIdMappingTool.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ const int32_t GeometryIdMappingTool::OuterTrackerBarrel = 5;
const int32_t GeometryIdMappingTool::OuterTrackerEndCapPositive = 6;

const std::unordered_map<uint32_t, uint32_t>
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<uint32_t, uint32_t>
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<uint32_t, uint32_t>
GeometryIdMappingTool::NLad_InnerTrackerBarrel = {
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit c1bb86c

Please sign in to comment.