-
Notifications
You must be signed in to change notification settings - Fork 62
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
š„DO NOT MERGEš„ ā add new TPC alignment, hit errors and slewing corrections for 2024 #702
base: main
Are you sure you want to change the base?
Conversation
@@ -21,6 +22,8 @@ ostream& operator<<(ostream& os, const StTpcCoordinate& a) { | |||
return os << OS; | |||
} | |||
//________________________________________________________________________________ | |||
void StTpcCoordinate::Print(Option_t *option) const {cout << *this << endl;} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the use of cout and endl prompt the inclusion of Stiostream.h
? If so, just add using std::cout; using std::endl;
somewhere in this file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignored
StRoot/StBFChain/BigFullChain.h
Outdated
@@ -213,9 +213,9 @@ Bfc_st BFC[] = { // standard chains | |||
, "","","",kFALSE}, | |||
{"RC.pp.y2005" ,"","","pp2005a,tofdat,OSpaceZ2,OGridLeak3D" ,"","","",kFALSE}, | |||
{"RC.pp.y2006" ,"","","pp2006b,OSpaceZ2,OGridLeak3D" ,"","","",kFALSE}, | |||
{"RC.y2007" ,"","","DbV20080418,B2007g,IAna,KeepSvtHit,hitfilt,VFMinuit3,emcDY2,ftpc,trgd," |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes have been merged in #709. Does this imply that StHitFilterMaker
was never actually amending the output?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Several MagFactor tables added and/or modified. It looks like most just implement the ideal magnetic field for a given year. But MagFactor.y2016.C sets a non-ideal value of -1.002. Why this value when everything else is an ideal +/-1 ?
-
StEvent/StTpcHit.h / cxx extends the data stored and should result in a ID passed to the ClassDef macro. Unless there is a good reason to, we should keep these IDs consecutive, so the next value is 11 not 13 as per the PR.
There is a helper function defined in the proposed StTpcHit to return a format string for building a ROOT/TGeo of one of our geometry models of the TPC. This should go into a helper function somewhere other than StEvent.
- MDF4 Hit Error Model
This should be enabled / disabled by a BFC option, not a compile time flag.
This should use the standard Sti interface... you should not need to modify StiDetector to apply this. A wrapper class which inherits from StiHitErrorCalculator can forward the calculateError call to your StiHitErrorMDF4 class. (calculateError will need to be modified to accept an StiHit).
With that change, I think that the changes to StiTrackNodeHelper lines 1117 to 1136 can be moved into the wrapper class's calculateError function.
The easiest way to do this is with a wrapper function which inherits from StiHitErrorCalculator (or maybe StiTpcHitErrorCalculator). The wrapper class will forward the calculateError call to the MDF4 model.
@@ -7,7 +9,7 @@ TDataSet *CreateTable() { | |||
memset(&row,0,tableSet->GetRowSize()); | |||
row.runNumber = 2214033; // run number ; | |||
row.time = 996787667; // unix time of entry ; | |||
row.frequency = 9383160; // frequency in Hz ; | |||
row.frequency = 9399962; // local clock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confused by this change. There are starClockOnl.y2001.C
... starClockOnl.y2014.C
as well, which I though take precedence over this file. The frequency is set to 9399970 there.
Or is this change in effect for all years that don't have a corresponding y20xx file? If so, why is it appropriate to change those past runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to understand this. @fisyak, can you comment on this question?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We start run with cosmics (local clock) and sometime data base is not populated. This allows to use proper clock for laser runs at the very begin on run.
St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); | ||
// | ||
memset(&row,0,tableSet->GetRowSize()); | ||
row.ScaleFactor = -1.002; // ; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we changing the magnetic field in 2016?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fisyak, can you answer this question? The proposed changes should only affect 2019+ productions.
mJoinPars.hz() = mTargetHz; | ||
} | ||
|
||
mJoinPars.hz()=mTargetHz;//////////////////////??????????????????????????????????????????????????? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//////////////////////???????????????????????????????????????????????????
Not very informative comment here. This change can impact past productions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignred
@@ -65,6 +72,10 @@ void StiTrackNodeHelper::set(StiKalmanTrackNode *pNode,StiKalmanTrackNode *sNode | |||
mParentNode = pNode; | |||
mTargetNode = sNode; | |||
mTargetHz = mTargetNode->getHz(); | |||
assert(mTargetHz); | |||
if (! sNode->fitPars().hz()) sNode->fitPars().hz() = mTargetHz; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering what condition leads to this... Does this mean that in fixed target we are seeing nodes w/out a magnetic field?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some times node is created with zero filed. This is check to avoid assert.
Hi Yuri, I see several comments were made by STAR software experts. Can you follow up on these as your earliest convenience so that we can get the merger and new library set up by early next week? Thanks!! |
Thanks, @fisyak. Aside from some programming related comments there were a few more specific comments regarding functionality changes that may be beyond the 2019+ alignment. It would be good to understand the motivation. |
I ran the nightly test suite on SDCC using this
An example such log file is here:
The 64-bit jobs also all failed, unable to open Other jobs generally ran (a few are still running), and people can compare the output between yesterday's dev jobs at:
and today's jobs with this PR's code branch:
-Gene |
To use nightly test is very good idea. To make track by track comparison I need event.root files in both dev and girder. |
Event root files are needed with hits, i.e. without "hitfilt". |
Many such event.root files are available from the nightly test suite I ran...at least 48 of them. See the outputs of:
...and pretty much all the chains have |
I have posted comparison of dev and SL24y productions to answer the question on the effect of code modification on production of old (before iTPC) data with old chains. I don't see any show stoppers to start the calibration production with SL24l for all fixed target samples from 2019-2021 with new alignment (CorrZ). |
if (tpcHit) { | ||
if ((tpcHit->detector() == kTpcId || tpcHit->detector() == kiTpcId)) { | ||
if (tpcHit->flag() == 2) { | ||
fudgeFactor = 16.; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yuri suggested that these lines of code in Sti/StiTrackNodeHelper.cxx
, modifying some TPC hit errors, might be responsible for the differences seen in nightly tests with this PR vs. DEV for pre-iTPC datasets where the alignment should be unaffected. Processing a few events with and without this bit of code is quite easy, and comparing the log files obviates that the bulk of the difference in track counts does disappear when removing this section of code.
However....from looking at the log file, I see that the new alignment scheme appears to alter TPC distortion corrections for these old, pre-iTPC datasets without any change to the reconstruction chain. This is in addition to the modification to TPC distortion corrections ("OSectorAlign") that Yuri wants to impose with the "CorrZ" chain option he has proposed for iTPC-era datasets for which I have expressed an interest in seeing a justification (through data, not anecdotally).
< StMagUtilities::XTWIST = -0.38 mrad
< StMagUtilities::YTWIST = 0.25 mrad
---
> StMagUtilities::XTWIST = 0 mrad
> StMagUtilities::YTWIST = 0 mrad
< StMagUtilities::WestClock = -0.43 mrad
---
> StMagUtilities::WestClock = 0 mrad
I do not recall this being discussed before, neither in the context of pre-iTPC datasets, nor with the new alignment. If the TPC alignment calibration was truly performed without any correction for the distortions due to the misalignment of the E and B fields (represented by the XTWIST & YTWIST numbers), I have significant concerns about this TPC alignment. Hopefully I am missing something and this is not the case.
I have placed output of the nightly test without this particular code (but including the rest of this PR) at this location:
This PR minus hit error change :
/star/rcf/test/gitdev/daq_sl302.stica/Mon/year_2016/AuAu200_production_2016_64bit/
This is for comparison with other iterations:
DEV :
/star/rcf/test/dev/daq_sl302.stica/Sat/year_2016/AuAu200_production_2016_64bit/
This PR :
/star/rcf/test/gitdev/daq_sl302.stica/Tue/year_2016/AuAu200_production_2016_64bit/
This PR before the Sept. 11th commits :
/star/rcf/test/gitdev/daq_sl302.stica/Wed/year_2016/AuAu200_production_2016_64bit/
I am making note of the last two in particular because Yuri's study involved the output from the last one (those jobs were started on September 11th before the time of Yuri's last commits), even though data with those commits was available. (Side note, please pay no heed to the "Tue" or "Mon" in the gitdev paths, as I moved files there from other days to avoid them being over-written.) I will note that I didn't see any effective impact of those commits on this particular test's track counts (i.e. the last two outputs may be identical).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yuri has corrected me:
The "Twist" and "Clock" distortion corrections have not actually been used for the past decade, beginning with the prior "New Tpc Alignment" that was introduced around that time. StMagUtilities prints these numbers, but there has been no distortion correction applied. The alignment work introduced in this PR has resulted in the printed values being zero, but no actual effect on the applied distortion corrections.
new TPC Alignment 24
new TPC hit errors and slewing correction
The detailed description can be found at
https://drupal.star.bnl.gov/STAR/system/files/TPC24c.Export.Mini_.pdf