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

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

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

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

◆ 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())
save(self, fileName="./columbo.out")
Definition checkTP.py:176
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 1715 of file CpmSimMonitorAlgorithm.cxx.

1719{
1720 if (val) {
1721 const int mask = (1 << nBits) - 1;
1722 for (int thr = 0; thr < nThresh; ++thr) {
1723 const int hit = (val >> (nBits*thr)) & mask;
1724 if (hit) {
1725 xitem=x;
1726 yitem=thr+offset;
1727 witem=hit;
1728 fill(m_packageName, xitem, yitem, witem);
1729 }
1730 }
1731 }
1732}
#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 1981 of file CpmSimMonitorAlgorithm.cxx.

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

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

2052 {
2053 const TrigConf::L1Menu* menu = nullptr;
2054 if (detStore()->contains<TrigConf::L1Menu>(m_L1MenuKey.key())) {
2055 SG::ReadHandle<TrigConf::L1Menu> l1MenuHandle = SG::makeHandle( m_L1MenuKey, ctx );
2056 if( l1MenuHandle.isValid() ){
2057 menu=l1MenuHandle.cptr();
2058 }
2059 } else {
2060 menu = &(m_configSvc->l1Menu(ctx));
2061 }
2062
2063 return menu;
2064}
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 2018 of file CpmSimMonitorAlgorithm.cxx.

2018 {
2019
2020 int limitedRoi = 0;
2022 xAOD::RODHeaderContainer::const_iterator rodIterE = rodTES->end();
2023 for (; rodIter != rodIterE; ++rodIter) {
2024 const xAOD::RODHeader *rod = *rodIter;
2025 const int rodCrate = rod->crate() - 8;
2026 if (rodCrate >= 0 && rodCrate < m_crates && rod->dataType() == 1 &&
2027 rod->limitedRoISet()) {
2028 limitedRoi |= (1 << rodCrate);
2029 }
2030 }
2031 return (((limitedRoi >> crate) & 0x1) == 1);
2032}
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 2034 of file CpmSimMonitorAlgorithm.cxx.

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

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

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

◆ setupMap() [2/5]

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

Definition at line 1841 of file CpmSimMonitorAlgorithm.cxx.

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

◆ setupMap() [3/5]

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

Definition at line 1820 of file CpmSimMonitorAlgorithm.cxx.

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

1803 {
1804
1805 LVL1::TriggerTowerKey towerKey;
1808 for (; pos != posE; ++pos) {
1809 CpmTowerMap::mapped_type cp = (*pos);
1810 const double eta = (*pos)->eta();
1811 const double phi = (*pos)->phi();
1812 const int key = towerKey.ttKey(phi, eta);
1813 map.insert(std::make_pair(key, cp));
1814 }
1815 return StatusCode::SUCCESS;
1816}
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 1768 of file CpmSimMonitorAlgorithm.cxx.

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

◆ simulate() [1/5]

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

Definition at line 1885 of file CpmSimMonitorAlgorithm.cxx.

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

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

◆ simulate() [3/5]

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

Definition at line 1972 of file CpmSimMonitorAlgorithm.cxx.

1973 {
1974
1975 ATH_MSG_DEBUG("Simulate CMX Total Hit sums from Remote/Local");
1976
1977 m_cpCmxTool->formCMXCPHitsSystem(hitsIn, hitsOut);
1978}

◆ simulate() [4/5]

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

Definition at line 1954 of file CpmSimMonitorAlgorithm.cxx.

1957 {
1958
1959 ATH_MSG_DEBUG("Simulate CMX Hit sums from CMX TOBs");
1960
1961
1963 m_cpCmxTool->formCMXCPHitsCrate(getL1Menu(ctx), tobs, hits);
1965 m_cpCmxTool->formCMXCPHitsTopo(tobs, hits);
1966 }
1967
1968}

◆ simulate() [5/5]

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

Definition at line 1944 of file CpmSimMonitorAlgorithm.cxx.

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

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

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

◆ thresholdsSame()

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

Definition at line 1736 of file CpmSimMonitorAlgorithm.cxx.

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

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

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