Coordinates of the channels in MTC#1026
Conversation
olantwin
left a comment
There was a problem hiding this comment.
The commit messages we can fix when this is squashed.
Thanks for remembering to add a changelog entry.
SND/MTC/MTCDetHit.cxx
Outdated
| MTCDet->GetSiPMPosition(SiPMChan, sipmA, sipmB); | ||
| // Define only X and Z coordinates for Sci-Fi. | ||
| Xch = sipmB.X(); | ||
| Ych = 0.0; |
There was a problem hiding this comment.
This is because they're completely vertical?
There was a problem hiding this comment.
yes, the y coordinates can be calculated only by pairing the X coordinates of the 2 subsequent Sci-Fi planes.
SND/MTC/MTCDetHit.cxx
Outdated
|
|
||
| // Separate handling for scintillating mat (plane_type == 2) | ||
| if (plane_type == 2) { | ||
| std::vector<Float_t> x_temp, y_temp, z_temp; |
There was a problem hiding this comment.
Instead of these temporary vectors, it might be better to just sum the x,y,z values and divide at the end by n to get the mean with less memory use.
SND/MTC/MTCDetHit.h
Outdated
| private: | ||
| Float_t signals = 0; | ||
| Float_t time; | ||
| Float_t Xch, Ych, Zch; |
There was a problem hiding this comment.
Since we change the on-disk format, we should update the classdef version
There was a problem hiding this comment.
I'm not sure how does it work — will changing from ClassDef(MTCDetHit, 4) to ClassDef(MTCDetHit, 5) be enough?
There was a problem hiding this comment.
Yes, that's exactly what's needed
SND/MTC/MTCDetHit.h
Outdated
| private: | ||
| Float_t signals = 0; | ||
| Float_t time; | ||
| Float_t Xch, Ych, Zch; |
There was a problem hiding this comment.
These are not initialized in the default constructor
CHANGELOG.md
Outdated
| * Use STL vectors for SBT digitisation | ||
| * Use maximum splitting (99) for vector branches instead of no splitting (-1) | ||
| * Make TTree branch split level configurable in BaseDetector, set splitLevel=1 for MTC | ||
| * Storing channel coordinates in the digi containers. No need to read geofile |
There was a problem hiding this comment.
| * Storing channel coordinates in the digi containers. No need to read geofile | |
| * Store channel coordinates in the digi containers to avoid reading geofile |
9948311 to
ce7b47f
Compare
Following the SND@LHC logic, previously the information about the coordinates of the SiPM channels were extracted from the geometry object, making it necessary to read it in any analysis. Probably, there will be other things that will require loading geometry for MTC, but for most of the cases it is redundant and very time-consuming (from coding point of view). So, now the information about the coordinates of the SiPM channels are stored in the Xch, Ych, Zch variables.
Checklist