Skip to content
Snippets Groups Projects
Commit 352cad29 authored by Andreas Salzburger's avatar Andreas Salzburger Committed by Graeme Stewart
Browse files

update to Amg (TrkMeasurementBase-02-00-00)

parent 25016408
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
///////////////////////////////////////////////////////////////////
// MeasurementBase.h, (c) ATLAS Detector software
///////////////////////////////////////////////////////////////////
#ifndef TRKMEASUREMENTBASE_MEASUREMENTBASE_H
#define TRKMEASUREMENTBASE_MEASUREMENTBASE_H
//Amg
#include "EventPrimitives/EventPrimitives.h"
#include "GeoPrimitives/GeoPrimitives.h"
//Trk
#include "TrkEventPrimitives/LocalParameters.h"
#include "GaudiKernel/MsgStream.h"
// I/O
#include <iostream>
class MsgStream;
namespace Trk {
class LocalParameters;
class ErrorMatrix;
class Surface;
/**@class MeasurementBase
This class is the pure abstract base class for all fittable tracking measurements.
It holds the minimal information, such as LocalParameters, ErrorMatrix,
a Surface and a GlobalPosition.
The associatedSurface and the globalPosition are returned by pointers,
as they may be undefined (NULL pointer)
@author Andreas.Salzburger@cern.ch
*/
class MeasurementBase {
public:
/** Default constructor - needed for POOL/SEAL */
MeasurementBase(){}
/** constructor */
MeasurementBase( const LocalParameters& pars, const Amg::MatrixX& cov ) :
m_localParams(pars),
m_localCovariance(cov)
{}
/** Virtual destructor */
virtual ~MeasurementBase(){}
/**Pseudo-Constructor */
virtual MeasurementBase* clone() const = 0;
/**Interface method to get the LocalParameters*/
const LocalParameters& localParameters() const;
/**Interface method to get the localError*/
const Amg::MatrixX& localCovariance() const;
/**Interface method to get the associated Surface*/
virtual const Surface& associatedSurface() const = 0;
/**Interface method to get the global Position*/
virtual const Amg::Vector3D& globalPosition() const = 0;
/**Interface method for output, to be overloaded by child classes* */
virtual MsgStream& dump( MsgStream& out ) const = 0;
/**Interface method for output, to be overloaded by child classes* */
virtual std::ostream& dump( std::ostream& out ) const = 0;
protected:
LocalParameters m_localParams;
Amg::MatrixX m_localCovariance;
};
/**Overload of << operator for MsgStream for debug output*/
inline MsgStream& operator << ( MsgStream& sl, const Trk::MeasurementBase& mbase)
{ return mbase.dump(sl); }
/**Overload of << operator for std::ostream for debug output*/
inline std::ostream& operator << ( std::ostream& sl, const Trk::MeasurementBase& mbase)
{ return mbase.dump(sl); }
}
inline const Trk::LocalParameters& Trk::MeasurementBase::localParameters() const {
return m_localParams;
}
inline const Amg::MatrixX& Trk::MeasurementBase::localCovariance() const {
return m_localCovariance;
}
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TRKMEASUREMENTBASEDICT_H
#define TRKMEASUREMENTBASEDICT_H
#include "TrkMeasurementBase/MeasurementBase.h"
#include "DataModel/DataVector.h"
// We need to instantiate some templates here to be able to create the
// dictionary for them
//namespace Trk {
// class TrkMeasurementBaseDict_Dummy
// {
// DataVector<const MeasurementBase> m_measurementVector;
// };
//}
#endif
<lcgdict>
<class name="Trk::MeasurementBase" >
<field name="m_localParams" transient="false" />
<field name="m_localErrMat" transient="false" />
</class>
<class name="DataVector<const Trk::MeasurementBase>" />
<class name="std::vector<const Trk::MeasurementBase*>" />
</lcgdict>
package TrkMeasurementBase
author <Andreas.Salzburger@cern.ch>
use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use EventPrimitives EventPrimitives-* Event
use GeoPrimitives GeoPrimitives-* DetectorDescription
use TrkEventPrimitives TrkEventPrimitives-* Tracking/TrkEvent
use DataModel DataModel-* Control
private
use AtlasReflex AtlasReflex-* External -no_auto_imports
# Pattern to build the dict lib. User should create a single header
# file: <package>Dict.h which includes all other .h files. See MissingETDict
# A selection file must be created by hand. This file lists the
# classes to be added to the dictionary, and which fields are
# transient. It should be put in ../<package> dir and is conventionally called
# selection.xml.
# apply_pattern lcgdict dict=TrkMeasurementBase selectionfile=selection.xml headerfiles="../TrkMeasurementBase/TrkMeasurementBaseDict.h"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@mainpage The MeasurementBase class
@section introductionTrkMeasurementBase Introduction
This package includes the pure absract base class Trk::MeasurementBase
for all fittable measurements in the Tracking realm.
It holds the minimal common interface which is characterized by
- Trk::LocalParameters*
- Trk::ErrorMatrix*
- Trk::Surface*
- Trk::GlobalPosition*
The following child branches are (planned) to inherit from this one (only base classes are given here):
- Trk::RIO_OnTrack, calibrated measurement on track
- Trk::Segment, track segment class with calibrated measurements on track
- Trk::CompetingRIO_OnTrack, data structure for DAF with multiple competing RIO_OnTracks
- Trk::SpacePoint, 3D space points to allow fitting on HLT level (planned)
Please let me know of any errors, or if anything is unclear.
@author Andreas.Salzburger@cern.ch
@section requirementsTrkMeasurementBase Requirements
@include requirements
@namespace Trk
A namespace to enclose the Tracking classes.
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment