eic / EICrecon

EIC Reconstruction - JANA based
https://eic.github.io/EICrecon
GNU Lesser General Public License v3.0
6 stars 28 forks source link

Tracker parameters in `reco_flags.py` are ignored #391

Closed c-dilks closed 1 year ago

c-dilks commented 1 year ago

Environment: (where does this bug occur, have you tried other environments)

Steps to reproduce: (give a step by step account of how to trigger the bug)

The tracking parameters in reco_flags.py appear not to be overriding the values used in the factory+algorithm. In particular, TrackerHitReconstruction is always configured to have a time resolution of 10 nanoseconds.

I made a list of all collection names (tags) used in reco_flags.py, then searched for any C++ files which mention them. Those with zero mentions could identify potentially unused parameters in reco_flags.py:

('BTRK:BarrelTrackerHit:TimeResolution',     '8',     '* [ns] Time resolution set to covariance matrix for CKF input'),
('BTRK:BarrelTrackerRawHit:Threshold',       '0',     '* [GeV] EDep threshold for hits to pass through,                 '),
('BTRK:BarrelTrackerRawHit:TimeResolution',  '8',     '* [ns] Time resolution gauss smearing'),
('BVTX:BarrelVertexHit:TimeResolution',      '8',     '* [ns] Time resolution set to covariance matrix for CKF input'),
('BVTX:BarrelVertexRawHit:Threshold',        '0',     '* [GeV] EDep threshold for hits to pass through'),
('BVTX:BarrelVertexRawHit:TimeResolution',   '8',     '* [ns] Time resolution gauss smearing [ns]'),
('ECTRK:EndcapTrackerHit:TimeResolution',    '8',     '* [ns] Time resolution set to covariance matrix for CKF input'),
('ECTRK:EndcapTrackerRawHit:Threshold',      '0',     '* [GeV] EDep threshold for hits to pass through'),
('ECTRK:EndcapTrackerRawHit:TimeResolution', '8',     '* [ns] Time resolution gauss smearing'),
('MPGD:MPGDTrackerRawHit:Threshold',         '0',     '* [GeV] EDep threshold for hits to pass through'),
('MPGD:MPGDTrackerRawHit:TimeResolution',    '8',     '* [ns] Time resolution gauss smearing'),
('BTOF:TOFBarrelRawHit:Threshold',           '0',     '* [GeV] EDep threshold for hits to pass through'),
('BTOF:TOFBarrelRawHit:TimeResolution',      '0.025', '* [ns] Time resolution gauss smearing'),
('BTOF:TOFBarrelTrackerHit:TimeResolution',  '0.025', '* [ns] Time resolution set to covariance matrix for CKF input'),
('ECTOF:TOFEndcapRawHit:Threshold',          '0',     '* [GeV] EDep threshold for hits to pass through'),
('ECTOF:TOFEndcapRawHit:TimeResolution',     '0.025', '* [ns] Time resolution gauss smearing'),
('ECTOF:TOFEndcapTrackerHit:TimeResolution', '0.025', '* [ns] Time resolution set to covariance matrix for CKF input'),

These are all of the tracker parameters... Is there a mismatch in tracker collection names? For example, BVTX.cc has:

app->Add(new JChainFactoryGeneratorT<SiliconTrackerDigi_factory>({"VertexBarrelHits"}, "BarrelVertexDigiHits"));
app->Add(new JChainFactoryGeneratorT<TrackerHitReconstruction_factory>({"BarrelVertexDigiHits"}, "SiBarrelVertexRecHits"));
DraTeots commented 1 year ago

Yes, that is apparently what has happened. Tracking experts asked some hits names to be changed to be more consistent, and those names apparently (good catch!) hasn't been changed in reco_flags accordingly.

The good news, that I'm half way through removing reco_flags at all...

c-dilks commented 1 year ago

The good news, that I'm half way through removing reco_flags at all...

Just curious, what's your plan? Asking before I do anything dumb in a dRICH branch...

DraTeots commented 1 year ago

There is a table, that is generated after each commit to main branch, which allows to show the difference between flags set by user (i.e. provided to EICrecon) and its default values for flags set in C++ code:

https://eic.github.io/EICrecon/#/table_flags/flags_view

Since reco_flags.py sets all the flags, the difference you see there now is the difference between reco_flags and Defaults set in EICrecon.

My work is pretty dump, to change C++ code around configs and SetDefaultParameter until "Show Diff" in table is empty.

Please do whatever is needed in dRICH branch. I haven't changed anything related and if there will be any conflicts in the end will coordinate it with you.

BTW, you can run the same site and use the difference table on a local machine, build, etc. The site is in doc folder and just runs, and you can find there json file, which is created by dump_flags plugin.