|
ATLAS Offline Software
|
#include <TRT_TrackTimingTool.h>
|
| TRT_TrackTimingTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~TRT_TrackTimingTool () |
| default destructor More...
|
|
virtual StatusCode | initialize () |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | finalize () |
| standard Athena-Algorithm method More...
|
|
virtual std::vector< Trk::SpaceTimePoint * > | timeMeasurements (const Trk::Track &trk, const Trk::SegmentCollection *sgmColl=0) const |
| returns time measurements for a given track. More...
|
|
virtual std::vector< Trk::SpaceTimePoint * > | timeMeasurements (const Trk::TrackParticleBase &trk) const |
| returns time measurements for a given track particle (base). More...
|
|
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. More...
|
|
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 More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
float | etaCorrection (const Trk::Track &track) const |
| eta-dependent corrections, called if m_doEtaCorrection == true More...
|
|
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 More...
|
|
void | debugMissingMeasurements (const Trk::Track &trk) const |
| private debugging function for commissioning phase More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Definition at line 49 of file TRT_TrackTimingTool.h.
◆ StoreGateSvc_t
◆ 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.
27 declareInterface<ITRT_TrackTimingTool>(
this);
28 declareInterface<Trk::ITrackTimingTool>(
this);
◆ ~TRT_TrackTimingTool()
InDet::TRT_TrackTimingTool::~TRT_TrackTimingTool |
( |
| ) |
|
|
virtual |
◆ 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.
277 int checkNTRThits(0), missingMeasurement(0), noTRT_DriftCircle(0), missingPrepRawData(0), invalidHits(0),
283 missingMeasurement++;
295 missingPrepRawData++;
311 "debugMissingMeasurements: TRT hit " << checkNTRThits <<
", raw drift time: " << rawhit->
rawDriftTime() <<
" ns, track R: " <<
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: " <<
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ 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.
218 const float correctionLargeEta = -0.31;
223 ATH_MSG_WARNING(
"missing perigee parameters, can not make eta correction");
227 double eta = trackPar->eta();
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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 |
◆ 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.
185 if (!trtcirc)
continue;
188 if (!tparp)
continue;
191 if (std::abs(driftR) < 0.000001)
continue;
192 if (std::abs(driftR) > 2.)
continue;
198 if (not rtRelation) {
202 float driftT = rtRelation->drifttime(std::abs(driftR));
203 float trackT = rtRelation->drifttime(std::abs(trackR));
206 time += driftT - trackT;
◆ initialize()
StatusCode InDet::TRT_TrackTimingTool::initialize |
( |
| ) |
|
|
virtual |
standard Athena-Algorithm method
Definition at line 46 of file TRT_TrackTimingTool.cxx.
49 if (
sc.isFailure())
return sc;
54 return StatusCode::FAILURE;
60 ATH_MSG_INFO(
"InDet::TRT_TrackTimingTool::initialize() successful in " <<
name() <<
", do eta correction: " <<
62 return StatusCode::SUCCESS;
◆ inputHandles()
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 |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
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]
returns time measurements for a given track.
Implementations in the Calo, ID and Muon spectrometer in dedicated tools
- Parameters
-
- Returns
- vector of time measurement pointers
Implements Trk::ITrackTimingTool.
Definition at line 73 of file TRT_TrackTimingTool.cxx.
76 if (sgmColl !=
nullptr) {
77 ATH_MSG_INFO(
"TRT_TrackTimingTool::timeMeasurements called with SegmentCollection != 0");
80 std::vector<Trk::SpaceTimePoint*> timeMeasurementsVector;
93 int nTRTdriftCircles(0), nMissingRDOs(0), nMissingTrackParameters(0), nUsedHits(0);
94 trackInformation(
track, position, nTRTdriftCircles, nMissingRDOs, nMissingTrackParameters, nUsedHits);
97 "trackInformation: " << nTRTdriftCircles <<
", " << nMissingRDOs <<
", " << nMissingTrackParameters <<
" slimmed? " <<
100 if (!nTRTdriftCircles)
return timeMeasurementsVector;
103 if (nMissingTrackParameters) {
107 if (newtrack ==
nullptr) {
108 ATH_MSG_INFO(
"fit to unslim track has failed, giving up.");
109 return timeMeasurementsVector;
113 const Trk::Track* track_ptr = (newtrack !=
nullptr) ? newtrack : &
track;
116 ATH_MSG_DEBUG(
"timeMeasurements(): diagnosed that track has all information already.");
133 float weight = (
time == 0.) ? 0. : 0.02 * nUsedHits;
135 ATH_MSG_DEBUG(
"TRT_TrackTimingTool::timeMeasurements: TRT track with " << nTRTdriftCircles <<
" hits, track time = "
136 <<
time <<
" ns, position: " << position <<
", error: " <<
error <<
", weight: " <<
weight <<
142 timeMeasurementsVector.push_back(timeMeasurement);
144 ATH_MSG_INFO(
"TRT_TrackTimingTool::timeMeasurement not available");
149 if (newtrack)
delete newtrack;
151 return timeMeasurementsVector;
◆ timeMeasurements() [2/3]
returns time measurements for a given track particle (base).
Implementations in the Calo, ID and Muon spectrometer in dedicated tools
- Parameters
-
trackParticle | input track particle base |
- Returns
- vector of time measurement pointers
Implements Trk::ITrackTimingTool.
Definition at line 157 of file TRT_TrackTimingTool.cxx.
159 if (tpb.originalTrack() ==
nullptr) {
160 std::vector<Trk::SpaceTimePoint*>
v;
◆ timeMeasurements() [3/3]
return time measurements for a vector of segments - mainly aimed at MS and tagged segments.
Not all detectors will implement this interface !
- Parameters
-
segments | input vector of segments |
- Returns
- vector of time measurment pointers
Implements Trk::ITrackTimingTool.
Definition at line 167 of file TRT_TrackTimingTool.cxx.
169 std::vector<Trk::SpaceTimePoint*>
v;
◆ 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.
249 if (!trtcirc)
continue;
255 if (!state->trackParameters()) nMissingTrackParameters++;
268 if (nTRTdriftCircles) GlobalPositionSum /= (
double) nTRTdriftCircles;
269 position = GlobalPositionSum;
◆ updateVHKA()
◆ m_caldbtool
◆ m_debug
bool InDet::TRT_TrackTimingTool::m_debug |
|
private |
◆ m_detStore
◆ m_doEtaCorrection
bool InDet::TRT_TrackTimingTool::m_doEtaCorrection |
|
private |
◆ m_EventInfoKey
◆ m_eventPhaseTool
◆ m_evtStore
◆ m_ITrackFitter
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
virtual const TRT_DriftCircle * prepRawData() const override final
returns the PrepRawData - is a TRT_DriftCircle in this scope
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool const RAWDATA *ch2 const
virtual void setOwner(IDataHandleHolder *o)=0
@ SlimmedTrack
A slimmed track.
::StatusCode StatusCode
StatusCode definition for legacy code.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
represents the track state (measurement, material, fit parameters and quality) at a surface.
Eigen::Matrix< double, 3, 1 > Vector3D
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
bool driftTimeValid() const
return true if the corrected drift time is OK
double rawDriftTime() const
returns the raw driftTime
virtual const Amg::Vector3D & globalPosition() const override final
return the global position of this RIO_OnTrack
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
bool firstBinHigh() const
returns true if the first bin is high
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.