ATLAS Offline Software
Loading...
Searching...
No Matches
InDet::TRT_TrackTimingTool Class Reference

#include <TRT_TrackTimingTool.h>

Inheritance diagram for InDet::TRT_TrackTimingTool:
Collaboration diagram for InDet::TRT_TrackTimingTool:

Public Member Functions

 TRT_TrackTimingTool (const std::string &, const std::string &, const IInterface *)
virtual ~TRT_TrackTimingTool ()
 default destructor
virtual StatusCode initialize ()
 standard Athena-Algorithm method
virtual StatusCode finalize ()
 standard Athena-Algorithm method
virtual std::vector< Trk::SpaceTimePoint * > timeMeasurements (const Trk::Track &trk, const Trk::SegmentCollection *sgmColl=0) const
 returns time measurements for a given track.
virtual std::vector< Trk::SpaceTimePoint * > timeMeasurements (const Trk::TrackParticleBase &trk) const
 returns time measurements for a given track particle (base).
virtual std::vector< Trk::SpaceTimePoint * > timeMeasurements (std::vector< const Trk::Segment * > segments) const
 return time measurements for a vector of segments - mainly aimed at MS and tagged segments.
float getTrackTimeFromDriftRadius (const Trk::Track *track, int &nHits) const
 calculate the time from drift radius - when RDO hits are not available - for running on AODs
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

float etaCorrection (const Trk::Track &track) const
 eta-dependent corrections, called if m_doEtaCorrection == true
void trackInformation (const Trk::Track &track, Amg::Vector3D &position, int &nTRTdriftCircles, int &nMissingRDOs, int &nMissingTrackParameters, int &nUsedHits) const
 get basic track info to know which function needs to be called, and calculate the position
void debugMissingMeasurements (const Trk::Track &trk) const
 private debugging function for commissioning phase
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

ToolHandle< Trk::ITrackFitterm_ITrackFitter
 tools - this is the tool that actually does the work
ToolHandle< InDet::IInDetCosmicsEventPhaseToolm_eventPhaseTool
ToolHandle< ITRT_CalDbToolm_caldbtool
 TRT Calibration DB tool.
bool m_doEtaCorrection
bool m_debug
SG::ReadHandleKey< xAOD::EventInfom_EventInfoKey
 Current event.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 49 of file TRT_TrackTimingTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TRT_TrackTimingTool()

InDet::TRT_TrackTimingTool::TRT_TrackTimingTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 22 of file TRT_TrackTimingTool.cxx.

24 :
25 AthAlgTool(t, n, p), m_ITrackFitter("Trk::GlobalChi2Fitter/InDetTrackFitter"), m_eventPhaseTool(), m_caldbtool(
26 "TRT_CalDbTool", this), m_doEtaCorrection(true), m_debug(false) {
27 declareInterface<ITRT_TrackTimingTool>(this);
28 declareInterface<Trk::ITrackTimingTool>(this);
29
30 // retrieve properties from job options
31 declareProperty("FitterTool", m_ITrackFitter);
32 declareProperty("EventPhaseTool", m_eventPhaseTool);
33 declareProperty("TRTCalDbTool", m_caldbtool);
34 declareProperty("DoEtaCorrection", m_doEtaCorrection);
35 declareProperty("DebugMissingMeasurement", m_debug);
36 declareProperty("EventInfoKey", m_EventInfoKey = "ByteStreamEventInfo");
37}
AthAlgTool()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Current event.
ToolHandle< Trk::ITrackFitter > m_ITrackFitter
tools - this is the tool that actually does the work
ToolHandle< ITRT_CalDbTool > m_caldbtool
TRT Calibration DB tool.
ToolHandle< InDet::IInDetCosmicsEventPhaseTool > m_eventPhaseTool

◆ ~TRT_TrackTimingTool()

InDet::TRT_TrackTimingTool::~TRT_TrackTimingTool ( )
virtual

default destructor

Definition at line 41 of file TRT_TrackTimingTool.cxx.

41{}

Member Function Documentation

◆ debugMissingMeasurements()

void InDet::TRT_TrackTimingTool::debugMissingMeasurements ( const Trk::Track & trk) const
private

private debugging function for commissioning phase

Definition at line 276 of file TRT_TrackTimingTool.cxx.

276 {
277 int checkNTRThits(0), missingMeasurement(0), noTRT_DriftCircle(0), missingPrepRawData(0), invalidHits(0),
278 missingTrackPar(0);
279
280 for (Trk::TrackStateOnSurface const* state : *track.trackStateOnSurfaces()) {
281 Trk::MeasurementBase const* mesb = state->measurementOnTrack();
282 if (!mesb || !state->type(Trk::TrackStateOnSurface::Measurement)) {
283 missingMeasurement++;
284 continue;
285 }
286
287 InDet::TRT_DriftCircleOnTrack const* trtcirc = dynamic_cast<InDet::TRT_DriftCircleOnTrack const*>(mesb);
288 if (!trtcirc) {
289 noTRT_DriftCircle++;
290 continue;
291 }
292
293 InDet::TRT_DriftCircle const* rawhit = trtcirc->prepRawData();
294 if (!rawhit) {
295 missingPrepRawData++;
296 continue;
297 }
298 if (!rawhit->driftTimeValid() || rawhit->firstBinHigh()) {
299 invalidHits++;
300 continue;
301 }
302 Trk::TrackParameters const* tparp = state->trackParameters();
303 if (!tparp) {
304 missingTrackPar++;
305 continue;
306 }
307
308 checkNTRThits++;
309
311 "debugMissingMeasurements: TRT hit " << checkNTRThits << ", raw drift time: " << rawhit->rawDriftTime() << " ns, track R: " <<
312 tparp->parameters()[Trk::driftRadius] << " mm.");
313 }
314
315 ATH_MSG_INFO("debugMissingMeasurements: N valid hits: " << checkNTRThits << ", missing MeasurementBase / Measurement: " << missingMeasurement
316 << ", missing TRT_DriftCircleOnTrack: " << noTRT_DriftCircle << ", missingPrepRawData: " << missingPrepRawData
317 << ", invalid LE or TE: " << invalidHits << ", missing track parameters: " <<
318 missingTrackPar);
319
320 return;
321}
#define ATH_MSG_INFO(x)
bool const RAWDATA *ch2 const
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
bool driftTimeValid() const
return true if the corrected drift time is OK
bool firstBinHigh() const
returns true if the first bin is high
double rawDriftTime() const
returns the raw driftTime
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
@ driftRadius
trt, straws
Definition ParamDefs.h:53
ParametersBase< TrackParametersDim, Charged > TrackParameters

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ etaCorrection()

float InDet::TRT_TrackTimingTool::etaCorrection ( const Trk::Track & track) const
private

eta-dependent corrections, called if m_doEtaCorrection == true

Definition at line 217 of file TRT_TrackTimingTool.cxx.

217 {
218 const float correctionLargeEta = -0.31; // ns
219
220 const Trk::Perigee* trackPar = track.perigeeParameters();
221
222 if (!trackPar) {
223 ATH_MSG_WARNING("missing perigee parameters, can not make eta correction");
224 return 0.;
225 }
226
227 double eta = trackPar->eta();
228 float correction = (1.3 * eta * eta - 1.9) * eta * eta;
229 if (std::abs(eta) > 1. && correction > correctionLargeEta) correction = correctionLargeEta;
230
231 ATH_MSG_DEBUG("eta correction: " << correction << " ns at eta = " << eta);
232
233 return correction;
234}
Scalar eta() const
pseudorapidity method
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double eta() const
Access method for pseudorapidity - from momentum.
ParametersT< TrackParametersDim, Charged, PerigeeSurface > Perigee
correction(mu, runmode, campaign, run=None)
Definition zlumi_mc_cf.py:4

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode InDet::TRT_TrackTimingTool::finalize ( )
virtual

standard Athena-Algorithm method

Definition at line 67 of file TRT_TrackTimingTool.cxx.

67 {
68 StatusCode sc = AlgTool::finalize();
69
70 return sc;
71}
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ getTrackTimeFromDriftRadius()

float InDet::TRT_TrackTimingTool::getTrackTimeFromDriftRadius ( const Trk::Track * track,
int & nHits ) const

calculate the time from drift radius - when RDO hits are not available - for running on AODs

Definition at line 175 of file TRT_TrackTimingTool.cxx.

175 {
176 float time = 0.;
177
178 nHits = 0;
179
180 for (const Trk::TrackStateOnSurface* state : *track->trackStateOnSurfaces()) {
181 Trk::MeasurementBase const* mesb = state->measurementOnTrack();
182 if (!mesb || !state->type(Trk::TrackStateOnSurface::Measurement)) continue;
183
184 InDet::TRT_DriftCircleOnTrack const* trtcirc = dynamic_cast<InDet::TRT_DriftCircleOnTrack const*>(mesb);
185 if (!trtcirc) continue;
186
187 Trk::TrackParameters const* tparp = state->trackParameters();
188 if (!tparp) continue;
189
190 float driftR = trtcirc->localParameters()[Trk::driftRadius];
191 if (std::abs(driftR) < 0.000001) continue; // driftR == 0 => measurement not available, could be anything
192 if (std::abs(driftR) > 2.) continue;
193
194 float trackR = tparp->parameters()[Trk::driftRadius];
195
196 Identifier id = trtcirc->identify();
197 const TRTCond::RtRelation* rtRelation = m_caldbtool->getRtRelation(id);
198 if (not rtRelation) {
199 ATH_MSG_WARNING("Rt relation pointer is null!");
200 continue;
201 }
202 float driftT = rtRelation->drifttime(std::abs(driftR));
203 float trackT = rtRelation->drifttime(std::abs(trackR));
204
205
206 time += driftT - trackT;
207 nHits++;
208 }
209
210 if (nHits > 0) time /= (float) nHits;
211
212 return time;
213}
static const uint32_t nHits
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
Identifier identify() const
return the identifier -extends MeasurementBase
time(flags, cells_name, *args, **kw)

◆ initialize()

StatusCode InDet::TRT_TrackTimingTool::initialize ( )
virtual

standard Athena-Algorithm method

Definition at line 46 of file TRT_TrackTimingTool.cxx.

46 {
47 StatusCode sc = AlgTool::initialize();
48
49 if (sc.isFailure()) return sc;
50
51 // retrieve fitter
52 if (m_ITrackFitter.retrieve().isFailure()) {
53 msg(MSG::FATAL) << "Failed to retrieve tool " << m_ITrackFitter << endmsg;
54 return StatusCode::FAILURE;
55 } else msg(MSG::INFO) << "Retrieved tool " << m_ITrackFitter << endmsg;
56
57 ATH_CHECK(m_EventInfoKey.initialize());
58
59
60 ATH_MSG_INFO("InDet::TRT_TrackTimingTool::initialize() successful in " << name() << ", do eta correction: " <<
61 (m_doEtaCorrection ? "true" : "false"));
62 return StatusCode::SUCCESS;
63}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
MsgStream & msg() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & InDet::ITRT_TrackTimingTool::interfaceID ( )
inlinestaticinherited

Definition at line 35 of file ITRT_TrackTimingTool.h.

35 {
37 }
static const InterfaceID IID_ITRT_TrackTimingTool("ITRT_TrackTimingTool", 1, 0)

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ timeMeasurements() [1/3]

std::vector< Trk::SpaceTimePoint * > InDet::TRT_TrackTimingTool::timeMeasurements ( const Trk::Track & track,
const Trk::SegmentCollection * segments = 0 ) const
virtual

returns time measurements for a given track.

Implementations in the Calo, ID and Muon spectrometer in dedicated tools

Parameters
trackinput track
Returns
vector of time measurement pointers

Implements Trk::ITrackTimingTool.

Definition at line 73 of file TRT_TrackTimingTool.cxx.

75 {
76 if (sgmColl != nullptr) {
77 ATH_MSG_INFO("TRT_TrackTimingTool::timeMeasurements called with SegmentCollection != 0");
78 }
79
80 std::vector<Trk::SpaceTimePoint*> timeMeasurementsVector;
81 // need to use constructor: SpaceTimePoint(const GlobalPosition& position, const float& t, const float& t_error, const
82 // float& weight);
83
84 // Useless test; compiler can assume it's false and optimize it away.
85 // Tests for null must be done on pointers, not references
86 // (which by definition cannot be null).
87 //if (&track==0) return timeMeasurementsVector; // this function should not have been called in the first place
88
89 float time = 0.;
90 Amg::Vector3D position(0., 0., 0.);
91
92 // info about track
93 int nTRTdriftCircles(0), nMissingRDOs(0), nMissingTrackParameters(0), nUsedHits(0);
94 trackInformation(track, position, nTRTdriftCircles, nMissingRDOs, nMissingTrackParameters, nUsedHits);
95
97 "trackInformation: " << nTRTdriftCircles << ", " << nMissingRDOs << ", " << nMissingTrackParameters << " slimmed? " <<
98 (track.info().trackProperties(Trk::TrackInfo::SlimmedTrack)));
99
100 if (!nTRTdriftCircles) return timeMeasurementsVector; // no TRT hits for this track, can not do anything
101
102 Trk::Track* newtrack = nullptr;
103 if (nMissingTrackParameters) { // need to re-fit the track to get the track parameters
104 newtrack = (m_ITrackFitter->fit(Gaudi::Hive::currentContext(),track,
105 false, track.info().particleHypothesis())).release();
106
107 if (newtrack == nullptr) {
108 ATH_MSG_INFO("fit to unslim track has failed, giving up.");
109 return timeMeasurementsVector;
110 }
111 }
112
113 const Trk::Track* track_ptr = (newtrack != nullptr) ? newtrack : &track;
114
115 // there are TRT hits, and track parameters, use the tool to calculate the time
116 ATH_MSG_DEBUG("timeMeasurements(): diagnosed that track has all information already.");
117
118 if (!nMissingRDOs) {
119 time = m_eventPhaseTool->findPhase(track_ptr);
120 } else {
121 time = getTrackTimeFromDriftRadius(track_ptr, nUsedHits);
122 }
123
124
125 if (m_doEtaCorrection && time != 0.) time -= etaCorrection(*track_ptr);
126
127
128
129// assign estimated constant conservative error for now
130 float error = 1.; // units ns
131
132// use default weight of 1.; 0. if the time measurement is invalid
133 float weight = (time == 0.) ? 0. : 0.02 * nUsedHits;
134
135 ATH_MSG_DEBUG("TRT_TrackTimingTool::timeMeasurements: TRT track with " << nTRTdriftCircles << " hits, track time = "
136 << time << " ns, position: " << position << ", error: " << error << ", weight: " << weight <<
137 ".");
138
139 if (time != 0.) { // add measurement only if valid
140 Trk::SpaceTimePoint* timeMeasurement = new Trk::SpaceTimePoint(position, time, error, weight, Trk::TrackState::TRT);
141
142 timeMeasurementsVector.push_back(timeMeasurement);
143 } else {
144 ATH_MSG_INFO("TRT_TrackTimingTool::timeMeasurement not available");
146 }
147
148
149 if (newtrack) delete newtrack;
150
151 return timeMeasurementsVector;
152}
float getTrackTimeFromDriftRadius(const Trk::Track *track, int &nHits) const
calculate the time from drift radius - when RDO hits are not available - for running on AODs
void trackInformation(const Trk::Track &track, Amg::Vector3D &position, int &nTRTdriftCircles, int &nMissingRDOs, int &nMissingTrackParameters, int &nUsedHits) const
get basic track info to know which function needs to be called, and calculate the position
float etaCorrection(const Trk::Track &track) const
eta-dependent corrections, called if m_doEtaCorrection == true
void debugMissingMeasurements(const Trk::Track &trk) const
private debugging function for commissioning phase
Eigen::Matrix< double, 3, 1 > Vector3D

◆ timeMeasurements() [2/3]

std::vector< Trk::SpaceTimePoint * > InDet::TRT_TrackTimingTool::timeMeasurements ( const Trk::TrackParticleBase & trackParticle) const
virtual

returns time measurements for a given track particle (base).

Implementations in the Calo, ID and Muon spectrometer in dedicated tools

Parameters
trackParticleinput track particle base
Returns
vector of time measurement pointers

Implements Trk::ITrackTimingTool.

Definition at line 157 of file TRT_TrackTimingTool.cxx.

158{
159 if (tpb.originalTrack() == nullptr) {
160 std::vector<Trk::SpaceTimePoint*> v;
161 return v;
162 }
163 return timeMeasurements(*tpb.originalTrack());
164}
virtual std::vector< Trk::SpaceTimePoint * > timeMeasurements(const Trk::Track &trk, const Trk::SegmentCollection *sgmColl=0) const
returns time measurements for a given track.

◆ timeMeasurements() [3/3]

std::vector< Trk::SpaceTimePoint * > InDet::TRT_TrackTimingTool::timeMeasurements ( std::vector< const Trk::Segment * > segments) const
virtual

return time measurements for a vector of segments - mainly aimed at MS and tagged segments.

Not all detectors will implement this interface !

Parameters
segmentsinput vector of segments
Returns
vector of time measurment pointers

Implements Trk::ITrackTimingTool.

Definition at line 167 of file TRT_TrackTimingTool.cxx.

168 {
169 std::vector<Trk::SpaceTimePoint*> v;
170 return v;
171}

◆ trackInformation()

void InDet::TRT_TrackTimingTool::trackInformation ( const Trk::Track & track,
Amg::Vector3D & position,
int & nTRTdriftCircles,
int & nMissingRDOs,
int & nMissingTrackParameters,
int & nUsedHits ) const
private

get basic track info to know which function needs to be called, and calculate the position

Definition at line 238 of file TRT_TrackTimingTool.cxx.

240 {
241 // define position as center-of-gravity for all TRT hits on track
242 Amg::Vector3D GlobalPositionSum(0., 0., 0.);
243
244 for (const Trk::TrackStateOnSurface* state : *track.trackStateOnSurfaces()) {
245 Trk::MeasurementBase const* mesb = state->measurementOnTrack();
246 if (!mesb || !state->type(Trk::TrackStateOnSurface::Measurement)) continue;
247
248 InDet::TRT_DriftCircleOnTrack const* trtcirc = dynamic_cast<InDet::TRT_DriftCircleOnTrack const*>(mesb);
249 if (!trtcirc) continue;
250
251 nTRTdriftCircles++;
252
253 GlobalPositionSum += trtcirc->globalPosition();
254
255 if (!state->trackParameters()) nMissingTrackParameters++;
256
257 InDet::TRT_DriftCircle const* rawhit = trtcirc->prepRawData();
258 if (!rawhit) {
259 nMissingRDOs++;
260 continue;
261 }
262 if (!rawhit->driftTimeValid() || rawhit->firstBinHigh()) continue;
263 nUsedHits++; // this is the N of hits that will potentially be used for the track time calculation
264
265// if ( !(state->trackParameters()) ) continue;
266 }
267
268 if (nTRTdriftCircles) GlobalPositionSum /= (double) nTRTdriftCircles;
269 position = GlobalPositionSum;
270
271 return;
272}
virtual const Amg::Vector3D & globalPosition() const override final
return the global position of this RIO_OnTrack

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_caldbtool

ToolHandle<ITRT_CalDbTool> InDet::TRT_TrackTimingTool::m_caldbtool
private

TRT Calibration DB tool.

Definition at line 75 of file TRT_TrackTimingTool.h.

◆ m_debug

bool InDet::TRT_TrackTimingTool::m_debug
private

Definition at line 78 of file TRT_TrackTimingTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_doEtaCorrection

bool InDet::TRT_TrackTimingTool::m_doEtaCorrection
private

Definition at line 77 of file TRT_TrackTimingTool.h.

◆ m_EventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> InDet::TRT_TrackTimingTool::m_EventInfoKey
private

Current event.

Definition at line 79 of file TRT_TrackTimingTool.h.

◆ m_eventPhaseTool

ToolHandle<InDet::IInDetCosmicsEventPhaseTool> InDet::TRT_TrackTimingTool::m_eventPhaseTool
private

Definition at line 73 of file TRT_TrackTimingTool.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_ITrackFitter

ToolHandle<Trk::ITrackFitter> InDet::TRT_TrackTimingTool::m_ITrackFitter
private

tools - this is the tool that actually does the work

Definition at line 72 of file TRT_TrackTimingTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: