Skip to content

Coordinates of the channels in MTC#1026

Merged
olantwin merged 4 commits intoShipSoft:masterfrom
eduard322:mtc_upd_coords
Feb 6, 2026
Merged

Coordinates of the channels in MTC#1026
olantwin merged 4 commits intoShipSoft:masterfrom
eduard322:mtc_upd_coords

Conversation

@eduard322
Copy link
Contributor

@eduard322 eduard322 commented Feb 5, 2026

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

@eduard322 eduard322 requested a review from a team as a code owner February 5, 2026 17:43
Copy link
Contributor

@olantwin olantwin left a comment

Choose a reason for hiding this comment

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

The commit messages we can fix when this is squashed.
Thanks for remembering to add a changelog entry.

MTCDet->GetSiPMPosition(SiPMChan, sipmA, sipmB);
// Define only X and Z coordinates for Sci-Fi.
Xch = sipmB.X();
Ych = 0.0;
Copy link
Contributor

Choose a reason for hiding this comment

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

This is because they're completely vertical?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, the y coordinates can be calculated only by pairing the X coordinates of the 2 subsequent Sci-Fi planes.


// Separate handling for scintillating mat (plane_type == 2)
if (plane_type == 2) {
std::vector<Float_t> x_temp, y_temp, z_temp;
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

private:
Float_t signals = 0;
Float_t time;
Float_t Xch, Ych, Zch;
Copy link
Contributor

Choose a reason for hiding this comment

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

Since we change the on-disk format, we should update the classdef version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how does it work — will changing from ClassDef(MTCDetHit, 4) to ClassDef(MTCDetHit, 5) be enough?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, that's exactly what's needed

private:
Float_t signals = 0;
Float_t time;
Float_t Xch, Ych, Zch;
Copy link
Contributor

Choose a reason for hiding this comment

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

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
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Storing channel coordinates in the digi containers. No need to read geofile
* Store channel coordinates in the digi containers to avoid reading geofile

@olantwin olantwin merged commit cb33832 into ShipSoft:master Feb 6, 2026
7 checks passed
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.

2 participants