Skip to content

Commit

Permalink
Removing LRT and pixel checks as not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosie-Hasan committed Jan 22, 2025
1 parent 831f82b commit c8fb6ef
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 48 deletions.
16 changes: 6 additions & 10 deletions Core/include/Acts/Seeding/GbtsDataStorage.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,22 @@ constexpr std::size_t N_SEG_CONNS = 6; // was 6
template <typename space_point_t>
struct GbtsSP {
const space_point_t *SP; // want inside to have pointer
int gbtsID; // used to access detector layer information in connector input
// file
int combined_ID; // includes eta id which references the detector module
bool m_isPixel;
int gbtsID;
int combined_ID;
float m_phi;
float m_r;
float m_ClusterWidth;
GbtsSP(const space_point_t *sp, int id, int combined_id, bool isPixel,
float ClusterWidth)
GbtsSP(const space_point_t *sp, int id, int combined_id, float ClusterWidth)
: SP(sp),
gbtsID(id),
combined_ID{combined_id},
m_isPixel(isPixel),
m_ClusterWidth(ClusterWidth) {
m_phi = std::atan2(SP->y(), SP->x());
m_r = std::sqrt((SP->x() * SP->x()) + (SP->y() * SP->y()));
};
bool isPixel() const { return m_isPixel; }
bool isStrip() const { return !m_isPixel; }
float phi() const { return m_phi; }
float r() const { return m_r; }
float ClusterWidth() const { return m_ClusterWidth; }
bool ClusterWidth() const { return m_ClusterWidth; }
};

template <typename space_point_t>
Expand Down Expand Up @@ -183,6 +177,8 @@ class GbtsDataStorage {
} else {
if (useClusterWidth) {
float cluster_width = sp.ClusterWidth();
// if (cluster_width == 0) {continue;} //catch for casses that dont have
// cluster width available
if (cluster_width > 0.2) {
return -3;
}
Expand Down
61 changes: 29 additions & 32 deletions Core/include/Acts/Seeding/SeedFinderGbts.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ void SeedFinderGbts<external_spacepoint_t>::loadSpacePoints(
const std::vector<GbtsSP<external_spacepoint_t>>& gbtsSPvect) {
ACTS_VERBOSE("Loading space points");
for (const auto& gbtssp : gbtsSPvect) {
bool is_Pixel = gbtssp.isPixel();
if (!is_Pixel) {
continue;
}
m_storage->addSpacePoint(gbtssp, (m_config.m_useClusterWidth > 0));
}

Expand Down Expand Up @@ -307,12 +303,12 @@ void SeedFinderGbts<external_spacepoint_t>::runGbts_TrackFinder(
nEdges++;
}
} // loop over n2 (outer) nodes
} // loop over n1 (inner) nodes
} // loop over source eta bins
} // loop over dst eta bins
} // loop over L2(L1) layers
} // loop over dst layers
} // loop over the stages of doublet making
} // loop over n1 (inner) nodes
} // loop over source eta bins
} // loop over dst eta bins
} // loop over L2(L1) layers
} // loop over dst layers
} // loop over the stages of doublet making

std::vector<const GbtsNode<external_spacepoint_t>*> vNodes;

Expand Down Expand Up @@ -655,31 +651,32 @@ void SeedFinderGbts<external_spacepoint_t>::createSeeds(
return;
}

m_triplets.clear(); // member of class , saying not declared, maybe public?
m_triplets.clear();

for (auto& track : vTracks) {
for (auto& seed : track.m_seeds) { // access member of GbtsTrigTracklet

float newQ = seed.Q(); // function of TrigInDetTriplet
if (m_config.m_LRTmode) {
// In LRT mode penalize pixels in Triplets
if (seed.s1().isPixel()) {
newQ += 1000; // functions of TrigSiSpacePointBase
}
if (seed.s2().isPixel()) {
newQ += 1000;
}
if (seed.s3().isPixel()) {
newQ += 1000;
}
} else {
// In normal (non LRT) mode penalise SSS by 1000, PSS (if enabled) and
// PPS by 10000
if (seed.s3().isStrip()) {
newQ += seed.s1().isStrip() ? 1000.0 : 10000.0;
}
}
seed.Q(newQ);
// Currently not used, but leaving in to use concept in future development
// float newQ = seed.Q(); // function of TrigInDetTriplet
// if (m_config.m_LRTmode) {
// // In LRT mode penalize pixels in Triplets
// if (seed.s1().isPixel()) {
// newQ += 1000; // functions of TrigSiSpacePointBase
// }
// if (seed.s2().isPixel()) {
// newQ += 1000;
// }
// if (seed.s3().isPixel()) {
// newQ += 1000;
// }
// } else {
// // In normal (non LRT) mode penalise SSS by 1000, PSS (if enabled)
// and
// // PPS by 10000
// if (seed.s3().isSCT()) {
// newQ += seed.s1().isSCT() ? 1000.0 : 10000.0;
// }
// }
// seed.Q(newQ);
m_triplets.emplace_back(seed);
}
}
Expand Down
1 change: 0 additions & 1 deletion Core/include/Acts/Seeding/SeedFinderGbtsConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ struct SeedFinderGbtsConfig {
std::vector<TrigInDetSiLayer> m_layerGeometry;

// for runGbts_TrackFinder
bool m_LRTmode = true; // eventually want to set from full chain
bool m_useEtaBinning =
true; // bool to use eta binning from geometry structure
bool m_doubletFilterRZ = true; // bool applies new Z cuts on doublets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,10 @@ ActsExamples::GbtsSeedingAlgorithm::MakeGbtsSpacePoints(
int eta_mod = Find->second.second;
int combined_id = Gbts_id * 1000 + eta_mod;

// check if SP is pixel, dependent of type of SP so must be done in
// examples
bool isPixel = (sourceLink.size() == 1); // pixels have 1 SL

float ClusterWidth =
0; // false input as this is not available in examples
// fill Gbts vector with current sapce point and ID
gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id, isPixel,
gbtsSpacePoints.emplace_back(&spacePoint, Gbts_id, combined_id,
ClusterWidth); // make new GbtsSP here !
}
}
Expand Down

0 comments on commit c8fb6ef

Please sign in to comment.