ATLAS Offline Software
AFPSiLayerMonitor.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef AFP_MONITORING_AFPSILAYERMONITOR_H
6 #define AFP_MONITORING_AFPSILAYERMONITOR_H
7 
9 
10 // FrameWork includes
11 #include <xAODForward/AFPSiHit.h>
13 
14 // forward declarations
15 class LWHist2D;
16 class TH1;
17 class AFPHitsMonitorTool;
18 
19 
30 
31 class AFPSiLayerMonitor : virtual public IAFPSiLayerMonitor, public AthAlgTool
32 {
33 public:
35  AFPSiLayerMonitor(const std::string& type,
36  const std::string& name,
37  const IInterface* parent);
38 
41 
43  StatusCode initialize() override;
44 
46  StatusCode finalize() override;
47 
52 
54  void bookHistograms(ManagedMonitorToolBase* toolToStoreHistograms, const std::string& histsDirName = "") override;
55 
61  void fillHistograms(const xAOD::AFPSiHit& hit) override;
62 
71  void eventEnd() override;
72 
76  void endOfLumiBlock() override;
77 
81  int layerID () const override {return m_pixelLayerID;}
82 
84  std::string makeHistName (const std::string& name) const override;
85 
87  std::string makeHistTitle (const std::string& title) const override;
88 
92  const std::string& histsDirName () const override {return m_histsDirName;}
93 
95  const std::string& layerFullName() const override {return m_layerFullName;}
96 
106  virtual double correctHitsForPileUp (double hits) const override;
107 
111  double hitsInEvent () const override {return m_hitsInEvent;}
112 
114  double hitsInEventScaled () const override {return correctHitsForPileUp(m_hitsInEvent);}
115 
124  double hitsInEventHotSpot () const override {return m_hitsInEventHotSpot;}
125 
128 
129 protected:
132  std::string m_layerFullName;
133 
135  std::string m_histsDirName;
136 
138  unsigned int m_hitsInEvent;
139 
140  // ===== histograms =====
142 
147 
150 
160  unsigned int m_hitsInEventHotSpot;
170 };
171 
172 #endif
IAFPSiLayerMonitor.h
AFPSiLayerMonitor::hitsInEventHotSpotScaled
double hitsInEventHotSpotScaled() const override
Number of hits in hot-spot corrected for pile-up.
Definition: AFPSiLayerMonitor.h:127
AFPSiLayerMonitor::m_pixelLayerID
int m_pixelLayerID
ID number of the silicon pixel layer.
Definition: AFPSiLayerMonitor.h:130
ManagedMonitorToolBase
Provides functionality for users to implement and save histograms, ntuples, and summary data,...
Definition: ManagedMonitorToolBase.h:74
AFPSiLayerMonitor::setParentMonitor
void setParentMonitor(AFPHitsMonitorTool *parent) override
Sets variable storing pointer to the main monitoring object.
Definition: AFPSiLayerMonitor.h:51
AFPSiLayerMonitor::histsDirName
const std::string & histsDirName() const override
Returns name of the ROOT file directory where histograms are stored.
Definition: AFPSiLayerMonitor.h:92
AFPHitsMonitorTool
Main monitoring class for silicon detectors.
Definition: AFPHitsMonitorTool.h:32
xAOD::AFPSiHit_v2
Class representing a hit in silicon detector.
Definition: AFPSiHit_v2.h:30
AFPSiLayerMonitor::m_hitsInEventHotSpot
unsigned int m_hitsInEventHotSpot
Counts number of hits in a hot-spot in an event.
Definition: AFPSiLayerMonitor.h:160
AFPSiLayerMonitor::m_timeOverThreshold
TH1 * m_timeOverThreshold
Distribution of number of time-over-threshold i.e. signal strength for each hit.
Definition: AFPSiLayerMonitor.h:149
AFPSiLayerMonitor::hitsInEvent
double hitsInEvent() const override
Number of pixels fired in an event.
Definition: AFPSiLayerMonitor.h:111
AFPSiLayerMonitor::bookHistograms
void bookHistograms(ManagedMonitorToolBase *toolToStoreHistograms, const std::string &histsDirName="") override
Creates, adds axes descriptions and books histograms filled by this monitor.
Definition: AFPSiLayerMonitor.cxx:64
AFPSiLayerMonitor
Class monitoring one silicon layer.
Definition: AFPSiLayerMonitor.h:32
AFPSiLayerMonitor::m_histsDirName
std::string m_histsDirName
Name of the ROOT file directory where histograms will be saved.
Definition: AFPSiLayerMonitor.h:135
AFPSiLayerMonitor::makeHistTitle
std::string makeHistTitle(const std::string &title) const override
Returns a title suffixed with station and layer numbers.
Definition: AFPSiLayerMonitor.cxx:181
AFPSiLayerMonitor::m_layerFullName
std::string m_layerFullName
Layer and station name used to label summary histograms bins.
Definition: AFPSiLayerMonitor.h:132
AFPSiLayerMonitor::~AFPSiLayerMonitor
~AFPSiLayerMonitor()
Does nothing
Definition: AFPSiLayerMonitor.cxx:43
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
LArG4ShowerLibProcessing.hits
hits
Definition: LArG4ShowerLibProcessing.py:136
AFPSiLayerMonitor::AFPSiLayerMonitor
AFPSiLayerMonitor(const std::string &type, const std::string &name, const IInterface *parent)
Declares python properites.
Definition: AFPSiLayerMonitor.cxx:18
covarianceTool.title
title
Definition: covarianceTool.py:542
AthAlgTool.h
AFPSiLayerMonitor::endOfLumiBlock
void endOfLumiBlock() override
Process histograms at the end of lumiblock.
Definition: AFPSiLayerMonitor.cxx:166
test_pyathena.parent
parent
Definition: test_pyathena.py:15
AFPSiLayerMonitor::m_parentMonitor
AFPHitsMonitorTool * m_parentMonitor
Pointer to the parent monitoring tool.
Definition: AFPSiLayerMonitor.h:134
AFPSiLayerMonitor::initialize
StatusCode initialize() override
Constructs m_layerFullName from m_stationID and m_pixelLayerID.
Definition: AFPSiLayerMonitor.cxx:47
AFPSiLayerMonitor::m_hitMap
LWHist2D * m_hitMap
2D distribution of hits in a layer row vs column (336 x 80)
Definition: AFPSiLayerMonitor.h:141
LWHist2D
Definition: LWHist2D.h:25
AFPSiLayerMonitor::m_hitsInEvent
unsigned int m_hitsInEvent
Number of counted pixels fired in the current event.
Definition: AFPSiLayerMonitor.h:138
AFPSiLayerMonitor::m_hotSpotStartRow
int m_hotSpotStartRow
Defines the first row of a hot spot (including this row).
Definition: AFPSiLayerMonitor.h:152
AFPSiLayerMonitor::hitsInEventScaled
double hitsInEventScaled() const override
Returns number of pixels fired in an event corrected for pile-up.
Definition: AFPSiLayerMonitor.h:114
AFPSiHit.h
AFPSiLayerMonitor::makeHistName
std::string makeHistName(const std::string &name) const override
Returns a name suffixed with station and layer numbers.
Definition: AFPSiLayerMonitor.cxx:172
AFPSiLayerMonitor::layerID
int layerID() const override
Pixel plane ID number.
Definition: AFPSiLayerMonitor.h:81
AFPSiLayerMonitor::fillHistograms
void fillHistograms(const xAOD::AFPSiHit &hit) override
Fills histograms which have to be filled for each hit.
Definition: AFPSiLayerMonitor.cxx:136
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
AFPSiLayerMonitor::m_hotSpotStartCol
int m_hotSpotStartCol
Defines the first column of a hot spot (including this column).
Definition: AFPSiLayerMonitor.h:156
AFPSiLayerMonitor::m_hotSpotEndCol
int m_hotSpotEndCol
Defines the last column of a hot spot (including this column).
Definition: AFPSiLayerMonitor.h:158
AFPSiLayerMonitor::finalize
StatusCode finalize() override
Does nothing.
Definition: AFPSiLayerMonitor.cxx:58
AFPSiLayerMonitor::m_hitMultiplicityHotSpot
TH1 * m_hitMultiplicityHotSpot
Distribution of number of hits in a hot-spot in an event.
Definition: AFPSiLayerMonitor.h:169
AFPSiLayerMonitor::correctHitsForPileUp
virtual double correctHitsForPileUp(double hits) const override
Normalises number of hits in an event to 0 pile-up.
Definition: AFPSiLayerMonitor.cxx:190
AFPSiLayerMonitor::m_hotSpotEndRow
int m_hotSpotEndRow
Defines the last row of a hot spot (including this row).
Definition: AFPSiLayerMonitor.h:154
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TH1
Definition: rootspy.cxx:268
AFPSiLayerMonitor::hitsInEventHotSpot
double hitsInEventHotSpot() const override
Number of pixels fired in an event in a hot-spot.
Definition: AFPSiLayerMonitor.h:124
AFPSiLayerMonitor::m_hitMultiplicity
TH1 * m_hitMultiplicity
Distribution of number of hits in an event.
Definition: AFPSiLayerMonitor.h:146
AFPSiLayerMonitor::m_stationID
int m_stationID
ID number of the station where the pixel layer is mounted.
Definition: AFPSiLayerMonitor.h:131
AthAlgTool
Definition: AthAlgTool.h:26
AFPSiLayerMonitor::m_hitsScaleFactor
double m_hitsScaleFactor
Factor for correcting number of hits for pile-up (see AFPSiLayerMonitor::correctHitsForPileUp()
Definition: AFPSiLayerMonitor.h:137
AFPSiLayerMonitor::layerFullName
const std::string & layerFullName() const override
Returns layer and station name used to label bins in summary histograms.
Definition: AFPSiLayerMonitor.h:95
IAFPSiLayerMonitor
Interface of a class monitoring one silicon layer.
Definition: IAFPSiLayerMonitor.h:23
AFPSiLayerMonitor::eventEnd
void eventEnd() override
Method that should be called when event processing is finished.
Definition: AFPSiLayerMonitor.cxx:153