|
ATLAS Offline Software
|
#include <TrackSlimmingTool.h>
|
| TrackSlimmingTool (const std::string &, const std::string &, const IInterface *) |
|
virtual | ~TrackSlimmingTool () |
| default destructor More...
|
|
virtual StatusCode | initialize () override |
| standard Athena-Algorithm method More...
|
|
virtual StatusCode | finalize () override |
| standard Athena-Algorithm method More...
|
|
void | slimTrack (Trk::Track &track) const override final |
| Slim a non const Track. More...
|
|
void | slimConstTrack (const Trk::Track &track) const override final |
| Slim a const Track. 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 |
|
|
void | setHints (const Trk::Track &track) const |
| This method just set persistification Hints. More...
|
|
void | checkForValidMeas (const Trk::TrackStateOnSurface *tsos, bool &isIDmeas, bool &isMSmeas) const |
|
void | findLastValidTSoS (const Trk::TrackStates *oldTrackStates, const Trk::TrackStateOnSurface *&lastValidIDTSOS, const TrackStateOnSurface *&lastValidMSTSOS) const |
|
bool | keepParameters (const Trk::TrackStateOnSurface *TSoS, const TrackStateOnSurface *&firstValidIDTSOS, const TrackStateOnSurface *&lastValidIDTSOS, const TrackStateOnSurface *&firstValidMSTSOS, const TrackStateOnSurface *&lastValidMSTSOS) const |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
A tool to produce 'slimmed' Tracks from a reference track.
By default, this slimmed track will include all the measurements, and the Perigee parameters (currently these are assumed to exist)
- Author
- Edward Moyse <Edward.Moysecern.ch>
-
Christos Anastopoulos Athena MT modifications
Definition at line 34 of file TrackSlimmingTool.h.
◆ StoreGateSvc_t
◆ TrackSlimmingTool()
Trk::TrackSlimmingTool::TrackSlimmingTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
Definition at line 23 of file TrackSlimmingTool.cxx.
32 declareInterface<ITrackSlimmingTool>(
this);
38 "If this is set to true, any CaloDeposit with its adjacent MEOT's will be "
39 "kept on the slimmed track (combined muon property)");
42 "If this is set to true, Outlier measurements will be kept "
43 "on the slimmed track");
46 "If this is set to true, the first and last parameters will "
47 "be kept on the slimmed track");
◆ ~TrackSlimmingTool()
Trk::TrackSlimmingTool::~TrackSlimmingTool |
( |
| ) |
|
|
virtualdefault |
◆ checkForValidMeas()
◆ 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
◆ finalize()
StatusCode Trk::TrackSlimmingTool::finalize |
( |
| ) |
|
|
overridevirtual |
standard Athena-Algorithm method
Definition at line 70 of file TrackSlimmingTool.cxx.
72 return StatusCode::SUCCESS;
◆ findLastValidTSoS()
Definition at line 217 of file TrackSlimmingTool.cxx.
225 rItTSoS != oldTrackStates->
rend();
228 (*rItTSoS)->trackParameters() !=
nullptr &&
229 (*rItTSoS)->measurementOnTrack() !=
nullptr &&
230 !(*rItTSoS)->measurementOnTrack()->type(
235 ->associatedSurface()
236 .associatedDetectorElementIdentifier())) {
237 lastValidIDTSOS = (*rItTSoS);
242 ->associatedSurface()
243 .associatedDetectorElementIdentifier())) {
244 lastValidMSTSOS = (*rItTSoS);
◆ initialize()
StatusCode Trk::TrackSlimmingTool::initialize |
( |
| ) |
|
|
overridevirtual |
standard Athena-Algorithm method
Definition at line 52 of file TrackSlimmingTool.cxx.
66 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 & Trk::ITrackSlimmingTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ keepParameters()
Definition at line 252 of file TrackSlimmingTool.cxx.
266 bool isIDmeas =
false;
267 bool isMSmeas =
false;
270 if (isIDmeas && !firstValidIDTSOS &&
272 firstValidIDTSOS = TSoS;
277 if (isMSmeas && !firstValidMSTSOS) {
278 firstValidMSTSOS = TSoS;
283 if (lastValidIDTSOS == TSoS || lastValidMSTSOS == TSoS) {
◆ 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()
◆ setHints()
This method just set persistification Hints.
Definition at line 89 of file TrackSlimmingTool.cxx.
92 track.trackStateOnSurfaces();
93 if (oldTrackStates ==
nullptr) {
98 const TrackStateOnSurface* firstValidIDTSOS(
nullptr);
99 const TrackStateOnSurface* lastValidIDTSOS(
nullptr);
100 const TrackStateOnSurface* firstValidMSTSOS(
nullptr);
101 const TrackStateOnSurface* lastValidMSTSOS(
nullptr);
111 bool keepParameter =
false;
114 oldTrackStates->
begin();
115 for (; itTSoS != oldTrackStates->
end(); ++itTSoS) {
118 std::bitset<Trk::TrackStateOnSurface::NumberOfPersistencyHints> hints{};
128 if (itTSoS != oldTrackStates->
begin()) {
136 const MaterialEffectsOnTrack* meot =
137 dynamic_cast<const MaterialEffectsOnTrack*
>(
138 (**itTSoS).materialEffectsOnTrack());
139 if (meot && meot->energyLoss()) {
145 if (itTSoS != oldTrackStates->
end() &&
153 if ((*itTSoS)->measurementOnTrack() ==
nullptr &&
156 (*itTSoS)->setHints(hints.to_ulong());
169 if ((*itTSoS)->measurementOnTrack() !=
nullptr &&
172 rot = (*itTSoS)->measurementOnTrack();
174 if (rot !=
nullptr ||
parameters !=
nullptr) {
183 (*itTSoS)->setHints(hints.to_ulong());
◆ slimConstTrack()
void Trk::TrackSlimmingTool::slimConstTrack |
( |
const Trk::Track & |
track | ) |
const |
|
finaloverridevirtual |
Slim a const Track.
- Parameters
-
track | A const reference to the track to be slimmed. |
The method sets persistification hints in the Track's TrackStateOnSurfaces So a slimmed version is written to disk
Same as the non-const version but does not set the SlimmedTrack property.
Implements Trk::ITrackSlimmingTool.
Definition at line 83 of file TrackSlimmingTool.cxx.
◆ slimTrack()
void Trk::TrackSlimmingTool::slimTrack |
( |
Trk::Track & |
track | ) |
const |
|
finaloverridevirtual |
Slim a non const Track.
- Parameters
-
track | A reference to the track to be slimmed. |
The method sets persistification hints in the Track's TrackStateOnSurfaces So a slimmed version is written to disk
The properties are modified setTrackProperties(TrackInfo::SlimmedTrack);
Implements Trk::ITrackSlimmingTool.
Definition at line 76 of file TrackSlimmingTool.cxx.
◆ 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_detID
◆ m_detStore
◆ m_evtStore
◆ m_keepCaloDeposit
bool Trk::TrackSlimmingTool::m_keepCaloDeposit |
|
private |
any CaloDeposit with its adjacent MEOT's will be kept on the slimmed track (combined muon property)
Definition at line 79 of file TrackSlimmingTool.h.
◆ m_keepOutliers
bool Trk::TrackSlimmingTool::m_keepOutliers |
|
private |
◆ m_keepParameters
bool Trk::TrackSlimmingTool::m_keepParameters |
|
private |
If true, the first and last parameters of ID & MS subsystems will be kept on the slimmed track.
Definition at line 86 of file TrackSlimmingTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const TrackParameters * trackParameters() const
return ptr to trackparameters const overload
@ CaloDeposit
This TSOS contains a CaloEnergy object.
@ Perigee
This represents a perigee, and so will contain a Perigee object only.
Const iterator class for DataVector/DataList.
const_reverse_iterator rend() const noexcept
Return a const_reverse_iterator pointing at the beginning of the collection.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
@ PersistifyTrackParameters
Mark track parameters for persisitification.
Identifier associatedDetectorElementIdentifier() const
return Identifier of the associated Detector Element
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Identifier identify(const UncalibratedMeasurement *meas)
Returns the associated identifier.
const MeasurementBase * measurementOnTrack() const
returns MeasurementBase const overload
@ PersistifyMeasurement
Mark the measuremenet for persistification.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
@ Outlier
This TSoS contains an outlier, that is, it contains a MeasurementBase/RIO_OnTrack which was not used ...
@ SlimmedTrack
A slimmed track.
bool type(const TrackStateOnSurfaceType type) const
Use this method to find out if the TSoS is of a certain type: i.e.
virtual const RIO_OnTrack & rioOnTrack(unsigned int) const =0
returns the RIO_OnTrack (also known as ROT) objects depending on the integer.
::StatusCode StatusCode
StatusCode definition for legacy code.
Base class for all CompetingRIOsOnTack implementations, extends the common MeasurementBase.
virtual bool type(MeasurementBaseType::Type type) const =0
Interface method checking the type.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ PersistifySlimCaloDeposit
Mark track parameters for persisitification.
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual const Surface & associatedSurface() const =0
Interface method to get the associated Surface.
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
bool is_indet(Identifier id) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
bool is_muon(Identifier id) const
#define ATH_MSG_WARNING(x)
@ Scatterer
This represents a scattering point on the track, and so will contain TrackParameters and MaterialEffe...
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
@ PseudoMeasurementOnTrack
unsigned int indexOfMaxAssignProb() const
Index of the ROT with the highest assignment probability.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ PartialPersistification
@ Measurement
This is a measurement, and will at least contain a Trk::MeasurementBase.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.