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

#include <CpmSimMonitorAlgorithm.h>

Inheritance diagram for CpmSimMonitorAlgorithm:
Collaboration diagram for CpmSimMonitorAlgorithm:

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

 CpmSimMonitorAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual ~CpmSimMonitorAlgorithm ()=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 > &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

 inputs
 
 flags
 
 Files
 
 HISTFileName
 
 cfg
 
 CpmSimMonitorCfg
 
 OutputLevel
 
 withDetails
 
 False
 
 summariseProps
 
 nevents
 

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  SummaryErrors {
  EMTowerMismatch, HadTowerMismatch, EMRoIMismatch, TauRoIMismatch,
  LeftCMXTobMismatch, RightCMXTobMismatch, LocalSumMismatch, RemoteSumMismatch,
  TotalSumMismatch, TopoMismatch, NumberOfSummaryBins
}
 
typedef std::vector< int > ErrorVector
 
typedef std::map< int, const xAOD::TriggerTower * > TriggerTowerMapEm
 
typedef std::map< int, const xAOD::TriggerTower * > TriggerTowerMapHad
 
typedef xAOD::CPMTowerMap_t CpmTowerMap
 
typedef std::map< int, const xAOD::CMXCPTob * > CmxCpTobMap
 
typedef std::map< int, const xAOD::CMXCPHits * > CmxCpHitsMap
 
typedef xAOD::CPMTobRoIMap_t CpmTobRoiMap
 
typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

const TrigConf::L1MenugetL1Menu (const EventContext &ctx) const
 
StatusCode setupMap (const xAOD::TriggerTowerContainer *coll, TriggerTowerMapEm &emmap, TriggerTowerMapHad &hadmap) const
 
StatusCode setupMap (const xAOD::CPMTowerContainer *coll, CpmTowerMap &map) const
 
StatusCode setupMap (const xAOD::CPMTobRoIContainer *coll, CpmTobRoiMap &map) const
 
StatusCode setupMap (const xAOD::CMXCPTobContainer *coll, CmxCpTobMap &map, std::vector< int > *parityMap=0) const
 
StatusCode setupMap (const xAOD::CMXCPHitsContainer *coll, CmxCpHitsMap &map) const
 
bool compareEm (const TriggerTowerMapEm &ttMap, const CpmTowerMap &cpMap, ErrorVector &errors, bool overlap) const
 
bool compareHad (const TriggerTowerMapHad &ttMap, const CpmTowerMap &cpMap, ErrorVector &errors, bool overlap) const
 
void compare (const CpmTobRoiMap &roiSimMap, const CpmTobRoiMap &roiMap, ErrorVector &errors, const xAOD::RODHeaderContainer *rodTES) const
 
void compare (const CmxCpTobMap &simMap, const CmxCpTobMap &datMap, const std::vector< int > &parityMap, ErrorVector &errorsCPM, ErrorVector &errorsCMX, const xAOD::RODHeaderContainer *rodTES) const
 
void compare (const CmxCpHitsMap &cmxSimMap, const CmxCpHitsMap &cmxMap, ErrorVector &errors, int selection) const
 
void simulate (const CpmTowerMap *towers, const CpmTowerMap *towersOv, xAOD::CPMTobRoIContainer *rois, const EventContext &ctx) const
 
void simulate (const CpmTowerMap *towers, xAOD::CPMTobRoIContainer *rois, const EventContext &ctx) const
 
void simulate (const xAOD::CPMTobRoIContainer *rois, xAOD::CMXCPTobContainer *tobs) const
 
void simulate (const xAOD::CMXCPTobContainer *tobs, xAOD::CMXCPHitsContainer *hits, int selection, const EventContext &ctx) const
 
void simulate (const xAOD::CMXCPHitsContainer *hitsIn, xAOD::CMXCPHitsContainer *hitsOut) const
 
int fpga (int crate, double phi) const
 
CpmTowerMap::mapped_type ttCheck (CpmTowerMap::mapped_type tt, xAOD::CPMTowerContainer *coll) const
 
bool limitedRoiSet (int crate, SG::ReadHandle< xAOD::RODHeaderContainer > &rodTES) const
 
bool limitedRoiSet (int crate, const xAOD::RODHeaderContainer *rodTES) const
 
int thresholdsSame (int val1, int val2, int nThresh, int nBits) const
 
int thresholdsDiff (int val1, int val2, int nThresh, int nBits) const
 
void fillXVsThresholds (Monitored::Scalar< int > &xitem, Monitored::Scalar< int > &yitem, Monitored::Scalar< int > &witem, int x, int val, int nThresh, int nBits, int offset=0) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ServiceHandle< TrigConf::ITrigConfigSvcm_configSvc {this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc"}
 
StringProperty m_packageName {this,"PackageName","CpmSimMonitor","group name for histograming"}
 
SG::WriteHandleKey< std::vector< int > > m_errorLocation {this,"ErrorLocation","L1CaloCPMMismatchVector","ErrorVector"}
 
Gaudi::Property< int > m_crates {this,"s_crates", 4, "Number of CPM crates"}
 
Gaudi::Property< int > m_modules {this,"s_modules", 14, "Number of modules per crate (modules numbered 1-14)"}
 
Gaudi::Property< int > m_maxSlices {this,"s_maxSlices", 5, "Maximum number of slices"}
 
Gaudi::Property< int > m_cmxs {this,"s_cmxs", 2, "Number of CMXs"}
 
Gaudi::Property< bool > m_legacyCpHadInputsDisabled {this,"s_legacyCpHadInputsDisabled", false, "Status of the L1Calo Legacy CP hadronic inputs"}
 
bool m_overlapPresent
 
SG::ReadHandleKey< xAOD::TriggerTowerContainerm_triggerTowerLocation {this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"TriggerTower Location"}
 
SG::ReadHandleKey< xAOD::CPMTowerContainerm_cpmTowerLocation {this, "CPMTowerLocation", LVL1::TrigT1CaloDefs::CPMTowerLocation, "CPM container"}
 
SG::ReadHandleKey< xAOD::CPMTowerContainerm_cpmTowerLocationOverlap {this, "CPMTowerLocationOverlap",LVL1::TrigT1CaloDefs::CPMTowerLocation + "Overlap", "CPM Overlap container"}
 
SG::ReadHandleKey< xAOD::CPMTobRoIContainerm_cpmTobRoiLocation {this, "CPMTobRoILocation", LVL1::TrigT1CaloDefs::CPMTobRoILocation, "CPM RoI container"}
 
SG::ReadHandleKey< xAOD::CMXCPTobContainerm_cmxCpTobLocation {this, "CMXCPTobLocation", LVL1::TrigT1CaloDefs::CMXCPTobLocation, "CMX CP Tob container"}
 
SG::ReadHandleKey< xAOD::CMXCPHitsContainerm_cmxCpHitsLocation {this, "CMXCPHitsLocation", LVL1::TrigT1CaloDefs::CMXCPHitsLocation, "CMX CP Hits container"}
 
SG::ReadHandleKey< xAOD::RODHeaderContainerm_rodHeaderLocation {this, "RodHeaderLocation", LVL1::TrigT1CaloDefs::RODHeaderLocation, "Rod header container"}
 
SG::ReadHandleKey< TrigConf::L1Menum_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
 
ToolHandle< LVL1::IL1CPCMXToolsm_cpCmxTool
 
ToolHandle< LVL1::IL1CPMToolsm_cpmTool
 
ToolHandle< LVL1::ITrigT1CaloMonErrorToolm_errorTool
 
std::mutex m_mutex {}
 
std::map< uint32_t, int > m_errorLB_tt_counter ATLAS_THREAD_SAFE
 
std::map< uint32_t, int > m_errorLB_roi_counter ATLAS_THREAD_SAFE
 
std::map< uint32_t, int > m_errorLB_tob_counter ATLAS_THREAD_SAFE
 
std::map< uint32_t, int > m_errorLB_thresh_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 39 of file CpmSimMonitorAlgorithm.h.

Member Typedef Documentation

◆ CmxCpHitsMap

Definition at line 98 of file CpmSimMonitorAlgorithm.h.

◆ CmxCpTobMap

typedef std::map<int, const xAOD::CMXCPTob*> CpmSimMonitorAlgorithm::CmxCpTobMap
private

Definition at line 97 of file CpmSimMonitorAlgorithm.h.

◆ CpmTobRoiMap

Definition at line 99 of file CpmSimMonitorAlgorithm.h.

◆ CpmTowerMap

Definition at line 96 of file CpmSimMonitorAlgorithm.h.

◆ ErrorVector

typedef std::vector<int> CpmSimMonitorAlgorithm::ErrorVector
private

Definition at line 72 of file CpmSimMonitorAlgorithm.h.

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

◆ TriggerTowerMapEm

Definition at line 94 of file CpmSimMonitorAlgorithm.h.

◆ TriggerTowerMapHad

Definition at line 95 of file CpmSimMonitorAlgorithm.h.

Member Enumeration Documentation

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

◆ SummaryErrors

Enumerator
EMTowerMismatch 
HadTowerMismatch 
EMRoIMismatch 
TauRoIMismatch 
LeftCMXTobMismatch 
RightCMXTobMismatch 
LocalSumMismatch 
RemoteSumMismatch 
TotalSumMismatch 
TopoMismatch 
NumberOfSummaryBins 

Definition at line 67 of file CpmSimMonitorAlgorithm.h.

Constructor & Destructor Documentation

◆ CpmSimMonitorAlgorithm()

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

Definition at line 9 of file CpmSimMonitorAlgorithm.cxx.

10  : AthMonitorAlgorithm(name,pSvcLocator),
11  m_overlapPresent(true), //fill histograms is a const - this variable is read only anyhow
12  m_cpCmxTool("LVL1::L1CPCMXTools/L1CPCMXTools"),
13  m_cpmTool("LVL1::L1CPMTools/L1CPMTools"),
14  m_errorTool("LVL1::TrigT1CaloMonErrorTool/TrigT1CaloMonErrorTool")
15 {
16 }

◆ ~CpmSimMonitorAlgorithm()

virtual CpmSimMonitorAlgorithm::~CpmSimMonitorAlgorithm ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthReentrantAlgorithm::cardinality ( ) const
overridevirtualinherited

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

Override this to return 0 for reentrant algorithms.

Override this to return 0 for reentrant algorithms.

Definition at line 55 of file AthReentrantAlgorithm.cxx.

56 {
57  return 0;
58 }

◆ compare() [1/3]

void CpmSimMonitorAlgorithm::compare ( const CmxCpHitsMap cmxSimMap,
const CmxCpHitsMap cmxMap,
ErrorVector errors,
int  selection 
) const
private

Definition at line 1395 of file CpmSimMonitorAlgorithm.cxx.

1397  {
1398 
1399  ATH_MSG_DEBUG("Compare Simulated CMX Hit Sums and Data CMX Hit Sums");
1400 
1401  const bool local = (selection == xAOD::CMXCPHits::LOCAL);
1402  const bool remote = (selection == xAOD::CMXCPHits::REMOTE_0);
1403  const bool total = (selection == xAOD::CMXCPHits::TOTAL);
1404  const bool topo = (selection == xAOD::CMXCPHits::TOPO_CHECKSUM);
1405 
1406  if (!local && !remote && !total /* && !topo*/)
1407  return;
1408 
1409  Monitored::Scalar<int> cmx_sum_loc_SimEqData = Monitored::Scalar<int>("cmx_sum_loc_SimEqData", 0);
1410  Monitored::Scalar<int> cmx_sum_loc_SimNeData = Monitored::Scalar<int>("cmx_sum_loc_SimNeData", 0);
1411  Monitored::Scalar<int> cmx_sum_loc_SimNoData = Monitored::Scalar<int>("cmx_sum_loc_SimNoData", 0);
1412  Monitored::Scalar<int> cmx_sum_loc_DataNoSim = Monitored::Scalar<int>("cmx_sum_loc_DataNoSim", 0);
1413 
1414  //
1415  Monitored::Scalar<int> cmxTopoLocXSimEqData = Monitored::Scalar<int>("cmxTopoLocXSimEqData", 0);
1416  Monitored::Scalar<int> cmxTopoLocYSimEqData = Monitored::Scalar<int>("cmxTopoLocYSimEqData", 0);
1417  Monitored::Scalar<int> cmxTopoLocXSimNeData = Monitored::Scalar<int>("cmxTopoLocXSimNeData", 0);
1418  Monitored::Scalar<int> cmxTopoLocYSimNeData = Monitored::Scalar<int>("cmxTopoLocYSimNeData", 0);
1419  Monitored::Scalar<int> cmxTopoLocXSimNoData = Monitored::Scalar<int>("cmxTopoLocXSimNoData", 0);
1420  Monitored::Scalar<int> cmxTopoLocYSimNoData = Monitored::Scalar<int>("cmxTopoLocYSimNoData", 0);
1421  Monitored::Scalar<int> cmxTopoLocXDataNoSim = Monitored::Scalar<int>("cmxTopoLocXDataNoSim", 0);
1422  Monitored::Scalar<int> cmxTopoLocYDataNoSim = Monitored::Scalar<int>("cmxTopoLocYDataNoSim", 0);
1423 
1424  //
1425  Monitored::Scalar<int> cmx_x_leftsums_SimEqData = Monitored::Scalar<int>("cmx_x_leftsums_SimEqData", 0);
1426  Monitored::Scalar<int> cmx_y_leftsums_SimEqData = Monitored::Scalar<int>("cmx_y_leftsums_SimEqData", 0);
1427  Monitored::Scalar<int> cmx_w_leftsums_SimEqData = Monitored::Scalar<int>("cmx_w_leftsums_SimEqData", 0);
1428  Monitored::Scalar<int> cmx_x_rightsums_SimEqData = Monitored::Scalar<int>("cmx_x_rightsums_SimEqData", 0);
1429  Monitored::Scalar<int> cmx_y_rightsums_SimEqData = Monitored::Scalar<int>("cmx_y_rightsums_SimEqData", 0);
1430  Monitored::Scalar<int> cmx_w_rightsums_SimEqData = Monitored::Scalar<int>("cmx_w_rightsums_SimEqData", 0);
1431 
1432  Monitored::Scalar<int> cmx_x_leftsums_SimNeData = Monitored::Scalar<int>("cmx_x_leftsums_SimNeData", 0);
1433  Monitored::Scalar<int> cmx_y_leftsums_SimNeData = Monitored::Scalar<int>("cmx_y_leftsums_SimNeData", 0);
1434  Monitored::Scalar<int> cmx_w_leftsums_SimNeData = Monitored::Scalar<int>("cmx_w_leftsums_SimNeData", 0);
1435  Monitored::Scalar<int> cmx_x_rightsums_SimNeData = Monitored::Scalar<int>("cmx_x_rightsums_SimNeData", 0);
1436  Monitored::Scalar<int> cmx_y_rightsums_SimNeData = Monitored::Scalar<int>("cmx_y_rightsums_SimNeData", 0);
1437  Monitored::Scalar<int> cmx_w_rightsums_SimNeData = Monitored::Scalar<int>("cmx_w_rightsums_SimNeData", 0);
1438 
1439 
1440  std::vector<unsigned int> hits0Sim(m_crates * m_cmxs);
1441  std::vector<unsigned int> hits1Sim(m_crates * m_cmxs);
1442  std::vector<unsigned int> hits0(m_crates * m_cmxs);
1443  std::vector<unsigned int> hits1(m_crates * m_cmxs);
1444  CmxCpHitsMap::const_iterator cmxSimMapIter = cmxSimMap.begin();
1445  CmxCpHitsMap::const_iterator cmxSimMapIterEnd = cmxSimMap.end();
1446  CmxCpHitsMap::const_iterator cmxMapIter = cmxMap.begin();
1447  CmxCpHitsMap::const_iterator cmxMapIterEnd = cmxMap.end();
1448 
1449  while (cmxSimMapIter != cmxSimMapIterEnd || cmxMapIter != cmxMapIterEnd) {
1450 
1451  int cmxSimKey = 0;
1452  int cmxKey = 0;
1453  unsigned int cmxSimHits0 = 0;
1454  unsigned int cmxSimHits1 = 0;
1455  unsigned int cmxHits0 = 0;
1456  unsigned int cmxHits1 = 0;
1457  int crate = 0;
1458  int cmx = 0;
1459  int source = 0;
1460 
1461  if (cmxSimMapIter != cmxSimMapIterEnd)
1462  cmxSimKey = cmxSimMapIter->first;
1463  if (cmxMapIter != cmxMapIterEnd)
1464  cmxKey = cmxMapIter->first;
1465 
1466  if ((cmxMapIter == cmxMapIterEnd) ||
1467  ((cmxSimMapIter != cmxSimMapIterEnd) && (cmxKey > cmxSimKey))) {
1468 
1469  // Sim CMX Hits but no Data CMX Hits
1470 
1471  const xAOD::CMXCPHits *cmxS = cmxSimMapIter->second;
1472  ++cmxSimMapIter;
1473  source = cmxS->sourceComponent();
1475  continue;
1477  continue;
1478  if (total && source != xAOD::CMXCPHits::TOTAL)
1479  continue;
1480  if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1483  continue;
1484  cmxSimHits0 = cmxS->hits0();
1485  cmxSimHits1 = cmxS->hits1();
1486  crate = cmxS->crate();
1487  cmx = cmxS->cmx();
1488 
1489  } else if ((cmxSimMapIter == cmxSimMapIterEnd) ||
1490  ((cmxMapIter != cmxMapIterEnd) && (cmxSimKey > cmxKey))) {
1491 
1492  // Data CMX Hits but no Sim CMX Hits
1493 
1494  const xAOD::CMXCPHits *cmxD = cmxMapIter->second;
1495  ++cmxMapIter;
1496  source = cmxD->sourceComponent();
1498  continue;
1502  continue;
1503  if (total && source != xAOD::CMXCPHits::TOTAL)
1504  continue;
1505  if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1508  continue;
1509  cmxHits0 = cmxD->hits0();
1510  cmxHits1 = cmxD->hits1();
1511  crate = cmxD->crate();
1512  cmx = cmxD->cmx();
1513 
1514  } else {
1515 
1516  // Have both
1517 
1518  const xAOD::CMXCPHits *cmxS = cmxSimMapIter->second;
1519  const xAOD::CMXCPHits *cmxD = cmxMapIter->second;
1520  ++cmxSimMapIter;
1521  ++cmxMapIter;
1522  source = cmxS->sourceComponent();
1524  continue;
1525  if (remote && source != xAOD::CMXCPHits::LOCAL &&
1529  continue;
1530  if (total && source != xAOD::CMXCPHits::TOTAL)
1531  continue;
1532  if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1535  continue;
1536  cmxSimHits0 = cmxS->hits0();
1537  cmxSimHits1 = cmxS->hits1();
1538  cmxHits0 = cmxD->hits0();
1539  cmxHits1 = cmxD->hits1();
1540  crate = cmxS->crate();
1541  cmx = cmxS->cmx();
1542  }
1543 
1544  if (!cmxSimHits0 && !cmxSimHits1 && !cmxHits0 && !cmxHits1)
1545  continue;
1546 
1547  // Fill in error plots
1548 
1549  if (local || total) {
1550  int loc = crate * m_cmxs + cmx;
1551  const int cmxBins = m_crates * m_cmxs;
1552  const int bit =
1553  (local) ? (1 << LocalSumMismatch) : (1 << TotalSumMismatch);
1554  // loc for the histogram filling
1555  int loc_fill = (local) ? loc : 14 + cmx;
1556  if (cmxSimHits0 == cmxHits0 && cmxSimHits1 == cmxHits1) {
1557  errors[loc] |= bit;
1558  cmx_sum_loc_SimEqData=loc_fill;
1559  fill(m_packageName,cmx_sum_loc_SimEqData);
1560  } else {
1561  errors[loc + cmxBins] |= bit;
1562  if ((cmxSimHits0 || cmxSimHits1) && (cmxHits0 || cmxHits1)) {
1563  cmx_sum_loc_SimNeData=loc_fill;
1564  fill(m_packageName,cmx_sum_loc_SimNeData);
1565  } else if (!cmxHits0 && !cmxHits1) {
1566  cmx_sum_loc_SimNoData=loc_fill;
1567  fill(m_packageName,cmx_sum_loc_SimNoData);
1568  } else {
1569  cmx_sum_loc_DataNoSim=loc_fill;
1570  fill(m_packageName,cmx_sum_loc_SimEqData);
1571  }
1572  }
1573  // the loc used for filling histograms
1574  loc = (local) ? loc : 14 + cmx;
1575  // now divide it by 2
1576  loc /= 2;
1577  const int nThresh = 8;
1578  const int thrLen = 3;
1579  int same0 = thresholdsSame(cmxHits0, cmxSimHits0, nThresh, thrLen);
1580  int diff0 = thresholdsDiff(cmxHits0, cmxSimHits0, nThresh, thrLen);
1581  int same1 = thresholdsSame(cmxHits1, cmxSimHits1, nThresh, thrLen);
1582  int diff1 = thresholdsDiff(cmxHits1, cmxSimHits1, nThresh, thrLen);
1583  if (cmx) {
1584  fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1585  loc, same0, nThresh, 1);
1586  fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1587  loc, diff0, nThresh, 1);
1588  const int offset = nThresh;
1589  fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1590  loc, same1, nThresh, 1, offset);
1591  fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1592  loc, diff1, nThresh, 1, offset);
1593  } else {
1594  fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1595  loc, same0, nThresh, 1);
1596  fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1597  loc, diff0, nThresh, 1);
1598  const int offset = nThresh;
1599  fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1600  loc, same1, nThresh, 1, offset);
1601  fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1602  loc, diff1, nThresh, 1, offset);
1603  }
1604  } else if (remote) {
1605  if (source == xAOD::CMXCPHits::LOCAL) {
1606  if (crate != m_crates - 1) {
1607  hits0Sim[crate * m_cmxs + cmx] = cmxSimHits0;
1608  hits1Sim[crate * m_cmxs + cmx] = cmxSimHits1;
1609  }
1610  } else {
1611  const int remCrate = source - xAOD::CMXCPHits::REMOTE_0;
1612  hits0[remCrate * m_cmxs + cmx] = cmxHits0;
1613  hits1[remCrate * m_cmxs + cmx] = cmxHits1;
1614  }
1615  } else {
1616  const int locX = crate * m_cmxs + cmx;
1618  const int cmxBins = m_crates * m_cmxs;
1619  const int bit = (1 << TopoMismatch);
1620  if (cmxSimHits0 == cmxHits0 && cmxSimHits1 == cmxHits1) {
1621  errors[locX] |= bit;
1622  cmxTopoLocXSimEqData=locX;
1623  cmxTopoLocYSimEqData=locY;
1624  fill(m_packageName,cmxTopoLocXSimEqData,cmxTopoLocYSimEqData);
1625  } else {
1626  errors[locX + cmxBins] |= bit;
1627  if ((cmxSimHits0 || cmxSimHits1) && (cmxHits0 || cmxHits1)) {
1628  cmxTopoLocXSimNeData=locX;
1629  cmxTopoLocYSimNeData=locY;
1630  fill(m_packageName,cmxTopoLocXSimNeData,cmxTopoLocYSimNeData);
1631  } else if (!cmxHits0 && !cmxHits1) {
1632  cmxTopoLocXSimNoData=locX;
1633  cmxTopoLocYSimNoData=locY;
1634  fill(m_packageName,cmxTopoLocXSimNoData,cmxTopoLocYSimNoData);
1635  } else {
1636  cmxTopoLocXDataNoSim=locX;
1637  cmxTopoLocYDataNoSim=locY;
1638  fill(m_packageName,cmxTopoLocXDataNoSim,cmxTopoLocYDataNoSim);
1639  }
1640  }
1641  }
1642  }
1643  if (remote) {
1644  for (int crate = 0; crate < m_crates - 1; ++crate) {
1645  for (int cmx = 0; cmx < m_cmxs; ++cmx) {
1646  int loc = crate * m_cmxs + cmx;
1647  const int cmxBins = m_crates * m_cmxs;
1648  const int bit = (1 << RemoteSumMismatch);
1649  const unsigned int hd0 = hits0[loc];
1650  const unsigned int hd1 = hits1[loc];
1651  const unsigned int hs0 = hits0Sim[loc];
1652  const unsigned int hs1 = hits1Sim[loc];
1653 
1654  if (!hd0 && !hd1 && !hs0 && !hs1)
1655  continue;
1656 
1657  int loc_fill = loc + 8;
1658  if (hs0 == hd0 && hs1 == hd1) {
1659  errors[loc] |= bit;
1660  cmx_sum_loc_SimEqData=loc_fill;
1661  fill(m_packageName,cmx_sum_loc_SimEqData);
1662  } else {
1663  errors[loc + cmxBins] |= bit;
1664  if ((hs0 || hs1) && (hd0 || hd1)) {
1665  cmx_sum_loc_SimNeData=loc_fill;
1666  fill(m_packageName,cmx_sum_loc_SimNeData);
1667  } else if (!hd0 && !hd1) {
1668  cmx_sum_loc_SimNoData=loc_fill;
1669  fill(m_packageName,cmx_sum_loc_SimNoData);
1670  } else {
1671  cmx_sum_loc_DataNoSim=loc_fill;
1672  fill(m_packageName,cmx_sum_loc_DataNoSim);
1673  }
1674  }
1675  // this is the loc used for filling
1676  loc = loc_fill;
1677  // and to be used for the rest of the filling
1678  loc /= 2;
1679  const int nThresh = 8;
1680  const int thrLen = 3;
1681  int same0 = thresholdsSame(hd0, hs0, nThresh, thrLen);
1682  int diff0 = thresholdsDiff(hd0, hs0, nThresh, thrLen);
1683  int same1 = thresholdsSame(hd1, hs1, nThresh, thrLen);
1684  int diff1 = thresholdsDiff(hd1, hs1, nThresh, thrLen);
1685  if (cmx) {
1686  fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1687  loc, same0, nThresh, 1);
1688  fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1689  loc, diff0, nThresh, 1);
1690  const int offset = nThresh;
1691  fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1692  loc, same1, nThresh, 1, offset);
1693  fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1694  loc, diff1, nThresh, 1, offset);
1695  } else {
1696  fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1697  loc, same0, nThresh, 1);
1698  fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1699  loc, diff0, nThresh, 1);
1700  const int offset = nThresh;
1701  fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1702  loc, same1, nThresh, 1, offset);
1703  fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1704  loc, diff1, nThresh, 1, offset);
1705  }
1706  }
1707  }
1708  }
1709 }

◆ compare() [2/3]

void CpmSimMonitorAlgorithm::compare ( const CmxCpTobMap simMap,
const CmxCpTobMap datMap,
const std::vector< int > &  parityMap,
ErrorVector errorsCPM,
ErrorVector errorsCMX,
const xAOD::RODHeaderContainer rodTES 
) const
private

Definition at line 1094 of file CpmSimMonitorAlgorithm.cxx.

1097  {
1098 
1099  ATH_MSG_DEBUG("Compare simulated CMX TOBs with data");
1100 
1101  //
1102  Monitored::Scalar<int> cmxLeftEnerSimEqDataLocX = Monitored::Scalar<int>("cmxLeftEnerSimEqDataLocX", 0);
1103  Monitored::Scalar<int> cmxLeftEnerSimEqDataLocY = Monitored::Scalar<int>("cmxLeftEnerSimEqDataLocY", 0);
1104  Monitored::Scalar<int> cmxRightEnerSimEqDataLocX = Monitored::Scalar<int>("cmxRightEnerSimEqDataLocX", 0);
1105  Monitored::Scalar<int> cmxRightEnerSimEqDataLocY = Monitored::Scalar<int>("cmxRightEnerSimEqDataLocY", 0);
1106 
1107  Monitored::Scalar<int> cmxLeftEnerSimNeDataLocX = Monitored::Scalar<int>("cmxLeftEnerSimNeDataLocX", 0);
1108  Monitored::Scalar<int> cmxLeftEnerSimNeDataLocY = Monitored::Scalar<int>("cmxLeftEnerSimNeDataLocY", 0);
1109  Monitored::Scalar<int> cmxRightEnerSimNeDataLocX = Monitored::Scalar<int>("cmxRightEnerSimNeDataLocX", 0);
1110  Monitored::Scalar<int> cmxRightEnerSimNeDataLocY = Monitored::Scalar<int>("cmxRightEnerSimNeDataLocY", 0);
1111 
1112  Monitored::Scalar<int> cmxLeftEnerSimNoDataLocX = Monitored::Scalar<int>("cmxLeftEnerSimNoDataLocX", 0);
1113  Monitored::Scalar<int> cmxLeftEnerSimNoDataLocY = Monitored::Scalar<int>("cmxLeftEnerSimNoDataLocY", 0);
1114  Monitored::Scalar<int> cmxRightEnerSimNoDataLocX = Monitored::Scalar<int>("cmxRightEnerSimNoDataLocX", 0);
1115  Monitored::Scalar<int> cmxRightEnerSimNoDataLocY = Monitored::Scalar<int>("cmxRightEnerSimNoDataLocY", 0);
1116 
1117  Monitored::Scalar<int> cmxLeftEnerDataNoSimLocX = Monitored::Scalar<int>("cmxLeftEnerDataNoSimLocX", 0);
1118  Monitored::Scalar<int> cmxLeftEnerDataNoSimLocY = Monitored::Scalar<int>("cmxLeftEnerDataNoSimLocY", 0);
1119  Monitored::Scalar<int> cmxRightEnerDataNoSimLocX = Monitored::Scalar<int>("cmxRightEnerDataNoSimLocX", 0);
1120  Monitored::Scalar<int> cmxRightEnerDataNoSimLocY = Monitored::Scalar<int>("cmxRightEnerDataNoSimLocY", 0);
1121 
1122  Monitored::Scalar<int> cmxLeftIsolSimEqDataLocX = Monitored::Scalar<int>("cmxLeftIsolSimEqDataLocX", 0);
1123  Monitored::Scalar<int> cmxLeftIsolSimEqDataLocY = Monitored::Scalar<int>("cmxLeftIsolSimEqDataLocY", 0);
1124  Monitored::Scalar<int> cmxRightIsolSimEqDataLocX = Monitored::Scalar<int>("cmxRightIsolSimEqDataLocX", 0);
1125  Monitored::Scalar<int> cmxRightIsolSimEqDataLocY = Monitored::Scalar<int>("cmxRightIsolSimEqDataLocY", 0);
1126 
1127  Monitored::Scalar<int> cmxLeftIsolSimNeDataLocX = Monitored::Scalar<int>("cmxLeftIsolSimNeDataLocX", 0);
1128  Monitored::Scalar<int> cmxLeftIsolSimNeDataLocY = Monitored::Scalar<int>("cmxLeftIsolSimNeDataLocY", 0);
1129  Monitored::Scalar<int> cmxRightIsolSimNeDataLocX = Monitored::Scalar<int>("cmxRightIsolSimNeDataLocX", 0);
1130  Monitored::Scalar<int> cmxRightIsolSimNeDataLocY = Monitored::Scalar<int>("cmxRightIsolSimNeDataLocY", 0);
1131 
1132  Monitored::Scalar<int> cmxLeftIsolSimNoDataLocX = Monitored::Scalar<int>("cmxLeftIsolSimNoDataLocX", 0);
1133  Monitored::Scalar<int> cmxLeftIsolSimNoDataLocY = Monitored::Scalar<int>("cmxLeftIsolSimNoDataLocY", 0);
1134  Monitored::Scalar<int> cmxRightIsolSimNoDataLocX = Monitored::Scalar<int>("cmxRightIsolSimNoDataLocX", 0);
1135  Monitored::Scalar<int> cmxRightIsolSimNoDataLocY = Monitored::Scalar<int>("cmxRightIsolSimNoDataLocY", 0);
1136 
1137  Monitored::Scalar<int> cmxLeftIsolDataNoSimLocX = Monitored::Scalar<int>("cmxLeftIsolDataNoSimLocX", 0);
1138  Monitored::Scalar<int> cmxLeftIsolDataNoSimLocY = Monitored::Scalar<int>("cmxLeftIsolDataNoSimLocY", 0);
1139  Monitored::Scalar<int> cmxRightIsolDataNoSimLocX = Monitored::Scalar<int>("cmxRightIsolDataNoSimLocX", 0);
1140  Monitored::Scalar<int> cmxRightIsolDataNoSimLocY = Monitored::Scalar<int>("cmxRightIsolDataNoSimLocY", 0);
1141 
1142  Monitored::Scalar<float> cmxEtaSimEqData = Monitored::Scalar<float>("cmxEtaSimEqData", 0.);
1143  Monitored::Scalar<float> cmxPhiSimEqData = Monitored::Scalar<float>("cmxPhiSimEqData", 0.);
1144 
1145  Monitored::Scalar<float> cmxEtaSimNeData = Monitored::Scalar<float>("cmxEtaSimNeData", 0.);
1146  Monitored::Scalar<float> cmxPhiSimNeData = Monitored::Scalar<float>("cmxPhiSimNeData", 0.);
1147 
1148  Monitored::Scalar<float> cmxEtaDataNoSim = Monitored::Scalar<float>("cmxEtaDataNoSim", 0.);
1149  Monitored::Scalar<float> cmxPhiDataNoSim = Monitored::Scalar<float>("cmxPhiDataNoSim", 0.);
1150 
1151  Monitored::Scalar<float> cmxEtaSimNoData = Monitored::Scalar<float>("cmxEtaSimNoData", 0.);
1152  Monitored::Scalar<float> cmxPhiSimNoData = Monitored::Scalar<float>("cmxPhiSimNoData", 0.);
1153 
1154  Monitored::Scalar<int> cmxOverLocXSimEqData = Monitored::Scalar<int>("cmxOverLocXSimEqData", 0);
1155  Monitored::Scalar<int> cmxOverCmxSimEqData = Monitored::Scalar<int>("cmxOverCmxSimEqData", 0);
1156 
1157  Monitored::Scalar<int> cmxOverLocXSimNeData = Monitored::Scalar<int>("cmxOverLocXSimNeData", 0);
1158  Monitored::Scalar<int> cmxOverCmxSimNeData = Monitored::Scalar<int>("cmxOverCmxSimNeData", 0);
1159 
1160 
1162  CmxCpTobMap::const_iterator simMapIter = simMap.begin();
1163  CmxCpTobMap::const_iterator simMapIterEnd = simMap.end();
1164  CmxCpTobMap::const_iterator datMapIter = datMap.begin();
1165  CmxCpTobMap::const_iterator datMapIterEnd = datMap.end();
1166 
1167  while (simMapIter != simMapIterEnd || datMapIter != datMapIterEnd) {
1168 
1169  int simKey = 0;
1170  int datKey = 0;
1171  int simEnergy = 0;
1172  int simIsol = 0;
1173  int simOvf = 0;
1174  int datEnergy = 0;
1175  int datIsol = 0;
1176  int datOvf = 0;
1177 
1178  const xAOD::CMXCPTob *tob = 0;
1179  if (simMapIter != simMapIterEnd)
1180  simKey = simMapIter->first;
1181  if (datMapIter != datMapIterEnd)
1182  datKey = datMapIter->first;
1183 
1184  if ((datMapIter == datMapIterEnd) ||
1185  ((simMapIter != simMapIterEnd) && (datKey > simKey))) {
1186 
1187  // Simulated TOB but no data TOB
1188 
1189  tob = simMapIter->second;
1190  simEnergy = tob->energy();
1191  simIsol = tob->isolation();
1192  simOvf = (LVL1::DataError(tob->error())).get(LVL1::DataError::Overflow);
1193  ++simMapIter;
1194 
1195  } else if ((simMapIter == simMapIterEnd) ||
1196  ((datMapIter != datMapIterEnd) && (simKey > datKey))) {
1197 
1198  // Data TOB but no simulated TOB
1199 
1200  tob = datMapIter->second;
1201  datEnergy = tob->energy();
1202  datIsol = tob->isolation();
1203  datOvf = (LVL1::DataError(tob->error())).get(LVL1::DataError::Overflow);
1204  ++datMapIter;
1205 
1206  } else {
1207 
1208  // Have both
1209 
1210  const xAOD::CMXCPTob *tobS = simMapIter->second;
1211  tob = datMapIter->second;
1212  simEnergy = tobS->energy();
1213  simIsol = tobS->isolation();
1214  simOvf = (LVL1::DataError(tobS->error())).get(LVL1::DataError::Overflow);
1215  datEnergy = tob->energy();
1216  datIsol = tob->isolation();
1217  datOvf = (LVL1::DataError(tob->error())).get(LVL1::DataError::Overflow);
1218  ++simMapIter;
1219  ++datMapIter;
1220  }
1221 
1222  if (!simEnergy && !simIsol && !datEnergy && !datIsol)
1223  continue;
1224 
1225  // Check LimitedRoISet bit and ParityMerge bit
1226 
1227  const int crate = tob->crate();
1228  if (!simEnergy && !simIsol && limitedRoiSet(crate, rodTES))
1229  continue;
1230  const int cpm = tob->cpm();
1231  const int cmx = tob->cmx();
1232  if (!datEnergy && !datIsol) {
1233  const int index = (crate * m_cmxs + cmx) * m_modules + cpm - 1;
1234  if (parityMap[index])
1235  continue;
1236  }
1237 
1238  // Fill in error plots
1239 
1240  const int chip = tob->chip();
1241  const int loc = tob->location();
1242  const int locX = crate * m_modules + cpm - 1;
1243  const int locY = chip * 4 + loc;
1244  const int loc2 = crate * m_cmxs + cmx;
1245  const int cpmBins = m_crates * m_modules;
1246  const int cmxBins = m_crates * m_cmxs;
1247  const int bit = (1 << ((cmx) ? RightCMXTobMismatch : LeftCMXTobMismatch));
1248  const uint32_t roiWord = ((((((crate << 4) + cpm) << 4) + chip) << 2) + loc)
1249  << 18;
1251  decoder.coordinate(roiWord)); // hack till updated
1252  const double eta = coord.eta();
1253  const double phi = coord.phi();
1254 
1255  if (simEnergy || datEnergy) {
1256  if (simEnergy == datEnergy) {
1257  errorsCPM[locX] |= bit;
1258  errorsCMX[loc2] |= bit;
1259  if (cmx) {
1260  cmxRightEnerSimEqDataLocX=locX;
1261  cmxRightEnerSimEqDataLocY=locY;
1262  fill(m_packageName,cmxRightEnerSimEqDataLocX,cmxRightEnerSimEqDataLocY);
1263  } else {
1264  cmxLeftEnerSimEqDataLocX=locX;
1265  cmxLeftEnerSimEqDataLocY=locY;
1266  fill(m_packageName,cmxLeftEnerSimEqDataLocX,cmxLeftEnerSimEqDataLocY);
1267  }
1268  } else {
1269  errorsCPM[locX + cpmBins] |= bit;
1270  errorsCMX[loc2 + cmxBins] |= bit;
1271  if (simEnergy && datEnergy) {
1272  if (cmx) {
1273  cmxRightEnerSimNeDataLocX=locX;
1274  cmxRightEnerSimNeDataLocY=locY;
1275  fill(m_packageName,cmxRightEnerSimNeDataLocX,cmxRightEnerSimNeDataLocY);
1276  } else {
1277  cmxLeftEnerSimNeDataLocX=locX;
1278  cmxLeftEnerSimNeDataLocY=locY;
1279  fill(m_packageName,cmxLeftEnerSimNeDataLocX,cmxLeftEnerSimNeDataLocY);
1280  }
1281  } else if (simEnergy && !datEnergy) {
1282  if (cmx) {
1283  cmxRightEnerSimNoDataLocX=locX;
1284  cmxRightEnerSimNoDataLocY=locY;
1285  fill(m_packageName,cmxRightEnerSimNoDataLocX,cmxRightEnerSimNoDataLocY);
1286  } else {
1287  cmxLeftEnerSimNoDataLocX=locX;
1288  cmxLeftEnerSimNoDataLocY=locY;
1289  fill(m_packageName,cmxLeftEnerSimNoDataLocX,cmxLeftEnerSimNoDataLocY);
1290  }
1291  } else {
1292  if (cmx) {
1293  cmxRightEnerDataNoSimLocX=locX;
1294  cmxRightEnerDataNoSimLocY=locY;
1295  fill(m_packageName,cmxRightEnerDataNoSimLocX,cmxRightEnerDataNoSimLocY);
1296  } else {
1297  cmxLeftEnerDataNoSimLocX=locX;
1298  cmxLeftEnerDataNoSimLocY=locY;
1299  fill(m_packageName,cmxLeftEnerDataNoSimLocX,cmxLeftEnerDataNoSimLocY);
1300  }
1301  }
1302  }
1303  }
1304  if (simIsol || datIsol) {
1305  if (simIsol == datIsol) {
1306  errorsCPM[locX] |= bit;
1307  errorsCMX[loc2] |= bit;
1308  if (cmx) {
1309  cmxRightIsolSimEqDataLocX=locX;
1310  cmxRightIsolSimEqDataLocY=locY;
1311  fill(m_packageName,cmxRightIsolSimEqDataLocX,cmxRightIsolSimEqDataLocY);
1312  } else {
1313  cmxLeftIsolSimEqDataLocX=locX;
1314  cmxLeftIsolSimEqDataLocY=locY;
1315  fill(m_packageName,cmxLeftIsolSimEqDataLocX,cmxLeftIsolSimEqDataLocY);
1316  }
1317  } else {
1318  errorsCPM[locX + cpmBins] |= bit;
1319  errorsCMX[loc2 + cmxBins] |= bit;
1320  if (simIsol && datIsol) {
1321  if (cmx) {
1322  cmxRightIsolSimNeDataLocX=locX;
1323  cmxRightIsolSimNeDataLocY=locY;
1324  fill(m_packageName,cmxRightIsolSimNeDataLocX,cmxRightIsolSimNeDataLocY);
1325  } else {
1326  cmxLeftIsolSimNeDataLocX=locX;
1327  cmxLeftIsolSimNeDataLocY=locY;
1328  fill(m_packageName,cmxLeftIsolSimNeDataLocX,cmxLeftIsolSimNeDataLocY);
1329  }
1330  } else if (simIsol && !datIsol) {
1331  if (cmx) {
1332  cmxRightIsolSimNoDataLocX=locX;
1333  cmxRightIsolSimNoDataLocY=locY;
1334  fill(m_packageName,cmxRightIsolSimNoDataLocX,cmxRightIsolSimNoDataLocY);
1335  } else {
1336  cmxLeftIsolSimNoDataLocX=locX;
1337  cmxLeftIsolSimNoDataLocY=locY;
1338  fill(m_packageName,cmxLeftIsolSimNoDataLocX,cmxLeftIsolSimNoDataLocY);
1339  }
1340  } else {
1341  if (cmx) {
1342  cmxRightIsolDataNoSimLocX=locX;
1343  cmxRightIsolDataNoSimLocY=locY;
1344  fill(m_packageName,cmxRightIsolDataNoSimLocX,cmxRightIsolDataNoSimLocY);
1345  } else {
1346  cmxLeftIsolDataNoSimLocX=locX;
1347  cmxLeftIsolDataNoSimLocY=locY;
1348  fill(m_packageName,cmxLeftIsolDataNoSimLocX,cmxLeftIsolDataNoSimLocY);
1349  }
1350  }
1351  }
1352  }
1353  if (simOvf || datOvf) {
1354  if (simOvf == datOvf) {
1355  errorsCPM[locX] |= bit;
1356  errorsCMX[loc2] |= bit;
1357  cmxOverLocXSimEqData = locX;
1358  cmxOverCmxSimEqData = cmx;
1359  fill(m_packageName,cmxOverLocXSimEqData,cmxOverCmxSimEqData);
1360  } else {
1361  errorsCPM[locX + cpmBins] |= bit;
1362  errorsCMX[loc2 + cmxBins] |= bit;
1363  cmxOverLocXSimNeData = locX;
1364  cmxOverCmxSimNeData = cmx;
1365  fill(m_packageName,cmxOverLocXSimNeData,cmxOverCmxSimNeData);
1366  }
1367  }
1368  const double phiMod = phi * (32./M_PI) - 0.5;
1369  double etaMod = eta - 0.05;
1370  if (simEnergy == datEnergy && simIsol == datIsol) {
1371  cmxEtaSimEqData=etaMod;
1372  cmxPhiSimEqData=phiMod;
1373  fill(m_packageName,cmxEtaSimEqData,cmxPhiSimEqData);
1374  } else {
1375  if ((simEnergy || simIsol) && (datEnergy || datIsol)) {
1376  cmxEtaSimNeData=etaMod;
1377  cmxPhiSimNeData=phiMod;
1378  fill(m_packageName,cmxEtaSimNeData,cmxPhiSimNeData);
1379  } else if (!datEnergy && !datIsol) {
1380  cmxEtaSimNoData=etaMod;
1381  cmxPhiSimNoData=phiMod;
1382  fill(m_packageName,cmxEtaSimNoData,cmxPhiSimNoData);
1383  } else {
1384  cmxEtaDataNoSim=etaMod;
1385  cmxPhiDataNoSim=phiMod;
1386  fill(m_packageName,cmxEtaDataNoSim,cmxPhiDataNoSim);
1387  }
1388  }
1389  //
1390  }
1391 }

◆ compare() [3/3]

void CpmSimMonitorAlgorithm::compare ( const CpmTobRoiMap roiSimMap,
const CpmTobRoiMap roiMap,
ErrorVector errors,
const xAOD::RODHeaderContainer rodTES 
) const
private

Definition at line 834 of file CpmSimMonitorAlgorithm.cxx.

836  {
837 
838  ATH_MSG_DEBUG("Compare Simulated RoIs with data");
839 
841  CpmTobRoiMap::const_iterator simMapIter = roiSimMap.begin();
842  CpmTobRoiMap::const_iterator simMapIterEnd = roiSimMap.end();
843  CpmTobRoiMap::const_iterator datMapIter = roiMap.begin();
844  CpmTobRoiMap::const_iterator datMapIterEnd = roiMap.end();
845 
846  // scalars to fill bitwise histograms directly
847  Monitored::Scalar<int> emEnerSimEqDataLocX = Monitored::Scalar<int>("emEnerSimEqDataLocX", 0);
848  Monitored::Scalar<int> emEnerSimEqDataLocY = Monitored::Scalar<int>("emEnerSimEqDataLocY", 0);
849  Monitored::Scalar<int> tauEnerSimEqDataLocX = Monitored::Scalar<int>("tauEnerSimEqDataLocX", 0);
850  Monitored::Scalar<int> tauEnerSimEqDataLocY = Monitored::Scalar<int>("tauEnerSimEqDataLocY", 0);
851 
852  Monitored::Scalar<int> emEnerSimNeDataLocX = Monitored::Scalar<int>("emEnerSimNeDataLocX", 0);
853  Monitored::Scalar<int> emEnerSimNeDataLocY = Monitored::Scalar<int>("emEnerSimNeDataLocY", 0);
854  Monitored::Scalar<int> tauEnerSimNeDataLocX = Monitored::Scalar<int>("tauEnerSimNeDataLocX", 0);
855  Monitored::Scalar<int> tauEnerSimNeDataLocY = Monitored::Scalar<int>("tauEnerSimNeDataLocY", 0);
856 
857  Monitored::Scalar<int> emEnerDataNoSimLocX = Monitored::Scalar<int>("emEnerDataNoSimLocX", 0);
858  Monitored::Scalar<int> emEnerDataNoSimLocY = Monitored::Scalar<int>("emEnerDataNoSimLocY", 0);
859  Monitored::Scalar<int> tauEnerDataNoSimLocX = Monitored::Scalar<int>("tauEnerDataNoSimLocX", 0);
860  Monitored::Scalar<int> tauEnerDataNoSimLocY = Monitored::Scalar<int>("tauEnerDataNoSimLocY", 0);
861 
862  Monitored::Scalar<int> emEnerSimNoDataLocX = Monitored::Scalar<int>("emEnerSimNoDataLocX", 0);
863  Monitored::Scalar<int> emEnerSimNoDataLocY = Monitored::Scalar<int>("emEnerSimNoDataLocY", 0);
864  Monitored::Scalar<int> tauEnerSimNoDataLocX = Monitored::Scalar<int>("tauEnerSimNoDataLocX", 0);
865  Monitored::Scalar<int> tauEnerSimNoDataLocY = Monitored::Scalar<int>("tauEnerSimNoDataLocY", 0);
866 
867  Monitored::Scalar<int> emIsolSimEqDataLocX = Monitored::Scalar<int>("emIsolSimEqDataLocX", 0);
868  Monitored::Scalar<int> emIsolSimEqDataLocY = Monitored::Scalar<int>("emIsolSimEqDataLocY", 0);
869  Monitored::Scalar<int> tauIsolSimEqDataLocX = Monitored::Scalar<int>("tauIsolSimEqDataLocX", 0);
870  Monitored::Scalar<int> tauIsolSimEqDataLocY = Monitored::Scalar<int>("tauIsolSimEqDataLocY", 0);
871 
872  Monitored::Scalar<int> emIsolSimNeDataLocX = Monitored::Scalar<int>("emIsolSimNeDataLocX", 0);
873  Monitored::Scalar<int> emIsolSimNeDataLocY = Monitored::Scalar<int>("emIsolSimNeDataLocY", 0);
874  Monitored::Scalar<int> tauIsolSimNeDataLocX = Monitored::Scalar<int>("tauIsolSimNeDataLocX", 0);
875  Monitored::Scalar<int> tauIsolSimNeDataLocY = Monitored::Scalar<int>("tauIsolSimNeDataLocY", 0);
876 
877  Monitored::Scalar<int> emIsolDataNoSimLocX = Monitored::Scalar<int>("emIsolDataNoSimLocX", 0);
878  Monitored::Scalar<int> emIsolDataNoSimLocY = Monitored::Scalar<int>("emIsolDataNoSimLocY", 0);
879  Monitored::Scalar<int> tauIsolDataNoSimLocX = Monitored::Scalar<int>("tauIsolDataNoSimLocX", 0);
880  Monitored::Scalar<int> tauIsolDataNoSimLocY = Monitored::Scalar<int>("tauIsolDataNoSimLocY", 0);
881 
882  Monitored::Scalar<int> emIsolSimNoDataLocX = Monitored::Scalar<int>("emIsolSimNoDataLocX", 0);
883  Monitored::Scalar<int> emIsolSimNoDataLocY = Monitored::Scalar<int>("emIsolSimNoDataLocY", 0);
884  Monitored::Scalar<int> tauIsolSimNoDataLocX = Monitored::Scalar<int>("tauIsolSimNoDataLocX", 0);
885  Monitored::Scalar<int> tauIsolSimNoDataLocY = Monitored::Scalar<int>("tauIsolSimNoDataLocY", 0);
886 
887  Monitored::Scalar<float> roiEtaSimEqData = Monitored::Scalar<float>("roiEtaSimEqData", 0.);
888  Monitored::Scalar<float> roiPhiSimEqData = Monitored::Scalar<float>("roiPhiSimEqData", 0.);
889 
890  Monitored::Scalar<float> roiEtaSimNeData = Monitored::Scalar<float>("roiEtaSimNeData", 0.);
891  Monitored::Scalar<float> roiPhiSimNeData = Monitored::Scalar<float>("roiPhiSimNeData", 0.);
892 
893  Monitored::Scalar<float> roiEtaDataNoSim = Monitored::Scalar<float>("roiEtaDataNoSim", 0.);
894  Monitored::Scalar<float> roiPhiDataNoSim = Monitored::Scalar<float>("roiPhiDataNoSim", 0.);
895 
896  Monitored::Scalar<float> roiEtaSimNoData = Monitored::Scalar<float>("roiEtaSimNoData", 0.);
897  Monitored::Scalar<float> roiPhiSimNoData = Monitored::Scalar<float>("roiPhiSimNoData", 0.);
898 
899  while (simMapIter != simMapIterEnd || datMapIter != datMapIterEnd) {
900 
901  int simKey = 0;
902  int datKey = 0;
903  unsigned int simEnergy = 0;
904  unsigned int datEnergy = 0;
905  unsigned int simIsol = 0;
906  unsigned int datIsol = 0;
907  const xAOD::CPMTobRoI *roi = 0;
908 
909  if (simMapIter != simMapIterEnd)
910  simKey = simMapIter->first;
911  if (datMapIter != datMapIterEnd)
912  datKey = datMapIter->first;
913 
914  if ((datMapIter == datMapIterEnd) ||
915  ((simMapIter != simMapIterEnd) && (datKey > simKey))) {
916 
917  // Simulated RoI but no data RoI
918 
919  roi = simMapIter->second;
920  simEnergy = roi->energy();
921  simIsol = roi->isolation();
922  ++simMapIter;
923 
924  } else if ((simMapIter == simMapIterEnd) ||
925  ((datMapIter != datMapIterEnd) && (simKey > datKey))) {
926 
927  // Data RoI but no simulated RoI
928 
929  roi = datMapIter->second;
930  datEnergy = roi->energy();
931  datIsol = roi->isolation();
932  ++datMapIter;
933 
934  } else {
935 
936  // Have both
937 
938  const xAOD::CPMTobRoI *roiS = simMapIter->second;
939  roi = datMapIter->second;
940  simEnergy = roiS->energy();
941  simIsol = roiS->isolation();
942  datEnergy = roi->energy();
943  datIsol = roi->isolation();
944  ++simMapIter;
945  ++datMapIter;
946  }
947 
948  if (!simEnergy && !simIsol && !datEnergy && !datIsol)
949  continue;
950 
951  // Check LimitedRoISet bit
952 
953  const int crate = roi->crate();
954  if (!datEnergy && !datIsol && limitedRoiSet(crate,rodTES))
955  continue;
956 
957  // Fill in error plots
958 
959  const int cpm = roi->cpm();
960  const int chip = roi->chip();
961  const int local = roi->location();
962  const int type = roi->type();
963  const int locX = crate * m_modules + cpm - 1;
964  const int locY = chip * 8 + local;
965  const int cpmBins = m_crates * m_modules;
966  const int bit = (1 << ((type) ? TauRoIMismatch : EMRoIMismatch));
968  decoder.coordinate((roi->roiWord()))
969  ); // hack till updated
970  const double eta = coord.eta();
971  const double phi = coord.phi();
972 
973  if (simEnergy || datEnergy) {
974  if (simEnergy == datEnergy) {
975  errors[locX] |= bit;
976  if (type) {
977  tauEnerSimEqDataLocX=locX;
978  tauEnerSimEqDataLocY=locY;
979  fill(m_packageName,tauEnerSimEqDataLocX,tauEnerSimEqDataLocY);
980  } else {
981  emEnerSimEqDataLocX=locX;
982  emEnerSimEqDataLocY=locY;
983  fill(m_packageName,emEnerSimEqDataLocX,emEnerSimEqDataLocY);
984  }
985  } else {
986  errors[locX + cpmBins] |= bit;
987  if (simEnergy && datEnergy) {
988  if (type) {
989  tauEnerSimNeDataLocX=locX;
990  tauEnerSimNeDataLocY=locY;
991  fill(m_packageName,tauEnerSimNeDataLocX,tauEnerSimNeDataLocY);
992  } else {
993  emEnerSimNeDataLocX=locX;
994  emEnerSimNeDataLocY=locY;
995  fill(m_packageName,emEnerSimNeDataLocX,emEnerSimNeDataLocY);
996  }
997  } else if (simEnergy && !datEnergy) {
998  if (type) {
999  tauEnerSimNoDataLocX=locX;
1000  tauEnerSimNoDataLocY=locY;
1001  fill(m_packageName,tauEnerSimNoDataLocX,tauEnerSimNoDataLocY);
1002  } else {
1003  emEnerSimNoDataLocX=locX;
1004  emEnerSimNoDataLocY=locY;
1005  fill(m_packageName,emEnerSimNoDataLocX,emEnerSimNoDataLocY);
1006  }
1007  } else {
1008  if (type) {
1009  tauEnerDataNoSimLocX=locX;
1010  tauEnerDataNoSimLocY=locY;
1011  fill(m_packageName,tauEnerDataNoSimLocX,tauEnerDataNoSimLocY);
1012  } else {
1013  emEnerDataNoSimLocX=locX;
1014  emEnerDataNoSimLocY=locY;
1015  fill(m_packageName,emEnerDataNoSimLocX,emEnerDataNoSimLocY);
1016  }
1017  }
1018  }
1019  }
1020  if (simIsol || datIsol) {
1021  if (simIsol == datIsol) {
1022  errors[locX] |= bit;
1023  if (type) {
1024  tauIsolSimEqDataLocX=locX;
1025  tauIsolSimEqDataLocY=locY;
1026  fill(m_packageName,tauIsolSimEqDataLocX,tauIsolSimEqDataLocY);
1027  } else {
1028  emIsolSimEqDataLocX=locX;
1029  emIsolSimEqDataLocY=locY;
1030  fill(m_packageName,emIsolSimEqDataLocX,emIsolSimEqDataLocY);
1031  }
1032 
1033  } else {
1034  errors[locX + cpmBins] |= bit;
1035  if (simIsol && datIsol) {
1036  if (type) {
1037  tauIsolSimNeDataLocX=locX;
1038  tauIsolSimNeDataLocY=locY;
1039  fill(m_packageName,tauIsolSimNeDataLocX,tauIsolSimNeDataLocY);
1040  } else {
1041  emIsolSimNeDataLocX=locX;
1042  emIsolSimNeDataLocY=locY;
1043  fill(m_packageName,emIsolSimNeDataLocX,emIsolSimNeDataLocY);
1044  }
1045  } else if (simIsol && !datIsol) {
1046  if (type) {
1047  tauIsolSimNoDataLocX=locX;
1048  tauIsolSimNoDataLocY=locY;
1049  fill(m_packageName,tauIsolSimNoDataLocX,tauIsolSimNoDataLocY);
1050  } else {
1051  emIsolSimNoDataLocX=locX;
1052  emIsolSimNoDataLocY=locY;
1053  fill(m_packageName,emIsolSimNoDataLocX,emIsolSimNoDataLocY);
1054  }
1055  } else {
1056  if (type) {
1057  tauIsolDataNoSimLocX=locX;
1058  tauIsolDataNoSimLocY=locY;
1059  fill(m_packageName,tauIsolDataNoSimLocX,tauIsolDataNoSimLocY);
1060  } else {
1061  emIsolDataNoSimLocX=locX;
1062  emIsolDataNoSimLocY=locY;
1063  fill(m_packageName,emIsolDataNoSimLocX,emIsolDataNoSimLocY);
1064  }
1065  }
1066  }
1067  }
1068  const double phiMod = (phi * (32./M_PI)) - 0.5;
1069  double etaMod = eta - 0.05;
1070  if (simEnergy == datEnergy && simIsol == datIsol) {
1071  roiEtaSimEqData=etaMod;
1072  roiPhiSimEqData=phiMod;
1073  fill(m_packageName,roiEtaSimEqData,roiPhiSimEqData);
1074  } else {
1075  if ((simEnergy || simIsol) && (datEnergy || datIsol)) {
1076  roiEtaSimNeData=etaMod;
1077  roiPhiSimNeData=phiMod;
1078  fill(m_packageName,roiEtaSimNeData,roiPhiSimNeData);
1079  } else if (!datEnergy && !datIsol) {
1080  roiEtaSimNoData=etaMod;
1081  roiPhiSimNoData=phiMod;
1082  fill(m_packageName,roiEtaSimNoData,roiPhiSimNoData);
1083  } else {
1084  roiEtaDataNoSim=etaMod;
1085  roiPhiDataNoSim=phiMod;
1086  fill(m_packageName,roiEtaDataNoSim,roiPhiDataNoSim);
1087  }
1088  }
1089  } // end of iteration
1090 }

◆ compareEm()

bool CpmSimMonitorAlgorithm::compareEm ( const TriggerTowerMapEm ttMap,
const CpmTowerMap cpMap,
ErrorVector errors,
bool  overlap 
) const
private

Definition at line 387 of file CpmSimMonitorAlgorithm.cxx.

389  {
390 
391  ATH_MSG_DEBUG("Compare Trigger Towers and CPM Towers");
392 
393  Monitored::Scalar<float> eta_em_PpmEqCor = Monitored::Scalar<float>("eta_em_PpmEqCor", 0.);
394  Monitored::Scalar<float> phi_em_PpmEqCor = Monitored::Scalar<float>("phi_em_PpmEqCor", 0.);
395 
396  Monitored::Scalar<float> eta_em_PpmNeCor = Monitored::Scalar<float>("eta_em_PpmNeCor", 0.);
397  Monitored::Scalar<float> phi_em_PpmNeCor = Monitored::Scalar<float>("phi_em_PpmNeCor", 0.);
398 
399  Monitored::Scalar<float> eta_em_PpmNoCor = Monitored::Scalar<float>("eta_em_PpmNoCor", 0.);
400  Monitored::Scalar<float> phi_em_PpmNoCor = Monitored::Scalar<float>("phi_em_PpmNoCor", 0.);
401 
402  Monitored::Scalar<float> eta_em_CoreNoPpm = Monitored::Scalar<float>("eta_em_CoreNoPpm", 0.);
403  Monitored::Scalar<float> phi_em_CoreNoPpm = Monitored::Scalar<float>("phi_em_CoreNoPpm", 0.);
404 
405  //
406  Monitored::Scalar<float> eta_em_PpmEqOverlap = Monitored::Scalar<float>("eta_em_PpmEqOverlap", 0.);
407  Monitored::Scalar<float> phi_em_PpmEqOverlap = Monitored::Scalar<float>("phi_em_PpmEqOverlap", 0.);
408 
409  Monitored::Scalar<float> eta_em_PpmNeOverlap = Monitored::Scalar<float>("eta_em_PpmNeOverlap", 0.);
410  Monitored::Scalar<float> phi_em_PpmNeOverlap = Monitored::Scalar<float>("phi_em_PpmNeOverlap", 0.);
411 
412  Monitored::Scalar<float> eta_em_PpmNoOverlap = Monitored::Scalar<float>("eta_em_PpmNoOverlap", 0.);
413  Monitored::Scalar<float> phi_em_PpmNoOverlap = Monitored::Scalar<float>("phi_em_PpmNoOverlap", 0.);
414 
415  Monitored::Scalar<float> eta_em_OverlapNoPpm = Monitored::Scalar<float>("eta_em_OverlapNoPpm", 0.);
416  Monitored::Scalar<float> phi_em_OverlapNoPpm = Monitored::Scalar<float>("phi_em_OverlapNoPpm", 0.);
417 
418  //
419  Monitored::Scalar<int> loc_PpmEqCpmFpga = Monitored::Scalar<int>("loc_PpmEqCpmFpga", 0.);
420  Monitored::Scalar<int> loc_fpga_PpmEqCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmEqCpmFpga", 0.);
421 
422  Monitored::Scalar<int> loc_PpmNeCpmFpga = Monitored::Scalar<int>("loc_PpmNeCpmFpga", 0.);
423  Monitored::Scalar<int> loc_fpga_PpmNeCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmNeCpmFpga", 0.);
424 
425  Monitored::Scalar<int> loc_PpmNoCpmFpga = Monitored::Scalar<int>("loc_PpmNoCpmFpga", 0.);
426  Monitored::Scalar<int> loc_fpga_PpmNoCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmNoCpmFpga", 0.);
427 
428  Monitored::Scalar<int> loc_CpmNoPpmFpga = Monitored::Scalar<int>("loc_CpmNoPpmFpga", 0.);
429  Monitored::Scalar<int> loc_fpga_CpmNoPpmFpga = Monitored::Scalar<int>("loc_fpga_CpmNoPpmFpga", 0.);
430 
431  bool mismatch = false;
432  LVL1::CoordToHardware converter;
433  TriggerTowerMapEm::const_iterator ttMapIter = ttMap.begin();
434  TriggerTowerMapEm::const_iterator ttMapIterEnd = ttMap.end();
435  CpmTowerMap::const_iterator cpMapIter = cpMap.begin();
436  CpmTowerMap::const_iterator cpMapIterEnd = cpMap.end();
437 
438  while (ttMapIter != ttMapIterEnd || cpMapIter != cpMapIterEnd) {
439 
440  int ttKey = 0;
441  int cpKey = 0;
442  int ttEm = 0;
443  int cpEm = 0;
444  double eta = 0.;
445  double phi = 0.;
446  int key = 0;
447 
448  if (ttMapIter != ttMapIterEnd)
449  ttKey = ttMapIter->first;
450  if (cpMapIter != cpMapIterEnd)
451  cpKey = cpMapIter->first;
452 
453  if ((cpMapIter == cpMapIterEnd) ||
454  ((ttMapIter != ttMapIterEnd) && (cpKey > ttKey))) {
455 
456  // TriggerTower but no CPMTower
457 
458  const xAOD::TriggerTower *tt = ttMapIter->second;
459  ++ttMapIter;
460  const int layer = tt->layer();
461  eta = tt->eta();
462  phi = tt->phi();
463  if (overlap) { // skip non-overlap TTs
464  const LVL1::Coordinate coord(phi, eta);
465  const int crate = converter.cpCrateOverlap(coord);
466  if (crate >= m_crates)
467  continue;
468  }
469  // check if the TriggerTower is in EM or HAD layer
470  if (layer == 0) { // EM
471  ttEm = tt->cpET();
472  }
473  key = ttKey;
474 
475  } else if ((ttMapIter == ttMapIterEnd) ||
476  ((cpMapIter != cpMapIterEnd) && (ttKey > cpKey))) {
477 
478  // CPMTower but no TriggerTower
479 
480  const xAOD::CPMTower *cp = cpMapIter->second;
481  ++cpMapIter;
482  eta = cp->eta();
483  phi = cp->phi();
484  cpEm = cp->emEnergy();
485  key = cpKey;
486 
487  } else {
488 
489  // Have both
490 
491  const xAOD::TriggerTower *tt = ttMapIter->second;
492  const xAOD::CPMTower *cp = cpMapIter->second;
493  ++ttMapIter;
494  ++cpMapIter;
495  const int layer = tt->layer();
496  eta = tt->eta();
497  phi = tt->phi();
498  // check if the TriggerTower is in EM or HAD layer
499  if (layer == 0) { // EM
500  ttEm = tt->cpET();
501  ;
502  }
503  cpEm = cp->emEnergy();
504  key = ttKey;
505  }
506 
507  if (!ttEm && !cpEm)
508  continue;
509 
510  // Fill in error plots
511  const LVL1::Coordinate coord(phi, eta);
512  const int crate =
513  (overlap) ? converter.cpCrateOverlap(coord) : converter.cpCrate(coord);
514  const int cpm = (overlap) ? converter.cpModuleOverlap(coord)
515  : converter.cpModule(coord);
516  if (crate >= m_crates || cpm > m_modules)
517  continue;
518  const int loc = crate * m_modules + cpm - 1;
519  const int cpmBins = m_crates * m_modules;
520  const int bitEm = (1 << EMTowerMismatch);
521  double phiFPGA = phi;
522  if (overlap) {
523  const double twoPi = 2. * M_PI;
524  const double piByFour = M_PI / 4.;
525  if (phi > 7. * piByFour)
526  phiFPGA -= twoPi;
527  else if (phi < piByFour)
528  phiFPGA += twoPi;
529  }
530  const int loc2 = fpga(crate, phiFPGA);
531 
532  const double phiMod = phi * (32./M_PI);
533 
534  if (ttEm && ttEm == cpEm) { // non-zero match
535  errors[loc] |= bitEm;
536  if (overlap) {
537  eta_em_PpmEqOverlap=eta;
538  phi_em_PpmEqOverlap=phiMod;
539  fill(m_packageName,eta_em_PpmEqOverlap,phi_em_PpmEqOverlap);
540  } else {
541  eta_em_PpmEqCor=eta;
542  phi_em_PpmEqCor=phiMod;
543  fill(m_packageName,eta_em_PpmEqCor,phi_em_PpmEqCor);
544  }
545  loc_PpmEqCpmFpga=loc;
546  loc_fpga_PpmEqCpmFpga=loc2;
547  fill(m_packageName,loc_PpmEqCpmFpga,loc_fpga_PpmEqCpmFpga);
548 
549  } else if (ttEm != cpEm) { // mis-match
550  mismatch = true;
551  errors[loc + cpmBins] |= bitEm;
552  if (ttEm && cpEm) { // non-zero mis-match
553  if (overlap) {
554  eta_em_PpmNeOverlap=eta;
555  phi_em_PpmNeOverlap=phiMod;
556  fill(m_packageName,eta_em_PpmNeOverlap,phi_em_PpmNeOverlap);
557  } else {
558  eta_em_PpmNeCor=eta;
559  phi_em_PpmNeCor=phiMod;
560  fill(m_packageName,eta_em_PpmNeCor,phi_em_PpmNeCor);
561  }
562  loc_PpmNeCpmFpga=loc;
563  loc_fpga_PpmNeCpmFpga=loc2;
564  fill(m_packageName,loc_PpmNeCpmFpga,loc_fpga_PpmNeCpmFpga);
565 
566  } else if (!cpEm) { // no cp
567  if (overlap) {
568  eta_em_PpmNoOverlap=eta;
569  phi_em_PpmNoOverlap=phiMod;
570  fill(m_packageName,eta_em_PpmNoOverlap,phi_em_PpmNoOverlap);
571  } else {
572  eta_em_PpmNoCor=eta;
573  phi_em_PpmNoCor=phiMod;
574  fill(m_packageName,eta_em_PpmNoCor,phi_em_PpmNoCor);
575  }
576  loc_PpmNoCpmFpga=loc;
577  loc_fpga_PpmNoCpmFpga=loc2;
578  fill(m_packageName,loc_PpmNoCpmFpga,loc_fpga_PpmNoCpmFpga);
579 
580  } else { // no tt
581  if (overlap) {
582  //
583  eta_em_OverlapNoPpm=eta;
584  phi_em_OverlapNoPpm=phiMod;
585  fill(m_packageName,eta_em_OverlapNoPpm,phi_em_OverlapNoPpm);
586  } else {
587  eta_em_OverlapNoPpm=eta;
588  phi_em_OverlapNoPpm=phiMod;
589  fill(m_packageName,eta_em_OverlapNoPpm,phi_em_OverlapNoPpm);
590  }
591  loc_CpmNoPpmFpga=loc;
592  loc_fpga_CpmNoPpmFpga=loc2;
593  fill(m_packageName,loc_CpmNoPpmFpga,loc_fpga_CpmNoPpmFpga);
594 
595  }
596  ATH_MSG_DEBUG(" EMTowerMismatch key/eta/phi/crate/cpm/tt/cp: "
597  << key << "/" << eta << "/" << phi << "/" << crate
598  << "/" << cpm << "/" << ttEm << "/" << cpEm);
599  }
600  }
601 
602  return mismatch;
603 }

◆ compareHad()

bool CpmSimMonitorAlgorithm::compareHad ( const TriggerTowerMapHad ttMap,
const CpmTowerMap cpMap,
ErrorVector errors,
bool  overlap 
) const
private

Definition at line 605 of file CpmSimMonitorAlgorithm.cxx.

607  {
608 
609  ATH_MSG_DEBUG("Compare Trigger Towers and CPM Towers");
610 
611 
612  //
613  Monitored::Scalar<float> eta_had_PpmEqCor = Monitored::Scalar<float>("eta_had_PpmEqCor", 0.);
614  Monitored::Scalar<float> phi_had_PpmEqCor = Monitored::Scalar<float>("phi_had_PpmEqCor", 0.);
615 
616  Monitored::Scalar<float> eta_had_PpmNeCor = Monitored::Scalar<float>("eta_had_PpmNeCor", 0.);
617  Monitored::Scalar<float> phi_had_PpmNeCor = Monitored::Scalar<float>("phi_had_PpmNeCor", 0.);
618 
619  Monitored::Scalar<float> eta_had_PpmNoCor = Monitored::Scalar<float>("eta_had_PpmNoCor", 0.);
620  Monitored::Scalar<float> phi_had_PpmNoCor = Monitored::Scalar<float>("phi_had_PpmNoCor", 0.);
621 
622  Monitored::Scalar<float> eta_had_CoreNoPpm = Monitored::Scalar<float>("eta_had_CoreNoPpm", 0.);
623  Monitored::Scalar<float> phi_had_CoreNoPpm = Monitored::Scalar<float>("phi_had_CoreNoPpm", 0.);
624 
625  //
626  Monitored::Scalar<float> eta_had_PpmEqOverlap = Monitored::Scalar<float>("eta_had_PpmEqOverlap", 0.);
627  Monitored::Scalar<float> phi_had_PpmEqOverlap = Monitored::Scalar<float>("phi_had_PpmEqOverlap", 0.);
628 
629  Monitored::Scalar<float> eta_had_PpmNeOverlap = Monitored::Scalar<float>("eta_had_PpmNeOverlap", 0.);
630  Monitored::Scalar<float> phi_had_PpmNeOverlap = Monitored::Scalar<float>("phi_had_PpmNeOverlap", 0.);
631 
632  Monitored::Scalar<float> eta_had_PpmNoOverlap = Monitored::Scalar<float>("eta_had_PpmNoOverlap", 0.);
633  Monitored::Scalar<float> phi_had_PpmNoOverlap = Monitored::Scalar<float>("phi_had_PpmNoOverlap", 0.);
634 
635  Monitored::Scalar<float> eta_had_OverlapNoPpm = Monitored::Scalar<float>("eta_had_OverlapNoPpm", 0.);
636  Monitored::Scalar<float> phi_had_OverlapNoPpm = Monitored::Scalar<float>("phi_had_OverlapNoPpm", 0.);
637 
638  //
639  Monitored::Scalar<int> loc_PpmEqCpmFpga = Monitored::Scalar<int>("loc_PpmEqCpmFpga", 0.);
640  Monitored::Scalar<int> loc_fpga_PpmEqCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmEqCpmFpga", 0.);
641 
642  Monitored::Scalar<int> loc_PpmNeCpmFpga = Monitored::Scalar<int>("loc_PpmNeCpmFpga", 0.);
643  Monitored::Scalar<int> loc_fpga_PpmNeCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmNeCpmFpga", 0.);
644 
645  Monitored::Scalar<int> loc_PpmNoCpmFpga = Monitored::Scalar<int>("loc_PpmNoCpmFpga", 0.);
646  Monitored::Scalar<int> loc_fpga_PpmNoCpmFpga = Monitored::Scalar<int>("loc_fpga_PpmNoCpmFpga", 0.);
647 
648  Monitored::Scalar<int> loc_CpmNoPpmFpga = Monitored::Scalar<int>("loc_CpmNoPpmFpga", 0.);
649  Monitored::Scalar<int> loc_fpga_CpmNoPpmFpga = Monitored::Scalar<int>("loc_fpga_CpmNoPpmFpga", 0.);
650 
651  bool mismatch = false;
652  LVL1::CoordToHardware converter;
653  TriggerTowerMapHad::const_iterator ttMapIter = ttMap.begin();
654  TriggerTowerMapHad::const_iterator ttMapIterEnd = ttMap.end();
655  CpmTowerMap::const_iterator cpMapIter = cpMap.begin();
656  CpmTowerMap::const_iterator cpMapIterEnd = cpMap.end();
657 
658  while (ttMapIter != ttMapIterEnd || cpMapIter != cpMapIterEnd) {
659 
660  int ttKey = 0;
661  int cpKey = 0;
662  int ttHad = 0;
663  int cpHad = 0;
664  double eta = 0.;
665  double phi = 0.;
666  int key = 0;
667 
668  if (ttMapIter != ttMapIterEnd)
669  ttKey = ttMapIter->first;
670  if (cpMapIter != cpMapIterEnd)
671  cpKey = cpMapIter->first;
672 
673  if ((cpMapIter == cpMapIterEnd) ||
674  ((ttMapIter != ttMapIterEnd) && (cpKey > ttKey))) {
675 
676  // TriggerTower but no CPMTower
677 
678  const xAOD::TriggerTower *tt = ttMapIter->second;
679  ++ttMapIter;
680  const int layer = tt->layer();
681  eta = tt->eta();
682  phi = tt->phi();
683  if (overlap) { // skip non-overlap TTs
684  const LVL1::Coordinate coord(phi, eta);
685  const int crate = converter.cpCrateOverlap(coord);
686  if (crate >= m_crates)
687  continue;
688  }
689  // check if the TriggerTower is in EM or HAD layer
690  if (layer == 1) { // HAD
692  ttHad = 0;
693  }else{
694  ttHad = tt->cpET();
695  }
696  }
697  key = ttKey;
698 
699  } else if ((ttMapIter == ttMapIterEnd) ||
700  ((cpMapIter != cpMapIterEnd) && (ttKey > cpKey))) {
701 
702  // CPMTower but no TriggerTower
703 
704  const xAOD::CPMTower *cp = cpMapIter->second;
705  ++cpMapIter;
706  eta = cp->eta();
707  phi = cp->phi();
708  cpHad = cp->hadEnergy();
709  key = cpKey;
710 
711  } else {
712 
713  // Have both
714 
715  const xAOD::TriggerTower *tt = ttMapIter->second;
716  const xAOD::CPMTower *cp = cpMapIter->second;
717  ++ttMapIter;
718  ++cpMapIter;
719  const int layer = tt->layer();
720  eta = tt->eta();
721  phi = tt->phi();
722  // check if the TriggerTower is in EM or HAD layer
723  if (layer == 1) { // HAD
725  ttHad = 0;
726  }else{
727  ttHad = tt->cpET();
728  }
729  }
730  cpHad = cp->hadEnergy();
731  key = ttKey;
732  }
733 
734  if (!ttHad && !cpHad)
735  continue;
736 
737  // Fill in error plots
738  const LVL1::Coordinate coord(phi, eta);
739  const int crate =
740  (overlap) ? converter.cpCrateOverlap(coord) : converter.cpCrate(coord);
741  const int cpm = (overlap) ? converter.cpModuleOverlap(coord)
742  : converter.cpModule(coord);
743  if (crate >= m_crates || cpm > m_modules)
744  continue;
745  const int loc = crate * m_modules + cpm - 1;
746  const int cpmBins = m_crates * m_modules;
747  const int bitHad = (1 << HadTowerMismatch);
748  double phiFPGA = phi;
749  if (overlap) {
750  const double twoPi = 2. * M_PI;
751  const double piByFour = M_PI / 4.;
752  if (phi > 7. * piByFour)
753  phiFPGA -= twoPi;
754  else if (phi < piByFour)
755  phiFPGA += twoPi;
756  }
757  const int loc2 = fpga(crate, phiFPGA);
758  const int loc2Mod = loc2+1;
759 
760  const double phiMod = phi * (32./M_PI);
761  if (ttHad && ttHad == cpHad) { // non-zero match
762  errors[loc] |= bitHad;
763  if (overlap) {
764  eta_had_PpmEqOverlap=eta;
765  phi_had_PpmEqOverlap=phiMod;
766  fill(m_packageName,eta_had_PpmEqOverlap,phi_had_PpmEqOverlap);
767  } else {
768  eta_had_PpmEqCor=eta;
769  phi_had_PpmEqCor=phiMod;
770  fill(m_packageName,eta_had_PpmEqCor,phi_had_PpmEqCor);
771  }
772  loc_PpmEqCpmFpga=loc;
773  loc_fpga_PpmEqCpmFpga=loc2Mod;
774  fill(m_packageName,loc_PpmEqCpmFpga,loc_fpga_PpmEqCpmFpga);
775 
776 
777  } else if (ttHad != cpHad) { // mis-match
778  mismatch = true;
779  errors[loc + cpmBins] |= bitHad;
780  if (ttHad && cpHad) { // non-zero mis-match
781  if (overlap) {
782  eta_had_PpmNeOverlap=eta;
783  phi_had_PpmNeOverlap=phiMod;
784  fill(m_packageName,eta_had_PpmNeOverlap,phi_had_PpmNeOverlap);
785  } else {
786  eta_had_PpmNeCor=eta;
787  phi_had_PpmNeCor=phiMod;
788  fill(m_packageName,eta_had_PpmNeCor,phi_had_PpmNeCor);
789  }
790  loc_PpmNeCpmFpga=loc;
791  loc_fpga_PpmNeCpmFpga=loc2Mod;
792  fill(m_packageName,loc_PpmNeCpmFpga,loc_fpga_PpmNeCpmFpga);
793  } else if (!cpHad) { // no cp
794  if (overlap) {
795  eta_had_PpmNoOverlap=eta;
796  phi_had_PpmNoOverlap=phiMod;
797  fill(m_packageName,eta_had_PpmNoOverlap,phi_had_PpmNoOverlap);
798  } else {
799  eta_had_PpmNoCor=eta;
800  phi_had_PpmNoCor=phiMod;
801  fill(m_packageName,eta_had_PpmNoCor,phi_had_PpmNoCor);
802  }
803  loc_PpmNoCpmFpga=loc;
804  loc_fpga_PpmNoCpmFpga=loc2Mod;
805  fill(m_packageName,loc_PpmNoCpmFpga,loc_fpga_PpmNoCpmFpga);
806 
807  } else { // no tt
808  if (overlap) {
809  eta_had_OverlapNoPpm=eta;
810  phi_had_OverlapNoPpm=phiMod;
811  fill(m_packageName,eta_had_OverlapNoPpm,phi_had_OverlapNoPpm);
812  } else {
813  eta_had_OverlapNoPpm=eta;
814  phi_had_OverlapNoPpm=phiMod;
815  fill(m_packageName,eta_had_OverlapNoPpm,phi_had_OverlapNoPpm);
816  }
817  loc_CpmNoPpmFpga=loc;
818  loc_fpga_CpmNoPpmFpga=loc2Mod;
819  fill(m_packageName,loc_CpmNoPpmFpga,loc_fpga_CpmNoPpmFpga);
820  }
821 
822  ATH_MSG_DEBUG(" HadTowerMismatch key/eta/phi/crate/cpm/tt/cp: "
823  << key << "/" << eta << "/" << phi << "/" << crate
824  << "/" << cpm << "/" << ttHad << "/" << cpHad);
825 
826  }
827  }
828 
829  return mismatch;
830 }

◆ 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 > &  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 > &  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 > &  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 > &  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 > &  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 & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 79 of file AthReentrantAlgorithm.cxx.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ fillHistograms()

StatusCode CpmSimMonitorAlgorithm::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 59 of file CpmSimMonitorAlgorithm.cxx.

59  {
60 
61 
62  ATH_MSG_DEBUG("CpmSimMonitorAlgorithm::fillHistograms");
63 
64  std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> variables;
65 
66  // to deal with trigger menu
67  if (not m_configSvc.empty()) {
68  ATH_CHECK(m_configSvc.retrieve());
69  }
70 
71  //Retrieve Trigger Towers from SG
73  ATH_CHECK(triggerTowerTES.isValid());
74 
75  // Retrieve Core CPM Towers from SG
77  ATH_CHECK(cpmTowerTES.isValid());
78 
79  // Retrieve Overlap CPM Towers from SG
81  ATH_CHECK(cpmTowerOvTES.isValid());
82 
83  // Retrieve CPM TOB RoIs from SG
85  ATH_CHECK(cpmRoiTES.isValid());
86 
87  // Retrieve ROD Headers from SG
89  ATH_CHECK(rodTES.isValid());
90 
91  // Retrieve CMX-CP TOBs from SG
93  ATH_CHECK(cmxCpTobTES.isValid());
94 
95  // Retrieve CMX-CP Hits from SG
97  ATH_CHECK(cmxCpHitsTES.isValid());
98 
99  // Maps to simplify comparisons
100  TriggerTowerMapEm ttMapEm;
101  TriggerTowerMapEm ttMapHad;
102  CpmTowerMap cpMap;
103  CpmTowerMap ovMap;
104  CpmTobRoiMap crMap;
105  CmxCpTobMap cbMap;
106  CmxCpHitsMap cmMap;
107 
108  const xAOD::TriggerTowerContainer* triggerTowerTESptr = triggerTowerTES.cptr();
109  ATH_CHECK(setupMap(triggerTowerTESptr, ttMapEm, ttMapHad));
110 
111  const xAOD::CPMTowerContainer* cpmTowerTESptr = cpmTowerTES.cptr();
112  ATH_CHECK(setupMap(cpmTowerTESptr, cpMap));
113 
114  const xAOD::CPMTowerContainer* cpmTowerOvTESptr = cpmTowerOvTES.cptr();
115  ATH_CHECK(setupMap(cpmTowerOvTESptr, ovMap));
116 
117  const xAOD::CPMTobRoIContainer* cpmRoiTESptr = cpmRoiTES.cptr();
118  ATH_CHECK(setupMap(cpmRoiTESptr, crMap));
119  std::vector<int> parityMap(m_crates * m_cmxs * m_modules);
120 
121  const xAOD::CMXCPTobContainer* cmxCpTobTESptr=cmxCpTobTES.cptr();
122  ATH_CHECK(setupMap(cmxCpTobTESptr, cbMap, &parityMap));
123 
124  const xAOD::CMXCPHitsContainer* cmxCpHitsTESptr=cmxCpHitsTES.cptr();
125  ATH_CHECK(setupMap(cmxCpHitsTESptr, cmMap));
126 
127  // Vectors for error overview bits;
128  const int vecsizeCpm = 2 * m_crates * m_modules;
129  const int vecsizeCmx = 2 * m_crates * m_cmxs;
130  ErrorVector errorsCPM(vecsizeCpm);
131  ErrorVector errorsCMX(vecsizeCmx);
132 
133  // Compare Trigger Towers and CPM Towers from data
134  bool overlap = false;
135  bool mismatchCoreEm = false;
136  bool mismatchCoreHad = false;
137  bool mismatchOverlapEm = false;
138  bool mismatchOverlapHad = false;
139 
140  mismatchCoreEm = compareEm(ttMapEm, cpMap, errorsCPM, overlap);
141  mismatchCoreHad = compareHad(ttMapHad, cpMap, errorsCPM, overlap);
142  if (m_overlapPresent) {
143  overlap = true;
144  mismatchOverlapEm = compareEm(ttMapEm, ovMap, errorsCPM, overlap);
145  mismatchOverlapHad = compareHad(ttMapHad, ovMap, errorsCPM, overlap);
146  }
147 
148  // Compare RoIs simulated from CPM Towers with CPM RoIs from data
149 
150 
151  std::unique_ptr<xAOD::CPMTobRoIContainer> cpmRoiSIM = std::make_unique<xAOD::CPMTobRoIContainer>();
152  std::unique_ptr<xAOD::CPMTobRoIAuxContainer> cpmRoiSIMAux = std::make_unique<xAOD::CPMTobRoIAuxContainer>();
153 
154  cpmRoiSIM.get()->setStore(cpmRoiSIMAux.get());
155  if (mismatchCoreEm || mismatchCoreHad || mismatchOverlapEm ||
156  mismatchOverlapHad) {
157  simulate(&cpMap, &ovMap, cpmRoiSIM.get(), ctx);
158  } else {
159  simulate(&cpMap, cpmRoiSIM.get(), ctx);
160  }
161 
162  CpmTobRoiMap crSimMap;
163  ATH_CHECK(setupMap(cpmRoiSIM.get(), crSimMap));
164  const xAOD::RODHeaderContainer* rodTESptr = rodTES.cptr();
165  compare(crSimMap, crMap, errorsCPM, rodTESptr);
166  crSimMap.clear();
167 
168  // Compare CMX-CP TOBs simulated from CPM RoIs with CMX-CP TOBs from data
169 
170  std::unique_ptr<xAOD::CMXCPTobContainer> cmxCpTobSIM = std::make_unique<xAOD::CMXCPTobContainer>();
171  std::unique_ptr<xAOD::CMXCPTobAuxContainer> cmxCpTobSIMAux = std::make_unique<xAOD::CMXCPTobAuxContainer>();
172 
173  cmxCpTobSIM.get()->setStore(cmxCpTobSIMAux.get());
174  simulate(cpmRoiTESptr, cmxCpTobSIM.get());
175 
176  CmxCpTobMap cbSimMap;
177  ATH_CHECK(setupMap(cmxCpTobSIM.get(), cbSimMap));
178  compare(cbSimMap, cbMap, parityMap, errorsCPM, errorsCMX, rodTESptr);
179  cbSimMap.clear();
180 
181  // Compare Local sums simulated from CMX-CP TOBs with Local sums from data
182 
183  std::unique_ptr<xAOD::CMXCPHitsContainer> cmxLocalSIM = std::make_unique<xAOD::CMXCPHitsContainer>();
184  std::unique_ptr<xAOD::CMXCPHitsAuxContainer> cmxLocalSIMAux = std::make_unique<xAOD::CMXCPHitsAuxContainer>();
185  cmxLocalSIM.get()->setStore(cmxLocalSIMAux.get());
186  simulate(cmxCpTobTESptr, cmxLocalSIM.get(), xAOD::CMXCPHits::LOCAL,ctx);
187 
188  CmxCpHitsMap cmxLocalSimMap;
189  ATH_CHECK(setupMap(cmxLocalSIM.get(), cmxLocalSimMap));
190  compare(cmxLocalSimMap, cmMap, errorsCMX, xAOD::CMXCPHits::LOCAL);
191  cmxLocalSimMap.clear();
192 
193  // Compare Local sums with Remote sums from data
194 
195  compare(cmMap, cmMap, errorsCMX, xAOD::CMXCPHits::REMOTE_0);
196 
197  // Compare Total sums simulated from Remote sums with Total sums from data
198 
199 
200  std::unique_ptr<xAOD::CMXCPHitsContainer> cmxTotalSIM = std::make_unique<xAOD::CMXCPHitsContainer>();
201  std::unique_ptr<xAOD::CMXCPHitsAuxContainer> cmxTotalSIMAux = std::make_unique<xAOD::CMXCPHitsAuxContainer>();
202 
203  cmxTotalSIM->setStore(cmxTotalSIMAux.get());
204  simulate(cmxCpHitsTESptr, cmxTotalSIM.get());
205 
206  CmxCpHitsMap cmxTotalSimMap;
207  ATH_CHECK(setupMap(cmxTotalSIM.get(), cmxTotalSimMap));
208  compare(cmxTotalSimMap, cmMap, errorsCMX, xAOD::CMXCPHits::TOTAL);
209  cmxTotalSimMap.clear();
210 
211  // Compare Topo output information simulated from CMX-CP TOBs with Topo info
212  // from data
213 
214  std::unique_ptr<xAOD::CMXCPHitsContainer> cmxTopoSIM = std::make_unique<xAOD::CMXCPHitsContainer>();
215  std::unique_ptr<xAOD::CMXCPHitsAuxContainer> cmxTopoSIMAux = std::make_unique<xAOD::CMXCPHitsAuxContainer>();
216  cmxTopoSIM.get()->setStore(cmxTopoSIMAux.get());
217  simulate(cmxCpTobTESptr, cmxTopoSIM.get(), xAOD::CMXCPHits::TOPO_CHECKSUM, ctx);
218 
219  CmxCpHitsMap cmxTopoSimMap;
220  ATH_CHECK(setupMap(cmxTopoSIM.get(), cmxTopoSimMap));
221  compare(cmxTopoSimMap, cmMap, errorsCMX, xAOD::CMXCPHits::TOPO_CHECKSUM);
222  cmxTopoSimMap.clear();
223 
224  // Update error summary plots
225  Monitored::Scalar<int> cpmErrorLoc = Monitored::Scalar<int>("cpmErrorLoc", 0);
226  Monitored::Scalar<int> cpmError = Monitored::Scalar<int>("cpmError", 0);
227  Monitored::Scalar<int> cpmErrorLoc_SimNeData = Monitored::Scalar<int>("cpmErrorLoc_SimNeData", 0);
228  Monitored::Scalar<int> cpmError_SimNeData = Monitored::Scalar<int>("cpmError_SimNeData", 0);
229  Monitored::Scalar<int> cpmErrorSummary = Monitored::Scalar<int>("cpmErrorSummary", 0);
230  // event numbers
231  Monitored::Scalar<int> em_tt_y = Monitored::Scalar<int>("em_tt_y", 0);
232  Monitored::Scalar<int> had_tt_y = Monitored::Scalar<int>("had_tt_y", 0);
233  Monitored::Scalar<int> em_roi_y = Monitored::Scalar<int>("em_roi_y", 0);
234  Monitored::Scalar<int> tau_roi_y = Monitored::Scalar<int>("tau_roi_y", 0);
235  Monitored::Scalar<int> cmx_tob_left_y = Monitored::Scalar<int>("cmx_tob_left_y", 0);
236  Monitored::Scalar<int> cmx_tob_right_y = Monitored::Scalar<int>("cmx_tob_right_y", 0);
237  Monitored::Scalar<int> cmx_thresh_y = Monitored::Scalar<int>("cmx_thresh_y", 0);
238 
239  // set maximum number of error events per lumiblock(per type) to avoid histograms with many x-bins
240  const int maxErrorsPerLB=10;
241  bool error_tt{false}, error_roi{false}, error_tob{false}, error_thresh{false};
242  auto lb = GetEventInfo(ctx)->lumiBlock();
243  //
244  ErrorVector crateErr(m_crates);
245  const int cpmBins = m_crates * m_modules;
246  const int cmxBins = m_crates * m_cmxs;
247 
248  for (int err = 0; err < NumberOfSummaryBins; ++err) {
249  int error = 0;
250  for (int loc = 0; loc < cpmBins; ++loc) {
251  if ((errorsCPM[loc] >> err) & 0x1) {
252  cpmErrorLoc=loc;
253  cpmError=err;
254  fill(m_packageName,cpmErrorLoc,cpmError);
255  }
256  const long long eventNumber = ctx.eventID().event_number();
257  if ((errorsCPM[loc + cpmBins] >> err) & 0x1) {
258  cpmErrorLoc_SimNeData=loc;
259  cpmError_SimNeData=err;
260  fill(m_packageName,cpmErrorLoc_SimNeData,cpmError_SimNeData);
261  error = 1;
262  crateErr[loc / m_modules] |= (1 << err);
263  if (err<7) {
264  if (err==0 || err==1) {
265  // scope for mutable error event per lumi block tt counter
266  {
267  std::lock_guard<std::mutex> lock(m_mutex);
268  if (!error_tt) {
269  m_errorLB_tt_counter[lb]+=1;
270  error_tt = true;
271  }
272  if (m_errorLB_tt_counter[lb]<=maxErrorsPerLB) {
273  if (err==0) {
274  auto em_tt_evtstr = Monitored::Scalar<std::string>("em_tt_evtstr", std::to_string(eventNumber));
275  em_tt_y=loc;
276  fill(m_packageName,em_tt_evtstr,em_tt_y);
277  } else {
278  auto had_tt_evtstr = Monitored::Scalar<std::string>("had_tt_evtstr", std::to_string(eventNumber));
279  had_tt_y=loc;
280  fill(m_packageName,had_tt_evtstr,had_tt_y);
281  }
282  }
283  }
284  } else if (err==2 || err==3) {
285  // scope for mutable error event per lumi block roi counter
286  {
287  std::lock_guard<std::mutex> lock(m_mutex);
288  if (!error_roi) {
289  m_errorLB_roi_counter[lb]+=1;
290  error_roi = true;
291  }
292  if (m_errorLB_roi_counter[lb]<=maxErrorsPerLB) {
293  if (err==2) {
294  auto em_roi_evtstr = Monitored::Scalar<std::string>("em_roi_evtstr", std::to_string(eventNumber));
295  em_roi_y=loc;
296  fill(m_packageName,em_roi_evtstr,em_roi_y);
297  } else {
298  auto tau_roi_evtstr = Monitored::Scalar<std::string>("tau_roi_evtstr", std::to_string(eventNumber));
299  tau_roi_y=loc;
300  fill(m_packageName,tau_roi_evtstr,tau_roi_y);
301  }
302  }
303  }
304  } else if (err==4 || err==5) {
305  // scope for mutable error event per lumi block tob counter
306  {
307  std::lock_guard<std::mutex> lock(m_mutex);
308  if (!error_tob) {
309  m_errorLB_tob_counter[lb]+=1;
310  error_tob = true;
311  }
312  if(m_errorLB_tob_counter[lb]<=maxErrorsPerLB) {
313  if (err==4) {
314  auto cmx_tob_left_evtstr = Monitored::Scalar<std::string>("cmx_tob_left_evtstr", std::to_string(eventNumber));
315  cmx_tob_left_y=loc;
316  fill(m_packageName,cmx_tob_left_evtstr,cmx_tob_left_y);
317  } else {
318  auto cmx_tob_right_evtstr = Monitored::Scalar<std::string>("cmx_tob_right_evtstr", std::to_string(eventNumber));
319  cmx_tob_right_y=loc;
320  fill(m_packageName,cmx_tob_right_evtstr,cmx_tob_right_y);
321  }
322  }
323  }
324  }
325  } // err<7
326  }
327  if (loc < cmxBins) {
328  if ((errorsCMX[loc] >> err) & 0x1) {
329  cpmErrorLoc=loc+cpmBins;
330  cpmError=err;
331  fill(m_packageName,cpmErrorLoc,cpmError);
332  }
333  if ((errorsCMX[loc + cmxBins] >> err) & 0x1) {
334  cpmErrorLoc_SimNeData=loc+cpmBins;
335  cpmError_SimNeData=err;
336  fill(m_packageName,cpmErrorLoc_SimNeData,cpmError_SimNeData);
337  //
338  error = 1;
339  crateErr[loc / m_cmxs] |= (1 << err);
340  int offset = 0;
342  offset = 8;
343  else if (err == TopoMismatch) {
344  offset = 16;
345  }
346 
347  // scope for mutable error event per lumi block threshold counter
348  {
349  std::lock_guard<std::mutex> lock(m_mutex);
350  if (!error_thresh) {
351  m_errorLB_thresh_counter[lb]+=1;
352  error_thresh = true;
353  }
354  if(m_errorLB_thresh_counter[lb]<=maxErrorsPerLB) {
355  auto cmx_thresh_evtstr = Monitored::Scalar<std::string>("cmx_thresh_evtstr", std::to_string(eventNumber));
356  cmx_thresh_y=loc+offset;
357  fill(m_packageName,cmx_thresh_evtstr,cmx_thresh_y);
358  }
359  }
360  }
361  }
362  }
363  if (error) {
364  cpmErrorSummary=err;
365  fill(m_packageName,cpmErrorSummary);
366  }
367  } // summary bins
368 
369  //
370  // Save error vector for global summary
371  {
372  auto save = std::make_unique<ErrorVector>(crateErr);
373  auto* result = SG::makeHandle(m_errorLocation, ctx).put(std::move(save));
374  if (!result) {
375  ATH_MSG_ERROR("Error recording CPM mismatch vector in TES");
376  return StatusCode::FAILURE;
377  }
378  }
379 
380 
382  variables.clear();
383 
384  return StatusCode::SUCCESS;
385 }

◆ fillXVsThresholds()

void CpmSimMonitorAlgorithm::fillXVsThresholds ( Monitored::Scalar< int > &  xitem,
Monitored::Scalar< int > &  yitem,
Monitored::Scalar< int > &  witem,
int  x,
int  val,
int  nThresh,
int  nBits,
int  offset = 0 
) const
private

Definition at line 1714 of file CpmSimMonitorAlgorithm.cxx.

1718 {
1719  if (val) {
1720  const int mask = (1 << nBits) - 1;
1721  for (int thr = 0; thr < nThresh; ++thr) {
1722  const int hit = (val >> (nBits*thr)) & mask;
1723  if (hit) {
1724  xitem=x;
1725  yitem=thr+offset;
1726  witem=hit;
1727  fill(m_packageName, xitem, yitem, witem);
1728  }
1729  }
1730  }
1731 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ fpga()

int CpmSimMonitorAlgorithm::fpga ( int  crate,
double  phi 
) const
private

Definition at line 1980 of file CpmSimMonitorAlgorithm.cxx.

1980  {
1981  const double phiGran = M_PI / 32.;
1982  const double phiBase = M_PI / 2. * double(crate);
1983  const int phiBin = int(floor((phi - phiBase) / phiGran)) + 2;
1984  return 2 * (phiBin / 2);
1985 }

◆ 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  if (!isInitialized()) {
173  "It seems that the AthMonitorAlgorithm::initialize was not called "
174  "in derived class initialize method");
175  } else {
176  std::string available = std::accumulate(
177  m_toolLookupMap.begin(), m_toolLookupMap.end(), std::string(""),
178  [](const std::string& s, auto h) { return s + "," + h.first; });
179  ATH_MSG_FATAL("The tool " << name << " could not be found in the tool array of the "
180  << "monitoring algorithm " << m_name << ". This probably reflects a discrepancy between "
181  << "your python configuration and c++ filling code. Note: your available groups are {"
182  << available << "}.");
183  }
184  }
185  return m_dummy;
186 }

◆ getL1Menu()

const TrigConf::L1Menu * CpmSimMonitorAlgorithm::getL1Menu ( const EventContext &  ctx) const
private

Definition at line 2051 of file CpmSimMonitorAlgorithm.cxx.

2051  {
2052  const TrigConf::L1Menu* menu = nullptr;
2053  if (detStore()->contains<TrigConf::L1Menu>(m_L1MenuKey.key())) {
2055  if( l1MenuHandle.isValid() ){
2056  menu=l1MenuHandle.cptr();
2057  }
2058  } else {
2059  menu = &(m_configSvc->l1Menu(ctx));
2060  }
2061 
2062  return menu;
2063 }

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

189  {
190  return m_trigDecTool;
191 }

◆ initialize()

StatusCode CpmSimMonitorAlgorithm::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 18 of file CpmSimMonitorAlgorithm.cxx.

18  {
19 
20  ATH_MSG_DEBUG("CpmSimMonitorAlgorith::initialize");
21  ATH_MSG_DEBUG("Package Name "<< m_packageName);
22 
23  // Container names
24  ATH_MSG_DEBUG("m_TriggerTowerLocation"<< m_triggerTowerLocation);
25  ATH_MSG_DEBUG("m_cpmTowerLocation"<< m_cpmTowerLocation);
26  ATH_MSG_DEBUG("m_cpmTowerLocationOverlap"<< m_cpmTowerLocationOverlap);
27  ATH_MSG_DEBUG("m_cpmTobRoiLocation"<< m_cpmTobRoiLocation);
28 
29  // Initialise all the readhandles that are needed
30  ATH_CHECK(m_triggerTowerLocation.initialize());
31  ATH_CHECK(m_cpmTowerLocation.initialize());
33  ATH_CHECK(m_cpmTobRoiLocation.initialize());
34  ATH_CHECK(m_rodHeaderLocation.initialize());
35  ATH_CHECK(m_cmxCpTobLocation.initialize());
36  ATH_CHECK(m_cmxCpHitsLocation.initialize());
37 
39 
41  renounce(m_L1MenuKey); // Detector Store data - hide this Data Dependency from the MT Scheduler
42 
43  // retrieve any tools if needed
44  ATH_CHECK(m_cpCmxTool.retrieve());
45  ATH_CHECK(m_cpmTool.retrieve());
46  ATH_CHECK(m_errorTool.retrieve());
47 
48  // steering parameters
49  ATH_MSG_DEBUG("m_crates"<<m_crates );
50  ATH_MSG_DEBUG("m_modules"<<m_modules );
51  ATH_MSG_DEBUG("m_maxSlices"<<m_maxSlices );
52  ATH_MSG_DEBUG("m_cmxs"<<m_cmxs );
53  ATH_MSG_DEBUG("m_legacyCpHadInputsDisabled"<<m_legacyCpHadInputsDisabled );
54 
55 
57 }

◆ 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 AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ limitedRoiSet() [1/2]

bool CpmSimMonitorAlgorithm::limitedRoiSet ( int  crate,
const xAOD::RODHeaderContainer rodTES 
) const
private

Definition at line 2017 of file CpmSimMonitorAlgorithm.cxx.

2017  {
2018 
2019  int limitedRoi = 0;
2020  xAOD::RODHeaderContainer::const_iterator rodIter = rodTES->begin();
2021  xAOD::RODHeaderContainer::const_iterator rodIterE = rodTES->end();
2022  for (; rodIter != rodIterE; ++rodIter) {
2023  const xAOD::RODHeader *rod = *rodIter;
2024  const int rodCrate = rod->crate() - 8;
2025  if (rodCrate >= 0 && rodCrate < m_crates && rod->dataType() == 1 &&
2026  rod->limitedRoISet()) {
2027  limitedRoi |= (1 << rodCrate);
2028  }
2029  }
2030  return (((limitedRoi >> crate) & 0x1) == 1);
2031 }

◆ limitedRoiSet() [2/2]

bool CpmSimMonitorAlgorithm::limitedRoiSet ( int  crate,
SG::ReadHandle< xAOD::RODHeaderContainer > &  rodTES 
) const
private

Definition at line 2033 of file CpmSimMonitorAlgorithm.cxx.

2033  {
2034 
2035  int limitedRoi = 0;
2036  xAOD::RODHeaderContainer::const_iterator rodIter = (*rodTES).begin();
2037  xAOD::RODHeaderContainer::const_iterator rodIterE = (*rodTES).end();
2038  for (; rodIter != rodIterE; ++rodIter) {
2039  const xAOD::RODHeader *rod = *rodIter;
2040  const int rodCrate = rod->crate() - 8;
2041  if (rodCrate >= 0 && rodCrate < m_crates && rod->dataType() == 1 &&
2042  rod->limitedRoISet()) {
2043  limitedRoi |= (1 << rodCrate);
2044  }
2045  }
2046  return (((limitedRoi >> crate) & 0x1) == 1);
2047 }

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

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

◆ 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 AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ setupMap() [1/5]

StatusCode CpmSimMonitorAlgorithm::setupMap ( const xAOD::CMXCPHitsContainer coll,
CmxCpHitsMap map 
) const
private

Definition at line 1868 of file CpmSimMonitorAlgorithm.cxx.

1869  {
1872  for (; pos != posE; ++pos) {
1873  const int crate = (*pos)->crate();
1874  const int cmx = (*pos)->cmx();
1875  const int source = (*pos)->sourceComponent();
1876  const int key = (crate * 2 + cmx) * 8 + source;
1877  map.insert(std::make_pair(key, *pos));
1878  }
1879  return StatusCode::SUCCESS;
1880 }

◆ setupMap() [2/5]

StatusCode CpmSimMonitorAlgorithm::setupMap ( const xAOD::CMXCPTobContainer coll,
CmxCpTobMap map,
std::vector< int > *  parityMap = 0 
) const
private

Definition at line 1840 of file CpmSimMonitorAlgorithm.cxx.

1841  {
1842 
1845  for (; pos != posE; ++pos) {
1846  const int crate = (*pos)->crate();
1847  const int cpm = (*pos)->cpm();
1848  const int cmx = (*pos)->cmx();
1849  const int chip = (*pos)->chip();
1850  const int loc = (*pos)->location();
1851  const int key =
1852  (((((((crate << 1) | cmx) << 4) | cpm) << 4) | chip) << 2) | loc;
1853  map.insert(std::make_pair(key, *pos));
1854  if (parityMap) {
1855  LVL1::DataError err((*pos)->error());
1856  const int parity = err.get(LVL1::DataError::ParityMerge);
1857  if (parity) {
1858  const int index = (crate * m_cmxs + cmx) * m_modules + cpm - 1;
1859  (*parityMap)[index] = parity;
1860  }
1861  }
1862  }
1863  return StatusCode::SUCCESS;
1864 }

◆ setupMap() [3/5]

StatusCode CpmSimMonitorAlgorithm::setupMap ( const xAOD::CPMTobRoIContainer coll,
CpmTobRoiMap map 
) const
private

Definition at line 1819 of file CpmSimMonitorAlgorithm.cxx.

1820  {
1821  if (coll) {
1824  for (; pos != posE; ++pos) {
1825  const int crate = (*pos)->crate();
1826  const int cpm = (*pos)->cpm();
1827  const int chip = (*pos)->chip();
1828  const int loc = (*pos)->location();
1829  const int type = (*pos)->type();
1830  const int key =
1831  (((((((type << 2) | crate) << 4) | cpm) << 3) | chip) << 3) | loc;
1832  map.insert(std::make_pair(key, *pos));
1833  }
1834  }
1835  return StatusCode::SUCCESS;
1836 }

◆ setupMap() [4/5]

StatusCode CpmSimMonitorAlgorithm::setupMap ( const xAOD::CPMTowerContainer coll,
CpmTowerMap map 
) const
private

Definition at line 1802 of file CpmSimMonitorAlgorithm.cxx.

1802  {
1803 
1804  LVL1::TriggerTowerKey towerKey;
1807  for (; pos != posE; ++pos) {
1808  CpmTowerMap::mapped_type cp = (*pos);
1809  const double eta = (*pos)->eta();
1810  const double phi = (*pos)->phi();
1811  const int key = towerKey.ttKey(phi, eta);
1812  map.insert(std::make_pair(key, cp));
1813  }
1814  return StatusCode::SUCCESS;
1815 }

◆ setupMap() [5/5]

StatusCode CpmSimMonitorAlgorithm::setupMap ( const xAOD::TriggerTowerContainer coll,
TriggerTowerMapEm emmap,
TriggerTowerMapHad hadmap 
) const
private

Definition at line 1767 of file CpmSimMonitorAlgorithm.cxx.

1769  {
1770 
1771  LVL1::TriggerTowerKey towerKey;
1774  int emE = 0;
1775  int hadE = 0;
1776  for (; pos != posE; ++pos) {
1777  const xAOD::TriggerTower *tt = (*pos);
1778  const int layer = (*pos)->layer();
1779  if (layer == 0)
1780  emE = (*pos)->cpET();
1781  ;
1782  if (layer == 1)
1783  hadE = (*pos)->cpET();
1784  ;
1785  const double eta = (*pos)->eta();
1786  if (eta > -2.5 && eta < 2.5 && (emE > 0 || hadE > 0)) {
1787  const double phi = (*pos)->phi();
1788  const int key = towerKey.ttKey(phi, eta);
1789  if (emE > 0)
1790  mapEm.insert(std::make_pair(key, tt));
1791  if (hadE > 0)
1792  mapHad.insert(std::make_pair(key, tt));
1793  }
1794  }
1795 
1796  return StatusCode::SUCCESS;
1797 }

◆ simulate() [1/5]

void CpmSimMonitorAlgorithm::simulate ( const CpmTowerMap towers,
const CpmTowerMap towersOv,
xAOD::CPMTobRoIContainer rois,
const EventContext &  ctx 
) const
private

Definition at line 1884 of file CpmSimMonitorAlgorithm.cxx.

1885  {
1886 
1887  ATH_MSG_DEBUG("Simulate CPM TOB RoIs from CPM Towers");
1888 
1889  // Process a crate at a time to use overlap data
1890  std::vector<CpmTowerMap> crateMaps(m_crates);
1891  LVL1::CoordToHardware converter;
1892  std::unique_ptr<xAOD::CPMTowerContainer> tempColl = std::make_unique<xAOD::CPMTowerContainer>();
1893  std::unique_ptr<xAOD::CPMTowerAuxContainer> tempCollAux = std::make_unique<xAOD::CPMTowerAuxContainer>();
1894 
1895  tempColl.get()->setStore(tempCollAux.get());
1896  for (const auto& iter : *towers) {
1897  CpmTowerMap::mapped_type tt = ttCheck(iter.second, tempColl.get());
1898  const LVL1::Coordinate coord(tt->phi(), tt->eta());
1899  const int crate = converter.cpCrate(coord);
1900  if (crate >= m_crates)
1901  continue;
1902  crateMaps[crate].insert(std::make_pair(iter.first, tt));
1903  }
1904  // If overlap data not present take from core data
1905  for (const auto& iter : ((m_overlapPresent) ? *towersOv : *towers)) {
1906  CpmTowerMap::mapped_type tt = ttCheck(iter.second, tempColl.get());
1907  const LVL1::Coordinate coord(tt->phi(), tt->eta());
1908  const int crate = converter.cpCrateOverlap(coord);
1909  if (crate >= m_crates)
1910  continue;
1911  crateMaps[crate].insert(std::make_pair(iter.first, tt));
1912  }
1913 
1914  for (int crate = 0; crate < m_crates; ++crate) {
1915  xAOD::CPMTobRoIContainer *roiTemp =
1917 
1918  m_cpmTool->findCPMTobRoIs(getL1Menu(ctx), towers, roiTemp, 1);
1919 
1920  xAOD::CPMTobRoIContainer::iterator roiIter = roiTemp->begin();
1921  xAOD::CPMTobRoIContainer::iterator roiIterE = roiTemp->end();
1922  for (; roiIter != roiIterE; ++roiIter) {
1923  if ((*roiIter)->crate() == crate) {
1924  rois->push_back(*roiIter);
1925  }
1926  }
1927  delete roiTemp;
1928  }
1929 }

◆ simulate() [2/5]

void CpmSimMonitorAlgorithm::simulate ( const CpmTowerMap towers,
xAOD::CPMTobRoIContainer rois,
const EventContext &  ctx 
) const
private

Definition at line 1933 of file CpmSimMonitorAlgorithm.cxx.

1934  {
1935 
1936  ATH_MSG_DEBUG("Simulate CPM TOB RoIs from CPM Towers");
1937 
1938  m_cpmTool->findCPMTobRoIs(getL1Menu(ctx), towers, rois, 1);
1939 }

◆ simulate() [3/5]

void CpmSimMonitorAlgorithm::simulate ( const xAOD::CMXCPHitsContainer hitsIn,
xAOD::CMXCPHitsContainer hitsOut 
) const
private

◆ simulate() [4/5]

void CpmSimMonitorAlgorithm::simulate ( const xAOD::CMXCPTobContainer tobs,
xAOD::CMXCPHitsContainer hits,
int  selection,
const EventContext &  ctx 
) const
private

Definition at line 1953 of file CpmSimMonitorAlgorithm.cxx.

1956  {
1957 
1958  ATH_MSG_DEBUG("Simulate CMX Hit sums from CMX TOBs");
1959 
1960 
1962  m_cpCmxTool->formCMXCPHitsCrate(getL1Menu(ctx), tobs, hits);
1963  } else if (selection == xAOD::CMXCPHits::TOPO_CHECKSUM) {
1964  m_cpCmxTool->formCMXCPHitsTopo(tobs, hits);
1965  }
1966 
1967 }

◆ simulate() [5/5]

void CpmSimMonitorAlgorithm::simulate ( const xAOD::CPMTobRoIContainer rois,
xAOD::CMXCPTobContainer tobs 
) const
private

Definition at line 1943 of file CpmSimMonitorAlgorithm.cxx.

1944  {
1945 
1946  ATH_MSG_DEBUG("Simulate CMX TOBs from CPM TOB RoIs");
1947 
1948  m_cpCmxTool->formCMXCPTob(rois, tobs);
1949 }

◆ sysExecute()

StatusCode AthReentrantAlgorithm::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 67 of file AthReentrantAlgorithm.cxx.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ sysInitialize()

StatusCode AthReentrantAlgorithm::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 96 of file AthReentrantAlgorithm.cxx.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

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

◆ thresholdsDiff()

int CpmSimMonitorAlgorithm::thresholdsDiff ( int  val1,
int  val2,
int  nThresh,
int  nBits 
) const
private

Definition at line 1750 of file CpmSimMonitorAlgorithm.cxx.

1752 {
1753  int result = 0;
1754  const int mask = (1 << nBits) - 1;
1755  for (int thr = 0; thr < nThresh; ++thr) {
1756  const int hit1 = (val1 >> (nBits*thr)) & mask;
1757  const int hit2 = (val2 >> (nBits*thr)) & mask;
1758  if (hit1 != hit2) result |= (1 << thr);
1759  }
1760  return result;
1761 }

◆ thresholdsSame()

int CpmSimMonitorAlgorithm::thresholdsSame ( int  val1,
int  val2,
int  nThresh,
int  nBits 
) const
private

Definition at line 1735 of file CpmSimMonitorAlgorithm.cxx.

1737 {
1738  int result = 0;
1739  const int mask = (1 << nBits) - 1;
1740  for (int thr = 0; thr < nThresh; ++thr) {
1741  const int hit1 = (val1 >> (nBits*thr)) & mask;
1742  const int hit2 = (val2 >> (nBits*thr)) & mask;
1743  if (hit1 && (hit1 == hit2)) result |= (1 << thr);
1744  }
1745  return result;
1746 }

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

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

◆ ttCheck()

CpmSimMonitorAlgorithm::CpmTowerMap::mapped_type CpmSimMonitorAlgorithm::ttCheck ( CpmTowerMap::mapped_type  tt,
xAOD::CPMTowerContainer coll 
) const
private

Definition at line 1991 of file CpmSimMonitorAlgorithm.cxx.

1992 {
1993  const LVL1::DataError emError(tt->emError());
1994  const LVL1::DataError hadError(tt->hadError());
1995  const int emParity = emError.get(LVL1::DataError::Parity);
1996  const int hadParity = hadError.get(LVL1::DataError::Parity);
1997  if ((emParity && tt->emEnergy()) || (hadParity && tt->hadEnergy())) {
1998  const int peak = tt->peak();
1999  std::vector<uint8_t> emEnergyVec(tt->emEnergyVec());
2000  std::vector<uint8_t> hadEnergyVec(tt->hadEnergyVec());
2001  std::vector<uint32_t> emErrorVec(tt->emErrorVec());
2002  std::vector<uint32_t> hadErrorVec(tt->hadErrorVec());
2003  if (emParity)
2004  emEnergyVec[peak] = 0;
2005  if (hadParity)
2006  hadEnergyVec[peak] = 0;
2007  xAOD::CPMTower *ct = new xAOD::CPMTower();
2008  ct->makePrivateStore();
2009  ct->initialize(tt->eta(), tt->phi(), emEnergyVec, hadEnergyVec, emErrorVec,
2010  hadErrorVec, peak);
2011  coll->push_back(ct);
2012  return ct;
2013  }
2014  return tt;
2015 }

◆ 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

◆ ATLAS_THREAD_SAFE [1/4]

std::map<uint32_t, int> m_errorLB_tt_counter CpmSimMonitorAlgorithm::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 182 of file CpmSimMonitorAlgorithm.h.

◆ ATLAS_THREAD_SAFE [2/4]

std::map<uint32_t, int> m_errorLB_roi_counter CpmSimMonitorAlgorithm::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 183 of file CpmSimMonitorAlgorithm.h.

◆ ATLAS_THREAD_SAFE [3/4]

std::map<uint32_t, int> m_errorLB_tob_counter CpmSimMonitorAlgorithm::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 184 of file CpmSimMonitorAlgorithm.h.

◆ ATLAS_THREAD_SAFE [4/4]

std::map<uint32_t, int> m_errorLB_thresh_counter CpmSimMonitorAlgorithm::ATLAS_THREAD_SAFE
mutableprivate

Definition at line 185 of file CpmSimMonitorAlgorithm.h.

◆ cfg

CpmSimMonitorAlgorithm.cfg

Definition at line 515 of file CpmSimMonitorAlgorithm.py.

◆ CpmSimMonitorCfg

CpmSimMonitorAlgorithm.CpmSimMonitorCfg

Definition at line 518 of file CpmSimMonitorAlgorithm.py.

◆ False

CpmSimMonitorAlgorithm.False

Definition at line 524 of file CpmSimMonitorAlgorithm.py.

◆ Files

CpmSimMonitorAlgorithm.Files

Definition at line 507 of file CpmSimMonitorAlgorithm.py.

◆ flags

CpmSimMonitorAlgorithm.flags

Definition at line 506 of file CpmSimMonitorAlgorithm.py.

◆ HISTFileName

CpmSimMonitorAlgorithm.HISTFileName

Definition at line 508 of file CpmSimMonitorAlgorithm.py.

◆ inputs

CpmSimMonitorAlgorithm.inputs

Definition at line 504 of file CpmSimMonitorAlgorithm.py.

◆ m_cmxCpHitsLocation

SG::ReadHandleKey<xAOD::CMXCPHitsContainer> CpmSimMonitorAlgorithm::m_cmxCpHitsLocation {this, "CMXCPHitsLocation", LVL1::TrigT1CaloDefs::CMXCPHitsLocation, "CMX CP Hits container"}
private

Definition at line 80 of file CpmSimMonitorAlgorithm.h.

◆ m_cmxCpTobLocation

SG::ReadHandleKey<xAOD::CMXCPTobContainer> CpmSimMonitorAlgorithm::m_cmxCpTobLocation {this, "CMXCPTobLocation", LVL1::TrigT1CaloDefs::CMXCPTobLocation, "CMX CP Tob container"}
private

Definition at line 79 of file CpmSimMonitorAlgorithm.h.

◆ m_cmxs

Gaudi::Property<int> CpmSimMonitorAlgorithm::m_cmxs {this,"s_cmxs", 2, "Number of CMXs"}
private

Definition at line 59 of file CpmSimMonitorAlgorithm.h.

◆ m_configSvc

ServiceHandle<TrigConf::ITrigConfigSvc> CpmSimMonitorAlgorithm::m_configSvc {this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc"}
private

Definition at line 48 of file CpmSimMonitorAlgorithm.h.

◆ m_cpCmxTool

ToolHandle<LVL1::IL1CPCMXTools> CpmSimMonitorAlgorithm::m_cpCmxTool
private

Definition at line 87 of file CpmSimMonitorAlgorithm.h.

◆ m_cpmTobRoiLocation

SG::ReadHandleKey<xAOD::CPMTobRoIContainer> CpmSimMonitorAlgorithm::m_cpmTobRoiLocation {this, "CPMTobRoILocation", LVL1::TrigT1CaloDefs::CPMTobRoILocation, "CPM RoI container"}
private

Definition at line 78 of file CpmSimMonitorAlgorithm.h.

◆ m_cpmTool

ToolHandle<LVL1::IL1CPMTools> CpmSimMonitorAlgorithm::m_cpmTool
private

Definition at line 89 of file CpmSimMonitorAlgorithm.h.

◆ m_cpmTowerLocation

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

Definition at line 76 of file CpmSimMonitorAlgorithm.h.

◆ m_cpmTowerLocationOverlap

SG::ReadHandleKey<xAOD::CPMTowerContainer> CpmSimMonitorAlgorithm::m_cpmTowerLocationOverlap {this, "CPMTowerLocationOverlap",LVL1::TrigT1CaloDefs::CPMTowerLocation + "Overlap", "CPM Overlap container"}
private

Definition at line 77 of file CpmSimMonitorAlgorithm.h.

◆ m_crates

Gaudi::Property<int> CpmSimMonitorAlgorithm::m_crates {this,"s_crates", 4, "Number of CPM crates"}
private

Definition at line 56 of file CpmSimMonitorAlgorithm.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_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_errorLocation

SG::WriteHandleKey<std::vector<int> > CpmSimMonitorAlgorithm::m_errorLocation {this,"ErrorLocation","L1CaloCPMMismatchVector","ErrorVector"}
private

Definition at line 54 of file CpmSimMonitorAlgorithm.h.

◆ m_errorTool

ToolHandle<LVL1::ITrigT1CaloMonErrorTool> CpmSimMonitorAlgorithm::m_errorTool
private

Definition at line 91 of file CpmSimMonitorAlgorithm.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 AthReentrantAlgorithm::m_extendedExtraObjects
privateinherited

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

Empty if no symlinks were found.

Definition at line 153 of file AthReentrantAlgorithm.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_L1MenuKey

SG::ReadHandleKey<TrigConf::L1Menu> CpmSimMonitorAlgorithm::m_L1MenuKey { this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" }
private

Definition at line 83 of file CpmSimMonitorAlgorithm.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_legacyCpHadInputsDisabled

Gaudi::Property<bool> CpmSimMonitorAlgorithm::m_legacyCpHadInputsDisabled {this,"s_legacyCpHadInputsDisabled", false, "Status of the L1Calo Legacy CP hadronic inputs"}
private

Definition at line 61 of file CpmSimMonitorAlgorithm.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_maxSlices

Gaudi::Property<int> CpmSimMonitorAlgorithm::m_maxSlices {this,"s_maxSlices", 5, "Maximum number of slices"}
private

Definition at line 58 of file CpmSimMonitorAlgorithm.h.

◆ m_modules

Gaudi::Property<int> CpmSimMonitorAlgorithm::m_modules {this,"s_modules", 14, "Number of modules per crate (modules numbered 1-14)"}
private

Definition at line 57 of file CpmSimMonitorAlgorithm.h.

◆ m_mutex

std::mutex CpmSimMonitorAlgorithm::m_mutex {}
mutableprivate

Definition at line 181 of file CpmSimMonitorAlgorithm.h.

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 366 of file AthMonitorAlgorithm.h.

◆ m_overlapPresent

bool CpmSimMonitorAlgorithm::m_overlapPresent
private

Definition at line 64 of file CpmSimMonitorAlgorithm.h.

◆ m_packageName

StringProperty CpmSimMonitorAlgorithm::m_packageName {this,"PackageName","CpmSimMonitor","group name for histograming"}
private

Definition at line 51 of file CpmSimMonitorAlgorithm.h.

◆ m_rodHeaderLocation

SG::ReadHandleKey<xAOD::RODHeaderContainer> CpmSimMonitorAlgorithm::m_rodHeaderLocation {this, "RodHeaderLocation", LVL1::TrigT1CaloDefs::RODHeaderLocation, "Rod header container"}
private

Definition at line 81 of file CpmSimMonitorAlgorithm.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_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_triggerTowerLocation

SG::ReadHandleKey<xAOD::TriggerTowerContainer> CpmSimMonitorAlgorithm::m_triggerTowerLocation {this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"TriggerTower Location"}
private

Definition at line 75 of file CpmSimMonitorAlgorithm.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_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_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.

◆ nevents

CpmSimMonitorAlgorithm.nevents

Definition at line 526 of file CpmSimMonitorAlgorithm.py.

◆ OutputLevel

CpmSimMonitorAlgorithm.OutputLevel

Definition at line 522 of file CpmSimMonitorAlgorithm.py.

◆ summariseProps

CpmSimMonitorAlgorithm.summariseProps

Definition at line 524 of file CpmSimMonitorAlgorithm.py.

◆ withDetails

CpmSimMonitorAlgorithm.withDetails

Definition at line 524 of file CpmSimMonitorAlgorithm.py.


The documentation for this class was generated from the following files:
LVL1::CoordToHardware::cpModuleOverlap
unsigned int cpModuleOverlap(const Coordinate &coord)
return ID of CP module for overlap coord
Definition: CoordToHardware.cxx:213
CpmSimMonitorAlgorithm::EMTowerMismatch
@ EMTowerMismatch
Definition: CpmSimMonitorAlgorithm.h:67
xAOD::CPMTobRoI_v1::isolation
int isolation() const
Return isolation.
Definition: CPMTobRoI_v1.cxx:74
plotBeamSpotCompare.x1
x1
Definition: plotBeamSpotCompare.py:216
CpmSimMonitorAlgorithm::HadTowerMismatch
@ HadTowerMismatch
Definition: CpmSimMonitorAlgorithm.h:67
AthMonitorAlgorithm::Environment_t::tier0Raw
@ tier0Raw
AthMonitorAlgorithm::dataType
DataType_t dataType() const
Accessor functions for the data type.
Definition: AthMonitorAlgorithm.h:221
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
CpmSimMonitorAlgorithm::simulate
void simulate(const CpmTowerMap *towers, const CpmTowerMap *towersOv, xAOD::CPMTobRoIContainer *rois, const EventContext &ctx) const
Definition: CpmSimMonitorAlgorithm.cxx:1884
checkFileSG.line
line
Definition: checkFileSG.py:75
xAOD::CMXCPHits_v1::hits0
uint32_t hits0() const
Peak functions - return value of peak bunch crossing Assuming we have got the timing calibration corr...
Definition: CMXCPHits_v1.cxx:72
CpmSimMonitorAlgorithm::m_cpmTool
ToolHandle< LVL1::IL1CPMTools > m_cpmTool
Definition: CpmSimMonitorAlgorithm.h:89
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
xAOD::CMXCPTob_v1::crate
uint8_t crate() const
get crate
CpmSimMonitorAlgorithm::m_errorTool
ToolHandle< LVL1::ITrigT1CaloMonErrorTool > m_errorTool
Definition: CpmSimMonitorAlgorithm.h:91
TRTCalib_Extractor.hits
hits
Definition: TRTCalib_Extractor.py:35
LVL1::DataError
Error data.
Definition: DataError.h:27
get_generator_info.result
result
Definition: get_generator_info.py:21
xAOD::CMXCPHits_v1::REMOTE_2
@ REMOTE_2
Definition: CMXCPHits_v1.h:29
checkCoolLatestUpdate.variables
variables
Definition: checkCoolLatestUpdate.py:13
CpmSimMonitorAlgorithm::NumberOfSummaryBins
@ NumberOfSummaryBins
Definition: CpmSimMonitorAlgorithm.h:70
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
Trk::locX
@ locX
Definition: ParamDefs.h:37
CpmSimMonitorAlgorithm::thresholdsSame
int thresholdsSame(int val1, int val2, int nThresh, int nBits) const
Definition: CpmSimMonitorAlgorithm.cxx:1735
AthMonitorAlgorithm::m_trigDecTool
PublicToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Tool to tell whether a specific trigger is passed.
Definition: AthMonitorAlgorithm.h:340
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
SG::ReadHandle::cptr
const_pointer_type cptr()
Dereference the pointer.
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
AthMonitorAlgorithm::Environment_t::tier0
@ tier0
python.LArCondContChannels.decoder
decoder
def channelSelection(self, channelList, groupType): if groupType == self.SingleGroup: pass elif group...
Definition: LArCondContChannels.py:618
AthMonitorAlgorithm::Environment_t::AOD
@ AOD
CpmSimMonitorAlgorithm::m_packageName
StringProperty m_packageName
Definition: CpmSimMonitorAlgorithm.h:51
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
CpmSimMonitorAlgorithm::fillXVsThresholds
void fillXVsThresholds(Monitored::Scalar< int > &xitem, Monitored::Scalar< int > &yitem, Monitored::Scalar< int > &witem, int x, int val, int nThresh, int nBits, int offset=0) const
Definition: CpmSimMonitorAlgorithm.cxx:1714
CpmSimMonitorAlgorithm::fpga
int fpga(int crate, double phi) const
Definition: CpmSimMonitorAlgorithm.cxx:1980
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CpmSimMonitorAlgorithm::m_mutex
std::mutex m_mutex
Definition: CpmSimMonitorAlgorithm.h:181
CpmSimMonitorAlgorithm::m_rodHeaderLocation
SG::ReadHandleKey< xAOD::RODHeaderContainer > m_rodHeaderLocation
Definition: CpmSimMonitorAlgorithm.h:81
accumulate
bool accumulate(AccumulateMap &map, std::vector< module_t > const &modules, FPGATrackSimMatrixAccumulator const &acc)
Accumulates an accumulator (e.g.
Definition: FPGATrackSimMatrixAccumulator.cxx:22
AthMonitorAlgorithm::m_vTrigChainNames
std::vector< std::string > m_vTrigChainNames
Vector of trigger chain names parsed from trigger chain string.
Definition: AthMonitorAlgorithm.h:356
python.TriggerConfig.menu
menu
Definition: TriggerConfig.py:842
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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
AthMonitorAlgorithm::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Key for retrieving EventInfo from StoreGate.
Definition: AthMonitorAlgorithm.h:362
CpmSimMonitorAlgorithm::TotalSumMismatch
@ TotalSumMismatch
Definition: CpmSimMonitorAlgorithm.h:69
M_PI
#define M_PI
Definition: ActiveFraction.h:11
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
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
Trk::loc2
@ loc2
generic first and second local coordinate
Definition: ParamDefs.h:35
xAOD::CPMTobRoI_v1::crate
int crate() const
Return crate number (0-1)
Definition: CPMTobRoI_v1.cxx:38
CpmSimMonitorAlgorithm::thresholdsDiff
int thresholdsDiff(int val1, int val2, int nThresh, int nBits) const
Definition: CpmSimMonitorAlgorithm.cxx:1750
xAOD::CMXCPTob_v1
Description of CMXCPTob_v1.
Definition: CMXCPTob_v1.h:27
TrigConf::L1Menu
L1 menu configuration.
Definition: L1Menu.h:28
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CpmSimMonitorAlgorithm::m_cpCmxTool
ToolHandle< LVL1::IL1CPCMXTools > m_cpCmxTool
Definition: CpmSimMonitorAlgorithm.h:87
xAOD::CPMTower
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
Definition: Event/xAOD/xAODTrigL1Calo/xAODTrigL1Calo/CPMTower.h:16
CpmSimMonitorAlgorithm::m_cmxCpTobLocation
SG::ReadHandleKey< xAOD::CMXCPTobContainer > m_cmxCpTobLocation
Definition: CpmSimMonitorAlgorithm.h:79
CpmSimMonitorAlgorithm::limitedRoiSet
bool limitedRoiSet(int crate, SG::ReadHandle< xAOD::RODHeaderContainer > &rodTES) const
Definition: CpmSimMonitorAlgorithm.cxx:2033
x
#define x
AthMonitorAlgorithm::trigChainsArePassed
bool trigChainsArePassed(const std::vector< std::string > &vTrigNames) const
Check whether triggers are passed.
Definition: AthMonitorAlgorithm.cxx:194
CpmSimMonitorAlgorithm::CpmTowerMap
xAOD::CPMTowerMap_t CpmTowerMap
Definition: CpmSimMonitorAlgorithm.h:96
AthMonitorAlgorithm::Environment_t::user
@ user
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
CpmSimMonitorAlgorithm::compareHad
bool compareHad(const TriggerTowerMapHad &ttMap, const CpmTowerMap &cpMap, ErrorVector &errors, bool overlap) const
Definition: CpmSimMonitorAlgorithm.cxx:605
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
xAOD::CMXCPHits_v1::TOPO_OCCUPANCY_MAP
@ TOPO_OCCUPANCY_MAP
Definition: CMXCPHits_v1.h:30
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
AthMonitorAlgorithm::m_dummy
const ToolHandle< GenericMonitoringTool > m_dummy
Definition: AthMonitorAlgorithm.h:369
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CpmSimMonitorAlgorithm::m_overlapPresent
bool m_overlapPresent
Definition: CpmSimMonitorAlgorithm.h:64
CpmSimMonitorAlgorithm::m_cpmTowerLocation
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocation
Definition: CpmSimMonitorAlgorithm.h:76
CpmSimMonitorAlgorithm::m_cpmTowerLocationOverlap
SG::ReadHandleKey< xAOD::CPMTowerContainer > m_cpmTowerLocationOverlap
Definition: CpmSimMonitorAlgorithm.h:77
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
CpmSimMonitorAlgorithm::compare
void compare(const CpmTobRoiMap &roiSimMap, const CpmTobRoiMap &roiMap, ErrorVector &errors, const xAOD::RODHeaderContainer *rodTES) const
Definition: CpmSimMonitorAlgorithm.cxx:834
xAOD::roiWord
roiWord
Definition: TrigMissingET_v1.cxx:36
PyPoolBrowser.item
item
Definition: PyPoolBrowser.py:129
CpmSimMonitorAlgorithm::m_errorLocation
SG::WriteHandleKey< std::vector< int > > m_errorLocation
Definition: CpmSimMonitorAlgorithm.h:54
menu
make the sidebar many part of the config
Definition: hcg.cxx:551
TileSynchronizeBch.online
online
Definition: TileSynchronizeBch.py:88
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
xAOD::CMXCPHits_v1::cmx
uint8_t cmx() const
get cmx
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthMonitorAlgorithm::m_DQFilterTools
ToolHandleArray< IDQFilterTool > m_DQFilterTools
Array of Data Quality filter tools.
Definition: AthMonitorAlgorithm.h:341
LVL1::CoordinateRange
CoordinateRange class declaration.
Definition: CoordinateRange.h:36
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
LVL1::DataError::Overflow
@ Overflow
Definition: DataError.h:31
CpmSimMonitorAlgorithm::ErrorVector
std::vector< int > ErrorVector
Definition: CpmSimMonitorAlgorithm.h:72
dqt_zlumi_pandas.err
err
Definition: dqt_zlumi_pandas.py:182
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
LVL1::Coordinate
Coordinate class declaration.
Definition: TrigT1/TrigT1Interfaces/TrigT1Interfaces/Coordinate.h:50
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
xAOD::CPMTobRoI_v1::cpm
int cpm() const
Return CPM number (1-14)
Definition: CPMTobRoI_v1.cxx:44
xAOD::CMXCPHits_v1::TOTAL
@ TOTAL
Definition: CMXCPHits_v1.h:29
CpmSimMonitorAlgorithm::CmxCpTobMap
std::map< int, const xAOD::CMXCPTob * > CmxCpTobMap
Definition: CpmSimMonitorAlgorithm.h:97
AthMonitorAlgorithm::DataType_t::heavyIonCollisions
@ heavyIonCollisions
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
xAOD::CMXCPTob_v1::error
uint32_t error() const
get errorVec at peak bunch crossing
Definition: CMXCPTob_v1.cxx:92
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
tolower
void tolower(std::string &s)
Definition: AthenaSummarySvc.cxx:111
AthMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const =0
adds event to the monitoring histograms
CpmSimMonitorAlgorithm::m_cpmTobRoiLocation
SG::ReadHandleKey< xAOD::CPMTobRoIContainer > m_cpmTobRoiLocation
Definition: CpmSimMonitorAlgorithm.h:78
CpmSimMonitorAlgorithm::ttCheck
CpmTowerMap::mapped_type ttCheck(CpmTowerMap::mapped_type tt, xAOD::CPMTowerContainer *coll) const
Definition: CpmSimMonitorAlgorithm.cxx:1991
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
CpmSimMonitorAlgorithm::TauRoIMismatch
@ TauRoIMismatch
Definition: CpmSimMonitorAlgorithm.h:68
CpmSimMonitorAlgorithm::TriggerTowerMapEm
std::map< int, const xAOD::TriggerTower * > TriggerTowerMapEm
Definition: CpmSimMonitorAlgorithm.h:94
CpmSimMonitorAlgorithm::m_legacyCpHadInputsDisabled
Gaudi::Property< bool > m_legacyCpHadInputsDisabled
Definition: CpmSimMonitorAlgorithm.h:61
CpmSimMonitorAlgorithm::LocalSumMismatch
@ LocalSumMismatch
Definition: CpmSimMonitorAlgorithm.h:69
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
LVL1::CoordToHardware::cpModule
unsigned int cpModule(const Coordinate &coord)
return ID of CP module.
Definition: CoordToHardware.cxx:52
xAOD::CPMTobRoI_v1::type
int type() const
Return type em/tau (0/1)
Definition: CPMTobRoI_v1.cxx:62
xAOD::CPMTobRoI_v1::roiWord
uint32_t roiWord() const
get roiWord
CpmSimMonitorAlgorithm::setupMap
StatusCode setupMap(const xAOD::TriggerTowerContainer *coll, TriggerTowerMapEm &emmap, TriggerTowerMapHad &hadmap) const
Definition: CpmSimMonitorAlgorithm.cxx:1767
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::eventNumber
eventNumber
Definition: EventInfo_v1.cxx:124
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.
python.BuildSignatureFlags.cosmics
AthConfigFlags cosmics(AthConfigFlags flags, str instanceName, str recoMode)
Definition: BuildSignatureFlags.py:524
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
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
CpmSimMonitorAlgorithm::m_cmxs
Gaudi::Property< int > m_cmxs
Definition: CpmSimMonitorAlgorithm.h:59
RunTileMonitoring.rod
rod
Definition: RunTileMonitoring.py:134
xAOD::RODHeader_v2
Description of RODHeader_v2.
Definition: RODHeader_v2.h:23
LVL1::DataError::Parity
@ Parity
Definition: DataError.h:31
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
CpmSimMonitorAlgorithm::m_triggerTowerLocation
SG::ReadHandleKey< xAOD::TriggerTowerContainer > m_triggerTowerLocation
Definition: CpmSimMonitorAlgorithm.h:75
CpmSimMonitorAlgorithm::m_crates
Gaudi::Property< int > m_crates
Definition: CpmSimMonitorAlgorithm.h:56
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
calibdata.ct
ct
Definition: calibdata.py:418
AthMonitorAlgorithm::m_dataType
AthMonitorAlgorithm::DataType_t m_dataType
Instance of the DataType_t enum.
Definition: AthMonitorAlgorithm.h:351
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
CpmSimMonitorAlgorithm::m_cmxCpHitsLocation
SG::ReadHandleKey< xAOD::CMXCPHitsContainer > m_cmxCpHitsLocation
Definition: CpmSimMonitorAlgorithm.h:80
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
CpmSimMonitorAlgorithm::m_configSvc
ServiceHandle< TrigConf::ITrigConfigSvc > m_configSvc
Definition: CpmSimMonitorAlgorithm.h:48
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
mergePhysValFiles.errors
list errors
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:43
CpmSimMonitorAlgorithm::EMRoIMismatch
@ EMRoIMismatch
Definition: CpmSimMonitorAlgorithm.h:67
InDetDD::local
@ local
Definition: InDetDD_Defs.h:16
CpmSimMonitorAlgorithm::LeftCMXTobMismatch
@ LeftCMXTobMismatch
Definition: CpmSimMonitorAlgorithm.h:68
xAOD::CMXCPHits_v1::LOCAL
@ LOCAL
Definition: CMXCPHits_v1.h:29
AthMonitorAlgorithm::m_tools
ToolHandleArray< GenericMonitoringTool > m_tools
Array of Generic Monitoring Tools.
Definition: AthMonitorAlgorithm.h:338
LVL1::CoordToHardware
returns the trigger hardware components associated with a given Coordinate
Definition: CoordToHardware.h:42
AthMonitorAlgorithm::Environment_t::online
@ online
selection
const std::string selection
Definition: fbtTestBasics.cxx:74
LVL1::DataError::ParityMerge
@ ParityMerge
Definition: DataError.h:37
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
xAOD::CMXCPTob_v1::cmx
uint8_t cmx() const
get cmx
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
CpmSimMonitorAlgorithm::m_modules
Gaudi::Property< int > m_modules
Definition: CpmSimMonitorAlgorithm.h:57
xAOD::phiBin
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setPhiMap phiBin
Definition: L2StandAloneMuon_v2.cxx:144
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
AthMonitorAlgorithm::Environment_t::tier0ESD
@ tier0ESD
LVL1::CoordToHardware::cpCrate
unsigned int cpCrate(const Coordinate &coord)
returns crate ID covering that coord.
Definition: CoordToHardware.cxx:39
AthMonitorAlgorithm::Environment_t::altprod
@ altprod
python.update_ci_reference_files.remote
remote
Definition: update_ci_reference_files.py:417
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
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.
CpmSimMonitorAlgorithm::TopoMismatch
@ TopoMismatch
Definition: CpmSimMonitorAlgorithm.h:70
item
Definition: ItemListSvc.h:43
WriteBchToCool.user
user
Definition: WriteBchToCool.py:76
xAOD::CMXCPHits_v1::REMOTE_0
@ REMOTE_0
Definition: CMXCPHits_v1.h:29
LArNewCalib_PedestalAutoCorr.cp
cp
Definition: LArNewCalib_PedestalAutoCorr.py:188
xAOD::CMXCPHits_v1::REMOTE_1
@ REMOTE_1
Definition: CMXCPHits_v1.h:29
JetVoronoiDiagramHelpers::coord
double coord
Definition: JetVoronoiDiagramHelpers.h:45
CpmSimMonitorAlgorithm::RightCMXTobMismatch
@ RightCMXTobMismatch
Definition: CpmSimMonitorAlgorithm.h:68
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
xAOD::CMXCPHits_v1::TOPO_OCCUPANCY_COUNTS
@ TOPO_OCCUPANCY_COUNTS
Definition: CMXCPHits_v1.h:30
LVL1::CoordToHardware::cpCrateOverlap
unsigned int cpCrateOverlap(const Coordinate &coord)
returns crate ID covering that overlap coord.
Definition: CoordToHardware.cxx:205
AthMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: AthMonitorAlgorithm.cxx:18
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
LVL1::CPRoIDecoder
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Definition: CPRoIDecoder.h:37
ATH_LIKELY
#define ATH_LIKELY(x)
Definition: AthUnlikelyMacros.h:16
DeMoScan.index
string index
Definition: DeMoScan.py:364
xAOD::CMXCPTob_v1::energy
uint8_t energy() const
Peak functions - return value of peak bunch crossing Assuming we have got the timing calibration corr...
Definition: CMXCPTob_v1.cxx:80
a
TList * a
Definition: liststreamerinfos.cxx:10
CpmSimMonitorAlgorithm::m_maxSlices
Gaudi::Property< int > m_maxSlices
Definition: CpmSimMonitorAlgorithm.h:58
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
h
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
RunTileMonitoring.towers
towers
Definition: RunTileMonitoring.py:133
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthMonitorAlgorithm::DataType_t::collisions
@ collisions
xAOD::CMXCPHits_v1::crate
uint8_t crate() const
get crate
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthMonitorAlgorithm::m_name
std::string m_name
Definition: AthMonitorAlgorithm.h:366
TriggerTest.rois
rois
Definition: TriggerTest.py:23
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
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
CpmSimMonitorAlgorithm::getL1Menu
const TrigConf::L1Menu * getL1Menu(const EventContext &ctx) const
Definition: CpmSimMonitorAlgorithm.cxx:2051
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
xAOD::CPMTobRoI_v1::chip
int chip() const
Return CP chip number (0-7)
Definition: CPMTobRoI_v1.cxx:50
xAOD::CMXCPTob_v1::isolation
uint8_t isolation() const
get isolationVec at peak bunch crossing
Definition: CMXCPTob_v1.cxx:86
CpmSimMonitorAlgorithm::compareEm
bool compareEm(const TriggerTowerMapEm &ttMap, const CpmTowerMap &cpMap, ErrorVector &errors, bool overlap) const
Definition: CpmSimMonitorAlgorithm.cxx:387
copySelective.source
string source
Definition: copySelective.py:32
str
Definition: BTagTrackIpAccessor.cxx:11
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::CPMTobRoIContainer
CPMTobRoIContainer_v1 CPMTobRoIContainer
Define the latest version of the CPMTobRoI class.
Definition: CPMTobRoIContainer.h:18
CpmSimMonitorAlgorithm::m_L1MenuKey
SG::ReadHandleKey< TrigConf::L1Menu > m_L1MenuKey
Definition: CpmSimMonitorAlgorithm.h:83
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
CpmSimMonitorAlgorithm::CmxCpHitsMap
std::map< int, const xAOD::CMXCPHits * > CmxCpHitsMap
Definition: CpmSimMonitorAlgorithm.h:98
CpmSimMonitorAlgorithm::CpmTobRoiMap
xAOD::CPMTobRoIMap_t CpmTobRoiMap
Definition: CpmSimMonitorAlgorithm.h:99
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
fillSCTHists.etaMod
etaMod
Definition: fillSCTHists.py:23
LVL1::TriggerTowerKey::ttKey
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower
Definition: TriggerTowerKey.cxx:143
AthMonitorAlgorithm::DataType_t::userDefined
@ userDefined
xAOD::CMXCPHits_v1::sourceComponent
uint8_t sourceComponent() const
get source
xAOD::CPMTobRoI_v1::energy
int energy() const
Return energy.
Definition: CPMTobRoI_v1.cxx:68
xAOD::CMXCPHits_v1
Description of CMXCPHits_v1.
Definition: CMXCPHits_v1.h:27
error
Definition: IImpactPoint3dEstimator.h:70
TileDCSDataPlotter.tt
tt
Definition: TileDCSDataPlotter.py:874
xAOD::CPMTobRoI_v1::location
int location() const
Return location (RoI local coords) (0-7)
Definition: CPMTobRoI_v1.cxx:56
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
LVL1::TriggerTowerKey
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
Definition: TriggerTowerKey.h:56
xAOD::CMXCPHits_v1::hits1
uint32_t hits1() const
get hitsVec1 at peak bunch crossing
Definition: CMXCPHits_v1.cxx:78
CpmSimMonitorAlgorithm::RemoteSumMismatch
@ RemoteSumMismatch
Definition: CpmSimMonitorAlgorithm.h:69
AthMonitorAlgorithm::DataType_t::monteCarlo
@ monteCarlo
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::CMXCPTob_v1::cpm
uint8_t cpm() const
get cpm
xAOD::CPMTobRoI_v1
Description of CPMTobRoI_v1.
Definition: CPMTobRoI_v1.h:24
fitman.k
k
Definition: fitman.py:528
xAOD::CMXCPTob_v1::location
uint8_t location() const
get location
xAOD::CMXCPTob_v1::chip
uint8_t chip() const
get chip
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
xAOD::CMXCPHits_v1::TOPO_CHECKSUM
@ TOPO_CHECKSUM
Definition: CMXCPHits_v1.h:30
xAOD::CPMTower_v2
Description of CPMTower_v2.
Definition: CPMTower_v2.h:26
collisions
Definition: collisions.py:1