|
ATLAS Offline Software
|
Algorithm using an instance of a ITrackFitter to refit the tracks of a given track collection.
More...
#include <ReFitTrack.h>
|
| ReFitTrack (const std::string &name, ISvcLocator *pSvcLocator) |
| standard Algorithm constructor More...
|
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. 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 | 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 |
|
|
SG::ReadHandleKey< TrackCollection > | m_trackName |
|
SG::WriteHandleKey< TrackCollection > | m_newTrackName |
|
Trk::RunOutlierRemoval | m_runOutlier |
| switch whether to run outlier logics or not More...
|
|
int | m_matEffects |
| type of material interaction in extrapolation More...
|
|
Trk::ParticleHypothesis | m_ParticleHypothesis |
| nomen est omen More...
|
|
const TrackCollection * | m_tracks |
| job option for main track collection More...
|
|
ToolHandle< Trk::ITrackFitter > | m_ITrackFitter |
| the refit tool More...
|
|
ToolHandle< Trk::ITrackFitter > | m_ITrackFitterTRT |
| the TRT refit tool More...
|
|
ToolHandle< Trk::IExtendedTrackSummaryTool > | m_trkSummaryTool |
| the track summary tool More...
|
|
ToolHandle< Trk::IPRDtoTrackMapTool > | m_assoTool {this, "AssociationTool", "" } |
| Tool to create and populate PRD to track association maps e.g. More...
|
|
ToolHandle< Trk::ITrackSelectorTool > | m_trkSelectorTool |
| the track selector tool More...
|
|
unsigned int | m_constrainFitMode |
| 0 - not constrained, 1 - vertex, 2 - beamspot More...
|
|
SG::ReadHandleKey< VxContainer > | m_vxContainerName |
|
SG::ReadCondHandleKey< InDet::BeamSpotData > | m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" } |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"} |
|
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > | m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"} |
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator |
| the extrapolator for the consistent measurement frame More...
|
|
bool | m_usetrackhypo |
| Fit using particle hypothesis from input track
More...
|
|
DataObjIDColl | m_extendedExtraObjects |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Algorithm using an instance of a ITrackFitter to refit the tracks of a given track collection.
Constraint fits are available:
- Option 1 : fit the track with the vertex (first vertex is taken)
- Option 2 : fit the track with the beamspot
- Author
- Maria.nosp@m..Jos.nosp@m.e.Cos.nosp@m.ta@c.nosp@m.ern.c.nosp@m.h, Andre.nosp@m.as.S.nosp@m.alzbu.nosp@m.rger.nosp@m.@cern.nosp@m..ch
Definition at line 45 of file ReFitTrack.h.
◆ StoreGateSvc_t
◆ Track
◆ ReFitTrack() [1/3]
Trk::ReFitTrack::ReFitTrack |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ReFitTrack() [2/3]
Trk::ReFitTrack::ReFitTrack |
( |
| ) |
|
|
private |
◆ ReFitTrack() [3/3]
◆ 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]
◆ execute()
StatusCode Trk::ReFitTrack::execute |
( |
| ) |
|
|
virtual |
<
- Todo:
- : include sorting of outliers
Definition at line 136 of file ReFitTrack.cxx.
139 std::unique_ptr<Trk::PRDtoTrackMap> prd_to_track_map(
m_assoTool->createPRDtoTrackMap());
140 const EventContext& ctx = Gaudi::Hive::currentContext();
143 if (!tracks.isValid()){
145 <<
" not found, exit ReFitTrack." <<
endmsg;
146 return StatusCode::SUCCESS;
154 std::unique_ptr<const Trk::PerigeeSurface> constrainSf;
155 std::unique_ptr<const Trk::RecVertex> constrainVx;
163 constrainSf = std::make_unique<Trk::PerigeeSurface>( constrainVx->
position());
170 std::vector<std::unique_ptr<Trk::Track> > new_tracks;
178 std::unique_ptr<Trk::Track> newtrack;
181 bool passedSelection =
true;
191 unsigned int n_trt_hits;
192 if ((*itr)->trackSummary()) {
199 if ( (**itr).measurementsOnTrack()->size() - n_trt_hits<3 )
203 if (passedSelection) {
206 const Trk::Perigee* origPerigee = (*itr)->perigeeParameters();
208 double od0 = origPerigee->parameters()[
Trk::d0];
209 double oz0 = origPerigee->parameters()[
Trk::z0];
210 double ophi0 = origPerigee->parameters()[
Trk::phi0];
211 double otheta = origPerigee->parameters()[
Trk::theta];
212 double oqOverP = origPerigee->parameters()[
Trk::qOverP];
213 ATH_MSG_DEBUG (
"Original parameters " << od0 <<
" " << oz0 <<
" " << ophi0 <<
" " << otheta <<
" " << oqOverP);
217 if (constrainVx && origPerigee){
221 std::unique_ptr<const Trk::TrackParameters>
tp(
m_extrapolator->extrapolateTrack(ctx,
227 std::unique_ptr<Trk::VertexOnTrack> bsvxOnTrack( tpConstrainedSf ?
new Trk::VertexOnTrack(*constrainVx,*tpConstrainedSf) :
nullptr );
228 std::vector<const MeasurementBase*>
vec;
229 if (tpConstrainedSf)
vec.push_back(bsvxOnTrack.get() );
237 for ( ; measIter != measIterEnd; ++measIter)
238 vec.push_back((*measIter));
247 ->
fit(Gaudi::Hive::currentContext(),
267 if (aMeasPer==
nullptr){
268 msg(MSG::ERROR) <<
"Could not get Trk::MeasuredPerigee" <<
endmsg;
271 double d0 = aMeasPer->parameters()[
Trk::d0];
272 double z0 = aMeasPer->parameters()[
Trk::z0];
281 new_tracks.push_back(std::move(newtrack));
289 for(
const std::unique_ptr<Trk::Track> &new_track : new_tracks ) {
295 std::unique_ptr<TrackCollection> new_track_collection = std::make_unique<TrackCollection>();
296 new_track_collection->
reserve(new_tracks.size());
297 for(std::unique_ptr<Trk::Track> &new_track : new_tracks ) {
299 new_track_collection->
push_back(std::move(new_track));
305 return StatusCode::SUCCESS;
◆ 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode Trk::ReFitTrack::finalize |
( |
| ) |
|
|
virtual |
Definition at line 309 of file ReFitTrack.cxx.
311 msg(MSG::INFO) <<
"ReFitTrack::finalize()" <<
endmsg;
312 return StatusCode::SUCCESS;
◆ initialize()
StatusCode Trk::ReFitTrack::initialize |
( |
| ) |
|
|
virtual |
Definition at line 74 of file ReFitTrack.cxx.
80 return StatusCode::FAILURE;
87 return StatusCode::FAILURE;
95 return StatusCode::FAILURE;
101 return StatusCode::FAILURE;
107 return StatusCode::FAILURE;
120 return StatusCode::FAILURE;
132 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.
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ operator=()
◆ 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()
◆ setupConstrainedFit()
Definition at line 315 of file ReFitTrack.cxx.
324 ATH_MSG_DEBUG(
"Track fit with BeamSpot constraint (x/y/z) = "
325 << constrainVx->
position().x() <<
", "
326 << constrainVx->
position().y() <<
", "
332 if (!vxContainer.isValid())
334 else if (vxContainer->size() == 1 ) {
338 constrainVx =
new Trk::RecVertex( (*vxContainer)[0]->recVertex() );
340 << constrainVx->
position().x() <<
", "
341 << constrainVx->
position().y() <<
", "
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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_assoTool
◆ m_beamSpotKey
◆ m_constrainFitMode
unsigned int Trk::ReFitTrack::m_constrainFitMode |
|
private |
0 - not constrained, 1 - vertex, 2 - beamspot
Definition at line 87 of file ReFitTrack.h.
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_extrapolator
the extrapolator for the consistent measurement frame
Definition at line 93 of file ReFitTrack.h.
◆ m_ITrackFitter
◆ m_ITrackFitterTRT
◆ m_matEffects
int Trk::ReFitTrack::m_matEffects |
|
private |
type of material interaction in extrapolation
Definition at line 72 of file ReFitTrack.h.
◆ m_newTrackName
◆ m_ParticleHypothesis
◆ m_pixelDetEleCollKey
◆ m_runOutlier
switch whether to run outlier logics or not
Definition at line 71 of file ReFitTrack.h.
◆ m_SCTDetEleCollKey
◆ m_trackName
◆ m_tracks
job option for main track collection
Definition at line 77 of file ReFitTrack.h.
◆ m_trkSelectorTool
◆ m_trkSummaryTool
◆ m_usetrackhypo
bool Trk::ReFitTrack::m_usetrackhypo |
|
private |
Fit using particle hypothesis from input track
Definition at line 95 of file ReFitTrack.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_vxContainerName
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.
Trk::RunOutlierRemoval m_runOutlier
switch whether to run outlier logics or not
ToolHandle< Trk::IExtrapolator > m_extrapolator
the extrapolator for the consistent measurement frame
Const iterator class for DataVector/DataList.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
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
ToolHandle< Trk::IPRDtoTrackMapTool > m_assoTool
Tool to create and populate PRD to track association maps e.g.
bool msgLvl(const MSG::Level lvl) const
std::vector< size_t > vec
const Trk::RecVertex * setupConstrainedFit()
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
SG::ReadHandleKey< VxContainer > m_vxContainerName
Trk::RecVertex inherits from Trk::Vertex.
virtual void setOwner(IDataHandleHolder *o)=0
Trk::ParticleHypothesis m_ParticleHypothesis
nomen est omen
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
ToolHandle< Trk::ITrackFitter > m_ITrackFitterTRT
the TRT refit tool
ToolHandle< Trk::ITrackFitter > m_ITrackFitter
the refit tool
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
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.
const Amg::Vector3D & position() const
return position of vertex
int m_matEffects
type of material interaction in extrapolation
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
SG::WriteHandleKey< TrackCollection > m_newTrackName
const Perigee * perigeeParameters() const
return Perigee.
@ numberOfTRTHits
number of TRT outliers
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
the track summary tool
const TrackCollection * m_tracks
job option for main track collection
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
ToolHandle< Trk::ITrackSelectorTool > m_trkSelectorTool
the track selector tool
unsigned int m_constrainFitMode
0 - not constrained, 1 - vertex, 2 - beamspot
SG::ReadHandleKey< TrackCollection > m_trackName
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
DataObjIDColl m_extendedExtraObjects
#define ATH_MSG_WARNING(x)
bool m_usetrackhypo
Fit using particle hypothesis from input track
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
AthAlgorithm()
Default constructor:
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.