ATLAS Offline Software
SCTHitsNoiseMonAlg.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef SCTHITSNOISEMONALG_H
8 #define SCTHITSNOISEMONALG_H
9 
12 
13 
14 #include "Identifier/Identifier.h"
21 #include "TrkTrack/Track.h"
23 
24 #include "GaudiKernel/ToolHandle.h"
25 
26 #include <array>
27 #include <unordered_set>
28 
29 // Forward declarations
31 class SCT_ID;
32 
34  public:
35  SCTHitsNoiseMonAlg(const std::string& name, ISvcLocator* pSvcLocator);
36  virtual ~SCTHitsNoiseMonAlg() = default;
37  virtual StatusCode initialize() override final;
38  virtual StatusCode fillHistograms(const EventContext& ctx) const override final;
39 
40  private:
41 
42  //Count number of events
43  mutable std::atomic<int> m_numberOfEvents{0};
44  //Count number of events in the selected stream
45  mutable std::atomic<int> m_numberOfEventsTrigger{0};
46  //Count number of events since last reset
47  mutable std::atomic<int> m_numberOfEventsRecent{0};
48  //CAM adds skip events counter
49  mutable std::atomic<int> m_skipEvents{0};
50 
51  mutable std::atomic<int> m_events_lb{0};
52  mutable std::atomic<int> m_eventsTrigger_lb{0};
53 
54 
55  std::vector<int> m_nSP_buf{};
56  mutable std::atomic<int> m_nSP_pos{0};
57  std::vector<int> m_nHits_buf{};
58  mutable std::atomic<int> m_nHits_pos{0};
59  std::vector<int> m_nmaxHits_buf{};
60  std::vector<Identifier> m_nmaxModule_buf{};
61  std::vector<int> m_nminHits_buf{};
62 
63 
65  StringProperty m_NOTriggerItem{this, "NOTrigger", "L1_RD0_EMPTY"};
66  BooleanProperty m_doTrigger{this, "doTrigger", false};
67  BooleanProperty m_doOnline{this, "doOnlineMon", false};
69  //BooleanProperty m_boolhitmaps{this, "doHitmapHistos", false};
71  BooleanProperty m_doPositiveEndcap{this, "doPositiveEndcap", true};
72  BooleanProperty m_doNegativeEndcap{this, "doNegativeEndcap", true};
74  BooleanProperty m_doTrackBasedNoise{this, "doTrackBasedNoise", false};
75  BooleanProperty m_doSpacePointBasedNoise{this, "doSpacePointBasedNoise", true};
77  BooleanProperty m_doTimeBinFilteringForNoise{this, "doTimeBinFilteringForNoise", true};
79  IntegerProperty m_checkrate{this, "CheckRate", 1000};
80  IntegerProperty m_checkrecent{this, "CheckRecent", 30};
82  IntegerProperty m_evtsbins{this, "EvtsBins", 5000};
83  //Things for doing time bin distributions for track hits
84  BooleanProperty m_doTrackHits{this, "doTrackHits", true};
85  UnsignedIntegerProperty m_maxTracks{this, "MaxTracks", 1000};
87  IntegerProperty m_localSummary{this, "localSummary", 0};
88 
90  SG::ReadHandleKey<TrackCollection> m_tracksName{this, "tracksName", "CombinedInDetTracks"};
92  //CAM adds map for SP NO
93  SG::ReadHandleKey<SpacePointContainer> m_SCTSPContainerName{this, "SpacePointKey", "SCT_SpacePoints"};
96  // For P->T converter of SCT_Clusters
97  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
98 
99  //@name Tool methods
101  ToolHandle<ISCT_ConfigurationConditionsTool> m_ConfigurationTool{this, "conditionsTool",
102  "SCT_ConfigurationConditionsTool/InDetSCT_ConfigurationConditionsTool", "Tool to retrieve SCT Configuration Tool"};
104 
105  //@nameService members
107  const SCT_ID* m_pSCTHelper{nullptr};
110 
111  StatusCode generalHistsandNoise(const std::array<std::unordered_set<Identifier>, SCT_Monitoring::N_WAFERS>& rdosOnTracks, const EventContext& ctx) const;
112  StatusCode makeVectorOfTrackRDOIdentifiers(std::array<std::unordered_set<Identifier>, SCT_Monitoring::N_WAFERS>& rdosOnTracks, const EventContext& ctx) const;
114 };
115 
116 #endif // SCTHITSNOISEMONALG_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SCTHitsNoiseMonAlg::makeSPvsEventNumber
StatusCode makeSPvsEventNumber() const
Definition: SCTHitsNoiseMonAlg.cxx:491
SCTHitsNoiseMonAlg::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCTHitsNoiseMonAlg.h:97
SCT_Monitoring::N_WAFERS
@ N_WAFERS
Definition: SCT_MonitoringNumbers.h:51
SCTHitsNoiseMonAlg::m_skipEvents
std::atomic< int > m_skipEvents
Definition: SCTHitsNoiseMonAlg.h:49
SCTHitsNoiseMonAlg::m_nHits_buf
std::vector< int > m_nHits_buf
Definition: SCTHitsNoiseMonAlg.h:57
SCTHitsNoiseMonAlg::m_nSP_pos
std::atomic< int > m_nSP_pos
Definition: SCTHitsNoiseMonAlg.h:56
SCTHitsNoiseMonAlg::m_maxTracks
UnsignedIntegerProperty m_maxTracks
Definition: SCTHitsNoiseMonAlg.h:85
SCTHitsNoiseMonAlg::m_evtsbins
IntegerProperty m_evtsbins
ChechHists() frequency.
Definition: SCTHitsNoiseMonAlg.h:82
SCTHitsNoiseMonAlg::m_events_lb
std::atomic< int > m_events_lb
Definition: SCTHitsNoiseMonAlg.h:51
SCTHitsNoiseMonAlg
Definition: SCTHitsNoiseMonAlg.py:1
SCTHitsNoiseMonAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
Definition: SCTHitsNoiseMonAlg.cxx:90
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SCTHitsNoiseMonAlg::m_checkrate
IntegerProperty m_checkrate
CheckHists() frequency.
Definition: SCTHitsNoiseMonAlg.h:79
SCTHitsNoiseMonAlg::m_doNegativeEndcap
BooleanProperty m_doNegativeEndcap
Definition: SCTHitsNoiseMonAlg.h:72
SpacePointContainer.h
Track.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
SCTHitsNoiseMonAlg::m_doTimeBinFilteringForNoise
BooleanProperty m_doTimeBinFilteringForNoise
Add time-bin filtering to space point NO algorithm.
Definition: SCTHitsNoiseMonAlg.h:77
SCTHitsNoiseMonAlg::initialize
virtual StatusCode initialize() override final
initialize
Definition: SCTHitsNoiseMonAlg.cxx:67
SCTHitsNoiseMonAlg::m_SCTSPContainerName
SG::ReadHandleKey< SpacePointContainer > m_SCTSPContainerName
Definition: SCTHitsNoiseMonAlg.h:93
SCT_RDO_Container.h
SCTHitsNoiseMonAlg::m_doOnline
BooleanProperty m_doOnline
Definition: SCTHitsNoiseMonAlg.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
SCTHitsNoiseMonAlg::m_pSCTHelper
const SCT_ID * m_pSCTHelper
SCT Helper class.
Definition: SCTHitsNoiseMonAlg.h:108
TrackCollection.h
SCTHitsNoiseMonAlg::m_doTrackHits
BooleanProperty m_doTrackHits
Definition: SCTHitsNoiseMonAlg.h:84
SCTHitsNoiseMonAlg::m_clusContainerKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_clusContainerKey
Definition: SCTHitsNoiseMonAlg.h:91
ISCT_ConfigurationConditionsTool
Definition: ISCT_ConfigurationConditionsTool.h:28
SCTHitsNoiseMonAlg::m_numberOfEventsRecent
std::atomic< int > m_numberOfEventsRecent
Definition: SCTHitsNoiseMonAlg.h:47
SCTHitsNoiseMonAlg::m_nminHits_buf
std::vector< int > m_nminHits_buf
Definition: SCTHitsNoiseMonAlg.h:61
SCTHitsNoiseMonAlg::m_nHits_pos
std::atomic< int > m_nHits_pos
Definition: SCTHitsNoiseMonAlg.h:58
ReadCondHandleKey.h
lumiFormat.array
array
Definition: lumiFormat.py:91
SCTHitsNoiseMonAlg::m_localSummary
IntegerProperty m_localSummary
Determines whether a local summary is written.
Definition: SCTHitsNoiseMonAlg.h:87
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCTHitsNoiseMonAlg::m_eventsTrigger_lb
std::atomic< int > m_eventsTrigger_lb
Definition: SCTHitsNoiseMonAlg.h:52
SiDetectorElementCollection.h
SCT_MonitoringNumbers.h
SCTHitsNoiseMonAlg::m_nmaxModule_buf
std::vector< Identifier > m_nmaxModule_buf
Definition: SCTHitsNoiseMonAlg.h:60
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SCTHitsNoiseMonAlg::~SCTHitsNoiseMonAlg
virtual ~SCTHitsNoiseMonAlg()=default
SCTHitsNoiseMonAlg::m_nSP_buf
std::vector< int > m_nSP_buf
Definition: SCTHitsNoiseMonAlg.h:55
SCT_ID
Definition: SCT_ID.h:68
SCTHitsNoiseMonAlg::m_dataObjectName
SG::ReadHandleKey< SCT_RDO_Container > m_dataObjectName
Data object name: for the SCT this is "SCT_RDOs".
Definition: SCTHitsNoiseMonAlg.h:95
SCTHitsNoiseMonAlg::m_NOTriggerItem
StringProperty m_NOTriggerItem
Name of the L1 Type to use for filling the extra NO histograms.
Definition: SCTHitsNoiseMonAlg.h:65
SCT_ClusterContainer.h
SCTHitsNoiseMonAlg::makeVectorOfTrackRDOIdentifiers
StatusCode makeVectorOfTrackRDOIdentifiers(std::array< std::unordered_set< Identifier >, SCT_Monitoring::N_WAFERS > &rdosOnTracks, const EventContext &ctx) const
Definition: SCTHitsNoiseMonAlg.cxx:436
SCTHitsNoiseMonAlg::m_tracksName
SG::ReadHandleKey< TrackCollection > m_tracksName
Name of the Track collection to use.
Definition: SCTHitsNoiseMonAlg.h:90
SCTHitsNoiseMonAlg::SCTHitsNoiseMonAlg
SCTHitsNoiseMonAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCTHitsNoiseMonAlg.cxx:61
SCTHitsNoiseMonAlg::m_numberOfEventsTrigger
std::atomic< int > m_numberOfEventsTrigger
Definition: SCTHitsNoiseMonAlg.h:45
SCTHitsNoiseMonAlg::m_doPositiveEndcap
BooleanProperty m_doPositiveEndcap
Switch on or off the hitmaps histograms.
Definition: SCTHitsNoiseMonAlg.h:71
SCTHitsNoiseMonAlg::m_ConfigurationTool
ToolHandle< ISCT_ConfigurationConditionsTool > m_ConfigurationTool
Definition: SCTHitsNoiseMonAlg.h:101
SCTHitsNoiseMonAlg::m_numberOfEvents
std::atomic< int > m_numberOfEvents
Definition: SCTHitsNoiseMonAlg.h:43
SCTHitsNoiseMonAlg::m_nmaxHits_buf
std::vector< int > m_nmaxHits_buf
Definition: SCTHitsNoiseMonAlg.h:59
SCTHitsNoiseMonAlg::m_doTrackBasedNoise
BooleanProperty m_doTrackBasedNoise
Select the noise algorithm.
Definition: SCTHitsNoiseMonAlg.h:74
SCTHitsNoiseMonAlg::m_doTrigger
BooleanProperty m_doTrigger
Definition: SCTHitsNoiseMonAlg.h:66
SCTHitsNoiseMonAlg::m_doSpacePointBasedNoise
BooleanProperty m_doSpacePointBasedNoise
Definition: SCTHitsNoiseMonAlg.h:75
SCTHitsNoiseMonAlg::generalHistsandNoise
StatusCode generalHistsandNoise(const std::array< std::unordered_set< Identifier >, SCT_Monitoring::N_WAFERS > &rdosOnTracks, const EventContext &ctx) const
Definition: SCTHitsNoiseMonAlg.cxx:111
SCTHitsNoiseMonAlg::m_checkrecent
IntegerProperty m_checkrecent
Definition: SCTHitsNoiseMonAlg.h:80