|
ATLAS Offline Software
|
#include <MuonTrackToSegmentTool.h>
|
| MuonTrackToSegmentTool (const std::string &, const std::string &, const IInterface *) |
| default AlgTool constructor More...
|
|
| ~MuonTrackToSegmentTool ()=default |
| destructor More...
|
|
StatusCode | initialize () |
| initialize method, method taken from bass-class AlgTool More...
|
|
MuonSegment * | convert (const EventContext &ctx, const Trk::Track &track) const |
| convert track to segment 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 |
|
Tool to combine two segments. It appoximates the combined segment by a straight line. The tool assumes that this is a valid assumption.
For more details look at the mainpage of this package.
Definition at line 40 of file MuonTrackToSegmentTool.h.
◆ MeasVec
◆ StoreGateSvc_t
◆ MuonTrackToSegmentTool()
Muon::MuonTrackToSegmentTool::MuonTrackToSegmentTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonTrackToSegmentTool()
Muon::MuonTrackToSegmentTool::~MuonTrackToSegmentTool |
( |
| ) |
|
|
default |
◆ calculateHoles()
calculate holes
Definition at line 210 of file MuonTrackToSegmentTool.cxx.
214 if (!InterSectSvc.isValid()) {
215 ATH_MSG_ERROR(
"Failed to retrieve chamber intersection service");
218 const MuonStationIntersect
intersect = InterSectSvc->tubesCrossedByTrack(chid,
pars.position(),
pars.momentum().unit());
222 std::set<Identifier> hitsOnSegment;
224 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(mit);
225 if (mdt) hitsOnSegment.insert(mdt->identify());
229 std::vector<Identifier>
holes;
230 for (
unsigned int ii = 0; ii <
intersect.tubeIntersects().size(); ++ii) {
231 const MuonTubeIntersect& tint =
intersect.tubeIntersects()[ii];
234 if (hitsOnSegment.count(tint.tubeId))
continue;
238 holes.push_back(tint.tubeId);
◆ convert()
convert track to segment
convert track to segment, express the new segment parameters on the surface of the first segment
Implements Muon::IMuonTrackToSegmentTool.
Definition at line 36 of file MuonTrackToSegmentTool.cxx.
55 std::set<Identifier> chIds;
72 std::unique_ptr<Amg::Transform3D> surfaceTransformToBeDeleted;
73 double weightedDistanceSquared{0}, weightSquared{0};
82 rots.push_back(meas->
clone());
86 if (!
id.is_valid() ||
m_idHelperSvc->measuresPhi(
id))
continue;
96 if (!surfaceTransform) {
97 const MdtDriftCircleOnTrack* mdt =
dynamic_cast<const MdtDriftCircleOnTrack*
>(meas);
100 surfaceTransformToBeDeleted = std::make_unique<Amg::Transform3D>(mdt->detectorElement()->AmdbLRSToGlobalTransform().rotation());
101 surfaceTransformToBeDeleted->pretranslate(mdt->detectorElement()->center());
102 surfaceTransform = surfaceTransformToBeDeleted.get();
106 surfaceTransform = &(meas)->associatedSurface().transform();
107 }
else if (!surfaceTransform && !backupTransform) {
108 backupTransform = &(meas)->associatedSurface().transform();
111 if (!surfaceTransform) surfaceTransform = backupTransform;
113 double refDistance = (weightSquared > 0 ? weightedDistanceSquared / weightSquared : 1) - 100;
119 double minDist = -1e6;
124 if (!
pars || !
pars->covariance())
continue;
134 if (!surfaceTransform) {
135 ATH_MSG_DEBUG(
" failed to create a PlaneSurface for the track, cannot make segment!!! " << std::endl
143 closestPars = perigee;
144 minDist = (perigee->position() - refPos).
dot(
dir);
149 constexpr
double surfDim = 500.;
150 std::unique_ptr<Trk::PlaneSurface> surf = std::make_unique<Trk::PlaneSurface>(
transform, surfDim, surfDim);
153 if (!exPars || !exPars->covariance()) {
154 ATH_MSG_VERBOSE(
"First trial reaching the surface failed. This is presumably due to a too large momentum. Let's try with a dummy 1 GeV momentum");
155 std::unique_ptr<Trk::TrackParameters> cloned_pars {closestPars->
clone()};
157 cloned_pars->parameters()[
Trk::qOverP] = cloned_pars->charge() *OneOverGeV;
162 ATH_MSG_DEBUG(
" propagation failed!!! "<<*cloned_pars<<std::endl<<std::endl<<*surf);
184 globalToLocalMeasJacobian(
Trk::phi,
Trk::phi) = globalToLocalMeasAnglesJacobian(0, 0);
186 globalToLocalMeasJacobian(
Trk::theta,
Trk::phi) = globalToLocalMeasAnglesJacobian(0, 1);
193 if (!chIds.empty()) {
195 std::vector<Identifier>
holes;
197 std::vector<Identifier> holesChamber =
calculateHoles(ctx, chid, *exPars, rots.stdcont());
198 holes.insert(
holes.end(), holesChamber.begin(), holesChamber.end());
206 locPos,
locDir,
cov, surf.release(), std::move(rots), quality);
◆ 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()
◆ 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
◆ initialize()
StatusCode Muon::MuonTrackToSegmentTool::initialize |
( |
| ) |
|
initialize method, method taken from bass-class AlgTool
Definition at line 27 of file MuonTrackToSegmentTool.cxx.
33 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 & Muon::IMuonTrackToSegmentTool::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.
◆ updateVHKA()
◆ m_chamberGeoKey
◆ m_detStore
◆ m_edmHelperSvc
Initial value:{
this, "edmHelper", "Muon::MuonEDMHelperSvc/MuonEDMHelperSvc",
"Handle to the service providing the IMuonEDMHelperSvc interface"}
Definition at line 63 of file MuonTrackToSegmentTool.h.
◆ m_evtStore
◆ m_idHelperSvc
◆ m_printer
Initial value:{this, "EDMPrinter", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
"helper to nicely print out tracks"}
Definition at line 67 of file MuonTrackToSegmentTool.h.
◆ m_propagator
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
void reserve(size_type n)
Attempt to preallocate enough memory for a specified number of elements.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const override final
Specified for PlaneSurface: GlobalToLocal method without dynamic memory allocation - boolean checks i...
#define CXXUTILS_TRAPPING_FP
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
double innerTubeRadius() const
Returns the inner tube radius excluding the aluminium walls.
const Amg::Vector3D & position() const
Access method for the position.
Eigen::Matrix< double, 2, 1 > Vector2D
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
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
#define ATH_MSG_VERBOSE(x)
MuonSegment_v1 MuonSegment
Reference the current persistent version:
#define AmgSymMatrix(dim)
Matrix< Scalar, OtherDerived::RowsAtCompileTime, OtherDerived::RowsAtCompileTime > similarity(const MatrixBase< OtherDerived > &m) const
similarity method : yields ms = m*s*m^T
virtual void setOwner(IDataHandleHolder *o)=0
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
const MdtReadoutElement * getMdtReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
void globalToLocalDirection(const Amg::Vector3D &glodir, Trk::LocalDirection &locdir) const
This method transforms the global direction to a local direction wrt the plane.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
represents the three-dimensional global direction with respect to a planar surface frame.
def dot(G, fn, nodesToHighlight=[])
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
@ NoField
Field is set to 0., 0., 0.,.
Ensure that the ATLAS eigen extensions are properly loaded.
represents the track state (measurement, material, fit parameters and quality) at a surface.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
StatusCode initialize(bool used=true)
Eigen::Matrix< double, 3, 1 > Vector3D
const Amg::Vector3D & momentum() const
Access method for the momentum.
std::optional< double > intersect(const AmgVector(N)&posA, const AmgVector(N)&dirA, const AmgVector(N)&posB, const AmgVector(N)&dirB)
Calculates the point of closest approach of two lines.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double chiSquared() const
returns the of the overall track fit
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy