Conversation
|
@zoglauer The newly defined GR and XE hits don't make it through revan. The GR hits have the error "Position of GR does not represent a detector with guard ring!" since we define the guard ring volume as either Simple or Scintillator. Why don't we use the MDDetector class GuardRing in the geometry? The XE hits have the error "Position of XE does not represent a drift chamber!" since it's checking to see whether the hit is in a DriftChamber detector type. This MREAM class does what we want, but the MREAMDriftChamber is too specific and, obviously, has the wrong detector type. Should we make a new MREAM class to handle these hits with no position calibration in the GeDs? Maybe MREAMEnergyDeposit? |
|
I will handle that. |
Let me know when you'll get to the revan changes @zoglauer. I'd like to test this all the way through. |
|
I plan to update this considering all of the class cleanup work Andreas has been doing. Hold off on the review for now. |
Included option to save QA-flagged events
Continue rebase with develop/em
Continue rebasing
|
I've rebased this PR and now it compiles and gives the assigned position with the detector volume for GR and XE hits (without defined position to be handled in revan). Still to-do is to improve the fault tolerance, especially in the GRDetector definition and figure out how to make it past the failing Nuclearizer Tests. |
|
The same events shown above now look like this: Event ID 999 has no change The positions given for the XE hits have changed since these are randomly generated and only need to be somewhere in the detector volume. The GR and XE hit positions have changed. And now I'm more confident that the GR hit is actually within the GR volume. |
|
Also, to do, check that this hit info is properly streamed to all file types. So far, I've only checked evta files. |
|
Updated to now include the same GR and XE information in the .dat file. Here is the output in the .dat file for the same events above shown for the .evta file: I also robustified the GR Detector finding in MModuleDepthCalibration::LoadDetectorDimensions and confirmed that this works for the STTC mass model and the COSI-SMEX-Payload mass model. The UnitTests fail and the and MModuleRevan currently crashes (even after updating with PR #211), I'm assuming because the XE and GR events aren't handled properly. When running the .evta file through revan manually, I get these warnings printed to screen: |
|
@zoglauer copying my message from above that still applies: The newly defined GR and XE hits don't make it through revan. The GR hits have the error "Position of GR does not represent a detector with guard ring!" since we define the guard ring volume as either Simple or Scintillator. I assume we're not using the MDDetector GuardRing class since we cannot define it's shape as accurately as we need? The XE hits have the error "Position of XE does not represent a drift chamber!" since it's checking to see whether the hit is in a DriftChamber detector type. This MREAM class does what we want, but the MREAMDriftChamber is too specific and, obviously, has the wrong detector type. Should we make a new MREAM class to handle these hits with no position calibration in the GeDs? Maybe MREAMEnergyDeposit? Let me know if you want me to do more checks. I think this is good for you to review and make the appropriate changes in MEGAlib. |
|
What data should I use for testing? |
|
Can you merge in the latest changes in nuclearizer, too? |
|
hacked the merge myself and getting it to crash with the unit tests - investigating... |
|
To prevent the crash you have to set in MModuleRevan: |
@zoglauer Do you still need data to test this with or did you make some yourself? I assume you're looking for an evta file with the XE and GR hit types? |
This is a draft PR that addresses issues with the position determination in the Depth Calibration. I presented at the CDEE meeting in April showing examples of these "bad" events in the evta file:
Andreas's comments for me at the meeting:

(Julian handed 5 already)
With this PR, I'm saving the GR hits in the evta file with the "GR" keyword and assigning them a random position in the guard ring volume. For events that fail the depth calibration, we're using the "XE" keyword and again just assign the hit a random position within the detector volume. These keywords are streamed to the evta file though the MHit::StreamEvta function, but I haven't yet done the same for the .dat files.
Now, looking at the same events as above, we now get
Note this is a good event, and now we have the TI information from PR #124 , and better QA details from Strip pairing from PR #121 .
This event consisted of multiple hits on a single strip. It's only a QA flag in strip pairing since Julian is able to figure out the most likely ordering, but the depth calibration still fails to find the right position. Here these three hits are given the XE flag to track the extra energy deposit.
Previously, this event didn't get any position calibration since there's a GR hit and it got passed over. Now, we have one hit properly calibrated, another hit which was >5 sigma out of the expected CTD range, therefore it's flagged as just an XE event, and there's a GR hit as well.
I've also cleaned up the MModuleDepthCalibration code quite a bit, and removed white spaces from MHit.
And, against my better judgement, I also included the QA flag button/selection in MEventSaver in this same PR. If you want, I can remove that here and make it a stand-alone PR for that commit.
I'll save the redefinition of the CC NStripHits keyword and the BD VETO keyword for another PR since this one has already become length.