20 return StatusCode::SUCCESS;
26 return StatusCode::SUCCESS;
29 bool passNTrkCut =
false;
30 bool passRCut =
false;
31 bool passPtCut =
false;
32 bool passChi2Cut =
false;
33 bool passMassCut =
false;
35 bool passSelection =
false;
40 for (
auto vertex : vtxinfo.
vertices) {
47 if ( vertex ==
nullptr )
continue;
48 const size_t ntrk = vertex->nTrackParticles();
50 const float chi2 = vertex->chiSquared();
51 const float mass = vsi_massAcc.
withDefault(*vertex, 0);
53 const float x_ = vertex->position().x();
54 const float y_ = vertex->position().y();
55 const float r = std::sqrt(x_*x_+y_*y_);
76 std::array<bool,5> decisions{ passNTrkCut, passRCut, passPtCut, passChi2Cut, passMassCut };
79 passSelection = std::all_of( decisions.begin(), decisions.end(), [](
bool k ){return k;} );
81 passSelection = std::any_of( decisions.begin(), decisions.end(), [](
bool k ){return k;} );
84 if (passSelection)
break;
87 if ( !passSelection ) {
88 return StatusCode::SUCCESS;
94 return StatusCode::SUCCESS;
Helper class to provide constant type-safe access to aux data.
Header file to be included by clients of the Monitored infrastructure.
Helper class to provide constant type-safe access to aux data.
const_reference_type withDefault(const ELT &e, const T &deflt) const
Fetch the variable for one element, as a const reference, with a default.
double chi2(TH1 *h0, TH1 *h1)
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.