ATLAS Offline Software
Loading...
Searching...
No Matches
TRT_DriftCircleOnTrackNoDriftTimeTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// Implementation file for class TRT_DriftCircleOnTrackNoDriftTimeTool
8// (c) ATLAS Detector software
10// AlgTool used for TRT_DriftCircleOnTrack object production
12// Version 1.0 21/04/2004 I.Gavrilenko
14
17
18
19
21// Constructor
23
25(const std::string& ty,const std::string& na,const IInterface* pa)
26 : AthAlgTool(ty,na,pa)
27{
28 declareInterface<IRIO_OnTrackCreator>(this);
29}
30
32// Destructor
34
36
38// Initialisation
40
42{
43 StatusCode sc = AlgTool::initialize(); return sc;
44}
45
47// Finalize
49
51{
52 StatusCode sc = AlgTool::finalize(); return sc;
53}
54
56// Trk::TRT_DriftCircleOnTrack production
58
60(const Trk::PrepRawData& rio,const Trk::TrackParameters& TP, const EventContext& /*ctx*/) const
61{
62 const InDet::TRT_DriftCircle* DC = dynamic_cast<const InDet::TRT_DriftCircle*>(&rio);
63 if(!DC) return nullptr;
64
65 // Straw identification
66 //
67 const InDetDD::TRT_BaseElement* pE = DC->detectorElement(); if(!pE) return nullptr;
68
69 // Identifier iD = DC->identify();
70 // IdentifierHash iH = trt_id->straw_layer_hash(trt_id->layer_id(iD));
72
73
74 // Global direction of the track parameters
75 //
76 const Amg::VectorX& P = TP.parameters();
77 double se = sin(P[3]);
78 Amg::Vector3D dir(cos(P[2])*se,sin(P[2])*se,cos(P[3]));
79
80 double predictedLocZ=P[1];
81
82
83 // only create objects within the active area
84 //
85 double sl = pE->strawLength()*.5;
86
87 if (predictedLocZ > sl) predictedLocZ = sl;
88 else if(predictedLocZ <-sl) predictedLocZ =-sl;
89
90 // TRT_DriftCircleOnTrack production
91 //
93 Trk::LocalParameters lp(radius);
94 Amg::MatrixX cov(1,1);
95 cov(0,0)=1.33333;
96 return new InDet::TRT_DriftCircleOnTrack(DC, std::move(lp), std::move(cov),
97 iH, predictedLocZ, dir,
99}
100
static Double_t P(Double_t *tt, Double_t *par)
static Double_t sc
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
This is a "hash" representation of an Identifier.
Virtual base class of TRT readout elements.
virtual const double & strawLength() const =0
Active straw length.
virtual IdentifierHash identifyHash() const override final
identifier hash
virtual InDet::TRT_DriftCircleOnTrack * correct(const Trk::PrepRawData &, const Trk::TrackParameters &, const EventContext &) const override
abstract base method for the creation of RIO_OnTrack it takes a RIO (PrepRawData) and the given Track...
TRT_DriftCircleOnTrackNoDriftTimeTool(const std::string &, const std::string &, const IInterface *)
Represents 'corrected' measurements from the TRT (for example, corrected for wire sag).
virtual const InDetDD::TRT_BaseElement * detectorElement() const override final
return the detector element corresponding to this PRD
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 3, 1 > Vector3D
Eigen::Matrix< double, Eigen::Dynamic, 1 > VectorX
Dynamic Vector - dynamic allocation.
@ NODRIFTTIME
drift time was not used - drift radius is 0.
@ locX
Definition ParamDefs.h:37
std::pair< double, ParamDefs > DefinedParameter
Typedef to of a std::pair<double, ParamDefs> to identify a passed-through double as a specific type o...
ParametersBase< TrackParametersDim, Charged > TrackParameters