Commit 2d811b64 authored by Vakhtang Tsulaia's avatar Vakhtang Tsulaia
Browse files

Merge branch 'navigatingTRTHTHvariable' into 'master'

Making TRTHTH variables enable to be monitored

See merge request atlas/athena!45645
parents 593b2fb5 6f59a965
# Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
from TrigTRTHighTHitCounter.TrigTRTHighTHitCounterConf import TrigTRTHTHhypoTool
from AthenaMonitoringKernel.GenericMonitoringTool import GenericMonitoringTool, defineHistogram
def _IncTool(name):
monTool = GenericMonitoringTool("MonTool_"+name)
monTool.Histograms = [ defineHistogram('HTRatioRoad', type='TH1F', path='EXPERT', title="TrigTRTHTH Hypo HTRatioRoad", xbins=10, xmin=0.0, xmax=0.9),
defineHistogram('HTRatioWedge', type='TH1F', path='EXPERT', title="TrigTRTHTH Hypo HTRatioWedge", xbins=10, xmin=0.0, xmax=0.9),
defineHistogram('TRTHTHitsRoad', type='TH1F', path='EXPERT', title="TrigTRTHTH Hypo TRTHTHitsRoad", xbins=100, xmin=0, xmax=100),
defineHistogram('TRTHTHitsWedge', type='TH1F', path='EXPERT', title="TrigTRTHTH Hypo TRTHTHitsWedge", xbins=100, xmin=0, xmax=100),]
tool = TrigTRTHTHhypoTool( name )
tool.AcceptAll = False
tool.MinTRTHTHitsRoad = 20
......@@ -11,7 +18,9 @@ def _IncTool(name):
tool.MinTRTHTHitsWedge = 30
tool.MinHTRatioWedge = 0.4
tool.DoWedge = True
tool.DoRoad = False
tool.DoRoad = False
monTool.HistPath = 'TrigTRTHTHhypo/'+tool.getName()
tool.MonTool = monTool
return tool
def TrigTRTHTHhypoToolFromDict( d ):
......
......@@ -3,7 +3,7 @@
*/
#include "TrigTRTHTHhypoTool.h"
#include "AthenaMonitoringKernel/Monitored.h"
#include "TrigCompositeUtils/TrigCompositeUtils.h"
namespace TCU = TrigCompositeUtils;
......@@ -25,6 +25,12 @@ StatusCode TrigTRTHTHhypoTool::initialize() {
bool TrigTRTHTHhypoTool::decide( const ITrigTRTHTHhypoTool::RNNOutputInfo& input ) const {
bool pass = false;
auto fHT_road = Monitored::Scalar( "HTRatioRoad", -1. );
auto fHT_wedge = Monitored::Scalar( "HTRatioWedge", -1. );
auto trththits_road = Monitored::Scalar( "TRTHTHitsRoad" , -1.0 );
auto trththits_wedge = Monitored::Scalar( "TRTHTHitsWedge", -1.0 );
auto monitorIt = Monitored::Group( m_monTool, fHT_road, fHT_wedge, trththits_road, trththits_wedge);
if( m_acceptAll ){
pass=true;
......@@ -42,10 +48,10 @@ bool TrigTRTHTHhypoTool::decide( const ITrigTRTHTHhypoTool::RNNOutputInfo& input
//Parse the vector to assign fHT and nHT appropriately
float fHT_road = vec.at(1);
float fHT_wedge = vec.at(3);
float trththits_road = vec.at(0);
float trththits_wedge = vec.at(2);
fHT_road = vec.at(1);
fHT_wedge = vec.at(3);
trththits_road = vec.at(0);
trththits_wedge = vec.at(2);
ATH_MSG_DEBUG ( "trththits_road: " << trththits_road);
ATH_MSG_DEBUG ("m_minTRTHTHitsRoad in hypotool: "<<m_minTRTHTHitsRoad);
......
......@@ -6,6 +6,7 @@
#include "AthenaBaseComps/AthAlgTool.h"
#include "TrigCompositeUtils/HLTIdentifier.h"
#include "AthenaMonitoringKernel/GenericMonitoringTool.h"
#include "ITrigTRTHTHhypoTool.h"
......@@ -38,6 +39,8 @@ class TrigTRTHTHhypoTool : public extends<AthAlgTool, ITrigTRTHTHhypoTool> {
Gaudi::Property< bool > m_doWedge { this, "DoWedge", true , "Bins of eta" };
Gaudi::Property< bool > m_doRoad { this, "DoRoad", false , "Bins of eta" };
ToolHandle< GenericMonitoringTool > m_monTool{ this, "MonTool", "", "Monitoring tool" };
};
#endif
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment