ATLAS Offline Software
TrigZVertexHypoTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
5 #include "TrigZVertexHypoTool.h"
6 
8 
9 TrigZVertexHypoTool::TrigZVertexHypoTool(const std::string& type, const std::string& name, const IInterface* 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  }
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 }
grepfile.info
info
Definition: grepfile.py:38
TrigZVertexHypoTool::initialize
virtual StatusCode initialize() override
Definition: TrigZVertexHypoTool.cxx:14
TrigCompositeUtils.h
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
TrigZVertexHypoTool::m_maxNumVertices
Gaudi::Property< int > m_maxNumVertices
Definition: TrigZVertexHypoTool.h:37
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
TrigZVertexHypoTool::decide
StatusCode decide(ZVertexInfo &decisions) const
Definition: TrigZVertexHypoTool.cxx:18
TrigZVertexHypoTool::m_maxWeight
Gaudi::Property< int > m_maxWeight
Definition: TrigZVertexHypoTool.h:39
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigZVertexHypoTool::TrigZVertexHypoTool
TrigZVertexHypoTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: TrigZVertexHypoTool.cxx:9
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigZVertexHypoTool::finalize
virtual StatusCode finalize() override
Definition: TrigZVertexHypoTool.cxx:44
TrigZVertexHypoTool::ZVertexInfo
Definition: TrigZVertexHypoTool.h:24
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
TrigZVertexHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigZVertexHypoTool.h:35
TrigZVertexHypoTool::m_minWeight
Gaudi::Property< int > m_minWeight
Definition: TrigZVertexHypoTool.h:38
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
TrigZVertexHypoTool.h
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthAlgTool
Definition: AthAlgTool.h:26
TrigZVertexHypoTool::m_minNumVertices
Gaudi::Property< int > m_minNumVertices
Definition: TrigZVertexHypoTool.h:36