ATLAS Offline Software
TileTMDBMonitorAlgorithm.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TILEMONITORING_TILETMDBMONITORALGORITHM_H
6 #define TILEMONITORING_TILETMDBMONITORALGORITHM_H
7 
13 
18 
21 #include "StoreGate/ReadHandle.h"
23 
24 #include "math.h"
25 
26 class TileHWID;
27 class TileCablingService;
28 
34 
35  public:
36 
38  virtual ~TileTMDBMonitorAlgorithm() = default;
39  virtual StatusCode initialize() override;
40  virtual StatusCode fillHistograms(const EventContext& ctx) const override;
41 
42 
43  void fillNoiseHistograms(const TileDigitsCollection* muRcvDigitsCollection, const int drawer, const int partition) const;
44 
45  private:
46 
47  Gaudi::Property<std::vector<float>> m_pulseEnergyRange{this,
48  "PulseEnergyRange", {0.5F, 5000.F}, "Energy [MeV] range for pulse shape"};
49 
50  Gaudi::Property<std::vector<float>> m_energyRange{this,
51  "EnergyRange", {100.0F, 10000.F}, "Energy [MeV] range for pulse shape"};
52 
53  Gaudi::Property<bool> m_fillDetailedHistograms{this,
54  "fillDetailedHistograms", false, "Fill monitoring histograms per TMDB channel"};
55 
57  "TileRawChannelContainer", "TileRawChannelCnt", "Input Tile raw channel container key"};
58 
60  "MuonReceiverRawChannelContainer", "MuRcvRawChCnt", "Input Tile muon receiver raw channel container key"};
61 
63  "MuonReceiverDigitsContainer", "MuRcvDigitsCnt", "Input Tile muon receiver digits container key"};
64 
65  ToolHandle<ITileCondToolTMDB> m_tileCondToolTMDB{this,
66  "TileCondToolTMDB", "TileCondToolTMDB", "Tile TMDB conditions tool"};
67 
72  "TileCablingSvc", "TileCablingSvc", "The Tile cabling service"};
73 
74  const TileHWID* m_tileHWID{nullptr};
75  const TileCablingService* m_cabling{nullptr};
76 
77  std::vector<int> m_peakGroups;
78  std::vector<int> m_energyGroups;
79 
80  std::vector<std::vector<std::vector<std::vector<float>>>> m_PedestalVector;
81 
82  std::vector<std::vector<std::vector<int>>> m_chanEnergyGroups;
83  std::vector<std::vector<std::vector<std::vector<int>>>> m_chanChannelNoiseGroups;
84  std::vector<std::vector<std::vector<int>>> m_chanPeakPosGroups;
85  std::vector<std::vector<std::vector<int>>> m_calibErrorGroups;
86  std::vector<std::vector<std::vector<int>>> m_pulseGroups;
87 
88  struct corrmap {
89  double **accCorrelation;
90  double *accMean;
91  };
92 
93  std::vector<std::vector<std::vector<float *>>> m_accCorrelation;
94 
96 
97  // Mapping from Tile raw channels to TMDB in LB for odd modules,
98  // in even modules TMDB channels are shifted by 1
99  const std::map<int, int> m_cellTMDB_LB{{0, 0 /*D0*/},
100  {13, 1 /*D1L*/}, {14, 2 /*D1R*/},
101  {24, 3 /*D2R*/}, {25, 4 /*D2L*/},
102  {41, 5 /*D3L*/}, {44, 6 /*D3R*/}};
103 
104  // Mapping from Tile raw channels to TMDB in EB
105  const std::map<int, int> m_cellTMDB_EB{{16, 0 /*D5R*/}, {17, 1 /*D5L*/},
106  {37, 2 /*D6L*/}, {38, 3 /*D6R*/}};
107 
108  std::reference_wrapper<const std::map<int, int>> m_cellTMDB[Tile::MAX_ROS - 1] = {m_cellTMDB_LB,
111  m_cellTMDB_EB};
112 };
113 
114 
115 #endif // TILEMONITORING_TILETMDBMONITORALGORITHM_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TileCablingSvc.h
TileTMDBMonitorAlgorithm::m_cellTMDB
std::reference_wrapper< const std::map< int, int > > m_cellTMDB[Tile::MAX_ROS - 1]
Definition: TileTMDBMonitorAlgorithm.h:108
TileTMDBMonitorAlgorithm::corrmap
Definition: TileTMDBMonitorAlgorithm.h:88
TileTMDBMonitorAlgorithm::m_muRcvRawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_muRcvRawChannelContainerKey
Definition: TileTMDBMonitorAlgorithm.h:59
TileTMDBMonitorAlgorithm::m_tileCondToolTMDB
ToolHandle< ITileCondToolTMDB > m_tileCondToolTMDB
Definition: TileTMDBMonitorAlgorithm.h:65
TileTMDBMonitorAlgorithm::m_cellTMDB_LB
const std::map< int, int > m_cellTMDB_LB
Definition: TileTMDBMonitorAlgorithm.h:99
TileTMDBMonitorAlgorithm::m_fillDetailedHistograms
Gaudi::Property< bool > m_fillDetailedHistograms
Definition: TileTMDBMonitorAlgorithm.h:53
TileTMDBMonitorAlgorithm::fillNoiseHistograms
void fillNoiseHistograms(const TileDigitsCollection *muRcvDigitsCollection, const int drawer, const int partition) const
Definition: TileTMDBMonitorAlgorithm.cxx:74
TileCalibUtils.h
TileTMDBMonitorAlgorithm::m_peakGroups
std::vector< int > m_peakGroups
Definition: TileTMDBMonitorAlgorithm.h:77
SG::ReadHandleKey< TileRawChannelContainer >
TileTMDBMonitorAlgorithm::m_accCorrelation
std::vector< std::vector< std::vector< float * > > > m_accCorrelation
Definition: TileTMDBMonitorAlgorithm.h:93
TileTMDBMonitorAlgorithm::m_tileHWID
const TileHWID * m_tileHWID
Definition: TileTMDBMonitorAlgorithm.h:74
Example_ReadSampleNoise.drawer
drawer
Definition: Example_ReadSampleNoise.py:39
ReadCondHandle.h
TileTMDBMonitorAlgorithm::~TileTMDBMonitorAlgorithm
virtual ~TileTMDBMonitorAlgorithm()=default
TileTMDBMonitorAlgorithm::m_chanChannelNoiseGroups
std::vector< std::vector< std::vector< std::vector< int > > > > m_chanChannelNoiseGroups
Definition: TileTMDBMonitorAlgorithm.h:83
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
TileRawChannelContainer.h
TileTMDBMonitorAlgorithm
Definition: TileTMDBMonitorAlgorithm.py:1
TileHWID
Helper class for TileCal online (hardware) identifiers.
Definition: TileHWID.h:49
TileTMDBMonitorAlgorithm::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: TileTMDBMonitorAlgorithm.cxx:90
Tile
Definition: TileVolumeBuilder.h:43
TileHWID.h
ITileCondToolTMDB.h
TileTMDBMonitorAlgorithm::corrmap::accMean
double * accMean
Definition: TileTMDBMonitorAlgorithm.h:90
TileDigitsContainer.h
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TileTMDBMonitorAlgorithm::m_cellTMDB_EB
const std::map< int, int > m_cellTMDB_EB
Definition: TileTMDBMonitorAlgorithm.h:105
AthMonitorAlgorithm.h
TileTMDBMonitorAlgorithm::m_cablingSvc
ServiceHandle< TileCablingSvc > m_cablingSvc
Name of Tile cabling service.
Definition: TileTMDBMonitorAlgorithm.h:71
TileCalibUtils::MAX_ROS
static const unsigned int MAX_ROS
Number of ROSs
Definition: TileCalibUtils.h:138
TileCablingService
Definition: TileCablingService.h:23
Monitored.h
Header file to be included by clients of the Monitored infrastructure.
ReadCondHandleKey.h
TileTMDBMonitorAlgorithm::corrmap::accCorrelation
double ** accCorrelation
Definition: TileTMDBMonitorAlgorithm.h:89
TileTMDBMonitorAlgorithm::m_chanPeakPosGroups
std::vector< std::vector< std::vector< int > > > m_chanPeakPosGroups
Definition: TileTMDBMonitorAlgorithm.h:84
TileTMDBMonitorAlgorithm::m_energyGroups
std::vector< int > m_energyGroups
Definition: TileTMDBMonitorAlgorithm.h:78
TileDigitsCollection
Definition: TileDigitsCollection.h:18
TileTMDBMonitorAlgorithm::m_muRcvDigitsContainerKey
SG::ReadHandleKey< TileDigitsContainer > m_muRcvDigitsContainerKey
Definition: TileTMDBMonitorAlgorithm.h:62
TileTMDBMonitorAlgorithm::m_pulseGroups
std::vector< std::vector< std::vector< int > > > m_pulseGroups
Definition: TileTMDBMonitorAlgorithm.h:86
TileTMDBMonitorAlgorithm::m_PedestalVector
std::vector< std::vector< std::vector< std::vector< float > > > > m_PedestalVector
Definition: TileTMDBMonitorAlgorithm.h:80
python.Classes.TileCalibUtils
TileCalibUtils
Definition: TileCalib/TileCalibBlobObjs/python/Classes.py:5
StateLessPT_NewConfig.partition
partition
Definition: StateLessPT_NewConfig.py:49
AthMonitorAlgorithm::AthMonitorAlgorithm
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
Definition: AthMonitorAlgorithm.cxx:7
TileTMDBMonitorAlgorithm::initialize
virtual StatusCode initialize() override
initialize
Definition: TileTMDBMonitorAlgorithm.cxx:12
TileTMDBMonitorAlgorithm::m_calibErrorGroups
std::vector< std::vector< std::vector< int > > > m_calibErrorGroups
Definition: TileTMDBMonitorAlgorithm.h:85
TileTMDBMonitorAlgorithm.h
TileTMDBMonitorAlgorithm::m_chanEnergyGroups
std::vector< std::vector< std::vector< int > > > m_chanEnergyGroups
Definition: TileTMDBMonitorAlgorithm.h:82
ReadHandle.h
Handle class for reading from StoreGate.
TileTMDBMonitorAlgorithm::m_rawChannelContainerKey
SG::ReadHandleKey< TileRawChannelContainer > m_rawChannelContainerKey
Definition: TileTMDBMonitorAlgorithm.h:56
TileTMDBMonitorAlgorithm::m_pulseEnergyRange
Gaudi::Property< std::vector< float > > m_pulseEnergyRange
Definition: TileTMDBMonitorAlgorithm.h:47
TileTMDBMonitorAlgorithm::m_cabling
const TileCablingService * m_cabling
Definition: TileTMDBMonitorAlgorithm.h:75
TileTMDBMonitorAlgorithm::m_energyRange
Gaudi::Property< std::vector< float > > m_energyRange
Definition: TileTMDBMonitorAlgorithm.h:50
ServiceHandle< TileCablingSvc >