ATLAS Offline Software
StgcRawDataMonAlg.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // Package : sTgcRawDataMonAlg
7 // Author: Sebastian Fuenzalida Garrido
8 // Local supervisor: Edson Carquin Lopez
9 // Technical supervisor: Gerardo Vasquez
10 //
11 // DESCRIPTION:
12 // Subject: sTgc --> sTgc raw data monitoring
14 
15 #ifndef sTgcRawDataMonAlg_H
16 #define sTgcRawDataMonAlg_H
17 
18 // Core Include
20 
21 // Helper Includes
29 
32 
34 
37 
40 
41 // stl includes
42 #include <string>
43 
44 namespace Muon {
45  class sTgcPrepData;
46 }
47 
48 namespace GeometricSectors {
49  static const std::array<std::string, 2> sTgcSide = {"C", "A"};
50  static const std::array<std::string, 2> sTgcSize = {"S", "L"};
51 }
52 
58  static constexpr uint32_t FIRSTPFEBVMM = 1;
59  public:
60  sTgcRawDataMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
61 
62  virtual ~sTgcRawDataMonAlg()=default;
63  virtual StatusCode initialize() override;
64  virtual StatusCode fillHistograms(const EventContext& ctx) const override;
65  private:
66  ServiceHandle<Muon::IMuonIdHelperSvc> m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};
67  ToolHandle<Trk::IResidualPullCalculator> m_residualPullCalculator {this, "ResPullCalc", "Trk::ResidualPullCalculator/ResidualPullCalculator"};
68 
70  void fillsTgcLumiblockHistograms(const Muon::sTgcPrepDataContainer*, const int lb) const;
75 
76  int getSectors(const Identifier& id) const;
77  int getLayer(const int multiplet, const int gasGap) const;
78  int32_t sourceidToSector(uint32_t sourceid, bool isSideA) const;
79  int getSignedPhiId(const uint32_t phiid) const;
80  std::optional<Identifier> getPadId(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const;
81  std::optional<std::tuple<Identifier, const Trk::RIO_OnTrack*>> getRotIdAndRotObject(const Trk::TrackStateOnSurface* trkState) const;
82  std::optional<Identifier> getRotId(const Trk::TrackStateOnSurface* trkState) const;
83  std::optional<std::tuple<int, int, std::string, std::string, int>> getPadEtaPhiTuple(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const;
84  std::optional<double> band2theta(double rPosAtNSW, const MuonGM::MuonDetectorManager* muonDetectorManagerObject) const;
85  std::optional<double> band2eta(double rPosAtNSW, const MuonGM::MuonDetectorManager* muonDetectorManagerObject) const;
86  std::optional<double> rPosAtNsw2eta(double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager* muonDetectorManagerObject) const;
87  std::optional<double> bandId2eta(int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager* muonDetectorManagerObject) const;
88  double triggersectorphiid2phi(uint32_t sourceid, int trigger_phiid) const;
89 
90  SG::ReadHandleKey<Muon::sTgcPrepDataContainer> m_sTgcContainerKey{this,"sTgcPrepDataContainerName", "STGC_Measurements"};
91  SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> m_detectorManagerKey{this, "DetectorManagerKey", "MuonDetectorManager","Key of input MuonDetectorManager condition data"};
92  SG::ReadHandleKey<xAOD::TrackParticleContainer> m_meTrkKey{this, "METrkContainer", "ExtrapolatedMuonTrackParticles"};
95 
96  Gaudi::Property<double> m_cutPt{this, "cutPt", 15000.};
97  Gaudi::Property<double> m_cutEtaDown{this, "cutEtaDown", 1.3};
98  Gaudi::Property<double> m_cutEtaUp{this, "cutEtaUp", 2.4};
99  Gaudi::Property<double> m_minDeltaR{this, "minDeltaR", 0.1};
100  Gaudi::Property<int> m_cutTriggerPhiId{this, "cutTriggerPhiId", 63};
101  Gaudi::Property<int> m_cutTriggerBandId{this, "cutTriggerBandId", 255};
102 };
103 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Muon::MuonPrepDataContainer
Template for Muon PRD containers (which are basically collections of MuonPrepDataCollections).
Definition: MuonPrepDataContainer.h:42
sTgcRawDataMonAlg::rPosAtNsw2eta
std::optional< double > rPosAtNsw2eta(double rPosAtNSW, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Definition: StgcRawDataUtils.cxx:156
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
sTgcRawDataMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: StgcRawDataMonAlg.cxx:40
sTgcClusterOnTrack.h
sTgcRawDataMonAlg::m_sTgcContainerKey
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_sTgcContainerKey
Definition: StgcRawDataMonAlg.h:90
TrackParameters.h
sTgcIdHelper.h
sTgcRawDataMonAlg::fillsTgcEfficiencyHistograms
void fillsTgcEfficiencyHistograms(const xAOD::MuonContainer *, const MuonGM::MuonDetectorManager *) const
Definition: StgcRawDataMonAlg.cxx:436
sTgcRawDataMonAlg::m_cutTriggerPhiId
Gaudi::Property< int > m_cutTriggerPhiId
Definition: StgcRawDataMonAlg.h:100
sTgcRawDataMonAlg::fillsTgcPadTriggerEfficiencyHistograms
void fillsTgcPadTriggerEfficiencyHistograms(const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Definition: StgcRawDataMonAlg.cxx:569
NSW_PadTriggerDataContainer.h
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
xAODP4Helpers.h
sTgcRawDataMonAlg::m_meTrkKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_meTrkKey
Definition: StgcRawDataMonAlg.h:92
Muon::NSW_PadTriggerDataContainer
Definition: NSW_PadTriggerDataContainer.h:15
sTgcRawDataMonAlg::fillsTgcPadTriggerDataHistograms
void fillsTgcPadTriggerDataHistograms(const xAOD::MuonContainer *, const Muon::NSW_PadTriggerDataContainer *, const int lb) const
Definition: StgcRawDataMonAlg.cxx:329
sTgcRawDataMonAlg::FIRSTPFEBVMM
static constexpr uint32_t FIRSTPFEBVMM
Definition: StgcRawDataMonAlg.h:58
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
sTgcPrepDataContainer.h
sTgcRawDataMonAlg::~sTgcRawDataMonAlg
virtual ~sTgcRawDataMonAlg()=default
sTgcRawDataMonAlg::getSectors
int getSectors(const Identifier &id) const
Definition: StgcRawDataUtils.cxx:13
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
sTgcRawDataMonAlg::m_idHelperSvc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Definition: StgcRawDataMonAlg.h:66
GeometricSectors
Definition: StgcRawDataMonAlg.h:48
sTgcRawDataMonAlg::m_residualPullCalculator
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
Definition: StgcRawDataMonAlg.h:67
sTgcRawDataMonAlg::getLayer
int getLayer(const int multiplet, const int gasGap) const
Definition: StgcRawDataUtils.cxx:17
sTgcPrepData.h
sTgcRawDataMonAlg::m_muonKey
SG::ReadHandleKey< xAOD::MuonContainer > m_muonKey
Definition: StgcRawDataMonAlg.h:94
NSWPadTriggerL1a.h
MapperSTG.h
sTgcRawDataMonAlg::sourceidToSector
int32_t sourceidToSector(uint32_t sourceid, bool isSideA) const
Definition: StgcRawDataUtils.cxx:21
python.BunchSpacingUtils.lb
lb
Definition: BunchSpacingUtils.py:88
Muon::nsw::Constants::N_CHAN_PER_VMM
constexpr uint32_t N_CHAN_PER_VMM
Definition: NSWPadTriggerL1a.h:43
sTgcRawDataMonAlg::m_minDeltaR
Gaudi::Property< double > m_minDeltaR
Definition: StgcRawDataMonAlg.h:99
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
sTgcRawDataMonAlg::m_cutTriggerBandId
Gaudi::Property< int > m_cutTriggerBandId
Definition: StgcRawDataMonAlg.h:101
sTgcRawDataMonAlg::triggersectorphiid2phi
double triggersectorphiid2phi(uint32_t sourceid, int trigger_phiid) const
Definition: StgcRawDataUtils.cxx:177
sTgcRawDataMonAlg::getPadId
std::optional< Identifier > getPadId(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
Definition: StgcRawDataUtils.cxx:33
sTgcRawDataMonAlg::m_detectorManagerKey
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_detectorManagerKey
Definition: StgcRawDataMonAlg.h:91
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
sTgcRawDataMonAlg::getSignedPhiId
int getSignedPhiId(const uint32_t phiid) const
Definition: StgcRawDataUtils.cxx:26
sTgcRawDataMonAlg::m_cutEtaDown
Gaudi::Property< double > m_cutEtaDown
Definition: StgcRawDataMonAlg.h:97
sTgcRawDataMonAlg::m_cutEtaUp
Gaudi::Property< double > m_cutEtaUp
Definition: StgcRawDataMonAlg.h:98
sTgcRawDataMonAlg::fillsTgcClusterFromTrackHistograms
void fillsTgcClusterFromTrackHistograms(const xAOD::TrackParticleContainer *) const
Definition: StgcRawDataMonAlg.cxx:229
Trk::TrackStateOnSurface
represents the track state (measurement, material, fit parameters and quality) at a surface.
Definition: TrackStateOnSurface.h:71
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
sTgcRawDataMonAlg::getRotId
std::optional< Identifier > getRotId(const Trk::TrackStateOnSurface *trkState) const
Definition: StgcRawDataUtils.cxx:78
sTgcRawDataMonAlg::m_cutPt
Gaudi::Property< double > m_cutPt
Definition: StgcRawDataMonAlg.h:96
Trk::PrepRawDataType::sTgcPrepData
@ sTgcPrepData
Muon::nsw::NSWPadTriggerL1a
Definition: NSWPadTriggerL1a.h:142
MuonDetectorManager.h
sTgcRawDataMonAlg::sTgcRawDataMonAlg
sTgcRawDataMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: StgcRawDataMonAlg.cxx:23
IResidualPullCalculator.h
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager >
MuonSectorMapping.h
sTgcRawDataMonAlg::fillsTgcLumiblockHistograms
void fillsTgcLumiblockHistograms(const Muon::sTgcPrepDataContainer *, const int lb) const
Definition: StgcRawDataMonAlg.cxx:178
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
sTgcRawDataMonAlg::fillsTgcOccupancyHistograms
void fillsTgcOccupancyHistograms(const Muon::sTgcPrepDataContainer *, const MuonGM::MuonDetectorManager *) const
Definition: StgcRawDataMonAlg.cxx:76
sTgcRawDataMonAlg::NVMMCHAN
static constexpr uint32_t NVMMCHAN
Definition: StgcRawDataMonAlg.h:57
sTgcRawDataMonAlg
Definition: StgcRawDataMonAlg.h:53
sTgcRawDataMonAlg::band2eta
std::optional< double > band2eta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Definition: StgcRawDataUtils.cxx:147
Muon::MuonSectorMapping
Definition: MuonSectorMapping.h:20
sTgcRawDataMonAlg::m_rdoKey
SG::ReadHandleKey< Muon::NSW_PadTriggerDataContainer > m_rdoKey
Definition: StgcRawDataMonAlg.h:93
sTgcRawDataMonAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: StgcRawDataMonAlg.cxx:27
sTgcRawDataMonAlg::getRotIdAndRotObject
std::optional< std::tuple< Identifier, const Trk::RIO_OnTrack * > > getRotIdAndRotObject(const Trk::TrackStateOnSurface *trkState) const
Definition: StgcRawDataUtils.cxx:56
sTgcRawDataMonAlg::band2theta
std::optional< double > band2theta(double rPosAtNSW, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Definition: StgcRawDataUtils.cxx:128
sTgcRawDataMonAlg::bandId2eta
std::optional< double > bandId2eta(int bandid, bool isLarge, bool isA, const MuonGM::MuonDetectorManager *muonDetectorManagerObject) const
Definition: StgcRawDataUtils.cxx:168
sTgcRawDataMonAlg::getPadEtaPhiTuple
std::optional< std::tuple< int, int, std::string, std::string, int > > getPadEtaPhiTuple(uint32_t sourceid, uint32_t pfeb, uint32_t tdschan) const
Definition: StgcRawDataUtils.cxx:86
IMuonIdHelperSvc.h
ServiceHandle< Muon::IMuonIdHelperSvc >
Muon::nsw::MapperSTG
Definition: MapperSTG.h:18
Identifier
Definition: IdentifierFieldParser.cxx:14