ATLAS Offline Software
Classes | Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
MistimedStreamMonitorAlgorithm Class Reference

#include <MistimedStreamMonitorAlgorithm.h>

Inheritance diagram for MistimedStreamMonitorAlgorithm:
Collaboration diagram for MistimedStreamMonitorAlgorithm:

Classes

struct  MonitorCPM
 Struct to contain CPM tower info. More...
 
struct  MonitorJE
 Struct to contain JE info. More...
 
struct  MonitorTT
 Struct to contain PPM trigger tower info. More...
 

Public Types

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

Public Attributes

 flags
 
 MaxEvents
 
 GlobalTag
 
 Files
 
 HISTFileName
 
 acc
 
 MistimedStreamMonitorCfg
 
 Legacy
 
 False
 
 PhaseI
 
 OutputLevel
 
 withDetails
 
 True
 
 summariseProps
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Protected Attributes

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

Private Types

enum  cutFlow {
  All, UnsuitableReadout, HLT_mistimemonj400, L1_Trigger,
  lateTT, 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. More...
 
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> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

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 More...
 
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" }
 
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. More...
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
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 365 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

Enumerator
All 
UnsuitableReadout 
HLT_mistimemonj400 
L1_Trigger 
lateTT 
InTime 
EtaPhiOverlap 

Definition at line 158 of file MistimedStreamMonitorAlgorithm.h.

158  {
159  All,
162  L1_Trigger,
163  lateTT,
164  InTime,
166  };

◆ DataType_t

enum 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 191 of file AthMonitorAlgorithm.h.

191  {
192  userDefined = 0,
193  monteCarlo,
194  collisions,
195  cosmics,
196  heavyIonCollisions,
197  };

◆ Environment_t

enum 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 172 of file AthMonitorAlgorithm.h.

172  {
173  user = 0,
174  online,
175  tier0,
176  tier0Raw,
177  tier0ESD,
178  AOD,
179  altprod,
180  };

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 }

◆ ~MistimedStreamMonitorAlgorithm()

virtual MistimedStreamMonitorAlgorithm::~MistimedStreamMonitorAlgorithm ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality
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.

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 221 of file AthMonitorAlgorithm.h.

221 { return m_dataType; }

◆ 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 140 of file AthMonitorAlgorithm.cxx.

140  {
141  // convert the string to all lowercase
142  std::string lowerCaseStr = str;
143  std::transform(lowerCaseStr.begin(), lowerCaseStr.end(), lowerCaseStr.begin(), ::tolower);
144 
145  // check if it matches one of the enum choices
146  if( lowerCaseStr == "userdefined" ) {
148  } else if( lowerCaseStr == "montecarlo" ) {
149  return DataType_t::monteCarlo;
150  } else if( lowerCaseStr == "collisions" ) {
151  return DataType_t::collisions;
152  } else if( lowerCaseStr == "cosmics" ) {
153  return DataType_t::cosmics;
154  } else if( lowerCaseStr == "heavyioncollisions" ) {
156  } else { // otherwise, warn the user and return "userDefined"
157  ATH_MSG_WARNING("AthMonitorAlgorithm::dataTypeStringToEnum(): Unknown data type "
158  <<str<<", returning userDefined.");
160  }
161 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

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  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

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

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

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  }

◆ 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.

95 { return m_detStore; }

◆ 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 205 of file AthMonitorAlgorithm.h.

205 { return m_environment; }

◆ 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 112 of file AthMonitorAlgorithm.cxx.

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

◆ evtStore() [1/2]

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.

85 { return m_evtStore; }

◆ evtStore() [2/2]

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

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ 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 73 of file AthMonitorAlgorithm.cxx.

73  {
74 
75  // Checks that all of the DQ filters are passed. If any one of the filters
76  // fails, return SUCCESS code and do not fill the histograms with the event.
77  for ( const auto& filterItr : m_DQFilterTools ) {
78  if (!filterItr->accept()) {
79  ATH_MSG_DEBUG("Event rejected due to filter tool.");
80  return StatusCode::SUCCESS;
81  }
82  }
83 
84  // Trigger: If there is a decision tool and the chains fail, skip the event.
86  ATH_MSG_DEBUG("Event rejected due to trigger filter.");
87  return StatusCode::SUCCESS;
88  }
89 
90  ATH_MSG_DEBUG("Event accepted!");
91  return fillHistograms(ctx);
92 }

◆ 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
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  }
96  return BaseAlg::extraOutputDeps();
97 }

◆ 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
62  ATH_CHECK(runParameters.isValid());
63 
64  unsigned int readoutConfigID = runParameters->runParameters(1)->readoutConfigID();
65  ATH_MSG_DEBUG("RunParameters:: readoutConfigID " << readoutConfigID);
66 
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
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
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
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 the L1_J100, L1_jJ160, L1_eEM26M, L1_j5400, L1_gLJ140p0ETA25 or L1_gJ400p0ETA25
166  //Adjustable depending on which trigger we are interested
167  if (m_usephaseI) {
168  if(! ( (m_trigDec->isPassed("L1_eEM26M")) or
169  (m_trigDec->isPassed("L1_gLJ140p0ETA25")) or
170  (m_trigDec->isPassed("L1_gJ400p0ETA25")) or
171  (m_trigDec->isPassed("L1_jJ160")) or
172  (m_trigDec->isPassed("L1_jJ500"))
173  ) ){
174  ATH_MSG_DEBUG("TrigDec doesn't pass");
175  return StatusCode::SUCCESS;
176  }
177  }
178 
179  else if (m_uselegacy) {
180  if(! (m_trigDec->isPassed("L1_J100")) ){
181  ATH_MSG_DEBUG("TrigDec doesn't pass");
182  return StatusCode::SUCCESS;
183  }
184  }
185 
186  else {
187  ATH_MSG_ERROR("No trigger selected...aborting");
188  return StatusCode::FAILURE;
189  }
190 
191  //Define trigger for subsequent cuts
192  bool legacyTrigger= false;
193  bool phase1Trigger= false;
194  std::string trigger = "";
195 
196  if ((m_uselegacy) and (m_trigDec->isPassed("L1_J100")) ) {
197  legacyTrigger= true;
198  }
199  else if (m_usephaseI) {
200  if (m_trigDec->isPassed("L1_eEM26M")) {
201  phase1Trigger= true;
202  trigger = "eFex";
203  }
204  if ((m_trigDec->isPassed("L1_jJ160"))or (m_trigDec->isPassed("L1_jJ500"))) {
205  phase1Trigger= true;
206  trigger = "jFex";
207  }
208  if ( (m_trigDec->isPassed("L1_gJ400p0ETA25")) or (m_trigDec->isPassed("L1_gLJ140p0ETA25")) ) {
209  phase1Trigger= true;
210  trigger = "gFex";
211  }
212  }
213 
214  cutFlowX=L1_Trigger;
215  fill(m_packageName,cutFlowX);
216 
217 
218  // now classify the tower signals by looking at their FADC counts, if it exceeds 70
219  int good3Counter = 0; // category 5 good peak 3
220  int good2Counter = 0; // category 5 good peak 2
221  int eFexintimeCounter = 0; // in-time TOBs
222  int eFexoutoftimeCounter = 0; // out-of-time TOBs
223  int jFexCounter = 0; // in-time TOBs
224  int gFexCounter = 0; // in-time TOBs
225 
226  double dEta = 0., dPhi = 0., dPhi1 = 0., dR = 0.;
227  double etaIn = 0., phiIn = 0., etIn = 0.;
228  double etaOut = 0., phiOut = 0., etOut = 0.;
229  bool overlap = false;
230 
232  if(!jFexSRJetContainer.isValid()) {
233  ATH_MSG_WARNING("No jFex SR Jet container found in storegate "<< m_jFexSRJetContainerKey<<". Will be skipped!");
234  }
235 
236  // =====================================================================
237  // ================= Container: TriggerTower ===========================
238  // =====================================================================
239 
240  // Creating a new container for saving pulseClassification
241  std::unique_ptr<xAOD::TriggerTowerContainer> ttContainer = std::make_unique<xAOD::TriggerTowerContainer>();
242  std::unique_ptr<xAOD::TriggerTowerAuxContainer> ttContainerAux = std::make_unique<xAOD::TriggerTowerAuxContainer>();
243  ttContainer->setStore(ttContainerAux.get());
244 
245  static const SG::Accessor<float> pulseClassificationAcc("pulseClassification");
246 
247  // Creating a new container for TT with pulseClassification
248  for (const xAOD::TriggerTower* tt : *triggerTowerTES) {
249 
250  float ttPulseCategory = 0;
251  const std::vector<uint16_t>& ttADC = (tt)->adc();
252  std::vector<uint16_t> readoutCorrectedADC; //this is the standard readout ADC vector: 5 40MHz samples with l1A in the middle
253  if(!readout80ModePpm){//40 MHz
254  //just acess the acd vector, as the sanity checks where done above
255  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-2));
256  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-1));
257  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice));
258  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+1));
259  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+2));
260  }
261  else{//80 MHz
262  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-4));
263  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice-2));
264  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice));
265  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+2));
266  readoutCorrectedADC.push_back(ttADC.at(l1aFadcSlice+4));
267  }
268 
269  // retrieve max ADC value and position, this seems to be buggy in the DAOD
270  auto maxValIterator = std::max_element(readoutCorrectedADC.begin(), readoutCorrectedADC.end());
271  int maxADCval = *maxValIterator;
272  int adcPeakPositon = std::distance(std::begin(readoutCorrectedADC), maxValIterator);
273 
274  if(maxADCval < 70){
275  ttPulseCategory = 0.1;
276  }
277  else if(maxADCval == 1023) {
278  ttPulseCategory = 1;
279  }
280  else{
281  bool goodQual = pulseQuality(readoutCorrectedADC, adcPeakPositon);
282  //look at any of the five FADC values
283  if(adcPeakPositon == 2){ // can be class 3 or 4 now
284  if(goodQual){
285  //nicely peaking TT in BCID0
286  good2Counter++;
287  ttPulseCategory = 3;
288  }
289  else{
290  //badly peaking TT in BCID0
291  ttPulseCategory = 4;
292  }
293  }
294  else if(adcPeakPositon == 3){ // can be class 5 or 6 now
295  if(goodQual){
296  //nicely peaking TT in BCID+1
297  good3Counter++;
298  ttPulseCategory = 5;
299  }
300  else{
301  //badly peaking TT in BCID+1
302  ttPulseCategory = 6;
303  }
304  }
305  else{
306  //TT peaking in BCID-1,-2 or +2
307  ttPulseCategory = 2;
308  }
309 
310  if (trigger == "jFex") {
312  CHECK( evtStore()->retrieve( jFexSRJetRoI, "L1_jFexSRJetRoI" ) );
313  for(auto tob : *jFexSRJetRoI) {
314  etaIn = tob->eta();
315  phiIn = tob->phi();
316  etIn = tob->tobEt()/5;
317 
318  if( (adcPeakPositon == 3) and (goodQual) ) {
319  etaOut = tt->eta();
320  phiOut = tt->phi()-M_PI;
321  dEta = std::abs(etaIn-etaOut);
322  dPhi = std::abs(phiIn-phiOut);
323  if ((phiIn < 0) and (phiOut > 0)){
324  dPhi1 = std::abs((phiIn+2*M_PI)-phiOut);
325  if (dPhi1 < dPhi) {
326  dPhi = dPhi1;
327  }
328  }
329  else if ((phiIn > 0) and (phiOut < 0)){
330  dPhi1 = std::abs(phiIn-(phiOut+2*M_PI));
331  if (dPhi1 < dPhi) {
332  dPhi = dPhi1;
333  }
334  }
335  dR = TMath::Sqrt(dEta*dEta+dPhi*dPhi);
336  if ((dR < .2) and (etIn > 160.)) {
337  overlap = true;
338  }
339  } // if statement - good tt
340  } // for loop - jFex TOBs
341  } // if statement - jFex
342 
343  if (trigger == "gFex") {
344 
345  for (const auto& key : m_gFexJetTobKeyList){
347  // Check that this container is present
348  if ( !jetContainer.isValid() ) {
349  ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
350  }
351  else {
353  CHECK( evtStore()->retrieve( gFexJetRoI, key.key() ) );
354  for(auto tob : *gFexJetRoI) {
355  etaIn = tob->eta();
356  phiIn = tob->phi();
357  etIn = tob->gFexTobEt()/10;
358 
359  if( (adcPeakPositon == 3) and (goodQual) ) {
360  etaOut = tt->eta();
361  phiOut = tt->phi()-M_PI;
362  dEta = std::abs(etaIn-etaOut);
363  dPhi = std::abs(phiIn-phiOut);
364  if ((phiIn < 0) and (phiOut > 0)){
365  dPhi1 = std::abs((phiIn+2*M_PI)-phiOut);
366  if (dPhi1 < dPhi) {
367  dPhi = dPhi1;
368  }
369  }
370  else if ((phiIn > 0) and (phiOut < 0)){
371  dPhi1 = std::abs(phiIn-(phiOut+2*M_PI));
372  if (dPhi1 < dPhi) {
373  dPhi = dPhi1;
374  }
375  }
376  dR = TMath::Sqrt(dEta*dEta+dPhi*dPhi);
377  if ((dR < .2) and (etIn > 100.)) {
378  overlap = true;
379  }
380  } // if statement - good tt
381  } // for loop - gFex TOBs
382  } // else stamement - valid container
383  } // for loop - gFex container
384  } // if statement - gFex
385 
386  }
387 
388  // decorate the TT in order to have to recompute the pulse categorisation
389  xAOD::TriggerTower* newTT = new xAOD::TriggerTower; //create a new TT object
390  ttContainer->push_back(newTT); // add the newTT to new output TT container (at the end of it)
391  *newTT = *(tt);// copy over all information from TT to newTT
392  pulseClassificationAcc(*newTT) = ttPulseCategory; //decorate
393  }
394 
395  // count all eFex in-time and out-of-time TOBs with at least 5GeV
396  for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
397 
398  const xAOD::eFexEMRoIContainer* emTobs;
399  CHECK( evtStore()->retrieve( emTobs, key ) );
400 
401  for(auto tob : *emTobs) {
402  if (tob->et() > 5000) { //eFex TOB energy in MeV
403  if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
404  eFexintimeCounter++;
405  }
406  else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
407  eFexoutoftimeCounter++;
408  }
409  }
410  }
411 
412  }
413 
414  // count all gFex in-time TOBs with at least 5GeV
415  const xAOD::gFexJetRoIContainer* gFexLRJetRoI;
416  CHECK( evtStore()->retrieve( gFexLRJetRoI, "L1_gFexLRJetRoI" ) );
417  for(auto tob : *gFexLRJetRoI) {
418  if (tob->et() > 50) { //gFex TOB energy in 0.1GeV
419  gFexCounter++;
420  }
421  }
422 
423  // count all jFex in-time TOBs with at least 5GeV
424  const xAOD::jFexSRJetRoIContainer* jFexJetRoI;
425  CHECK( evtStore()->retrieve( jFexJetRoI, "L1_jFexSRJetRoI" ) );
426  for(auto tob : *jFexJetRoI) {
427  if (tob->et() > 25) { //jFex TOB energy in 0.2GeV
428  jFexCounter++;
429  }
430  }
431 
432  if( (good3Counter < 2) or ((trigger == "eFex") and (eFexoutoftimeCounter < 2)) ){
433  //reject events with less than 2 pulses nicely peaking in slice 3
434  return StatusCode::SUCCESS;
435  }
436  cutFlowX=lateTT;
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){
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 
499  // scope for mutable error event per lumi block tt counter
500  // it allows only one event per lumiblock
501  std::lock_guard<std::mutex> lock(m_mutex);
502  m_event_counter[lumiNo]+=1;
503  const int eventCounter = m_eventCounter++;
504 
505  if( (m_event_counter[lumiNo] <m_maxEvents) && (eventCounter < m_maxEvents) ){
506  ATH_MSG_DEBUG( "EventID :: " << m_event_counter[lumiNo]);
507 
508  // Saving the lumiblock and event number of the events with mistimed
509  auto eventMonitor_legacy= Monitored::Scalar<std::string>("eventMonitor_legacy", "Event"+std::to_string(eventCounter)+"="+std::to_string(currentEventNo));
510  auto eventMonitor_phaseI= Monitored::Scalar<std::string>("eventMonitor_phaseI", "Event"+std::to_string(eventCounter)+"_"+trigger+"="+std::to_string(currentEventNo));
511  auto lbMonitor= Monitored::Scalar<std::string>("lbMonitor", std::to_string(lumiNo));
512  std::string groupName = "Event_";
513  if (legacyTrigger) {
514  fill(groupName, eventMonitor_legacy, lbMonitor );
515  }
516  if (phase1Trigger) {
517  fill(groupName, eventMonitor_phaseI, lbMonitor );
518  }
519 
520  // Create a vector of trigger towers with quantities to be monitored
521  std::vector<MonitorTT> vecMonTTDecor; // All towers
522 
523  // Loop over trigger tower container
524  //Create the trigger tower objects and calculate scaled phi
525  for (const xAOD::TriggerTower* tt : *ttContainer) {
526  ATH_CHECK( makeTowerPPM(tt, vecMonTTDecor) );
527  ATH_MSG_DEBUG( "tt->pulseClassification :: " << pulseClassificationAcc(*tt));
528  }
529 
530  groupName = "EventofInterest_" + std::to_string(eventCounter) + "_";
531  auto bcidWord = Monitored::Scalar<uint8_t>("bcidWord", 0);
532  auto pulseCat = Monitored::Scalar<float>("pulseCat", 0);
533 
534  for (auto& myTower : vecMonTTDecor) {
535  ATH_MSG_DEBUG(" looping over TTs");
536  const int layer = (myTower.tower)->layer();
537  pulseCat = pulseClassificationAcc(*myTower.tower);
538  bcidWord = (myTower.tower)->bcidVec()[0]; // look at the status bit in the central time slice
539  ATH_MSG_DEBUG("groupName :: " << groupName);
540 
541  // Check if TT is in EM or HAD layer:
542  if (layer == 0) { //========== ELECTROMAGNETIC LAYER =========================
543  ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_EM", "pulseCat", pulseCat) );
544  if(pulseCat > 0.5 && bcidWord > 0) {
545  ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_EM", "bcidWord", bcidWord) );
546  }
547  }
548  else if(layer == 1 ) { //========== HADRONIC LAYER ===============================
549  ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_HAD", "pulseCat", pulseCat) );
550  if(pulseCat > 0.5 && bcidWord > 0 ) ATH_CHECK( fillPPMEtaPhi(myTower, groupName+"TT_HAD", "bcidWord", bcidWord) );
551  }
552  }
553 
554  //Loop over CPM tower container
555  //Create the CPM objects and calculate scaled phi
556  std::vector<MonitorCPM> vecMonCPM; // All towers
557  for (const xAOD::CPMTower* cpm : *cpmTowerTES) {
558  ATH_CHECK( makeTowerCPM(cpm, vecMonCPM) );
559  }
560 
561  // Coordinates for CPM tower and JetElement containers
562  auto etalut = Monitored::Scalar<double>("etalut", 0);
563  auto philut = Monitored::Scalar<double>("philut", 0);
564 
565  // lut variables
566  auto emLUT0 = Monitored::Scalar<int>("emLUT0", 0);
567  auto emLUT1 = Monitored::Scalar<int>("emLUT1", 0);
568  auto emLUT2 = Monitored::Scalar<int>("emLUT2", 0);
569  auto hadLUT0 = Monitored::Scalar<int>("hadLUT0", 0);
570  auto hadLUT1 = Monitored::Scalar<int>("hadLUT1", 0);
571  auto hadLUT2 = Monitored::Scalar<int>("hadLUT2", 0);
572 
573  //loop over the cpm tower container to fill the lut histos
574  for (auto& myTower : vecMonCPM) {
575 
576  std::vector<uint8_t> cpmEMenergy = (myTower.tower)->emEnergyVec();
577  std::vector<uint8_t> cpmHADenergy = (myTower.tower)->hadEnergyVec();
578  // eta scaled
579  etalut = myTower.etaScaled;
580 
581  for (auto phi: myTower.phiScaled) {
582  // phi scaled
583  philut = phi;
584 
585  if(cpmEMenergy.size() > 2){ // expect 3 slices to be read out
586  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)));
587 
588  emLUT0 = static_cast<int>(cpmEMenergy.at(0));
589  if(cpmEMenergy.at(0) > 0) fill(groupName+"lut_EM0",etalut,philut, emLUT0);
590 
591  emLUT1 = static_cast<int>(cpmEMenergy.at(1));
592  if(cpmEMenergy.at(1) > 0) fill(groupName+"lut_EM1",etalut,philut, emLUT1);
593 
594  emLUT2 = static_cast<int>(cpmEMenergy.at(2));
595  if(cpmEMenergy.at(2) > 0) fill(groupName+"lut_EM2",etalut,philut, emLUT2);
596  }
597  if(cpmHADenergy.size() > 2){
598  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)));
599 
600  hadLUT0 = static_cast<int>(cpmHADenergy.at(0));
601  if(cpmHADenergy.at(0) > 0) fill(groupName+"lut_HAD0",etalut,philut, hadLUT0);
602  hadLUT1 = static_cast<int>(cpmHADenergy.at(1));
603  if(cpmHADenergy.at(1) > 0) fill(groupName+"lut_HAD1",etalut,philut, hadLUT1);
604  hadLUT2 = static_cast<int>(cpmHADenergy.at(2));
605  if(cpmHADenergy.at(2) > 0)fill(groupName+"lut_HAD2",etalut,philut, hadLUT2);
606  }
607  }
608  }
609 
610  std::vector<MonitorJE> vecMonJE; // All elements
611 
612  //Create the JetElement objects and calculate scaled phi
613  for (const xAOD::JetElement* je : *jetElementTES) {
614  ATH_CHECK( makeTowerJE(je, vecMonJE) );
615  }
616 
617  //loop over the jet element container to fill the lut histos
618  for (auto& jet : vecMonJE) {
619 
620  std::vector<uint16_t> jepEMenergy = (jet.element)->emJetElementETVec();
621  std::vector<uint16_t> jepHADenergy = (jet.element)->hadJetElementETVec();
622 
623  for (auto eta: jet.etaScaled) {
624  etalut = eta;
625  if ( std::abs(eta) > 2.5){
626  for (auto phi: jet.phiScaled) {
627  philut = phi;
628  if(jepEMenergy.size() > 2){
629  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)));
630 
631  emLUT0 = static_cast<int>(jepEMenergy.at(0));
632  if(jepEMenergy.at(0) > 0) fill(groupName+"lut_EM0",etalut,philut, emLUT0);
633 
634  emLUT1 = static_cast<int>(jepEMenergy.at(1));
635  if(jepEMenergy.at(1) > 0) fill(groupName+"lut_EM1",etalut,philut, emLUT1);
636 
637  emLUT2 = static_cast<int>(jepEMenergy.at(2));
638  if(jepEMenergy.at(2) > 0) fill(groupName+"lut_EM2",etalut,philut, emLUT2);
639  }
640  if(jepHADenergy.size()> 2){
641  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)));
642 
643  hadLUT0 = static_cast<int>(jepHADenergy.at(0));
644  if(jepHADenergy.at(0) > 0) fill(groupName+"lut_HAD0",etalut,philut, hadLUT0);
645 
646  hadLUT1 = static_cast<int>(jepHADenergy.at(1));
647  if(jepHADenergy.at(1) > 0) fill(groupName+"lut_HAD1",etalut,philut, hadLUT1);
648 
649  hadLUT2 = static_cast<int>(jepHADenergy.at(2));
650  if(jepHADenergy.at(2) > 0) fill(groupName+"lut_HAD2",etalut,philut, hadLUT2);
651  }
652  }
653  }
654  }
655  }
656 
658  if ( !eFexContainer.isValid() ) {
659  ATH_MSG_WARNING("No eFex EM container found in storegate "<< eFexContainer.key());
660  }
661 
662  // monitored variables for histograms
663  auto TOBeT = Monitored::Scalar<float>("TOBTransverseEnergy",0.0);
664  auto TOBeta = Monitored::Scalar<float>("TOBEta",0.0);
665  auto TOBphi = Monitored::Scalar<float>("TOBPhi",0.0);
666  auto TOBeT_max = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
667  auto TOBeta_max = Monitored::Scalar<float>("TOBEta_max",0.0);
668  auto TOBphi_max = Monitored::Scalar<float>("TOBPhi_max",0.0);
669  auto TOBeT_max_in = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
670  auto TOBeta_max_in = Monitored::Scalar<float>("TOBEta_max",0.0);
671  auto TOBphi_max_in = Monitored::Scalar<float>("TOBPhi_max",0.0);
672 
673  TOBeT_max = 0;
674  TOBeT_max_in = 0;
675 
676  for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
677 
678  const xAOD::eFexEMRoIContainer* emTobs;
679  CHECK( evtStore()->retrieve( emTobs, key ) );
680 
681  for(auto tob : *emTobs) {
682  TOBeT = tob->et()/1000; //eT in GeV
683  TOBeta = tob->eta();
684 
685  // adjust the phi to 0 to 2 pi
686  if (tob->phi() < 0) {
687  TOBphi = tob->phi()+2*M_PI;
688  }
689  else {
690  TOBphi = tob->phi();
691  }
692 
693  // fill the eFex histograms in the right time slice
694  if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())-1) & 0xf )) {
695  if (TOBeT > 0.0){
696  fill(groupName+"Efex0", TOBeta, TOBphi, TOBeT);
697  }
698  }
699  else if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
700  if (TOBeT > 0.0){
701  if (TOBeT_max_in < TOBeT) {
702  TOBeT_max_in = tob->et()/1000;
703  TOBeta_max_in = tob->eta();
704  if (tob->phi() < 0) {
705  TOBphi_max_in = tob->phi()+2*M_PI;
706  }
707  else {
708  TOBphi_max_in = tob->phi();
709  }
710  }
711  fill(groupName+"Efex1", TOBeta, TOBphi, TOBeT);
712  }
713  }
714  else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
715  if (TOBeT > 0.0){
716  if (TOBeT_max < TOBeT) {
717  TOBeT_max = tob->et()/1000;
718  TOBeta_max = tob->eta();
719  if (tob->phi() < 0) {
720  TOBphi_max = tob->phi()+2*M_PI;
721  }
722  else {
723  TOBphi_max = tob->phi();
724  }
725  }
726  fill(groupName+"Efex2", TOBeta, TOBphi, TOBeT);
727  }
728  }
729  }
730  }
731  if (trigger == "eFex") {
732  fill("Efex_maxTOB_in", TOBeT_max_in);
733  fill("Efex_maxTOB_out", TOBeT_max);
734  fill("Efex_maxTOB_out", TOBeta_max, TOBphi_max);
735  fill("Efex_maxTOB_in", TOBeta_max_in, TOBphi_max_in);
736  }
737 
738  // variables for histograms
739  auto jFexEt = Monitored::Scalar<int> ("jFexEt",0);
740  auto jFexeta = Monitored::Scalar<float>("jFexEta",0.0);
741  auto jFexphi = Monitored::Scalar<float>("jFexPhi",0.0);
742 
743  // Access jFex tower container
745  if(!jFexTowerContainer.isValid()) {
746  ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< m_jFexDataTowerKey<<". Will be skipped!");
747  }
748 
749  //SG::ReadHandle<xAOD::jFexTowerContainer> jFexEmulatedTowerContainer{m_jFexEmulatedTowerKey, ctx};
750  SG::ReadHandle<xAOD::jFexTowerContainer> jEmulatedTowerContainer;
751  jEmulatedTowerContainer = SG::ReadHandle<xAOD::jFexTowerContainer>(m_EmulTowerKey,ctx);
752  if(!jEmulatedTowerContainer.isValid()) {
753  ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< jEmulatedTowerContainer.key()<<". Will be skipped!");
754  }
755  else {
756  for(const xAOD::jFexTower* emulTower : *jEmulatedTowerContainer) {
757  jFexEt=emulTower->et_count().at(0);
758  //Adding 1e-5 for plotting style
759  jFexeta=emulTower->eta()+1e-5;
760  if (emulTower->phi() < 0) {
761  jFexphi=emulTower->phi()+2*M_PI;
762  }
763  else {
764  jFexphi=emulTower->phi();
765  }
766  if (jFexEt > 175) {
767  fill(groupName+"JfexEmulated",jFexeta,jFexphi, jFexEt);
768  }
769  }
770  }
771 
772  TOBeT_max = 0;
773  for(const xAOD::jFexSRJetRoI* jFexSRJetRoI : *jFexSRJetContainer) {
774  if(jFexSRJetRoI->tobWord()==0) continue; //remove empty TOBs
775  jFexEt=jFexSRJetRoI->tobEt()/5;
776  jFexeta=jFexSRJetRoI->eta();
777  if (jFexSRJetRoI->phi() < 0) {
778  jFexphi=jFexSRJetRoI->phi()+2*M_PI;
779  }
780  else {
781  jFexphi=jFexSRJetRoI->phi();
782  }
783  if (TOBeT_max < jFexEt) {
784  TOBeT_max = jFexSRJetRoI->tobEt()/5;
785  TOBeta_max = jFexSRJetRoI->eta();
786  if (jFexSRJetRoI->phi() < 0) {
787  TOBphi_max =jFexSRJetRoI->phi()+2*M_PI;
788  }
789  else {
790  TOBphi_max =jFexSRJetRoI->phi();
791  }
792  }
793  fill(groupName+"JfexSRJet", jFexeta, jFexphi, jFexEt);
794  }
795  if (trigger == "jFex") {
796  fill("Jfex_maxTOB", TOBeT_max);
797  fill("Jfex_maxTOB", TOBeta_max, TOBphi_max);
798  }
799 
801  if(!jFexTauContainer.isValid()) {
802  ATH_MSG_WARNING("No jFex Tau container found in storegate "<< m_jFexTauContainerKey<<". Will be skipped!");
803  }
804  else {
805  for(const xAOD::jFexTauRoI* jFexTauRoI : *jFexTauContainer) {
806  if(jFexTauRoI->tobWord()==0) continue; //remove empty TOBs
807  jFexEt =jFexTauRoI->tobEt()/5;
808  jFexeta=jFexTauRoI->eta();
809  if (jFexTauRoI->phi() < 0) {
810  jFexphi=jFexTauRoI->phi()+2*M_PI;
811  }
812  else {
813  jFexphi=jFexTauRoI->phi();
814  }
815  fill(groupName+"JfexTau", jFexeta, jFexphi, jFexEt);
816  }
817  }
818 
819  auto gFexEt = Monitored::Scalar<int> ("gFexEt",0);
820  auto gFexEta = Monitored::Scalar<float>("gFexEta",0.0);
821  auto gFexPhi = Monitored::Scalar<float>("gFexPhi",0.0);
822  int key_index = 0;
823 
824  TOBeT_max = 0;
825  // Small-R and large-R jets container loop
826  for (const auto& key : m_gFexJetTobKeyList){
828  // Check that this container is present
829  if ( !jetContainer.isValid() ) {
830  ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
831  }
832  else {
833  for(const xAOD::gFexJetRoI* gFexJetRoIContainer : *jetContainer) {
834  gFexEt =gFexJetRoIContainer->gFexTobEt()/10;
835  gFexEta=gFexJetRoIContainer->eta();
836  if (gFexJetRoIContainer->phi() < 0) {
837  gFexPhi=gFexJetRoIContainer->phi()+2*M_PI;
838  }
839  else {
840  gFexPhi=gFexJetRoIContainer->phi();
841  }
842  if (TOBeT_max < gFexEt) {
843  TOBeT_max = gFexJetRoIContainer->gFexTobEt()/10;
844  TOBeta_max = gFexJetRoIContainer->eta();
845  if (gFexJetRoIContainer->phi() < 0) {
846  TOBphi_max=gFexJetRoIContainer->phi()+2*M_PI;
847  }
848  else {
849  TOBphi_max=gFexJetRoIContainer->phi();
850  }
851  }
852  if (key_index == 0) {
853  fill(groupName+"GfexSRJet",gFexEta, gFexPhi, gFexEt);
854  }
855  else if (key_index == 1) {
856  fill(groupName+"GfexLRJet",gFexEta, gFexPhi, gFexEt);
857  }
858  }
859  }
860  key_index++;
861  }
862  if (trigger == "gFex") {
863  fill("Gfex_maxTOB", TOBeT_max);
864  fill("Gfex_maxTOB", TOBeta_max, TOBphi_max);
865  }
866 
867  }
868  else {
869  auto eventMonitor_all_legacy= Monitored::Scalar<std::string>("eventMonitor_all_legacy", std::to_string(currentEventNo));
870  auto eventMonitor_all_phaseI= Monitored::Scalar<std::string>("eventMonitor_all_phaseI", trigger+"="+std::to_string(currentEventNo));
871  auto lbMonitor_all= Monitored::Scalar<std::string>("lbMonitor_all", std::to_string(lumiNo));
872  if (legacyTrigger) {
873  fill("Event_all_", eventMonitor_all_legacy, lbMonitor_all );
874  }
875  if (phase1Trigger) {
876  fill("Event_all_", eventMonitor_all_phaseI, lbMonitor_all );
877  }
878 
880  if ( !eFexContainer.isValid() ) {
881  ATH_MSG_WARNING("No eFex EM container found in storegate "<< eFexContainer.key());
882  }
883 
884  // monitored variables for histograms
885  auto TOBeT = Monitored::Scalar<float>("TOBTransverseEnergy",0.0);
886  auto TOBeta = Monitored::Scalar<float>("TOBEta",0.0);
887  auto TOBphi = Monitored::Scalar<float>("TOBPhi",0.0);
888  auto TOBeT_max = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
889  auto TOBeta_max = Monitored::Scalar<float>("TOBEta_max",0.0);
890  auto TOBphi_max = Monitored::Scalar<float>("TOBPhi_max",0.0);
891  auto TOBeT_max_in = Monitored::Scalar<float>("TOBTransverseEnergy_max",0.0);
892  auto TOBeta_max_in = Monitored::Scalar<float>("TOBEta_max",0.0);
893  auto TOBphi_max_in = Monitored::Scalar<float>("TOBPhi_max",0.0);
894 
895  TOBeT_max = 0;
896  TOBeT_max_in = 0;
897 
898  for(auto key : {"L1_eEMxRoI","L1_eEMxRoIOutOfTime"}) {
899 
900  const xAOD::eFexEMRoIContainer* emTobs;
901  CHECK( evtStore()->retrieve( emTobs, key ) );
902 
903  for(auto tob : *emTobs) {
904  TOBeT = tob->et()/1000; //eT in GeV
905  TOBeta = tob->eta();
906 
907  // adjust the phi to 0 to 2 pi
908  if (tob->phi() < 0) {
909  TOBphi = tob->phi()+2*M_PI;
910  }
911  else {
912  TOBphi = tob->phi();
913  }
914 
915  if (tob->bcn4() == ((ctx.eventID().bunch_crossing_id()) & 0xf )) {
916  if (TOBeT > 0.0){
917  if (TOBeT_max_in < TOBeT) {
918  TOBeT_max_in = tob->et()/1000;
919  TOBeta_max_in = tob->eta();
920  if (tob->phi() < 0) {
921  TOBphi_max_in = tob->phi()+2*M_PI;
922  }
923  else {
924  TOBphi_max_in = tob->phi();
925  }
926  }
927  }
928  }
929  else if (tob->bcn4() == (((ctx.eventID().bunch_crossing_id())+1) & 0xf )) {
930  if (TOBeT > 0.0){
931  if (TOBeT_max < TOBeT) {
932  TOBeT_max = tob->et()/1000;
933  TOBeta_max = tob->eta();
934  if (tob->phi() < 0) {
935  TOBphi_max = tob->phi()+2*M_PI;
936  }
937  else {
938  TOBphi_max = tob->phi();
939  }
940  }
941  }
942  }
943  }
944  }
945  if (trigger == "eFex") {
946  fill("Efex_maxTOB_in", TOBeT_max_in);
947  fill("Efex_maxTOB_out", TOBeT_max);
948  fill("Efex_maxTOB_out", TOBeta_max, TOBphi_max);
949  fill("Efex_maxTOB_in", TOBeta_max_in, TOBphi_max_in);
950  }
951 
952  // variables for histograms
953  auto jFexEt = Monitored::Scalar<int> ("jFexEt",0);
954  auto jFexeta = Monitored::Scalar<float>("jFexEta",0.0);
955  auto jFexphi = Monitored::Scalar<float>("jFexPhi",0.0);
956 
957  // Access jFex tower container
959  if(!jFexTowerContainer.isValid()) {
960  ATH_MSG_WARNING("No jFex Tower container valid in storegate with key: "<< m_jFexDataTowerKey<<". Will be skipped!");
961  }
962 
963  TOBeT_max = 0;
964  for(const xAOD::jFexSRJetRoI* jFexSRJetRoI : *jFexSRJetContainer) {
965  if(jFexSRJetRoI->tobWord()==0) continue; //remove empty TOBs
966  jFexEt=jFexSRJetRoI->tobEt()/5;
967  jFexeta=jFexSRJetRoI->eta();
968  if (jFexSRJetRoI->phi() < 0) {
969  jFexphi=jFexSRJetRoI->phi()+2*M_PI;
970  }
971  else {
972  jFexphi=jFexSRJetRoI->phi();
973  }
974  if (TOBeT_max < jFexEt) {
975  TOBeT_max = jFexSRJetRoI->tobEt()/5;
976  TOBeta_max = jFexSRJetRoI->eta();
977  if (jFexSRJetRoI->phi() < 0) {
978  TOBphi_max =jFexSRJetRoI->phi()+2*M_PI;
979  }
980  else {
981  TOBphi_max =jFexSRJetRoI->phi();
982  }
983  }
984  }
985  if (trigger == "jFex") {
986  fill("Jfex_maxTOB", TOBeT_max);
987  fill("Jfex_maxTOB", TOBeta_max, TOBphi_max);
988  }
989 
990  auto gFexEt = Monitored::Scalar<int> ("gFexEt",0);
991  auto gFexEta = Monitored::Scalar<float>("gFexEta",0.0);
992  auto gFexPhi = Monitored::Scalar<float>("gFexPhi",0.0);
993 
994  TOBeT_max = 0;
995  // Small-R and large-R jets container loop
996  for (const auto& key : m_gFexJetTobKeyList){
998  // Check that this container is present
999  if ( !jetContainer.isValid() ) {
1000  ATH_MSG_WARNING("No gFex jet container found in storegate: "<< key.key());
1001  }
1002  else {
1003  for(const xAOD::gFexJetRoI* gFexJetRoIContainer : *jetContainer) {
1004  gFexEt =gFexJetRoIContainer->gFexTobEt()/10;
1005  gFexEta=gFexJetRoIContainer->eta();
1006  if (gFexJetRoIContainer->phi() < 0) {
1007  gFexPhi=gFexJetRoIContainer->phi()+2*M_PI;
1008  }
1009  else {
1010  gFexPhi=gFexJetRoIContainer->phi();
1011  }
1012  if (TOBeT_max < gFexEt) {
1013  TOBeT_max = gFexJetRoIContainer->gFexTobEt()/10;
1014  TOBeta_max = gFexJetRoIContainer->eta();
1015  if (gFexJetRoIContainer->phi() < 0) {
1016  TOBphi_max=gFexJetRoIContainer->phi()+2*M_PI;
1017  }
1018  else {
1019  TOBphi_max=gFexJetRoIContainer->phi();
1020  }
1021  }
1022  }
1023  }
1024  }
1025  if (trigger == "gFex") {
1026  fill("Gfex_maxTOB", TOBeT_max);
1027  fill("Gfex_maxTOB", TOBeta_max, TOBphi_max);
1028  }
1029 
1030  }
1031 
1032  return StatusCode::SUCCESS;
1033 }

◆ fillPPMEtaPhi()

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

Definition at line 1167 of file MistimedStreamMonitorAlgorithm.cxx.

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

◆ 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  }

◆ 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 107 of file AthMonitorAlgorithm.cxx.

107  {
109 }

◆ 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 164 of file AthMonitorAlgorithm.cxx.

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

◆ 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 194 of file AthMonitorAlgorithm.cxx.

194  {
195  return m_trigDecTool;
196 }

◆ 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
30  ATH_CHECK( m_cpmTowerLocation.initialize());
31  ATH_CHECK( m_jetElementLocation.initialize());
32  ATH_CHECK( m_trigDec.retrieve() );
33  ATH_CHECK( m_ttTool.retrieve());
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 }

◆ 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()

bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::isClonable
overridevirtualinherited

Specify if the algorithm is clonable.

Reentrant algorithms are clonable.

Definition at line 68 of file AthCommonReentrantAlgorithm.cxx.

52 {
53  // Reentrant algorithms are clonable.
54  return true;
55 }

◆ makeTowerCPM()

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

Definition at line 1056 of file MistimedStreamMonitorAlgorithm.cxx.

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

◆ makeTowerJE()

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

Definition at line 1104 of file MistimedStreamMonitorAlgorithm.cxx.

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

◆ makeTowerPPM()

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

Helper functions.

Definition at line 1036 of file MistimedStreamMonitorAlgorithm.cxx.

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

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

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

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ 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 341 of file AthMonitorAlgorithm.cxx.

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

◆ pulseQuality()

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

Definition at line 1214 of file MistimedStreamMonitorAlgorithm.cxx.

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

◆ 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();
383  PBASE::renounce (h);
384  }

◆ 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  {
365  handlesArray.renounce();
366  }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100  {
101  execState( ctx ).setFilterPassed( state );
102  }

◆ 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 InputMakerBase, and HypoBase.

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()) {
123  sc = StatusCode::FAILURE;
124  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125  << " with CondSvc");
126  }
127  }
128  }
129  return sc;
130 }

◆ 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 199 of file AthMonitorAlgorithm.cxx.

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

◆ 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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ acc

MistimedStreamMonitorAlgorithm.acc

Definition at line 180 of file MistimedStreamMonitorAlgorithm.py.

◆ ATLAS_THREAD_SAFE

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

Definition at line 155 of file MistimedStreamMonitorAlgorithm.h.

◆ False

MistimedStreamMonitorAlgorithm.False

Definition at line 183 of file MistimedStreamMonitorAlgorithm.py.

◆ Files

MistimedStreamMonitorAlgorithm.Files

Definition at line 171 of file MistimedStreamMonitorAlgorithm.py.

◆ flags

MistimedStreamMonitorAlgorithm.flags

Definition at line 168 of file MistimedStreamMonitorAlgorithm.py.

◆ GlobalTag

MistimedStreamMonitorAlgorithm.GlobalTag

Definition at line 170 of file MistimedStreamMonitorAlgorithm.py.

◆ HISTFileName

MistimedStreamMonitorAlgorithm.HISTFileName

Definition at line 174 of file MistimedStreamMonitorAlgorithm.py.

◆ Legacy

MistimedStreamMonitorAlgorithm.Legacy

Definition at line 183 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.

◆ 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.

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 351 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 353 of file AthMonitorAlgorithm.h.

◆ m_defaultLBDuration

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

Default duration of one lumi block.

Definition at line 360 of file AthMonitorAlgorithm.h.

◆ m_detailLevel

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

Sets the level of detail used in the monitoring.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ 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 341 of file AthMonitorAlgorithm.h.

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 369 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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 372 of file AthMonitorAlgorithm.h.

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 350 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 352 of file AthMonitorAlgorithm.h.

◆ m_eventCounter

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

Definition at line 152 of file MistimedStreamMonitorAlgorithm.h.

◆ m_EventInfoKey

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

Key for retrieving EventInfo from StoreGate.

Definition at line 362 of file AthMonitorAlgorithm.h.

◆ 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 358 of file AthMonitorAlgorithm.h.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ 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.

◆ m_lbDurationDataKey

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

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_lumiDataKey

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

Definition at line 343 of file AthMonitorAlgorithm.h.

◆ m_maxEvents

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

Definition at line 149 of file MistimedStreamMonitorAlgorithm.h.

◆ m_mutex

std::mutex MistimedStreamMonitorAlgorithm::m_mutex {}
mutableprivate

Definition at line 154 of file MistimedStreamMonitorAlgorithm.h.

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 366 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.

◆ 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.

◆ m_readoutConfigContainerJSON

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

Definition at line 130 of file MistimedStreamMonitorAlgorithm.h.

◆ m_runParametersContainer

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

Definition at line 129 of file MistimedStreamMonitorAlgorithm.h.

◆ m_toolLookupMap

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

Definition at line 367 of file AthMonitorAlgorithm.h.

◆ m_tools

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

Array of Generic Monitoring Tools.

Definition at line 338 of file AthMonitorAlgorithm.h.

◆ m_trigDec

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

Definition at line 95 of file MistimedStreamMonitorAlgorithm.h.

◆ m_trigDecTool

PublicToolHandle<Trig::TrigDecisionTool> AthMonitorAlgorithm::m_trigDecTool {this, "TrigDecisionTool",""}
protectedinherited

Tool to tell whether a specific trigger is passed.

Definition at line 340 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 355 of file AthMonitorAlgorithm.h.

◆ m_trigLiveFractionDataKey

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

Definition at line 347 of file AthMonitorAlgorithm.h.

◆ m_ttTool

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

Definition at line 121 of file MistimedStreamMonitorAlgorithm.h.

◆ m_uselegacy

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

Definition at line 125 of file MistimedStreamMonitorAlgorithm.h.

◆ m_useLumi

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

Allows use of various luminosity functions.

Definition at line 359 of file AthMonitorAlgorithm.h.

◆ m_usephaseI

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

Definition at line 126 of file MistimedStreamMonitorAlgorithm.h.

◆ 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 356 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.

◆ MaxEvents

MistimedStreamMonitorAlgorithm.MaxEvents

Definition at line 169 of file MistimedStreamMonitorAlgorithm.py.

◆ MistimedStreamMonitorCfg

MistimedStreamMonitorAlgorithm.MistimedStreamMonitorCfg

Definition at line 183 of file MistimedStreamMonitorAlgorithm.py.

◆ OutputLevel

MistimedStreamMonitorAlgorithm.OutputLevel

Definition at line 186 of file MistimedStreamMonitorAlgorithm.py.

◆ PhaseI

MistimedStreamMonitorAlgorithm.PhaseI

Definition at line 183 of file MistimedStreamMonitorAlgorithm.py.

◆ summariseProps

MistimedStreamMonitorAlgorithm.summariseProps

Definition at line 187 of file MistimedStreamMonitorAlgorithm.py.

◆ True

MistimedStreamMonitorAlgorithm.True

Definition at line 187 of file MistimedStreamMonitorAlgorithm.py.

◆ withDetails

MistimedStreamMonitorAlgorithm.withDetails

Definition at line 187 of file MistimedStreamMonitorAlgorithm.py.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
MistimedStreamMonitorAlgorithm::m_maxEvents
Gaudi::Property< int > m_maxEvents
Definition: MistimedStreamMonitorAlgorithm.h:149
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
xAOD::jFexTauRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexTauRoI_v1.h:23
test_pyathena.eta
eta
Definition: test_pyathena.py:10
xAOD::jFexSRJetRoI_v1
Class describing properties of a LVL1 jFEX global Trigger Object (TOB) in the xAOD format.
Definition: jFexSRJetRoI_v1.h:23
AthMonitorAlgorithm::Environment_t::tier0Raw
@ tier0Raw
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
xAOD::CPMTower_v2::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
MistimedStreamMonitorAlgorithm::m_mutex
std::mutex m_mutex
Definition: MistimedStreamMonitorAlgorithm.h:154
get_generator_info.result
result
Definition: get_generator_info.py:21
MistimedStreamMonitorAlgorithm::m_ttTool
ToolHandle< LVL1::IL1TriggerTowerToolRun3 > m_ttTool
Definition: MistimedStreamMonitorAlgorithm.h:121
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
xAOD::jFexTauRoI_v1::eta
float eta() const
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
MistimedStreamMonitorAlgorithm::m_eFexTauContainerKey
SG::ReadHandleKey< xAOD::eFexTauRoIContainer > m_eFexTauContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:107
AthMonitorAlgorithm::Environment_t::tier0
@ tier0
AthMonitorAlgorithm::Environment_t::AOD
@ AOD
SG::Accessor< float >
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
MistimedStreamMonitorAlgorithm::EtaPhiOverlap
@ EtaPhiOverlap
Definition: MistimedStreamMonitorAlgorithm.h:165
MistimedStreamMonitorAlgorithm::m_uselegacy
Gaudi::Property< bool > m_uselegacy
Definition: MistimedStreamMonitorAlgorithm.h:125
xAOD::JetElement_v2
Description of JetElement_v2.
Definition: JetElement_v2.h:26
RunTileMonitoring.groupName
groupName
Definition: RunTileMonitoring.py:158
AthMonitorAlgorithm::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
Definition: AthMonitorAlgorithm.h:356
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
MistimedStreamMonitorAlgorithm::lateTT
@ lateTT
Definition: MistimedStreamMonitorAlgorithm.h:163
AthMonitorAlgorithm::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
Definition: AthMonitorAlgorithm.h:362
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::gFexJetRoIContainer
gFexJetRoIContainer_v1 gFexJetRoIContainer
Definition: gFexJetRoIContainer.h:15
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
MistimedStreamMonitorAlgorithm::m_runParametersContainer
SG::ReadCondHandleKey< L1CaloRunParametersContainer > m_runParametersContainer
Definition: MistimedStreamMonitorAlgorithm.h:129
AthMonitorAlgorithm::m_toolLookupMap
std::unordered_map< std::string, size_t > m_toolLookupMap
Definition: AthMonitorAlgorithm.h:367
AthMonitorAlgorithm::m_environment
AthMonitorAlgorithm::Environment_t m_environment
Instance of the Environment_t enum.
Definition: AthMonitorAlgorithm.h:350
xAOD::jFexTowerContainer
jFexTowerContainer_v1 jFexTowerContainer
Define the latest version of the TriggerTower container.
Definition: jFexTowerContainer.h:14
xAOD::jFexSRJetRoI_v1::eta
float eta() const
xAOD::jFexSRJetRoI_v1::phi
float phi() const
cosmics
Definition: cosmics.py:1
python.RatesEmulationExample.lock
lock
Definition: RatesEmulationExample.py:148
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
MistimedStreamMonitorAlgorithm::m_usephaseI
Gaudi::Property< bool > m_usephaseI
Definition: MistimedStreamMonitorAlgorithm.h:126
xAOD::jFexSRJetRoI_v1::tobWord
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
MistimedStreamMonitorAlgorithm::m_eFexEMContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEMContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:106
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
MistimedStreamMonitorAlgorithm::m_gFexJetTobKeyList
SG::ReadHandleKeyArray< xAOD::gFexJetRoIContainer > m_gFexJetTobKeyList
Definition: MistimedStreamMonitorAlgorithm.h:119
AthMonitorAlgorithm::trigChainsArePassed
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
Definition: AthMonitorAlgorithm.cxx:199
AthMonitorAlgorithm::Environment_t::user
@ user
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthMonitorAlgorithm::m_dummy
const ToolHandle< GenericMonitoringTool > m_dummy
Definition: AthMonitorAlgorithm.h:369
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:190
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
xAOD::phi
setEt phi
Definition: TrigEMCluster_v1.cxx:29
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
AthCommonReentrantAlgorithm::extraOutputDeps
virtual const DataObjIDColl & extraOutputDeps() const override
Return the list of extra output dependencies.
Definition: AthCommonReentrantAlgorithm.cxx:89
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthMonitorAlgorithm::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
Definition: AthMonitorAlgorithm.h:341
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
MistimedStreamMonitorAlgorithm::fillPPMEtaPhi
StatusCode fillPPMEtaPhi(MonitorTT &monTT, const std::string &groupName, const std::string &weightName, double weight) const
Definition: MistimedStreamMonitorAlgorithm.cxx:1167
xAOD::jFexTauRoI_v1::tobEt
uint16_t tobEt() const
MistimedStreamMonitorAlgorithm::All
@ All
Definition: MistimedStreamMonitorAlgorithm.h:159
MistimedStreamMonitorAlgorithm::L1_Trigger
@ L1_Trigger
Definition: MistimedStreamMonitorAlgorithm.h:162
AthMonitorAlgorithm::DataType_t::heavyIonCollisions
@ heavyIonCollisions
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
TauGNNUtils::Variables::Track::dPhi
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:549
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:108
python.CaloAddPedShiftConfig.str
str
Definition: CaloAddPedShiftConfig.py:42
xAOD::gFexJetRoI_v1
Class describing properties of a LVL1 gFEX jet Trigger Object (TOB) in the xAOD format.
Definition: gFexJetRoI_v1.h:25
AthMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
AthCommonReentrantAlgorithm::sysExecute
virtual StatusCode sysExecute(const EventContext &ctx) override
Execute an algorithm.
Definition: AthCommonReentrantAlgorithm.cxx:76
xAOD::jFexSRJetRoI_v1::tobEt
uint16_t tobEt() const
xAOD::TriggerTower_v2
Description of TriggerTower_v2.
Definition: TriggerTower_v2.h:49
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
xAOD::jFexTauRoI_v1::tobWord
uint32_t tobWord() const
The "raw" 32-bit word describing the object candidate.
MistimedStreamMonitorAlgorithm::m_xAODTriggerTowerContainerName
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_xAODTriggerTowerContainerName
container keys including steering parameter and description
Definition: MistimedStreamMonitorAlgorithm.h:100
MistimedStreamMonitorAlgorithm::makeTowerJE
StatusCode makeTowerJE(const xAOD::JetElement *je, std::vector< MonitorJE > &vecMonJE) const
Definition: MistimedStreamMonitorAlgorithm.cxx:1104
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
xAOD::jFexSRJetRoI
jFexSRJetRoI_v1 jFexSRJetRoI
Define the latest version of the jFexSRJetRoI class
Definition: jFexSRJetRoI.h:14
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
xAOD::jFexTauRoI_v1::phi
float phi() const
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
AthMonitorAlgorithm::fill
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.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
AthMonitorAlgorithm::GetEventInfo
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
Definition: AthMonitorAlgorithm.cxx:107
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
MistimedStreamMonitorAlgorithm::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: MistimedStreamMonitorAlgorithm.h:95
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
MistimedStreamMonitorAlgorithm::m_packageName
StringProperty m_packageName
Definition: MistimedStreamMonitorAlgorithm.h:89
MistimedStreamMonitorAlgorithm::m_eventCounter
std::atomic< int > m_eventCounter
Definition: MistimedStreamMonitorAlgorithm.h:152
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
AthMonitorAlgorithm::DataType_t::cosmics
@ cosmics
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
MistimedStreamMonitorAlgorithm::m_ctpRdoReadKey
SG::ReadHandleKey< CTP_RDO > m_ctpRdoReadKey
Definition: MistimedStreamMonitorAlgorithm.h:97
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
MistimedStreamMonitorAlgorithm::m_jFexSRJetContainerKey
SG::ReadHandleKey< xAOD::jFexSRJetRoIContainer > m_jFexSRJetContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:112
AthMonitorAlgorithm::Environment_t::online
@ online
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
MistimedStreamMonitorAlgorithm::m_jetElementLocation
SG::ReadHandleKey< xAOD::JetElementContainer > m_jetElementLocation
Definition: MistimedStreamMonitorAlgorithm.h:104
xAOD::gFexJetRoI
gFexJetRoI_v1 gFexJetRoI
Define the latest version of the gFexJetRoI class.
Definition: gFexJetRoI.h:16
MistimedStreamMonitorAlgorithm::m_EmulTowerKey
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_EmulTowerKey
Definition: MistimedStreamMonitorAlgorithm.h:116
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:76
AthMonitorAlgorithm::Environment_t::tier0ESD
@ tier0ESD
MistimedStreamMonitorAlgorithm::pulseQuality
bool pulseQuality(const std::vector< uint16_t > &ttPulse, int peakSlice) const
Definition: MistimedStreamMonitorAlgorithm.cxx:1214
AthMonitorAlgorithm::Environment_t::altprod
@ altprod
AthMonitorAlgorithm::m_enforceExpressTriggers
Gaudi::Property< bool > m_enforceExpressTriggers
Definition: AthMonitorAlgorithm.h:372
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
MistimedStreamMonitorAlgorithm::makeTowerCPM
StatusCode makeTowerCPM(const xAOD::CPMTower *cpm, std::vector< MonitorCPM > &vecMonCPM) const
Definition: MistimedStreamMonitorAlgorithm.cxx:1056
item
Definition: ItemListSvc.h:43
WriteBchToCool.user
user
Definition: WriteBchToCool.py:76
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
MistimedStreamMonitorAlgorithm::m_jFexDataTowerKey
SG::ReadHandleKey< xAOD::jFexTowerContainer > m_jFexDataTowerKey
Definition: MistimedStreamMonitorAlgorithm.h:115
MistimedStreamMonitorAlgorithm::InTime
@ InTime
Definition: MistimedStreamMonitorAlgorithm.h:164
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
runIDAlign.accumulate
accumulate
Update flags based on parser line args.
Definition: runIDAlign.py:60
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
MistimedStreamMonitorAlgorithm::m_eFexEMOutContainerKey
SG::ReadHandleKey< xAOD::eFexEMRoIContainer > m_eFexEMOutContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:108
h
ReadFloatFromCool.adc
adc
Definition: ReadFloatFromCool.py:48
MistimedStreamMonitorAlgorithm::HLT_mistimemonj400
@ HLT_mistimemonj400
Definition: MistimedStreamMonitorAlgorithm.h:161
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthMonitorAlgorithm::DataType_t::collisions
@ collisions
AthMonitorAlgorithm::m_name
std::string m_name
Definition: AthMonitorAlgorithm.h:366
MistimedStreamMonitorAlgorithm::m_jFexTauContainerKey
SG::ReadHandleKey< xAOD::jFexTauRoIContainer > m_jFexTauContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:113
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
TauGNNUtils::Variables::absEta
bool absEta(const xAOD::TauJet &tau, double &out)
Definition: TauGNNUtils.cxx:245
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
python.SystemOfUnits.s
float s
Definition: SystemOfUnits.py:147
xAOD::jFexTauRoI
jFexTauRoI_v1 jFexTauRoI
Define the latest version of the jFexSRJetRoI class
Definition: jFexTauRoI.h:13
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthCommonReentrantAlgorithm.cxx:107
xAOD::JetElement_v2::phi
float phi() const
get phi (note that for L1Calo phi runs from 0 to 2pi)
MistimedStreamMonitorAlgorithm::m_jFexLRJetContainerKey
SG::ReadHandleKey< xAOD::jFexLRJetRoIContainer > m_jFexLRJetContainerKey
Definition: MistimedStreamMonitorAlgorithm.h:111
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
MistimedStreamMonitorAlgorithm::m_cpmTowerLocation
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocation
Definition: MistimedStreamMonitorAlgorithm.h:102
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
fillSCTHists.etaMod
etaMod
Definition: fillSCTHists.py:23
AthMonitorAlgorithm::DataType_t::userDefined
@ userDefined
xAOD::jFexTower_v1
Class describing input data of a LVL1 jFEX.
Definition: jFexTower_v1.h:22
TauGNNUtils::Variables::Track::dEta
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
Definition: TauGNNUtils.cxx:538
AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthCommonReentrantAlgorithm.h:114
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:876
MistimedStreamMonitorAlgorithm::m_phiScaleTT
Gaudi::Property< double > m_phiScaleTT
Definition: MistimedStreamMonitorAlgorithm.h:124
python.compressB64.c
def c
Definition: compressB64.py:93
MistimedStreamMonitorAlgorithm::makeTowerPPM
StatusCode makeTowerPPM(const xAOD::TriggerTower *tt, std::vector< MonitorTT > &vecMonTT) const
Helper functions.
Definition: MistimedStreamMonitorAlgorithm.cxx:1036
MistimedStreamMonitorAlgorithm::m_readoutConfigContainerJSON
SG::ReadCondHandleKey< L1CaloReadoutConfigContainerJSON > m_readoutConfigContainerJSON
Definition: MistimedStreamMonitorAlgorithm.h:130
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo
fitman.k
k
Definition: fitman.py:528
xAOD::TriggerTower
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/TriggerTower.h:16
MistimedStreamMonitorAlgorithm::UnsuitableReadout
@ UnsuitableReadout
Definition: MistimedStreamMonitorAlgorithm.h:160
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::CPMTower_v2
Description of CPMTower_v2.
Definition: CPMTower_v2.h:26
collisions
Definition: collisions.py:1