|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   24         declareInterface<IMuonTrackToSegmentTool>(
this);
 
   34         return StatusCode::SUCCESS;
 
   56         std::set<Identifier> chIds;
 
   73         std::unique_ptr<Amg::Transform3D> surfaceTransformToBeDeleted;
 
   74         double weightedDistanceSquared{0}, weightSquared{0};
 
   83             rots.push_back(meas->
clone());
 
   87             if (!
id.is_valid() || 
m_idHelperSvc->measuresPhi(
id)) 
continue;
 
   97                 if (!surfaceTransform) {
 
  103                         surfaceTransform = surfaceTransformToBeDeleted.get();                       
 
  107                 surfaceTransform = &(meas)->associatedSurface().transform();
 
  108             } 
else if (!surfaceTransform && !backupTransform) {
 
  109                 backupTransform = &(meas)->associatedSurface().transform();
 
  112         if (!surfaceTransform) surfaceTransform = backupTransform;
 
  114         double refDistance = (weightSquared > 0 ? weightedDistanceSquared / weightSquared : 1) - 100;
 
  120         double minDist = -1e6;
 
  125             if (!
pars || !
pars->covariance()) 
continue;
 
  135         if (!surfaceTransform) {
 
  136             ATH_MSG_DEBUG(
" failed to create a PlaneSurface for the track, cannot make segment!!! " << std::endl
 
  144             closestPars = perigee;
 
  145             minDist = (perigee->position() - refPos).
dot(
dir);
 
  150         constexpr 
double surfDim = 500.;
 
  151         std::unique_ptr<Trk::PlaneSurface> surf = std::make_unique<Trk::PlaneSurface>(
transform, surfDim, surfDim);
 
  154         if (!exPars || !exPars->covariance()) {
 
  155             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");
 
  156             std::unique_ptr<Trk::TrackParameters> cloned_pars {closestPars->
clone()};
 
  158             cloned_pars->parameters()[
Trk::qOverP] = cloned_pars->charge() *OneOverGeV;
 
  163                 ATH_MSG_DEBUG(
" propagation failed!!! "<<*cloned_pars<<std::endl<<std::endl<<*surf);
 
  185         globalToLocalMeasJacobian(
Trk::phi, 
Trk::phi) = globalToLocalMeasAnglesJacobian(0, 0);
 
  187         globalToLocalMeasJacobian(
Trk::theta, 
Trk::phi) = globalToLocalMeasAnglesJacobian(0, 1);  
 
  191         AmgSymMatrix(5) 
cov = exPars->covariance()->similarity(globalToLocalMeasJacobian);
 
  194         if (!chIds.empty()) {
 
  196             std::vector<Identifier> 
holes;
 
  198                 std::vector<Identifier> holesChamber = 
calculateHoles(ctx, chid, *exPars, rots.stdcont());
 
  199                 holes.insert(
holes.end(), holesChamber.begin(), holesChamber.end());
 
  215         if (!InterSectSvc.isValid())   {
 
  216             ATH_MSG_ERROR(
"Failed to retrieve chamber intersection service");                            
 
  225         std::set<Identifier> hitsOnSegment;
 
  228             if (mdt) hitsOnSegment.insert(mdt->
identify());
 
  232         std::vector<Identifier> 
holes;
 
  233         for (
unsigned int ii = 0; ii < 
intersect.tubeIntersects().size(); ++ii) {
 
  237             if (hitsOnSegment.count(tint.
tubeId)) 
continue;
 
  
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...
virtual Amg::Transform3D AmdbLRSToGlobalTransform() const
virtual MeasurementBase * clone() const =0
Pseudo-Constructor.
virtual const Amg::Vector3D & center(const Identifier &) const override final
Return the center of the surface associated with this identifier In the case of silicon it returns th...
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.
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
virtual const MuonGM::MdtReadoutElement * detectorElement() const override final
Returns the detector element, assoicated with the PRD of this class.
#define ATH_MSG_VERBOSE(x)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
#define AmgSymMatrix(dim)
@ 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)
::StatusCode StatusCode
StatusCode definition for legacy code.
Eigen::Affine3d Transform3D
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
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...
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.
Tell the compiler to optimize assuming that FP may trap.
@ NoField
Field is set to 0., 0., 0.,.
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 ...
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
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 B' along the line B that's closest to a second line A.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
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.
virtual ParametersBase< DIM, T > * clone() const override=0
clone method for polymorphic deep copy