Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 acts tracking with b0 trackers #405

Merged
merged 45 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from 42 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
459cf26
Add B0TrackerRecHits to tracker hit collector
rahmans1 Dec 24, 2022
03e03b9
Some Cleanup. Move resolution and threshhold info to reco script.
rahmans1 Dec 25, 2022
cd1570a
Copy the ECTRK cmake file to B0TRK
rahmans1 Dec 25, 2022
4c85a94
Add B0TRK to default plugins
rahmans1 Dec 25, 2022
793404a
Add B0 tracker to detector cmake file
rahmans1 Dec 25, 2022
040807b
Add B0TRK threshhold and time resolution in reco script
rahmans1 Dec 25, 2022
2f674f8
Fix typo. Wrongly placed bracket.
rahmans1 Dec 25, 2022
87261d1
Change of nomenclature for B0Tracker hits in flag table
rahmans1 Dec 26, 2022
7f9691a
Change of nomenclature of B0Tracker hits in detector plugin
rahmans1 Dec 26, 2022
7bac313
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jan 15, 2023
3b31494
Adding the matrix inverse components and coordinates after global to …
rahmans1 Jan 16, 2023
c9a1a65
Missing \ for maintaining line continuity
rahmans1 Jan 16, 2023
c208b11
Also print out surface center
rahmans1 Jan 16, 2023
e1a0e2f
Remove space after line break
rahmans1 Jan 16, 2023
2972e6b
Change debug output layout for "not on surface" error
rahmans1 Jan 18, 2023
d90c4b3
Increase onSurfaceTolerance just for hits on the B0 tracker to 1 micr…
rahmans1 Jan 19, 2023
b5db946
Fix typo
rahmans1 Jan 19, 2023
eb7172c
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jan 19, 2023
11ef0f6
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jan 24, 2023
dafe912
Avoid duplicates of B0TRK in cmake file
rahmans1 Jan 24, 2023
8312ffb
Avoid duplicates of B0TRK in default plugin list
rahmans1 Jan 24, 2023
a8af256
Bring branch upto date with main
Mar 14, 2023
aa40cb2
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 14, 2023
2c77c3a
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Apr 11, 2023
775d6d6
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Apr 13, 2023
ee0bc5a
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Apr 14, 2023
4467537
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 14, 2023
0470dc2
Update input collection name for B0 tracker hits
rahmans1 Jun 15, 2023
4159fe7
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 16, 2023
a7afc19
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 27, 2023
cc24aac
Revert printing debugging output info for inverse context matrix
rahmans1 Jun 28, 2023
aaef27a
Remove unnecessary spacing
rahmans1 Jun 29, 2023
30f32f2
Add a fix me note
rahmans1 Jun 29, 2023
04f62c4
Add ACTS units to on Surface Tolerance
rahmans1 Jun 29, 2023
da94686
Add hit_reco_cfg back into B0 tracker
rahmans1 Jun 29, 2023
28fd6fd
Fix typo in parameter name
rahmans1 Jun 29, 2023
b0c8cc0
Move comment block up
rahmans1 Jun 29, 2023
0ab26c5
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 29, 2023
1b6ec2d
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 29, 2023
f6aa67f
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jun 30, 2023
cae24eb
Get B0 tracker id from dd4hep geometry rather than hard coded literal
Jul 1, 2023
3b075db
Merge branch 'main' into 404-acts-tracking-with-b0-trackers
rahmans1 Jul 1, 2023
4c408e4
Perform b0 det id lookup once instead of at every hit
rahmans1 Jul 1, 2023
fbbc9b2
Fix missing ;
rahmans1 Jul 1, 2023
70fa576
Extract detector-specific info at initialization than per event
Jul 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/algorithms/tracking/TrackerSourceLinker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ eicrecon::TrackerSourceLinkerResult *eicrecon::TrackerSourceLinker::produce(std:
std::list<eicrecon::IndexSourceLink> linkStorage;
auto sourceLinks = std::vector<std::shared_ptr<eicrecon::IndexSourceLink>>();
auto measurements = std::make_shared<eicrecon::MeasurementContainer>();
auto dd4hepGeo = m_acts_context->dd4hepDetector();

m_log->debug("Hits size: {} measurements->size: {}", trk_hits.size(), measurements->size());

Expand Down Expand Up @@ -80,19 +81,24 @@ eicrecon::TrackerSourceLinkerResult *eicrecon::TrackerSourceLinker::produce(std:

Acts::Vector2 loc = Acts::Vector2::Zero();
Acts::Vector2 pos;
auto hit_det = hit->getCellID()&0xFF;
auto onSurfaceTolerance = 0.1*Acts::UnitConstants::um; // By default, ACTS uses 0.1 micron as the on surface tolerance
if (hit_det==dd4hepGeo->constant<int>("B0Tracker_Station_1_ID")){
rahmans1 marked this conversation as resolved.
Show resolved Hide resolved
onSurfaceTolerance = 1*Acts::UnitConstants::um; // FIXME Ugly hack for testing B0. Should be a way to increase this tolerance in geometry.
}

try {
// transform global position into local coordinates
// geometry context contains nothing here
pos = surface->globalToLocal(
Acts::GeometryContext(),
{hit_pos.x, hit_pos.y, hit_pos.z},
{0, 0, 0}).value();
{0, 0, 0}, onSurfaceTolerance).value();

loc[Acts::eBoundLoc0] = pos[0];
loc[Acts::eBoundLoc1] = pos[1];
}
catch(std::exception &ex) {

m_log->warn("Can't convert globalToLocal for hit: vol_id={} det_id={} CellID={} x={} y={} z={}",
vol_id, hit->getCellID()&0xFF, hit->getCellID(), hit_pos.x, hit_pos.y, hit_pos.z);
continue;
Expand Down
10 changes: 2 additions & 8 deletions src/detectors/B0TRK/B0TRK.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
#include <global/digi/SiliconTrackerDigi_factory.h>
#include <global/tracking/TrackerHitReconstruction_factory.h>

#include <algorithms/digi/SiliconTrackerDigiConfig.h>
#include <algorithms/tracking/TrackerHitReconstructionConfig.h>


extern "C" {
void InitPlugin(JApplication *app) {
Expand All @@ -26,15 +23,12 @@ void InitPlugin(JApplication *app) {
SiliconTrackerDigiConfig digi_default_cfg;
digi_default_cfg.threshold = 0 * dd4hep::keV;
digi_default_cfg.timeResolution = 8;
app->Add(new JChainFactoryGeneratorT<SiliconTrackerDigi_factory>({"B0TrackerHits"}, "B0TrackerHitRawHit", digi_default_cfg));
app->Add(new JChainFactoryGeneratorT<SiliconTrackerDigi_factory>({"B0TrackerHits"}, "B0TrackerRawHits", digi_default_cfg));

// Convert raw digitized hits into hits with geometry info (ready for tracking)
TrackerHitReconstructionConfig hit_reco_cfg;
hit_reco_cfg.time_resolution = 8;
app->Add(new JChainFactoryGeneratorT<TrackerHitReconstruction_factory>(
{"B0TrackerHitRawHit"}, // Input data collection tags
"B0TrackerRecHits", // Output data tag
hit_reco_cfg)); // Hit reco default config for factories
app->Add(new JChainFactoryGeneratorT<TrackerHitReconstruction_factory>({"B0TrackerRawHits"},"B0TrackerRecHits", hit_reco_cfg));

}
} // extern "C"
17 changes: 8 additions & 9 deletions src/detectors/B0TRK/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,20 @@ get_filename_component(PLUGIN_NAME ${CMAKE_CURRENT_LIST_DIR} NAME)
# Setting default includes, libraries and installation paths
plugin_add(${PLUGIN_NAME})

# The macro grabs sources as *.cc *.cpp *.c and headers as *.h *.hh *.hpp
# Then correctly sets sources for ${_name}_plugin and ${_name}_library targets
# Adds headers to the correct installation directory
plugin_glob_all(${PLUGIN_NAME})

# Find dependencies
plugin_add_dd4hep(${PLUGIN_NAME})
plugin_add_acts(${PLUGIN_NAME})
plugin_add_cern_root(${PLUGIN_NAME})
plugin_add_event_model(${PLUGIN_NAME})

# Add include directories
# (same as target_include_directories but for both plugin and library)
#plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ... )
# The macro grabs sources as *.cc *.cpp *.c and headers as *.h *.hh *.hpp
# Then correctly sets sources for ${_name}_plugin and ${_name}_library targets
# Adds headers to the correct installation directory
plugin_glob_all(${PLUGIN_NAME})

# Add include directories (works same as target_include_directories)
# plugin_include_directories(${PLUGIN_NAME} SYSTEM PUBLIC ... )

# Add libraries
# (same as target_include_directories but for both plugin and library)
#plugin_link_libraries(${PLUGIN_NAME} ... )
plugin_link_libraries(${PLUGIN_NAME} algorithms_digi_library algorithms_tracking_library)
3 changes: 2 additions & 1 deletion src/detectors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_subdirectory(ZDC)
add_subdirectory(B0ECAL)

# Tracking detectors
add_subdirectory(B0TRK) # B0 tracker
add_subdirectory(BTRK) # Barrel tracker
add_subdirectory(BVTX) # Barrel vertex
add_subdirectory(ECGEM) # EndCap GEM
Expand All @@ -18,6 +17,8 @@ add_subdirectory(RPOTS) # Roman Pots
add_subdirectory(FOFFMTRK) # OffMom tracker
add_subdirectory(ECTOF) # Endcap TOF
add_subdirectory(BTOF) # Barrel TOF
add_subdirectory(B0TRK) # B0 tracker
add_subdirectory(LUMISPECCAL) # Lumi spectrometer calorimeter

# PID detectors
add_subdirectory(DRICH)
10 changes: 6 additions & 4 deletions src/global/tracking/tracking.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,16 @@ void InitPlugin(JApplication *app) {

// Tracker hits collector
app->Add(new JChainFactoryGeneratorT<TrackerHitCollector_factory>(
{
"SiBarrelTrackerRecHits", // Si tracker hits
{
"SiBarrelTrackerRecHits", // Si tracker hits
"SiBarrelVertexRecHits",
"SiEndcapTrackerRecHits",
"TOFBarrelRecHit", // TOF hits
"TOFEndcapRecHits",
"MPGDBarrelRecHits", // MPGD
"MPGDDIRCRecHits"},
"MPGDBarrelRecHits", // MPGD
"MPGDDIRCRecHits",
"B0TrackerRecHits" // B0TRK
},

"CentralTrackingRecHits")); // Output collection name

Expand Down
2 changes: 1 addition & 1 deletion src/utilities/eicrecon/eicrecon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ std::vector<std::string> EICRECON_DEFAULT_PLUGINS = {
"BHCAL",
"FHCAL",
"B0ECAL",
"B0TRK",
"ZDC",
"BTRK",
"BVTX",
"DRICH",
"ECTRK",
"MPGD",
"B0TRK",
"RPOTS",
"FOFFMTRK",
"BTOF",
Expand Down