13#include "GaudiKernel/PhysicalConstants.h"
21 const std::string& name,
22 const IInterface* parent )
37 return StatusCode::SUCCESS;
46 size_t numDisTrks = toolInputs.size();
50 if ( numTrigger == 1 ) {
59 return StatusCode::SUCCESS;
67 bool isPassed =
false;
68 unsigned int iDisTrk=0;
69 for (
auto& input: toolInputs ) {
84 return StatusCode::SUCCESS;
94 for (
size_t cutIndex=0; cutIndex <
m_cutTrackPtGeV.size(); ++cutIndex ) {
95 size_t elementIndex{ 0 };
96 for (
auto& input: toolInputs ) {
100 passingSelection[cutIndex].push_back( elementIndex );
109 if ( passingSelection[cutIndex].
empty() ) {
110 ATH_MSG_VERBOSE(
"No object passed selection " << cutIndex <<
" rejecting" );
111 return StatusCode::SUCCESS;
115 std::set<size_t> passingIndices;
118 if ( passingIndices.empty() ) {
120 return StatusCode::SUCCESS;
123 for (
auto idx: passingIndices ) {
128 return StatusCode::SUCCESS;
137 const std::string prefix =
"disTrk";
139 auto distrk = input.disTrk;
141 int category = (int)distrk->getDetail<int16_t>(prefix+
"_category");
142 float pt = distrk->getDetail<
float>(prefix+
"_pt");
143 float refit_pt = distrk->getDetail<
float>(prefix+
"_refit_pt");
144 float bdt_score = distrk->getDetail<
float>(prefix+
"_bdtscore");
145 pt /= Gaudi::Units::GeV;
146 refit_pt /= Gaudi::Units::GeV;
149 bool is_passed =
false;
153 if( pt >= pt_threshold_pix4l_sct0 && bdt_score >= bdt_threshold_pix4l_sct0 ) is_passed =
true;
155 else if( category==2 ) {
158 if( refit_pt >= refit_pt_threshold_pix4l_sct1p && bdt_score >= bdt_threshold_pix4l_sct1p ) is_passed =
true;
160 else if( category==3 ) {
163 if( pt >= pt_threshold_pix3l_sct0 && bdt_score >= bdt_threshold_pix3l_sct0 ) is_passed =
true;
165 else if( category==4 ) {
168 if( refit_pt >= refit_pt_threshold_pix3l_sct1p && bdt_score >= bdt_threshold_pix3l_sct1p ) is_passed =
true;
173 ATH_MSG_VERBOSE(
" isPassed = " << is_passed <<
", cut index / pT / refitPt / BDT score = " << cutIndex <<
" / " << pt <<
" / " << refit_pt <<
" / " << bdt_score);
#define ATH_MSG_VERBOSE(x)
Header file to be included by clients of the Monitored infrastructure.
static const Attributes_t empty
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
void elementsInUniqueCombinations(const Index2DVec &indices, std::set< size_t > &participants, const std::function< bool(const Index1DVec &)> &filter)
std::vector< Index1DVec > Index2DVec
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.