ATLAS Offline Software
Loading...
Searching...
No Matches
TRTMonitoringRun3ESD_Alg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRTMONITORINGRUN3ESD_ALG_H
6#define TRTMONITORINGRUN3ESD_ALG_H
7
10
11#include "GaudiKernel/StatusCode.h"
12
13// Data handles
24
25// Tool interfaces
32
33#include "CLHEP/Units/SystemOfUnits.h"
35// STDLIB
36#include <string>
37#include <vector>
39namespace Trk {
40 class Track;
41 class TrackStateOnSurface;
42}
43
44namespace InDetDD {
45 class TRT_DetectorManager;
46}
47
48namespace InDet {
50}
51
52class AtlasDetectorID;
53class TRT_ID;
54class Identifier;
55class ComTime;
57class ITRT_CalDbTool;
61
63public:
64 TRTMonitoringRun3ESD_Alg( const std::string& name, ISvcLocator* pSvcLocator );
66 virtual StatusCode initialize() override;
67 virtual StatusCode fillHistograms( const EventContext& ctx ) const override;
68private:
69
70 StatusCode fillTRTTracks(const EventContext& ctx,
71 const xAOD::TrackParticleContainer& trackCollection,
72 const xAOD::TrigDecision* trigDecision,
73 const ComTime* comTimeObject,
74 const xAOD::EventInfo& eventInfo) const;
75 StatusCode fillTRTHighThreshold(const xAOD::TrackParticleContainer& trackCollection,
76 const xAOD::EventInfo& eventInfo, const EventContext& ctx) const;
77 int strawLayerNumber(int strawLayerNumber, int LayerNumber) const;
78
79
80 // Returns the straw number (0-1641) given the layerNumber, strawlayerNumber, and strawNumber, all gotten from Athena IDHelper
81 int strawNumber(int strawNumber, int strawlayerNumber, int LayerNumber) const;
82 // Returns Barrel Board Number
83 int chipToBoard(int chip) const;
84 // Returns EndCap Board Number
85 int chipToBoard_EndCap(int chip) const;
86
87 // Returns Degrees, converted from radians (Athena Standard units)
88 float radToDegrees(float radValue) const;
89 int strawNumber_reverse (int inp_strawnumber, int* strawNumber, int* strawlayerNumber, int* LayerNumber) const;
90 int strawLayerNumber_reverse(int strawLayerNumInp,int* strawLayerNumber, int* LayerNumber) const;
91 int strawNumberEndCap(int strawNumber, int strawLayerNumber, int LayerNumber, int phi_stack, int side) const;
92 bool checkEventBurst(const TRT_RDO_Container& rdoContainer) const;
93
94 static const int s_numberOfBarrelStacks;
95 static const int s_numberOfEndCapStacks;
96 static const int s_Straw_max[2];
97 static const int s_iStack_max[2];
98 static const int s_iChip_max[2];
99 static const int s_numberOfStacks[2];
100 static const int s_moduleNum[2];
101
102 BooleanProperty m_ArgonXenonSplitter{this, "doArgonXenonSeparation", true};
104
105 // Services
106 ToolHandle<ITRT_StrawStatusSummaryTool> m_sumTool{this, "InDetTRTStrawStatusSummaryTool", "TRT_StrawStatusSummaryTool",""};
107 ServiceHandle<ITRT_StrawNeighbourSvc> m_TRTStrawNeighbourSvc{this, "NeighbourSvc", "TRT_StrawNeighbourSvc", ""};
108 ToolHandle<ITRT_CalDbTool> m_TRTCalDbTool{this, "ITRT_CalDbTool", "TRT_CalDbTool", ""};
109
110 // Data handles
111 SG::ReadHandleKey<xAOD::TrackParticleContainer> m_trackCollectionKey{this, "TrackParticleContainerKeys", "InDetTrackParticles", "Keys for TrackParticle Container"};
112 SG::ReadHandleKey<xAOD::EventInfo> m_xAODEventInfoKey{this, "xAODEventInfo", "EventInfo", "Name of EventInfo object"};
113 SG::ReadHandleKey<InDetTimeCollection> m_TRT_BCIDCollectionKey{this, "TRTBCIDCollectionName", "TRT_BCID", "Name of TRT BCID collection"};
114 SG::ReadHandleKey<ComTime> m_comTimeObjectKey{this, "ComTimeObjectName", "TRT_Phase", "Name of ComTime object"};
115 SG::ReadHandleKey<xAOD::TrigDecision> m_trigDecisionKey{this, "TrigDecisionObjectName", "xTrigDecision", "Name of trigger decision object"};
116
117 // Tools
118 ToolHandle<Trk::ITrackSummaryTool> m_TrackSummaryTool{this, "TrackSummaryTool", "InDetTrackSummaryTool", "Track summary tool name"};
119 ToolHandle<ITRT_DriftFunctionTool> m_drifttool{this, "DriftFunctionTool", "TRT_DriftFunctionTool", ""};
120
123
124 Gaudi::Property<bool> m_doTracksMon{this, "DoTracksMon", true, ""};
125 Gaudi::Property<bool> m_doStraws{this, "doStraws", true, ""};
126 Gaudi::Property<bool> m_doChips{this, "doChips", true, ""};
127 Gaudi::Property<bool> m_doShift{this, "doShift", true, ""};
128 Gaudi::Property<bool> m_doExpert{this, "doExpert", false, ""};
129
130 std::vector<std::vector<unsigned char>> m_mat_chip_B{64, std::vector<unsigned char>(1642)};
131 std::vector<std::vector<unsigned char>> m_mat_chip_E{64, std::vector<unsigned char>(3840)};
132
133 Gaudi::Property<float> m_DistToStraw{this, "DistanceToStraw", 0.4f, ""};
134 bool m_isCosmics{false};
135
136 Gaudi::Property<int> m_min_si_hits{this, "min_si_hits", 1, ""};
137 Gaudi::Property<int> m_min_pixel_hits{this, "min_pixel_hits", 0, ""};
138 Gaudi::Property<int> m_min_sct_hits{this, "min_sct_hits", 0, ""};
139 Gaudi::Property<int> m_min_trt_hits{this, "min_trt_hits", 10, ""};
140 Gaudi::Property<int> m_minTRThits{this, "MinTRTHitCut", 10, ""};
141 Gaudi::Property<float> m_minP{this, "MinTrackP", 0.0 * CLHEP::GeV};
142 Gaudi::Property<float> m_min_pT{this, "min_pT", 0.5 * CLHEP::GeV};
143
144 enum GasType{ Xe = 0, Ar = 1, Kr = 2 };
145 // Deciphers status HT to GasType Enumerator
146 inline GasType Straw_Gastype(int stat) const {
147 // getStatusHT returns enum {Undefined, Dead, Good, Xenon, Argon, Krypton}.
148 // Our representation of 'GasType' is 0:Xenon, 1:Argon, 2:Krypton
149 GasType Gas = Xe; // Xenon is default
151 // int stat=m_sumSvc->getStatusHT(TRT_Identifier);
152 if ( stat==2 || stat==3 ) { Gas = Xe; } // Xe
153 else if ( stat==1 || stat==4 ) { Gas = Ar; } // Ar
154 else if ( stat==5 ) { Gas = Kr; } // Kr
155 else if ( stat==6 ) { Gas = Xe; } // Emulate Ar (so treat as Xe here)
156 else if ( stat==7 ) { Gas = Xe; } // Emulate Kr (so treat as Xe here)
157 else { ATH_MSG_FATAL ("getStatusHT = " << stat << ", must be 'Good(2)||Xenon(3)' or 'Dead(1)||Argon(4)' or 'Krypton(5)!' or 6 or 7 for emulated types!");
158 throw std::exception();
159 }
160 }
161 return Gas;
162 }
163
165 ToolHandle<InDet::IInDetTrackSelectionTool> m_trackSelTool{this, "TrackSelectionTool", "InDet::InDetTrackSelectionTool/TrackSelectionTool", ""};
166};
167#endif
#define ATH_MSG_FATAL(x)
abstract interface to TRT calibration constants
abstract interface to TRT straw status constants
Header file to be included by clients of the Monitored infrastructure.
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for reading from StoreGate.
InDetRawDataContainer< InDetRawDataCollection< TRT_RDORawData > > TRT_RDO_Container
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
Interface class for service providing summary of status of a detector element.
abstract interface to TRT calibration constants
The Detector Manager for all TRT Detector elements, it acts as the interface to the detector elements...
Interface for track selection tool.
Property holding a SG store/key/clid from which a ReadHandle is made.
ToolHandle< InDet::IInDetTrackSelectionTool > m_trackSelTool
float radToDegrees(float radValue) const
SG::ReadHandleKey< xAOD::TrigDecision > m_trigDecisionKey
Gaudi::Property< int > m_min_si_hits
int strawNumberEndCap(int strawNumber, int strawLayerNumber, int LayerNumber, int phi_stack, int side) const
const AtlasDetectorID * m_idHelper
Gaudi::Property< int > m_min_trt_hits
Gaudi::Property< bool > m_doStraws
Gaudi::Property< float > m_min_pT
SG::ReadHandleKey< InDetTimeCollection > m_TRT_BCIDCollectionKey
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
int chipToBoard(int chip) const
Gaudi::Property< int > m_min_pixel_hits
ToolHandle< Trk::ITrackSummaryTool > m_TrackSummaryTool
bool checkEventBurst(const TRT_RDO_Container &rdoContainer) const
std::vector< std::vector< unsigned char > > m_mat_chip_E
Gaudi::Property< int > m_minTRThits
int strawLayerNumber_reverse(int strawLayerNumInp, int *strawLayerNumber, int *LayerNumber) const
Gaudi::Property< bool > m_doShift
StatusCode fillTRTHighThreshold(const xAOD::TrackParticleContainer &trackCollection, const xAOD::EventInfo &eventInfo, const EventContext &ctx) const
Gaudi::Property< float > m_DistToStraw
std::vector< std::vector< unsigned char > > m_mat_chip_B
ToolHandle< ITRT_CalDbTool > m_TRTCalDbTool
Gaudi::Property< float > m_minP
ServiceHandle< ITRT_StrawNeighbourSvc > m_TRTStrawNeighbourSvc
SG::ReadHandleKey< xAOD::EventInfo > m_xAODEventInfoKey
int strawNumber(int strawNumber, int strawlayerNumber, int LayerNumber) const
int chipToBoard_EndCap(int chip) const
SG::ReadHandleKey< ComTime > m_comTimeObjectKey
Gaudi::Property< bool > m_doExpert
Gaudi::Property< bool > m_doTracksMon
ToolHandle< ITRT_DriftFunctionTool > m_drifttool
Gaudi::Property< bool > m_doChips
const InDetDD::TRT_DetectorManager * m_mgr
int strawLayerNumber(int strawLayerNumber, int LayerNumber) const
GasType Straw_Gastype(int stat) const
Gaudi::Property< int > m_min_sct_hits
StatusCode fillTRTTracks(const EventContext &ctx, const xAOD::TrackParticleContainer &trackCollection, const xAOD::TrigDecision *trigDecision, const ComTime *comTimeObject, const xAOD::EventInfo &eventInfo) const
ToolHandle< ITRT_StrawStatusSummaryTool > m_sumTool
int strawNumber_reverse(int inp_strawnumber, int *strawNumber, int *strawlayerNumber, int *LayerNumber) const
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_trackCollectionKey
This is an Identifier helper class for the TRT subdetector.
Definition TRT_ID.h:82
Message Stream Member.
Primary Vertex Finder.
Ensure that the ATLAS eigen extensions are properly loaded.
EventInfo_v1 EventInfo
Definition of the latest event info version.
TrigDecision_v1 TrigDecision
Define the latest version of the trigger decision class.
TrackParticleContainer_v1 TrackParticleContainer
Definition of the current "TrackParticle container version".
void initialize()