ATLAS Offline Software
TRT_StrawStatus.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 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 
38 class AtlasDetectorID;
39 class Identifier;
40 
41 class TRT_ID;
42 
43 
44 namespace InDet
45 {
46 
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);
63  ~TRT_StrawStatus();
64 
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  void 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 
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;
115 
117  mutable std::atomic<int> m_printStatusCount{0};
118  };
119 } // end of namespace
120 
121 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:50
InDet::TRT_StrawStatus::ACCHITS_t
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,...
Definition: TRT_StrawStatus.h:113
TRT_RDO_Container.h
InDet::TRT_StrawStatus::barrelStrawNumber
int barrelStrawNumber(int strawNumber, int strawlayerNumber, int LayerNumber)
ATLAS_NOT_THREAD_SAFE
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Definition: checker_macros.h:212
ITRT_DCS_ConditionsSvc.h
InDet::TRT_StrawStatus
Definition: TRT_StrawStatus.h:57
index
Definition: index.py:1
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
initialize
void initialize()
Definition: run_EoverP.cxx:894
SG::ReadHandleKey< xAOD::EventInfo >
reportResults
void reportResults(const std::string &filename, int run)
Definition: TRTCalib_StrawStatusReport.cxx:380
InDet::TRT_StrawStatus::m_accumulateHits
ACCHITS_t * m_accumulateHits
Definition: TRT_StrawStatus.h:114
InDet::TRT_StrawStatus::m_nEvents
int m_nEvents
returns index of hardware units: board, chip, pad private fix for now, will call TRTStrawNeighbourSvc...
Definition: TRT_StrawStatus.h:109
IUpdator.h
Track.h
LArG4FSStartPointFilterLegacy.execute
execute
Definition: LArG4FSStartPointFilterLegacy.py:20
AthAlgorithm.h
ITRT_StrawStatusSummaryTool.h
abstract interface to TRT straw status constants
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
InDet::TRT_StrawStatus::endcapStrawNumber
int endcapStrawNumber(int strawNumber, int strawLayerNumber, int LayerNumber)
AthAlgorithm
Definition: AthAlgorithm.h:47
ITrackHoleSearchTool.h
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
InDet::TRT_StrawStatus::m_TRTHelper
const TRT_ID * m_TRTHelper
Definition: TRT_StrawStatus.h:116
EventInfo.h
ITRT_StrawNeighbourSvc.h
Abstract interface to information on straws electronic grouping.
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
InDet::TRT_StrawStatus::m_runNumber
int m_runNumber
Definition: TRT_StrawStatus.h:110
TRT_ID
Definition: TRT_ID.h:84
ITRT_HWMappingSvc.h
VertexContainer.h
VKalVrtAthena::varHolder_detail::clear
void clear(T &var)
Definition: NtupleVars.h:48
checker_macros.h
Define macros for attributes used to control the static checker.
AtlasDetectorID
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Definition: AtlasDetectorID.h:57
ServiceHandle< ITRT_HWMappingSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14