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

#include <StgcRawDataMonAlg.h>

Inheritance diagram for sTgcRawDataMonAlg:
Collaboration diagram for sTgcRawDataMonAlg:

Public Types

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

Public Member Functions

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

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

using decoder = Muon::nsw::NSWPadTriggerL1a
using mapper = Muon::nsw::MapperSTG
using MuonSectorMapping = Muon::MuonSectorMapping
typedef std::vector< std::reference_wrapper< Monitored::IMonitoredVariable > > MonVarVec_t
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

void fillsTgcOccupancyHistograms (const Muon::sTgcPrepDataContainer *, const MuonGM::MuonDetectorManager *, const int lb) const
void fillsTgcLumiblockHistograms (const Muon::sTgcPrepDataContainer *, const int lb) const
void fillsTgcClusterFromTrackHistograms (const xAOD::TrackParticleContainer *) const
void fillsTgcPadTriggerDataHistograms (const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const int lb) const
void fillsTgcEfficiencyHistograms (const xAOD::MuonContainer *, const MuonGM::MuonDetectorManager *) const
void fillsTgcPadTriggerEfficiencyHistograms (const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
int getFEBs (int eta, int layers) const
int getSectors (const Identifier &id) const
int getLayer (const int multiplet, const int gasGap) const
int32_t sourceidToSector (uint32_t sourceid, bool isSideA) const
int getSignedPhiId (const uint32_t phiid) const
std::optional< IdentifiergetPadId (uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > getRotIdAndRotObject (const Trk::TrackStateOnSurface *trkState) const
std::optional< IdentifiergetRotId (const Trk::TrackStateOnSurface *trkState) const
std::optional< std::tuple< int, int, std::string, std::string, int > > getPadEtaPhiTuple (uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
std::optional< double > band2theta (double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
std::optional< double > band2eta (double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
std::optional< double > rPosAtNsw2eta (double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
std::optional< double > bandId2eta (int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
double triggersectorphiid2phi (uint32_t sourceid, int trigger_phiid) const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
ToolHandle< Trk::IResidualPullCalculatorm_residualPullCalculator {this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"}
SG::ReadHandleKey< Muon::sTgcPrepDataContainerm_sTgcContainerKey {this,"sTgcPrepDataContainerName", "STGC_Measurements"}
SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_detectorManagerKey {this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"}
SG::ReadHandleKey< xAOD::TrackParticleContainerm_meTrkKey {this, "METrkContainer", "ExtrapolatedMuonTrackParticles"}
SG::ReadHandleKey< Muon::NSW_PadTriggerDataContainerm_rdoKey {this, "NSW_PadTriggerDataKey", ""}
SG::ReadHandleKey< xAOD::MuonContainerm_muonKey {this, "MuonsKey", "Muons"}
Gaudi::Property< double > m_cutPt {this, "cutPt", 15000.}
Gaudi::Property< double > m_cutEtaDown {this, "cutEtaDown", 1.3}
Gaudi::Property< double > m_cutEtaUp {this, "cutEtaUp", 2.4}
Gaudi::Property< double > m_minDeltaR {this, "minDeltaR", 0.1}
Gaudi::Property< int > m_cutTriggerPhiId {this, "cutTriggerPhiId", 63}
Gaudi::Property< int > m_cutTriggerBandId {this, "cutTriggerBandId", 255}
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 constexpr uint32_t NVMMCHAN = Muon::nsw::Constants::N_CHAN_PER_VMM
static constexpr uint32_t FIRSTPFEBVMM = 1

Detailed Description

Definition at line 55 of file StgcRawDataMonAlg.h.

Member Typedef Documentation

◆ decoder

◆ mapper

Definition at line 57 of file StgcRawDataMonAlg.h.

◆ MonVarVec_t

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

Definition at line 370 of file AthMonitorAlgorithm.h.

◆ MuonSectorMapping

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

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

Constructor & Destructor Documentation

◆ sTgcRawDataMonAlg()

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

Definition at line 23 of file StgcRawDataMonAlg.cxx.

23 : AthMonitorAlgorithm(name, pSvcLocator) {
24 //Declare the property
25}
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.

◆ ~sTgcRawDataMonAlg()

virtual sTgcRawDataMonAlg::~sTgcRawDataMonAlg ( )
virtualdefault

Member Function Documentation

◆ band2eta()

std::optional< double > sTgcRawDataMonAlg::band2eta ( double rPosAtNSW,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 157 of file StgcRawDataUtils.cxx.

157 {
158 std::optional<double> status = band2theta(rPosAtNSW, muonDetectorManagerObject);
159 if (!status.has_value()) return std::nullopt;
160 double theta = status.value();
161 if (!std::isnormal(theta/2.)) return std::nullopt;
162 double eta = -std::log(std::tan(theta/2.));
163 return std::make_optional(eta);
164}
Scalar eta() const
pseudorapidity method
Scalar theta() const
theta method
std::optional< double > band2theta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
status
Definition merge.py:16

◆ band2theta()

std::optional< double > sTgcRawDataMonAlg::band2theta ( double rPosAtNSW,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 138 of file StgcRawDataUtils.cxx.

138 {
139 const auto& help = m_idHelperSvc -> stgcIdHelper();
140 bool isValid = false;
141
142 const Identifier maxNSWZid = m_idHelperSvc -> stgcIdHelper().channelID("STL", 1, help.stationPhiMin(), help.multilayerMax(), help.gasGapMax(), sTgcIdHelper::sTgcChannelTypes::Pad, 1, isValid);
143
144 if (!isValid) {
145 ATH_MSG_WARNING("Identifier for maximum value of NSW global Z-coordinate is invalid!");
146 return std::nullopt;
147 }
148
149 Amg::Vector3D posNSW{Amg::Vector3D::Zero()};
150 (muonDetectorManagerObject -> getsTgcReadoutElement(maxNSWZid)) -> stripGlobalPosition(maxNSWZid, posNSW);
151 float posNSWZ = posNSW.z();
152
153 double theta = std::atan(rPosAtNSW/posNSWZ);
154 return std::make_optional(theta);
155}
#define ATH_MSG_WARNING(x)
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition AtlasPID.h:878
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Eigen::Matrix< double, 3, 1 > Vector3D

◆ bandId2eta()

std::optional< double > sTgcRawDataMonAlg::bandId2eta ( int bandid,
bool isLarge,
bool isA,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 178 of file StgcRawDataUtils.cxx.

178 {
179 double rPosAtNSW = MuonGM::sTgcReadoutElement::triggerBandIdToRadius(isLarge,bandid);
180 std::optional<double> status = rPosAtNsw2eta(rPosAtNSW, isA, muonDetectorManagerObject);
181 if (!status.has_value()) return std::nullopt;
182 double rPosAtNsw2eta = status.value();
183
184 return std::make_optional(rPosAtNsw2eta);
185}
std::optional< double > rPosAtNsw2eta(double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const

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

◆ 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}
#define ATH_MSG_DEBUG(x)
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 sTgcRawDataMonAlg::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 40 of file StgcRawDataMonAlg.cxx.

40 {
41 const int lumiblock = GetEventInfo(ctx) -> lumiBlock();
42
43 SG::ReadHandle<Muon::sTgcPrepDataContainer> sTgcContainer(m_sTgcContainerKey, ctx);
44 SG::ReadCondHandle<MuonGM::MuonDetectorManager> detectorManagerKey(m_detectorManagerKey, ctx);
45 SG::ReadHandle<xAOD::TrackParticleContainer> meTPContainer(m_meTrkKey, ctx);
46 SG::ReadHandle<xAOD::MuonContainer> muonContainer(m_muonKey, ctx);
47
48 if (!meTPContainer.isValid()) {
49 ATH_MSG_FATAL("Could not get track particle container: " << m_meTrkKey.fullKey());
50 return StatusCode::FAILURE;
51 }
52
53 if (!muonContainer.isValid()) {
54 ATH_MSG_FATAL("Could not get muon container: " << m_muonKey.fullKey());
55 return StatusCode::FAILURE;
56 }
57
58 if(!m_rdoKey.key().empty()){
59 SG::ReadHandle<Muon::NSW_PadTriggerDataContainer> NSWpadTriggerContainer(m_rdoKey, ctx);
60 if (!NSWpadTriggerContainer.isValid()) {
61 ATH_MSG_FATAL("Could not get pad trigger data container: " << m_rdoKey.fullKey());
62 return StatusCode::FAILURE;
63 }
64 fillsTgcPadTriggerDataHistograms(muonContainer.cptr(), NSWpadTriggerContainer.cptr(), lumiblock);
65 fillsTgcPadTriggerEfficiencyHistograms(muonContainer.cptr(), NSWpadTriggerContainer.cptr(), detectorManagerKey.cptr());
66 }
67
68 ATH_MSG_DEBUG("Lumiblock: " << lumiblock);
69
70 fillsTgcClusterFromTrackHistograms(meTPContainer.cptr());
71 fillsTgcEfficiencyHistograms(muonContainer.cptr(), detectorManagerKey.cptr());
72 fillsTgcOccupancyHistograms(sTgcContainer.cptr(), detectorManagerKey.cptr(), lumiblock);
73 fillsTgcLumiblockHistograms(sTgcContainer.cptr(), lumiblock);
74
75 return StatusCode::SUCCESS;
76}
#define ATH_MSG_FATAL(x)
xAOD::MuonContainer * muonContainer
SG::ReadHandle< xAOD::EventInfo > GetEventInfo(const EventContext &) const
Return a ReadHandle for an EventInfo object (get run/event numbers, etc.)
SG::ReadHandleKey< Muon::NSW_PadTriggerDataContainer > m_rdoKey
void fillsTgcLumiblockHistograms(const Muon::sTgcPrepDataContainer *, const int lb) const
void fillsTgcOccupancyHistograms(const Muon::sTgcPrepDataContainer *, const MuonGM::MuonDetectorManager *, const int lb) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_meTrkKey
void fillsTgcPadTriggerEfficiencyHistograms(const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detectorManagerKey
void fillsTgcPadTriggerDataHistograms(const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const int lb) const
void fillsTgcClusterFromTrackHistograms(const xAOD::TrackParticleContainer *) const
void fillsTgcEfficiencyHistograms(const xAOD::MuonContainer *, const MuonGM::MuonDetectorManager *) const
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_sTgcContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
setTeId lumiBlock

◆ fillsTgcClusterFromTrackHistograms()

void sTgcRawDataMonAlg::fillsTgcClusterFromTrackHistograms ( const xAOD::TrackParticleContainer * trkPartCont) const
private

Definition at line 224 of file StgcRawDataMonAlg.cxx.

224 {
225 ATH_MSG_DEBUG("On fillsTgcClusterFromTrackHistograms");
226 for (const xAOD::TrackParticle* meTP : *trkPartCont) {
227 const Trk::Track* meTrack = meTP -> track();
228 if(!meTrack) continue;
229 for (const Trk::TrackStateOnSurface* trkState : *meTrack -> trackStateOnSurfaces()) {
230 std::optional<std::tuple<Identifier, const Trk::RIO_OnTrack*>> status = getRotIdAndRotObject(trkState);
231 if (!status.has_value()) continue;
232 std::tuple<Identifier, const Trk::RIO_OnTrack*> rotIDtuple = status.value();
233
234 Identifier rot_id = std::get<Identifier>(rotIDtuple);
235
236 const Muon::sTgcClusterOnTrack* cluster = dynamic_cast<const Muon::sTgcClusterOnTrack*>(std::get<const Trk::RIO_OnTrack*>(rotIDtuple));
237 if(!cluster) continue;
238
239 const Muon::sTgcPrepData* prd = cluster -> prepRawData();
240 if (!prd) continue;
241
242 int channelType = m_idHelperSvc -> stgcIdHelper().channelType(rot_id);
243 int stEta = m_idHelperSvc -> stgcIdHelper().stationEta(rot_id);
244 int multi = m_idHelperSvc -> stgcIdHelper().multilayer(rot_id);
245 int gap = m_idHelperSvc -> stgcIdHelper().gasGap(rot_id);
246 int sector = m_idHelperSvc -> sector(rot_id);
247 int sectorsTotal = getSectors(rot_id);
248 int layer = getLayer(multi, gap);
249 int iside = (stEta > 0) ? 1 : 0;
250 std::string side = GeometricSectors::sTgcSide[iside];
251 std::string channelName = "";
252 std::string sectorStr = std::to_string(sector);
253
254 if (channelType == sTgcIdHelper::sTgcChannelTypes::Pad) {
255 float padCharge = prd -> charge();
256 auto padChargeMon = Monitored::Scalar<float>("padTrackCharge_" + side + "_quad_" + std::to_string(std::abs(stEta)) + "_sector_" + std::to_string(sector) + "_layer_" + std::to_string(layer), padCharge);
257 fill("padCharge_" + side + std::to_string(sector) + "_quad_" + std::to_string(std::abs(stEta)), padChargeMon);
258
259 short int padTiming = prd -> time();
260 auto padSectorSidedMon = Monitored::Scalar<int>("padTrackSectorSided_layer_" + std::to_string(layer), sectorsTotal);
261 auto padTimingMon = Monitored::Scalar<float>("padTrackTiming_layer_" + std::to_string(layer), padTiming);
262 fill("sTgcTiming", padSectorSidedMon, padTimingMon);
263
264 auto padSectorSidedExpertMon = Monitored::Scalar<int>("padTrackSectorSided_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), sectorsTotal);
265 auto padTimingExpertMon = Monitored::Scalar<float>("padTrackTiming_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), padTiming);
266 fill("padTiming_quad_" + std::to_string(std::abs(stEta)), padSectorSidedExpertMon, padTimingExpertMon);
267
268 ATH_MSG_DEBUG("Pad Timing: " << padTiming);
269
270 auto febMon = Monitored::Scalar<int>("padFEB"+ side + sectorStr, getFEBs(stEta,layer));
271 auto timeMon = Monitored::Scalar<int>("padTiming"+ side + sectorStr, padTiming);
272 fill("sTgcTiming", timeMon, febMon);
273 }
274
275 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Strip) {
276 channelName = "strip";
277 const std::vector<Identifier>& stripIds = prd->rdoList();
278 unsigned int csize = stripIds.size();
279
280 std::vector<short int> stripTimesVec = prd -> stripTimes();
281 std::vector<int> stripChargesVec = prd -> stripCharges();
282
283 float stripClusterTimes = 0;
284 float stripClusterCharges = 0;
285
286 for (unsigned int sIdx = 0; sIdx < csize; ++sIdx) {
287 stripClusterTimes += stripTimesVec.at(sIdx);
288 stripClusterCharges += stripChargesVec.at(sIdx);
289 }
290
291 stripClusterTimes /= stripTimesVec.size();
292
293 auto stripClusterChargesPerSideQuadMon = Monitored::Scalar<float>("stripTrackCharge_" + side + "_quad_" + std::to_string(std::abs(stEta)) + "_sector_" + std::to_string(sector) + "_layer_" + std::to_string(layer), stripClusterCharges);
294 fill("stripCharge_" + side + std::to_string(sector) + "_quad_" + std::to_string(std::abs(stEta)), stripClusterChargesPerSideQuadMon);
295
296 auto stripClusterSectorSidedMon = Monitored::Scalar<int>("stripTrackSectorSided_layer_" + std::to_string(layer), sectorsTotal);
297 auto stripClusterTimesMon = Monitored::Scalar<float>("stripTrackTiming_layer_" + std::to_string(layer), stripClusterTimes);
298 auto stripClusterSizeMon = Monitored::Scalar<unsigned int>("stripTrackClusterSize_layer_" + std::to_string(layer), csize);
299 fill("sTgcTiming", stripClusterSectorSidedMon, stripClusterTimesMon);
300 fill("padTriggerExpert", stripClusterSectorSidedMon, stripClusterSizeMon);
301
302 ATH_MSG_DEBUG("Strip Timing: " << stripClusterTimes);
303
304 auto febMon = Monitored::Scalar<int>("stripFEB"+ side + sectorStr, getFEBs(stEta,layer));
305 auto timeMon = Monitored::Scalar<int>("stripTiming"+ side + sectorStr, stripClusterTimes);
306 fill("sTgcTiming", timeMon, febMon);
307
308
309 auto stripSectorSidedExpertMon = Monitored::Scalar<int>("stripTrackSectorSided_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), sectorsTotal);
310 auto stripTimingExpertMon = Monitored::Scalar<float>("stripTrackTiming_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), stripClusterTimes);
311 fill("stripTiming_quad_" + std::to_string(std::abs(stEta)), stripSectorSidedExpertMon, stripTimingExpertMon);
312
313
314 std::optional<Trk::ResidualPull> resPull(m_residualPullCalculator -> residualPull(trkState -> measurementOnTrack(), trkState -> trackParameters(), Trk::ResidualPull::ResidualType::Biased));
315
316 if (resPull) {
317 float residual = resPull -> residual()[Trk::locX];
318 auto residualMon = Monitored::Scalar<float>("residual_" + side + "_quad_" + std::to_string(std::abs(stEta)) + "_sector_" + std::to_string(sector) + "_layer_" + std::to_string(layer), residual);
319 fill("sTgcResiduals_" + side + std::to_string(sector) + "_quad_" + std::to_string(std::abs(stEta)), residualMon);
320 }
321 }
322
323 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Wire) {
324 float wireGroupCharge = prd -> charge();
325 auto wireGroupChargeMon = Monitored::Scalar<float>("wireGroupTrackCharge_" + side + "_quad_" + std::to_string(std::abs(stEta)) + "_sector_" + std::to_string(sector) + "_layer_" + std::to_string(layer), wireGroupCharge);
326 fill("wireGroupCharge_" + side + std::to_string(sector) + "_quad_" + std::to_string(std::abs(stEta)), wireGroupChargeMon);
327
328 short int wireGroupTiming = prd -> time();
329 auto wireGroupSectorSidedMon = Monitored::Scalar<int>("wireGroupTrackSectorSided_layer_" + std::to_string(layer), sectorsTotal);
330 auto wireGroupTimingMon = Monitored::Scalar<float>("wireGroupTrackTiming_layer_" + std::to_string(layer), wireGroupTiming);
331 fill("sTgcTiming", wireGroupSectorSidedMon, wireGroupTimingMon);
332
333 auto wireSectorSidedExpertMon = Monitored::Scalar<int>("wireTrackSectorSided_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), sectorsTotal);
334 auto wireTimingExpertMon = Monitored::Scalar<float>("wireTrackTiming_quad_" + std::to_string(std::abs(stEta)) + "_layer_" + std::to_string(layer), wireGroupTiming);
335 fill("wireTiming_quad_" + std::to_string(std::abs(stEta)), wireSectorSidedExpertMon, wireTimingExpertMon);
336
337 ATH_MSG_DEBUG("Wire Timing: " << wireGroupTiming);
338
339 auto febMon = Monitored::Scalar<int>("wireFEB"+ side + sectorStr, getFEBs(stEta,layer));
340 auto timeMon = Monitored::Scalar<int>("wireTiming"+ side + sectorStr, wireGroupTiming);
341 fill("sTgcTiming", timeMon, febMon);
342 }
343 }
344 }
345 ATH_MSG_DEBUG("Off fillsTgcClusterFromTrackHistograms");
346}
double charge(const T &p)
Definition AtlasPID.h:997
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
@ Biased
RP with track state including the hit.
std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > getRotIdAndRotObject(const Trk::TrackStateOnSurface *trkState) const
int getLayer(const int multiplet, const int gasGap) const
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
int getSectors(const Identifier &id) const
int getFEBs(int eta, int layers) const
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.
gap(flags, cells_name, *args, **kw)
time(flags, cells_name, *args, **kw)
static const std::array< std::string, 2 > sTgcSide
@ layer
Definition HitInfo.h:79
@ locX
Definition ParamDefs.h:37
TrackParticle_v1 TrackParticle
Reference the current persistent version:

◆ fillsTgcEfficiencyHistograms()

void sTgcRawDataMonAlg::fillsTgcEfficiencyHistograms ( const xAOD::MuonContainer * muonContainer,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 459 of file StgcRawDataMonAlg.cxx.

459 {
460 ATH_MSG_DEBUG("On fillsTgcEfficiencyHistograms");
461 for (const xAOD::Muon* mu : *muonContainer) {
462 if (mu -> pt() < m_cutPt) continue;
463 if (!(mu -> author() == xAOD::Muon::Author::MuidCo || mu -> author() == xAOD::Muon::Author::MuidSA)) continue;
464
465 struct sTGCeff {
466 std::array<int, 8> quadMultiplet{};
467 std::array<int, 8> layerMultiplet{};
468 std::array<float, 8> xPosMultiplet{};
469 std::array<float, 8> yPosMultiplet{};
470 std::array<float, 8> zPosMultiplet{};
471 };
472
473 std::array<std::array<sTGCeff, 16>, 2> effPlots; // Store active layers per side (2) and sectors (16)
474
475 const xAOD::TrackParticle* meTP = mu -> trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
476 if(meTP == nullptr) continue;
477
478 const Trk::Track* meTrack = meTP -> track();
479 if(!meTrack) continue;
480
481 for(const Trk::TrackStateOnSurface* trkState : *meTrack->trackStateOnSurfaces()) {
482 std::optional<Identifier> status = getRotId(trkState);
483 if (!status.has_value()) continue;
484
485 Identifier rot_id = status.value();
486
487 int channelType = m_idHelperSvc -> stgcIdHelper().channelType(rot_id);
488 if (channelType != sTgcIdHelper::sTgcChannelTypes::Strip) continue;
489
490 int stEta = m_idHelperSvc -> stgcIdHelper().stationEta(rot_id);
491 int iside = (stEta > 0) ? 1 : 0;
492 int sector = m_idHelperSvc -> sector(rot_id);
493 int multi = m_idHelperSvc -> stgcIdHelper().multilayer(rot_id);
494 int gap = m_idHelperSvc -> stgcIdHelper().gasGap(rot_id);
495 int layer = getLayer(multi, gap);
496
497 const Amg::Vector2D& positionsMultiplet = (trkState) -> trackParameters() -> localPosition();
498 float xPosStripInMultipletLocal = positionsMultiplet.x();
499 float yPosStripInMultipletLocal = positionsMultiplet.y();
500
501 Amg::Vector2D localPos(xPosStripInMultipletLocal, yPosStripInMultipletLocal);
502 Amg::Vector3D globalPos(Amg::Vector3D::Zero());
503 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectStrip = muonDetectorManagerObject -> getsTgcReadoutElement(rot_id);
504 sTgcReadoutObjectStrip -> surface(rot_id).localToGlobal(localPos, Amg::Vector3D::Zero(), globalPos);
505 float xPosStripInMultiplet = globalPos.x();
506 float yPosStripInMultiplet = globalPos.y();
507
508 Amg::Vector3D posStripGlobal{Amg::Vector3D::Zero()};
509 (muonDetectorManagerObject -> getsTgcReadoutElement(rot_id)) -> stripGlobalPosition(rot_id, posStripGlobal);
510 float zPosStripInMultiplet = posStripGlobal.z();
511
512 auto& sTGCelements = effPlots[iside][sector - 1];
513
514 sTGCelements.quadMultiplet.at(layer - 1) = stEta;
515 sTGCelements.layerMultiplet.at(layer - 1) = layer;
516 sTGCelements.xPosMultiplet.at(layer - 1) = xPosStripInMultiplet;
517 sTGCelements.yPosMultiplet.at(layer - 1) = yPosStripInMultiplet;
518 sTGCelements.zPosMultiplet.at(layer - 1) = zPosStripInMultiplet;
519 } // end track state loop
520
521 for (unsigned int isideIndex = 0; isideIndex <= 1; ++isideIndex) {
522 for (unsigned int sectorIndex = 1; sectorIndex <= 16; ++sectorIndex) {
523 auto& sTGCelements = effPlots[isideIndex][sectorIndex - 1];
524 bool fourOutEight = std::count_if(sTGCelements.layerMultiplet.begin(), sTGCelements.layerMultiplet.end(), [](int i) { return i != 0; }) >= 4;
525 bool oneRefLayer = std::count_if(sTGCelements.layerMultiplet.begin(), sTGCelements.layerMultiplet.end(), [](int i) { return i != 0; }) >= 1;
526
527 if (fourOutEight) {
528 for (auto layerIndex = static_cast<std::array<int, 8>::size_type>(1); layerIndex <= sTGCelements.layerMultiplet.size(); ++layerIndex) {
529 if (sTGCelements.layerMultiplet.at(layerIndex - 1) == 0) continue;
530
531 float xPos = sTGCelements.xPosMultiplet.at(layerIndex - 1);
532 float yPos = sTGCelements.yPosMultiplet.at(layerIndex - 1);
533 float rPos = std::hypot(xPos, yPos);
534
535 std::string side = GeometricSectors::sTgcSide[isideIndex];
536
537 auto effQuestionMon = Monitored::Scalar<bool>("hitLayer", true);
538 auto rPosStripMon = Monitored::Scalar<float>("rPosStrip_" + side + "_sector_" + std::to_string(sectorIndex) + "_layer_" + std::to_string(layerIndex), rPos);
539 fill("rPosStrip_" + side + std::to_string(sectorIndex), rPosStripMon, effQuestionMon);
540 //GlobalRGroup
541
542 auto xPosStripmon = Monitored::Scalar<float>("xPosStrip_" + side + "_layer_" + std::to_string(layerIndex), xPos);
543 auto yPosStripmon = Monitored::Scalar<float>("yPosStrip_" + side + "_layer_" + std::to_string(layerIndex), yPos);
544 fill("padTriggerShifter", xPosStripmon, yPosStripmon, effQuestionMon);
545 //StripEfficiency
546 } // End of loop over efficient layers
547 } // End of efficient case
548
549 else if (!fourOutEight && oneRefLayer) {
550 auto refLayerIndex = std::distance(sTGCelements.layerMultiplet.begin(), std::find_if(sTGCelements.layerMultiplet.begin(), sTGCelements.layerMultiplet.end(), [](int i) {return i != 0;}));
551
552 for (auto layerIndex = static_cast<std::array<int, 8>::size_type>(1); layerIndex <= sTGCelements.layerMultiplet.size(); ++layerIndex) {
553 if (sTGCelements.layerMultiplet.at(layerIndex - 1) != 0) continue;
554 int quad = sTGCelements.quadMultiplet.at(refLayerIndex);
555 int multi = (layerIndex <= static_cast<std::array<int, 8>::size_type>(m_idHelperSvc->stgcIdHelper().gasGapMax())) ? m_idHelperSvc->stgcIdHelper().multilayerMin() : m_idHelperSvc->stgcIdHelper().multilayerMax();
556 int gap = (layerIndex <= static_cast<std::array<int, 8>::size_type>(m_idHelperSvc->stgcIdHelper().gasGapMax())) ? layerIndex : layerIndex - static_cast<std::array<int, 8>::size_type>(m_idHelperSvc->stgcIdHelper().gasGapMax());
557
558 bool isValid = false;
559 const Identifier idProbe = m_idHelperSvc -> stgcIdHelper().channelID((sectorIndex % 2 == 0) ? "STS" : "STL", quad, (sectorIndex % 2 == 0) ? sectorIndex/2 : (sectorIndex + 1)/2, multi, gap, sTgcIdHelper::sTgcChannelTypes::Strip, 1, isValid);
560
561 if (!isValid) {
562 ATH_MSG_WARNING("Identifier of probe layer is invalid");
563 continue;
564 }
565
566 Amg::Vector3D posProbe{Amg::Vector3D::Zero()};
567 (muonDetectorManagerObject -> getsTgcReadoutElement(idProbe)) -> stripGlobalPosition(idProbe, posProbe);
568 float posZprobe = posProbe.z();
569
570 float xSlope = sTGCelements.xPosMultiplet.at(refLayerIndex)/sTGCelements.zPosMultiplet.at(refLayerIndex);
571 float ySlope = sTGCelements.yPosMultiplet.at(refLayerIndex)/sTGCelements.zPosMultiplet.at(refLayerIndex);
572
573 float xPos = sTGCelements.xPosMultiplet.at(refLayerIndex) + xSlope*(posZprobe - sTGCelements.zPosMultiplet.at(refLayerIndex));
574 float yPos = sTGCelements.yPosMultiplet.at(refLayerIndex) + ySlope*(posZprobe - sTGCelements.zPosMultiplet.at(refLayerIndex));
575 float rPos = std::hypot(xPos, yPos);
576
577 std::string side = GeometricSectors::sTgcSide[isideIndex];
578
579 auto effQuestionMon = Monitored::Scalar<bool>("hitLayer", false);
580
581 auto rPosStripProbemon = Monitored::Scalar<float>("rPosStrip_" + side + "_sector_" + std::to_string(sectorIndex) + "_layer_" + std::to_string(layerIndex), rPos);
582 fill("rPosStrip_" + side + std::to_string(sectorIndex), rPosStripProbemon, effQuestionMon);
583
584 auto xPosStripProbemon = Monitored::Scalar<float>("xPosStrip_" + side + "_layer_" + std::to_string(layerIndex), xPos);
585 auto yPosStripProbemon = Monitored::Scalar<float>("yPosStrip_" + side + "_layer_" + std::to_string(layerIndex), yPos);
586 fill("padTriggerShifter", xPosStripProbemon, yPosStripProbemon, effQuestionMon);
587 } // End of loop over probe layers
588 } // End of non-efficient case
589 } // End of sector loop
590 } // End of iside loop
591 } // End muon container loop
592 ATH_MSG_DEBUG("Off fillsTgcClusterFromTrackHistograms");
593} // end stgc strip function
const Trk::TrackStates * trackStateOnSurfaces() const
return a pointer to a const DataVector of const TrackStateOnSurfaces.
Gaudi::Property< double > m_cutPt
std::optional< Identifier > getRotId(const Trk::TrackStateOnSurface *trkState) const
Eigen::Matrix< double, 2, 1 > Vector2D
Muon_v1 Muon
Reference the current persistent version:

◆ fillsTgcLumiblockHistograms()

void sTgcRawDataMonAlg::fillsTgcLumiblockHistograms ( const Muon::sTgcPrepDataContainer * sTgcContainer,
const int lb ) const
private

Definition at line 184 of file StgcRawDataMonAlg.cxx.

184 {
185 ATH_MSG_DEBUG("On fillsTgcLumiblockHistograms");
186 for(const Muon::sTgcPrepDataCollection* coll : *sTgcContainer) {
187 for (const Muon::sTgcPrepData* prd : *coll) {
188 Identifier id = prd -> identify();
189
190
191 std::string stationName = m_idHelperSvc -> stgcIdHelper().stationNameString(m_idHelperSvc -> stgcIdHelper().stationName(id));
192 int stationEta = m_idHelperSvc -> stgcIdHelper().stationEta(id);
193 int multiplet = m_idHelperSvc -> stgcIdHelper().multilayer(id);
194 int gasGap = m_idHelperSvc -> stgcIdHelper().gasGap(id);
195 int channelType = m_idHelperSvc -> stgcIdHelper().channelType(id);
196 int sector = m_idHelperSvc -> sector(id);
197 std::string sectorStr = std::to_string(sector);
198 int sectorsTotal = getSectors(id);
199 int numberOfHits = coll->size();
200 int layer = getLayer(multiplet, gasGap);
201 std::string layerStr = std::to_string(layer);
202 int iside = (stationEta > 0) ? 1 : 0;
203 std::string side = GeometricSectors::sTgcSide[iside];
204 int feb = getFEBs(stationEta,layer);
205 std::string channelName = "";
206
207 if (channelType == sTgcIdHelper::sTgcChannelTypes::Pad) channelName = "pad";
208 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Strip) channelName = "strip";
209 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Wire) channelName = "wire";
210
211 auto febMon = Monitored::Scalar<int>(channelName+"FEBsector"+side+sectorStr, feb);
212 auto lbMon = Monitored::Scalar<int>(channelName+"LBsector"+side+sectorStr, lb);
213 auto sectorMon = Monitored::Scalar<int>(channelName+"Sector", sectorsTotal);
214 auto lbbMon = Monitored::Scalar<int>(channelName+"Lb", lb);
215 auto numberOfHitsMon = Monitored::Scalar<int>(channelName+"NumberOfHits", numberOfHits);
216
217 fill("LBExpertGroup", lbMon, febMon);
218 }
219 }
220 ATH_MSG_DEBUG("Off fillsTgcLumiblockHistograms");
221}
int lb
Definition globals.cxx:23
MuonPrepDataCollection< sTgcPrepData > sTgcPrepDataCollection
const Identifier & identify(const UncalibratedMeasurement *meas)
Returns the associated identifier from the muon measurement.

◆ fillsTgcOccupancyHistograms()

void sTgcRawDataMonAlg::fillsTgcOccupancyHistograms ( const Muon::sTgcPrepDataContainer * sTgcContainer,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject,
const int lb ) const
private

Definition at line 78 of file StgcRawDataMonAlg.cxx.

78 {
79 ATH_MSG_DEBUG("ON fillsTgcOccupancyHistograms");
80 for(const Muon::sTgcPrepDataCollection* coll : *sTgcContainer) {
81 for (const Muon::sTgcPrepData* prd : *coll) {
82 Identifier id = prd -> identify();
83
84 if(!id.is_valid()) {
85 ATH_MSG_WARNING("Invalid identifier found in Muon::sTgcPrepData");
86 return;
87 }
88
89 std::string stationName = m_idHelperSvc -> stgcIdHelper().stationNameString(m_idHelperSvc -> stgcIdHelper().stationName(id));
90 int stationEta = m_idHelperSvc -> stgcIdHelper().stationEta(id);
91 int stationPhi = m_idHelperSvc -> stgcIdHelper().stationPhi(id);
92 int multiplet = m_idHelperSvc -> stgcIdHelper().multilayer(id);
93 int gasGap = m_idHelperSvc -> stgcIdHelper().gasGap(id);
94 int channelType = m_idHelperSvc -> stgcIdHelper().channelType(id);
95 int sector = m_idHelperSvc -> sector(id);
96 std::string sectorStr = std::to_string(sector);
97 int sectorsTotal = getSectors(id);
98 int layer = getLayer(multiplet, gasGap);
99 int stationEtaAbs = std::abs(stationEta);
100 std::string layerStr = std::to_string(layer);
101 int iside = (stationEta > 0) ? 1 : 0;
102 std::string side = GeometricSectors::sTgcSide[iside];
103 std::string channelName = "";
104
105 if (channelType == sTgcIdHelper::sTgcChannelTypes::Pad) {
106 channelName = "pad";
107 int padNumber = m_idHelperSvc -> stgcIdHelper().channel(id);
108 Identifier idPadQ1 = m_idHelperSvc -> stgcIdHelper().channelID(stationName, 1, stationPhi, multiplet, gasGap, channelType, 1);
109 Identifier idPadQ2 = m_idHelperSvc -> stgcIdHelper().channelID(stationName, 2, stationPhi, multiplet, gasGap, channelType, 1);
110 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectPadQ1 = muonDetectorManagerObject -> getsTgcReadoutElement(idPadQ1);
111 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectPadQ2 = muonDetectorManagerObject -> getsTgcReadoutElement(idPadQ2);
112 int maxPadNumberQ1 = sTgcReadoutObjectPadQ1 -> maxPadNumber(idPadQ1);
113 int maxPadNumberQ2 = sTgcReadoutObjectPadQ2 -> maxPadNumber(idPadQ2);
114
115 if (stationEtaAbs == 2) padNumber = padNumber + maxPadNumberQ1;
116 else if (stationEtaAbs == 3) padNumber = padNumber + maxPadNumberQ1 + maxPadNumberQ2;
117
118 auto sectorMon = Monitored::Scalar<int>("sector_layer_" + layerStr, sectorsTotal);
119 auto padNumberMon = Monitored::Scalar<int>("padNumber_layer_" + layerStr, padNumber);
120 auto padLbMon = Monitored::Scalar<int>(channelName + "Lb", lb);
121 auto padsectMon = Monitored::Scalar<int>(channelName + "Sector", sectorsTotal);
122
123 fill("Occupancy", sectorMon, padNumberMon);
124
125 auto layerMon = Monitored::Scalar<int>(channelName+"layer_" + side + sectorStr, layer);
126 auto quadMon = Monitored::Scalar<int>(channelName+"quad_" + side + sectorStr, stationEtaAbs);
127 fill("Occupancy", layerMon, quadMon);
128 }
129
130 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Strip) {
131 channelName = "strip";
132 int stripNumber = m_idHelperSvc -> stgcIdHelper().channel(id);
133 Identifier idStripQ1 = m_idHelperSvc -> stgcIdHelper().channelID(stationName, 1, stationPhi, multiplet, gasGap, channelType, 1);
134 Identifier idStripQ2 = m_idHelperSvc -> stgcIdHelper().channelID(stationName, 2, stationPhi, multiplet, gasGap, channelType, 1);
135 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectStripQ1 = muonDetectorManagerObject -> getsTgcReadoutElement(idStripQ1);
136 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectStripQ2 = muonDetectorManagerObject -> getsTgcReadoutElement(idStripQ2);
137 int maxStripNumberQ1 = sTgcReadoutObjectStripQ1 -> numberOfStrips(idStripQ1);
138 int maxStripNumberQ2 = sTgcReadoutObjectStripQ2 -> numberOfStrips(idStripQ2);
139
140 if (stationEtaAbs == 2) stripNumber = stripNumber + maxStripNumberQ1 + 1;
141 else if (stationEtaAbs == 3) stripNumber = stripNumber + maxStripNumberQ1 + maxStripNumberQ2 + 1;
142
143 auto sectorMon = Monitored::Scalar<int>("sector_layer_" + layerStr, sectorsTotal);
144 auto stripNumberMon = Monitored::Scalar<int>("stripNumber_layer_" + layerStr, stripNumber);
145 auto stripLbMon = Monitored::Scalar<int>(channelName + "Lb", lb);
146 auto stripsectMon = Monitored::Scalar<int>(channelName + "Sector", sectorsTotal);
147
148 fill("Occupancy", sectorMon, stripNumberMon);
149
150 auto layerMon = Monitored::Scalar<int>(channelName+"layer_" + side + sectorStr, layer);
151 auto quadMon = Monitored::Scalar<int>(channelName+"quad_" + side + sectorStr, stationEtaAbs);
152 fill("Occupancy", layerMon, quadMon);
153 }
154
155 else if (channelType == sTgcIdHelper::sTgcChannelTypes::Wire) {
156 channelName = "wire";
157 int wireGroupNumber = m_idHelperSvc -> stgcIdHelper().channel(id);
158 Identifier idWireGroupQ3 = m_idHelperSvc -> stgcIdHelper().channelID("STL", 3, stationPhi, 1, 3, channelType, 1);
159 const MuonGM::sTgcReadoutElement* sTgcReadoutObjectWireGroupQ3 = muonDetectorManagerObject -> getsTgcReadoutElement(idWireGroupQ3);
160 int maxWireGroupNumberQ3 = sTgcReadoutObjectWireGroupQ3 -> numberOfStrips(idWireGroupQ3);
161
162 auto stationEtaMon = Monitored::Scalar<int>("stationEta_layer_" + layerStr, stationEta);
163 auto wireGroupNumberMon = Monitored::Scalar<int>("wireGroupNumber_layer_" + layerStr, wireGroupNumber + (sector - 1)*maxWireGroupNumberQ3);
164 auto wireLbMon = Monitored::Scalar<int>(channelName + "Lb", lb);
165 auto wiresectMon = Monitored::Scalar<int>(channelName + "Sector", sectorsTotal);
166 fill("Occupancy", stationEtaMon, wireGroupNumberMon);
167
168 auto layerMon = Monitored::Scalar<int>(channelName+"layer_" + side + sectorStr, layer);
169 auto quadMon = Monitored::Scalar<int>(channelName+"quad_" + side + sectorStr, stationEtaAbs);
170 fill("Occupancy", layerMon, quadMon);
171 }
172 auto sectorMon = Monitored::Scalar<int>(channelName+"Sector", sectorsTotal);
173 auto febMon = Monitored::Scalar<int>(channelName+"Feb", getFEBs(stationEta,layer));
174 auto lbMon = Monitored::Scalar<int>(channelName+"Lb", lb);
175
176 fill("Occupancy", sectorMon, febMon);
177 fill("LBShifterGroup", lbMon, sectorMon);
178 }
179 }
180 ATH_MSG_DEBUG("Off fillsTgcOccupancyHistograms");
181}
constexpr uint8_t stationPhi
station Phi 1 to 8

◆ fillsTgcPadTriggerDataHistograms()

void sTgcRawDataMonAlg::fillsTgcPadTriggerDataHistograms ( const xAOD::MuonContainer * muonContainer,
const Muon::NSW_PadTriggerDataContainer * NSWpadTriggerObject,
const int lb ) const
private

Definition at line 348 of file StgcRawDataMonAlg.cxx.

348 {
349 ATH_MSG_DEBUG("On fillsTgcPadTriggerDataHistograms");
350 for (const Muon::NSW_PadTriggerData* rdo : *NSWpadTriggerObject) {
351 bool sideA = rdo -> sideA();
352 bool largeSector = rdo -> largeSector();
353
354 int iside = (sideA) ? 1 : 0;
355 int isize = (largeSector) ? 1 : 0;
356
357 std::string side = GeometricSectors::sTgcSide[iside];
358 std::string size = GeometricSectors::sTgcSize[isize];
359
360 size_t numberOfTriggers = rdo -> getNumberOfTriggers();
361 size_t numberOfHits = rdo -> getNumberOfHits();
362
363 for (size_t trigger = 0; trigger < numberOfTriggers; ++trigger) {
364 int triggerPhiIdsUnsigned = rdo -> getTriggerPhiIds().at(trigger);
365 int triggerBandIds = rdo -> getTriggerBandIds().at(trigger);
366 int triggerRelBCID = rdo -> getTriggerRelBcids().at(trigger);
367 int sourceId = rdo -> getSourceid();
368 int sectorNumber = sourceidToSector(sourceId, sideA);
369
370 if (triggerPhiIdsUnsigned == m_cutTriggerPhiId || triggerBandIds == m_cutTriggerBandId) continue;
371
372 int triggerPhiIds = getSignedPhiId(triggerPhiIdsUnsigned);
373
374 auto phiIdsPerSideSizeMon = Monitored::Scalar<int>("phiIds_" + side + "_" + size, triggerPhiIds);
375 auto bandIdsPerSideSizeMon = Monitored::Scalar<int>("bandIds_" + side + "_" + size, triggerBandIds);
376 fill("padTriggerExpert", phiIdsPerSideSizeMon, bandIdsPerSideSizeMon);
377
378 auto lbMon = Monitored::Scalar<int>("lb", lb);
379 auto relBCIDMon = Monitored::Scalar<int>("relBCID", triggerRelBCID);
380 auto sectorMon = Monitored::Scalar<int>("sector", sectorNumber);
381 auto numberOfTriggersMon = Monitored::Scalar<int>("numberOfTriggers", numberOfTriggers);
382 fill("Overview", lbMon, sectorMon, numberOfTriggersMon);
383 fill("padTriggerExpert", lbMon, relBCIDMon);
384
385 auto numberOfTriggersPerSectorMon = Monitored::Scalar<int>("numberOfTriggers_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), numberOfTriggers);
386 auto phiIdsSidedSizedPerSectorMon = Monitored::Scalar<int>("phiIds_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerPhiIds);
387 auto bandIdsSidedSizedPerSectorMon = Monitored::Scalar<int>("bandIds_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerBandIds);
388 auto lbPerSectorMon = Monitored::Scalar<int>("lb_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), lb);
389 auto relBCIDperSectorMon = Monitored::Scalar<int>("relBCID_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerRelBCID);
390 fill("padTriggerExpert", numberOfTriggersPerSectorMon, phiIdsSidedSizedPerSectorMon, bandIdsSidedSizedPerSectorMon, lbPerSectorMon, relBCIDperSectorMon);
391
392 auto RelBCIDPerSectorMon = Monitored::Scalar<int>("relBCID_"+ side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerRelBCID);
393 auto PhiIDPerSectorMon = Monitored::Scalar<int>("phiIds_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerPhiIds);
394 auto BandIDPerSectorMon = Monitored::Scalar<int>("bandID_" + side + "_sector_" + std::to_string(std::abs(sectorNumber)), triggerBandIds);
395 fill("padTriggerExpert", RelBCIDPerSectorMon, PhiIDPerSectorMon, BandIDPerSectorMon);
396 }
397
398 for (size_t hits = 0; hits < numberOfHits; ++hits){
399 std::optional<Identifier> status = getPadId(rdo->getSourceid(), rdo->getHitPfebs().at(hits), rdo->getHitTdsChannels().at(hits));
400 if (!status.has_value()) continue;
401 Identifier pad_id = status.value();
402
403 for (const xAOD::Muon* mu : *muonContainer) {
404 if(mu -> pt() < m_cutPt) continue;
405 if(!(mu -> author() == xAOD::Muon::Author::MuidCo || mu -> author() == xAOD::Muon::Author::MuidSA)) continue;
406
407 const xAOD::TrackParticle* meTP = mu -> trackParticle(xAOD::Muon::TrackParticleType::ExtrapolatedMuonSpectrometerTrackParticle);
408 if(meTP == nullptr) continue;
409
410 const Trk::Track* meTrack = meTP -> track();
411 if(!meTrack) continue;
412
413 for(const Trk::TrackStateOnSurface* trkState : *meTrack->trackStateOnSurfaces()) {
414 std::optional<Identifier> status = getRotId(trkState);
415 if (!status.has_value()) continue;
416 Identifier rot_id = status.value();
417
418 int channelType = m_idHelperSvc -> stgcIdHelper().channelType(rot_id);
419 if (channelType != sTgcIdHelper::sTgcChannelTypes::Pad) continue;
420
421
422 if (rot_id != pad_id) continue;
423
424 int sourceIds = rdo -> getSourceid();
425 int sectorNumbers = sourceidToSector(sourceIds, sideA);
426 int hitRelBCID = rdo -> getHitRelBcids().at(hits);
427 int hitpfebs = rdo -> getHitPfebs().at(hits);
428 int hitTdsChannels = rdo->getHitTdsChannels().at(hits);
429
430 std::optional<std::tuple<int, int, std::string, std::string, int>> statusPadEtaPhi = getPadEtaPhiTuple(sourceIds, hitpfebs, hitTdsChannels);
431 if (!statusPadEtaPhi.has_value()) continue;
432 std::tuple<int, int, std::string, std::string, int> padEtaPhiTuple = statusPadEtaPhi.value();
433
434 int padPhi = std::get<0>(padEtaPhiTuple);
435 int padEta = std::get<1>(padEtaPhiTuple);
436 std::string sideName = std::get<2>(padEtaPhiTuple);
437 std::string sizeName = std::get<3>(padEtaPhiTuple);
438 int layer = std::get<4>(padEtaPhiTuple);
439
440 auto padPhiMon = Monitored::Scalar<int>("padPhi_" + sideName + "_" + sizeName + "_layer_" + std::to_string(layer), padPhi);
441 auto padEtaMon = Monitored::Scalar<int>("padEta_" + sideName + "_" + sizeName + "_layer_" + std::to_string(layer), padEta);
442 fill("padTriggerOccupancy", padPhiMon, padEtaMon);
443
444 auto hitRelBCIDmon = Monitored::Scalar<int>("hitRelBCID", hitRelBCID);
445 auto hitPfebsMon = Monitored::Scalar<int>("hitPfebs", hitpfebs);
446 auto sectorMon = Monitored::Scalar<int>("sector", sectorNumbers);
447 fill("padTriggerExpert", hitRelBCIDmon, hitPfebsMon, sectorMon);
448
449 auto hitRelBCIDPerSectorMon = Monitored::Scalar<int>("hitRelBCID_"+side+"_sector_"+std::to_string(std::abs(sectorNumbers)), hitRelBCID);
450 auto hitpfebsPerSectorMon = Monitored::Scalar<int>("hitPfebs_"+side+"_sector_"+std::to_string(std::abs(sectorNumbers)), hitpfebs);
451 fill("padTriggerExpert", hitRelBCIDPerSectorMon, hitpfebsPerSectorMon);
452 } // end TrackStateOnSurface loop
453 } // end Muon loop
454 } // end NSW_PadTriggerData loop
455 }// end Number of Hits loop
456 ATH_MSG_DEBUG("Off fillsTgcPadTriggerDataHistograms");
457}
int getSignedPhiId(const uint32_t phiid) const
int32_t sourceidToSector(uint32_t sourceid, bool isSideA) const
Gaudi::Property< int > m_cutTriggerBandId
Gaudi::Property< int > m_cutTriggerPhiId
std::optional< std::tuple< int, int, std::string, std::string, int > > getPadEtaPhiTuple(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
std::optional< Identifier > getPadId(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
static const std::array< std::string, 2 > sTgcSize
unsigned int constexpr sideA
Definition RPDUtils.h:16

◆ fillsTgcPadTriggerEfficiencyHistograms()

void sTgcRawDataMonAlg::fillsTgcPadTriggerEfficiencyHistograms ( const xAOD::MuonContainer * muonContainer,
const Muon::NSW_PadTriggerDataContainer * NSWpadTriggerObject,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 595 of file StgcRawDataMonAlg.cxx.

595 {
596 ATH_MSG_DEBUG("On fillsTgcPadTriggerEfficiencyHistograms");
597 for (const xAOD::Muon* mu : *muonContainer) {
598 if (!(mu -> author() == xAOD::Muon::Author::MuidCo || mu -> author() == xAOD::Muon::Author::MuidSA)) continue;
599 if (mu -> pt() < m_cutPt) continue;
600 if (std::abs(mu -> eta()) < m_cutEtaDown || std::abs(mu -> eta()) > m_cutEtaUp) continue;
601
602 double recoMuonEta = mu -> eta();
603 double recoMuonPhi = mu -> phi();
604
605 std::string sideRecoMuon = GeometricSectors::sTgcSide[recoMuonEta > 0];
606
607 std::string minSideRecoMuon = "", minSideTrigger = "";
608
609 double minTriggerEta = 999., minTriggerPhi = 999.,
610 minRecoEta = 999., minRecoPhi = 999., minDeltaR = 999.;
611
612 auto minDeltaRtrigIt = -1;
613
614 for (const Muon::NSW_PadTriggerData* rdo : *NSWpadTriggerObject) {
615 bool sideA = rdo -> sideA();
616 bool largeSector = rdo -> largeSector();
617 std::string sideTrigger = GeometricSectors::sTgcSide[sideA];
618 size_t numberOfTriggers = rdo -> getNumberOfTriggers();
619
620 for (size_t trigger = 0; trigger < numberOfTriggers; ++trigger) {
621 int triggerPhiIdsUnsigned = rdo -> getTriggerPhiIds().at(trigger);
622 int triggerBandIds = rdo -> getTriggerBandIds().at(trigger);
623 int sourceId = rdo -> getSourceid();
624
625 if (triggerPhiIdsUnsigned == m_cutTriggerPhiId || triggerBandIds == m_cutTriggerBandId) continue;
626
627 int triggerPhiIds = getSignedPhiId(triggerPhiIdsUnsigned);
628 std::optional<double> status = bandId2eta(triggerBandIds, largeSector, sideA, muonDetectorManagerObject);
629 if (!status.has_value()) continue;
630 double triggerBandIdToEta = status.value();
631 double triggerPhiIDtoPhi = triggersectorphiid2phi(sourceId, triggerPhiIds);
632 double deltaR = xAOD::P4Helpers::deltaR(recoMuonEta, recoMuonPhi, triggerBandIdToEta, triggerPhiIDtoPhi);
633
634 if (std::abs(triggerBandIdToEta) < m_cutEtaDown || std::abs(triggerBandIdToEta) > m_cutEtaUp) continue;
635
636 if (sideRecoMuon == sideTrigger) {
637 if (deltaR < minDeltaR) {
638 minSideRecoMuon = sideRecoMuon;
639 minSideTrigger = sideTrigger;
640 minTriggerEta = triggerBandIdToEta;
641 minTriggerPhi = triggerPhiIDtoPhi;
642 minRecoEta = recoMuonEta;
643 minRecoPhi = recoMuonPhi;
644 minDeltaR = deltaR;
645 minDeltaRtrigIt = trigger;
646 }
647 }
648 } // end number of triggers loop
649 } // end pad trigger data container loop
650
651 bool muonRecoTriggerMatch = false;
652
653 if (minDeltaRtrigIt != -1) {
654 if (minDeltaR < m_minDeltaR) {
655 muonRecoTriggerMatch = true;
656 }
657 }
658
659 auto deltaRmon = Monitored::Scalar<double>("deltaR", minDeltaR);
660 fill("Overview", deltaRmon);
661
662 auto etaRecoMuonMon = Monitored::Scalar<double>("etaRecoMuon", minRecoEta);
663 auto phiRecoMuonMon = Monitored::Scalar<double>("phiRecoMuon", minRecoPhi);
664 fill("Overview", etaRecoMuonMon, phiRecoMuonMon);
665
666 auto etaPadTriggerMon = Monitored::Scalar<double>("etaPadTrigger", minTriggerEta);
667 auto phiPadTriggerMon = Monitored::Scalar<double>("phiPadTrigger", minTriggerPhi);
668 fill("Overview", etaPadTriggerMon, phiPadTriggerMon);
669
670 auto phiRecoMuonSidedMon = Monitored::Scalar<double>("phiRecoMuon_" + minSideRecoMuon, minRecoPhi);
671 auto phiPadTriggerSidedMon = Monitored::Scalar<double>("phiPadTrigger_" + minSideTrigger, minTriggerPhi);
672 fill("Overview", phiRecoMuonSidedMon, phiPadTriggerSidedMon);
673
674 auto muonRecoTriggerMatchMon = Monitored::Scalar<bool>("muonRecoTriggerMatch", muonRecoTriggerMatch);
675 auto etaRecoMuonEffMon = Monitored::Scalar<double>("etaRecoMuonEff", minRecoEta);
676 auto phiRecoMuonEffMon = Monitored::Scalar<double>("phiRecoMuonEff", minRecoPhi);
677 fill("Overview", muonRecoTriggerMatchMon, etaRecoMuonEffMon, phiRecoMuonEffMon);
678
679 } // end muon container loop
680 ATH_MSG_DEBUG("Off fillsTgcPadTriggerEfficiencyHistograms");
681}
Scalar deltaR(const MatrixBase< Derived > &vec) const
Scalar phi() const
phi method
Gaudi::Property< double > m_cutEtaDown
double triggersectorphiid2phi(uint32_t sourceid, int trigger_phiid) const
std::optional< double > bandId2eta(int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Gaudi::Property< double > m_minDeltaR
Gaudi::Property< double > m_cutEtaUp
double deltaR(double rapidity1, double phi1, double rapidity2, double phi2)
from bare bare rapidity,phi

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

◆ getFEBs()

int sTgcRawDataMonAlg::getFEBs ( int eta,
int layers ) const
private

Definition at line 13 of file StgcRawDataUtils.cxx.

13 {
14 int feb=-1;
15 if (std::abs(eta)==1) feb=layer-1;
16 else if(std::abs(eta)==2) feb=layer+7;
17 else if(std::abs(eta)==3) feb=layer+15;
18
19 //ATH_MSG_DEBUG("FEB: " << feb << " Eta: " << eta << " Layer: " << layer);
20 return feb;
21}

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

◆ getLayer()

int sTgcRawDataMonAlg::getLayer ( const int multiplet,
const int gasGap ) const
private

Definition at line 27 of file StgcRawDataUtils.cxx.

27 {
28 return 4*(multiplet - 1) + gasGap;
29}

◆ getPadEtaPhiTuple()

std::optional< std::tuple< int, int, std::string, std::string, int > > sTgcRawDataMonAlg::getPadEtaPhiTuple ( uint32_t sourceid,
uint32_t pfeb,
uint32_t tdschan ) const
private

Definition at line 96 of file StgcRawDataUtils.cxx.

96 {
97 bool isValid = false;
98 const int side = (decoder::isA(sourceid)) ? 1 : -1;
99 const auto vmm = tdschan / NVMMCHAN + FIRSTPFEBVMM;
100 const auto vmmchan = tdschan % NVMMCHAN;
101 const auto sec = decoder::sector(sourceid);
102
103 mapper mapperSTG;
104
105 int sector_type = decoder::isLarge(sec) ? 1 : 0;
106 int feb_radius = decoder::radius(pfeb);
107 int layer = decoder::layer(pfeb);
108 int channel_number = mapperSTG.channel_number(Muon::nsw::OFFLINE_CHANNEL_TYPE_PAD, sector_type, feb_radius, layer, vmm, vmmchan);
109
110 const auto& help = m_idHelperSvc -> stgcIdHelper();
111 const auto pad_id = help.channelID(help.elementID(decoder::offlineStationName(sec),
117 channel_number, isValid);
118
119
120 if (!isValid) {
121 ATH_MSG_WARNING("Pad Identifier not valid, skipping");
122 return std::nullopt;
123 }
124
125 int padPhi = help.padPhi(pad_id);
126 int padEta = help.padEta(pad_id);
127 int padPhiMax = help.padPhiMax();
128 int padEtaMax = help.padEtaMax();
129
130 int padPhiTotal = padPhi + (padPhiMax + 1)*(decoder::offlineStationPhi(sourceid) - 1);
131 int padEtaTotal = padEta + (padEtaMax + 1)*(decoder::offlineStationAbsEta(pfeb) - 1);
132 std::string sideName = (side == 1) ? "A" : "C";
133 std::string sizeName = (decoder::offlineStationName(sec) == "STS") ? "S" : "L";
134
135 return std::make_optional(std::make_tuple(padPhiTotal, padEtaTotal, sideName, sizeName, layer + 1));
136}
static uint32_t offlineStationAbsEta(const uint32_t pfeb)
static uint32_t offlineGasgap(const uint32_t pfeb)
static uint32_t radius(const uint32_t pfeb)
static bool isLarge(const uint32_t sec)
static uint32_t layer(const uint32_t pfeb)
static uint32_t offlineStationPhi(const uint32_t sourceid)
static std::string offlineStationName(const uint32_t sec)
static uint32_t sector(const uint32_t sourceid)
static bool isA(const uint32_t sourceid)
static uint32_t offlineMultilayer(const uint32_t pfeb)
Muon::nsw::MapperSTG mapper
static constexpr uint32_t NVMMCHAN
static constexpr uint32_t FIRSTPFEBVMM
@ OFFLINE_CHANNEL_TYPE_PAD

◆ getPadId()

std::optional< Identifier > sTgcRawDataMonAlg::getPadId ( uint32_t sourceid,
uint32_t pfeb,
uint32_t tdschan ) const
private

Definition at line 43 of file StgcRawDataUtils.cxx.

43 {
44 bool isValid = false;
45 const int side = (decoder::isA(sourceid)) ? 1 : -1;
46 const auto vmm = tdschan / NVMMCHAN + FIRSTPFEBVMM;
47 const auto vmmchan = tdschan % NVMMCHAN;
48 const auto sec = decoder::sector(sourceid);
49 const auto& help = m_idHelperSvc -> stgcIdHelper();
50 const auto pad_id = help.channelID(help.elementID(decoder::offlineStationName(sec),
56 decoder::offlineChannelNumber(sec, pfeb, vmm, vmmchan), isValid);
57
58 if (!isValid) {
59 ATH_MSG_WARNING("Pad Identifier not valid, skipping");
60 return std::nullopt;
61 }
62
63 return std::make_optional(pad_id);
64}
static uint32_t offlineChannelNumber(const uint32_t sec, const uint32_t pfeb, const uint32_t vmm, const uint32_t vmmchan)

◆ getRotId()

std::optional< Identifier > sTgcRawDataMonAlg::getRotId ( const Trk::TrackStateOnSurface * trkState) const
private

Definition at line 88 of file StgcRawDataUtils.cxx.

88 {
89 std::optional<std::tuple<Identifier, const Trk::RIO_OnTrack*>> status = getRotIdAndRotObject(trkState);
90 if (!status.has_value()) return std::nullopt;
91 std::tuple<Identifier, const Trk::RIO_OnTrack*> rotIDtuple = status.value();
92
93 return std::make_optional(std::get<Identifier>(rotIDtuple));
94}

◆ getRotIdAndRotObject()

std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > sTgcRawDataMonAlg::getRotIdAndRotObject ( const Trk::TrackStateOnSurface * trkState) const
private

Definition at line 66 of file StgcRawDataUtils.cxx.

66 {
67 if (!trkState->type(Trk::TrackStateOnSurface::Measurement)) return std::nullopt;
68
69 Identifier surfaceId = (trkState) -> surface().associatedDetectorElementIdentifier();
70 if(!m_idHelperSvc -> issTgc(surfaceId)) return std::nullopt;
71
72 const Trk::MeasurementBase* meas = trkState->measurementOnTrack();
73 if(!meas) return std::nullopt;
74
75 const Trk::RIO_OnTrack* rot = dynamic_cast<const Trk::RIO_OnTrack*>(meas);
76 if(!rot) return std::nullopt;
77
78 Identifier rot_id = rot -> identify();
79
80 if(!rot_id.is_valid()) {
81 ATH_MSG_WARNING("Invalid identifier found in Trk::RIO_OnTrack");
82 return std::nullopt;
83 }
84
85 return std::make_tuple(rot_id, rot);
86}
bool is_valid() const
Check if id is in a valid state.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.

◆ getSectors()

int sTgcRawDataMonAlg::getSectors ( const Identifier & id) const
private

Definition at line 23 of file StgcRawDataUtils.cxx.

23 {
24 return m_idHelperSvc -> sector(id)*(m_idHelperSvc -> stationEta(id) > 0 ? 1. : -1.);
25}

◆ getSignedPhiId()

int sTgcRawDataMonAlg::getSignedPhiId ( const uint32_t phiid) const
private

Definition at line 36 of file StgcRawDataUtils.cxx.

36 {
37 // 1 bit of sign (0 = positive) followed by 5 bits of phiid
38 constexpr size_t nbitsPhi{5};
39 constexpr size_t mask{(1 << nbitsPhi) - 1};
40 return std::pow(-1, phiid >> nbitsPhi) * (phiid & mask);
41}

◆ 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 sTgcRawDataMonAlg::initialize ( )
overridevirtual

initialize

Returns
StatusCode

Reimplemented from AthMonitorAlgorithm.

Definition at line 27 of file StgcRawDataMonAlg.cxx.

27 {
29 ATH_CHECK(m_idHelperSvc.retrieve());
30 ATH_CHECK(m_sTgcContainerKey.initialize());
31 ATH_CHECK(m_detectorManagerKey.initialize());
32 ATH_CHECK(m_meTrkKey.initialize());
34 ATH_CHECK(m_muonKey.initialize());
36
37 return StatusCode::SUCCESS;
38}
#define ATH_CHECK
Evaluate an expression and check for errors.
virtual StatusCode initialize() override
initialize

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

◆ rPosAtNsw2eta()

std::optional< double > sTgcRawDataMonAlg::rPosAtNsw2eta ( double rPosAtNSW,
bool isA,
const MuonGM::MuonDetectorManager * muonDetectorManagerObject ) const
private

Definition at line 166 of file StgcRawDataUtils.cxx.

166 {
167 std::optional<double> status = band2eta(rPosAtNSW, muonDetectorManagerObject);
168 if (!status.has_value()) return std::nullopt;
169 double band2eta = status.value();
170 if (isA) {
171 return std::make_optional(band2eta);
172 }
173 else {
174 return std::make_optional(-band2eta);
175 }
176}
std::optional< double > band2eta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const

◆ 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

◆ sourceidToSector()

int32_t sTgcRawDataMonAlg::sourceidToSector ( uint32_t sourceid,
bool isSideA ) const
private

Definition at line 31 of file StgcRawDataUtils.cxx.

31 {
32 uint32_t sectorNumber = sourceid & 0xf;
33 return (isSideA) ? sectorNumber + 1: -sectorNumber - 1;
34}
setEventNumber uint32_t

◆ 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}
#define ATH_MSG_ERROR(x)
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

◆ triggersectorphiid2phi()

double sTgcRawDataMonAlg::triggersectorphiid2phi ( uint32_t sourceid,
int trigger_phiid ) const
private

Sector 8 (A09/C09) is a special case, is where the phi changes sign (-pi to +pi)

Definition at line 187 of file StgcRawDataUtils.cxx.

187 {
188 MuonSectorMapping sectorMapping;
189 double trigger_sector_phicenter = sectorMapping.sectorPhi((sourceid & 0xf) + 1);
190 double trigger_phi = trigger_sector_phicenter + (trigger_phiid*9.)/1000.;
192 if((sourceid & 0xf) == 8 && trigger_phiid < 0) {
193 trigger_phi = -trigger_sector_phicenter + (trigger_phiid*9./1000.);
194 }
195 return trigger_phi;
196}
Muon::MuonSectorMapping MuonSectorMapping

◆ 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

◆ FIRSTPFEBVMM

uint32_t sTgcRawDataMonAlg::FIRSTPFEBVMM = 1
staticconstexprprivate

Definition at line 60 of file StgcRawDataMonAlg.h.

◆ m_cutEtaDown

Gaudi::Property<double> sTgcRawDataMonAlg::m_cutEtaDown {this, "cutEtaDown", 1.3}
private

Definition at line 100 of file StgcRawDataMonAlg.h.

100{this, "cutEtaDown", 1.3};

◆ m_cutEtaUp

Gaudi::Property<double> sTgcRawDataMonAlg::m_cutEtaUp {this, "cutEtaUp", 2.4}
private

Definition at line 101 of file StgcRawDataMonAlg.h.

101{this, "cutEtaUp", 2.4};

◆ m_cutPt

Gaudi::Property<double> sTgcRawDataMonAlg::m_cutPt {this, "cutPt", 15000.}
private

Definition at line 99 of file StgcRawDataMonAlg.h.

99{this, "cutPt", 15000.};

◆ m_cutTriggerBandId

Gaudi::Property<int> sTgcRawDataMonAlg::m_cutTriggerBandId {this, "cutTriggerBandId", 255}
private

Definition at line 104 of file StgcRawDataMonAlg.h.

104{this, "cutTriggerBandId", 255};

◆ m_cutTriggerPhiId

Gaudi::Property<int> sTgcRawDataMonAlg::m_cutTriggerPhiId {this, "cutTriggerPhiId", 63}
private

Definition at line 103 of file StgcRawDataMonAlg.h.

103{this, "cutTriggerPhiId", 63};

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

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> sTgcRawDataMonAlg::m_detectorManagerKey {this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"}
private

Definition at line 94 of file StgcRawDataMonAlg.h.

94{this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DQFilterTools

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

Array of Data Quality filter tools.

Definition at line 346 of file AthMonitorAlgorithm.h.

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

◆ m_dummy

const ToolHandle<GenericMonitoringTool> AthMonitorAlgorithm::m_dummy
privateinherited

Definition at line 374 of file AthMonitorAlgorithm.h.

◆ m_enforceExpressTriggers

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

Definition at line 377 of file AthMonitorAlgorithm.h.

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

◆ m_environment

AthMonitorAlgorithm::Environment_t AthMonitorAlgorithm::m_environment
protectedinherited

Instance of the Environment_t enum.

Definition at line 355 of file AthMonitorAlgorithm.h.

◆ m_environmentStr

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

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

Definition at line 357 of file AthMonitorAlgorithm.h.

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

◆ m_EventInfoKey

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

Key for retrieving EventInfo from StoreGate.

Definition at line 367 of file AthMonitorAlgorithm.h.

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

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fileKey

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

Internal Athena name for file.

Definition at line 363 of file AthMonitorAlgorithm.h.

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

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> sTgcRawDataMonAlg::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 68 of file StgcRawDataMonAlg.h.

68{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

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

SG::ReadHandleKey<xAOD::TrackParticleContainer> sTgcRawDataMonAlg::m_meTrkKey {this, "METrkContainer", "ExtrapolatedMuonTrackParticles"}
private

Definition at line 95 of file StgcRawDataMonAlg.h.

95{this, "METrkContainer", "ExtrapolatedMuonTrackParticles"};

◆ m_minDeltaR

Gaudi::Property<double> sTgcRawDataMonAlg::m_minDeltaR {this, "minDeltaR", 0.1}
private

Definition at line 102 of file StgcRawDataMonAlg.h.

102{this, "minDeltaR", 0.1};

◆ m_muonKey

SG::ReadHandleKey<xAOD::MuonContainer> sTgcRawDataMonAlg::m_muonKey {this, "MuonsKey", "Muons"}
private

Definition at line 97 of file StgcRawDataMonAlg.h.

97{this, "MuonsKey", "Muons"};

◆ m_name

std::string AthMonitorAlgorithm::m_name
privateinherited

Definition at line 371 of file AthMonitorAlgorithm.h.

◆ m_rdoKey

SG::ReadHandleKey<Muon::NSW_PadTriggerDataContainer> sTgcRawDataMonAlg::m_rdoKey {this, "NSW_PadTriggerDataKey", ""}
private

Definition at line 96 of file StgcRawDataMonAlg.h.

96{this, "NSW_PadTriggerDataKey", ""};

◆ m_residualPullCalculator

ToolHandle<Trk::IResidualPullCalculator> sTgcRawDataMonAlg::m_residualPullCalculator {this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"}
private

Definition at line 69 of file StgcRawDataMonAlg.h.

69{this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"};

◆ m_sTgcContainerKey

SG::ReadHandleKey<Muon::sTgcPrepDataContainer> sTgcRawDataMonAlg::m_sTgcContainerKey {this,"sTgcPrepDataContainerName", "STGC_Measurements"}
private

Definition at line 93 of file StgcRawDataMonAlg.h.

93{this,"sTgcPrepDataContainerName", "STGC_Measurements"};

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

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

Definition at line 352 of file AthMonitorAlgorithm.h.

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

◆ m_useLumi

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

Allows use of various luminosity functions.

Definition at line 364 of file AthMonitorAlgorithm.h.

364{this,"EnableLumi",false};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_vTrigChainNames

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

Vector of trigger chain names parsed from trigger chain string.

Definition at line 361 of file AthMonitorAlgorithm.h.

◆ NVMMCHAN

uint32_t sTgcRawDataMonAlg::NVMMCHAN = Muon::nsw::Constants::N_CHAN_PER_VMM
staticconstexprprivate

Definition at line 59 of file StgcRawDataMonAlg.h.


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