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

#include <ZdcMonitorAlgorithm.h>

Inheritance diagram for ZdcMonitorAlgorithm:

Public Types

enum  DecodingErrors { NoDecodingErrorBit = 0 , ZDCDecodingErrorBit = 1 , RPDDecodingErrorBit = 2 }
enum  UCCTriggers {
  UCCTrigEnabledBit = 0 , TrigHELT50Bit = 1 , TrigHELT35Bit = 2 , TrigHELT25Bit = 3 ,
  TrigHELT20Bit = 4 , TrigHELT15Bit = 5 , UCCTrigDisabledBit = 6
}
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

 ZdcMonitorAlgorithm (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~ZdcMonitorAlgorithm ()
virtual StatusCode initialize () override
 initialize
virtual StatusCode fillHistograms (const EventContext &ctx) const override
 adds event to the monitoring histograms
StatusCode fillPhysicsDataHistograms (const EventContext &ctx) const
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

int module_FPGA_max_ADC = 4096
 flags = initConfigFlags()
str directory = ''
str inputfile = 'AOD.pool.root'
 Files
 parser = flags.getArgumentParser()
 default
 help
 None
 args = flags.fillFromArgs(parser=parser)
 useTrigger
 HISTFileName
 cfg = MainServicesCfg(flags)
 zdcMonitorAcc = ZdcMonitoringConfig(flags)
 withDetails

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

typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool check_equal_within_rounding (float a, float b, float epsilon=1e-6f) const
void calculate_log_bin_edges (float min_value, float max_value, int num_bins, std::vector< float > &bin_edges)
float calculate_inverse_bin_width (float event_value, const std::string &variable_name, const std::vector< float > &bin_edges) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

Gaudi::Property< unsigned int > m_runNumber {this, "RunNumber", 0, "Run number for current job"}
ZdcInjPulserAmpMap::Token m_injMapRunToken {}
Gaudi::Property< std::string > m_zdcModuleContainerName {this, "ZdcModuleContainerName", "ZdcModules", "Location of ZDC processed data"}
Gaudi::Property< std::string > m_zdcSumContainerName {this, "ZdcSumContainerName", "ZdcSums", "Location of ZDC processed sums"}
Gaudi::Property< std::string > m_auxSuffix {this, "AuxSuffix", "", "Append this tag onto end of AuxData"}
Gaudi::Property< float > m_expected1N {this, "Expected1NADC", 1000., "Expected 1N position in ADC"}
Gaudi::Property< float > m_energyCutForModuleFractMonitor {this, "EnergyCutForModuleFractMonitor", 13400., "Minimum energy sum required on each side for event to enter module fraction monitoring (default at 5 * 2680 GeV)"}
Gaudi::Property< float > m_ZDCEnergyCutForCentroidValidBitMonitor {this, "ZDCEnergyCutForCentroidValidBitMonitor", 13400., "Minimum energy required in ZDC for event to enter centroid valid bit monitoring (default at 5 * 2680 GeV)"}
Gaudi::Property< float > m_moduleChisqHistMinValue {this, "ZDCModuleChisqHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq distribution"}
Gaudi::Property< float > m_moduleChisqHistMaxvalue {this, "ZDCModuleChisqHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq distribution"}
Gaudi::Property< float > m_moduleChisqHistNumBins {this, "ZDCModuleChisqHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq distribution"}
Gaudi::Property< float > m_moduleChisqOverAmpHistMinValue {this, "ZDCModuleChisqOverAmpHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq over amplitude distribution"}
Gaudi::Property< float > m_moduleChisqOverAmpHistMaxvalue {this, "ZDCModuleChisqOverAmpHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq over amplitude distribution"}
Gaudi::Property< float > m_moduleChisqOverAmpHistNumBins {this, "ZDCModuleChisqOverAmpHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq over amplitude distribution"}
Gaudi::Property< std::string > m_triggerSideA {this, "triggerSideA", "L1_ZDC_A", "Trigger on side A, needed for 1N-peak monitoring on side C"}
Gaudi::Property< std::string > m_triggerSideC {this, "triggerSideC", "L1_ZDC_C", "Trigger on side C, needed for 1N-peak monitoring on side A"}
Gaudi::Property< std::string > m_UCCtriggerHELT15 {this, "triggerUCCHELT15", "L1_ZDC_HELT15_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 15 TeV"}
Gaudi::Property< std::string > m_UCCtriggerHELT20 {this, "triggerUCCHELT20", "L1_ZDC_HELT20_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 20 TeV"}
Gaudi::Property< std::string > m_UCCtriggerHELT25 {this, "triggerUCCHELT25", "L1_ZDC_HELT25_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 25 TeV"}
Gaudi::Property< std::string > m_UCCtriggerHELT35 {this, "triggerUCCHELT35", "L1_ZDC_HELT35_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 35 TeV"}
Gaudi::Property< std::string > m_UCCtriggerHELT50 {this, "triggerUCCHELT50", "L1_ZDC_HELT50_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 50 TeV"}
Gaudi::Property< unsigned int > m_nSecondsRejectStartofLBInjectorPulse {this, "NSecondsRejectStartofLBInjectorPulse", 3, "The number of seconds to reject at beginning of each LB in reco-amp-vs-input-voltage histograms in the injector pulse stream"}
Gaudi::Property< float > m_minAmpRequiredHGInjectorPulse {this, "MinAmpRequiredHGInjectorPulse", 20, "HG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"}
Gaudi::Property< float > m_minAmpRequiredLGInjectorPulse {this, "MinAmpRequiredLGInjectorPulse", 20, "LG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"}
Gaudi::Property< float > m_minVInjToImposeAmpRequirementHGInjectorPulse {this, "MinVInjToImposeAmpRequirementHGInjectorPulse", 0.002, "Minimum input voltage to impose HG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel HG minimum-amplitude requirement"}
Gaudi::Property< float > m_minVInjToImposeAmpRequirementLGInjectorPulse {this, "MinVInjToImposeAmpRequirementLGInjectorPulse", 0.002, "Minimum input voltage to impose LG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel LG minimum-amplitude requirement"}
Gaudi::Property< float > m_minVInjToEvaluateLowAmpPercentageDQInjectorPulse {this, "MinVInjToEvaluateLowAmpPercentageDQInjectorPulse", 0.04, "Minimum input voltage required for events to be plotted in "}
Gaudi::Property< std::vector< std::string > > m_OOpOtriggerChains {this, "OOpOTriggers", {}, "List of trigger chains to monitor"}
Gaudi::Property< std::map< int, std::string > > m_OOpOL1TriggerFromCTPIDMap {this, "OOpOL1TriggerFromCTPIDMap", {}, "Map of CTP ID to trigger name for ZdcCalib PEB stream pO/OO monitoring"}
Gaudi::Property< std::string > m_lbTimeCoolFolderName { this, "LumiBlockTimeCoolFolderName", "/TRIGGER/LUMI/LBLB", "COOL folder in COOLONL_TRIGGER holding info about start and stop times for luminosity blocks" }
std::map< std::string, int > m_ZDCSideToolIndices
std::map< std::string, std::map< std::string, int > > m_ZDCModuleToolIndices
std::map< std::string, std::map< std::string, int > > m_RPDChannelToolIndices
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_LucrodResponseSingleVoltageToolIndices
std::vector< float > m_ZdcModuleChisqBinEdges
std::vector< float > m_ZdcModuleChisqOverAmpBinEdges
std::shared_ptr< ZdcInjPulserAmpMapm_zdcInjPulserAmpMap
Gaudi::Property< bool > m_isOnline {this,"IsOnline",false}
Gaudi::Property< bool > m_isSim {this,"IsSim",false}
Gaudi::Property< bool > m_CalInfoOn {this,"CalInfoOn",false}
Gaudi::Property< bool > m_EnableZDCSingleSideTriggers {this,"EnableZDCSingleSideTriggers",true}
Gaudi::Property< bool > m_EnableUCCTriggers {this,"EnableUCCTriggers",false}
Gaudi::Property< bool > m_EnableOOpOTriggers {this,"EnableOOpOTriggers",false}
Gaudi::Property< bool > m_IsPEBStream {this,"IsPEBStream",true}
Gaudi::Property< bool > m_isPPMode {this,"IsPPMode",true}
Gaudi::Property< bool > m_ispOMode {this,"IspOMode",true}
Gaudi::Property< bool > m_isOOMode {this,"IsOOMode",true}
Gaudi::Property< bool > m_isInjectedPulse {this,"IsInjectedPulse",false}
Gaudi::Property< bool > m_isStandalone {this,"IsStandalone",false}
Gaudi::Property< bool > m_enableZDC {this,"EnableZDC",true}
Gaudi::Property< bool > m_enableZDCPhysics {this,"EnableZDCPhysics",true}
Gaudi::Property< bool > m_enableRPD {this,"EnableRPD",true}
Gaudi::Property< bool > m_enableRPDAmp {this,"EnableRPDAmp",true}
Gaudi::Property< bool > m_enableCentroid {this,"EnableCentroid",true}
Gaudi::Property< bool > m_isCommRun {this,"IsCommRun",false}
Gaudi::Property< std::vector< float > > m_injPulseVoltageSteps {this, "InjPulseVoltageSteps", {0.}}
Gaudi::Property< std::vector< std::string > > m_injPulseVoltageStepsStr {this, "InjPulseVoltageStepsStr", {""}}
SG::ReadHandleKey< xAOD::ZdcModuleContainerm_ZdcSumContainerKey {this, "ZdcSumContainerKey", "ZdcSums"}
SG::ReadHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleContainerKey {this, "ZdcModuleContainerKey", "ZdcModules"}
SG::ReadHandleKey< xAOD::HIEventShapeContainerm_HIEventShapeContainerKey {this, "HIEventShapeContainerKey", "HIEventShape"}
SG::ReadCondHandleKey< AthenaAttributeListm_LBLBFolderInputKey { this, "LBLBFolderInputKey", "/TRIGGER/LUMI/LBLB" }
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_eventTypeKey {this, "ZdcEventTypeKey", m_zdcSumContainerName + ".EventType" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_DAQModeKey {this, "ZdcDAQModeKey", m_zdcSumContainerName + ".DAQMode" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcSumCalibEnergyKey {this, "ZdcSumCalibEnergyKey", m_zdcSumContainerName + ".CalibEnergy" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcSumAverageTimeKey {this, "ZdcSumAverageTimeKey", m_zdcSumContainerName + ".AverageTime" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcSumUncalibSumKey {this, "ZdcSumUncalibSumKey", m_zdcSumContainerName + ".UncalibSum" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcSumModuleMaskKey {this, "ZdcSumModuleMaskKey", m_zdcSumContainerName + ".ModuleMask" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleStatusKey {this, "ZdcModuleStatusKey", m_zdcModuleContainerName + ".Status" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleAmplitudeKey {this, "ZdcModuleAmplitudeKey", m_zdcModuleContainerName + ".Amplitude" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleTimeKey {this, "ZdcModuleTimeKey", m_zdcModuleContainerName + ".Time" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleAmpNoNonLinKey {this, "ZdcModuleAmpNoNonLinKey", m_zdcModuleContainerName + ".AmpNoNonLin" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleFitAmpKey {this, "ZdcModuleFitAmpKey", m_zdcModuleContainerName + ".FitAmp" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleFitT0Key {this, "ZdcModuleFitT0Key", m_zdcModuleContainerName + ".FitT0" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleChisqKey {this, "ZdcModuleChisqKey", m_zdcModuleContainerName + ".Chisq" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleCalibEnergyKey {this, "ZdcModuleCalibEnergyKey", m_zdcModuleContainerName + ".CalibEnergy" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleCalibTimeKey {this, "ZdcModuleCalibTimeKey", m_zdcModuleContainerName + ".CalibTime" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleMaxADCKey {this, "ZdcModuleMaxADCKey", m_zdcModuleContainerName + ".MaxADC" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleMaxADCHGKey {this, "ZdcModuleMaxADCHGKey", m_zdcModuleContainerName + ".MaxADCHG" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleMaxADCLGKey {this, "ZdcModuleMaxADCLGKey", m_zdcModuleContainerName + ".MaxADCLG" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleFitAmpLGRefitKey {this, "ZdcModuleFitAmpLGRefitKey", m_zdcModuleContainerName + ".FitAmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleAmpLGRefitKey {this, "ZdcModuleAmpLGRefitKey", m_zdcModuleContainerName + ".AmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleT0LGRefitKey {this, "ZdcModuleT0LGRefitKey", m_zdcModuleContainerName + ".T0LGRefit" + m_auxSuffix, "ZDC module fit t0 LG refit"}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleT0SubLGRefitKey {this, "ZdcModuleT0SubLGRefitKey", m_zdcModuleContainerName + ".T0SubLGRefit" + m_auxSuffix, "ZDC module subtracted t0 LG refit"}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_ZdcModuleChisqLGRefitKey {this, "ZdcModuleChisqLGRefitKey", m_zdcModuleContainerName + ".ChisqLGRefit" + m_auxSuffix, "ZDC module LG refit chi square"}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelAmplitudeKey {this, "RPDChannelAmplitudeKey", m_zdcModuleContainerName + ".RPDChannelAmplitude" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelAmplitudeCalibKey {this, "RPDChannelAmplitudeCalibKey", m_zdcModuleContainerName + ".RPDChannelAmplitudeCalib" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelMaxADCKey {this, "RPDChannelMaxADCKey", m_zdcModuleContainerName + ".RPDChannelMaxADC" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelMaxSampleKey {this, "RPDChannelMaxSampleKey", m_zdcModuleContainerName + ".RPDChannelMaxSample" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelStatusKey {this, "RPDChannelStatusKey", m_zdcModuleContainerName + ".RPDChannelStatus" + m_auxSuffix}
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelPileupExpFitParamsKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelPileupFracKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDChannelSubtrAmpKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDSubtrAmpSumKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDxCentroidKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDyCentroidKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDreactionPlaneAngleKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDcosDeltaReactionPlaneAngleKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDcentroidStatusKey
SG::ReadDecorHandleKey< xAOD::ZdcModuleContainerm_RPDSideStatusKey
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

Static Private Attributes

static const int m_nSides = 2
static const int m_nModules = 4
static const int m_nChannels = 16
static const int m_nDecodingErrorBits = 3
static const int m_nUCCTrigBits = 7
static const int m_nZdcStatusBits = 18
static const int m_nRpdStatusBits = 15
static const int m_nRpdCentroidStatusBits = 21

Detailed Description

Definition at line 28 of file ZdcMonitorAlgorithm.h.

Member Typedef Documentation

◆ MonVarVec_t

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

Definition at line 370 of file AthMonitorAlgorithm.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

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

◆ DecodingErrors

enum ZdcMonitorAlgorithm::DecodingErrors
Enumerator
NoDecodingErrorBit 
ZDCDecodingErrorBit 
RPDDecodingErrorBit 

Definition at line 30 of file ZdcMonitorAlgorithm.h.

30 {
31 NoDecodingErrorBit = 0,
32 ZDCDecodingErrorBit = 1,
33 RPDDecodingErrorBit = 2
34 };

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

◆ UCCTriggers

enum ZdcMonitorAlgorithm::UCCTriggers
Enumerator
UCCTrigEnabledBit 
TrigHELT50Bit 
TrigHELT35Bit 
TrigHELT25Bit 
TrigHELT20Bit 
TrigHELT15Bit 
UCCTrigDisabledBit 

Definition at line 35 of file ZdcMonitorAlgorithm.h.

35 {
36 UCCTrigEnabledBit = 0,
37 TrigHELT50Bit = 1,
38 TrigHELT35Bit = 2,
39 TrigHELT25Bit = 3,
40 TrigHELT20Bit = 4,
41 TrigHELT15Bit = 5,
42 UCCTrigDisabledBit = 6
43 };

Constructor & Destructor Documentation

◆ ZdcMonitorAlgorithm()

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

Definition at line 15 of file ZdcMonitorAlgorithm.cxx.

16:AthMonitorAlgorithm(name,pSvcLocator){
17 ATH_MSG_DEBUG("calling the constructor of ZdcMonitorAlgorithm");
18}
#define ATH_MSG_DEBUG(x)
Base class for Athena Monitoring Algorithms.

◆ ~ZdcMonitorAlgorithm()

ZdcMonitorAlgorithm::~ZdcMonitorAlgorithm ( )
virtual

Definition at line 21 of file ZdcMonitorAlgorithm.cxx.

21{}

Member Function Documentation

◆ calculate_inverse_bin_width()

float ZdcMonitorAlgorithm::calculate_inverse_bin_width ( float event_value,
const std::string & variable_name,
const std::vector< float > & bin_edges ) const
private

Definition at line 47 of file ZdcMonitorAlgorithm.cxx.

47 {
48 // Check if the event_value is out of range
49 if (event_value < bin_edges.front() || event_value > bin_edges.back()) { // changed output level to debug: this is not uncommon
50 ATH_MSG_DEBUG("In calculation of inverse-bin-width event weight for the variable " << variable_name << ", the current event value " << event_value << " is out of the bin range.");
51 ATH_MSG_DEBUG("Assign zero weight for the current event (event not filled).");
52 return 0.0; // event weight is zero
53 }
54
55 // Find the bin in which event_value falls
56 for (size_t i = 0; i < bin_edges.size() - 1; ++i) {
57 if (event_value >= bin_edges[i] && event_value < bin_edges[i + 1]) {
58 float bin_width = bin_edges[i + 1] - bin_edges[i];
59 if (bin_width != 0) {
60 return 1.0f / bin_width; // Return the inverse of bin width
61 } else {
62 ATH_MSG_WARNING("Warning: in calculation of inverse-bin-width event weight for the variable " << variable_name << ", bin width containing the event value " << event_value << " is zero.");
63 ATH_MSG_WARNING("Assign zero weight for the current event (event not filled).");
64 return 0.0; // event weight is zero
65 }
66 }
67 }
68
69 // Handle edge case where event_value == bin_edges.back()
70 if (event_value == bin_edges.back()) {
71 size_t last_bin_index = bin_edges.size() - 2;
72 float bin_width = bin_edges[last_bin_index + 1] - bin_edges[last_bin_index];
73 return 1.0 / bin_width;
74 }
75
76 // If no bin is found (should not reach here)
77 ATH_MSG_WARNING("Warning: in calculation of inverse-bin-width event weight for the variable " << variable_name << ", no valid bin found for the event value " << event_value << ".");
78 ATH_MSG_WARNING("Assign zero weight for the current event (event not filled).");
79 return 0.0; // event weight is zero
80}
#define ATH_MSG_WARNING(x)

◆ calculate_log_bin_edges()

void ZdcMonitorAlgorithm::calculate_log_bin_edges ( float min_value,
float max_value,
int num_bins,
std::vector< float > & bin_edges )
private

Definition at line 28 of file ZdcMonitorAlgorithm.cxx.

28 {
29 // Clear the vector to ensure it's empty
30 bin_edges.clear();
31
32 // Calculate the logarithmic bin edges
33 float log_min = std::log10(min_value);
34 float log_max = std::log10(max_value);
35
36 // Linear space between log_min and log_max with num_bins+1 points
37 float step = (log_max - log_min) / num_bins;
38
39 // Populate the vector with the bin edges
40 for (int i = 0; i <= num_bins; ++i) {
41 float edge = log_min + i * step;
42 bin_edges.push_back(std::pow(10, edge));
43 }
44}

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

◆ check_equal_within_rounding()

bool ZdcMonitorAlgorithm::check_equal_within_rounding ( float a,
float b,
float epsilon = 1e-6f ) const
private

Definition at line 24 of file ZdcMonitorAlgorithm.cxx.

24 {
25 return std::fabs(a - b) < epsilon;
26}
static Double_t a

◆ 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}
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 ZdcMonitorAlgorithm::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 1123 of file ZdcMonitorAlgorithm.cxx.

1123 {
1124
1125 ATH_MSG_DEBUG("calling the fillHistograms function");
1126
1127 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_EventInfoKey, ctx);
1128 if (! eventInfo.isValid() || eventInfo.cptr() == nullptr) {
1129 ATH_MSG_WARNING("EventInfo handle is not valid or has null pointer!");
1130 return StatusCode::SUCCESS;
1131 }
1132
1133 unsigned int eventType = ZdcEventInfo::ZdcEventUnknown;
1134 unsigned int DAQMode = ZdcEventInfo::DAQModeUndef;
1135
1136 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> eventTypeHandle(m_eventTypeKey,ctx);
1138
1139 SG::ReadHandle<xAOD::ZdcModuleContainer> zdcSums(m_ZdcSumContainerKey, ctx);
1140
1141 if (! zdcSums.isValid() ) {
1142 ATH_MSG_WARNING("evtStore() does not contain Collection with name "<< m_ZdcSumContainerKey);
1143 return StatusCode::SUCCESS;
1144 }
1145 for (const auto zdcSum : *zdcSums) {
1146 if (zdcSum->zdcSide() == 0){
1147 if (!eventTypeHandle.isAvailable()){
1148 ATH_MSG_WARNING("The global sum entry in zdc sum container can be retrieved; but it does NOT have the variable eventType written as a decoration!");
1149 return StatusCode::SUCCESS;
1150 }
1151
1152 if (!DAQModeHandle.isAvailable()){
1153 ATH_MSG_WARNING("The global sum entry in zdc sum container can be retrieved; but it does NOT have the variable DAQMode written as a decoration!");
1154 return StatusCode::SUCCESS;
1155 }
1156
1157 eventType = eventTypeHandle(*zdcSum);
1158 DAQMode = DAQModeHandle(*zdcSum);
1159 }
1160 }
1161
1162 ATH_MSG_DEBUG("The event type is: " << eventType);
1163
1164 if (eventType == ZdcEventInfo::ZdcEventUnknown || DAQMode == ZdcEventInfo::DAQModeUndef){
1165 ATH_MSG_WARNING("The zdc sum container can be retrieved from the evtStore() but");
1166 ATH_MSG_WARNING("Either the event type or the DAQ mode is the default unknown value");
1167 ATH_MSG_WARNING("Most likely, there is no global sum (side == 0) entry in the zdc sum container");
1168 return StatusCode::SUCCESS;
1169 }
1170
1171 if (eventType == ZdcEventInfo::ZdcEventPhysics || eventType == ZdcEventInfo::ZdcSimulation){
1172 return fillPhysicsDataHistograms(ctx);
1173 }
1174
1175 ATH_MSG_WARNING("Event type should be PhysicsData/Simulation but it is NOT");
1176 return StatusCode::SUCCESS;
1177}
Handle class for reading a decoration on an object.
StatusCode fillPhysicsDataHistograms(const EventContext &ctx) const

◆ fillPhysicsDataHistograms()

StatusCode ZdcMonitorAlgorithm::fillPhysicsDataHistograms ( const EventContext & ctx) const

Definition at line 202 of file ZdcMonitorAlgorithm.cxx.

202 {
203 ATH_MSG_DEBUG("calling the fillPhysicsDataHistograms function");
204
205// ______________________________________________________________________________
206 // EVENT-level flags for whether ZDC, RPD and RPDCentroid data is available
207 // needed for events with LUCROD decoding error - will have missing aux data
208 bool cur_event_ZDC_available = true;
209 bool cur_event_RPD_available = true;
210 bool cur_event_RPDCentroid_available = true;
211
212// ______________________________________________________________________________
213
214// ______________________________________________________________________________
215 // declaring & obtaining event-level information of interest
216// ______________________________________________________________________________
217 SG::ReadHandle<xAOD::EventInfo> eventInfo(m_EventInfoKey, ctx);
218
219 // already checked in fillHistograms that eventInfo is valid
220 auto lumiBlock = Monitored::Scalar<uint32_t>("lumiBlock", eventInfo->lumiBlock());
221 auto bcid = Monitored::Scalar<unsigned int>("bcid", eventInfo->bcid());
222 uint32_t eventTime = eventInfo->timeStamp();
223 uint32_t runNumber = eventInfo->runNumber();
224
225// ______________________________________________________________________________
226 // check for decoding errors
227// ______________________________________________________________________________
228 bool zdcDecodingError = eventInfo->isEventFlagBitSet(xAOD::EventInfo::ForwardDet, ZdcEventInfo::ZDCDECODINGERROR );
229 bool rpdDecodingError = eventInfo->isEventFlagBitSet(xAOD::EventInfo::ForwardDet, ZdcEventInfo::RPDDECODINGERROR );
230 std::array<float, m_nDecodingErrorBits> decodingErrorBitsArr = {0, 0, 0};
231
232 cur_event_ZDC_available &= !zdcDecodingError;
233 cur_event_RPD_available &= !rpdDecodingError;
234
235 if (!zdcDecodingError && !rpdDecodingError){
236 decodingErrorBitsArr[0] += 1;
237 } else if (zdcDecodingError){
238 ATH_MSG_WARNING("ZDC Decoding error!");
239 decodingErrorBitsArr[1] += 1;
240 } else { // RPD decoding error
241 ATH_MSG_WARNING("RPD Decoding error!");
242 decodingErrorBitsArr[2] += 1;
243 }
244
245 auto zdcTool = getGroup("genZdcMonTool"); // get the tool for easier group filling
246
247 auto decodingErrorBits = Monitored::Collection("decodingErrorBits", decodingErrorBitsArr);
248 fill(zdcTool, decodingErrorBits, lumiBlock);
249
250// ______________________________________________________________________________
251 // does event pass trigger selections?
252// ______________________________________________________________________________
253
254
255// ----------------------- ZDC single-sided triggers -----------------------
256
257 auto passTrigSideA = Monitored::Scalar<bool>("passTrigSideA",false); // if trigger isn't enabled (e.g, MC) the with-trigger histograms are never filled (cut mask never satisfied)
258 auto passTrigSideC = Monitored::Scalar<bool>("passTrigSideC",false);
259
260 if(m_EnableZDCSingleSideTriggers && m_enableZDCPhysics){ // if not enable trigger, the pass-trigger booleans will still be defined but with value always set to false
261 const auto &trigDecTool = getTrigDecisionTool();
262 passTrigSideA = trigDecTool->isPassed(m_triggerSideA, TrigDefs::Physics);
263 passTrigSideC = trigDecTool->isPassed(m_triggerSideC, TrigDefs::Physics);
264 if (passTrigSideA) ATH_MSG_DEBUG("passing trig on side A!");
265 if (passTrigSideC) ATH_MSG_DEBUG("passing trig on side C!");
266 }
267
268// ----------------------- UCC triggers -----------------------
269
270 auto passUCCTrig_HELT15 = Monitored::Scalar<bool>("passUCCTrig_HELT15",false);
271 auto passUCCTrig_HELT20 = Monitored::Scalar<bool>("passUCCTrig_HELT20",false);
272 auto passUCCTrig_HELT25 = Monitored::Scalar<bool>("passUCCTrig_HELT25",false);
273 auto passUCCTrig_HELT35 = Monitored::Scalar<bool>("passUCCTrig_HELT35",false);
274 auto passUCCTrig_HELT50 = Monitored::Scalar<bool>("passUCCTrig_HELT50",false);
275
276 std::array<float, m_nUCCTrigBits> uccTrigBitsArr = {0};
277
278 if(m_EnableUCCTriggers && m_enableZDCPhysics){ // if not enable trigger, the pass-trigger booleans will still be defined but with value always set to false
279 uccTrigBitsArr[UCCTrigEnabledBit] += 1;
280
281 const auto &trigDecTool = getTrigDecisionTool();
282 passUCCTrig_HELT15 = trigDecTool->isPassed(m_UCCtriggerHELT15);
283 passUCCTrig_HELT20 = trigDecTool->isPassed(m_UCCtriggerHELT20);
284 passUCCTrig_HELT25 = trigDecTool->isPassed(m_UCCtriggerHELT25);
285 passUCCTrig_HELT35 = trigDecTool->isPassed(m_UCCtriggerHELT35);
286 passUCCTrig_HELT50 = trigDecTool->isPassed(m_UCCtriggerHELT50);
287
288 if (passUCCTrig_HELT15){
289 uccTrigBitsArr[TrigHELT15Bit] += 1;
290 ATH_MSG_DEBUG("passing UCC trigger L1_ZDC_HELT15_jTE4000!");
291 }
292 if (passUCCTrig_HELT20){
293 uccTrigBitsArr[TrigHELT20Bit] += 1;
294 ATH_MSG_DEBUG("passing UCC trigger L1_ZDC_HELT20_jTE4000!");
295 }
296 if (passUCCTrig_HELT25){
297 uccTrigBitsArr[TrigHELT25Bit] += 1;
298 ATH_MSG_DEBUG("passing UCC trigger L1_ZDC_HELT25_jTE4000!");
299 }
300 if (passUCCTrig_HELT35){
301 uccTrigBitsArr[TrigHELT35Bit] += 1;
302 ATH_MSG_DEBUG("passing UCC trigger L1_ZDC_HELT35_jTE4000!");
303 }
304 if (passUCCTrig_HELT50){
305 uccTrigBitsArr[TrigHELT50Bit] += 1;
306 ATH_MSG_DEBUG("passing UCC trigger L1_ZDC_HELT50_jTE4000!");
307 }
308 }else{
309 uccTrigBitsArr[UCCTrigDisabledBit] += 1;
310 }
311
312 auto uccTrigBits = Monitored::Collection("uccTrigBits", uccTrigBitsArr);
313 fill(zdcTool, uccTrigBits, lumiBlock);
314
315// ----------------------- OOpO triggers -----------------------
316 int nOOpOTriggers = m_OOpOtriggerChains.size();
317 int nOOpOL1TriggersFromCTP = m_OOpOL1TriggerFromCTPIDMap.size();
318 std::vector<float> oopoTrigBitsArr(nOOpOTriggers+2, 0.); // enabled, trigger bits, disabled
319
320 std::vector<Monitored::Scalar<bool>> oopoTrigPassBoolVec;
321 oopoTrigPassBoolVec.reserve(nOOpOTriggers);
322
323 if(m_EnableOOpOTriggers && m_enableZDCPhysics) { // if not enable trigger, the pass-trigger booleans will still be defined but with value always set to false
324 oopoTrigBitsArr[0] += 1; // OOpO trigger enabled
325
326 const auto &trigDecTool = getTrigDecisionTool();
327
328 for (int i = 0; i < nOOpOTriggers - nOOpOL1TriggersFromCTP; ++i) {
329 const bool pass = (trigDecTool->isPassed( m_OOpOtriggerChains[i] ));
330
331 // Histogram variable name: “pass<L1-name>”
332 std::string varName = "pass" + m_OOpOtriggerChains[i];
333 // *Optionally sanitise if you have funky characters*
334 std::replace_if( varName.begin(), varName.end(),
335 [](char c){ return c=='-'; }, '_' );
336
337 oopoTrigPassBoolVec.emplace_back( varName, pass );
338 oopoTrigBitsArr[i+1] += pass;
339 }
340
341 try {
342 const xAOD::TrigDecision* trigDecision = nullptr;
343 ANA_CHECK(evtStore()->retrieve( trigDecision, "xTrigDecision"));
344
345 if (!trigDecision){
346 throw std::runtime_error("Trigger decision NOT retrieved for PEB stream!");
347 }
348 std::vector<uint32_t> tbp = trigDecision->tbp();
349
350 for (const auto& [ctp_id, trig_name] : m_OOpOL1TriggerFromCTPIDMap) {
351 int ind = ctp_id / 32; // index in vector tbp
352 int bit = ctp_id % 32; // bit in tax[ind]
353 const bool pass = ((tbp.at(ind) >> bit) & 1);
354 ATH_MSG_INFO("what's the size of xAOD::TrigDecision::tbp()? " << tbp.size());
355 std::string varName = "pass" + trig_name;
356 oopoTrigPassBoolVec.emplace_back( varName, pass );
357 oopoTrigBitsArr.at(oopoTrigPassBoolVec.size()) += pass;
358 }
359 } catch (const std::out_of_range& e) {
360 ATH_MSG_WARNING("Out of range error captured when fetching L1 trigger bits from CTP ID: " << e.what());
361 } catch (const std::runtime_error& e) {
362 ATH_MSG_WARNING("Runtime error captured when fetching L1 trigger bits from CTP ID: " << e.what());
363 } catch (const std::exception& e) {
364 ATH_MSG_WARNING("Other std::exception captured when fetching L1 trigger bits from CTP ID: " << e.what());
365 } catch (...) {
366 ATH_MSG_WARNING("Error captured when fetching L1 trigger bits from CTP ID. Likely either no L1 trigger looked at or no L1 trigger will show to be passed.");
367 }
368 }else{
369 oopoTrigBitsArr[nOOpOTriggers + 1] += 1; // OOpO trigger disabled
370 }
371
372 auto oopoTrigBits = Monitored::Collection("OOpOTrigBits", oopoTrigBitsArr);
373
374 fill(zdcTool, oopoTrigBits, lumiBlock);
375
376// ______________________________________________________________________________
377 // declaring & obtaining variables of interest for the ZDC sums
378 // including the RPD x,y positions, reaction plane and status
379// ______________________________________________________________________________
380 SG::ReadHandle<xAOD::ZdcModuleContainer> zdcSums(m_ZdcSumContainerKey, ctx);
381
382 auto zdcEnergySumTwoSidesTeV = Monitored::Scalar<float>("zdcEnergySumTwoSidesTeV",0.0);
383 auto zdcHadronicEnergySumTwoSidesTeV = Monitored::Scalar<float>("zdcHadronicEnergySumTwoSidesTeV",0.0);
384 auto zdcEnergySumA = Monitored::Scalar<float>("zdcEnergySumA",-1000.0);
385 auto zdcEnergySumC = Monitored::Scalar<float>("zdcEnergySumC",-1000.0);
386 auto zdcUncalibSumA = Monitored::Scalar<float>("zdcUncalibSumA",-1000.0);
387 auto zdcUncalibSumC = Monitored::Scalar<float>("zdcUncalibSumC",-1000.0);
388 auto rpdCosDeltaReactionPlaneAngle = Monitored::Scalar<float>("rpdCosDeltaReactionPlaneAngle",-1000.0);
389 auto bothReactionPlaneAngleValid = Monitored::Scalar<bool>("bothReactionPlaneAngleValid",true);
390 auto bothHasCentroid = Monitored::Scalar<bool>("bothHasCentroid",true); // the looser requirement that both centroids were calculated (ignore valid)
391
392 std::array<bool, 2> centroidSideValidArr;
393 std::array<bool, 2> rpdSideValidArr = {false, false};
394 std::array<std::vector<float>,2> rpdSubAmpVecs;
395 auto rpdSubAmpSumCurSide = Monitored::Scalar<float>("rpdSubAmpSum",-1000.0);
396 auto rpdXCentroidCurSide = Monitored::Scalar<float>("xCentroid",-1000.0);
397 auto rpdYCentroidCurSide = Monitored::Scalar<float>("yCentroid",-1000.0);
398 auto rpdReactionPlaneAngleCurSide = Monitored::Scalar<float>("ReactionPlaneAngle",-1000.0);
399 auto centroidValid = Monitored::Scalar<bool>("centroidValid",false);
400 auto centroidValidBitFloat = Monitored::Scalar<float>("centroidValidBitFloat", -1000.0); // 0.5 if valid, 1.5 if invalid --> needed for DQ
401 auto passMinZDCEnergyCutForCentroidValidEvaluation = Monitored::Scalar<bool>("passMinZDCEnergyCutForCentroidValidEvaluation",false);
402
403 // need to recognize same-side correlation among the following observables
404 // since they are filled differently, it is helpful to store each of their values in the 2-dimension array first
405 // and fill the side monitoring tool in the same "monitoring group"
406 std::array<float, 2> zdcEMModuleEnergyArr = {-1000.,-1000.};
407 std::array<float, 2> zdcEnergySumArr = {-1000,-1000.};
408 std::array<float, 2> zdcUncalibSumArr = {-1000.,-1000.};
409 std::array<float, 2> zdcAvgTimeArr = {-1000.,-1000.};
410 std::array<bool, 2> zdcModuleMaskArr = {false, false};
411 std::array<bool, 2> passTrigOppSideArr = {false, false};
412 std::array<float, 2> rpdAmplitudeCalibSum = {-1000.,-1000.};
413 std::array<float, 2> rpdMaxADCSum = {-1000.,-1000.};
414
415 std::array<float, m_nRpdCentroidStatusBits> centroidStatusBitsCountCurSide;
416
417 if (! zdcSums.isValid() ) {
418 ATH_MSG_WARNING("evtStore() does not contain Collection with name "<< m_ZdcSumContainerKey);
419 return StatusCode::SUCCESS;
420 }
421
422 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> ZdcSumCalibEnergyHandle(m_ZdcSumCalibEnergyKey, ctx);
423 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> ZdcSumUncalibSumHandle(m_ZdcSumUncalibSumKey, ctx);
424 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> ZdcSumAverageTimeHandle(m_ZdcSumAverageTimeKey, ctx);
425 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> ZdcSumModuleMaskHandle(m_ZdcSumModuleMaskKey, ctx);
426
427 // ZDC per-arm module mask retrieval --> needed both for physics (calib stream) and inj stream (energy fraction DQ)
428
429 if (cur_event_ZDC_available){ // no ZDC decoding error
430 for (const auto zdcSum : *zdcSums) { // side -1: C; side 1: A
431 if (zdcSum->zdcSide() != 0){
432 int iside = (zdcSum->zdcSide() > 0)? 1 : 0;
433 zdcModuleMaskArr[iside] = ZdcSumModuleMaskHandle(*zdcSum);
434 }
435 }
436 }
437
438 // write ZDC per-arm information to arrays
439 zdcEnergySumTwoSidesTeV = 0.;
440
441 if (m_enableZDCPhysics){ // write down energy sum, uncalib sum, average time, and module mask if we enable ZDC physics
442 cur_event_ZDC_available &= ZdcSumCalibEnergyHandle.isAvailable();
443
444 if (cur_event_ZDC_available){
445 for (const auto zdcSum : *zdcSums) { // side -1: C; side 1: A
446 if (zdcSum->zdcSide() != 0){
447 int iside = (zdcSum->zdcSide() > 0)? 1 : 0;
448
449 zdcEnergySumArr[iside] = ZdcSumCalibEnergyHandle(*zdcSum);
450 zdcUncalibSumArr[iside] = ZdcSumUncalibSumHandle(*zdcSum);
451 zdcAvgTimeArr[iside] = ZdcSumAverageTimeHandle(*zdcSum);
452
453 passTrigOppSideArr[iside] = (iside == 0)? passTrigSideA : passTrigSideC;
454
455 zdcEnergySumTwoSidesTeV += (ZdcSumCalibEnergyHandle(*zdcSum)) / 1000.;
456
457 if (zdcSum->zdcSide() == 1){
458 zdcEnergySumA = ZdcSumCalibEnergyHandle(*zdcSum);
459 zdcUncalibSumA = ZdcSumUncalibSumHandle(*zdcSum);
460 }
461 else {
462 zdcEnergySumC = ZdcSumCalibEnergyHandle(*zdcSum);
463 zdcUncalibSumC = ZdcSumUncalibSumHandle(*zdcSum);
464 }
465 }
466 } // having filled both sides
467 }
468 } else if (m_enableZDC){ // enable ZDC but not physics - for now, the only case is injector pulse --> no energy, only record uncalib sum
469 cur_event_ZDC_available &= ZdcSumUncalibSumHandle.isAvailable();
470 if (cur_event_ZDC_available){
471 for (const auto zdcSum : *zdcSums) { // side -1: C; side 1: A
472 if (zdcSum->zdcSide() != 0){
473 int iside = (zdcSum->zdcSide() > 0)? 1 : 0;
474 zdcUncalibSumArr[iside] = ZdcSumUncalibSumHandle(*zdcSum);
475 }
476 }
477 }
478 }
479
480 // write RPD per-arm status to arrays
481 if (m_enableRPDAmp){
482 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> RPDsideStatusHandle(m_RPDSideStatusKey, ctx);
483 cur_event_RPD_available &= RPDsideStatusHandle.isAvailable();
484 if (cur_event_RPD_available){
485 for (const auto zdcSum : *zdcSums) { // side -1: C; side 1: A
486 if (zdcSum->zdcSide() != 0){ // contains the RPD Cos Delta reaction plane
487 int iside = (zdcSum->zdcSide() > 0)? 1 : 0;
488 unsigned int rpdStatusCurSide = RPDsideStatusHandle(*zdcSum);
489 rpdSideValidArr.at(iside) = rpdStatusCurSide & 1 << ZDC::RPDDataAnalyzer::ValidBit;
490 }
491 }
492 }
493 }
494
495 // fill RPD centroid information to monitoring tools
496 if (m_enableCentroid){
497 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, std::vector<float>> RPDsubAmpHandle(m_RPDChannelSubtrAmpKey, ctx);
498 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDsubAmpSumHandle(m_RPDSubtrAmpSumKey, ctx);
499 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDxCentroidHandle(m_RPDxCentroidKey, ctx);
500 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDyCentroidHandle(m_RPDyCentroidKey, ctx);
501 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDreactionPlaneAngleHandle(m_RPDreactionPlaneAngleKey, ctx);
502 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDcosDeltaReactionPlaneAngleHandle(m_RPDcosDeltaReactionPlaneAngleKey, ctx);
503 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> RPDcentroidStatusHandle(m_RPDcentroidStatusKey, ctx);
504
505 cur_event_RPDCentroid_available &= RPDcentroidStatusHandle.isAvailable();
506 if (cur_event_RPDCentroid_available){
507 for (const auto zdcSum : *zdcSums) { // side -1: C; side 1: A
508
509 if (zdcSum->zdcSide() == 0){ // contains the RPD Cos Delta reaction plane
510 rpdCosDeltaReactionPlaneAngle = RPDcosDeltaReactionPlaneAngleHandle(*zdcSum);
511 }else{
512 int iside = (zdcSum->zdcSide() > 0)? 1 : 0; // already exclude the possibility of global sum
513 std::string side_str = (iside == 0)? "C" : "A";
514
515 rpdSubAmpVecs[iside] = RPDsubAmpHandle(*zdcSum);
516 rpdSubAmpSumCurSide = RPDsubAmpSumHandle(*zdcSum);
517 rpdXCentroidCurSide = RPDxCentroidHandle(*zdcSum);
518 rpdYCentroidCurSide = RPDyCentroidHandle(*zdcSum);
519 rpdReactionPlaneAngleCurSide = RPDreactionPlaneAngleHandle(*zdcSum);
520
521 unsigned int rpdCentroidStatusCurSide = RPDcentroidStatusHandle(*zdcSum);
522
523 // Remarks - Oct 2024
524 // HasCentroidBit is false if RPD on the current side is invalid
525 // The centroid ValidBit, compared with Has HasCentroidBit, also checks that ZDC is valid
526 // and has the infrastruture to require (1) ZDC total energy to be in given range
527 // (2) EM-module energy to be in given range
528 // (3) pile up fraction is below a threshold
529 // but these are currently NOT implemented
530 // for online, we only monitor the ones requiring valid bit
531 // for offline, we plot both sets, with the expectation that they are the same for now
532 centroidValid = (rpdCentroidStatusCurSide & 1 << ZDC::RpdSubtractCentroidTool::ValidBit);
533
534 centroidValidBitFloat = (centroidValid)? 0.5 : 1.5;
535
536 centroidSideValidArr.at(iside) = rpdCentroidStatusCurSide & 1 << ZDC::RpdSubtractCentroidTool::ValidBit;
537 bool curSideHasCentroid = (rpdCentroidStatusCurSide & 1 << ZDC::RpdSubtractCentroidTool::HasCentroidBit);
538
539 bothReactionPlaneAngleValid &= centroidValid;
540 bothHasCentroid &= curSideHasCentroid;
541
542 for (int bit = 0; bit < m_nRpdCentroidStatusBits; bit++) centroidStatusBitsCountCurSide[bit] = 0; // reset
543 for (int bit = 0; bit < m_nRpdCentroidStatusBits; bit++){
544 if (rpdCentroidStatusCurSide & 1 << bit){
545 centroidStatusBitsCountCurSide[bit] += 1;
546 }
547 }
548 auto centroidStatusBits = Monitored::Collection("centroidStatusBits", centroidStatusBitsCountCurSide);
549
550 if (curSideHasCentroid){ // only impose the looser requirement that this side has centroid; have a set of histograms for the more stringent centroid-valid requirement
551 if (m_enableZDCPhysics){ // if not enable ZDC physics, no ZDC energy --> the boolean requiring minimum ZDC energy will always be set to false
552 passMinZDCEnergyCutForCentroidValidEvaluation = (zdcEnergySumArr[iside] > m_ZDCEnergyCutForCentroidValidBitMonitor);
553 }
554 fill(m_tools[m_ZDCSideToolIndices.at(side_str)], rpdSubAmpSumCurSide, centroidValid, passMinZDCEnergyCutForCentroidValidEvaluation, centroidValidBitFloat, rpdXCentroidCurSide, rpdYCentroidCurSide, rpdReactionPlaneAngleCurSide, centroidStatusBits, lumiBlock, bcid);
555 }else{
556 fill(m_tools[m_ZDCSideToolIndices.at(side_str)], rpdSubAmpSumCurSide, centroidStatusBits, lumiBlock, bcid);
557 }
558 }
559 } // having filled both sides
560 }
561 }
562
563// ______________________________________________________________________________
564 // declaring & obtaining variables of interest for the ZDC modules & RPD channels
565 // filling arrays of monitoring tools (module/channel-level)
566 // updating status bits
567// ______________________________________________________________________________
568
569 SG::ReadHandle<xAOD::ZdcModuleContainer> zdcModules(m_ZdcModuleContainerKey, ctx);
570
571 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> zdcModuleStatusHandle(m_ZdcModuleStatusKey, ctx);
572 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleAmplitudeHandle(m_ZdcModuleAmplitudeKey, ctx);
573 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleTimeHandle(m_ZdcModuleTimeKey, ctx);
574 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleAmpNoNonLinHandle(m_ZdcModuleAmpNoNonLinKey, ctx);
575 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleFitAmpHandle(m_ZdcModuleFitAmpKey, ctx);
576 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleFitT0Handle(m_ZdcModuleFitT0Key, ctx);
577 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleChisqHandle(m_ZdcModuleChisqKey, ctx);
578 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleCalibEnergyHandle(m_ZdcModuleCalibEnergyKey, ctx);
579 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleCalibTimeHandle(m_ZdcModuleCalibTimeKey, ctx);
580 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleMaxADCHandle(m_ZdcModuleMaxADCKey, ctx);
581 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleMaxADCHGHandle(m_ZdcModuleMaxADCHGKey, ctx);
582 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleMaxADCLGHandle(m_ZdcModuleMaxADCLGKey, ctx);
583
584 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleFitAmpLGRefitHandle(m_ZdcModuleFitAmpLGRefitKey, ctx);
585 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleAmpLGRefitHandle(m_ZdcModuleAmpLGRefitKey, ctx);
586 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleT0LGRefitHandle(m_ZdcModuleT0LGRefitKey, ctx);
587 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleT0SubLGRefitHandle(m_ZdcModuleT0SubLGRefitKey, ctx);
588 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> zdcModuleChisqLGRefitHandle(m_ZdcModuleChisqLGRefitKey, ctx);
589
590 auto zdcModuleAmp = Monitored::Scalar<float>("zdcModuleAmp", -1000.0);
591 auto zdcModuleFitAmp = Monitored::Scalar<float>("zdcModuleFitAmp", -1000.0);
592 auto zdcModuleMaxADC = Monitored::Scalar<float>("zdcModuleMaxADC", -1000.0);
593 auto zdcModuleMaxADCHG = Monitored::Scalar<float>("zdcModuleMaxADCHG", -1000.0);
594 auto zdcModuleMaxADCLG = Monitored::Scalar<float>("zdcModuleMaxADCLG", -1000.0);
595 auto zdcModuleAmpToMaxADCRatio = Monitored::Scalar<float>("zdcModuleAmpToMaxADCRatio", -1000.0);
596 auto zdcModuleFract = Monitored::Scalar<float>("zdcModuleFract", -1000.0);
597 auto zdcUncalibSumCurrentSide = Monitored::Scalar<float>("zdcUncalibSumCurrentSide", -1000.0);
598 auto zdcEnergySumCurrentSide = Monitored::Scalar<float>("zdcEnergySumCurrentSide", -1000.0);
599 auto zdcAbove20NCurrentSide = Monitored::Scalar<bool>("zdcAbove20NCurrentSide", false);
600 auto zdcEnergyAboveModuleFractCut = Monitored::Scalar<bool>("zdcEnergyAboveModuleFractCut", false);
601 auto zdcModuleTime = Monitored::Scalar<float>("zdcModuleTime", -1000.0);
602 auto zdcModuleFitT0 = Monitored::Scalar<float>("zdcModuleFitT0", -1000.0);
603 auto zdcModuleChisq = Monitored::Scalar<float>("zdcModuleChisq", -1000.0);
604 auto zdcModuleChisqEventWeight = Monitored::Scalar<float>("zdcModuleChisqEventWeight", -1000.0);
605 auto zdcModuleChisqOverAmp = Monitored::Scalar<float>("zdcModuleChisqOverAmp", -1000.0);
606 auto zdcModuleChisqOverAmpEventWeight = Monitored::Scalar<float>("zdcModuleChisqOverAmpEventWeight", -1000.0);
607 auto zdcModuleCalibAmp = Monitored::Scalar<float>("zdcModuleCalibAmp", -1000.0);
608 auto zdcModuleCalibTime = Monitored::Scalar<float>("zdcModuleCalibTime", -1000.0);
609 auto zdcModuleLG = Monitored::Scalar<bool>("zdcModuleLG", false);
610 auto zdcModuleHG = Monitored::Scalar<bool>("zdcModuleHG", false);
611
612 auto injectedPulseInputVoltage = Monitored::Scalar<float>("injectedPulseInputVoltage", -1000.0);
613 auto zdcInjInputVoltagePassMinThrsh = Monitored::Scalar<bool>("zdcInjInputVoltagePassMinThrsh", false);
614 auto zdcHGInjPulseValid = Monitored::Scalar<bool>("zdcHGInjPulseValid", true);
615 auto zdcLGInjPulseValid = Monitored::Scalar<bool>("zdcLGInjPulseValid", true);
616
617 auto zdcModuleFractionValid = Monitored::Scalar<bool>("zdcModuleFractionValid", false);
618 auto zdcModuleTimeValid = Monitored::Scalar<bool>("zdcModuleTimeValid", false);
619 auto zdcModuleHGTimeValid = Monitored::Scalar<bool>("zdcModuleHGTimeValid", false);
620 auto zdcModuleLGTimeValid = Monitored::Scalar<bool>("zdcModuleLGTimeValid", false);
621
622 auto zdcModuleLGFitAmp = Monitored::Scalar<float>("zdcModuleLGFitAmp", -1000.0);
623 auto zdcModuleFitAmpLGRefit = Monitored::Scalar<float>("zdcModuleFitAmpLGRefit", -1000.0);
624 auto zdcModuleAmpLGRefit = Monitored::Scalar<float>("zdcModuleAmpLGRefit", -1000.0);
625 auto zdcModuleT0LGRefit = Monitored::Scalar<float>("zdcModuleT0LGRefit", -1000.0);
626 auto zdcModuleT0SubLGRefit = Monitored::Scalar<float>("zdcModuleT0SubLGRefit", -1000.0);
627 auto zdcModuleChisqLGRefit = Monitored::Scalar<float>("zdcModuleChisqLGRefit", -1000.0);
628
629 auto zdcModuleHGtoLGAmpRatio = Monitored::Scalar<float>("zdcModuleHGtoLGAmpRatio", -1000.0);
630 auto zdcModuleHGtoLGAmpRatioNoNonlinCorr = Monitored::Scalar<float>("zdcModuleHGtoLGAmpRatioNoNonlinCorr", -1000.0);
631 auto zdcModuleHGtoLGT0Diff = Monitored::Scalar<float>("zdcModuleHGtoLGT0Diff", -1000.0);
632
633 auto zdcModuleMaskCurSide = Monitored::Scalar<bool>("zdcModuleMaskCurSide", false);
634
635 auto rpdChannelSubAmp = Monitored::Scalar<float>("RPDChannelSubAmp", -1000.0);
636 auto rpdChannelAmplitude = Monitored::Scalar<float>("RPDChannelAmplitude", -1000.0);
637 auto rpdChannelMaxADC = Monitored::Scalar<float>("RPDChannelMaxADC", -1000.0);
638 auto rpdChannelMaxSample = Monitored::Scalar<unsigned int>("RPDChannelMaxSample", 1000);
639 auto rpdChannelAmplitudeCalib = Monitored::Scalar<float>("RPDChannelAmplitudeCalib", -1000.0);
640 auto rpdChannelStatus = Monitored::Scalar<unsigned int>("RPDChannelStatus", 1000);
641 auto rpdChannelPileupFitSlope = Monitored::Scalar<float>("RPDChannelPileupFitSlope", -1000);
642 auto absRpdChannelAmplitude = Monitored::Scalar<float>("absRPDChannelAmplitude", -1000.); // EM module energy on the same side (assuming filled already)
643 auto rpdChannelValid = Monitored::Scalar<bool>("RPDChannelValid", false);
644 auto rpdChannelValidBitFloat = Monitored::Scalar<float>("RPDChannelValidBitFloat", -1000.0); // 0.5 if valid, 1.5 if invalid --> needed for DQ
645 auto rpdChannelCentroidValid = Monitored::Scalar<bool>("RPDChannelCentroidValid", false);
646 auto rpdChannelPileupFrac = Monitored::Scalar<float>("RPDChannelPileupFrac", -1000.);
647 auto zdcEMModuleEnergySameSide = Monitored::Scalar<float>("zdcEMModuleEnergySameSide", -1000.); // EM module energy on the same side (assuming filled already)
648 auto zdcEnergySumSameSide = Monitored::Scalar<float>("zdcEnergySumSameSide", -1000.); // EM module energy on the same side (assuming filled already)
649
650 std::array<float, m_nZdcStatusBits> zdcStatusBitsCount;
651 std::array<float, m_nRpdStatusBits> rpdStatusBitsCount;
652
653 if (! zdcModules.isValid() ) {
654 ATH_MSG_WARNING("evtStore() does not contain Collection with name "<< m_ZdcModuleContainerKey);
655 return StatusCode::SUCCESS;
656 }
657
658 if (m_isInjectedPulse && (!m_isStandalone)){
659 // Check the event run number agrees with fixed run number
660 if (runNumber != m_runNumber) {
661 ATH_MSG_WARNING("The event run number differs from the fixed run number read from the input-file metadata!");
662 ATH_MSG_WARNING("The event run number is " << runNumber << "; the fixed run number is " << m_runNumber);
663 }
664
665 injectedPulseInputVoltage = m_zdcInjPulserAmpMap->getPulserAmplitude(m_injMapRunToken, lumiBlock);
666 zdcInjInputVoltagePassMinThrsh = (injectedPulseInputVoltage >= m_minVInjToEvaluateLowAmpPercentageDQInjectorPulse);
667 }
668
669 // first loop over zdcModules - read ZDC-module information & fill in ZDC histograms
670 // separate ZDC and RPD variable retrieval into two for loops to make sure
671 // essential ZDC information (e.g, the EM module energy and total energy sum on both sides) is properly filled
672 // before they are required in RPD channel monitoring
673 zdcHadronicEnergySumTwoSidesTeV = 0.;
674 if (m_enableZDC){
675 cur_event_ZDC_available &= zdcModuleStatusHandle.isAvailable();
676 if (cur_event_ZDC_available){
677 for (const auto zdcMod : *zdcModules){
678 int iside = (zdcMod->zdcSide() > 0)? 1 : 0;
679 std::string side_str = (iside == 0)? "C" : "A";
680
681 zdcModuleMaskCurSide = zdcModuleMaskArr[iside];
682
683 if (zdcMod->zdcType() == 0){
684 int imod = zdcMod->zdcModule();
685 std::string module_str = std::to_string(imod);
686
687 int status = zdcModuleStatusHandle(*zdcMod);
688
689 for (int bit = 0; bit < m_nZdcStatusBits; bit++) zdcStatusBitsCount[bit] = 0; // reset
690 for (int bit = 0; bit < m_nZdcStatusBits; bit++){
691 if (status & 1 << bit){
692 zdcStatusBitsCount[bit] += 1;
693 }
694 }
695
696 auto zdcStatusBits = Monitored::Collection("zdcStatusBits", zdcStatusBitsCount);
697 fill(m_tools[m_ZDCModuleToolIndices.at(side_str).at(module_str)], zdcStatusBits, lumiBlock, bcid);
698
699 if ((status & 1 << ZDCPulseAnalyzer::PulseBit) != 0){ // has pulse
700 zdcModuleAmp = zdcModuleAmplitudeHandle(*zdcMod);
701
702 float zdcModuleAmpNoNonLin = zdcModuleAmpNoNonLinHandle(*zdcMod); // module fit amplitude (without gain factor or nonlinear corrections applied)
703 zdcModuleFitAmp = zdcModuleFitAmpHandle(*zdcMod); // module fit amplitude (without gain factor or nonlinear corrections applied)
704 zdcModuleMaxADC = zdcModuleMaxADCHandle(*zdcMod);
705 zdcModuleMaxADCHG = zdcModuleMaxADCHGHandle(*zdcMod);
706 zdcModuleMaxADCLG = zdcModuleMaxADCLGHandle(*zdcMod);
707 zdcModuleAmpToMaxADCRatio = (zdcModuleMaxADC == 0)? -1000. : zdcModuleFitAmp / zdcModuleMaxADC; // use fit amplitude: no gain factor applied to either
708 zdcModuleTime = zdcModuleTimeHandle(*zdcMod);
709 zdcModuleFitT0 = zdcModuleFitT0Handle(*zdcMod);
710 zdcModuleChisq = zdcModuleChisqHandle(*zdcMod);
711 zdcModuleCalibAmp = zdcModuleCalibEnergyHandle(*zdcMod);
712 zdcModuleCalibTime = zdcModuleCalibTimeHandle(*zdcMod);
713 zdcUncalibSumCurrentSide = zdcUncalibSumArr[iside];
714 zdcEnergySumCurrentSide = zdcEnergySumArr[iside];
715 zdcAbove20NCurrentSide = (zdcUncalibSumCurrentSide > 20 * m_expected1N);
716 zdcEnergyAboveModuleFractCut = (zdcEnergySumCurrentSide > m_energyCutForModuleFractMonitor);
717
718 if (m_enableZDCPhysics){
719 zdcModuleFract = (zdcEnergySumCurrentSide == 0)? -1000. : zdcModuleCalibAmp / zdcEnergySumCurrentSide; // use calibrated amplitudes + energy sum
720 }else{
721 zdcModuleFract = (zdcUncalibSumCurrentSide == 0)? -1000. : zdcModuleAmp / zdcUncalibSumCurrentSide; // use uncalibrated amplitudes + amplitude sum
722 }
723
724 // use fit amplitude for chisq over amplitude: neither fit amplitude nor chisq has gain factor applied
725 zdcModuleChisqOverAmp = (zdcModuleFitAmp == 0)? -1000. : zdcModuleChisq / zdcModuleFitAmp;
726 zdcModuleLG = (status & 1 << ZDCPulseAnalyzer::LowGainBit);
727 zdcModuleHG = !zdcModuleLG;
728
729 zdcModuleFractionValid = (zdcModuleFract >= 0 && zdcModuleFract <= 1);
730
731 zdcModuleTimeValid = (zdcModuleTime > -100.);
732 zdcModuleHGTimeValid = zdcModuleHG && zdcModuleTimeValid;
733 zdcModuleLGTimeValid = zdcModuleLG && zdcModuleTimeValid;
734
735
736 zdcModuleFitAmpLGRefit = zdcModuleFitAmpLGRefitHandle(*zdcMod);
737 zdcModuleAmpLGRefit = zdcModuleAmpLGRefitHandle(*zdcMod);
738 zdcModuleT0LGRefit = zdcModuleT0LGRefitHandle(*zdcMod);
739 zdcModuleT0SubLGRefit = zdcModuleT0SubLGRefitHandle(*zdcMod);
740 zdcModuleChisqLGRefit = zdcModuleChisqLGRefitHandle(*zdcMod);
741
742 zdcModuleLGFitAmp = (zdcModuleHG)? zdcModuleFitAmpLGRefit * 1. : zdcModuleFitAmp * 1.;
743
744 zdcModuleHGtoLGAmpRatio = (zdcModuleLG || zdcModuleAmpLGRefit == 0)? -1000. : zdcModuleAmp * 1. / zdcModuleAmpLGRefit; // HG/LG ratio if HG is valid and LG-refit amplitude is nonzero (shouldn't be)
745 zdcModuleHGtoLGAmpRatioNoNonlinCorr = (zdcModuleLG || zdcModuleAmpLGRefit == 0)? -1000. : zdcModuleAmpNoNonLin * 1. / zdcModuleAmpLGRefit; // HG/LG ratio if HG is valid and LG-refit amplitude is nonzero (shouldn't be)
746 zdcModuleHGtoLGT0Diff = (zdcModuleLG)? -1000. : zdcModuleFitT0 - zdcModuleT0LGRefit;
747
748 zdcModuleChisqEventWeight = calculate_inverse_bin_width(zdcModuleChisq, "module chisq", m_ZdcModuleChisqBinEdges);
749 zdcModuleChisqOverAmpEventWeight = calculate_inverse_bin_width(zdcModuleChisqOverAmp, "module chisq over amplitude", m_ZdcModuleChisqOverAmpBinEdges);
750
751 if (imod == 0) zdcEMModuleEnergyArr[iside] = zdcModuleCalibAmp; // EM module energy
752 else zdcHadronicEnergySumTwoSidesTeV += zdcModuleCalibAmp / 1000.; // hadronic module energy
753
754 fill(m_tools[m_ZDCModuleToolIndices.at(side_str).at(module_str)], zdcModuleChisq, zdcModuleChisqOverAmp, zdcModuleChisqLGRefit, zdcModuleChisqEventWeight, zdcModuleChisqOverAmpEventWeight, zdcModuleAmp);
755
756 if (!(status & 1 << ZDCPulseAnalyzer::ArmSumIncludeBit)) continue;
757
758 if (m_isInjectedPulse){
759
760 zdcHGInjPulseValid = true;
761 zdcLGInjPulseValid = true;
762
763 bool pass_first3s = true;
764
765 // ------------ throw away the first few seconds of each LB ------------
766 // get the start + end time of the event LB from the cool data
767 // copied from Trigger/TrigT1/TrigT1CTMonitoring/src/BSMonitoringAlg.cxx
768
769 if (!m_isSim && !m_isOnline) {
770 uint64_t lb_stime = 0; // LB POSIX start time in seconds
771 uint64_t lb_etime = 0; // LB POSIX end time in seconds
772 bool retrievedLumiBlockTimes = false;
773
774 SG::ReadCondHandle<AthenaAttributeList> lblb(m_LBLBFolderInputKey, ctx);
775 const AthenaAttributeList* lblbattrList{*lblb};
776 if (lblbattrList==nullptr) {
777 ATH_MSG_WARNING("Failed to retrieve /TRIGGER/LUMI/LBLB " << m_LBLBFolderInputKey.key() << " not found");
778 }
779 else {
780 retrievedLumiBlockTimes = true;
781 auto lb_stime_loc = (*lblbattrList)["StartTime"].data<cool::UInt63>();
782 auto lb_etime_loc = (*lblbattrList)["EndTime"].data<cool::UInt63>();
783 lb_stime = lb_stime_loc;
784 lb_etime = lb_etime_loc;
785 ATH_MSG_DEBUG("lb_stime: " << lb_stime << " lb_etime: " << lb_etime );
786 }
787
788 lb_stime /= 1000000000;
789 lb_etime /= 1000000000;
790
791 if (lb_etime <= lb_stime || !retrievedLumiBlockTimes){
792 ATH_MSG_WARNING("The LB start + end time for current event is not retrieved.");
793 ATH_MSG_WARNING("No event rejection at beginning of LB is implemented.");
794 }else if(eventTime < lb_stime){
795 ATH_MSG_WARNING("Event time is before the start time of the current LB");
796 ATH_MSG_WARNING("Event time: " << eventTime << "; current LB: " << lumiBlock << "; start time of current LB: " << lb_stime);
797 }else if (eventTime > lb_etime){
798 ATH_MSG_WARNING("Event time is after the end time of the current LB");
799 ATH_MSG_WARNING("Event time: " << eventTime << "; current LB: " << lumiBlock << "; end time of current LB: " << lb_etime);
800 }else{ // require event time to be at least X seconds after start time of the current LB
801 pass_first3s = (eventTime > lb_stime + m_nSecondsRejectStartofLBInjectorPulse);
802 zdcHGInjPulseValid &= (eventTime > lb_stime + m_nSecondsRejectStartofLBInjectorPulse);
803 zdcLGInjPulseValid &= (eventTime > lb_stime + m_nSecondsRejectStartofLBInjectorPulse);
804 }
805 }
806
807 // ------------ impose the rest of HG/LG injector-pulse validity requirements ------------
808
809 zdcHGInjPulseValid &= zdcModuleHG;
810 zdcHGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::ExcludeEarlyLGBit);
811 zdcHGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::BadChisqBit);
812 zdcHGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::FailBit);
813 zdcHGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::FitMinAmpBit);
814 zdcHGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::BadT0Bit);
815 if (m_minVInjToImposeAmpRequirementHGInjectorPulse > 0 && injectedPulseInputVoltage >= m_minVInjToImposeAmpRequirementHGInjectorPulse){
816 zdcHGInjPulseValid &= (zdcModuleAmp > m_minAmpRequiredHGInjectorPulse);
817 }
818
819 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::LGOverflowBit);
820 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::ExcludeEarlyLGBit);
821 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::BadChisqBit);
822 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::FailBit);
823 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::FitMinAmpBit);
824 zdcLGInjPulseValid &= !(status & 1 << ZDCPulseAnalyzer::BadT0Bit);
825 if (m_minVInjToImposeAmpRequirementLGInjectorPulse > 0 && injectedPulseInputVoltage >= m_minVInjToImposeAmpRequirementLGInjectorPulse){
826 zdcLGInjPulseValid &= (zdcModuleLGFitAmp > m_minAmpRequiredLGInjectorPulse);
827 }
828
829 if (injectedPulseInputVoltage > 0){ // LB > startLB
830 if (injectedPulseInputVoltage > 1 && !zdcLGInjPulseValid &&pass_first3s){ // problematic range && LG not valid && not failing first 3s
831
832 std::ostringstream fails;
833 std::vector<std::pair<std::string, bool>> checks = {
834 {"LGOverflowBit", !(status & (1 << ZDCPulseAnalyzer::LGOverflowBit))},
835 {"ExcludeEarlyLGBit", !(status & (1 << ZDCPulseAnalyzer::ExcludeEarlyLGBit))},
836 {"BadChisqBit", !(status & (1 << ZDCPulseAnalyzer::BadChisqBit))},
837 {"FailBit", !(status & (1 << ZDCPulseAnalyzer::FailBit))},
838 {"FitMinAmpBit", !(status & (1 << ZDCPulseAnalyzer::FitMinAmpBit))},
839 {"BadT0Bit", !(status & (1 << ZDCPulseAnalyzer::BadT0Bit))}
840 };
841
842 for (const auto& [name, pass] : checks) {
843 if (!pass) fails << "fail " << name << "; ";
844 }
845
846 ATH_MSG_DEBUG("[LG NOT valid] Lumi block: " << lumiBlock
847 << "; input voltage: " << injectedPulseInputVoltage
848 << "; LG amp: " << zdcModuleLGFitAmp
849 << "; side" << side_str << ", mod" << module_str
850 << "; " << fails.str());
851
852 }
853 } else if (lumiBlock > m_zdcInjPulserAmpMap->getFirstLumiBlock(m_injMapRunToken)){ // LB > startLB but injectedPulseInputVoltage < 0!
854 ATH_MSG_WARNING("Lumi block: " << lumiBlock << ", yet input voltage is negative!! input voltage: " << injectedPulseInputVoltage);
855 }
856
857
858 // ------------ find the voltage index & fill per-voltage HG&LG cut masks ------------
859
860 std::vector<float> injPulseVoltageSteps = m_injPulseVoltageSteps.value();
861
862 int voltage_index = -1;
863 auto voltage_iter = std::find_if(injPulseVoltageSteps.begin(), injPulseVoltageSteps.end(),
864 [&](float num) { return check_equal_within_rounding(num, injectedPulseInputVoltage); });
865
866 if (voltage_iter != injPulseVoltageSteps.end()) {
867 voltage_index = std::distance(injPulseVoltageSteps.begin(), voltage_iter);
868 ATH_MSG_DEBUG("Found injected-pulse input voltage " << injectedPulseInputVoltage << " at index " << std::distance(injPulseVoltageSteps.begin(), voltage_iter));
869 } else {
870 ATH_MSG_WARNING("Injected-pulse input voltage " << injectedPulseInputVoltage << "(Lumi block: " << lumiBlock << ") NOT found in voltage steps read from json.");
871 ATH_MSG_WARNING("Possibly a problem with json file reading.");
872 ATH_MSG_WARNING("Single-voltage lucrod response histograms NOT filled.");
873 }
874
875 // ------------ fill the histograms ------------
876
877 auto VoltageIndex = Monitored::Scalar<float>("VoltageIndex", voltage_index+0.5);
878
879 if (m_isStandalone) injectedPulseInputVoltage = zdcModuleAmp * 1. / 25000.; // no LB in standalone --> fill dummy histograms
880 fill(m_tools[m_ZDCModuleToolIndices.at(side_str).at(module_str)], VoltageIndex, zdcModuleAmp, zdcModuleFitAmp, zdcModuleMaxADC, zdcModuleMaxADCHG, zdcModuleMaxADCLG, zdcModuleAmpToMaxADCRatio, zdcModuleFract, zdcInjInputVoltagePassMinThrsh, zdcModuleMaskCurSide, zdcUncalibSumCurrentSide, zdcEnergySumCurrentSide, zdcModuleTime, zdcModuleFitT0, zdcModuleCalibAmp, zdcModuleCalibTime, zdcModuleLG, zdcModuleHG, zdcModuleAmpLGRefit, zdcModuleT0LGRefit, zdcModuleT0SubLGRefit, zdcModuleChisqLGRefit, zdcModuleLGFitAmp, zdcModuleHGtoLGAmpRatio, zdcModuleHGtoLGAmpRatioNoNonlinCorr, zdcModuleHGtoLGT0Diff, zdcModuleFractionValid, zdcModuleTimeValid, zdcModuleHGTimeValid, zdcModuleLGTimeValid, injectedPulseInputVoltage, zdcHGInjPulseValid, zdcLGInjPulseValid, lumiBlock, bcid);
881 if (voltage_index >= 0 && (!m_isOnline)){
882 fill(m_tools[m_LucrodResponseSingleVoltageToolIndices.at(side_str).at(module_str).at(m_injPulseVoltageStepsStr.value().at(voltage_index))], zdcModuleFitAmp, zdcModuleLGFitAmp, zdcModuleMaxADCHG, zdcModuleMaxADCLG, zdcHGInjPulseValid, zdcLGInjPulseValid);
883 }
884 } // end if statement for injected pulse
885 else{
886 fill(m_tools[m_ZDCModuleToolIndices.at(side_str).at(module_str)], zdcModuleAmp, zdcModuleMaxADC, zdcModuleMaxADCHG, zdcModuleMaxADCLG, zdcModuleAmpToMaxADCRatio, zdcModuleFract, zdcModuleMaskCurSide, zdcUncalibSumCurrentSide, zdcEnergySumCurrentSide, zdcAbove20NCurrentSide, zdcEnergyAboveModuleFractCut, zdcModuleTime, zdcModuleFitT0, zdcModuleCalibAmp, zdcModuleCalibTime, zdcModuleLG, zdcModuleHG, zdcModuleAmpLGRefit, zdcModuleT0LGRefit, zdcModuleT0SubLGRefit, zdcModuleChisqLGRefit, zdcModuleHGtoLGAmpRatio, zdcModuleHGtoLGAmpRatioNoNonlinCorr, zdcModuleHGtoLGT0Diff, zdcModuleFractionValid, zdcModuleTimeValid, zdcModuleHGTimeValid, zdcModuleLGTimeValid, lumiBlock, bcid);
887 }
888 } // end if statement for pulse bit
889 }
890 }
891 }
892 }
893
894
895 // second loop over zdcModules - read RPD-channel information & fill in RPD histograms
896 // only run if NOT injector pulse
897 if (m_enableRPDAmp){
898 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> RPDChannelStatusHandle(m_RPDChannelStatusKey, ctx);
899 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDChannelAmplitudeHandle(m_RPDChannelAmplitudeKey, ctx);
900 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDChannelMaxADCHandle(m_RPDChannelMaxADCKey, ctx);
901 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, unsigned int> RPDChannelMaxSampleHandle(m_RPDChannelMaxSampleKey, ctx);
902 SG::ReadDecorHandle<xAOD::ZdcModuleContainer, float> RPDChannelAmplitudeCalibHandle(m_RPDChannelAmplitudeCalibKey, ctx);
903 SG::ReadDecorHandle<xAOD::ZdcModuleContainer,std::vector<float>> RPDChannelPileupExpFitParamsHandle(m_RPDChannelPileupExpFitParamsKey, ctx);
904 SG::ReadDecorHandle<xAOD::ZdcModuleContainer,float> RPDChannelPileupFracHandle(m_RPDChannelPileupFracKey, ctx);
905
906 cur_event_RPD_available &= RPDChannelStatusHandle.isAvailable();
907 if (cur_event_RPD_available){
908 for (const auto zdcMod : *zdcModules){
909 int iside = (zdcMod->zdcSide() > 0)? 1 : 0;
910 std::string side_str = (iside == 0)? "C" : "A";
911
912 if (zdcMod->zdcType() == 1) {
913 // this is the RPD
914
915 int ichannel = zdcMod->zdcChannel(); // zero-based
916 std::string channel_str = std::to_string(ichannel);
917
918 int status = RPDChannelStatusHandle(*zdcMod);
919
920 for (int bit = 0; bit < m_nRpdStatusBits; bit++) rpdStatusBitsCount[bit] = 0; // reset
921 for (int bit = 0; bit < m_nRpdStatusBits; bit++){
922 if (status & 1 << bit){
923 rpdStatusBitsCount[bit] += 1;
924 }
925 }
926
927 auto rpdStatusBits = Monitored::Collection("RPDStatusBits", rpdStatusBitsCount);
928
929 rpdChannelSubAmp = rpdSubAmpVecs[iside][ichannel];
930 rpdChannelAmplitude = RPDChannelAmplitudeHandle(*zdcMod);
931 rpdChannelMaxADC = RPDChannelMaxADCHandle(*zdcMod);
932 rpdChannelMaxSample = RPDChannelMaxSampleHandle(*zdcMod);
933 rpdChannelAmplitudeCalib = RPDChannelAmplitudeCalibHandle(*zdcMod);
934 std::vector<float> rpdChannelPileupFitParams = RPDChannelPileupExpFitParamsHandle(*zdcMod);
935 rpdChannelPileupFitSlope = rpdChannelPileupFitParams[1];
936 rpdChannelPileupFrac = RPDChannelPileupFracHandle(*zdcMod);
937
938 absRpdChannelAmplitude = abs(rpdChannelAmplitude);
939 zdcEMModuleEnergySameSide = zdcEMModuleEnergyArr[iside];
940 zdcEnergySumSameSide = zdcEnergySumArr[iside];
941 bool curRpdChannelValid = status & 1 << ZDC::RPDDataAnalyzer::ValidBit;
942 rpdChannelValid = curRpdChannelValid;
943 rpdChannelValidBitFloat = (curRpdChannelValid)? 0.5 : 1.5;
944 rpdChannelCentroidValid = centroidSideValidArr.at(iside);
945
946 rpdAmplitudeCalibSum[iside] += rpdChannelAmplitudeCalib;
947 rpdMaxADCSum[iside] += rpdChannelMaxADC;
948
949 fill(m_tools[m_RPDChannelToolIndices.at(side_str).at(channel_str)], rpdChannelSubAmp, rpdChannelAmplitude, rpdChannelAmplitudeCalib, rpdChannelMaxADC, rpdChannelMaxSample, rpdStatusBits, rpdChannelPileupFitSlope, absRpdChannelAmplitude, rpdChannelPileupFrac, zdcEMModuleEnergySameSide, zdcEnergySumSameSide, rpdChannelValid, rpdChannelValidBitFloat, rpdChannelCentroidValid, lumiBlock, bcid);
950 }
951 }
952 }
953 }
954
955
956// ______________________________________________________________________________
957 // obtaining fCalEt on A,C side
958// ______________________________________________________________________________
959
960 auto totalEt24 = Monitored::Scalar<double>("totalEt24", 0.0); // total ET within |eta| < 2.4
961 auto fcalEtA = Monitored::Scalar<double>("fcalEtA", 0.0);
962 auto fcalEtC = Monitored::Scalar<double>("fcalEtC", 0.0);
963 auto fcalEtSumTwoSides = Monitored::Scalar<double>("fcalEtSumTwoSides", 0.0);
964 std::array<double,2> fcalEtArr = {0.,0.};
965
966 if (m_enableZDCPhysics && m_CalInfoOn){
967 SG::ReadHandle<xAOD::HIEventShapeContainer> eventShapes(m_HIEventShapeContainerKey, ctx);
968 if (! eventShapes.isValid()) {
969 ATH_MSG_WARNING("evtStore() does not contain Collection with name "<< m_HIEventShapeContainerKey);
970 }
971 else{
972 for (const auto eventShape : *eventShapes){
973 int layer = eventShape->layer();
974 float eta = eventShape->etaMin();
975 float et = eventShape->et();
976 if (layer == 21 || layer == 22 || layer == 23){ // FCal
977 fcalEtSumTwoSides += et / 1000000.;
978 if (eta > 0){
979 fcalEtA += et / 1000000.;
980 fcalEtArr[1] += et / 1000000.;
981 }
982 if (eta < 0){
983 fcalEtC += et / 1000000.;
984 fcalEtArr[0] += et / 1000000.;
985 }
986 }
987
988 if (TMath::Abs(eta) < 2.4) {
989 totalEt24 += et / 1000000.;
990 }
991 }
992 }
993 }
994
995// ______________________________________________________________________________
996 // give warning if there is missing aux data but no decoding error
997// ______________________________________________________________________________
998 if (!cur_event_ZDC_available && !zdcDecodingError){
999 ATH_MSG_WARNING("Current event has no ZDC decoding error but ZDC aux data is not available!");
1000 }
1001 if (!cur_event_RPD_available && !rpdDecodingError){
1002 ATH_MSG_WARNING("Current event has no RPD decoding error but RPD aux data is not available!");
1003 }
1004// ______________________________________________________________________________
1005 // give warning and return if neither ZDC nor RPD are available
1006// ______________________________________________________________________________
1007 if (!cur_event_ZDC_available && !cur_event_RPD_available){
1008 ATH_MSG_WARNING("For current event, neither ZDC nor RPD data are available!");
1009 return StatusCode::SUCCESS;
1010 }
1011
1012// ______________________________________________________________________________
1013 // filling generic ZDC monitoring tool for A-C side correlations & cos(reaction plane angle)
1014// ______________________________________________________________________________
1015
1016 if ((m_enableZDCPhysics && cur_event_ZDC_available) || (m_enableCentroid && cur_event_RPD_available)) {
1017
1018 if (m_enableZDCPhysics && cur_event_ZDC_available){
1019 // ZDC-only global variables
1020 std::vector<std::reference_wrapper<Monitored::IMonitoredVariable>> vars_global = {
1021 std::ref(lumiBlock),
1022 std::ref(bcid),
1023 std::ref(passTrigSideA),
1024 std::ref(passTrigSideC),
1025 std::ref(zdcEnergySumA),
1026 std::ref(zdcEnergySumC),
1027 std::ref(zdcUncalibSumA),
1028 std::ref(zdcUncalibSumC),
1029 std::ref(zdcEnergySumTwoSidesTeV),
1030 };
1031
1032 // calo-based global variables
1033 if (m_CalInfoOn){ // calorimeter information is turned on
1034 vars_global.insert(vars_global.end(), {
1035 std::ref(fcalEtA),
1036 std::ref(fcalEtC),
1037 std::ref(zdcHadronicEnergySumTwoSidesTeV),
1038 std::ref(fcalEtSumTwoSides),
1039 std::ref(totalEt24)
1040 });
1041 }
1042
1043 if (m_EnableUCCTriggers){
1044 vars_global.insert(vars_global.end(), {
1045 std::ref(passUCCTrig_HELT15),
1046 std::ref(passUCCTrig_HELT20),
1047 std::ref(passUCCTrig_HELT25),
1048 std::ref(passUCCTrig_HELT35),
1049 std::ref(passUCCTrig_HELT50)
1050 });
1051 }
1052
1053 if (m_EnableOOpOTriggers){
1054 for (auto& m : oopoTrigPassBoolVec) vars_global.push_back( std::ref(m) );
1055 }
1056
1057 auto monitor_globals = Monitored::Group(zdcTool, vars_global);
1058 }
1059
1060 if (m_enableCentroid && cur_event_RPD_available){
1061 fill(zdcTool, rpdCosDeltaReactionPlaneAngle, bothReactionPlaneAngleValid, bothHasCentroid);
1062 }
1063 }
1064
1065// ______________________________________________________________________________
1066 // filling per-side tools
1067// ______________________________________________________________________________
1068
1069
1070 if (m_enableZDCPhysics && cur_event_ZDC_available && m_enableRPDAmp && cur_event_RPD_available){
1071 for (int iside = 0; iside < m_nSides; iside++){
1072 std::string side_str = (iside == 0)? "C" : "A";
1073
1074 auto passTrigOppSide = Monitored::Scalar<bool>("passTrigOppSide",passTrigOppSideArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1075 auto zdcEnergySumCurSide = Monitored::Scalar<float>("zdcEnergySum",zdcEnergySumArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1076 auto zdcEnergySumCurSideTeV = Monitored::Scalar<float>("zdcEnergySumTeV",zdcEnergySumArr[iside]/1000.); // this is duplicate information as A,C but convenient for filling per-side histograms
1077 auto zdcUncalibSumCurSide = Monitored::Scalar<float>("zdcUncalibSum",zdcUncalibSumArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1078 auto zdcEMModuleEnergyCurSide = Monitored::Scalar<float>("zdcEMModuleEnergy",zdcEMModuleEnergyArr[iside]);
1079 auto zdcAvgTimeCurSide = Monitored::Scalar<float>("zdcAvgTime",zdcAvgTimeArr[iside]);
1080
1081 zdcModuleMaskCurSide = zdcModuleMaskArr[iside];
1082
1083 auto fcalEtCurSide = Monitored::Scalar<float>("fCalEt",fcalEtArr[iside]);
1084 ATH_MSG_DEBUG("fcalEtCurSide: " << fcalEtCurSide);
1085
1086 auto rpdAmplitudeCalibSumCurSide = Monitored::Scalar<float>("rpdAmplitudeCalibSum",rpdAmplitudeCalibSum[iside]);
1087 auto rpdMaxADCSumCurSide = Monitored::Scalar<float>("rpdMaxADCSum",rpdMaxADCSum[iside]);
1088 auto rpdCurSideValid = Monitored::Scalar<bool>("RPDSideValid",rpdSideValidArr[iside]);
1089
1090 fill(m_tools[m_ZDCSideToolIndices.at(side_str)], passTrigOppSide, zdcEnergySumCurSide, zdcEnergySumCurSideTeV, zdcUncalibSumCurSide, zdcEMModuleEnergyCurSide, zdcAvgTimeCurSide, zdcModuleMaskCurSide, rpdAmplitudeCalibSumCurSide, rpdMaxADCSumCurSide, rpdCurSideValid, fcalEtCurSide, lumiBlock, bcid);
1091 }
1092 }else if (m_enableZDCPhysics && cur_event_ZDC_available){
1093 for (int iside = 0; iside < m_nSides; iside++){
1094 std::string side_str = (iside == 0)? "C" : "A";
1095
1096 auto passTrigOppSide = Monitored::Scalar<bool>("passTrigOppSide",passTrigOppSideArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1097 auto zdcEnergySumCurSide = Monitored::Scalar<float>("zdcEnergySum",zdcEnergySumArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1098 auto zdcEnergySumCurSideTeV = Monitored::Scalar<float>("zdcEnergySum",zdcEnergySumArr[iside]/1000.); // this is duplicate information as A,C but convenient for filling per-side histograms
1099 auto zdcUncalibSumCurSide = Monitored::Scalar<float>("zdcUncalibSum",zdcUncalibSumArr[iside]); // this is duplicate information as A,C but convenient for filling per-side histograms
1100 auto zdcEMModuleEnergyCurSide = Monitored::Scalar<float>("zdcEMModuleEnergy",zdcEMModuleEnergyArr[iside]);
1101 auto zdcAvgTimeCurSide = Monitored::Scalar<float>("zdcAvgTime",zdcAvgTimeArr[iside]);
1102 zdcModuleMaskCurSide = zdcModuleMaskArr[iside];
1103 auto fcalEtCurSide = Monitored::Scalar<float>("fCalEt",fcalEtArr[iside]);
1104
1105 fill(m_tools[m_ZDCSideToolIndices.at(side_str)], passTrigOppSide, zdcEnergySumCurSide, zdcEnergySumCurSideTeV, zdcUncalibSumCurSide, zdcEMModuleEnergyCurSide, zdcAvgTimeCurSide, zdcModuleMaskCurSide, fcalEtCurSide, lumiBlock, bcid);
1106 }
1107 }else if (m_enableRPDAmp && cur_event_RPD_available){
1108 for (int iside = 0; iside < m_nSides; iside++){
1109 std::string side_str = (iside == 0)? "C" : "A";
1110
1111 auto rpdAmplitudeCalibSumCurSide = Monitored::Scalar<float>("rpdAmplitudeCalibSum",rpdAmplitudeCalibSum[iside]);
1112 auto rpdMaxADCSumCurSide = Monitored::Scalar<float>("rpdMaxADCSum",rpdMaxADCSum[iside]);
1113 auto rpdCurSideValid = Monitored::Scalar<bool>("RPDSideValid",rpdSideValidArr[iside]);
1114
1115 fill(m_tools[m_ZDCSideToolIndices.at(side_str)], rpdAmplitudeCalibSumCurSide, rpdMaxADCSumCurSide, rpdCurSideValid, lumiBlock, bcid);
1116 }
1117 }
1118
1119 return StatusCode::SUCCESS;
1120}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_INFO(x)
#define ANA_CHECK(EXP)
check whether the given expression was successful
float et(const xAOD::jFexSRJetRoI *j)
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.
Declare a monitored scalar variable.
const std::string & key() const
Return the StoreGate ID for the referenced object.
float getPulserAmplitude(const Token &token, unsigned int lumiBlock) const
unsigned int getFirstLumiBlock(const Token &token) const
static const int m_nRpdStatusBits
Gaudi::Property< float > m_energyCutForModuleFractMonitor
Gaudi::Property< std::vector< std::string > > m_OOpOtriggerChains
Gaudi::Property< std::vector< std::string > > m_injPulseVoltageStepsStr
std::map< std::string, std::map< std::string, int > > m_RPDChannelToolIndices
Gaudi::Property< unsigned int > m_nSecondsRejectStartofLBInjectorPulse
Gaudi::Property< float > m_minVInjToEvaluateLowAmpPercentageDQInjectorPulse
std::map< std::string, int > m_ZDCSideToolIndices
Gaudi::Property< std::vector< float > > m_injPulseVoltageSteps
std::shared_ptr< ZdcInjPulserAmpMap > m_zdcInjPulserAmpMap
Gaudi::Property< float > m_minAmpRequiredHGInjectorPulse
std::map< std::string, std::map< std::string, std::map< std::string, int > > > m_LucrodResponseSingleVoltageToolIndices
Gaudi::Property< float > m_ZDCEnergyCutForCentroidValidBitMonitor
Gaudi::Property< float > m_minAmpRequiredLGInjectorPulse
Gaudi::Property< float > m_expected1N
Gaudi::Property< std::map< int, std::string > > m_OOpOL1TriggerFromCTPIDMap
std::map< std::string, std::map< std::string, int > > m_ZDCModuleToolIndices
static const int m_nZdcStatusBits
static const int m_nSides
static const int m_nRpdCentroidStatusBits
SG::ReadCondHandleKey< AthenaAttributeList > m_LBLBFolderInputKey
float calculate_inverse_bin_width(float event_value, const std::string &variable_name, const std::vector< float > &bin_edges) const
@ ForwardDet
The forward detectors.
const std::vector< uint32_t > & tbp() const
Get the Trigger Before Prescale bits.
ValuesCollection< T > Collection(std::string name, const T &collection)
Declare a monitored (double-convertible) collection.
str varName
end cluster ToT and charge
@ layer
Definition HitInfo.h:79
status
Definition merge.py:16
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
TrigDecision_v1 TrigDecision
Define the latest version of the trigger decision class.
void fill(H5::Group &out_file, size_t iterations)

◆ filterPassed()

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

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

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

◆ GetEventInfo()

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

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

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

Definition at line 111 of file AthMonitorAlgorithm.cxx.

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

◆ getGroup()

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

Get a specific monitoring tool from the tool handle array.

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

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

Definition at line 168 of file AthMonitorAlgorithm.cxx.

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

◆ getTrigDecisionTool()

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

Get the trigger decision tool member.

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

Returns
m_trigDecTool

Definition at line 198 of file AthMonitorAlgorithm.cxx.

198 {
199 return m_trigDecTool;
200}

◆ initialize()

StatusCode ZdcMonitorAlgorithm::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 83 of file ZdcMonitorAlgorithm.cxx.

83 {
84
85 ATH_MSG_DEBUG("initializing for the monitoring algorithm");
86 ATH_MSG_DEBUG("Is online? " << m_isOnline);
87 ATH_MSG_DEBUG("Is calorimeter info turned on? " << m_CalInfoOn);
88 ATH_MSG_DEBUG("Is single-side ZDC trigger info turned on? " << m_EnableZDCSingleSideTriggers);
89 ATH_MSG_DEBUG("Is UCC trigger info turned on? " << m_EnableUCCTriggers);
90 ATH_MSG_DEBUG("Is injected pulse? " << m_isInjectedPulse);
91 ATH_MSG_DEBUG("Is Standalone? " << m_isStandalone);
92 ATH_MSG_DEBUG("Enable ZDC? " << m_enableZDC);
93 ATH_MSG_DEBUG("Enable ZDC Physics? " << m_enableZDCPhysics);
94 ATH_MSG_DEBUG("Enable RPD Amp? " << m_enableRPDAmp);
95 ATH_MSG_DEBUG("Enable Centroid? " << m_enableCentroid);
96
97 using namespace Monitored;
98 ATH_CHECK( m_ZdcSumContainerKey.initialize() );
99 ATH_CHECK( m_ZdcModuleContainerKey.initialize() );
100 ATH_CHECK( m_HIEventShapeContainerKey.initialize(m_CalInfoOn) );
101
102 ATH_CHECK( m_eventTypeKey.initialize() );
103 // ATH_CHECK( m_ZdcBCIDKey.initialize() );
104 ATH_CHECK( m_DAQModeKey.initialize() );
105
106 ATH_CHECK( m_ZdcSumCalibEnergyKey.initialize(m_enableZDC) );
107 ATH_CHECK( m_ZdcSumUncalibSumKey.initialize(m_enableZDC) );
108 ATH_CHECK( m_ZdcSumAverageTimeKey.initialize(m_enableZDC) );
109 ATH_CHECK( m_ZdcSumModuleMaskKey.initialize(m_enableZDC) );
110
111 // access to conditions in cool database
112 ATH_CHECK( m_LBLBFolderInputKey.initialize(!m_isSim && !m_isOnline && m_isInjectedPulse) );
113
114 ATH_CHECK( m_ZdcModuleStatusKey.initialize(m_enableZDC) );
115 ATH_CHECK( m_ZdcModuleAmplitudeKey.initialize(m_enableZDC) );
116 ATH_CHECK( m_ZdcModuleTimeKey.initialize(m_enableZDC) );
117 ATH_CHECK( m_ZdcModuleAmpNoNonLinKey.initialize(m_enableZDC) );
118 ATH_CHECK( m_ZdcModuleFitAmpKey.initialize(m_enableZDC) );
119 ATH_CHECK( m_ZdcModuleFitT0Key.initialize(m_enableZDC) );
120 ATH_CHECK( m_ZdcModuleChisqKey.initialize(m_enableZDC) );
121 ATH_CHECK( m_ZdcModuleCalibEnergyKey.initialize(m_enableZDC) );
122 ATH_CHECK( m_ZdcModuleCalibTimeKey.initialize(m_enableZDC) );
123 ATH_CHECK( m_ZdcModuleMaxADCKey.initialize(m_enableZDC) );
124 ATH_CHECK( m_ZdcModuleMaxADCHGKey.initialize(m_enableZDC) );
125 ATH_CHECK( m_ZdcModuleMaxADCLGKey.initialize(m_enableZDC) );
126
127 ATH_CHECK( m_ZdcModuleFitAmpLGRefitKey.initialize(m_enableZDC) );
128 ATH_CHECK( m_ZdcModuleAmpLGRefitKey.initialize(m_enableZDC) );
129 ATH_CHECK( m_ZdcModuleT0LGRefitKey.initialize(m_enableZDC) );
130 ATH_CHECK( m_ZdcModuleT0SubLGRefitKey.initialize(m_enableZDC) );
131 ATH_CHECK( m_ZdcModuleChisqLGRefitKey.initialize(m_enableZDC) );
132
133 ATH_CHECK( m_RPDChannelAmplitudeKey.initialize(m_enableRPDAmp) );
134 ATH_CHECK( m_RPDChannelAmplitudeCalibKey.initialize(m_enableRPDAmp) );
135 ATH_CHECK( m_RPDChannelMaxADCKey.initialize(m_enableRPDAmp) );
136 ATH_CHECK( m_RPDChannelMaxSampleKey.initialize(m_enableRPDAmp) );
137 ATH_CHECK( m_RPDChannelStatusKey.initialize(m_enableRPDAmp) );
138 ATH_CHECK( m_RPDChannelPileupExpFitParamsKey.initialize(m_enableRPDAmp) );
139 ATH_CHECK( m_RPDChannelPileupFracKey.initialize(m_enableRPDAmp) );
140
141 ATH_CHECK( m_RPDChannelSubtrAmpKey.initialize(m_enableCentroid) );
142 ATH_CHECK( m_RPDSubtrAmpSumKey.initialize(m_enableCentroid) );
143 ATH_CHECK( m_RPDxCentroidKey.initialize(m_enableCentroid) );
144 ATH_CHECK( m_RPDyCentroidKey.initialize(m_enableCentroid) );
145 ATH_CHECK( m_RPDreactionPlaneAngleKey.initialize(m_enableCentroid) );
146 ATH_CHECK( m_RPDcosDeltaReactionPlaneAngleKey.initialize(m_enableCentroid) );
147 ATH_CHECK( m_RPDcentroidStatusKey.initialize(m_enableCentroid) );
148 ATH_CHECK( m_RPDSideStatusKey.initialize(m_enableCentroid) );
149
150 // calculate log binnings
151 calculate_log_bin_edges(m_moduleChisqHistMinValue, m_moduleChisqHistMaxvalue, m_moduleChisqHistNumBins, m_ZdcModuleChisqBinEdges);
152 calculate_log_bin_edges(m_moduleChisqOverAmpHistMinValue, m_moduleChisqOverAmpHistMaxvalue, m_moduleChisqOverAmpHistNumBins, m_ZdcModuleChisqOverAmpBinEdges);
153
154 // read json file for LB-to-injector-pulse-amplitude mapping and fill the mapping vector
155 m_zdcInjPulserAmpMap = std::make_shared<ZdcInjPulserAmpMap>();
156 ATH_MSG_DEBUG( "Using JSON file for injector-pulse voltage at path " << m_zdcInjPulserAmpMap->getFilePath() );
157 ATH_MSG_DEBUG("CALIBPATH: " << std::getenv("CALIBPATH"));
158
159 // create monitoring tools and map the strings to the tools
160 std::vector<std::string> sides = {"C","A"};
161 std::vector<std::string> modules = {"0","1","2","3"};
162 std::vector<std::string> channels = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15"};
163
164 m_ZDCModuleToolIndices = buildToolMap<std::map<std::string,int>>(m_tools,"ZdcModuleMonitor",sides,modules);
165 if (m_enableZDCPhysics || m_enableRPDAmp || m_enableCentroid){ // none is true for injector pulse --> no Per-side monitoring tool
166 m_ZDCSideToolIndices = buildToolMap<int>(m_tools,"ZdcSideMonitor",sides);
167 }
168 if (m_enableRPDAmp){
169 m_RPDChannelToolIndices = buildToolMap<std::map<std::string,int>>(m_tools,"RpdChannelMonitor",sides,channels);
170 }
171 if (m_isInjectedPulse && (!m_isStandalone) && (!m_isOnline)) {
172 m_LucrodResponseSingleVoltageToolIndices = buildToolMap<std::map<std::string,std::map<std::string,int>>>(m_tools,"LucrodResponseSingleVoltageMonitor",sides,modules,m_injPulseVoltageStepsStr.value());
173 }
174
175 //---------------------------------------------------
176
177 // Get access to the injector pulse steps for (fixed) run number for current job
178 //
179 if (m_isInjectedPulse && (!m_isStandalone)){
180
181 m_injMapRunToken = m_zdcInjPulserAmpMap->lookupRun(m_runNumber, true);
182 if (!m_injMapRunToken.isValid()) {
183 ATH_MSG_ERROR("Unable to obtain injector pulse steps for run " << m_runNumber);
184 }
185 else {
186 unsigned int startLB = m_zdcInjPulserAmpMap->getFirstLumiBlock(m_injMapRunToken);
187 unsigned int nsteps = m_zdcInjPulserAmpMap->getNumSteps(m_injMapRunToken);
188 ATH_MSG_INFO("Successfully obtained injector pulse steps for run " << m_runNumber
189 << ", first LB = " << startLB << ", number of steps = " << nsteps);
190 }
191 }
192
193 //---------------------------------------------------
194 // initialize superclass
195
197 //---------------------------------------------------
198
199}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
virtual StatusCode initialize() override
initialize
StatusCode initialize(bool used=true)
const std::string & getFilePath() const
Token lookupRun(unsigned int runNumber, bool allowDefault=false)
unsigned int getNumSteps(const Token &token) const
ZdcInjPulserAmpMap::Token m_injMapRunToken
Generic monitoring tool for athena components.
std::initializer_list< unsigned int > constexpr sides
Definition RPDUtils.h:17

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

◆ 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

◆ sysExecute()

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

Execute an algorithm.

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

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

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

◆ sysStart()

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

Handle START transition.

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

◆ trigChainsArePassed()

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

Check whether triggers are passed.

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

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

Definition at line 203 of file AthMonitorAlgorithm.cxx.

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

◆ updateVHKA()

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

Definition at line 308 of file AthCommonDataStore.h.

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

Member Data Documentation

◆ args

ZdcMonitorAlgorithm.args = flags.fillFromArgs(parser=parser)

Definition at line 1271 of file ZdcMonitorAlgorithm.py.

◆ cfg

ZdcMonitorAlgorithm.cfg = MainServicesCfg(flags)

Definition at line 1287 of file ZdcMonitorAlgorithm.py.

◆ default

ZdcMonitorAlgorithm.default

Definition at line 1267 of file ZdcMonitorAlgorithm.py.

◆ directory

str ZdcMonitorAlgorithm.directory = ''

Definition at line 1262 of file ZdcMonitorAlgorithm.py.

◆ Files

ZdcMonitorAlgorithm.Files

Definition at line 1264 of file ZdcMonitorAlgorithm.py.

◆ flags

ZdcMonitorAlgorithm.flags = initConfigFlags()

Definition at line 1261 of file ZdcMonitorAlgorithm.py.

◆ help

ZdcMonitorAlgorithm.help

Definition at line 1267 of file ZdcMonitorAlgorithm.py.

◆ HISTFileName

ZdcMonitorAlgorithm.HISTFileName

Definition at line 1275 of file ZdcMonitorAlgorithm.py.

◆ inputfile

str ZdcMonitorAlgorithm.inputfile = 'AOD.pool.root'

Definition at line 1263 of file ZdcMonitorAlgorithm.py.

◆ m_auxSuffix

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_auxSuffix {this, "AuxSuffix", "", "Append this tag onto end of AuxData"}
private

Definition at line 61 of file ZdcMonitorAlgorithm.h.

61{this, "AuxSuffix", "", "Append this tag onto end of AuxData"};

◆ m_CalInfoOn

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_CalInfoOn {this,"CalInfoOn",false}
private

Definition at line 131 of file ZdcMonitorAlgorithm.h.

131{this,"CalInfoOn",false};

◆ m_DAQModeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_DAQModeKey {this, "ZdcDAQModeKey", m_zdcSumContainerName + ".DAQMode" + m_auxSuffix}
private

Definition at line 160 of file ZdcMonitorAlgorithm.h.

160{this, "ZdcDAQModeKey", m_zdcSumContainerName + ".DAQMode" + m_auxSuffix};

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

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_enableCentroid {this,"EnableCentroid",true}
private

Definition at line 145 of file ZdcMonitorAlgorithm.h.

145{this,"EnableCentroid",true};

◆ m_EnableOOpOTriggers

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_EnableOOpOTriggers {this,"EnableOOpOTriggers",false}
private

Definition at line 134 of file ZdcMonitorAlgorithm.h.

134{this,"EnableOOpOTriggers",false};

◆ m_enableRPD

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_enableRPD {this,"EnableRPD",true}
private

Definition at line 143 of file ZdcMonitorAlgorithm.h.

143{this,"EnableRPD",true};

◆ m_enableRPDAmp

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_enableRPDAmp {this,"EnableRPDAmp",true}
private

Definition at line 144 of file ZdcMonitorAlgorithm.h.

144{this,"EnableRPDAmp",true};

◆ m_EnableUCCTriggers

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_EnableUCCTriggers {this,"EnableUCCTriggers",false}
private

Definition at line 133 of file ZdcMonitorAlgorithm.h.

133{this,"EnableUCCTriggers",false};

◆ m_enableZDC

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_enableZDC {this,"EnableZDC",true}
private

Definition at line 141 of file ZdcMonitorAlgorithm.h.

141{this,"EnableZDC",true};

◆ m_enableZDCPhysics

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_enableZDCPhysics {this,"EnableZDCPhysics",true}
private

Definition at line 142 of file ZdcMonitorAlgorithm.h.

142{this,"EnableZDCPhysics",true};

◆ m_EnableZDCSingleSideTriggers

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_EnableZDCSingleSideTriggers {this,"EnableZDCSingleSideTriggers",true}
private

Definition at line 132 of file ZdcMonitorAlgorithm.h.

132{this,"EnableZDCSingleSideTriggers",true};

◆ m_energyCutForModuleFractMonitor

Gaudi::Property<float> ZdcMonitorAlgorithm::m_energyCutForModuleFractMonitor {this, "EnergyCutForModuleFractMonitor", 13400., "Minimum energy sum required on each side for event to enter module fraction monitoring (default at 5 * 2680 GeV)"}
private

Definition at line 65 of file ZdcMonitorAlgorithm.h.

65{this, "EnergyCutForModuleFractMonitor", 13400., "Minimum energy sum required on each side for event to enter module fraction monitoring (default at 5 * 2680 GeV)"};

◆ 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_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_eventTypeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_eventTypeKey {this, "ZdcEventTypeKey", m_zdcSumContainerName + ".EventType" + m_auxSuffix}
private

Definition at line 158 of file ZdcMonitorAlgorithm.h.

158{this, "ZdcEventTypeKey", m_zdcSumContainerName + ".EventType" + m_auxSuffix};

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

Gaudi::Property<float> ZdcMonitorAlgorithm::m_expected1N {this, "Expected1NADC", 1000., "Expected 1N position in ADC"}
private

Definition at line 63 of file ZdcMonitorAlgorithm.h.

63{this, "Expected1NADC", 1000., "Expected 1N position in ADC"}; // only needs to indicate the rough scale, only used in the >20N cut mask

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

SG::ReadHandleKey<xAOD::HIEventShapeContainer> ZdcMonitorAlgorithm::m_HIEventShapeContainerKey {this, "HIEventShapeContainerKey", "HIEventShape"}
private

Definition at line 154 of file ZdcMonitorAlgorithm.h.

154{this, "HIEventShapeContainerKey", "HIEventShape"};

◆ m_injMapRunToken

ZdcInjPulserAmpMap::Token ZdcMonitorAlgorithm::m_injMapRunToken {}
private

Definition at line 57 of file ZdcMonitorAlgorithm.h.

57{};

◆ m_injPulseVoltageSteps

Gaudi::Property<std::vector<float> > ZdcMonitorAlgorithm::m_injPulseVoltageSteps {this, "InjPulseVoltageSteps", {0.}}
private

Definition at line 148 of file ZdcMonitorAlgorithm.h.

148{this, "InjPulseVoltageSteps", {0.}};

◆ m_injPulseVoltageStepsStr

Gaudi::Property<std::vector<std::string> > ZdcMonitorAlgorithm::m_injPulseVoltageStepsStr {this, "InjPulseVoltageStepsStr", {""}}
private

Definition at line 149 of file ZdcMonitorAlgorithm.h.

149{this, "InjPulseVoltageStepsStr", {""}};

◆ m_isCommRun

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isCommRun {this,"IsCommRun",false}
private

Definition at line 146 of file ZdcMonitorAlgorithm.h.

146{this,"IsCommRun",false};

◆ m_isInjectedPulse

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isInjectedPulse {this,"IsInjectedPulse",false}
private

Definition at line 139 of file ZdcMonitorAlgorithm.h.

139{this,"IsInjectedPulse",false};

◆ m_isOnline

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isOnline {this,"IsOnline",false}
private

Definition at line 129 of file ZdcMonitorAlgorithm.h.

129{this,"IsOnline",false};

◆ m_isOOMode

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isOOMode {this,"IsOOMode",true}
private

Definition at line 138 of file ZdcMonitorAlgorithm.h.

138{this,"IsOOMode",true};

◆ m_IsPEBStream

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_IsPEBStream {this,"IsPEBStream",true}
private

Definition at line 135 of file ZdcMonitorAlgorithm.h.

135{this,"IsPEBStream",true};

◆ m_ispOMode

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_ispOMode {this,"IspOMode",true}
private

Definition at line 137 of file ZdcMonitorAlgorithm.h.

137{this,"IspOMode",true};

◆ m_isPPMode

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isPPMode {this,"IsPPMode",true}
private

Definition at line 136 of file ZdcMonitorAlgorithm.h.

136{this,"IsPPMode",true};

◆ m_isSim

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isSim {this,"IsSim",false}
private

Definition at line 130 of file ZdcMonitorAlgorithm.h.

130{this,"IsSim",false}; // is simulation

◆ m_isStandalone

Gaudi::Property<bool> ZdcMonitorAlgorithm::m_isStandalone {this,"IsStandalone",false}
private

Definition at line 140 of file ZdcMonitorAlgorithm.h.

140{this,"IsStandalone",false}; // determine if standalone via metadata

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

SG::ReadCondHandleKey<AthenaAttributeList> ZdcMonitorAlgorithm::m_LBLBFolderInputKey { this, "LBLBFolderInputKey", "/TRIGGER/LUMI/LBLB" }
private

Definition at line 156 of file ZdcMonitorAlgorithm.h.

156{ this, "LBLBFolderInputKey", "/TRIGGER/LUMI/LBLB" };

◆ m_lbTimeCoolFolderName

Gaudi::Property<std::string > ZdcMonitorAlgorithm::m_lbTimeCoolFolderName { this, "LumiBlockTimeCoolFolderName", "/TRIGGER/LUMI/LBLB", "COOL folder in COOLONL_TRIGGER holding info about start and stop times for luminosity blocks" }
private

Definition at line 101 of file ZdcMonitorAlgorithm.h.

101{ this, "LumiBlockTimeCoolFolderName", "/TRIGGER/LUMI/LBLB", "COOL folder in COOLONL_TRIGGER holding info about start and stop times for luminosity blocks" };

◆ m_LucrodResponseSingleVoltageToolIndices

std::map<std::string,std::map<std::string,std::map<std::string,int> > > ZdcMonitorAlgorithm::m_LucrodResponseSingleVoltageToolIndices
private

Definition at line 117 of file ZdcMonitorAlgorithm.h.

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

Gaudi::Property<float> ZdcMonitorAlgorithm::m_minAmpRequiredHGInjectorPulse {this, "MinAmpRequiredHGInjectorPulse", 20, "HG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"}
private

Definition at line 87 of file ZdcMonitorAlgorithm.h.

87{this, "MinAmpRequiredHGInjectorPulse", 20, "HG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"};

◆ m_minAmpRequiredLGInjectorPulse

Gaudi::Property<float> ZdcMonitorAlgorithm::m_minAmpRequiredLGInjectorPulse {this, "MinAmpRequiredLGInjectorPulse", 20, "LG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"}
private

Definition at line 88 of file ZdcMonitorAlgorithm.h.

88{this, "MinAmpRequiredLGInjectorPulse", 20, "LG Minimum amplitude required for event to enter reco-amp-vs-input-voltage histograms in the injector pulse stream"};

◆ m_minVInjToEvaluateLowAmpPercentageDQInjectorPulse

Gaudi::Property<float> ZdcMonitorAlgorithm::m_minVInjToEvaluateLowAmpPercentageDQInjectorPulse {this, "MinVInjToEvaluateLowAmpPercentageDQInjectorPulse", 0.04, "Minimum input voltage required for events to be plotted in "}
private

Definition at line 96 of file ZdcMonitorAlgorithm.h.

96{this, "MinVInjToEvaluateLowAmpPercentageDQInjectorPulse", 0.04, "Minimum input voltage required for events to be plotted in "};

◆ m_minVInjToImposeAmpRequirementHGInjectorPulse

Gaudi::Property<float> ZdcMonitorAlgorithm::m_minVInjToImposeAmpRequirementHGInjectorPulse {this, "MinVInjToImposeAmpRequirementHGInjectorPulse", 0.002, "Minimum input voltage to impose HG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel HG minimum-amplitude requirement"}
private

Definition at line 89 of file ZdcMonitorAlgorithm.h.

89{this, "MinVInjToImposeAmpRequirementHGInjectorPulse", 0.002, "Minimum input voltage to impose HG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel HG minimum-amplitude requirement"};

◆ m_minVInjToImposeAmpRequirementLGInjectorPulse

Gaudi::Property<float> ZdcMonitorAlgorithm::m_minVInjToImposeAmpRequirementLGInjectorPulse {this, "MinVInjToImposeAmpRequirementLGInjectorPulse", 0.002, "Minimum input voltage to impose LG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel LG minimum-amplitude requirement"}
private

Definition at line 90 of file ZdcMonitorAlgorithm.h.

90{this, "MinVInjToImposeAmpRequirementLGInjectorPulse", 0.002, "Minimum input voltage to impose LG minimum amplitude requirement in the injector pulse stream; set to negative value to cancel LG minimum-amplitude requirement"};

◆ m_moduleChisqHistMaxvalue

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqHistMaxvalue {this, "ZDCModuleChisqHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq distribution"}
private

Definition at line 69 of file ZdcMonitorAlgorithm.h.

69{this, "ZDCModuleChisqHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq distribution"}; // to manually calculate inverse-bin-width weight

◆ m_moduleChisqHistMinValue

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqHistMinValue {this, "ZDCModuleChisqHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq distribution"}
private

Definition at line 68 of file ZdcMonitorAlgorithm.h.

68{this, "ZDCModuleChisqHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq distribution"}; // to manually calculate inverse-bin-width weight

◆ m_moduleChisqHistNumBins

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqHistNumBins {this, "ZDCModuleChisqHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq distribution"}
private

Definition at line 70 of file ZdcMonitorAlgorithm.h.

70{this, "ZDCModuleChisqHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq distribution"}; // to manually calculate inverse-bin-width weight

◆ m_moduleChisqOverAmpHistMaxvalue

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqOverAmpHistMaxvalue {this, "ZDCModuleChisqOverAmpHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq over amplitude distribution"}
private

Definition at line 72 of file ZdcMonitorAlgorithm.h.

72{this, "ZDCModuleChisqOverAmpHistMaxvalue", 1000., "Max value for logarithmic binning for ZDC module chisq over amplitude distribution"}; // to manually calculate inverse-bin-width weight

◆ m_moduleChisqOverAmpHistMinValue

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqOverAmpHistMinValue {this, "ZDCModuleChisqOverAmpHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq over amplitude distribution"}
private

Definition at line 71 of file ZdcMonitorAlgorithm.h.

71{this, "ZDCModuleChisqOverAmpHistMinValue", 1000., "Min value for logarithmic binning for ZDC module chisq over amplitude distribution"}; // to manually calculate inverse-bin-width weight

◆ m_moduleChisqOverAmpHistNumBins

Gaudi::Property<float> ZdcMonitorAlgorithm::m_moduleChisqOverAmpHistNumBins {this, "ZDCModuleChisqOverAmpHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq over amplitude distribution"}
private

Definition at line 73 of file ZdcMonitorAlgorithm.h.

73{this, "ZDCModuleChisqOverAmpHistNumBins", 1000., "Number of bins for logarithmic binning for ZDC module chisq over amplitude distribution"}; // to manually calculate inverse-bin-width weight

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_nChannels

const int ZdcMonitorAlgorithm::m_nChannels = 16
staticprivate

Definition at line 106 of file ZdcMonitorAlgorithm.h.

◆ m_nDecodingErrorBits

const int ZdcMonitorAlgorithm::m_nDecodingErrorBits = 3
staticprivate

Definition at line 107 of file ZdcMonitorAlgorithm.h.

◆ m_nModules

const int ZdcMonitorAlgorithm::m_nModules = 4
staticprivate

Definition at line 105 of file ZdcMonitorAlgorithm.h.

◆ m_nRpdCentroidStatusBits

const int ZdcMonitorAlgorithm::m_nRpdCentroidStatusBits = 21
staticprivate

Definition at line 111 of file ZdcMonitorAlgorithm.h.

◆ m_nRpdStatusBits

const int ZdcMonitorAlgorithm::m_nRpdStatusBits = 15
staticprivate

Definition at line 110 of file ZdcMonitorAlgorithm.h.

◆ m_nSecondsRejectStartofLBInjectorPulse

Gaudi::Property<unsigned int> ZdcMonitorAlgorithm::m_nSecondsRejectStartofLBInjectorPulse {this, "NSecondsRejectStartofLBInjectorPulse", 3, "The number of seconds to reject at beginning of each LB in reco-amp-vs-input-voltage histograms in the injector pulse stream"}
private

Definition at line 86 of file ZdcMonitorAlgorithm.h.

86{this, "NSecondsRejectStartofLBInjectorPulse", 3, "The number of seconds to reject at beginning of each LB in reco-amp-vs-input-voltage histograms in the injector pulse stream"};

◆ m_nSides

const int ZdcMonitorAlgorithm::m_nSides = 2
staticprivate

Definition at line 104 of file ZdcMonitorAlgorithm.h.

◆ m_nUCCTrigBits

const int ZdcMonitorAlgorithm::m_nUCCTrigBits = 7
staticprivate

Definition at line 108 of file ZdcMonitorAlgorithm.h.

◆ m_nZdcStatusBits

const int ZdcMonitorAlgorithm::m_nZdcStatusBits = 18
staticprivate

Definition at line 109 of file ZdcMonitorAlgorithm.h.

◆ m_OOpOL1TriggerFromCTPIDMap

Gaudi::Property<std::map<int,std::string> > ZdcMonitorAlgorithm::m_OOpOL1TriggerFromCTPIDMap {this, "OOpOL1TriggerFromCTPIDMap", {}, "Map of CTP ID to trigger name for ZdcCalib PEB stream pO/OO monitoring"}
private

Definition at line 99 of file ZdcMonitorAlgorithm.h.

99{this, "OOpOL1TriggerFromCTPIDMap", {}, "Map of CTP ID to trigger name for ZdcCalib PEB stream pO/OO monitoring"};

◆ m_OOpOtriggerChains

Gaudi::Property<std::vector<std::string> > ZdcMonitorAlgorithm::m_OOpOtriggerChains {this, "OOpOTriggers", {}, "List of trigger chains to monitor"}
private

Definition at line 98 of file ZdcMonitorAlgorithm.h.

98{this, "OOpOTriggers", {}, "List of trigger chains to monitor"};

◆ m_RPDcentroidStatusKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDcentroidStatusKey
private
Initial value:
{
this, "centroidStatusKey", m_zdcSumContainerName + ".centroidStatus" + m_auxSuffix,
"Centroid status word"}
Gaudi::Property< std::string > m_auxSuffix
Gaudi::Property< std::string > m_zdcSumContainerName

Definition at line 222 of file ZdcMonitorAlgorithm.h.

222 {
223 this, "centroidStatusKey", m_zdcSumContainerName + ".centroidStatus" + m_auxSuffix,
224 "Centroid status word"};

◆ m_RPDChannelAmplitudeCalibKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelAmplitudeCalibKey {this, "RPDChannelAmplitudeCalibKey", m_zdcModuleContainerName + ".RPDChannelAmplitudeCalib" + m_auxSuffix}
private

Definition at line 191 of file ZdcMonitorAlgorithm.h.

191{this, "RPDChannelAmplitudeCalibKey", m_zdcModuleContainerName + ".RPDChannelAmplitudeCalib" + m_auxSuffix};

◆ m_RPDChannelAmplitudeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelAmplitudeKey {this, "RPDChannelAmplitudeKey", m_zdcModuleContainerName + ".RPDChannelAmplitude" + m_auxSuffix}
private

Definition at line 190 of file ZdcMonitorAlgorithm.h.

190{this, "RPDChannelAmplitudeKey", m_zdcModuleContainerName + ".RPDChannelAmplitude" + m_auxSuffix};

◆ m_RPDChannelMaxADCKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelMaxADCKey {this, "RPDChannelMaxADCKey", m_zdcModuleContainerName + ".RPDChannelMaxADC" + m_auxSuffix}
private

Definition at line 192 of file ZdcMonitorAlgorithm.h.

192{this, "RPDChannelMaxADCKey", m_zdcModuleContainerName + ".RPDChannelMaxADC" + m_auxSuffix};

◆ m_RPDChannelMaxSampleKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelMaxSampleKey {this, "RPDChannelMaxSampleKey", m_zdcModuleContainerName + ".RPDChannelMaxSample" + m_auxSuffix}
private

Definition at line 193 of file ZdcMonitorAlgorithm.h.

193{this, "RPDChannelMaxSampleKey", m_zdcModuleContainerName + ".RPDChannelMaxSample" + m_auxSuffix};

◆ m_RPDChannelPileupExpFitParamsKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelPileupExpFitParamsKey
private
Initial value:
{
this, "RpdChannelPileupExpFitParamsKey", m_zdcModuleContainerName+".RPDChannelPileupExpFitParams"+m_auxSuffix,
"RPD channel pileup exponential fit parameters: exp( [0] + [1]*sample )"}
Gaudi::Property< std::string > m_zdcModuleContainerName

Definition at line 197 of file ZdcMonitorAlgorithm.h.

197 {
198 this, "RpdChannelPileupExpFitParamsKey", m_zdcModuleContainerName+".RPDChannelPileupExpFitParams"+m_auxSuffix,
199 "RPD channel pileup exponential fit parameters: exp( [0] + [1]*sample )"};

◆ m_RPDChannelPileupFracKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelPileupFracKey
private
Initial value:
{
this, "RPDChannelPileupFracKey", m_zdcModuleContainerName+".RPDChannelPileupFrac"+m_auxSuffix,
"RPD channel pileup as fraction of total (nominal baseline-subtracted) sum ADC"}

Definition at line 200 of file ZdcMonitorAlgorithm.h.

200 {
201 this, "RPDChannelPileupFracKey", m_zdcModuleContainerName+".RPDChannelPileupFrac"+m_auxSuffix,
202 "RPD channel pileup as fraction of total (nominal baseline-subtracted) sum ADC"};

◆ m_RPDChannelStatusKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelStatusKey {this, "RPDChannelStatusKey", m_zdcModuleContainerName + ".RPDChannelStatus" + m_auxSuffix}
private

Definition at line 194 of file ZdcMonitorAlgorithm.h.

194{this, "RPDChannelStatusKey", m_zdcModuleContainerName + ".RPDChannelStatus" + m_auxSuffix};

◆ m_RPDChannelSubtrAmpKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDChannelSubtrAmpKey
private
Initial value:
{
this, "RPDChannelSubtrAmpKey", m_zdcSumContainerName + ".RPDChannelSubtrAmp" + m_auxSuffix,
"RPD channel subtracted amplitudes (tile mass) used in centroid calculation"}

Definition at line 203 of file ZdcMonitorAlgorithm.h.

203 {
204 this, "RPDChannelSubtrAmpKey", m_zdcSumContainerName + ".RPDChannelSubtrAmp" + m_auxSuffix,
205 "RPD channel subtracted amplitudes (tile mass) used in centroid calculation"};

◆ m_RPDChannelToolIndices

std::map<std::string,std::map<std::string,int> > ZdcMonitorAlgorithm::m_RPDChannelToolIndices
private

Definition at line 116 of file ZdcMonitorAlgorithm.h.

◆ m_RPDcosDeltaReactionPlaneAngleKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDcosDeltaReactionPlaneAngleKey
private
Initial value:
{
this, "cosDeltaReactionPlaneAngleKey", m_zdcSumContainerName + ".cosDeltaReactionPlaneAngle" + m_auxSuffix,
"Cosine of the difference between the reaction plane angles of the two sides"}

Definition at line 219 of file ZdcMonitorAlgorithm.h.

219 {
220 this, "cosDeltaReactionPlaneAngleKey", m_zdcSumContainerName + ".cosDeltaReactionPlaneAngle" + m_auxSuffix,
221 "Cosine of the difference between the reaction plane angles of the two sides"};

◆ m_RPDreactionPlaneAngleKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDreactionPlaneAngleKey
private
Initial value:
{
this, "reactionPlaneAngleKey", m_zdcSumContainerName + ".reactionPlaneAngle" + m_auxSuffix,
"Reaction plane angle in [-pi, pi) from the positive x axis (angle of centorid on side C, angle of centroid + pi on side A)"}

Definition at line 216 of file ZdcMonitorAlgorithm.h.

216 {
217 this, "reactionPlaneAngleKey", m_zdcSumContainerName + ".reactionPlaneAngle" + m_auxSuffix,
218 "Reaction plane angle in [-pi, pi) from the positive x axis (angle of centorid on side C, angle of centroid + pi on side A)"};

◆ m_RPDSideStatusKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDSideStatusKey
private
Initial value:
{
this, "RPDSideStatusKey", m_zdcSumContainerName + ".RPDStatus" + m_auxSuffix,
"Centroid status word"}

Definition at line 225 of file ZdcMonitorAlgorithm.h.

225 {
226 this, "RPDSideStatusKey", m_zdcSumContainerName + ".RPDStatus" + m_auxSuffix,
227 "Centroid status word"};

◆ m_RPDSubtrAmpSumKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDSubtrAmpSumKey
private
Initial value:
{
this, "RPDSubtrAmpSumKey", m_zdcSumContainerName + ".RPDSubtrAmpSum" + m_auxSuffix,
"Sum of RPD channel subtracted amplitudes (total mass) used in centroid calculation"}

Definition at line 206 of file ZdcMonitorAlgorithm.h.

206 {
207 this, "RPDSubtrAmpSumKey", m_zdcSumContainerName + ".RPDSubtrAmpSum" + m_auxSuffix,
208 "Sum of RPD channel subtracted amplitudes (total mass) used in centroid calculation"};

◆ m_RPDxCentroidKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDxCentroidKey
private
Initial value:
{
this, "xCentroidKey", m_zdcSumContainerName + ".xCentroid" + m_auxSuffix,
"X centroid after geometry corrections and after average centroid subtraction"}

Definition at line 209 of file ZdcMonitorAlgorithm.h.

209 {
210 this, "xCentroidKey", m_zdcSumContainerName + ".xCentroid" + m_auxSuffix,
211 "X centroid after geometry corrections and after average centroid subtraction"};

◆ m_RPDyCentroidKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_RPDyCentroidKey
private
Initial value:
{
this, "yCentroidKey", m_zdcSumContainerName + ".yCentroid" + m_auxSuffix,
"Y centroid after geometry corrections and after average centroid subtraction"}

Definition at line 212 of file ZdcMonitorAlgorithm.h.

212 {
213 this, "yCentroidKey", m_zdcSumContainerName + ".yCentroid" + m_auxSuffix,
214 "Y centroid after geometry corrections and after average centroid subtraction"};

◆ m_runNumber

Gaudi::Property<unsigned int> ZdcMonitorAlgorithm::m_runNumber {this, "RunNumber", 0, "Run number for current job"}
private

Definition at line 56 of file ZdcMonitorAlgorithm.h.

56{this, "RunNumber", 0, "Run number for current job"};

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

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_triggerSideA {this, "triggerSideA", "L1_ZDC_A", "Trigger on side A, needed for 1N-peak monitoring on side C"}
private

Definition at line 76 of file ZdcMonitorAlgorithm.h.

76{this, "triggerSideA", "L1_ZDC_A", "Trigger on side A, needed for 1N-peak monitoring on side C"};

◆ m_triggerSideC

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_triggerSideC {this, "triggerSideC", "L1_ZDC_C", "Trigger on side C, needed for 1N-peak monitoring on side A"}
private

Definition at line 77 of file ZdcMonitorAlgorithm.h.

77{this, "triggerSideC", "L1_ZDC_C", "Trigger on side C, needed for 1N-peak monitoring on side A"};

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

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_UCCtriggerHELT15 {this, "triggerUCCHELT15", "L1_ZDC_HELT15_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 15 TeV"}
private

Definition at line 80 of file ZdcMonitorAlgorithm.h.

80{this, "triggerUCCHELT15", "L1_ZDC_HELT15_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 15 TeV"};

◆ m_UCCtriggerHELT20

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_UCCtriggerHELT20 {this, "triggerUCCHELT20", "L1_ZDC_HELT20_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 20 TeV"}
private

Definition at line 81 of file ZdcMonitorAlgorithm.h.

81{this, "triggerUCCHELT20", "L1_ZDC_HELT20_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 20 TeV"};

◆ m_UCCtriggerHELT25

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_UCCtriggerHELT25 {this, "triggerUCCHELT25", "L1_ZDC_HELT25_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 25 TeV"}
private

Definition at line 82 of file ZdcMonitorAlgorithm.h.

82{this, "triggerUCCHELT25", "L1_ZDC_HELT25_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 25 TeV"};

◆ m_UCCtriggerHELT35

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_UCCtriggerHELT35 {this, "triggerUCCHELT35", "L1_ZDC_HELT35_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 35 TeV"}
private

Definition at line 83 of file ZdcMonitorAlgorithm.h.

83{this, "triggerUCCHELT35", "L1_ZDC_HELT35_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 35 TeV"};

◆ m_UCCtriggerHELT50

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_UCCtriggerHELT50 {this, "triggerUCCHELT50", "L1_ZDC_HELT50_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 50 TeV"}
private

Definition at line 84 of file ZdcMonitorAlgorithm.h.

84{this, "triggerUCCHELT50", "L1_ZDC_HELT50_jTE4000", "UCC trigger requiring ZDC hadronic energy be less than 50 TeV"};

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

◆ m_ZDCEnergyCutForCentroidValidBitMonitor

Gaudi::Property<float> ZdcMonitorAlgorithm::m_ZDCEnergyCutForCentroidValidBitMonitor {this, "ZDCEnergyCutForCentroidValidBitMonitor", 13400., "Minimum energy required in ZDC for event to enter centroid valid bit monitoring (default at 5 * 2680 GeV)"}
private

Definition at line 66 of file ZdcMonitorAlgorithm.h.

66{this, "ZDCEnergyCutForCentroidValidBitMonitor", 13400., "Minimum energy required in ZDC for event to enter centroid valid bit monitoring (default at 5 * 2680 GeV)"};

◆ m_zdcInjPulserAmpMap

std::shared_ptr<ZdcInjPulserAmpMap> ZdcMonitorAlgorithm::m_zdcInjPulserAmpMap
private

Definition at line 122 of file ZdcMonitorAlgorithm.h.

◆ m_ZdcModuleAmpLGRefitKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleAmpLGRefitKey {this, "ZdcModuleAmpLGRefitKey", m_zdcModuleContainerName + ".AmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"}
private

Definition at line 184 of file ZdcMonitorAlgorithm.h.

184{this, "ZdcModuleAmpLGRefitKey", m_zdcModuleContainerName + ".AmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"};

◆ m_ZdcModuleAmplitudeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleAmplitudeKey {this, "ZdcModuleAmplitudeKey", m_zdcModuleContainerName + ".Amplitude" + m_auxSuffix}
private

Definition at line 170 of file ZdcMonitorAlgorithm.h.

170{this, "ZdcModuleAmplitudeKey", m_zdcModuleContainerName + ".Amplitude" + m_auxSuffix};

◆ m_ZdcModuleAmpNoNonLinKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleAmpNoNonLinKey {this, "ZdcModuleAmpNoNonLinKey", m_zdcModuleContainerName + ".AmpNoNonLin" + m_auxSuffix}
private

Definition at line 172 of file ZdcMonitorAlgorithm.h.

172{this, "ZdcModuleAmpNoNonLinKey", m_zdcModuleContainerName + ".AmpNoNonLin" + m_auxSuffix};

◆ m_ZdcModuleCalibEnergyKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleCalibEnergyKey {this, "ZdcModuleCalibEnergyKey", m_zdcModuleContainerName + ".CalibEnergy" + m_auxSuffix}
private

Definition at line 176 of file ZdcMonitorAlgorithm.h.

176{this, "ZdcModuleCalibEnergyKey", m_zdcModuleContainerName + ".CalibEnergy" + m_auxSuffix};

◆ m_ZdcModuleCalibTimeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleCalibTimeKey {this, "ZdcModuleCalibTimeKey", m_zdcModuleContainerName + ".CalibTime" + m_auxSuffix}
private

Definition at line 177 of file ZdcMonitorAlgorithm.h.

177{this, "ZdcModuleCalibTimeKey", m_zdcModuleContainerName + ".CalibTime" + m_auxSuffix};

◆ m_ZdcModuleChisqBinEdges

std::vector<float> ZdcMonitorAlgorithm::m_ZdcModuleChisqBinEdges
private

Definition at line 119 of file ZdcMonitorAlgorithm.h.

◆ m_ZdcModuleChisqKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleChisqKey {this, "ZdcModuleChisqKey", m_zdcModuleContainerName + ".Chisq" + m_auxSuffix}
private

Definition at line 175 of file ZdcMonitorAlgorithm.h.

175{this, "ZdcModuleChisqKey", m_zdcModuleContainerName + ".Chisq" + m_auxSuffix};

◆ m_ZdcModuleChisqLGRefitKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleChisqLGRefitKey {this, "ZdcModuleChisqLGRefitKey", m_zdcModuleContainerName + ".ChisqLGRefit" + m_auxSuffix, "ZDC module LG refit chi square"}
private

Definition at line 187 of file ZdcMonitorAlgorithm.h.

187{this, "ZdcModuleChisqLGRefitKey", m_zdcModuleContainerName + ".ChisqLGRefit" + m_auxSuffix, "ZDC module LG refit chi square"};

◆ m_ZdcModuleChisqOverAmpBinEdges

std::vector<float> ZdcMonitorAlgorithm::m_ZdcModuleChisqOverAmpBinEdges
private

Definition at line 120 of file ZdcMonitorAlgorithm.h.

◆ m_ZdcModuleContainerKey

SG::ReadHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleContainerKey {this, "ZdcModuleContainerKey", "ZdcModules"}
private

Definition at line 153 of file ZdcMonitorAlgorithm.h.

153{this, "ZdcModuleContainerKey", "ZdcModules"};

◆ m_zdcModuleContainerName

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_zdcModuleContainerName {this, "ZdcModuleContainerName", "ZdcModules", "Location of ZDC processed data"}
private

Definition at line 59 of file ZdcMonitorAlgorithm.h.

59{this, "ZdcModuleContainerName", "ZdcModules", "Location of ZDC processed data"};

◆ m_ZdcModuleFitAmpKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleFitAmpKey {this, "ZdcModuleFitAmpKey", m_zdcModuleContainerName + ".FitAmp" + m_auxSuffix}
private

Definition at line 173 of file ZdcMonitorAlgorithm.h.

173{this, "ZdcModuleFitAmpKey", m_zdcModuleContainerName + ".FitAmp" + m_auxSuffix};

◆ m_ZdcModuleFitAmpLGRefitKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleFitAmpLGRefitKey {this, "ZdcModuleFitAmpLGRefitKey", m_zdcModuleContainerName + ".FitAmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"}
private

Definition at line 183 of file ZdcMonitorAlgorithm.h.

183{this, "ZdcModuleFitAmpLGRefitKey", m_zdcModuleContainerName + ".FitAmpLGRefit" + m_auxSuffix, "ZDC module fit amp LG refit"};

◆ m_ZdcModuleFitT0Key

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleFitT0Key {this, "ZdcModuleFitT0Key", m_zdcModuleContainerName + ".FitT0" + m_auxSuffix}
private

Definition at line 174 of file ZdcMonitorAlgorithm.h.

174{this, "ZdcModuleFitT0Key", m_zdcModuleContainerName + ".FitT0" + m_auxSuffix};

◆ m_ZdcModuleMaxADCHGKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleMaxADCHGKey {this, "ZdcModuleMaxADCHGKey", m_zdcModuleContainerName + ".MaxADCHG" + m_auxSuffix}
private

Definition at line 179 of file ZdcMonitorAlgorithm.h.

179{this, "ZdcModuleMaxADCHGKey", m_zdcModuleContainerName + ".MaxADCHG" + m_auxSuffix};

◆ m_ZdcModuleMaxADCKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleMaxADCKey {this, "ZdcModuleMaxADCKey", m_zdcModuleContainerName + ".MaxADC" + m_auxSuffix}
private

Definition at line 178 of file ZdcMonitorAlgorithm.h.

178{this, "ZdcModuleMaxADCKey", m_zdcModuleContainerName + ".MaxADC" + m_auxSuffix};

◆ m_ZdcModuleMaxADCLGKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleMaxADCLGKey {this, "ZdcModuleMaxADCLGKey", m_zdcModuleContainerName + ".MaxADCLG" + m_auxSuffix}
private

Definition at line 180 of file ZdcMonitorAlgorithm.h.

180{this, "ZdcModuleMaxADCLGKey", m_zdcModuleContainerName + ".MaxADCLG" + m_auxSuffix};

◆ m_ZdcModuleStatusKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleStatusKey {this, "ZdcModuleStatusKey", m_zdcModuleContainerName + ".Status" + m_auxSuffix}
private

Definition at line 169 of file ZdcMonitorAlgorithm.h.

169{this, "ZdcModuleStatusKey", m_zdcModuleContainerName + ".Status" + m_auxSuffix};

◆ m_ZdcModuleT0LGRefitKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleT0LGRefitKey {this, "ZdcModuleT0LGRefitKey", m_zdcModuleContainerName + ".T0LGRefit" + m_auxSuffix, "ZDC module fit t0 LG refit"}
private

Definition at line 185 of file ZdcMonitorAlgorithm.h.

185{this, "ZdcModuleT0LGRefitKey", m_zdcModuleContainerName + ".T0LGRefit" + m_auxSuffix, "ZDC module fit t0 LG refit"};

◆ m_ZdcModuleT0SubLGRefitKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleT0SubLGRefitKey {this, "ZdcModuleT0SubLGRefitKey", m_zdcModuleContainerName + ".T0SubLGRefit" + m_auxSuffix, "ZDC module subtracted t0 LG refit"}
private

Definition at line 186 of file ZdcMonitorAlgorithm.h.

186{this, "ZdcModuleT0SubLGRefitKey", m_zdcModuleContainerName + ".T0SubLGRefit" + m_auxSuffix, "ZDC module subtracted t0 LG refit"};

◆ m_ZdcModuleTimeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcModuleTimeKey {this, "ZdcModuleTimeKey", m_zdcModuleContainerName + ".Time" + m_auxSuffix}
private

Definition at line 171 of file ZdcMonitorAlgorithm.h.

171{this, "ZdcModuleTimeKey", m_zdcModuleContainerName + ".Time" + m_auxSuffix};

◆ m_ZDCModuleToolIndices

std::map<std::string,std::map<std::string,int> > ZdcMonitorAlgorithm::m_ZDCModuleToolIndices
private

Definition at line 115 of file ZdcMonitorAlgorithm.h.

◆ m_ZDCSideToolIndices

std::map<std::string,int> ZdcMonitorAlgorithm::m_ZDCSideToolIndices
private

Definition at line 114 of file ZdcMonitorAlgorithm.h.

◆ m_ZdcSumAverageTimeKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcSumAverageTimeKey {this, "ZdcSumAverageTimeKey", m_zdcSumContainerName + ".AverageTime" + m_auxSuffix}
private

Definition at line 164 of file ZdcMonitorAlgorithm.h.

164{this, "ZdcSumAverageTimeKey", m_zdcSumContainerName + ".AverageTime" + m_auxSuffix};

◆ m_ZdcSumCalibEnergyKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcSumCalibEnergyKey {this, "ZdcSumCalibEnergyKey", m_zdcSumContainerName + ".CalibEnergy" + m_auxSuffix}
private

Definition at line 163 of file ZdcMonitorAlgorithm.h.

163{this, "ZdcSumCalibEnergyKey", m_zdcSumContainerName + ".CalibEnergy" + m_auxSuffix};

◆ m_ZdcSumContainerKey

SG::ReadHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcSumContainerKey {this, "ZdcSumContainerKey", "ZdcSums"}
private

Definition at line 152 of file ZdcMonitorAlgorithm.h.

152{this, "ZdcSumContainerKey", "ZdcSums"};

◆ m_zdcSumContainerName

Gaudi::Property<std::string> ZdcMonitorAlgorithm::m_zdcSumContainerName {this, "ZdcSumContainerName", "ZdcSums", "Location of ZDC processed sums"}
private

Definition at line 60 of file ZdcMonitorAlgorithm.h.

60{this, "ZdcSumContainerName", "ZdcSums", "Location of ZDC processed sums"};

◆ m_ZdcSumModuleMaskKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcSumModuleMaskKey {this, "ZdcSumModuleMaskKey", m_zdcSumContainerName + ".ModuleMask" + m_auxSuffix}
private

Definition at line 166 of file ZdcMonitorAlgorithm.h.

166{this, "ZdcSumModuleMaskKey", m_zdcSumContainerName + ".ModuleMask" + m_auxSuffix};

◆ m_ZdcSumUncalibSumKey

SG::ReadDecorHandleKey<xAOD::ZdcModuleContainer> ZdcMonitorAlgorithm::m_ZdcSumUncalibSumKey {this, "ZdcSumUncalibSumKey", m_zdcSumContainerName + ".UncalibSum" + m_auxSuffix}
private

Definition at line 165 of file ZdcMonitorAlgorithm.h.

165{this, "ZdcSumUncalibSumKey", m_zdcSumContainerName + ".UncalibSum" + m_auxSuffix};

◆ module_FPGA_max_ADC

int ZdcMonitorAlgorithm.module_FPGA_max_ADC = 4096

Definition at line 18 of file ZdcMonitorAlgorithm.py.

◆ None

ZdcMonitorAlgorithm.None

Definition at line 1268 of file ZdcMonitorAlgorithm.py.

◆ parser

ZdcMonitorAlgorithm.parser = flags.getArgumentParser()

Definition at line 1266 of file ZdcMonitorAlgorithm.py.

◆ useTrigger

ZdcMonitorAlgorithm.useTrigger

Definition at line 1273 of file ZdcMonitorAlgorithm.py.

◆ withDetails

ZdcMonitorAlgorithm.withDetails

Definition at line 1297 of file ZdcMonitorAlgorithm.py.

◆ zdcMonitorAcc

ZdcMonitorAlgorithm.zdcMonitorAcc = ZdcMonitoringConfig(flags)

Definition at line 1290 of file ZdcMonitorAlgorithm.py.


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