|
ATLAS Offline Software
|
Go to the documentation of this file.
30 return StatusCode::SUCCESS;
44 int countPassingVtx = 0;
45 int countPassing_pt05 = 0;
46 int countPassing_pt1 = 0;
47 int countPassing_pt2 = 0;
48 int countPassing_pt4 = 0;
49 int countPassing_pt6 = 0;
50 int countPassing_pt8 = 0;
52 for (
const auto trk : *offlineTrkHandle)
57 and std::abs(trk->d0()) <
m_d0) {
61 const double pt = std::fabs(trk->pt()) * 1
e-3;
75 if (
pt > leadingTrackPt) leadingTrackPt =
pt;
78 ATH_MSG_DEBUG(
"::monitorTrkCounts countPassing = " << countPassing);
79 auto nTrkOffline =
Scalar(
"nTrkOffline", countPassing);
80 auto nTrkOfflineVtx =
Scalar(
"nTrkOfflineVtx", countPassingVtx);
81 auto nTrkOffline_pt05 =
Scalar(
"nTrkOffline_pt05", countPassing_pt05);
82 auto nTrkOffline_pt1 =
Scalar(
"nTrkOffline_pt1", countPassing_pt1);
83 auto nTrkOffline_pt2 =
Scalar(
"nTrkOffline_pt2", countPassing_pt2);
84 auto nTrkOffline_pt4 =
Scalar(
"nTrkOffline_pt4", countPassing_pt4);
85 auto nTrkOffline_pt6 =
Scalar(
"nTrkOffline_pt6", countPassing_pt6);
86 auto nTrkOffline_pt8 =
Scalar(
"nTrkOffline_pt8", countPassing_pt8);
89 auto passedL1 = [](
unsigned int bits) {
return (bits & TrigDefs::L1_isPassedBeforePrescale) != 0; };
90 auto passedHLT = [](
unsigned int bits) {
return (bits & TrigDefs::EF_passedRaw) != 0; };
91 auto activeHLT = [](
unsigned int bits) {
return (bits & TrigDefs::EF_prescaled) == 0; };
92 auto isL1 = [](
const std::string&
name) {
return name.compare(0, 3,
"L1_") == 0; };
93 auto isHLT = [](
const std::string&
name) {
return name.compare(0, 4,
"HLT_") == 0; };
103 if (trigDecTool->isPassed(
ref, TrigDefs::requireDecision))
107 const unsigned int passBits = trigDecTool->isPassedBits(trig);
108 const bool wasRun = isL1(trig) or (isHLT(trig) and activeHLT(
passBits));
111 const auto decision = (isL1(trig) and passedL1(
passBits)) or (isHLT(trig) and passedHLT(
passBits));
112 ATH_MSG_DEBUG(
"chain " << trig << (decision ?
" passed" :
" failed"));
114 auto effPassed =
Scalar<int>(
"EffPassed", decision);
115 fill(trig +
ref, effPassed, nTrkOffline, nTrkOfflineVtx, nTrkOffline_pt05, nTrkOffline_pt1, nTrkOffline_pt2, nTrkOffline_pt4, nTrkOffline_pt6, nTrkOffline_pt8, leadingTrackPt);
122 if (trigDecTool->isPassed(trig, TrigDefs::requireDecision))
125 auto nTrkOffline =
Scalar(
"nTrkOffline_counts_" + trig, countPassing);
126 fill(
"TrigAll", whichtrigger, nTrkOffline);
130 return StatusCode::SUCCESS;
Gaudi::Property< float > m_z0
Gaudi::Property< std::vector< std::string > > m_triggerList
virtual StatusCode fillHistograms(const EventContext &context) const override
adds event to the monitoring histograms
std::vector< std::string > m_uniqueTriggerList
virtual StatusCode finalize() override
SG::ReadHandleKey< xAOD::TrigT2MbtsBitsContainer > m_TrigT2MbtsBitsContainerKey
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool() const
Get the trigger decision tool member.
virtual StatusCode initialize() override
initialize
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_trkCountsKey
Base class for Athena Monitoring Algorithms.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
virtual ~HLTMinBiasEffMonitoringAlg() override
Gaudi::Property< float > m_d0
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_offlineTrkKey
Generic monitoring tool for athena components.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelectionTool
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< float > m_minPt
void fill(const ToolHandle< GenericMonitoringTool > &groupHandle, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable >> &&variables) const
Fills a vector of variables to a group by reference.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
double z0wrtPV(const xAOD::TrackParticle *trk, const xAOD::Vertex *vtx)
Provide the trk DCA w.r.t. the PV.
const xAOD::Vertex * selectPV(SG::ReadHandle< xAOD::VertexContainer > &container)
Finds the Primary Vertex.
virtual StatusCode initialize() override
initialize
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Class describing a Vertex.
const boost::regex ref(r_ef)
HLTMinBiasEffMonitoringAlg(const std::string &name, ISvcLocator *pSvcLocator)
Declare a monitored scalar variable.
Gaudi::Property< std::vector< std::string > > m_refTriggerList