Skip to content
Snippets Groups Projects

Add StringFragmentation as MC good endvertex

Open Simone Capelli requested to merge sicapell_stringfrag_endvtx into master
3 unresolved threads

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

Merge request pipeline #10937397 passed

Merge request pipeline passed for 41fa35dc

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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:

    Suggested change
    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
  • Please register or sign in to reply
  • Gerhard Raven requested review from @gcorti

    requested review from @gcorti

  • Gerhard Raven requested review from @ldufour

    requested review from @ldufour

    • Note that for MDST productions this means that we save more particles from the primary vertex. That could be OK, but I wonder if a normal DST production isn't the thing you want to have? Then you should have all MCVertices present.

    • Author Developer

      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) using MC_VTX_PRODUCTS , we got a list of b quarks, and only considering the StringFragmentation as GoodEndvertex I can use F.GET_GENERATION(1) to retrieve their descendants

    • That is interesting; I would think the MCHeader products are the ones living in /Event/MC/Particles, which shouldn't be the cloned ones...

    • Please register or sign in to reply
  • Please register or sign in to reply
    Loading