Add StringFragmentation as MC good endvertex
This MR add MCvertex::StringFragmentation
among the list of GoodEndVertex.
This allows for example to get the list of descendants from a quark present among the vertex decay products of PV.
Merge request reports
Activity
added RTA label
added 6 commits
-
8627888c...60c6788c - 2 commits from branch
master
- 39430689 - add StringFragmentation among the list of MC GoodEndVertex
- 87755e68 - pre-commit fixes
- 31d2b9d9 - fix braket typo
- 41fa35dc - add back spaces into description
Toggle commit list-
8627888c...60c6788c - 2 commits from branch
requested review from @amathad
mentioned in issue Moore#927 (closed)
mentioned in issue Moore#936
Hi @sicapell, I mentioned it in the RTA software shifter report! I am not really an expert on this, so you probably need a review by someone else, although it looks like a small change to me that could be implemented
Feel free to tag relevant people to review this work and move on with the test once approved
65 65 66 66 const auto j = 67 67 std::find_if( v.begin(), v.end(), []( auto vtx ) { return vtx->type() == MCVertex::HadronicInteraction; } ); 68 return j != v.end() ? *j : nullptr; 68 if ( j != v.end() ) return *j; 69 const auto k = 70 std::find_if( v.begin(), v.end(), []( auto vtx ) { return vtx->type() == MCVertex::StringFragmentation; } ); 71 return k != v.end() ? *k : nullptr; - Comment on lines 67 to +71
whether or not this change is a good idea (as it presumably will have significant downstream fall-out on lots of things - as noted by the comment/warning on L44) I will not comment on, but this is certainly not the most efficient way to implement this:
59 return true; 60 default: 61 return false; 62 } 63 } ); 64 if ( i != v.end() ) return *i; 65 66 const auto j = 67 std::find_if( v.begin(), v.end(), []( auto vtx ) { return vtx->type() == MCVertex::HadronicInteraction; } ); 68 if ( j != v.end() ) return *j; 69 const auto k = 70 std::find_if( v.begin(), v.end(), []( auto vtx ) { return vtx->type() == MCVertex::StringFragmentation; } ); 71 return k != v.end() ? *k : nullptr; 59 case MCVertex::HadronicInteraction: 60 case MCVertex::StringFragmentation: 61 return true; 62 default: 63 return false; 64 } 65 } ); 66 return i != v.end() ? *i : nullptr; Edited by Gerhard Raven
requested review from @gcorti
requested review from @ldufour
This is an example of the bookeeping path that we were using: `
MC/2024/Beam6800GeV-2024.W40.42-MagUp-Nu7.6-25ns-Pythia8/Sim10d/HLT2-2024.W40.42/10000000/HLT2.DST`
Maybe there is something wrong with the approach we are using: when accessing the decay products from
F.MC_ALLPVS(mc_header)
usingMC_VTX_PRODUCTS
, we got a list ofb
quarks, and only considering the StringFragmentation as GoodEndvertex I can useF.GET_GENERATION(1)
to retrieve their descendants