ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_StrawStatus.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// TRT_StrawStatus.h, (c) ATLAS Detector software
8
9#ifndef INDETTRT_STRAWSTATUS_H
10#define INDETTRT_STRAWSTATUS_H
11
12// Gaudi includes
14#include "GaudiKernel/ServiceHandle.h"
15#include "GaudiKernel/ToolHandle.h"
17
21#include "TrkTrack/Track.h"
27
31
32#include <cstdlib>
33#include <string>
34#include <vector>
35#include <array>
36#include <atomic>
37
38class AtlasDetectorID;
39class Identifier;
40
41class TRT_ID;
42
43
44namespace InDet
45{
46
55
56 class ATLAS_NOT_THREAD_SAFE TRT_StrawStatus : public AthAlgorithm // A global variable (last_lumiBlock0) is read and written. Results should not be reproducible in multi-threading.
57 {
58 public:
59
61 TRT_StrawStatus(const std::string& name, ISvcLocator* pSvcLocator);
64
66 StatusCode initialize();
68 StatusCode execute();
70 StatusCode finalize();
71
72 private:
73
74 // Decleare properties, servicies and tools
75 ServiceHandle<ITRT_HWMappingSvc> m_mapSvc {this,"HWMapSvc","TRT_HWMappingSvc","" };
76 ServiceHandle<ITRT_DCS_ConditionsSvc> m_DCSSvc {this,"InDetTRT_DCS_ConditionsSvc","TRT_DCS_ConditionsSvc","" };
77 ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc {this,"TRT_StrawNeighbourSvc","TRT_StrawNeighbourSvc","retrieve barrel and end-cap straw number later on, as well as DTMROC" };
78 ToolHandle<ITRT_StrawStatusSummaryTool> m_TRTStrawStatusSummaryTool {this, "TRT_StrawStatusSummaryTool", "ITRT_StrawStatusSummaryTool", ""};
79 ToolHandle<Trk::ITrackHoleSearchTool> m_trt_hole_finder {this, "trt_hole_finder", "Trk::ITrackHoleSearchTool", ""};
80 PublicToolHandle<Trk::IUpdator> m_updator {this, "KalmanUpdator", "Trk::KalmanUpdator/TrkKalmanUpdator",""};
81
82 Gaudi::Property<double> m_locR_cut {this, "locR_cut", 1.4, ""};
83 Gaudi::Property<int> m_skipBusyEvents {this, "skipBusyEvents", 0, ""};
84 Gaudi::Property<int> m_printDetailedInformation {this, "printDetailedInformation", 0, ""};
85 Gaudi::Property<std::string> m_fileName {this, "outputFileName", "TRT_StrawStatusOutput", ""};
86
87 // Declare Handles
88 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this,"EventInfoKey","EventInfo","RHK to retrieve xAOD::EventInfo"};
89 SG::ReadHandleKey<TRT_RDO_Container> m_rdoContainerKey{this,"RDO_ContainerKey","TRT_RDOs","RHK to retrieve TRT RDO's"};
90 SG::ReadHandleKey<DataVector<Trk::Track>> m_tracksName{this,"tracksCollectionKey","CombinedInDetTracks","RHK to retrieve CombinedInDetTracks"};
91 SG::ReadHandleKey<xAOD::VertexContainer> m_vxContainerKey{this,"VxContainerKey","PrimaryVertices","RHK to retrieve VX Primary candidates"};
92
93 void clear();
94 StatusCode reportResults();
95 void printDetailedInformation();
96
99 void myStrawIndex(Identifier id, int *index);
100 int barrelStrawNumber(int strawNumber, int strawlayerNumber, int LayerNumber);
101 int endcapStrawNumber( int strawNumber, int strawLayerNumber, int LayerNumber );
102
108
109 int m_nEvents; // count N of processed events, needed for normalization
111
113 typedef std::array<std::array<std::array<std::array<int,6>,5482>,32>,2> ACCHITS_t;
114 std::unique_ptr<ACCHITS_t> m_accumulateHits;
115
117 mutable std::atomic<int> m_printStatusCount{0};
118 };
119} // end of namespace
120
121#endif
An STL vector of pointers that by default owns its pointed-to elements.
Interface to read DCS conditions data from COOL author Denver Whittington Denver.Whittington@cern....
Abstract interface to information on straws electronic grouping.
abstract interface to TRT straw status constants
Property holding a SG store/key/clid from which a ReadHandle is made.
void reportResults(const std::string &filename, int run)
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
std::unique_ptr< ACCHITS_t > m_accumulateHits
SG::ReadHandleKey< xAOD::VertexContainer > m_vxContainerKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
StatusCode finalize()
standard Athena-Algorithm method
std::array< std::array< std::array< std::array< int, 6 >, 5482 >, 32 >, 2 > ACCHITS_t
accumulate hits, last index: 0 - all hits, 1 - hits on track, 2 - all HT (TR) hits,...
ToolHandle< Trk::ITrackHoleSearchTool > m_trt_hole_finder
Gaudi::Property< int > m_printDetailedInformation
ServiceHandle< ITRT_DCS_ConditionsSvc > m_DCSSvc
TRT_StrawStatus(const std::string &name, ISvcLocator *pSvcLocator)
Standard Athena-Algorithm Constructor.
ServiceHandle< ITRT_HWMappingSvc > m_mapSvc
int barrelStrawNumber(int strawNumber, int strawlayerNumber, int LayerNumber)
ToolHandle< ITRT_StrawStatusSummaryTool > m_TRTStrawStatusSummaryTool
Gaudi::Property< double > m_locR_cut
std::atomic< int > m_printStatusCount
int endcapStrawNumber(int strawNumber, int strawLayerNumber, int LayerNumber)
int m_nEvents
returns index of hardware units: board, chip, pad private fix for now, will call TRTStrawNeighbourSvc...
SG::ReadHandleKey< DataVector< Trk::Track > > m_tracksName
PublicToolHandle< Trk::IUpdator > m_updator
Gaudi::Property< int > m_skipBusyEvents
Gaudi::Property< std::string > m_fileName
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
StatusCode execute()
standard Athena-Algorithm method
SG::ReadHandleKey< TRT_RDO_Container > m_rdoContainerKey
Property holding a SG store/key/clid from which a ReadHandle is made.
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Primary Vertex Finder.
Definition index.py:1
void initialize()