Separate TAC calibration and cuts - #194
Conversation
67407bc to
f3febab
Compare
f3febab to
8ab5b2e
Compare
|
|
The unit tests fail because the changes seem to affect the end-to-end test results on both 406-1 and 542-1. |
|
Pushing some changes to the nuclearizer config file to work with the new XML tags. |
| </XmlTagTACcut> | ||
| <ApplyTACCuts>true</ApplyTACCuts> | ||
| <TACCut> | ||
| <CoincidenceWindow>600</CoincidenceWindow> |
There was a problem hiding this comment.
Small comment on the 600: I know the previous taccut files had 500 in them, but that value was never used (previously, the coincidence value was always set to the hard-coded value of 600 in the code). So this setting will make sure that the unit tests are run with the same settings as before.
ckierans
left a comment
There was a problem hiding this comment.
Nice rework, @NicoleRodriguezCavero! I just have a few questions about the error messages, and the ordering of the modules.
| MModuleTACcut TACcut; | ||
| TACcut.SetTACCalFileName(m_TACCalFileName); | ||
| if (TACcut.LoadTACCalFile(m_TACCalFileName) == true) { | ||
| MModuleTACCalibration TACcal; |
There was a problem hiding this comment.
Nitpicky, but maybe use TACCal vs TACcal as the MModuleTACCalibration instance to be consistent with the capitalization of the "C" in Cal
There was a problem hiding this comment.
Probably best to call this variable TACCalibration ;)
|
|
||
| // Set all modules, which can follow this module | ||
| AddSucceedingModuleType(MAssembly::c_StripPairing); | ||
| AddSucceedingModuleType(MAssembly::c_DepthCorrection); |
There was a problem hiding this comment.
The DepthCorrection module isn't actually allowable here since it has it's own dependance that StripPairing must be performed first, so I think this can be removed.
|
|
||
| // Set all modules, which have to be done before this module | ||
| AddPreceedingModuleType(MAssembly::c_EventLoader); | ||
| AddPreceedingModuleType(MAssembly::c_EnergyCalibration); |
There was a problem hiding this comment.
So now we're enforcing the EnergyCalibration to happen before the TAC Calibration? This is different than what we previously had where we left it up to the user (I think I've always done TAC first then Energy), which is probably the wrong approach! Have we confirmed there is not change of behavior with TAC Calibration -> Energy Calibration vs Energy Calibration -> TAC Calibration? I don't think it should necessarily matter, but I want to make sure we're being intentional about the order.
Honestly, this got me looking at the other Nuclearizer dependancies, and I do think we should enforce only one option for the order for TAC/Energy, so I'm happy to see this change!
| <<" on side "<<Side | ||
| <<" does not have enough TAC calibration parameters - skipping event" | ||
| <<endl; | ||
| return false; |
There was a problem hiding this comment.
Do you mean to use return false or continue here? Return false will stop the whole Nuclearizer run if one of these conditions are met, it won't just skip the event. continue will just skip the event currently being processed. See for example lines 168 -- 174 in the MModuleEnergyCalibration for when there is no valid energy calibration for a striphit. If we want to not throw a full error and stop Nuclearizer if a TAC Calibration for a single strip is unknown, then we probably should introduce a TACCalibrationError flag, similar to the EnergyCalibrationError flag, and downgrade this to a Warning vs an Error.
I'm also wondering if it makes more sense to combine the valid calibration parameters + at least two parameters describing the calibration into one warning/error.
Take a closer look at these error messages and think about when we really need to stop Nuclearizer, and when we just need a flag for an event.
| if (Passed == true) { | ||
| ++i; | ||
| } else { | ||
| Event->RemoveStripHit(i); |
There was a problem hiding this comment.
Is there any reason to track the events for which we've removed striphits with the TAC cut? Does this give any indication of the quality of the event, or any information about the rest of the striphits?



Currently,
MModuleTACCutperforms the TAC calibration and applied the TAC cuts all within theAnalyzeEvent()functions. This PR:ApplyTACCal()andApplyTACCuts()functions and calls them inAnalyzeEvent()MModuleTACCuttoMModuleTACCalibrationTACcuttoTACcalibrationaddressing part of Consistent use of XML tags #193