ATLAS Offline Software
Loading...
Searching...
No Matches
TrigZVertexHypoTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
6
8
9TrigZVertexHypoTool::TrigZVertexHypoTool(const std::string& type, const std::string& name, const IInterface* parent) :
10 ::AthAlgTool(type, name, parent),
11 m_decisionId(HLT::Identifier::fromToolName(name)) {}
12
13
15 return StatusCode::SUCCESS;
16}
17
19
20 if (info.previousDecisionIDs.count(m_decisionId.numeric()) == 0) {
21 ATH_MSG_DEBUG("Already rejected");
22 return StatusCode::SUCCESS;
23 }
24
25 int count = 0;
26 for (auto vertex : *(info.vertices)) {
27 const float weight = vertex->getDetail<float>("zfinder_vtx_weight");
28 if (m_minWeight <= weight and weight <= m_maxWeight) {
29 count++;
30 }
31 ATH_MSG_DEBUG("Found vertex of weight " << weight << " count is now " << count);
32 }
34 addDecisionID(m_decisionId.numeric(), info.decision);
35 ATH_MSG_DEBUG("Event accepted");
36 }
37 else {
38 ATH_MSG_DEBUG("Event rejected");
39 }
40
41 return StatusCode::SUCCESS;
42}
43
45 return StatusCode::SUCCESS;
46}
#define ATH_MSG_DEBUG(x)
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
virtual StatusCode initialize() override
TrigZVertexHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
virtual StatusCode finalize() override
Gaudi::Property< int > m_maxNumVertices
HLT::Identifier m_decisionId
Gaudi::Property< int > m_minWeight
Gaudi::Property< int > m_maxWeight
Gaudi::Property< int > m_minNumVertices
StatusCode decide(ZVertexInfo &decisions) const
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146
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.