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

Fix misconfigured alignment correction in #358, change default start time in eTOF #372

Merged
merged 70 commits into from
Jul 6, 2022

Conversation

PhilippWeidenkaff
Copy link
Contributor

@PhilippWeidenkaff PhilippWeidenkaff commented Jun 27, 2022

  • Changing default start time modus in StEtofMatchMaker to use bTOF only start time instead of eTOF hybrid start time.
  • Added error hand-down from eTOF geometry to matchmaker if no alignment database table is found.

Additional notes:

This patch (PR #372) fixes a bug missed while introducing misalignment parameters for ETOF counters in PR #156
The code was reading a wrong number of entries from the database thus disabling the correction effect for all channels

Philipp Weidenkaff and others added 30 commits June 3, 2021 11:01
…l setters from etofIn001 version of this file. Needed to unpack Get4Status bit into event files
…librations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.
…librations in the repository version. Nessecary only for creating calibrations, but should be available in the offical code. Added calculation of goodEventFlag for every counter from Get4 missmatch bits and pulser digis.
…ect header version after rebase without increment
…base. Decremented etof collection ClassDef for real this time
plexoos and others added 4 commits June 22, 2022 13:52
…me only. Hybrid start time shows a shift of 150 ps compared to bTOF only
… and MatchMaker. Clearing alignment during reset of geometry now.
@starsdong
Copy link
Member

Philipp, to be clear, is this PR needed for the Run20 FXT picoDst reproduction? If yes, we need to include this to the SL22b library then.

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Jun 28, 2022 via email

@plexoos
Copy link
Member

plexoos commented Jun 28, 2022

The title and the description of this PR need to be updated to reflect the primary reason for the fix. I see a quite severe bug fixed when a wrong number of alignment values is copied from the DB table into an internal container mAlignmentParameters. The newly introduced check for the number of expected parameters in mAlignmentParameters is too late to really check if "no alignment database table is found". While the table is now pretty much guaranteed to be available in the database it is still a good idea to follow the suggestion in #358 (comment) and check for valid dbDataSet

@plexoos
Copy link
Member

plexoos commented Jun 30, 2022

I am ok with the fixes but is it possible to see an evidence demonstrating the problems being fixed?

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Jul 1, 2022 via email

@plexoos
Copy link
Member

plexoos commented Jul 1, 2022

I suppose you are asking about the geometry changes, right?

Yes, my concern is about this fix:

    float tempZ;

-    for( int iCounter = 0; iCounter < eTofConst::nCounters; iCounter++){
+    for( int iCounter = 0; iCounter < eTofConst::nCounters * eTofConst::nModules; iCounter++){
        tempX = table[iCounter].detectorAlignX[0];
        tempY = table[iCounter].detectorAlignY[0];
        tempZ = table[iCounter].detectorAlignZ[0];
        StThreeVectorD counterAlignmentParameter = StThreeVectorD( tempX, tempY, tempZ );
        mAlignmentParameters.push_back( counterAlignmentParameter );
    }

The crash due to the wrongly used etofConstants::nCounters is evidently fixed as the automatic test that found it in the first place is now succeding.

That is not entirely true.
The automatic tests in CI never failed with or without the fix.
The nightly tests at SDCC failed as reported by Gene here #358 (comment) but since then there was no problem and the log file looks good /star/rcf/test/dev/daq_sl302.ittf/Thu/year_2020/production_11p5GeV_2020/st_physics_20351078_raw_5000001.log
So, whatever "fixed" the problem reported by Gene was not your fix because the code on the farm still does not include it, i.e. we have not merged this PR yet.

The fix looks reasonable though as the loop now goes to 108 as expected rather than to 3 but we'd learn more from this unfortunately overlooked bug if we see the effect in the results. I assume you already ran your tests to verify that this time everything works as expected. Perhaps you already have some before and after plots.

…ignment table accessor in StEtofGeometry.cxx to match readDB macros (This fixes a crash if user version matchmaker is executed with QaFlag set ???!
@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Jul 4, 2022 via email

@plexoos
Copy link
Member

plexoos commented Jul 5, 2022

attached is an example how the matching deviations look like with both versions.

Unfortunately, attachments don't work when you reply to GitHub's emails. Instead, you can insert a link to your file or drag and drop images in the comment area when you use the web interface. Also, can you be more specific which versions you compare? My expectation is that you compare the head of the main branch in star-bnl with this PR branch containing all the changes, but please confirm. I think if your tests show that the alignment is now activated and works for the code in this PR then we are done.

Regarding the "bus error", I checked some recent log files in /star/rcf/test/dev/ but didn't find anything related. It does not seem reproducible so, I wouldn't worry about it now.

@PhilippWeidenkaff
Copy link
Contributor Author

@plexoos
Copy link
Member

plexoos commented Jul 6, 2022

Thank you, Philipp for this perfect illustration of misalignment correction. I'll assume that all of the counters are affected in a similar manner.

@plexoos plexoos changed the title Changing default start time handling in eTOF match maker Fix misconfigured alignment correction in #358, change default start time in eTOF Jul 6, 2022
@plexoos plexoos added this to the SL22b milestone Jul 6, 2022
@plexoos plexoos added the bug Something isn't working label Jul 6, 2022
@plexoos plexoos merged commit 5bb9087 into star-bnl:main Jul 6, 2022
plexoos added a commit that referenced this pull request Jul 8, 2022
…time in eTOF (#372)

- Changing default start time modus in StEtofMatchMaker to use bTOF only start time instead of eTOF hybrid start time. 
- Added error hand-down from eTOF geometry to matchmaker if no alignment database table is found.

Additional notes:

This patch (PR #372) fixes a bug missed while introducing misalignment parameters for ETOF counters in PR #156
The code was reading a wrong number of entries from the database thus disabling the correction effect for all channels

Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
plexoos added a commit that referenced this pull request Jul 11, 2022
… ... (#376)

Fix misconfigured alignment correction in #358, change default start time in eTOF (#372)

- Changing default start time modus in StEtofMatchMaker to use bTOF only start time instead of eTOF hybrid start time. 
- Added error hand-down from eTOF geometry to matchmaker if no alignment database table is found.

Additional notes:

This patch (PR #372) fixes a bug missed while introducing misalignment parameters for ETOF counters in PR #156
The code was reading a wrong number of entries from the database thus disabling the correction effect for all channels

Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Oct 11, 2022 via email

@genevb
Copy link
Contributor

genevb commented Oct 13, 2022

Just a follow-up note that many classes that read from the database are not prepared for handling the case where there is no valid (acceptable) database entry. Instead, for those, there is an entry in the database which serves as a default. Such an entry has both beginTime and entryTime (falsified) to be 1996-01-01, so that all data and all real DbV values would accept that default entry as a candidate. Often times such an entry's contents are just zeros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants