Mu2eKinKal passive material definition#1868
Conversation
|
Hi @RobMina,
which require these tests: build. @Mu2e/fnalbuild-users, @Mu2e/write have access to CI actions on main. 📝 The author of this pull request is not a member of the Mu2e github organisation. |
brownd1978
left a comment
There was a problem hiding this comment.
This is really nice work, I just have a few questions about optimizing the implementation.
| #include <cmath> | ||
|
|
||
| namespace mu2e { | ||
| // Ratio of the unrestricted Bethe ionization mean to KinKal's energyLoss (the restricted/moyal loss), >=1. |
There was a problem hiding this comment.
This is a useful new function, but it relies on the default KinKal energy loss to be moyal mean. A better solution is to code the unrestricted ionization mean directly, inside KinKal.
There was a problem hiding this comment.
Hi Dave, I've added a check that the KinKal energy loss is configured to use moyal mean so that this scaling is only ever applied in that case. That should maintain consistency on the Offline side until the KinKal update is in and available on cvmfs to build against.
There was a problem hiding this comment.
Thanks for this check. I agree with the AI that this block should be flagged as temporary, pending moving it to KinKal.
…eIds for muon taggers, and gate ionization loss calculation behind the only KinKal eloss configuration setting it should be used with.
77d262a to
e3e4048
Compare
|
Hi @brownd1978 , I modified the implementation of KinKalGeomMaker to use the GeometryService objects, so SimpleConfig is no longer parsed there. |
Issues found1. 2. inline double betheCorrectionFactor(MatEnv::DetMaterial const& mat, double mom, double pathlen, double mass) {
...
double const Tmax = 2.0*me*bg2/(1.0 + 2.0*gamma*me/mass + (me/mass)*(me/mass));
double const delta = mat.densityCorrection(bg2); // same density-effect KinKal uses
double const meanChange = -xi*( std::log(2.0*me*bg2/I) + std::log(Tmax/I) - 2.0*beta2 - delta );This hand-rolls the unrestricted Bethe mean using
3. Early- if(nType2 > 0) {
std::vector<double> uVerts = vertsOf(2,true), vVerts = vertsOf(2,false);
if(uVerts.empty() || vVerts.empty()) return; // <-- returns from the whole functionIf Type-2 exists but has degenerate/empty outlines, this 4. 5. Magic numbers vs. comments. The comments carry the run-2 expected values (e.g. 6. |
brownd1978
left a comment
There was a problem hiding this comment.
Thanks for modifying the shielding block code to use GeometryService objects. Aside from a few quibbles this all looks good now.
Once merged, please open an issue regarding moving the total energy calculation to KinKal proper.
| #include <cmath> | ||
|
|
||
| namespace mu2e { | ||
| // Ratio of the unrestricted Bethe ionization mean to KinKal's energyLoss (the restricted/moyal loss), >=1. |
There was a problem hiding this comment.
Thanks for this check. I agree with the AI that this block should be flagged as temporary, pending moving it to KinKal.
| DS2Coil 3.031 0.0 0.0 +2 0.813 Aluminum 0.187 NbTi 0 -10 -20 -30 20.0 1.0 solid | ||
| DSSStainless 8.02 0.0 0.0 +5 0.02 Manganese 0.01 Silicon 0.19 Chromium 0.1 Nickel 0.68 Iron 0 -10 -20 -30 20.0 1.0 solid | ||
| NbTi 6.5 0.0 0.0 +2 0.65 Niobium 0 0.35 Titanium 0 -10 -20 -30 20.0 1.0 solid | ||
| G4_Al 2.700000 0.0 0.0 +1 100.0e-2 Aluminum 0 24.01000 106.40000 -30 20.0 1.0 solid |
There was a problem hiding this comment.
This material is defined but never used (Aluminum element is used instead).
Define passive material (DS and concrete) used by KinKal for extrapolating tracks to the CRV.
This PR contains the material definitions and geometry setup, not the intersection calculation and handling (which will be in a subsequent PR). Therefore, the track extrapolation itself is unchanged relative to the current head.