ATLAS Offline Software
Loading...
Searching...
No Matches
MistimedStreamMonitorAlgorithm Class Reference

#include <MistimedStreamMonitorAlgorithm.h>

Inheritance diagram for MistimedStreamMonitorAlgorithm:

Public Types

enum class  Environment_t {
  user = 0 , online , tier0 , tier0Raw ,
  tier0ESD , AOD , altprod
}
 Specifies the processing environment. More...
enum class  DataType_t {
  userDefined = 0 , monteCarlo , collisions , cosmics ,
  heavyIonCollisions
}
 Specifies what type of input data is being monitored. More...

Public Member Functions

 MistimedStreamMonitorAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~MistimedStreamMonitorAlgorithm ()=default
virtual StatusCode initialize () override
 initialize
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 adds event to the monitoring histograms
virtual StatusCode execute (const EventContext &ctx) const override
 Applies filters and trigger requirements.
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.
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &variables) const
 Fills a vector of variables to a group by reference.
template<typename... T>
void fill (const ToolHandle< GenericMonitoringTool > &groupHandle, T &&... variables) const
 Fills a variadic list of variables to a group by reference.
void fill (const std::string &groupName, std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &&variables) const
 Fills a vector of variables to a group by name.
void fill (const std::string &groupName, const std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > &variables) const
 Fills a vector of variables to a group by name.
template<typename... T>
void fill (const std::string &groupName, T &&... variables) const
 Fills a variadic list of variables to a group by name.
Environment_t environment () const
 Accessor functions for the environment.
Environment_t envStringToEnum (const std::string &str) const
 Convert the environment string from the python configuration to an enum object.
DataType_t dataType () const
 Accessor functions for the data type.
DataType_t dataTypeStringToEnum (const std::string &str) const
 Convert the data type string from the python configuration to an enum object.
const ToolHandle< GenericMonitoringTool > & getGroup (const std::string &name) const
 Get a specific monitoring tool from the tool handle array.
const ToolHandle< Trig::TrigDecisionTool > & getTrigDecisionTool () const
 Get the trigger decision tool member.
bool trigChainsArePassed (const std::vector< std::string > &vTrigNames) const
 Check whether triggers are passed.
SG::ReadHandle< xAOD::EventInfoGetEventInfo (const EventContext &) const
 Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
virtual float lbAverageInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average mu, i.e.
virtual float lbInteractionsPerCrossing (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate instantaneous number of interactions, i.e.
virtual float lbAverageLuminosity (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate average luminosity (in ub-1 s-1 => 10^30 cm-2 s-1).
virtual float lbLuminosityPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the instantaneous luminosity per bunch crossing.
virtual double lbDuration (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the duration of the luminosity block (in seconds)
virtual float lbAverageLivefraction (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average luminosity livefraction.
virtual float livefractionPerBCID (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the live fraction per bunch crossing ID.
virtual double lbLumiWeight (const EventContext &ctx=Gaudi::Hive::currentContext()) const
 Calculate the average integrated luminosity multiplied by the live fraction.
virtual StatusCode parseList (const std::string &line, std::vector< std::string > &result) const
 Parse a string into a vector.
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Public Attributes

 flags = initConfigFlags()
 MaxEvents
 GlobalTag
 Files
 HISTFileName
 acc = MainServicesCfg(flags)
dict myflags = { "legacy": False, "phaseI": True }
 MistimedStreamMonitorCfg = MistimedStreamMonitorConfig(flags, myflags)
 OutputLevel
 withDetails
 False
 summariseProps

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Protected Attributes

ToolHandleArray< GenericMonitoringToolm_tools {this,"GMTools",{}}
 Array of Generic Monitoring Tools.
PublicToolHandle< Trig::TrigDecisionToolm_trigDecTool
 Tool to tell whether a specific trigger is passed.
ToolHandleArray< IDQFilterToolm_DQFilterTools {this,"FilterTools",{}}
 Array of Data Quality filter tools.
SG::ReadCondHandleKey< LuminosityCondDatam_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
SG::ReadCondHandleKey< LBDurationCondDatam_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
SG::ReadCondHandleKey< TrigLiveFractionCondDatam_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
AthMonitorAlgorithm::Environment_t m_environment
 Instance of the Environment_t enum.
AthMonitorAlgorithm::DataType_t m_dataType
 Instance of the DataType_t enum.
Gaudi::Property< std::string > m_environmentStr {this,"Environment","user"}
 Environment string pulled from the job option and converted to enum.
Gaudi::Property< std::string > m_dataTypeStr {this,"DataType","userDefined"}
 DataType string pulled from the job option and converted to enum.
Gaudi::Property< std::string > m_triggerChainString {this,"TriggerChain",""}
 Trigger chain string pulled from the job option and parsed into a vector.
std::vector< std::string > m_vTrigChainNames
 Vector of trigger chain names parsed from trigger chain string.
Gaudi::Property< std::string > m_fileKey {this,"FileKey",""}
 Internal Athena name for file.
Gaudi::Property< bool > m_useLumi {this,"EnableLumi",false}
 Allows use of various luminosity functions.
Gaudi::Property< float > m_defaultLBDuration {this,"DefaultLBDuration",60.}
 Default duration of one lumi block.
Gaudi::Property< int > m_detailLevel {this,"DetailLevel",0}
 Sets the level of detail used in the monitoring.
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey {this,"EventInfoKey","EventInfo"}
 Key for retrieving EventInfo from StoreGate.

Private Types

enum  cutFlow {
  All , UnsuitableReadout , HLT_mistimemonj400 , L1_Trigger ,
  lateTT , lateTOB , InTime , EtaPhiOverlap
}
typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool pulseQuality (const std::vector< uint16_t > &ttPulse, int peakSlice) const
StatusCode makeTowerPPM (const xAOD::TriggerTower *tt, std::vector< MonitorTT > &vecMonTT) const
 Helper functions.
StatusCode fillPPMEtaPhi (MonitorTT &monTT, const std::string &groupName, const std::string &weightName, double weight) const
StatusCode makeTowerCPM (const xAOD::CPMTower *cpm, std::vector< MonitorCPM > &vecMonCPM) const
StatusCode makeTowerJE (const xAOD::JetElement *je, std::vector< MonitorJE > &vecMonJE) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

StringProperty m_packageName {this,"PackageName","MistimedStreamMonitor","group name for histogramming"}
PublicToolHandle< Trig::TrigDecisionToolm_trigDec {this, "TriggerDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", ""}
SG::ReadHandleKey< CTP_RDOm_ctpRdoReadKey {this, "CTPRDOReadKey", LVL1CTP::DEFAULT_RDOOutputLocation,"Read handle key to CTP_RDO for conversion to ByteStream"}
SG::ReadHandleKey< xAOD::TriggerTowerContainerm_xAODTriggerTowerContainerName {this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"Trigger Tower Container"}
 container keys including steering parameter and description
SG::ReadHandleKey< xAOD::CPMTowerContainerm_cpmTowerLocation {this, "CPMTowerLocation", LVL1::TrigT1CaloDefs::CPMTowerLocation, "CPM container"}
SG::ReadHandleKey< xAOD::JetElementContainerm_jetElementLocation {this, "JetElementLocation", LVL1::TrigT1CaloDefs::JetElementLocation, "Jet Element Container"}
SG::ReadHandleKey< xAOD::eFexEMRoIContainerm_eFexEMContainerKey {this,"eFexEMContainer","L1_eEMxRoI","SG key of the input eFex RoI container"}
SG::ReadHandleKey< xAOD::eFexTauRoIContainerm_eFexTauContainerKey {this,"eFexTauContainer","L1_eTauxRoI","SG key of the input eFex Tau RoI container"}
SG::ReadHandleKey< xAOD::eFexEMRoIContainerm_eFexEMOutContainerKey {this,"eFexEMOutContainer","L1_eEMxRoIOutOfTime","SG key of the input eFex RoI container"}
SG::ReadHandleKey< xAOD::jFexLRJetRoIContainerm_jFexLRJetContainerKey {this,"jFexLRJetRoIContainer","L1_jFexLRJetRoI","SG key of the input jFex LR Jet Roi container"}
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainerm_jFexSRJetContainerKey {this,"jFexSRJetRoIContainer","L1_jFexSRJetRoI","SG key of the input jFex SR Jet Roi container"}
SG::ReadHandleKey< xAOD::jFexTauRoIContainerm_jFexTauContainerKey {this,"jFexTauRoIContainer" ,"L1_jFexTauRoI" ,"SG key of the input jFex Tau Roi container"}
SG::ReadHandleKey< xAOD::jFexTowerContainerm_jFexDataTowerKey {this, "jFexDataTower","L1_jFexDataTowers","SG key of the input jFex Tower container"}
SG::ReadHandleKey< xAOD::jFexTowerContainerm_EmulTowerKey {this, "InputEmulatedTowers", "L1_jFexEmulatedTowers", "SG key of the emulated jFex Tower container"}
SG::ReadHandleKeyArray< xAOD::gFexJetRoIContainerm_gFexJetTobKeyList {this,"gFexJetTobKeyList",{"L1_gFexLRJetRoI", "L1_gFexSRJetRoI"},"Array of gFEX jet ReadHandleKeys to fill histograms for"}
ToolHandle< LVL1::IL1TriggerTowerToolRun3m_ttTool {this,"L1TriggerTowerToolRun3", "LVL1::L1TriggerTowerToolRun3/L1TriggerTowerToolRun3", "L1TriggerTowerToolRun3"}
Gaudi::Property< double > m_phiScaleTT {this, "phiScaleTT", 32./M_PI, "Scale factor to convert trigger tower phi to integer binning"}
Gaudi::Property< bool > m_uselegacy {this, "UseLegacy", false, "Use legacy system" }
Gaudi::Property< bool > m_usephaseI {this, "UsePhase1", false, "Use phaseI system" }
Gaudi::Property< bool > m_isIons {this, "IsIons", false, "Is ions data" }
Gaudi::Property< std::vector< std::string > > m_efexItems {this,"EfexTriggers", {"L1_eEM26M"}, "eFex trigger items in BC0"}
Gaudi::Property< std::vector< std::string > > m_jfexItems {this,"JfexTriggers", {"L1_jJ160", "L1_jJ500"}, "jFex trigger items in BC0"}
Gaudi::Property< std::vector< std::string > > m_gfexItems {this,"GfexTriggers", {"L1_gJ400p0ETA25", "L1_gLJ140p0ETA25"}, "gFex trigger items in BC0"}
SG::ReadCondHandleKey< L1CaloRunParametersContainerm_runParametersContainer { this, "InputKeyRunParameters", "L1CaloRunParametersContainer"}
SG::ReadCondHandleKey< L1CaloReadoutConfigContainerJSONm_readoutConfigContainerJSON { this, "InputKeyReadoutConfig", "L1CaloReadoutConfigContainerJSON"}
Gaudi::Property< int > m_maxEvents {this,"MaxEvents",15}
std::atomic< int > m_eventCounter {0}
std::mutex m_mutex {}
std::map< uint32_t, int > m_event_counter ATLAS_THREAD_SAFE
std::string m_name
std::unordered_map< std::string, size_t > m_toolLookupMap
const ToolHandle< GenericMonitoringToolm_dummy
Gaudi::Property< bool > m_enforceExpressTriggers
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 57 of file MistimedStreamMonitorAlgorithm.h.

Member Typedef Documentation

◆ MonVarVec_t

typedef std::vector<std::reference_wrapper<Monitored::IMonitoredVariable> > AthMonitorAlgorithm::MonVarVec_t
privateinherited

Definition at line 370 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ cutFlow

enum MistimedStreamMonitorAlgorithm::cutFlow
private
Enumerator
All 
UnsuitableReadout 
HLT_mistimemonj400 
L1_Trigger 
lateTT 
lateTOB 
InTime 
EtaPhiOverlap 

Definition at line 162 of file MistimedStreamMonitorAlgorithm.h.

162 {
163 All,
164 UnsuitableReadout,
165 HLT_mistimemonj400,
166 L1_Trigger,
167 lateTT,
168 lateTOB,
169 InTime,
170 EtaPhiOverlap
171 };

◆ DataType_t

enum class AthMonitorAlgorithm::DataType_t
stronginherited

Specifies what type of input data is being monitored.

An enumeration of the different types of data the monitoring application may be running over. This can be used to select which histograms to produce, e.g. to prevent the production of colliding-beam histograms when running on cosmic-ray data. Strings of the same names may be given as jobOptions.

Enumerator
userDefined 
monteCarlo 
collisions 
cosmics 
heavyIonCollisions 

Definition at line 194 of file AthMonitorAlgorithm.h.

194 {
195 userDefined = 0,
196 monteCarlo,
197 collisions,
198 cosmics,
199 heavyIonCollisions,
200 };
AthConfigFlags cosmics(AthConfigFlags flags, str instanceName, str recoMode)

◆ Environment_t

enum class AthMonitorAlgorithm::Environment_t
stronginherited

Specifies the processing environment.

The running environment may be used to select which histograms are produced, and where they are located in the output. For example, the output paths of the histograms are different for the "user", "online" and the various offline flags. Strings of the same names may be given as jobOptions.

Enumerator
user 
online 
tier0 
tier0Raw 
tier0ESD 
AOD 
altprod 

Definition at line 175 of file AthMonitorAlgorithm.h.

175 {
176 user = 0,
177 online,
178 tier0,
179 tier0Raw,
180 tier0ESD,
181 AOD,
182 altprod,
183 };

Constructor & Destructor Documentation

◆ MistimedStreamMonitorAlgorithm()

MistimedStreamMonitorAlgorithm::MistimedStreamMonitorAlgorithm ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 12 of file MistimedStreamMonitorAlgorithm.cxx.

13 : AthMonitorAlgorithm(name,pSvcLocator)
14{
15}
Base class for Athena Monitoring Algorithms.

◆ ~MistimedStreamMonitorAlgorithm()

virtual MistimedStreamMonitorAlgorithm::~MistimedStreamMonitorAlgorithm ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ dataType()

DataType_t AthMonitorAlgorithm::dataType ( ) const
inlineinherited

Accessor functions for the data type.

Returns
the current value of the class's DataType_t instance.

Definition at line 224 of file AthMonitorAlgorithm.h.

224{ return m_dataType; }
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.

◆ dataTypeStringToEnum()

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::dataTypeStringToEnum ( const std::string & str) const
inherited

Convert the data type string from the python configuration to an enum object.

Returns
a value in the DataType_t enumeration which matches the input string.

Definition at line 144 of file AthMonitorAlgorithm.cxx.

144 {
145 // convert the string to all lowercase
146 std::string lowerCaseStr = str;
147 std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
148
149 // check if it matches one of the enum choices
150 if( lowerCaseStr == "userdefined" ) {
152 } else if( lowerCaseStr == "montecarlo" ) {
154 } else if( lowerCaseStr == "collisions" ) {
156 } else if( lowerCaseStr == "cosmics" ) {
157 return DataType_t::cosmics;
158 } else if( lowerCaseStr == "heavyioncollisions" ) {
160 } else { // otherwise, warn the user and return "userDefined"
161 ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
162 <<str<<", returning userDefined.");
164 }
165}
#define ATH_MSG_WARNING(x)
void tolower(std::string &s)

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ environment()

Environment_t AthMonitorAlgorithm::environment ( ) const
inlineinherited

Accessor functions for the environment.

Returns
the current value of the class's Environment_t instance.

Definition at line 208 of file AthMonitorAlgorithm.h.

208{ return m_environment; }
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.

◆ envStringToEnum()

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::envStringToEnum ( const std::string & str) const
inherited

Convert the environment string from the python configuration to an enum object.

Returns
a value in the Environment_t enumeration which matches the input string.

Definition at line 116 of file AthMonitorAlgorithm.cxx.

116 {
117 // convert the string to all lowercase
118 std::string lowerCaseStr = str;
119 std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
120
121 // check if it matches one of the enum choices
122 if( lowerCaseStr == "user" ) {
123 return Environment_t::user;
124 } else if( lowerCaseStr == "online" ) {
126 } else if( lowerCaseStr == "tier0" ) {
128 } else if( lowerCaseStr == "tier0raw" ) {
130 } else if( lowerCaseStr == "tier0esd" ) {
132 } else if( lowerCaseStr == "aod" ) {
133 return Environment_t::AOD;
134 } else if( lowerCaseStr == "altprod" ) {
136 } else { // otherwise, warn the user and return "user"
137 ATH_MSG_WARNING("AthMonitorAlgorithm::envStringToEnum(): Unknown environment "
138 <<str<<", returning user.");
139 return Environment_t::user;
140 }
141}

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode AthMonitorAlgorithm::execute ( const EventContext & ctx) const
overridevirtualinherited

Applies filters and trigger requirements.

Then, calls fillHistograms().

Parameters
ctxevent context for reentrant Athena call
Returns
StatusCode

Definition at line 77 of file AthMonitorAlgorithm.cxx.

77 {
78
79 // Checks that all of the DQ filters are passed. If any one of the filters
80 // fails, return SUCCESS code and do not fill the histograms with the event.
81 for ( const auto& filterItr : m_DQFilterTools ) {
82 if (!filterItr->accept()) {
83 ATH_MSG_DEBUG("Event rejected due to filter tool.");
84 return StatusCode::SUCCESS;
85 }
86 }
87
88 // Trigger: If there is a decision tool and the chains fail, skip the event.
90 ATH_MSG_DEBUG("Event rejected due to trigger filter.");
91 return StatusCode::SUCCESS;
92 }
93
94 ATH_MSG_DEBUG("Event accepted!");
95 return fillHistograms(ctx);
96}
#define ATH_MSG_DEBUG(x)
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ fillHistograms()

StatusCode MistimedStreamMonitorAlgorithm::fillHistograms ( const EventContext & ctx) const
overridevirtual

adds event to the monitoring histograms

User will overwrite this function. Histogram booking is no longer done in C++. This function is called in execute once the filters are all passed.

Parameters
ctxforwarded from execute
Returns
StatusCode

Implements AthMonitorAlgorithm.

Definition at line 56 of file MistimedStreamMonitorAlgorithm.cxx.

56 {
57
58 ATH_MSG_DEBUG("MistimedStreamMonitorAlgorith::fillHistograms");
59
60 // Retrieve L1CaloRunParametersContainer
61 SG::ReadCondHandle<L1CaloRunParametersContainer> runParameters( m_runParametersContainer, ctx);
62 ATH_CHECK(runParameters.isValid());
63
64 unsigned int readoutConfigID = runParameters->runParameters(1)->readoutConfigID();
65 ATH_MSG_DEBUG("RunParameters:: readoutConfigID " << readoutConfigID);
66
67 SG::ReadCondHandle<L1CaloReadoutConfigContainerJSON> readoutConfigJSON(m_readoutConfigContainerJSON, ctx);
68
69 unsigned int channelID = 0;
70 unsigned int numFadcSlices = 0;
71 unsigned int l1aFadcSlice = 0;
72 unsigned int readout80ModePpm = 0;
73
74 //the readout config ID tells you, which readoutConfig is loaded. now you can retrieve the l1aFadcSlice from this DB entry
75 if ( readoutConfigJSON->readoutConfigJSON(readoutConfigID)->channelId() == readoutConfigID){
76 ATH_MSG_DEBUG("readoutConfigID " << readoutConfigID);
77 channelID = readoutConfigJSON->readoutConfigJSON(readoutConfigID)->channelId();
78 numFadcSlices = readoutConfigJSON->readoutConfigJSON(readoutConfigID)->numFadcSlices();
79 l1aFadcSlice = readoutConfigJSON->readoutConfigJSON(readoutConfigID)->l1aFadcSlice();
80 readout80ModePpm = readoutConfigJSON->readoutConfigJSON(readoutConfigID)->readout80ModePpm();
81 ATH_MSG_DEBUG("channelID :: " << channelID);
82 ATH_MSG_DEBUG("numFadcSlices :: " << numFadcSlices);
83 ATH_MSG_DEBUG("l1aFadcSlice :: " << l1aFadcSlice);
84 ATH_MSG_DEBUG("readout80ModePpm :: " << readout80ModePpm);
85 }
86
87 // Retrieve jetElementfrom SG
88 SG::ReadHandle<xAOD::JetElementContainer> jetElementTES(m_jetElementLocation, ctx);
89 if(!jetElementTES.isValid()){
90 ATH_MSG_ERROR("No JetElement container found in TES "<< m_jetElementLocation);
91 return StatusCode::FAILURE;
92 }
93
94 // Retrieve Core CPM Towers from SG
95 SG::ReadHandle<xAOD::CPMTowerContainer> cpmTowerTES(m_cpmTowerLocation, ctx);
96 if(!cpmTowerTES.isValid()){
97 ATH_MSG_ERROR("No CPMTower container found in TES "<< m_cpmTowerLocation);
98 return StatusCode::FAILURE;
99 }
100
101 // Retrieve Trigger Towers from SG
102 SG::ReadHandle<xAOD::TriggerTowerContainer> triggerTowerTES(m_xAODTriggerTowerContainerName, ctx);
103 if(!triggerTowerTES.isValid()){
104 ATH_MSG_ERROR("No Trigger Tower container found in TES "<< m_xAODTriggerTowerContainerName);
105 return StatusCode::FAILURE;
106 }
107
108 // Retrieve EventInfo from SG and save lumi block number, global event number and run number
109 unsigned int lumiNo = GetEventInfo(ctx)->lumiBlock();
110 unsigned int currentRunNo = ctx.eventID().run_number();
111 unsigned int currentEventNo = ctx.eventID().event_number();
112
113 ATH_MSG_DEBUG("Lumi Block :: " << lumiNo);
114 ATH_MSG_DEBUG("Run Number :: " << currentRunNo);
115 ATH_MSG_DEBUG("Event Number :: " << currentEventNo);
116
117 Monitored::Scalar<int> cutFlowX = Monitored::Scalar<int>("cutFlowX", 0);
118
119 // fill first bin in cutflow
120 cutFlowX=All;
121 fill(m_packageName,cutFlowX);
122
123 //for the algorithm to run, we need the 2 adc slices before and after the l1a-slice
124 //readout compatibility checks of the algo here
125 if(readout80ModePpm){
126 if(numFadcSlices < 9){
127 ATH_MSG_DEBUG("Number of ADC slices < 9 for 80 MHz readout, algorithm cannot run, aborting...");
128 return StatusCode::SUCCESS;
129 }
130 if(l1aFadcSlice < 4){
131 ATH_MSG_DEBUG("L1a readout pointer < 4 for 80 MHz readout, algorithm cannot run, aborting...");
132 return StatusCode::SUCCESS;
133 }
134 if(numFadcSlices - l1aFadcSlice < 4){
135 ATH_MSG_DEBUG("L1a readout pointer is at "<< l1aFadcSlice << " with "<< numFadcSlices << "slices at 80 MHz readout mode, algorithm cannot run, aborting...");
136 return StatusCode::SUCCESS;
137 }
138 }
139 else {
140 if(numFadcSlices < 5){
141 ATH_MSG_DEBUG("Number of ADC slices < 5 for 40 MHz readout, algorithm cannot run, aborting...");
142 return StatusCode::SUCCESS;
143 }
144 if(l1aFadcSlice < 2){
145 ATH_MSG_DEBUG("L1a readout pointer < 2 for 40 MHz readout, algorithm cannot run, aborting...");
146 return StatusCode::SUCCESS;
147 }
148 if(numFadcSlices - l1aFadcSlice < 2){
149 ATH_MSG_DEBUG("L1a readout pointer is at "<< l1aFadcSlice << " with "<< numFadcSlices << "slices at 40 MHz readout mode, algorithm cannot run, aborting...");
150 return StatusCode::SUCCESS;
151 }
152 }
153 cutFlowX=UnsuitableReadout;
154 fill(m_packageName,cutFlowX);
155
156 //Select events that fired HLT_mistimedmonj400
157 if(! (m_trigDec->isPassed("HLT_mistimemonj400_L1All",TrigDefs::requireDecision))){
158 ATH_MSG_DEBUG("TrigDec don't pass HLT_mistimemonj400_L1All");
159 return StatusCode::SUCCESS;
160 }
161
162 cutFlowX=HLT_mistimemonj400;
163 fill(m_packageName,cutFlowX);
164
165 //Only select events which passed a proper trigger
166 //Adjustable depending on which trigger we are interested
167 bool legacyTrigger= false;
168 bool phase1Trigger= false;
169 std::string trigger = "";
170
171 if (m_usephaseI) {
172 for (const auto &item: m_efexItems) {
173 if (m_trigDec->isPassed( item )) {
174 phase1Trigger= true;
175 trigger = "eFex";
176 }
177 }
178 for (const auto &item: m_jfexItems) {
179 if (m_trigDec->isPassed( item )) {
180 phase1Trigger= true;
181 trigger = "jFex";
182 }
183 }
184 for (const auto &item: m_gfexItems) {
185 if (m_trigDec->isPassed( item )) {
186 phase1Trigger= true;
187 trigger = "gFex";
188 }
189 }
190 }
191 else if (m_uselegacy) {
192 if (m_trigDec->isPassed("L1_J100")) {
193 legacyTrigger= true;
194 }
195 }
196 else {
197 ATH_MSG_ERROR("No system selected, this should not happen, abort.");
198 return StatusCode::FAILURE;
199 }
200
201 // Reject event if no trigger fired
202 if ( (legacyTrigger==false) and (phase1Trigger==false) ) {
203 ATH_MSG_DEBUG("TrigDec doesn't pass");
204 return StatusCode::SUCCESS;
205 }
206
207 cutFlowX=L1_Trigger;
208 fill(m_packageName,cutFlowX);
209
210
211 // now classify the tower signals by looking at their FADC counts, if it exceeds 70
212 int good3Counter = 0; // category 5 good peak 3
213 int good2Counter = 0; // category 5 good peak 2
214 int eFexintimeCounter = 0; // in-time TOBs
215 int eFexoutoftimeCounter = 0; // out-of-time TOBs
216 int jFexCounter = 0; // in-time TOBs
217 int gFexCounter = 0; // in-time TOBs
218
219 double dEta = 0., dPhi = 0., dPhi1 = 0., dR = 0.;
220 double etaIn = 0., phiIn = 0., etIn = 0.;
221 double etaOut = 0., phiOut = 0., etOut = 0.;
222 bool overlap = false;
223
224 SG::ReadHandle<xAOD::jFexSRJetRoIContainer> jFexSRJetContainer{m_jFexSRJetContainerKey, ctx};
225 if(!jFexSRJetContainer.isValid()) {
226 ATH_MSG_WARNING("No jFex SR Jet container found in storegate "<< m_jFexSRJetContainerKey<<". Will be skipped!");
227 }
228
229 // =====================================================================
230 // ================= Container: TriggerTower ===========================
231 // =====================================================================
232
233 // Creating a new container for saving pulseClassification
234 std::unique_ptr<xAOD::TriggerTowerContainer> ttContainer = std::make_unique<xAOD::TriggerTowerContainer>();
235 std::unique_ptr<xAOD::TriggerTowerAuxContainer> ttContainerAux = std::make_unique<xAOD::TriggerTowerAuxContainer>();
236 ttContainer->setStore(ttContainerAux.get());
237
238 static const SG::Accessor<float> pulseClassificationAcc("pulseClassification");
239
240 // Creating a new container for TT with pulseClassification
241 for (const xAOD::TriggerTower* tt : *triggerTowerTES) {
242
243 float ttPulseCategory = 0;
244 const std::vector<uint16_t>& ttADC = (tt)->adc();
245 std::vector<uint16_t> readoutCorrectedADC; //this is the standard readout ADC vector: 5 40MHz samples with l1A in the middle
246 if(!readout80ModePpm){//40 MHz
247 //just acess the acd vector, as the sanity checks where done above
248 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-2));
249 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-1));
250 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice));
251 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+1));
252 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+2));
253 }
254 else{//80 MHz
255 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-4));
256 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-2));
257 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice));
258 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+2));
259 readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+4));
260 }
261
262 // retrieve max ADC value and position, this seems to be buggy in the DAOD
263 auto maxValIterator = std::max_element(readoutCorrectedADC.begin(), readoutCorrectedADC.end());
264 int maxADCval = *maxValIterator;
265 int adcPeakPositon = std::distance(std::begin(readoutCorrectedADC), maxValIterator);
266
267 if(maxADCval < 70){
268 ttPulseCategory = 0.1;
269 }
270 else if(maxADCval == 1023) {
271 ttPulseCategory = 1;
272 }
273 else{
274 bool goodQual = pulseQuality(readoutCorrectedADC, adcPeakPositon);
275 //look at any of the five FADC values
276 if(adcPeakPositon == 2){ // can be class 3 or 4 now
277 if(goodQual){
278 //nicely peaking TT in BCID0
279 good2Counter++;
280 ttPulseCategory = 3;
281 }
282 else{
283 //badly peaking TT in BCID0
284 ttPulseCategory = 4;
285 }
286 }
287 else if(adcPeakPositon == 3){ // can be class 5 or 6 now
288 if(goodQual){
289 //nicely peaking TT in BCID+1
290 good3Counter++;
291 ttPulseCategory = 5;
292 }
293 else{
294 //badly peaking TT in BCID+1
295 ttPulseCategory = 6;
296 }
297 }
298 else{
299 //TT peaking in BCID-1,-2 or +2
300 ttPulseCategory = 2;
301 }
302
303 if (trigger == "jFex") {
305 CHECK( evtStore()->retrieve( jFexSRJetRoI, "L1_jFexSRJetRoI" ) );
306 for(auto tob : *jFexSRJetRoI) {
307 etaIn = tob->eta();
308 phiIn = tob->phi();
309 etIn = tob->tobEt()/5;
310
311 if( (adcPeakPositon == 3) and (goodQual) ) {
312 etaOut = tt->eta();
313 phiOut = tt->phi()-M_PI;
314 dEta = std::abs(etaIn-etaOut);
315 dPhi = std::abs(phiIn-phiOut);
316 if ((phiIn < 0) and (phiOut > 0)){
317 dPhi1 = std::abs((phiIn+2*M_PI)-phiOut);
318 if (dPhi1 < dPhi) {
319 dPhi = dPhi1;
320 }
321 }
322 else if ((phiIn > 0) and (phiOut < 0)){
323 dPhi1 = std::abs(phiIn-(phiOut+2*M_PI));
324 if (dPhi1 < dPhi) {
325 dPhi = dPhi1;
326 }
327 }
328 dR = TMath::Sqrt(dEta*dEta+dPhi*dPhi);
329 if ((dR < .2) and (etIn > 160.)) {
330 overlap = true;
331 }
332 } // if statement - good tt
333 } // for loop - jFex TOBs
334 } // if statement - jFex
335
336 if (trigger == "gFex") {
337
338 for (const auto& key : m_gFexJetTobKeyList){
339 SG::ReadHandle<xAOD::gFexJetRoIContainer> jetContainer (key, ctx);
340 // Check that this container is present
341 if ( !jetContainer.isValid() ) {
342 ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
343 }
344 else {
346 CHECK( evtStore()->retrieve( gFexJetRoI, key.key() ) );
347 for(auto tob : *gFexJetRoI) {
348 etaIn = tob->eta();
349 phiIn = tob->phi();
350 etIn = tob->gFexTobEt()/10;
351
352 if( (adcPeakPositon == 3) and (goodQual) ) {
353 etaOut = tt->eta();
354 phiOut = tt->phi()-M_PI;
355 dEta = std::abs(etaIn-etaOut);
356 dPhi = std::abs(phiIn-phiOut);
357 if ((phiIn < 0) and (phiOut > 0)){
358 dPhi1 = std::abs((phiIn+2*M_PI)-phiOut);
359 if (dPhi1 < dPhi) {
360 dPhi = dPhi1;
361 }
362 }
363 else if ((phiIn > 0) and (phiOut < 0)){
364 dPhi1 = std::abs(phiIn-(phiOut+2*M_PI));
365 if (dPhi1 < dPhi) {
366 dPhi = dPhi1;
367 }
368 }
369 dR = TMath::Sqrt(dEta*dEta+dPhi*dPhi);
370 if ((dR < .2) and (etIn > 100.)) {
371 overlap = true;
372 }
373 } // if statement - good tt
374 } // for loop - gFex TOBs
375 } // else stamement - valid container
376 } // for loop - gFex container
377 } // if statement - gFex
378
379 }
380
381 // decorate the TT in order to have to recompute the pulse categorisation
382 xAOD::TriggerTower* newTT = new xAOD::TriggerTower; //create a new TT object
383 ttContainer->push_back(newTT); // add the newTT to new output TT container (at the end of it)
384 *newTT = *(tt);// copy over all information from TT to newTT
385 pulseClassificationAcc(*newTT) = ttPulseCategory; //decorate
386 }
387
388 // count all eFex in-time and out-of-time TOBs with at least 5GeV
389 for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
390
391 const xAOD::eFexEMRoIContainer* emTobs;
392 CHECK( evtStore()->retrieve( emTobs, key ) );
393
394 for(auto tob : *emTobs) {
395 if (tob->et() > 5000) { //eFex TOB energy in MeV
396 if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
397 eFexintimeCounter++;
398 }
399 else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
400 eFexoutoftimeCounter++;
401 }
402 }
403 }
404
405 }
406
407 // count all gFex in-time TOBs with at least 5GeV
408 const xAOD::gFexJetRoIContainer* gFexLRJetRoI;
409 CHECK( evtStore()->retrieve( gFexLRJetRoI, "L1_gFexLRJetRoI" ) );
410 for(auto tob : *gFexLRJetRoI) {
411 if (tob->et() > 50) { //gFex TOB energy in 0.1GeV
412 gFexCounter++;
413 }
414 }
415
416 // count all jFex in-time TOBs with at least 5GeV
417 const xAOD::jFexSRJetRoIContainer* jFexJetRoI;
418 CHECK( evtStore()->retrieve( jFexJetRoI, "L1_jFexSRJetRoI" ) );
419 for(auto tob : *jFexJetRoI) {
420 if (tob->et() > 25) { //jFex TOB energy in 0.2GeV
421 jFexCounter++;
422 }
423 }
424
425 if ((good3Counter < 2) and (m_isIons == false)) {
426 //reject events with less than 2 pulses nicely peaking in slice 3
427 return StatusCode::SUCCESS;
428 }
429 cutFlowX=lateTT;
430 fill(m_packageName,cutFlowX);
431
432 if ((trigger == "eFex") and (eFexoutoftimeCounter < 2)) {
433 //for eFEX triggers, require at least two late TOBs
434 return StatusCode::SUCCESS;
435 }
436 cutFlowX=lateTOB;
437 fill(m_packageName,cutFlowX);
438
439 if( (good2Counter > 3) or
440 ((trigger == "eFex") and (eFexintimeCounter > 3)) or
441 ((trigger == "jFex") and (jFexCounter > 3)) or
442 ((trigger == "gFex") and (gFexCounter > 3)) ){
443 //reject events with more than 3 pulses nicely peaking/ 3 TOBs in slice 2 to avoid event being triggered by pileup
444 return StatusCode::SUCCESS;
445 }
446 cutFlowX= InTime;
447 fill(m_packageName,cutFlowX);
448
449 if (trigger == "eFex") {
450 const xAOD::eFexEMRoIContainer* emTobs;
451 CHECK( evtStore()->retrieve( emTobs, "L1_eEMxRoI" ) );
452 const xAOD::eFexEMRoIContainer* emTobsOut;
453 CHECK( evtStore()->retrieve( emTobsOut, "L1_eEMxRoIOutOfTime" ) );
454
455 for(auto tob : *emTobs) {
456 etaIn = tob->eta();
457 phiIn = tob->phi();
458 etIn = tob->et()/1000; //eT in GeV
459
460 for(auto tobOut : *emTobsOut) {
461 etaOut = tobOut->eta();
462 phiOut = tobOut->phi();
463 etOut = tobOut->et()/1000; //eT in GeV
464
465 dEta = std::abs(etaIn-etaOut);
466 dPhi = std::abs(phiIn-phiOut);
467 if ((phiIn < 0) and (phiOut > 0)){
468 dPhi1 = std::abs((phiIn+2*M_PI)-phiOut);
469 if (dPhi1 < dPhi) {
470 dPhi = dPhi1;
471 }
472 }
473 else if ((phiIn > 0) and (phiOut < 0)){
474 dPhi1 = std::abs(phiIn-(phiOut+2*M_PI));
475 if (dPhi1 < dPhi) {
476 dPhi = dPhi1;
477 }
478 }
479 dR = TMath::Sqrt(dEta*dEta+dPhi*dPhi);
480 if ((dR < .2) and (etIn > 26.) and (etOut > 26.)){
481 overlap = true;
482 }
483 }
484 }
485 }
486
487 if ((legacyTrigger) and !(phase1Trigger)){
488 overlap = true;
489 }
490
491 if ((overlap==false) and (m_isIons == false)) {
492 //reject events where BCID and BCID+1 are spatially separated
493 return StatusCode::SUCCESS;
494 }
495 cutFlowX= EtaPhiOverlap;
496 fill(m_packageName,cutFlowX);
497
498 // scope for mutable error event per lumi block tt counter
499 // it allows only one event per lumiblock
500 std::lock_guard<std::mutex> lock(m_mutex);
501 m_event_counter[lumiNo]+=1;
502 const int eventCounter = m_eventCounter++;
503
504 if( (m_event_counter[lumiNo] <m_maxEvents) && (eventCounter < m_maxEvents) ){
505 ATH_MSG_DEBUG( "EventID :: " << m_event_counter[lumiNo]);
506
507 // Saving the lumiblock and event number of the events with mistimed
508 auto eventMonitor_legacy= Monitored::Scalar<std::string>("eventMonitor_legacy", "Event"+std::to_string(eventCounter)+"="+std::to_string(currentEventNo));
509 auto eventMonitor_phaseI= Monitored::Scalar<std::string>("eventMonitor_phaseI", "Event"+std::to_string(eventCounter)+"_"+trigger+"="+std::to_string(currentEventNo));
510 auto lbMonitor= Monitored::Scalar<std::string>("lbMonitor", std::to_string(lumiNo));
511 std::string groupName = "Event_";
512 if (legacyTrigger) {
513 fill(groupName, eventMonitor_legacy, lbMonitor );
514 }
515 if (phase1Trigger) {
516 fill(groupName, eventMonitor_phaseI, lbMonitor );
517 }
518
519 // Create a vector of trigger towers with quantities to be monitored
520 std::vector<MonitorTT> vecMonTTDecor; // All towers
521
522 // Loop over trigger tower container
523 //Create the trigger tower objects and calculate scaled phi
524 for (const xAOD::TriggerTower* tt : *ttContainer) {
525 ATH_CHECK( makeTowerPPM(tt, vecMonTTDecor) );
526 ATH_MSG_DEBUG( "tt->pulseClassification :: " << pulseClassificationAcc(*tt));
527 }
528
529 groupName = "EventofInterest_" + std::to_string(eventCounter) + "_";
530 auto bcidWord = Monitored::Scalar<uint8_t>("bcidWord", 0);
531 auto pulseCat = Monitored::Scalar<float>("pulseCat", 0);
532
533 for (auto& myTower : vecMonTTDecor) {
534 ATH_MSG_DEBUG(" looping over TTs");
535 const int layer = (myTower.tower)->layer();
536 pulseCat = pulseClassificationAcc(*myTower.tower);
537 bcidWord = (myTower.tower)->bcidVec()[0]; // look at the status bit in the central time slice
538 ATH_MSG_DEBUG("groupName :: " << groupName);
539
540 // Check if TT is in EM or HAD layer:
541 if (layer == 0) { //========== ELECTROMAGNETIC LAYER =========================
542 ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_EM", "pulseCat", pulseCat) );
543 if(pulseCat > 0.5 && bcidWord > 0) {
544 ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_EM", "bcidWord", bcidWord) );
545 }
546 }
547 else if(layer == 1 ) { //========== HADRONIC LAYER ===============================
548 ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_HAD", "pulseCat", pulseCat) );
549 if(pulseCat > 0.5 && bcidWord > 0 ) ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_HAD", "bcidWord", bcidWord) );
550 }
551 }
552
553 //Loop over CPM tower container
554 //Create the CPM objects and calculate scaled phi
555 std::vector<MonitorCPM> vecMonCPM; // All towers
556 for (const xAOD::CPMTower* cpm : *cpmTowerTES) {
557 ATH_CHECK( makeTowerCPM(cpm, vecMonCPM) );
558 }
559
560 // Coordinates for CPM tower and JetElement containers
561 auto etalut = Monitored::Scalar<double>("etalut", 0);
562 auto philut = Monitored::Scalar<double>("philut", 0);
563
564 // lut variables
565 auto emLUT0 = Monitored::Scalar<int>("emLUT0", 0);
566 auto emLUT1 = Monitored::Scalar<int>("emLUT1", 0);
567 auto emLUT2 = Monitored::Scalar<int>("emLUT2", 0);
568 auto hadLUT0 = Monitored::Scalar<int>("hadLUT0", 0);
569 auto hadLUT1 = Monitored::Scalar<int>("hadLUT1", 0);
570 auto hadLUT2 = Monitored::Scalar<int>("hadLUT2", 0);
571
572 //loop over the cpm tower container to fill the lut histos
573 for (auto& myTower : vecMonCPM) {
574
575 std::vector<uint8_t> cpmEMenergy = (myTower.tower)->emEnergyVec();
576 std::vector<uint8_t> cpmHADenergy = (myTower.tower)->hadEnergyVec();
577 // eta scaled
578 etalut = myTower.etaScaled;
579
580 for (auto phi: myTower.phiScaled) {
581 // phi scaled
582 philut = phi;
583
584 if(cpmEMenergy.size() > 2){ // expect 3 slices to be read out
585 ATH_MSG_DEBUG("CPM :: emLUT0 :: " << static_cast<unsigned>(cpmEMenergy.at(0)) << ":: emLUT1 :: " << static_cast<unsigned>(cpmEMenergy.at(1)) << ":: emLUT2 :: " << static_cast<unsigned>(cpmEMenergy.at(2)));
586
587 emLUT0 = static_cast<int>(cpmEMenergy.at(0));
588 if(cpmEMenergy.at(0) > 0) fill(groupName+"lut_EM0",etalut,philut, emLUT0);
589
590 emLUT1 = static_cast<int>(cpmEMenergy.at(1));
591 if(cpmEMenergy.at(1) > 0) fill(groupName+"lut_EM1",etalut,philut, emLUT1);
592
593 emLUT2 = static_cast<int>(cpmEMenergy.at(2));
594 if(cpmEMenergy.at(2) > 0) fill(groupName+"lut_EM2",etalut,philut, emLUT2);
595 }
596 if(cpmHADenergy.size() > 2){
597 ATH_MSG_DEBUG("CPM :: hadLUT0 :: " << static_cast<unsigned>(cpmHADenergy.at(0)) << ":: hadLUT1 :: " << static_cast<unsigned>(cpmHADenergy.at(1)) << ":: hadLUT2 :: " << static_cast<unsigned>(cpmHADenergy.at(2)));
598
599 hadLUT0 = static_cast<int>(cpmHADenergy.at(0));
600 if(cpmHADenergy.at(0) > 0) fill(groupName+"lut_HAD0",etalut,philut, hadLUT0);
601 hadLUT1 = static_cast<int>(cpmHADenergy.at(1));
602 if(cpmHADenergy.at(1) > 0) fill(groupName+"lut_HAD1",etalut,philut, hadLUT1);
603 hadLUT2 = static_cast<int>(cpmHADenergy.at(2));
604 if(cpmHADenergy.at(2) > 0)fill(groupName+"lut_HAD2",etalut,philut, hadLUT2);
605 }
606 }
607 }
608
609 std::vector<MonitorJE> vecMonJE; // All elements
610
611 //Create the JetElement objects and calculate scaled phi
612 for (const xAOD::JetElement* je : *jetElementTES) {
613 ATH_CHECK( makeTowerJE(je, vecMonJE) );
614 }
615
616 //loop over the jet element container to fill the lut histos
617 for (auto& jet : vecMonJE) {
618
619 std::vector<uint16_t> jepEMenergy = (jet.element)->emJetElementETVec();
620 std::vector<uint16_t> jepHADenergy = (jet.element)->hadJetElementETVec();
621
622 for (auto eta: jet.etaScaled) {
623 etalut = eta;
624 if ( std::abs(eta) > 2.5){
625 for (auto phi: jet.phiScaled) {
626 philut = phi;
627 if(jepEMenergy.size() > 2){
628 ATH_MSG_DEBUG("JetElement :: emLUT0 :: " << static_cast<unsigned>(jepEMenergy.at(0)) << ":: emLUT1 :: " << static_cast<unsigned>(jepEMenergy.at(1)) << ":: emLUT2 :: " << static_cast<unsigned>(jepEMenergy.at(2)));
629
630 emLUT0 = static_cast<int>(jepEMenergy.at(0));
631 if(jepEMenergy.at(0) > 0) fill(groupName+"lut_EM0",etalut,philut, emLUT0);
632
633 emLUT1 = static_cast<int>(jepEMenergy.at(1));
634 if(jepEMenergy.at(1) > 0) fill(groupName+"lut_EM1",etalut,philut, emLUT1);
635
636 emLUT2 = static_cast<int>(jepEMenergy.at(2));
637 if(jepEMenergy.at(2) > 0) fill(groupName+"lut_EM2",etalut,philut, emLUT2);
638 }
639 if(jepHADenergy.size()> 2){
640 ATH_MSG_DEBUG("JetElement :: hadLUT0 :: " << static_cast<unsigned>(jepHADenergy.at(0)) << ":: hadLUT1 :: " << static_cast<unsigned>(jepHADenergy.at(1)) << ":: hadLUT2 :: " << static_cast<unsigned>(jepHADenergy.at(2)));
641
642 hadLUT0 = static_cast<int>(jepHADenergy.at(0));
643 if(jepHADenergy.at(0) > 0) fill(groupName+"lut_HAD0",etalut,philut, hadLUT0);
644
645 hadLUT1 = static_cast<int>(jepHADenergy.at(1));
646 if(jepHADenergy.at(1) > 0) fill(groupName+"lut_HAD1",etalut,philut, hadLUT1);
647
648 hadLUT2 = static_cast<int>(jepHADenergy.at(2));
649 if(jepHADenergy.at(2) > 0) fill(groupName+"lut_HAD2",etalut,philut, hadLUT2);
650 }
651 }
652 }
653 }
654 }
655
656 SG::ReadHandle<xAOD::eFexEMRoIContainer>eFexContainer(m_eFexEMContainerKey, ctx);
657 if ( !eFexContainer.isValid() ) {
658 ATH_MSG_WARNING("No eFex EM container found in storegate "<< eFexContainer.key());
659 }
660
661 // monitored variables for histograms
662 auto TOBeT = Monitored::Scalar<float>("TOBTransverseEnergy",0.0);
663 auto TOBeta = Monitored::Scalar<float>("TOBEta",0.0);
664 auto TOBphi = Monitored::Scalar<float>("TOBPhi",0.0);
665 auto TOBeT_max = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
666 auto TOBeta_max = Monitored::Scalar<float>("TOBEta_max",0.0);
667 auto TOBphi_max = Monitored::Scalar<float>("TOBPhi_max",0.0);
668 auto TOBeT_max_in = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
669 auto TOBeta_max_in = Monitored::Scalar<float>("TOBEta_max",0.0);
670 auto TOBphi_max_in = Monitored::Scalar<float>("TOBPhi_max",0.0);
671
672 TOBeT_max = 0;
673 TOBeT_max_in = 0;
674
675 for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
676
677 const xAOD::eFexEMRoIContainer* emTobs;
678 CHECK( evtStore()->retrieve( emTobs, key ) );
679
680 for(auto tob : *emTobs) {
681 TOBeT = tob->et()/1000; //eT in GeV
682 TOBeta = tob->eta();
683
684 // adjust the phi to 0 to 2 pi
685 if (tob->phi() < 0) {
686 TOBphi = tob->phi()+2*M_PI;
687 }
688 else {
689 TOBphi = tob->phi();
690 }
691
692 // fill the eFex histograms in the right time slice
693 if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())-1) & 0xf )) {
694 if (TOBeT > 0.0){
695 fill(groupName+"Efex0", TOBeta, TOBphi, TOBeT);
696 }
697 }
698 else if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
699 if (TOBeT > 0.0){
700 if (TOBeT_max_in < TOBeT) {
701 TOBeT_max_in = tob->et()/1000;
702 TOBeta_max_in = tob->eta();
703 if (tob->phi() < 0) {
704 TOBphi_max_in = tob->phi()+2*M_PI;
705 }
706 else {
707 TOBphi_max_in = tob->phi();
708 }
709 }
710 fill(groupName+"Efex1", TOBeta, TOBphi, TOBeT);
711 }
712 }
713 else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
714 if (TOBeT > 0.0){
715 if (TOBeT_max < TOBeT) {
716 TOBeT_max = tob->et()/1000;
717 TOBeta_max = tob->eta();
718 if (tob->phi() < 0) {
719 TOBphi_max = tob->phi()+2*M_PI;
720 }
721 else {
722 TOBphi_max = tob->phi();
723 }
724 }
725 fill(groupName+"Efex2", TOBeta, TOBphi, TOBeT);
726 }
727 }
728 }
729 }
730 if (trigger == "eFex") {
731 fill("Efex_maxTOB_in", TOBeT_max_in);
732 fill("Efex_maxTOB_out", TOBeT_max);
733 fill("Efex_maxTOB_out", TOBeta_max, TOBphi_max);
734 fill("Efex_maxTOB_in", TOBeta_max_in, TOBphi_max_in);
735 }
736
737 // variables for histograms
738 auto jFexEt = Monitored::Scalar<int> ("jFexEt",0);
739 auto jFexeta = Monitored::Scalar<float>("jFexEta",0.0);
740 auto jFexphi = Monitored::Scalar<float>("jFexPhi",0.0);
741
742 // Access jFex tower container
743 SG::ReadHandle<xAOD::jFexTowerContainer> jFexTowerContainer{m_jFexDataTowerKey, ctx};
744 if(!jFexTowerContainer.isValid()) {
745 ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< m_jFexDataTowerKey<<". Will be skipped!");
746 }
747
748 //SG::ReadHandle<xAOD::jFexTowerContainer> jFexEmulatedTowerContainer{m_jFexEmulatedTowerKey, ctx};
749 SG::ReadHandle<xAOD::jFexTowerContainer> jEmulatedTowerContainer;
750 jEmulatedTowerContainer = SG::ReadHandle<xAOD::jFexTowerContainer>(m_EmulTowerKey,ctx);
751 if(!jEmulatedTowerContainer.isValid()) {
752 ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< jEmulatedTowerContainer.key()<<". Will be skipped!");
753 }
754 else {
755 for(const xAOD::jFexTower* emulTower : *jEmulatedTowerContainer) {
756 jFexEt=emulTower->et_count().at(0);
757 //Adding 1e-5 for plotting style
758 jFexeta=emulTower->eta()+1e-5;
759 if (emulTower->phi() < 0) {
760 jFexphi=emulTower->phi()+2*M_PI;
761 }
762 else {
763 jFexphi=emulTower->phi();
764 }
765 if (jFexEt > 175) {
766 fill(groupName+"JfexEmulated",jFexeta,jFexphi, jFexEt);
767 }
768 }
769 }
770
771 TOBeT_max = 0;
772 for(const xAOD::jFexSRJetRoI* jFexSRJetRoI : *jFexSRJetContainer) {
773 if(jFexSRJetRoI->tobWord()==0) continue; //remove empty TOBs
774 jFexEt=jFexSRJetRoI->tobEt()/5;
775 jFexeta=jFexSRJetRoI->eta();
776 if (jFexSRJetRoI->phi() < 0) {
777 jFexphi=jFexSRJetRoI->phi()+2*M_PI;
778 }
779 else {
780 jFexphi=jFexSRJetRoI->phi();
781 }
782 if (TOBeT_max < jFexEt) {
783 TOBeT_max = jFexSRJetRoI->tobEt()/5;
784 TOBeta_max = jFexSRJetRoI->eta();
785 if (jFexSRJetRoI->phi() < 0) {
786 TOBphi_max =jFexSRJetRoI->phi()+2*M_PI;
787 }
788 else {
789 TOBphi_max =jFexSRJetRoI->phi();
790 }
791 }
792 fill(groupName+"JfexSRJet", jFexeta, jFexphi, jFexEt);
793 }
794 if (trigger == "jFex") {
795 fill("Jfex_maxTOB", TOBeT_max);
796 fill("Jfex_maxTOB", TOBeta_max, TOBphi_max);
797 }
798
799 SG::ReadHandle<xAOD::jFexTauRoIContainer> jFexTauContainer{m_jFexTauContainerKey, ctx};
800 if(!jFexTauContainer.isValid()) {
801 ATH_MSG_WARNING("No jFex Tau container found in storegate "<< m_jFexTauContainerKey<<". Will be skipped!");
802 }
803 else {
804 for(const xAOD::jFexTauRoI* jFexTauRoI : *jFexTauContainer) {
805 if(jFexTauRoI->tobWord()==0) continue; //remove empty TOBs
806 jFexEt =jFexTauRoI->tobEt()/5;
807 jFexeta=jFexTauRoI->eta();
808 if (jFexTauRoI->phi() < 0) {
809 jFexphi=jFexTauRoI->phi()+2*M_PI;
810 }
811 else {
812 jFexphi=jFexTauRoI->phi();
813 }
814 fill(groupName+"JfexTau", jFexeta, jFexphi, jFexEt);
815 }
816 }
817
818 auto gFexEt = Monitored::Scalar<int> ("gFexEt",0);
819 auto gFexEta = Monitored::Scalar<float>("gFexEta",0.0);
820 auto gFexPhi = Monitored::Scalar<float>("gFexPhi",0.0);
821 int key_index = 0;
822
823 TOBeT_max = 0;
824 // Small-R and large-R jets container loop
825 for (const auto& key : m_gFexJetTobKeyList){
826 SG::ReadHandle<xAOD::gFexJetRoIContainer> jetContainer (key, ctx);
827 // Check that this container is present
828 if ( !jetContainer.isValid() ) {
829 ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
830 }
831 else {
832 for(const xAOD::gFexJetRoI* gFexJetRoIContainer : *jetContainer) {
833 gFexEt =gFexJetRoIContainer->gFexTobEt()/10;
834 gFexEta=gFexJetRoIContainer->eta();
835 if (gFexJetRoIContainer->phi() < 0) {
836 gFexPhi=gFexJetRoIContainer->phi()+2*M_PI;
837 }
838 else {
839 gFexPhi=gFexJetRoIContainer->phi();
840 }
841 if (TOBeT_max < gFexEt) {
842 TOBeT_max = gFexJetRoIContainer->gFexTobEt()/10;
843 TOBeta_max = gFexJetRoIContainer->eta();
844 if (gFexJetRoIContainer->phi() < 0) {
845 TOBphi_max=gFexJetRoIContainer->phi()+2*M_PI;
846 }
847 else {
848 TOBphi_max=gFexJetRoIContainer->phi();
849 }
850 }
851 if (key_index == 0) {
852 fill(groupName+"GfexSRJet",gFexEta, gFexPhi, gFexEt);
853 }
854 else if (key_index == 1) {
855 fill(groupName+"GfexLRJet",gFexEta, gFexPhi, gFexEt);
856 }
857 }
858 }
859 key_index++;
860 }
861 if (trigger == "gFex") {
862 fill("Gfex_maxTOB", TOBeT_max);
863 fill("Gfex_maxTOB", TOBeta_max, TOBphi_max);
864 }
865
866 }
867 else {
868 auto eventMonitor_all_legacy= Monitored::Scalar<std::string>("eventMonitor_all_legacy", std::to_string(currentEventNo));
869 auto eventMonitor_all_phaseI= Monitored::Scalar<std::string>("eventMonitor_all_phaseI", trigger+"="+std::to_string(currentEventNo));
870 auto lbMonitor_all= Monitored::Scalar<std::string>("lbMonitor_all", std::to_string(lumiNo));
871 if (legacyTrigger) {
872 fill("Event_all_", eventMonitor_all_legacy, lbMonitor_all );
873 }
874 if (phase1Trigger) {
875 fill("Event_all_", eventMonitor_all_phaseI, lbMonitor_all );
876 }
877
878 SG::ReadHandle<xAOD::eFexEMRoIContainer>eFexContainer(m_eFexEMContainerKey, ctx);
879 if ( !eFexContainer.isValid() ) {
880 ATH_MSG_WARNING("No eFex EM container found in storegate "<< eFexContainer.key());
881 }
882
883 // monitored variables for histograms
884 auto TOBeT = Monitored::Scalar<float>("TOBTransverseEnergy",0.0);
885 auto TOBeta = Monitored::Scalar<float>("TOBEta",0.0);
886 auto TOBphi = Monitored::Scalar<float>("TOBPhi",0.0);
887 auto TOBeT_max = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
888 auto TOBeta_max = Monitored::Scalar<float>("TOBEta_max",0.0);
889 auto TOBphi_max = Monitored::Scalar<float>("TOBPhi_max",0.0);
890 auto TOBeT_max_in = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
891 auto TOBeta_max_in = Monitored::Scalar<float>("TOBEta_max",0.0);
892 auto TOBphi_max_in = Monitored::Scalar<float>("TOBPhi_max",0.0);
893
894 TOBeT_max = 0;
895 TOBeT_max_in = 0;
896
897 for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
898
899 const xAOD::eFexEMRoIContainer* emTobs;
900 CHECK( evtStore()->retrieve( emTobs, key ) );
901
902 for(auto tob : *emTobs) {
903 TOBeT = tob->et()/1000; //eT in GeV
904 TOBeta = tob->eta();
905
906 // adjust the phi to 0 to 2 pi
907 if (tob->phi() < 0) {
908 TOBphi = tob->phi()+2*M_PI;
909 }
910 else {
911 TOBphi = tob->phi();
912 }
913
914 if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
915 if (TOBeT > 0.0){
916 if (TOBeT_max_in < TOBeT) {
917 TOBeT_max_in = tob->et()/1000;
918 TOBeta_max_in = tob->eta();
919 if (tob->phi() < 0) {
920 TOBphi_max_in = tob->phi()+2*M_PI;
921 }
922 else {
923 TOBphi_max_in = tob->phi();
924 }
925 }
926 }
927 }
928 else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
929 if (TOBeT > 0.0){
930 if (TOBeT_max < TOBeT) {
931 TOBeT_max = tob->et()/1000;
932 TOBeta_max = tob->eta();
933 if (tob->phi() < 0) {
934 TOBphi_max = tob->phi()+2*M_PI;
935 }
936 else {
937 TOBphi_max = tob->phi();
938 }
939 }
940 }
941 }
942 }
943 }
944 if (trigger == "eFex") {
945 fill("Efex_maxTOB_in", TOBeT_max_in);
946 fill("Efex_maxTOB_out", TOBeT_max);
947 fill("Efex_maxTOB_out", TOBeta_max, TOBphi_max);
948 fill("Efex_maxTOB_in", TOBeta_max_in, TOBphi_max_in);
949 }
950
951 // variables for histograms
952 auto jFexEt = Monitored::Scalar<int> ("jFexEt",0);
953 auto jFexeta = Monitored::Scalar<float>("jFexEta",0.0);
954 auto jFexphi = Monitored::Scalar<float>("jFexPhi",0.0);
955
956 // Access jFex tower container
957 SG::ReadHandle<xAOD::jFexTowerContainer> jFexTowerContainer{m_jFexDataTowerKey, ctx};
958 if(!jFexTowerContainer.isValid()) {
959 ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< m_jFexDataTowerKey<<". Will be skipped!");
960 }
961
962 TOBeT_max = 0;
963 for(const xAOD::jFexSRJetRoI* jFexSRJetRoI : *jFexSRJetContainer) {
964 if(jFexSRJetRoI->tobWord()==0) continue; //remove empty TOBs
965 jFexEt=jFexSRJetRoI->tobEt()/5;
966 jFexeta=jFexSRJetRoI->eta();
967 if (jFexSRJetRoI->phi() < 0) {
968 jFexphi=jFexSRJetRoI->phi()+2*M_PI;
969 }
970 else {
971 jFexphi=jFexSRJetRoI->phi();
972 }
973 if (TOBeT_max < jFexEt) {
974 TOBeT_max = jFexSRJetRoI->tobEt()/5;
975 TOBeta_max = jFexSRJetRoI->eta();
976 if (jFexSRJetRoI->phi() < 0) {
977 TOBphi_max =jFexSRJetRoI->phi()+2*M_PI;
978 }
979 else {
980 TOBphi_max =jFexSRJetRoI->phi();
981 }
982 }
983 }
984 if (trigger == "jFex") {
985 fill("Jfex_maxTOB", TOBeT_max);
986 fill("Jfex_maxTOB", TOBeta_max, TOBphi_max);
987 }
988
989 auto gFexEt = Monitored::Scalar<int> ("gFexEt",0);
990 auto gFexEta = Monitored::Scalar<float>("gFexEta",0.0);
991 auto gFexPhi = Monitored::Scalar<float>("gFexPhi",0.0);
992
993 TOBeT_max = 0;
994 // Small-R and large-R jets container loop
995 for (const auto& key : m_gFexJetTobKeyList){
996 SG::ReadHandle<xAOD::gFexJetRoIContainer> jetContainer (key, ctx);
997 // Check that this container is present
998 if ( !jetContainer.isValid() ) {
999 ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
1000 }
1001 else {
1002 for(const xAOD::gFexJetRoI* gFexJetRoIContainer : *jetContainer) {
1003 gFexEt =gFexJetRoIContainer->gFexTobEt()/10;
1004 gFexEta=gFexJetRoIContainer->eta();
1005 if (gFexJetRoIContainer->phi() < 0) {
1006 gFexPhi=gFexJetRoIContainer->phi()+2*M_PI;
1007 }
1008 else {
1009 gFexPhi=gFexJetRoIContainer->phi();
1010 }
1011 if (TOBeT_max < gFexEt) {
1012 TOBeT_max = gFexJetRoIContainer->gFexTobEt()/10;
1013 TOBeta_max = gFexJetRoIContainer->eta();
1014 if (gFexJetRoIContainer->phi() < 0) {
1015 TOBphi_max=gFexJetRoIContainer->phi()+2*M_PI;
1016 }
1017 else {
1018 TOBphi_max=gFexJetRoIContainer->phi();
1019 }
1020 }
1021 }
1022 }
1023 }
1024 if (trigger == "gFex") {
1025 fill("Gfex_maxTOB", TOBeT_max);
1026 fill("Gfex_maxTOB", TOBeta_max, TOBphi_max);
1027 }
1028
1029 }
1030
1031 return StatusCode::SUCCESS;
1032}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define CHECK(...)
Evaluate an expression and check for errors.
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
StatusCode makeTowerCPM(const xAOD::CPMTower *cpm, std::vector< MonitorCPM > &vecMonCPM) const
bool pulseQuality(const std::vector< uint16_t > &ttPulse, int peakSlice) const
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_jFexDataTowerKey
StatusCode fillPPMEtaPhi(MonitorTT &monTT, const std::string &groupName, const std::string &weightName, double weight) const
SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_jFexTauContainerKey
StatusCode makeTowerJE(const xAOD::JetElement *je, std::vector< MonitorJE > &vecMonJE) const
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetContainerKey
StatusCode makeTowerPPM(const xAOD::TriggerTower *tt, std::vector< MonitorTT > &vecMonTT) const
Helper functions.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
uint16_t tobEt() const
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
float phi() const
uint16_t tobEt() const
float eta() const
@ layer
Definition HitInfo.h:79
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
eFexEMRoIContainer_v1 eFexEMRoIContainer
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
Definition gFexJetRoI.h:16
JetElement_v2 JetElement
Define the latest version of the JetElement class.
gFexJetRoIContainer_v1 gFexJetRoIContainer
jFexTowerContainer_v1 jFexTowerContainer
Define the latest version of the TriggerTower container.
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class.
Definition jFexTauRoI.h:13
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class.
jFexSRJetRoIContainer_v1 jFexSRJetRoIContainer
jFexTower_v1 jFexTower
Define the latest version of the TriggerTower class.
Definition jFexTower.h:15
void fill(H5::Group &out_file, size_t iterations)

◆ fillPPMEtaPhi()

StatusCode MistimedStreamMonitorAlgorithm::fillPPMEtaPhi ( MonitorTT & monTT,
const std::string & groupName,
const std::string & weightName,
double weight ) const
private

Definition at line 1166 of file MistimedStreamMonitorAlgorithm.cxx.

1169 {
1170
1171
1172 double phiMod = monTT.phiScaled; // Integer binning for 2D plots
1173 double etaMod = monTT.tower->eta();
1174 const double absEta = std::abs(etaMod);
1175
1176 const std::vector<double> offset32 = {1.5, 0.5, -0.5, -1.5};
1177 const std::vector<double> offset25 = {0.5, -0.5};
1178 std::vector<double> offset = {};
1179
1180 if (absEta > 3.2) {
1181 // Fill four bins in phi
1182 phiMod = std::floor(phiMod/4)*4. + 2.;
1183 offset = offset32;
1184 }
1185 else if (absEta > 2.5) {
1186 // Fill two bins in phi
1187 phiMod = std::floor(phiMod/2)*2. + 1.;
1188 offset = offset25;
1189 }
1190 else {
1191 offset = {0.};
1192 }
1193
1194 ATH_MSG_DEBUG("absEta: " << absEta << "offset.size(): " << offset.size());
1195
1196 // Fill the histograms
1197 for (auto phiOffset : offset) {
1198
1199 auto etaTT_2D = Monitored::Scalar<double>("etaTT_2D", etaMod);
1200 auto phiTT_2D = Monitored::Scalar<double>("phiTT_2D", phiMod + phiOffset);
1201
1202 auto weight_2D = Monitored::Scalar<double>(weightName, weight); // Weight for filling 2D profile histograms; name must be included in python histogram definition
1203 ATH_MSG_DEBUG("groupName: weight_2D" << weight_2D);
1204
1205 fill(groupName, etaTT_2D, phiTT_2D, weight_2D);
1206
1207 }
1208
1209 return StatusCode::SUCCESS;
1210}

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ GetEventInfo()

SG::ReadHandle< xAOD::EventInfo > AthMonitorAlgorithm::GetEventInfo ( const EventContext & ctx) const
inherited

Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)

Parameters
ctxEventContext for the event
Returns
a SG::ReadHandle<xAOD::EventInfo>

Definition at line 111 of file AthMonitorAlgorithm.cxx.

111 {
112 return SG::ReadHandle<xAOD::EventInfo>(m_EventInfoKey, ctx);
113}
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.

◆ getGroup()

const ToolHandle< GenericMonitoringTool > & AthMonitorAlgorithm::getGroup ( const std::string & name) const
inherited

Get a specific monitoring tool from the tool handle array.

Finds a specific GenericMonitoringTool instance from the list of monitoring tools (a ToolHandleArray). Throws a FATAL warning if the object found is empty.

Parameters
namestring name of the desired tool
Returns
reference to the desired monitoring tool

Definition at line 168 of file AthMonitorAlgorithm.cxx.

168 {
169 // get the pointer to the tool, and check that it exists
170 auto idx = m_toolLookupMap.find(name);
171 if (ATH_LIKELY(idx != m_toolLookupMap.end())) {
172 return m_tools[idx->second];
173 }
174 else {
175 // treat empty tool handle case as in Monitored::Group
176 if (m_toolLookupMap.empty()) {
177 return m_dummy;
178 }
179
180 if (!isInitialized()) {
182 "It seems that the AthMonitorAlgorithm::initialize was not called "
183 "in derived class initialize method");
184 } else {
185 std::string available = std::accumulate(
186 m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
187 [](const std::string& s, auto h) { return s + "," + h.first; });
188 ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
189 << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
190 << "your python configuration and c++ filling code. Note: your available groups are {"
191 << available << "}.");
192 }
193 }
194 return m_dummy;
195}
#define ATH_MSG_FATAL(x)
#define ATH_LIKELY(x)
std::unordered_map< std::string, size_t > m_toolLookupMap
const ToolHandle< GenericMonitoringTool > m_dummy
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.

◆ getTrigDecisionTool()

const ToolHandle< Trig::TrigDecisionTool > & AthMonitorAlgorithm::getTrigDecisionTool ( ) const
inherited

Get the trigger decision tool member.

The trigger decision tool is used to check whether a specific trigger is passed by an event.

Returns
m_trigDecTool

Definition at line 198 of file AthMonitorAlgorithm.cxx.

198 {
199 return m_trigDecTool;
200}

◆ initialize()

StatusCode MistimedStreamMonitorAlgorithm::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 17 of file MistimedStreamMonitorAlgorithm.cxx.

17 {
18
19 ATH_MSG_DEBUG("MistimedStreamMonitorAlgorith::initialize");
20 ATH_MSG_DEBUG("Package Name "<< m_packageName);
21 ATH_MSG_DEBUG("m_xAODTriggerTowerContainerName "<< m_xAODTriggerTowerContainerName);
22
23 ATH_MSG_INFO("m_eFexEMContainer: "<< m_eFexEMContainerKey);
24 ATH_MSG_INFO("m_eFexEMOutContainer: "<< m_eFexEMOutContainerKey);
25 ATH_MSG_INFO("m_eFexTauContainer: "<< m_eFexTauContainerKey);
26
27 // we initialise all the containers that we need
29 ATH_CHECK( m_xAODTriggerTowerContainerName.initialize() );
30 ATH_CHECK( m_cpmTowerLocation.initialize());
31 ATH_CHECK( m_jetElementLocation.initialize());
32 ATH_CHECK( m_trigDec.retrieve() );
33 ATH_CHECK( m_ttTool.retrieve());
34 ATH_CHECK( m_runParametersContainer.initialize() );
35 ATH_CHECK( m_readoutConfigContainerJSON.initialize() );
36 ATH_CHECK( m_ctpRdoReadKey.initialize() );
37
38 // eFex Container
39 ATH_CHECK( m_eFexEMContainerKey.initialize() );
40 ATH_CHECK( m_eFexEMOutContainerKey.initialize() );
41 ATH_CHECK( m_eFexTauContainerKey.initialize() );
42
43 // jFex Container
44 ATH_CHECK( m_jFexLRJetContainerKey.initialize() );
45 ATH_CHECK( m_jFexSRJetContainerKey.initialize() );
46 ATH_CHECK( m_jFexTauContainerKey.initialize() );
47 ATH_CHECK( m_jFexDataTowerKey.initialize() );
48 ATH_CHECK( m_EmulTowerKey.initialize() );
49
50 // gFex Container
51 ATH_CHECK( m_gFexJetTobKeyList.initialize() ) ;
52
54}
#define ATH_MSG_INFO(x)
virtual StatusCode initialize() override
initialize
StatusCode initialize(bool used=true)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ makeTowerCPM()

StatusCode MistimedStreamMonitorAlgorithm::makeTowerCPM ( const xAOD::CPMTower * cpm,
std::vector< MonitorCPM > & vecMonCPM ) const
private

Definition at line 1055 of file MistimedStreamMonitorAlgorithm.cxx.

1057{
1058 // Geometry
1059 const double phi = cpm->phi();
1060 double phiMod = phi * m_phiScaleTT;
1061
1062
1063 // Fill CPM quantities
1064 MonitorCPM monCPM;
1065 monCPM.tower = cpm;
1066
1067 double etaMod = monCPM.tower->eta();
1068 const double absEta = std::abs(etaMod);
1069
1070 const std::vector<double> offset32 = {1.5, 0.5, -0.5, -1.5};
1071 const std::vector<double> offset25 = {0.5, -0.5};
1072 std::vector<double> offset = {};
1073
1074 if (absEta > 3.2) {
1075 // Fill four bins in phi
1076 phiMod = std::floor(phiMod/4)*4. + 2.;
1077 offset = offset32;
1078 }
1079 else if (absEta > 2.5) {
1080 // Fill two bins in phi
1081 phiMod = std::floor(phiMod/2)*2. + 1.;
1082 offset = offset25;
1083 }
1084 else {
1085 offset = {0.};
1086 }
1087
1088
1089
1090 // Fill the histograms
1091 for (auto phiOffset : offset) {
1092 monCPM.phiScaled.push_back(phiMod + phiOffset);
1093 }
1094
1095 monCPM.etaScaled = etaMod;
1096
1097
1098 vecMonCPM.push_back(monCPM);
1099
1100 return StatusCode::SUCCESS;
1101}
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)

◆ makeTowerJE()

StatusCode MistimedStreamMonitorAlgorithm::makeTowerJE ( const xAOD::JetElement * je,
std::vector< MonitorJE > & vecMonJE ) const
private

Definition at line 1103 of file MistimedStreamMonitorAlgorithm.cxx.

1105{
1106
1107 // Use JEP info to fill the forward part of the lut plots, but since this has TT granularity we have to play some tricks
1108
1109 // Geometry
1110 const double phi = je->phi();
1111 double phiMod = phi * m_phiScaleTT;
1112
1113 // Fill JE quantities
1114 MonitorJE monJE;
1115 monJE.element = je;
1116
1117 double etaMod = monJE.element->eta();
1118 const double absEta = std::abs(etaMod);
1119 int signeta = 1;
1120 if( etaMod < 0) signeta = -1;
1121
1122
1123 const std::vector<double> offset32 = {1.5, 0.5, -0.5, -1.5};
1124 const std::vector<double> offset25 = {0.5, -0.5};
1125 std::vector<double> offset = {};
1126
1127 if (absEta > 3.2) {
1128 // Fill four bins in phi
1129 phiMod = std::floor(phiMod/4)*4. + 2.;
1130 offset = offset32;
1131 monJE.etaScaled.push_back(signeta*4.7);
1132 monJE.etaScaled.push_back(signeta*3.7);
1133 monJE.etaScaled.push_back(signeta*3.5);
1134
1135 }
1136 else if(absEta > 2.9) {
1137 phiMod = std::floor(phiMod/2)*2. + 1.;
1138 offset = offset25;
1139 monJE.etaScaled.push_back(signeta*3.15);
1140 }
1141
1142
1143 if (absEta > 2.5) {
1144 // Fill two bins in phi
1145 phiMod = std::floor(phiMod/2)*2. + 1.;
1146 offset = offset25;
1147 monJE.etaScaled.push_back(etaMod);
1148 }
1149 else {
1150 offset = {0.};
1151 monJE.etaScaled.push_back(etaMod);
1152 }
1153
1154
1155 // Fill the histograms
1156 for (auto phiOffset : offset) {
1157 monJE.phiScaled.push_back(phiMod + phiOffset);
1158 }
1159
1160 vecMonJE.push_back(monJE);
1161
1162 return StatusCode::SUCCESS;
1163}
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)

◆ makeTowerPPM()

StatusCode MistimedStreamMonitorAlgorithm::makeTowerPPM ( const xAOD::TriggerTower * tt,
std::vector< MonitorTT > & vecMonTT ) const
private

Helper functions.

Definition at line 1035 of file MistimedStreamMonitorAlgorithm.cxx.

1037{
1038 // Geometry
1039 const double phi = tt->phi();
1040 double phiMod = phi * m_phiScaleTT;
1041
1042
1043
1044 // Fill TT quantities
1045 MonitorTT monTT;
1046 monTT.tower = tt;
1047 monTT.phiScaled = phiMod;
1048 monTT.phi1d = 0;
1049 vecMonTT.push_back(monTT);
1050
1051 return StatusCode::SUCCESS;
1052}
Struct to contain PPM trigger tower info.

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ parseList()

StatusCode AthMonitorAlgorithm::parseList ( const std::string & line,
std::vector< std::string > & result ) const
virtualinherited

Parse a string into a vector.

The input string is a single long string of all of the trigger names. It parses this string and turns it into a vector, where each element is one trigger or trigger category.

Parameters
lineThe input string.
resultThe parsed output vector of strings.
Returns
StatusCode

Definition at line 345 of file AthMonitorAlgorithm.cxx.

345 {
346 std::string item;
347 std::stringstream ss(line);
348
349 ATH_MSG_DEBUG( "AthMonitorAlgorithm::parseList()" );
350
351 while ( std::getline(ss, item, ',') ) {
352 std::stringstream iss(item); // remove whitespace
353 iss >> item;
354 result.push_back(item);
355 }
356
357 return StatusCode::SUCCESS;
358}
static Double_t ss

◆ pulseQuality()

bool MistimedStreamMonitorAlgorithm::pulseQuality ( const std::vector< uint16_t > & ttPulse,
int peakSlice ) const
private

Definition at line 1213 of file MistimedStreamMonitorAlgorithm.cxx.

1213 {
1214
1215 bool goodPulse = true;
1216 int size = ttPulse.size();
1217 if (peakSlice > size) {
1218 ATH_MSG_ERROR("Peak Slice " << peakSlice << " supress the ttPulse vector size " << size );
1219 goodPulse = false;
1220 return goodPulse;
1221 }
1222 if (size < 1) {
1223 ATH_MSG_ERROR("The ttPulse vector size " << size << " not valid for Peak Slice " << peakSlice );
1224 goodPulse = false;
1225 return goodPulse;
1226 }
1227 int a = ttPulse[peakSlice-1];
1228 int b = ttPulse[peakSlice];
1229 int c = ttPulse[peakSlice+1];
1230 double tim = (0.5*a-0.5*c)/(a+c-2*b);
1231 double wid = (a+c-64.0)/(b-32.0);
1232 if ( tim < 0.0 ) goodPulse = false;
1233 else if ( tim > 0.3 ) goodPulse = false;
1234 if ( wid < 1.0 ) goodPulse = false;
1235 else if ( wid > 1.6 ) goodPulse = false;
1236
1237 ATH_MSG_DEBUG("Pulse qual= "<< goodPulse<<" tim = "<<tim<<" wid = "<<wid);
1238 ATH_MSG_DEBUG("a = "<< a <<" b = "<<b<<" c = "<<c);
1239
1240 return goodPulse;
1241}
static Double_t a

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ trigChainsArePassed()

bool AthMonitorAlgorithm::trigChainsArePassed ( const std::vector< std::string > & vTrigNames) const
inherited

Check whether triggers are passed.

For the event, use the trigger decision tool to check that at least one of the triggers listed in the supplied vector is passed.

Parameters
vTrigNamesList of trigger names.
Returns
If empty input, default to true. If at least one trigger is specified, returns whether at least one trigger was passed.

Definition at line 203 of file AthMonitorAlgorithm.cxx.

203 {
204
205
206 // If no triggers were given, return true.
207 if (vTrigNames.empty()) return true;
208
209
210 // Trigger: Check if this Algorithm is being run as an Express Stream job.
211 // Events are entering the express stream are chosen randomly, and by chain,
212 // Hence an additional check should be aplied to see if the chain(s)
213 // monitored here are responsible for the event being selected for
214 // the express stream.
215
216 const auto group = m_trigDecTool->getChainGroup(vTrigNames);
218 const auto passedBits = m_trigDecTool->isPassedBits(group);
219 bool expressPass = passedBits & TrigDefs::Express_passed; //bitwise AND
220 if(!expressPass) {
221 return false;
222 }
223 }
224
225 // monitor the event if any of the chains in the chain group passes the event.
226 return group->isPassed();
227
228}
Gaudi::Property< bool > m_enforceExpressTriggers

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ acc

MistimedStreamMonitorAlgorithm.acc = MainServicesCfg(flags)

Definition at line 186 of file MistimedStreamMonitorAlgorithm.py.

◆ ATLAS_THREAD_SAFE

std::map<uint32_t, int> m_event_counter MistimedStreamMonitorAlgorithm::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 159 of file MistimedStreamMonitorAlgorithm.h.

◆ False

MistimedStreamMonitorAlgorithm.False

Definition at line 196 of file MistimedStreamMonitorAlgorithm.py.

◆ Files

MistimedStreamMonitorAlgorithm.Files

Definition at line 177 of file MistimedStreamMonitorAlgorithm.py.

◆ flags

MistimedStreamMonitorAlgorithm.flags = initConfigFlags()

Definition at line 174 of file MistimedStreamMonitorAlgorithm.py.

◆ GlobalTag

MistimedStreamMonitorAlgorithm.GlobalTag

Definition at line 176 of file MistimedStreamMonitorAlgorithm.py.

◆ HISTFileName

MistimedStreamMonitorAlgorithm.HISTFileName

Definition at line 180 of file MistimedStreamMonitorAlgorithm.py.

◆ m_cpmTowerLocation

SG::ReadHandleKey<xAOD::CPMTowerContainer> MistimedStreamMonitorAlgorithm::m_cpmTowerLocation {this, "CPMTowerLocation", LVL1::TrigT1CaloDefs::CPMTowerLocation, "CPM container"}
private

Definition at line 102 of file MistimedStreamMonitorAlgorithm.h.

102{this, "CPMTowerLocation", LVL1::TrigT1CaloDefs::CPMTowerLocation, "CPM container"};
static const std::string CPMTowerLocation

◆ m_ctpRdoReadKey

SG::ReadHandleKey<CTP_RDO> MistimedStreamMonitorAlgorithm::m_ctpRdoReadKey {this, "CTPRDOReadKey", LVL1CTP::DEFAULT_RDOOutputLocation,"Read handle key to CTP_RDO for conversion to ByteStream"}
private

Definition at line 97 of file MistimedStreamMonitorAlgorithm.h.

97{this, "CTPRDOReadKey", LVL1CTP::DEFAULT_RDOOutputLocation,"Read handle key to CTP_RDO for conversion to ByteStream"};
static const std::string DEFAULT_RDOOutputLocation
location of CTP RDO output in StoreGate

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 356 of file AthMonitorAlgorithm.h.

◆ m_dataTypeStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_dataTypeStr {this,"DataType","userDefined"}
protectedinherited

DataType string pulled from the job option and converted to enum.

Definition at line 358 of file AthMonitorAlgorithm.h.

358{this,"DataType","userDefined"};

◆ m_defaultLBDuration

Gaudi::Property<float> AthMonitorAlgorithm::m_defaultLBDuration {this,"DefaultLBDuration",60.}
protectedinherited

Default duration of one lumi block.

Definition at line 365 of file AthMonitorAlgorithm.h.

365{this,"DefaultLBDuration",60.};

◆ m_detailLevel

Gaudi::Property<int> AthMonitorAlgorithm::m_detailLevel {this,"DetailLevel",0}
protectedinherited

Sets the level of detail used in the monitoring.

Definition at line 366 of file AthMonitorAlgorithm.h.

366{this,"DetailLevel",0};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DQFilterTools

ToolHandleArray<IDQFilterTool> AthMonitorAlgorithm::m_DQFilterTools {this,"FilterTools",{}}
protectedinherited

Array of Data Quality filter tools.

Definition at line 346 of file AthMonitorAlgorithm.h.

346{this,"FilterTools",{}};

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 374 of file AthMonitorAlgorithm.h.

◆ m_eFexEMContainerKey

SG::ReadHandleKey<xAOD::eFexEMRoIContainer> MistimedStreamMonitorAlgorithm::m_eFexEMContainerKey {this,"eFexEMContainer","L1_eEMxRoI","SG key of the input eFex RoI container"}
private

Definition at line 106 of file MistimedStreamMonitorAlgorithm.h.

106{this,"eFexEMContainer","L1_eEMxRoI","SG key of the input eFex RoI container"};

◆ m_eFexEMOutContainerKey

SG::ReadHandleKey<xAOD::eFexEMRoIContainer> MistimedStreamMonitorAlgorithm::m_eFexEMOutContainerKey {this,"eFexEMOutContainer","L1_eEMxRoIOutOfTime","SG key of the input eFex RoI container"}
private

Definition at line 108 of file MistimedStreamMonitorAlgorithm.h.

108{this,"eFexEMOutContainer","L1_eEMxRoIOutOfTime","SG key of the input eFex RoI container"};

◆ m_efexItems

Gaudi::Property<std::vector<std::string> > MistimedStreamMonitorAlgorithm::m_efexItems {this,"EfexTriggers", {"L1_eEM26M"}, "eFex trigger items in BC0"}
private

Definition at line 128 of file MistimedStreamMonitorAlgorithm.h.

128{this,"EfexTriggers", {"L1_eEM26M"}, "eFex trigger items in BC0"};

◆ m_eFexTauContainerKey

SG::ReadHandleKey<xAOD::eFexTauRoIContainer> MistimedStreamMonitorAlgorithm::m_eFexTauContainerKey {this,"eFexTauContainer","L1_eTauxRoI","SG key of the input eFex Tau RoI container"}
private

Definition at line 107 of file MistimedStreamMonitorAlgorithm.h.

107{this,"eFexTauContainer","L1_eTauxRoI","SG key of the input eFex Tau RoI container"};

◆ m_EmulTowerKey

SG::ReadHandleKey<xAOD::jFexTowerContainer> MistimedStreamMonitorAlgorithm::m_EmulTowerKey {this, "InputEmulatedTowers", "L1_jFexEmulatedTowers", "SG key of the emulated jFex Tower container"}
private

Definition at line 116 of file MistimedStreamMonitorAlgorithm.h.

116{this, "InputEmulatedTowers", "L1_jFexEmulatedTowers", "SG key of the emulated jFex Tower container"};

◆ m_enforceExpressTriggers

Gaudi::Property<bool> AthMonitorAlgorithm::m_enforceExpressTriggers
privateinherited
Initial value:
{this,
"EnforceExpressTriggers", false,
"Requires that matched triggers made the event enter the express stream"}

Definition at line 377 of file AthMonitorAlgorithm.h.

377 {this,
378 "EnforceExpressTriggers", false,
379 "Requires that matched triggers made the event enter the express stream"};

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

Gaudi::Property<std::string> AthMonitorAlgorithm::m_environmentStr {this,"Environment","user"}
protectedinherited

Environment string pulled from the job option and converted to enum.

Definition at line 357 of file AthMonitorAlgorithm.h.

357{this,"Environment","user"};

◆ m_eventCounter

std::atomic<int> MistimedStreamMonitorAlgorithm::m_eventCounter {0}
mutableprivate

Definition at line 156 of file MistimedStreamMonitorAlgorithm.h.

156{0};

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> AthMonitorAlgorithm::m_EventInfoKey {this,"EventInfoKey","EventInfo"}
protectedinherited

Key for retrieving EventInfo from StoreGate.

Definition at line 367 of file AthMonitorAlgorithm.h.

367{this,"EventInfoKey","EventInfo"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fileKey

Gaudi::Property<std::string> AthMonitorAlgorithm::m_fileKey {this,"FileKey",""}
protectedinherited

Internal Athena name for file.

Definition at line 363 of file AthMonitorAlgorithm.h.

363{this,"FileKey",""};

◆ m_gfexItems

Gaudi::Property<std::vector<std::string> > MistimedStreamMonitorAlgorithm::m_gfexItems {this,"GfexTriggers", {"L1_gJ400p0ETA25", "L1_gLJ140p0ETA25"}, "gFex trigger items in BC0"}
private

Definition at line 130 of file MistimedStreamMonitorAlgorithm.h.

130{this,"GfexTriggers", {"L1_gJ400p0ETA25", "L1_gLJ140p0ETA25"}, "gFex trigger items in BC0"};

◆ m_gFexJetTobKeyList

SG::ReadHandleKeyArray<xAOD::gFexJetRoIContainer> MistimedStreamMonitorAlgorithm::m_gFexJetTobKeyList {this,"gFexJetTobKeyList",{"L1_gFexLRJetRoI", "L1_gFexSRJetRoI"},"Array of gFEX jet ReadHandleKeys to fill histograms for"}
private

Definition at line 119 of file MistimedStreamMonitorAlgorithm.h.

119{this,"gFexJetTobKeyList",{"L1_gFexLRJetRoI", "L1_gFexSRJetRoI"},"Array of gFEX jet ReadHandleKeys to fill histograms for"};

◆ m_isIons

Gaudi::Property<bool> MistimedStreamMonitorAlgorithm::m_isIons {this, "IsIons", false, "Is ions data" }
private

Definition at line 127 of file MistimedStreamMonitorAlgorithm.h.

127{this, "IsIons", false, "Is ions data" };

◆ m_jetElementLocation

SG::ReadHandleKey<xAOD::JetElementContainer> MistimedStreamMonitorAlgorithm::m_jetElementLocation {this, "JetElementLocation", LVL1::TrigT1CaloDefs::JetElementLocation, "Jet Element Container"}
private

Definition at line 104 of file MistimedStreamMonitorAlgorithm.h.

104{this, "JetElementLocation", LVL1::TrigT1CaloDefs::JetElementLocation, "Jet Element Container"};
static const std::string JetElementLocation

◆ m_jFexDataTowerKey

SG::ReadHandleKey<xAOD::jFexTowerContainer> MistimedStreamMonitorAlgorithm::m_jFexDataTowerKey {this, "jFexDataTower","L1_jFexDataTowers","SG key of the input jFex Tower container"}
private

Definition at line 115 of file MistimedStreamMonitorAlgorithm.h.

115{this, "jFexDataTower","L1_jFexDataTowers","SG key of the input jFex Tower container"};

◆ m_jfexItems

Gaudi::Property<std::vector<std::string> > MistimedStreamMonitorAlgorithm::m_jfexItems {this,"JfexTriggers", {"L1_jJ160", "L1_jJ500"}, "jFex trigger items in BC0"}
private

Definition at line 129 of file MistimedStreamMonitorAlgorithm.h.

129{this,"JfexTriggers", {"L1_jJ160", "L1_jJ500"}, "jFex trigger items in BC0"};

◆ m_jFexLRJetContainerKey

SG::ReadHandleKey< xAOD::jFexLRJetRoIContainer > MistimedStreamMonitorAlgorithm::m_jFexLRJetContainerKey {this,"jFexLRJetRoIContainer","L1_jFexLRJetRoI","SG key of the input jFex LR Jet Roi container"}
private

Definition at line 111 of file MistimedStreamMonitorAlgorithm.h.

111{this,"jFexLRJetRoIContainer","L1_jFexLRJetRoI","SG key of the input jFex LR Jet Roi container"};

◆ m_jFexSRJetContainerKey

SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > MistimedStreamMonitorAlgorithm::m_jFexSRJetContainerKey {this,"jFexSRJetRoIContainer","L1_jFexSRJetRoI","SG key of the input jFex SR Jet Roi container"}
private

Definition at line 112 of file MistimedStreamMonitorAlgorithm.h.

112{this,"jFexSRJetRoIContainer","L1_jFexSRJetRoI","SG key of the input jFex SR Jet Roi container"};

◆ m_jFexTauContainerKey

SG::ReadHandleKey< xAOD::jFexTauRoIContainer > MistimedStreamMonitorAlgorithm::m_jFexTauContainerKey {this,"jFexTauRoIContainer" ,"L1_jFexTauRoI" ,"SG key of the input jFex Tau Roi container"}
private

Definition at line 113 of file MistimedStreamMonitorAlgorithm.h.

113{this,"jFexTauRoIContainer" ,"L1_jFexTauRoI" ,"SG key of the input jFex Tau Roi container"};

◆ m_lbDurationDataKey

SG::ReadCondHandleKey<LBDurationCondData> AthMonitorAlgorithm::m_lbDurationDataKey {this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"}
protectedinherited

Definition at line 350 of file AthMonitorAlgorithm.h.

351{this,"LBDurationCondDataKey","LBDurationCondData","SG Key of LBDurationCondData object"};

◆ m_lumiDataKey

SG::ReadCondHandleKey<LuminosityCondData> AthMonitorAlgorithm::m_lumiDataKey {this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"}
protectedinherited

Definition at line 348 of file AthMonitorAlgorithm.h.

349{this,"LuminosityCondDataKey","LuminosityCondData","SG Key of LuminosityCondData object"};

◆ m_maxEvents

Gaudi::Property<int> MistimedStreamMonitorAlgorithm::m_maxEvents {this,"MaxEvents",15}
private

Definition at line 153 of file MistimedStreamMonitorAlgorithm.h.

153{this,"MaxEvents",15};

◆ m_mutex

std::mutex MistimedStreamMonitorAlgorithm::m_mutex {}
mutableprivate

Definition at line 158 of file MistimedStreamMonitorAlgorithm.h.

158{};

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_packageName

StringProperty MistimedStreamMonitorAlgorithm::m_packageName {this,"PackageName","MistimedStreamMonitor","group name for histogramming"}
private

Definition at line 89 of file MistimedStreamMonitorAlgorithm.h.

89{this,"PackageName","MistimedStreamMonitor","group name for histogramming"};

◆ m_phiScaleTT

Gaudi::Property<double> MistimedStreamMonitorAlgorithm::m_phiScaleTT {this, "phiScaleTT", 32./M_PI, "Scale factor to convert trigger tower phi to integer binning"}
private

Definition at line 124 of file MistimedStreamMonitorAlgorithm.h.

124{this, "phiScaleTT", 32./M_PI, "Scale factor to convert trigger tower phi to integer binning"};

◆ m_readoutConfigContainerJSON

SG::ReadCondHandleKey<L1CaloReadoutConfigContainerJSON> MistimedStreamMonitorAlgorithm::m_readoutConfigContainerJSON { this, "InputKeyReadoutConfig", "L1CaloReadoutConfigContainerJSON"}
private

Definition at line 134 of file MistimedStreamMonitorAlgorithm.h.

134{ this, "InputKeyReadoutConfig", "L1CaloReadoutConfigContainerJSON"};

◆ m_runParametersContainer

SG::ReadCondHandleKey<L1CaloRunParametersContainer> MistimedStreamMonitorAlgorithm::m_runParametersContainer { this, "InputKeyRunParameters", "L1CaloRunParametersContainer"}
private

Definition at line 133 of file MistimedStreamMonitorAlgorithm.h.

133{ this, "InputKeyRunParameters", "L1CaloRunParametersContainer"};

◆ m_toolLookupMap

std::unordered_map<std::string, size_t> AthMonitorAlgorithm::m_toolLookupMap
privateinherited

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_tools

ToolHandleArray<GenericMonitoringTool> AthMonitorAlgorithm::m_tools {this,"GMTools",{}}
protectedinherited

Array of Generic Monitoring Tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

341{this,"GMTools",{}};

◆ m_trigDec

PublicToolHandle< Trig::TrigDecisionTool > MistimedStreamMonitorAlgorithm::m_trigDec {this, "TriggerDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", ""}
private

Definition at line 95 of file MistimedStreamMonitorAlgorithm.h.

95{this, "TriggerDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool", ""};

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_triggerChainString

Gaudi::Property<std::string> AthMonitorAlgorithm::m_triggerChainString {this,"TriggerChain",""}
protectedinherited

Trigger chain string pulled from the job option and parsed into a vector.

Definition at line 360 of file AthMonitorAlgorithm.h.

360{this,"TriggerChain",""};

◆ m_trigLiveFractionDataKey

SG::ReadCondHandleKey<TrigLiveFractionCondData> AthMonitorAlgorithm::m_trigLiveFractionDataKey {this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"}
protectedinherited

Definition at line 352 of file AthMonitorAlgorithm.h.

353{this,"TrigLiveFractionCondDataKey","TrigLiveFractionCondData", "SG Key of TrigLiveFractionCondData object"};

◆ m_ttTool

ToolHandle<LVL1::IL1TriggerTowerToolRun3> MistimedStreamMonitorAlgorithm::m_ttTool {this,"L1TriggerTowerToolRun3", "LVL1::L1TriggerTowerToolRun3/L1TriggerTowerToolRun3", "L1TriggerTowerToolRun3"}
private

Definition at line 121 of file MistimedStreamMonitorAlgorithm.h.

121{this,"L1TriggerTowerToolRun3", "LVL1::L1TriggerTowerToolRun3/L1TriggerTowerToolRun3", "L1TriggerTowerToolRun3"};

◆ m_uselegacy

Gaudi::Property<bool> MistimedStreamMonitorAlgorithm::m_uselegacy {this, "UseLegacy", false, "Use legacy system" }
private

Definition at line 125 of file MistimedStreamMonitorAlgorithm.h.

125{this, "UseLegacy", false, "Use legacy system" };

◆ m_useLumi

Gaudi::Property<bool> AthMonitorAlgorithm::m_useLumi {this,"EnableLumi",false}
protectedinherited

Allows use of various luminosity functions.

Definition at line 364 of file AthMonitorAlgorithm.h.

364{this,"EnableLumi",false};

◆ m_usephaseI

Gaudi::Property<bool> MistimedStreamMonitorAlgorithm::m_usephaseI {this, "UsePhase1", false, "Use phaseI system" }
private

Definition at line 126 of file MistimedStreamMonitorAlgorithm.h.

126{this, "UsePhase1", false, "Use phaseI system" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

std::vector<std::string> AthMonitorAlgorithm::m_vTrigChainNames
protectedinherited

Vector of trigger chain names parsed from trigger chain string.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ m_xAODTriggerTowerContainerName

SG::ReadHandleKey<xAOD::TriggerTowerContainer> MistimedStreamMonitorAlgorithm::m_xAODTriggerTowerContainerName {this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"Trigger Tower Container"}
private

container keys including steering parameter and description

Definition at line 100 of file MistimedStreamMonitorAlgorithm.h.

100{this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"Trigger Tower Container"};
static const std::string xAODTriggerTowerLocation

◆ MaxEvents

MistimedStreamMonitorAlgorithm.MaxEvents

Definition at line 175 of file MistimedStreamMonitorAlgorithm.py.

◆ MistimedStreamMonitorCfg

MistimedStreamMonitorAlgorithm.MistimedStreamMonitorCfg = MistimedStreamMonitorConfig(flags, myflags)

Definition at line 192 of file MistimedStreamMonitorAlgorithm.py.

◆ myflags

dict MistimedStreamMonitorAlgorithm.myflags = { "legacy": False, "phaseI": True }

Definition at line 190 of file MistimedStreamMonitorAlgorithm.py.

◆ OutputLevel

MistimedStreamMonitorAlgorithm.OutputLevel

Definition at line 195 of file MistimedStreamMonitorAlgorithm.py.

◆ summariseProps

MistimedStreamMonitorAlgorithm.summariseProps

Definition at line 196 of file MistimedStreamMonitorAlgorithm.py.

◆ withDetails

MistimedStreamMonitorAlgorithm.withDetails

Definition at line 196 of file MistimedStreamMonitorAlgorithm.py.


The documentation for this class was generated from the following files: