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

#include <CpmSimMonitorAlgorithm.h>

Inheritance diagram for CpmSimMonitorAlgorithm:

Public Types

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

Public Member Functions

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

Public Attributes

 inputs = glob.glob('/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2020-04-06T2139/TrigP1Test/test_trigP1_v1PhysP1_T0Mon_build/ESD.pool.root')
 flags = initConfigFlags()
 Files
 HISTFileName
 cfg = MainServicesSerialCfg()
 CpmSimMonitorCfg = CpmSimMonitoringConfig(flags)
 OutputLevel
 withDetails
 False
 summariseProps
int nevents = -1

Protected Member Functions

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

Protected Attributes

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

Private Types

enum  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, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

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.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 40 of file CpmSimMonitorAlgorithm.h.

Member Typedef Documentation

◆ CmxCpHitsMap

typedef std::map<int, const xAOD::CMXCPHits*> CpmSimMonitorAlgorithm::CmxCpHitsMap
private

Definition at line 99 of file CpmSimMonitorAlgorithm.h.

◆ CmxCpTobMap

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

Definition at line 98 of file CpmSimMonitorAlgorithm.h.

◆ CpmTobRoiMap

typedef xAOD::CPMTobRoIMap_t CpmSimMonitorAlgorithm::CpmTobRoiMap
private

Definition at line 100 of file CpmSimMonitorAlgorithm.h.

◆ CpmTowerMap

typedef xAOD::CPMTowerMap_t CpmSimMonitorAlgorithm::CpmTowerMap
private

Definition at line 97 of file CpmSimMonitorAlgorithm.h.

◆ ErrorVector

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

Definition at line 73 of file CpmSimMonitorAlgorithm.h.

◆ MonVarVec_t

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

Definition at line 370 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

◆ TriggerTowerMapEm

typedef std::map<int, const xAOD::TriggerTower*> CpmSimMonitorAlgorithm::TriggerTowerMapEm
private

Definition at line 95 of file CpmSimMonitorAlgorithm.h.

◆ TriggerTowerMapHad

typedef std::map<int, const xAOD::TriggerTower*> CpmSimMonitorAlgorithm::TriggerTowerMapHad
private

Definition at line 96 of file CpmSimMonitorAlgorithm.h.

Member Enumeration Documentation

◆ DataType_t

enum class AthMonitorAlgorithm::DataType_t
stronginherited

Specifies what type of input data is being monitored.

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

Enumerator
userDefined 
monteCarlo 
collisions 
cosmics 
heavyIonCollisions 

Definition at line 194 of file AthMonitorAlgorithm.h.

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

◆ Environment_t

enum class AthMonitorAlgorithm::Environment_t
stronginherited

Specifies the processing environment.

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

Enumerator
user 
online 
tier0 
tier0Raw 
tier0ESD 
AOD 
altprod 

Definition at line 175 of file AthMonitorAlgorithm.h.

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

◆ SummaryErrors

enum CpmSimMonitorAlgorithm::SummaryErrors
private
Enumerator
EMTowerMismatch 
HadTowerMismatch 
EMRoIMismatch 
TauRoIMismatch 
LeftCMXTobMismatch 
RightCMXTobMismatch 
LocalSumMismatch 
RemoteSumMismatch 
TotalSumMismatch 
TopoMismatch 
NumberOfSummaryBins 

Definition at line 68 of file CpmSimMonitorAlgorithm.h.

68 { EMTowerMismatch, HadTowerMismatch, EMRoIMismatch,
69 TauRoIMismatch, LeftCMXTobMismatch, RightCMXTobMismatch,
70 LocalSumMismatch, RemoteSumMismatch, TotalSumMismatch,
71 TopoMismatch, NumberOfSummaryBins };

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}
Base class for Athena Monitoring Algorithms.

◆ ~CpmSimMonitorAlgorithm()

virtual CpmSimMonitorAlgorithm::~CpmSimMonitorAlgorithm ( )
virtualdefault

Member Function Documentation

◆ cardinality()

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

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

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ 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();
1474 if (local && source != xAOD::CMXCPHits::LOCAL)
1475 continue;
1476 if (remote && source != xAOD::CMXCPHits::LOCAL)
1477 continue;
1478 if (total && source != xAOD::CMXCPHits::TOTAL)
1479 continue;
1480 //coverity[dead_error_line]
1481 if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1484 continue;
1485 cmxSimHits0 = cmxS->hits0();
1486 cmxSimHits1 = cmxS->hits1();
1487 crate = cmxS->crate();
1488 cmx = cmxS->cmx();
1489
1490 } else if ((cmxSimMapIter == cmxSimMapIterEnd) ||
1491 ((cmxMapIter != cmxMapIterEnd) && (cmxSimKey > cmxKey))) {
1492
1493 // Data CMX Hits but no Sim CMX Hits
1494
1495 const xAOD::CMXCPHits *cmxD = cmxMapIter->second;
1496 ++cmxMapIter;
1497 source = cmxD->sourceComponent();
1498 if (local && source != xAOD::CMXCPHits::LOCAL)
1499 continue;
1500 if (remote && source != xAOD::CMXCPHits::REMOTE_0 &&
1501 source != xAOD::CMXCPHits::REMOTE_1 &&
1502 source != xAOD::CMXCPHits::REMOTE_2)
1503 continue;
1504 if (total && source != xAOD::CMXCPHits::TOTAL)
1505 continue;
1506 //coverity[dead_error_line]
1507 if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1510 continue;
1511 cmxHits0 = cmxD->hits0();
1512 cmxHits1 = cmxD->hits1();
1513 crate = cmxD->crate();
1514 cmx = cmxD->cmx();
1515
1516 } else {
1517
1518 // Have both
1519
1520 const xAOD::CMXCPHits *cmxS = cmxSimMapIter->second;
1521 const xAOD::CMXCPHits *cmxD = cmxMapIter->second;
1522 ++cmxSimMapIter;
1523 ++cmxMapIter;
1524 source = cmxS->sourceComponent();
1525 if (local && source != xAOD::CMXCPHits::LOCAL)
1526 continue;
1527 if (remote && source != xAOD::CMXCPHits::LOCAL &&
1528 source != xAOD::CMXCPHits::REMOTE_0 &&
1529 source != xAOD::CMXCPHits::REMOTE_1 &&
1530 source != xAOD::CMXCPHits::REMOTE_2)
1531 continue;
1532 if (total && source != xAOD::CMXCPHits::TOTAL)
1533 continue;
1534 //coverity[dead_error_line]
1535 if (topo && source != xAOD::CMXCPHits::TOPO_CHECKSUM &&
1538 continue;
1539 cmxSimHits0 = cmxS->hits0();
1540 cmxSimHits1 = cmxS->hits1();
1541 cmxHits0 = cmxD->hits0();
1542 cmxHits1 = cmxD->hits1();
1543 crate = cmxS->crate();
1544 cmx = cmxS->cmx();
1545 }
1546
1547 if (!cmxSimHits0 && !cmxSimHits1 && !cmxHits0 && !cmxHits1)
1548 continue;
1549
1550 // Fill in error plots
1551
1552 if (local || total) {
1553 int loc = crate * m_cmxs + cmx;
1554 const int cmxBins = m_crates * m_cmxs;
1555 const int bit =
1556 (local) ? (1 << LocalSumMismatch) : (1 << TotalSumMismatch);
1557 // loc for the histogram filling
1558 int loc_fill = (local) ? loc : 14 + cmx;
1559 if (cmxSimHits0 == cmxHits0 && cmxSimHits1 == cmxHits1) {
1560 errors[loc] |= bit;
1561 cmx_sum_loc_SimEqData=loc_fill;
1562 fill(m_packageName,cmx_sum_loc_SimEqData);
1563 } else {
1564 errors[loc + cmxBins] |= bit;
1565 if ((cmxSimHits0 || cmxSimHits1) && (cmxHits0 || cmxHits1)) {
1566 cmx_sum_loc_SimNeData=loc_fill;
1567 fill(m_packageName,cmx_sum_loc_SimNeData);
1568 } else if (!cmxHits0 && !cmxHits1) {
1569 cmx_sum_loc_SimNoData=loc_fill;
1570 fill(m_packageName,cmx_sum_loc_SimNoData);
1571 } else {
1572 cmx_sum_loc_DataNoSim=loc_fill;
1573 fill(m_packageName,cmx_sum_loc_SimEqData);
1574 }
1575 }
1576 // the loc used for filling histograms
1577 loc = (local) ? loc : 14 + cmx;
1578 // now divide it by 2
1579 loc /= 2;
1580 const int nThresh = 8;
1581 const int thrLen = 3;
1582 int same0 = thresholdsSame(cmxHits0, cmxSimHits0, nThresh, thrLen);
1583 int diff0 = thresholdsDiff(cmxHits0, cmxSimHits0, nThresh, thrLen);
1584 int same1 = thresholdsSame(cmxHits1, cmxSimHits1, nThresh, thrLen);
1585 int diff1 = thresholdsDiff(cmxHits1, cmxSimHits1, nThresh, thrLen);
1586 if (cmx) {
1587 fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1588 loc, same0, nThresh, 1);
1589 fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1590 loc, diff0, nThresh, 1);
1591 const int offset = nThresh;
1592 fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1593 loc, same1, nThresh, 1, offset);
1594 fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1595 loc, diff1, nThresh, 1, offset);
1596 } else {
1597 fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1598 loc, same0, nThresh, 1);
1599 fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1600 loc, diff0, nThresh, 1);
1601 const int offset = nThresh;
1602 fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1603 loc, same1, nThresh, 1, offset);
1604 fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1605 loc, diff1, nThresh, 1, offset);
1606 }
1607 //coverity[dead_error_line]
1608 } else if (remote) {
1609 if (source == xAOD::CMXCPHits::LOCAL) {
1610 if (crate != m_crates - 1) {
1611 hits0Sim[crate * m_cmxs + cmx] = cmxSimHits0;
1612 hits1Sim[crate * m_cmxs + cmx] = cmxSimHits1;
1613 }
1614 } else {
1615 const int remCrate = source - xAOD::CMXCPHits::REMOTE_0;
1616 hits0[remCrate * m_cmxs + cmx] = cmxHits0;
1617 hits1[remCrate * m_cmxs + cmx] = cmxHits1;
1618 }
1619 } else {
1620 //coverity[dead_error_begin]
1621 const int locX = crate * m_cmxs + cmx;
1623 const int cmxBins = m_crates * m_cmxs;
1624 const int bit = (1 << TopoMismatch);
1625 if (cmxSimHits0 == cmxHits0 && cmxSimHits1 == cmxHits1) {
1626 errors[locX] |= bit;
1627 cmxTopoLocXSimEqData=locX;
1628 cmxTopoLocYSimEqData=locY;
1629 fill(m_packageName,cmxTopoLocXSimEqData,cmxTopoLocYSimEqData);
1630 } else {
1631 errors[locX + cmxBins] |= bit;
1632 if ((cmxSimHits0 || cmxSimHits1) && (cmxHits0 || cmxHits1)) {
1633 cmxTopoLocXSimNeData=locX;
1634 cmxTopoLocYSimNeData=locY;
1635 fill(m_packageName,cmxTopoLocXSimNeData,cmxTopoLocYSimNeData);
1636 } else if (!cmxHits0 && !cmxHits1) {
1637 cmxTopoLocXSimNoData=locX;
1638 cmxTopoLocYSimNoData=locY;
1639 fill(m_packageName,cmxTopoLocXSimNoData,cmxTopoLocYSimNoData);
1640 } else {
1641 cmxTopoLocXDataNoSim=locX;
1642 cmxTopoLocYDataNoSim=locY;
1643 fill(m_packageName,cmxTopoLocXDataNoSim,cmxTopoLocYDataNoSim);
1644 }
1645 }
1646 }
1647 }
1648 if (remote) {
1649 for (int crate = 0; crate < m_crates - 1; ++crate) {
1650 for (int cmx = 0; cmx < m_cmxs; ++cmx) {
1651 int loc = crate * m_cmxs + cmx;
1652 const int cmxBins = m_crates * m_cmxs;
1653 const int bit = (1 << RemoteSumMismatch);
1654 const unsigned int hd0 = hits0[loc];
1655 const unsigned int hd1 = hits1[loc];
1656 const unsigned int hs0 = hits0Sim[loc];
1657 const unsigned int hs1 = hits1Sim[loc];
1658
1659 if (!hd0 && !hd1 && !hs0 && !hs1)
1660 continue;
1661
1662 int loc_fill = loc + 8;
1663 if (hs0 == hd0 && hs1 == hd1) {
1664 errors[loc] |= bit;
1665 cmx_sum_loc_SimEqData=loc_fill;
1666 fill(m_packageName,cmx_sum_loc_SimEqData);
1667 } else {
1668 errors[loc + cmxBins] |= bit;
1669 if ((hs0 || hs1) && (hd0 || hd1)) {
1670 cmx_sum_loc_SimNeData=loc_fill;
1671 fill(m_packageName,cmx_sum_loc_SimNeData);
1672 } else if (!hd0 && !hd1) {
1673 cmx_sum_loc_SimNoData=loc_fill;
1674 fill(m_packageName,cmx_sum_loc_SimNoData);
1675 } else {
1676 cmx_sum_loc_DataNoSim=loc_fill;
1677 fill(m_packageName,cmx_sum_loc_DataNoSim);
1678 }
1679 }
1680 // this is the loc used for filling
1681 loc = loc_fill;
1682 // and to be used for the rest of the filling
1683 loc /= 2;
1684 const int nThresh = 8;
1685 const int thrLen = 3;
1686 int same0 = thresholdsSame(hd0, hs0, nThresh, thrLen);
1687 int diff0 = thresholdsDiff(hd0, hs0, nThresh, thrLen);
1688 int same1 = thresholdsSame(hd1, hs1, nThresh, thrLen);
1689 int diff1 = thresholdsDiff(hd1, hs1, nThresh, thrLen);
1690 if (cmx) {
1691 fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1692 loc, same0, nThresh, 1);
1693 fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1694 loc, diff0, nThresh, 1);
1695 const int offset = nThresh;
1696 fillXVsThresholds(cmx_x_rightsums_SimEqData,cmx_y_rightsums_SimEqData,cmx_w_rightsums_SimEqData,
1697 loc, same1, nThresh, 1, offset);
1698 fillXVsThresholds(cmx_x_rightsums_SimNeData,cmx_y_rightsums_SimNeData,cmx_w_rightsums_SimNeData,
1699 loc, diff1, nThresh, 1, offset);
1700 } else {
1701 fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1702 loc, same0, nThresh, 1);
1703 fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1704 loc, diff0, nThresh, 1);
1705 const int offset = nThresh;
1706 fillXVsThresholds(cmx_x_leftsums_SimEqData,cmx_y_leftsums_SimEqData,cmx_w_leftsums_SimEqData,
1707 loc, same1, nThresh, 1, offset);
1708 fillXVsThresholds(cmx_x_leftsums_SimNeData,cmx_y_leftsums_SimNeData,cmx_w_leftsums_SimNeData,
1709 loc, diff1, nThresh, 1, offset);
1710 }
1711 }
1712 }
1713 }
1714}
#define ATH_MSG_DEBUG(x)
Gaudi::Property< int > m_cmxs
int thresholdsDiff(int val1, int val2, int nThresh, int nBits) const
int thresholdsSame(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::Property< int > m_crates
Declare a monitored scalar variable.
uint8_t sourceComponent() const
get source
uint8_t cmx() const
get cmx
uint32_t hits0() const
Peak functions - return value of peak bunch crossing Assuming we have got the timing calibration corr...
uint32_t hits1() const
get hitsVec1 at peak bunch crossing
uint8_t crate() const
get crate
const std::string selection
@ locY
local cartesian
Definition ParamDefs.h:38
@ locX
Definition ParamDefs.h:37
CMXCPHits_v1 CMXCPHits
Define the latest version of the CMMCPHits class.
void fill(H5::Group &out_file, size_t iterations)

◆ 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
1161 LVL1::CPRoIDecoder decoder;
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();
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();
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;
1250 const LVL1::CoordinateRange coord(
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}
#define M_PI
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
double coord
Type of coordination system.
bool limitedRoiSet(int crate, SG::ReadHandle< xAOD::RODHeaderContainer > &rodTES) const
Gaudi::Property< int > m_modules
A level 1 calorimeter trigger conversion service: returns the Coordinate represented by a RoI word.
Error data.
Definition DataError.h:27
uint8_t cmx() const
get cmx
uint8_t cpm() const
get cpm
uint32_t error() const
get errorVec at peak bunch crossing
uint8_t crate() const
get crate
uint8_t energy() const
Peak functions - return value of peak bunch crossing Assuming we have got the timing calibration corr...
uint8_t chip() const
get chip
uint8_t location() const
get location
uint8_t isolation() const
get isolationVec at peak bunch crossing
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
str index
Definition DeMoScan.py:362
@ loc2
generic first and second local coordinate
Definition ParamDefs.h:35
CMXCPTob_v1 CMXCPTob
Define the latest version of the CMXCPTob class.
setEventNumber uint32_t

◆ 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
840 LVL1::CPRoIDecoder decoder;
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));
967 const LVL1::CoordinateRange coord(
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}
uint32_t roiWord() const
get roiWord
int crate() const
Return crate number (0-1)
int cpm() const
Return CPM number (1-14)
int location() const
Return location (RoI local coords) (0-7)
int energy() const
Return energy.
int chip() const
Return CP chip number (0-7)
int isolation() const
Return isolation.
int type() const
Return type em/tau (0/1)
CPMTobRoI_v1 CPMTobRoI
Define the latest version of the CPMTobRoI class.

◆ 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
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}
int fpga(int crate, double phi) const
returns the trigger hardware components associated with a given Coordinate
unsigned int cpModuleOverlap(const Coordinate &coord)
return ID of CP module for overlap coord
unsigned int cpModule(const Coordinate &coord)
return ID of CP module.
unsigned int cpCrateOverlap(const Coordinate &coord)
returns crate ID covering that overlap coord.
unsigned int cpCrate(const Coordinate &coord)
returns crate ID covering that coord.
@ layer
Definition HitInfo.h:79
CPMTower_v2 CPMTower
Define the latest version of the CPMTower class.
TriggerTower_v2 TriggerTower
Define the latest version of the TriggerTower class.

◆ 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
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
691 if(m_legacyCpHadInputsDisabled){
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
724 if(m_legacyCpHadInputsDisabled){
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 224 of file AthMonitorAlgorithm.h.

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

◆ dataTypeStringToEnum()

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

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

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

Definition at line 144 of file AthMonitorAlgorithm.cxx.

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

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ environment()

Environment_t AthMonitorAlgorithm::environment ( ) const
inlineinherited

Accessor functions for the environment.

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

Definition at line 208 of file AthMonitorAlgorithm.h.

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

◆ envStringToEnum()

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

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

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

Definition at line 116 of file AthMonitorAlgorithm.cxx.

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

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

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

Applies filters and trigger requirements.

Then, calls fillHistograms().

Parameters
ctxevent context for reentrant Athena call
Returns
StatusCode

Definition at line 77 of file AthMonitorAlgorithm.cxx.

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

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ extraOutputDeps()

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

Return the list of extra output dependencies.

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

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

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

◆ fillHistograms()

StatusCode 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
72 SG::ReadHandle<xAOD::TriggerTowerContainer> triggerTowerTES(m_triggerTowerLocation, ctx);
73 ATH_CHECK(triggerTowerTES.isValid());
74
75 // Retrieve Core CPM Towers from SG
76 SG::ReadHandle<xAOD::CPMTowerContainer> cpmTowerTES(m_cpmTowerLocation, ctx);
77 ATH_CHECK(cpmTowerTES.isValid());
78
79 // Retrieve Overlap CPM Towers from SG
80 SG::ReadHandle<xAOD::CPMTowerContainer> cpmTowerOvTES(m_cpmTowerLocationOverlap, ctx);
81 ATH_CHECK(cpmTowerOvTES.isValid());
82
83 // Retrieve CPM TOB RoIs from SG
84 SG::ReadHandle<xAOD::CPMTobRoIContainer> cpmRoiTES(m_cpmTobRoiLocation, ctx);
85 ATH_CHECK(cpmRoiTES.isValid());
86
87 // Retrieve ROD Headers from SG
88 SG::ReadHandle<xAOD::RODHeaderContainer> rodTES(m_rodHeaderLocation, ctx);
89 ATH_CHECK(rodTES.isValid());
90
91 // Retrieve CMX-CP TOBs from SG
92 SG::ReadHandle<xAOD::CMXCPTobContainer> cmxCpTobTES(m_cmxCpTobLocation, ctx);
93 ATH_CHECK(cmxCpTobTES.isValid());
94
95 // Retrieve CMX-CP Hits from SG
96 SG::ReadHandle<xAOD::CMXCPHitsContainer> cmxCpHitsTES(m_cmxCpHitsLocation, ctx);
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;
341 if (err == RemoteSumMismatch || err == TotalSumMismatch)
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
381 fill(m_packageName,variables);
382 variables.clear();
383
384 return StatusCode::SUCCESS;
385}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
void compare(const CpmTobRoiMap &roiSimMap, const CpmTobRoiMap &roiMap, ErrorVector &errors, const xAOD::RODHeaderContainer *rodTES) const
xAOD::CPMTobRoIMap_t CpmTobRoiMap
StatusCode setupMap(const xAOD::TriggerTowerContainer *coll, TriggerTowerMapEm &emmap, TriggerTowerMapHad &hadmap) const
std::map< int, const xAOD::CMXCPTob * > CmxCpTobMap
void simulate(const CpmTowerMap *towers, const CpmTowerMap *towersOv, xAOD::CPMTobRoIContainer *rois, const EventContext &ctx) const
std::map< int, const xAOD::CMXCPHits * > CmxCpHitsMap
int lb
Definition globals.cxx:23
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
RODHeaderContainer_v2 RODHeaderContainer
Define the latest version of the RODHeader container.
CMXCPTobContainer_v1 CMXCPTobContainer
Define the latest version of the CMXCPTob class.
CPMTowerContainer_v2 CPMTowerContainer
Define the latest version of the CPMHits container.
CMXCPHitsContainer_v1 CMXCPHitsContainer
Define the latest version of the CMXCPHits class.
TriggerTowerContainer_v2 TriggerTowerContainer
Define the latest version of the TriggerTower container.
CPMTobRoIContainer_v1 CPMTobRoIContainer
Define the latest version of the CPMTobRoI class.

◆ 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 1719 of file CpmSimMonitorAlgorithm.cxx.

1723{
1724 if (val) {
1725 const int mask = (1 << nBits) - 1;
1726 for (int thr = 0; thr < nThresh; ++thr) {
1727 const int hit = (val >> (nBits*thr)) & mask;
1728 if (hit) {
1729 xitem=x;
1730 yitem=thr+offset;
1731 witem=hit;
1732 fill(m_packageName, xitem, yitem, witem);
1733 }
1734 }
1735 }
1736}
#define x

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

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

◆ fpga()

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

Definition at line 1985 of file CpmSimMonitorAlgorithm.cxx.

1985 {
1986 const double phiGran = M_PI / 32.;
1987 const double phiBase = M_PI / 2. * double(crate);
1988 const int phiBin = int(floor((phi - phiBase) / phiGran)) + 2;
1989 return 2 * (phiBin / 2);
1990}

◆ GetEventInfo()

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

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

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

Definition at line 111 of file AthMonitorAlgorithm.cxx.

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

◆ getGroup()

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

Get a specific monitoring tool from the tool handle array.

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

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

Definition at line 168 of file AthMonitorAlgorithm.cxx.

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

◆ getL1Menu()

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

Definition at line 2056 of file CpmSimMonitorAlgorithm.cxx.

2056 {
2057 const TrigConf::L1Menu* menu = nullptr;
2058 if (detStore()->contains<TrigConf::L1Menu>(m_L1MenuKey.key())) {
2059 SG::ReadHandle<TrigConf::L1Menu> l1MenuHandle = SG::makeHandle( m_L1MenuKey, ctx );
2060 if( l1MenuHandle.isValid() ){
2061 menu=l1MenuHandle.cptr();
2062 }
2063 } else {
2064 menu = &(m_configSvc->l1Menu(ctx));
2065 }
2066
2067 return menu;
2068}
ServiceHandle< TrigConf::ITrigConfigSvc > m_configSvc
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
const std::string & key() const
Return the StoreGate ID for the referenced object.
L1 menu configuration.
Definition L1Menu.h:28
make the sidebar many part of the config
Definition hcg.cxx:552
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114

◆ getTrigDecisionTool()

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

Get the trigger decision tool member.

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

Returns
m_trigDecTool

Definition at line 198 of file AthMonitorAlgorithm.cxx.

198 {
199 return m_trigDecTool;
200}

◆ initialize()

StatusCode 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());
32 ATH_CHECK(m_cpmTowerLocationOverlap.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
38 ATH_CHECK(m_errorLocation.initialize());
39
40 ATH_CHECK( m_L1MenuKey.initialize() );
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}
virtual StatusCode initialize() override
initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ isClonable()

◆ limitedRoiSet() [1/2]

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

Definition at line 2022 of file CpmSimMonitorAlgorithm.cxx.

2022 {
2023
2024 int limitedRoi = 0;
2026 xAOD::RODHeaderContainer::const_iterator rodIterE = rodTES->end();
2027 for (; rodIter != rodIterE; ++rodIter) {
2028 const xAOD::RODHeader *rod = *rodIter;
2029 const int rodCrate = rod->crate() - 8;
2030 if (rodCrate >= 0 && rodCrate < m_crates && rod->dataType() == 1 &&
2031 rod->limitedRoISet()) {
2032 limitedRoi |= (1 << rodCrate);
2033 }
2034 }
2035 return (((limitedRoi >> crate) & 0x1) == 1);
2036}
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
RODHeader_v2 RODHeader
Define the latest version of the RODHeader class.

◆ limitedRoiSet() [2/2]

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

Definition at line 2038 of file CpmSimMonitorAlgorithm.cxx.

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

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ parseList()

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

Parse a string into a vector.

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

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

Definition at line 345 of file AthMonitorAlgorithm.cxx.

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

◆ renounce()

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

Definition at line 380 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

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

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

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

◆ setupMap() [1/5]

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

Definition at line 1873 of file CpmSimMonitorAlgorithm.cxx.

1874 {
1877 for (; pos != posE; ++pos) {
1878 const int crate = (*pos)->crate();
1879 const int cmx = (*pos)->cmx();
1880 const int source = (*pos)->sourceComponent();
1881 const int key = (crate * 2 + cmx) * 8 + source;
1882 map.insert(std::make_pair(key, *pos));
1883 }
1884 return StatusCode::SUCCESS;
1885}
STL class.

◆ setupMap() [2/5]

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

Definition at line 1845 of file CpmSimMonitorAlgorithm.cxx.

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

◆ setupMap() [3/5]

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

Definition at line 1824 of file CpmSimMonitorAlgorithm.cxx.

1825 {
1826 if (coll) {
1829 for (; pos != posE; ++pos) {
1830 const int crate = (*pos)->crate();
1831 const int cpm = (*pos)->cpm();
1832 const int chip = (*pos)->chip();
1833 const int loc = (*pos)->location();
1834 const int type = (*pos)->type();
1835 const int key =
1836 (((((((type << 2) | crate) << 4) | cpm) << 3) | chip) << 3) | loc;
1837 map.insert(std::make_pair(key, *pos));
1838 }
1839 }
1840 return StatusCode::SUCCESS;
1841}
ElementLink_p1< typename GenerateELinkIndexType_p1< typename LINK::index_type >::type > type

◆ setupMap() [4/5]

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

Definition at line 1807 of file CpmSimMonitorAlgorithm.cxx.

1807 {
1808
1809 LVL1::TriggerTowerKey towerKey;
1812 for (; pos != posE; ++pos) {
1813 CpmTowerMap::mapped_type cp = (*pos);
1814 const double eta = (*pos)->eta();
1815 const double phi = (*pos)->phi();
1816 const int key = towerKey.ttKey(phi, eta);
1817 map.insert(std::make_pair(key, cp));
1818 }
1819 return StatusCode::SUCCESS;
1820}
The TriggerTowerKey object provides the key for each trigger tower depending on its eta-phi coords.
virtual unsigned int ttKey(const TriggerTower &tower)
returns the key of the passed tower

◆ setupMap() [5/5]

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

Definition at line 1772 of file CpmSimMonitorAlgorithm.cxx.

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

◆ simulate() [1/5]

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

Definition at line 1889 of file CpmSimMonitorAlgorithm.cxx.

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

◆ simulate() [2/5]

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

Definition at line 1938 of file CpmSimMonitorAlgorithm.cxx.

1939 {
1940
1941 ATH_MSG_DEBUG("Simulate CPM TOB RoIs from CPM Towers");
1942
1943 m_cpmTool->findCPMTobRoIs(getL1Menu(ctx), towers, rois, 1);
1944}

◆ simulate() [3/5]

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

Definition at line 1976 of file CpmSimMonitorAlgorithm.cxx.

1977 {
1978
1979 ATH_MSG_DEBUG("Simulate CMX Total Hit sums from Remote/Local");
1980
1981 m_cpCmxTool->formCMXCPHitsSystem(hitsIn, hitsOut);
1982}

◆ simulate() [4/5]

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

Definition at line 1958 of file CpmSimMonitorAlgorithm.cxx.

1961 {
1962
1963 ATH_MSG_DEBUG("Simulate CMX Hit sums from CMX TOBs");
1964
1965
1967 m_cpCmxTool->formCMXCPHitsCrate(getL1Menu(ctx), tobs, hits);
1969 m_cpCmxTool->formCMXCPHitsTopo(tobs, hits);
1970 }
1971
1972}

◆ simulate() [5/5]

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

Definition at line 1948 of file CpmSimMonitorAlgorithm.cxx.

1949 {
1950
1951 ATH_MSG_DEBUG("Simulate CMX TOBs from CPM TOB RoIs");
1952
1953 m_cpCmxTool->formCMXCPTob(rois, tobs);
1954}

◆ sysExecute()

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

Execute an algorithm.

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

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysStart()

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

Handle START transition.

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

◆ thresholdsDiff()

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

Definition at line 1755 of file CpmSimMonitorAlgorithm.cxx.

1757{
1758 int result = 0;
1759 const int mask = (1 << nBits) - 1;
1760 for (int thr = 0; thr < nThresh; ++thr) {
1761 const int hit1 = (val1 >> (nBits*thr)) & mask;
1762 const int hit2 = (val2 >> (nBits*thr)) & mask;
1763 if (hit1 != hit2) result |= (1 << thr);
1764 }
1765 return result;
1766}

◆ thresholdsSame()

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

Definition at line 1740 of file CpmSimMonitorAlgorithm.cxx.

1742{
1743 int result = 0;
1744 const int mask = (1 << nBits) - 1;
1745 for (int thr = 0; thr < nThresh; ++thr) {
1746 const int hit1 = (val1 >> (nBits*thr)) & mask;
1747 const int hit2 = (val2 >> (nBits*thr)) & mask;
1748 if (hit1 && (hit1 == hit2)) result |= (1 << thr);
1749 }
1750 return result;
1751}

◆ trigChainsArePassed()

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

Check whether triggers are passed.

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

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

Definition at line 203 of file AthMonitorAlgorithm.cxx.

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

◆ ttCheck()

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

Definition at line 1996 of file CpmSimMonitorAlgorithm.cxx.

1997{
1998 const LVL1::DataError emError(tt->emError());
1999 const LVL1::DataError hadError(tt->hadError());
2000 const int emParity = emError.get(LVL1::DataError::Parity);
2001 const int hadParity = hadError.get(LVL1::DataError::Parity);
2002 if ((emParity && tt->emEnergy()) || (hadParity && tt->hadEnergy())) {
2003 const int peak = tt->peak();
2004 std::vector<uint8_t> emEnergyVec(tt->emEnergyVec());
2005 std::vector<uint8_t> hadEnergyVec(tt->hadEnergyVec());
2006 std::vector<uint32_t> emErrorVec(tt->emErrorVec());
2007 std::vector<uint32_t> hadErrorVec(tt->hadErrorVec());
2008 if (emParity)
2009 emEnergyVec[peak] = 0;
2010 if (hadParity)
2011 hadEnergyVec[peak] = 0;
2012 xAOD::CPMTower *ct = new xAOD::CPMTower();
2013 ct->makePrivateStore();
2014 ct->initialize(tt->eta(), tt->phi(), emEnergyVec, hadEnergyVec, emErrorVec,
2015 hadErrorVec, peak);
2016 coll->push_back(ct);
2017 return ct;
2018 }
2019 return tt;
2020}
value_type push_back(value_type pElem)
Add an element to the end of the collection.

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ ATLAS_THREAD_SAFE [1/4]

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

Definition at line 183 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 184 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 185 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 186 of file CpmSimMonitorAlgorithm.h.

◆ cfg

CpmSimMonitorAlgorithm.cfg = MainServicesSerialCfg()

Definition at line 515 of file CpmSimMonitorAlgorithm.py.

◆ CpmSimMonitorCfg

CpmSimMonitorAlgorithm.CpmSimMonitorCfg = CpmSimMonitoringConfig(flags)

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 = initConfigFlags()

Definition at line 506 of file CpmSimMonitorAlgorithm.py.

◆ HISTFileName

CpmSimMonitorAlgorithm.HISTFileName

Definition at line 508 of file CpmSimMonitorAlgorithm.py.

◆ inputs

CpmSimMonitorAlgorithm.inputs = glob.glob('/eos/atlas/atlascerngroupdisk/data-art/build-output/master/Athena/x86_64-centos7-gcc8-opt/2020-04-06T2139/TrigP1Test/test_trigP1_v1PhysP1_T0Mon_build/ESD.pool.root')

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 81 of file CpmSimMonitorAlgorithm.h.

81{this, "CMXCPHitsLocation", LVL1::TrigT1CaloDefs::CMXCPHitsLocation, "CMX CP Hits container"};
static const std::string CMXCPHitsLocation

◆ m_cmxCpTobLocation

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

Definition at line 80 of file CpmSimMonitorAlgorithm.h.

80{this, "CMXCPTobLocation", LVL1::TrigT1CaloDefs::CMXCPTobLocation, "CMX CP Tob container"};
static const std::string CMXCPTobLocation

◆ m_cmxs

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

Definition at line 60 of file CpmSimMonitorAlgorithm.h.

60{this,"s_cmxs", 2, "Number of CMXs"};

◆ m_configSvc

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

Definition at line 49 of file CpmSimMonitorAlgorithm.h.

49{this, "TrigConfigSvc", "TrigConf::xAODConfigSvc/xAODConfigSvc"};

◆ m_cpCmxTool

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

Definition at line 88 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 79 of file CpmSimMonitorAlgorithm.h.

79{this, "CPMTobRoILocation", LVL1::TrigT1CaloDefs::CPMTobRoILocation, "CPM RoI container"};
static const std::string CPMTobRoILocation

◆ m_cpmTool

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

Definition at line 90 of file CpmSimMonitorAlgorithm.h.

◆ m_cpmTowerLocation

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

Definition at line 77 of file CpmSimMonitorAlgorithm.h.

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

◆ m_cpmTowerLocationOverlap

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

Definition at line 78 of file CpmSimMonitorAlgorithm.h.

78{this, "CPMTowerLocationOverlap",LVL1::TrigT1CaloDefs::CPMTowerLocation + "Overlap", "CPM Overlap container"};

◆ m_crates

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

Definition at line 57 of file CpmSimMonitorAlgorithm.h.

57{this,"s_crates", 4, "Number of CPM crates"};

◆ m_dataType

AthMonitorAlgorithm::DataType_t AthMonitorAlgorithm::m_dataType
protectedinherited

Instance of the DataType_t enum.

Definition at line 356 of file AthMonitorAlgorithm.h.

◆ m_dataTypeStr

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

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

Definition at line 358 of file AthMonitorAlgorithm.h.

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

◆ m_defaultLBDuration

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

Default duration of one lumi block.

Definition at line 365 of file AthMonitorAlgorithm.h.

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

◆ m_detailLevel

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

Sets the level of detail used in the monitoring.

Definition at line 366 of file AthMonitorAlgorithm.h.

366{this,"DetailLevel",0};

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DQFilterTools

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

Array of Data Quality filter tools.

Definition at line 346 of file AthMonitorAlgorithm.h.

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

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 374 of file AthMonitorAlgorithm.h.

◆ m_enforceExpressTriggers

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

Definition at line 377 of file AthMonitorAlgorithm.h.

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

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

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

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

Definition at line 357 of file AthMonitorAlgorithm.h.

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

◆ m_errorLocation

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

Definition at line 55 of file CpmSimMonitorAlgorithm.h.

55{this,"ErrorLocation","L1CaloCPMMismatchVector","ErrorVector"};

◆ m_errorTool

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

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

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

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fileKey

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

Internal Athena name for file.

Definition at line 363 of file AthMonitorAlgorithm.h.

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

◆ m_L1MenuKey

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

Definition at line 84 of file CpmSimMonitorAlgorithm.h.

84{ this, "L1TriggerMenu", "DetectorStore+L1TriggerMenu", "L1 Menu" };

◆ m_lbDurationDataKey

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

Definition at line 350 of file AthMonitorAlgorithm.h.

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

◆ m_legacyCpHadInputsDisabled

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

Definition at line 62 of file CpmSimMonitorAlgorithm.h.

62{this,"s_legacyCpHadInputsDisabled", false, "Status of the L1Calo Legacy CP hadronic inputs"};

◆ m_lumiDataKey

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

Definition at line 348 of file AthMonitorAlgorithm.h.

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

◆ m_maxSlices

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

Definition at line 59 of file CpmSimMonitorAlgorithm.h.

59{this,"s_maxSlices", 5, "Maximum number of slices"};

◆ 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 58 of file CpmSimMonitorAlgorithm.h.

58{this,"s_modules", 14, "Number of modules per crate (modules numbered 1-14)"};

◆ m_mutex

std::mutex CpmSimMonitorAlgorithm::m_mutex {}
mutableprivate

Definition at line 182 of file CpmSimMonitorAlgorithm.h.

182{};

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_overlapPresent

bool CpmSimMonitorAlgorithm::m_overlapPresent
private

Definition at line 65 of file CpmSimMonitorAlgorithm.h.

◆ m_packageName

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

Definition at line 52 of file CpmSimMonitorAlgorithm.h.

52{this,"PackageName","CpmSimMonitor","group name for histograming"};

◆ m_rodHeaderLocation

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

Definition at line 82 of file CpmSimMonitorAlgorithm.h.

82{this, "RodHeaderLocation", LVL1::TrigT1CaloDefs::RODHeaderLocation, "Rod header container"};
static const std::string RODHeaderLocation

◆ m_toolLookupMap

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

Definition at line 372 of file AthMonitorAlgorithm.h.

◆ m_tools

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

Array of Generic Monitoring Tools.

Definition at line 341 of file AthMonitorAlgorithm.h.

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

◆ m_trigDecTool

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

Tool to tell whether a specific trigger is passed.

Definition at line 345 of file AthMonitorAlgorithm.h.

◆ m_triggerChainString

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

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

Definition at line 360 of file AthMonitorAlgorithm.h.

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

◆ m_triggerTowerLocation

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

Definition at line 76 of file CpmSimMonitorAlgorithm.h.

76{this, "BS_xAODTriggerTowerContainer",LVL1::TrigT1CaloDefs::xAODTriggerTowerLocation,"TriggerTower Location"};
static const std::string xAODTriggerTowerLocation

◆ m_trigLiveFractionDataKey

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

Definition at line 352 of file AthMonitorAlgorithm.h.

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

◆ m_useLumi

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

Allows use of various luminosity functions.

Definition at line 364 of file AthMonitorAlgorithm.h.

364{this,"EnableLumi",false};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

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

Vector of trigger chain names parsed from trigger chain string.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ nevents

int CpmSimMonitorAlgorithm.nevents = -1

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: