ATLAS Offline Software
Loading...
Searching...
No Matches
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
31class 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"};
103
104
105 //@nameService members
107
108 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;
113 StatusCode makeSPvsEventNumber() const;
114};
115
116#endif // SCTHITSNOISEMONALG_H
Property holding a SG store/key/clid from which a ReadHandle is made.
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::vector< int > m_nSP_buf
std::atomic< int > m_eventsTrigger_lb
IntegerProperty m_evtsbins
ChechHists() frequency.
std::atomic< int > m_numberOfEventsRecent
std::vector< int > m_nmaxHits_buf
std::vector< int > m_nminHits_buf
std::atomic< int > m_numberOfEventsTrigger
BooleanProperty m_doTrigger
SG::ReadHandleKey< TrackCollection > m_tracksName
Name of the Track collection to use.
std::vector< Identifier > m_nmaxModule_buf
const SCT_ID * m_pSCTHelper
SCT Helper class.
BooleanProperty m_doSpacePointBasedNoise
BooleanProperty m_doTrackHits
BooleanProperty m_doTrackBasedNoise
Select the noise algorithm.
SG::ReadHandleKey< SpacePointContainer > m_SCTSPContainerName
SG::ReadHandleKey< SCT_RDO_Container > m_dataObjectName
Data object name: for the SCT this is "SCT_RDOs".
std::atomic< int > m_nHits_pos
std::atomic< int > m_skipEvents
IntegerProperty m_checkrecent
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
std::atomic< int > m_events_lb
BooleanProperty m_doOnline
UnsignedIntegerProperty m_maxTracks
IntegerProperty m_checkrate
CheckHists() frequency.
std::atomic< int > m_nSP_pos
std::atomic< int > m_numberOfEvents
virtual ~SCTHitsNoiseMonAlg()=default
virtual StatusCode fillHistograms(const EventContext &ctx) const override final
adds event to the monitoring histograms
StringProperty m_NOTriggerItem
Name of the L1 Type to use for filling the extra NO histograms.
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_clusContainerKey
BooleanProperty m_doPositiveEndcap
Switch on or off the hitmaps histograms.
BooleanProperty m_doNegativeEndcap
std::vector< int > m_nHits_buf
IntegerProperty m_localSummary
Determines whether a local summary is written.
BooleanProperty m_doTimeBinFilteringForNoise
Add time-bin filtering to space point NO algorithm.
ToolHandle< ISCT_ConfigurationConditionsTool > m_ConfigurationTool
This is an Identifier helper class for the SCT subdetector.
Definition SCT_ID.h:68
Property holding a SG store/key/clid from which a ReadHandle is made.
STL namespace.
void initialize()
#define private