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

genDst adaption for eTOF #358

Merged
merged 63 commits into from
Jun 22, 2022
Merged

genDst adaption for eTOF #358

merged 63 commits into from
Jun 22, 2022

Conversation

PhilippWeidenkaff
Copy link
Contributor

Contains:

-Implementation of eTOF makers in genDst script
-Adjustments to eTOF calib-, hit-, and matchmaker to check for muDsts when empty StEvents are found (needed to run in genDst.C due to EMC makers)
-Database interface for alignment parameters in Geometry class and Matchmaker

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
PhilippWeidenkaff and others added 4 commits June 9, 2022 16:45
Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
Co-authored-by: Dmitri Smirnov <dmixsmi@gmail.com>
… adjusted Matchmaker accordingly. Changed behavior of overloaded init() function in StEtofGeometry to load database alignmnet in any case.
…ePulserOffsets to avaoid crash on empty StEvent
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.h Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.h Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
StRoot/StETofCalibMaker/StETofCalibMaker.cxx Outdated Show resolved Hide resolved
StRoot/StETofUtil/StETofGeometry.cxx Outdated Show resolved Hide resolved
Copy link
Member

@plexoos plexoos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Phillipp for addressing the comments!

@plexoos plexoos merged commit 3c39a67 into star-bnl:main Jun 22, 2022
@genevb
Copy link
Contributor

genevb commented Jun 23, 2022

Unfortunately, merging this PR appears to have caused numerous nightly test job failures for year 2019+ datasets (and tagging SL22b may have been premature). Example from a nightly test log file /star/rcf/test/dev/daq_sl302.ittf/Thu/year_2020/production_11p5GeV_2020/st_physics_20351078_raw_5000001.log:

StETofHitMaker:INFO - *** StETofHitMaker::Make() == StOK(0) ***
StETofMatchMaker:INFO - StETofMatchMaker::InitRun()
StETofMatchMaker:INFO - etofMatchParam: no filename provided --> load database table
StETofMatchMaker:INFO - match radius: 2
StETofMatchMaker:INFO - track cut (nHitsFit): 5
StETofMatchMaker:INFO - track cut (nHitsRatio): 0
StETofMatchMaker:INFO - track cut (low pt): 0.045
StETofMatchMaker:INFO - creating a new eTOF geometry . . .
StETofMatchMaker:INFO - eTOF geometry initialization ...
StETofMatchMaker:INFO - No etof alignment file provided --> use database:
StChain:WARN - StDbSql::QueryDb(table,time) line=439 etofAlign has No data for query
StETofMatchMaker:FATAL - TUnixSystem::DispatchSignals : segmentation violation

How to reproduce in DEV:

root4star -b -q -l 'bfc.C(2,"P2020a,btof,mtd,etofA,BEmcChkStat,picoVtxDefault,PicoCovMtxWrite,-hitfilt,QAalltrigs","/star/rcf/test/daq/2020/351/st_physics_20351078_raw_5000001.daq")'

Please have a look.

Thanks,
-Gene

@genevb
Copy link
Contributor

genevb commented Jun 23, 2022

gdb says:

Program received signal SIGSEGV, Segmentation fault.
0xeb6cd819 in StETofGeometry::readAlignmentDatabase (this=0x15966d50) at .sl73_gcc485/OBJ/StRoot/StETofUtil/StETofGeometry.cxx:1530
1530 St_etofAlign* etofAlign = static_cast< St_etofAlign * > ( dbDataSet->Find( "etofAlign" ) );
(gdb) p dbDataSet
$1 = (TDataSet *) 0x0

This appears to be the common case of not having a database table entry applicable for data for which the table isn't needed. The likely solutions are:

  1. Place a default (ideal) entry in the database with beginTime from before all data for which this code may be run. We usually use "1996-01-01" as a default. It may also be necessary for the entryTime to be set (with the help of @dmarkh ) to "1996-01-01" to ensure old BFC chains for this data with this maker, but with a DbV, do not crash. This may not require a code update depending on what is supposed to happen for this case in the code.

  2. Modify the code not to crash if no valid entry for the table is found.

However, there were other jobs that crashed too without the etofAlign error. Example:
/star/rcf/test/dev/daq_sl302.stica/Wed/year_2022/production_pp500_2022/st_physics_23010027_raw_1000015.log
which appears to have still crashed in the StETofMatchMaker:
StETofMatchMaker:FATAL - TUnixSystem::DispatchSignals : bus error

-Gene

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Jun 24, 2022 via email

plexoos added a commit to plexoos/star-sw that referenced this pull request Jun 24, 2022
@plexoos
Copy link
Member

plexoos commented Jun 25, 2022

Example from a nightly test log file /star/rcf/test/dev/daq_sl302.ittf/Thu/year_2020/production_11p5GeV_2020/st_physics_20351078_raw_5000001.log:

root4star -b -q -l 'bfc.C(2,"P2020a,btof,mtd,etofA,BEmcChkStat,picoVtxDefault,PicoCovMtxWrite,-hitfilt,QAalltrigs","/star/rcf/test/daq/2020/351/st_physics_20351078_raw_5000001.daq")'

I added the same test in #371. It passed without crashing

Screen Shot 2022-06-25 at 10 25 58 AM

Here are the same lines from the log file (search for StETofMatchMaker::InitRun)

StETofMatchMaker:INFO  - StETofMatchMaker::InitRun()
StETofMatchMaker:INFO  - etofMatchParam: no filename provided --> load database table
StETofMatchMaker:INFO  -  match radius: 2
StETofMatchMaker:INFO  -  track cut (nHitsFit): 5
StETofMatchMaker:INFO  -  track cut (nHitsRatio): 0
StETofMatchMaker:INFO  -  track cut (low pt): 0.045
StETofMatchMaker:INFO  -  creating a new eTOF geometry . . . 
StETofMatchMaker:INFO  -  eTOF geometry initialization ... 
StETofMatchMaker:INFO  - No etof alignment file provided --> use database: 
StETofMatchMaker:INFO  - amount of valid modules: 36
StETofMatchMaker:INFO  - *** StETofMatchMaker::Make() == StOK(0) ***

The etofAlign table seems to be in the DB, and it contains some entries.
Maybe a full rebuild of the libraries can help... Not sure what else to suggest

@genevb
Copy link
Contributor

genevb commented Jun 25, 2022

Hi, Philipp

I see the default database entry is probably working now. However, I noticed that the default entry will be used for the first month of Run 20, which started in early December of 2019, because the entry you had in there before had a timestamp of 2020-01-01. If the default entry has the same content as the 2020-01-01 entry, then that is probably of no consequence. But if they are different, that may not be as desired.

Thanks,
-Gene

@PhilippWeidenkaff
Copy link
Contributor Author

PhilippWeidenkaff commented Jun 27, 2022 via email

plexoos added a commit that referenced this pull request Jun 27, 2022
* ci: Run tests over 2020 AuAu 11.5GeV

Inspired by the issue reported at
#358 (comment)

* ci: Add tests for 2012, 2021, and 2022 data
plexoos added a commit that referenced this pull request Jul 6, 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 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants