![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <TRTTrackHoleSearchTool.h>
|
| TRTTrackHoleSearchTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
StatusCode | initialize () |
|
StatusCode | finalize () |
|
void | countHoles (const Trk::Track &track, std::vector< int > &information, const Trk::ParticleHypothesis partHyp=Trk::pion) const |
| Input : track, partHyp Output: Changes in information This method fills the fields relevant to the hole counts in the vector information. More...
|
|
const Trk::TrackStates * | getHolesOnTrack (const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const |
| Input : track, parthyp Return: A DataVector containing pointers to TrackStateOnSurfaces which each represent an identified hole on the track. More...
|
|
const Trk::Track * | getTrackWithHoles (const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const |
| Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the input track plus the tsos of the identified holes The parthyp argument is relevant for the extrapolation steps in the hole search. More...
|
|
const Trk::Track * | getTrackWithHolesAndOutliers (const Trk::Track &track, const Trk::ParticleHypothesis partHyp=Trk::pion) const |
| Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the input track plus the tsos of the identified holes or outliers The parthyp argument is relevant for the extrapolation steps in the hole search. 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 |
|
Definition at line 35 of file TRTTrackHoleSearchTool.h.
◆ StoreGateSvc_t
◆ TRTTrackHoleSearchTool()
TRTTrackHoleSearchTool::TRTTrackHoleSearchTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ addHolesToTrack()
Definition at line 440 of file TRTTrackHoleSearchTool.cxx.
451 auto tsos = std::make_unique<Trk::TrackStates>();
452 for (
const auto *
it : *
track.trackStateOnSurfaces()) {
461 if (
track.trackStateOnSurfaces()->size() == tsos->size() &&
holes->empty()) {
466 track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
471 tsos->insert(tsos->end(),
holes->begin(),
holes->end());
476 perigee = (*(
track.trackStateOnSurfaces()->begin()))->trackParameters();
481 if (fabs(perigee->parameters()[
Trk::qOverP]) > 0.002) {
485 msg() <<
"sorting vector with stable_sort" <<
endmsg;
489 tsos->sort(CompFunc);
497 track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
◆ countHoles()
Input : track, partHyp Output: Changes in information This method fills the fields relevant to the hole counts in the vector information.
These fields should be initialised to 0. The relevant indices are specified by the enumeration in Tracking/TrkEvent/TrkTrackSummary. If problems occur, the information counters are reset to -1 flagging them as not set. The parthyp argument is relevant for the extrapolation steps in the hole search.
Implements Trk::ITrackHoleSearchTool.
Definition at line 95 of file TRTTrackHoleSearchTool.cxx.
◆ 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);
◆ 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.
◆ 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.
◆ 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()
◆ dump_bad_straw_log()
void TRTTrackHoleSearchTool::dump_bad_straw_log |
( |
| ) |
const |
|
private |
Definition at line 372 of file TRTTrackHoleSearchTool.cxx.
373 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::dump_bad_straw_log" );
374 std::ofstream
out(
"TRT_ConditionsSummarySvc_bad_straws.log");
375 out <<
"# id barrel_ec phi_module layer_or_wheel straw_layer straw" << std::endl;
380 out <<
id.getString()
◆ 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
◆ extrapolateBetweenHits()
Definition at line 245 of file TRTTrackHoleSearchTool.cxx.
259 std::vector<std::unique_ptr<Trk::TrackParameters> >
steps =
260 m_extrapolator->extrapolateStepwise(Gaudi::Hive::currentContext(),
266 ATH_MSG_DEBUG(
"extrapolateBetweenHits: extrapolateStepwise returned null");
270 for(std::vector<std::unique_ptr<Trk::TrackParameters> >::const_iterator
step =
steps.begin();
step !=
steps.end()-1; ++
step) {
272 const Trk::Surface& surf = (*step)->associatedSurface();
279 ATH_MSG_DEBUG(
"extrapolateBetweenHits: surf is not a TRT straw. Skipping.");
284 if(
id == previous_id) {
296 if(
id == 0xffffffff) {
297 ATH_MSG_DEBUG(
"extrapolateBetweenHits: id == 0xffffffff. Skipping.");
303 ATH_MSG_DEBUG(
"extrapolateBetweenHits: ConditionsSvc says this straw is bad. Skipping.");
326 ATH_MSG_WARNING(
"extrapolateBetweenHits: Track parameters failed to dynamic_cast< const Trk::MeasuredTrackParameters* >.");
343 ATH_MSG_WARNING(
"extrapolateBetweenHits: Surface failed to dynamic_cast to Trk::CylinderBounds. Skipping.");
349 ATH_MSG_DEBUG(
" HOLE Found! Identifier = " <<
id.getString() <<
" indicates:\n"
358 <<
" rho = " << (*step)->position().perp() );
360 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
◆ finalize()
StatusCode TRTTrackHoleSearchTool::finalize |
( |
| ) |
|
◆ find_first_trt_hit()
◆ find_last_hit_before_trt()
Definition at line 417 of file TRTTrackHoleSearchTool.cxx.
418 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::find_last_hit_before_trt" );
422 if(track_states.
size() < 2 || track_state == track_states.
begin()) {
423 return track_states.
end();
426 for(; track_state != track_states.
begin(); --track_state) {
433 return track_states.
end();
◆ getHolesOnTrack()
Input : track, parthyp Return: A DataVector containing pointers to TrackStateOnSurfaces which each represent an identified hole on the track.
The parthyp argument is relevant for the extrapolation steps in the hole search. Attention: This is a factory, ownership of the return vector is passed to the calling method.
Implements Trk::ITrackHoleSearchTool.
Definition at line 110 of file TRTTrackHoleSearchTool.cxx.
122 if (
track.perigeeParameters()) {
124 <<
" pT = " <<
track.perigeeParameters()->pT()/
CLHEP::GeV <<
" CLHEP::GeV\n"
125 <<
" eta = " <<
track.perigeeParameters()->eta() <<
"\n"
126 <<
" phi = " <<
track.perigeeParameters()->parameters()[
Trk::phi0] <<
"\n"
127 <<
" d0 = " <<
track.perigeeParameters()->parameters()[
Trk::d0] <<
"\n"
128 <<
" z0 = " <<
track.perigeeParameters()->parameters()[
Trk::z0] );
134 ATH_MSG_DEBUG(
" This track has " << track_states->
size() <<
" track states on surface." );
136 ATH_MSG_WARNING(
" This track has null track states on surface. Returning 0." );
140 if (track_states->
size() < 2) {
153 if (beginning_track_state == track_states->
end()) {
154 ATH_MSG_WARNING(
" beginning_track_state == track_states->end(). There must be no Si hits.\n"
155 <<
" Will try to begin at the first TRT hit." );
160 if (beginning_track_state == track_states->
end()) {
161 ATH_MSG_WARNING(
" beginning_track_state == track_states->end(). No where to extrapolate to. Returning 0." );
172 for (; track_state != track_states->
end(); ++track_state) {
175 ATH_MSG_VERBOSE(
" TrackStateOnSurface is not of type Trk::TrackStateOnSurface::Measurement." );
182 << end_parameters->
position().x() <<
", "
183 << end_parameters->
position().y() <<
", "
184 << end_parameters->
position().z() <<
"); (rho, eta, phi) = ("
185 << end_parameters->
position().perp() <<
", "
186 << end_parameters->
position().eta() <<
", "
187 << end_parameters->
position().phi() <<
")");
194 if (!start_parameters) {
195 start_parameters = end_parameters;
198 start_parameters = end_parameters;
208 ATH_MSG_DEBUG(
"There are " << trailing_hole_count <<
" trailing holes removed.");
209 for(
int i=0;
i < trailing_hole_count;
i++) {
◆ getTrackWithHoles()
Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the input track plus the tsos of the identified holes The parthyp argument is relevant for the extrapolation steps in the hole search.
Attention: This is a factory, ownership of the return track is passed to the calling method.
Implements Trk::ITrackHoleSearchTool.
Definition at line 223 of file TRTTrackHoleSearchTool.cxx.
225 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::getTrackWithHoles" );
◆ getTrackWithHolesAndOutliers()
Input : track, parthyp Return: A pointer to a new Trk::Track which containes the information of the input track plus the tsos of the identified holes or outliers The parthyp argument is relevant for the extrapolation steps in the hole search.
Attention: This is a factory, ownership of the return track is passed to the calling method.
Implements Trk::ITrackHoleSearchTool.
Definition at line 234 of file TRTTrackHoleSearchTool.cxx.
236 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::getTrackWithHolesAndOutliers" );
◆ initialize()
StatusCode TRTTrackHoleSearchTool::initialize |
( |
| ) |
|
◆ 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::ITrackHoleSearchTool::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_bcheck
bool TRTTrackHoleSearchTool::m_bcheck |
|
private |
◆ m_begin_at_first_trt_hit
bool TRTTrackHoleSearchTool::m_begin_at_first_trt_hit |
|
private |
◆ m_conditions_svc
◆ m_detStore
◆ m_do_dump_bad_straw_log
bool TRTTrackHoleSearchTool::m_do_dump_bad_straw_log |
|
private |
◆ m_end_at_last_trt_hit
bool TRTTrackHoleSearchTool::m_end_at_last_trt_hit |
|
private |
◆ m_evtStore
◆ m_extrapolator
◆ m_has_been_called
std::atomic_bool TRTTrackHoleSearchTool::m_has_been_called |
|
mutableprivate |
◆ m_locR_cut
float TRTTrackHoleSearchTool::m_locR_cut |
|
private |
◆ m_locR_sigma_cut
float TRTTrackHoleSearchTool::m_locR_sigma_cut |
|
private |
◆ m_locZ_cut
float TRTTrackHoleSearchTool::m_locZ_cut |
|
private |
◆ m_max_trailing_holes
int TRTTrackHoleSearchTool::m_max_trailing_holes |
|
private |
◆ m_max_z
float TRTTrackHoleSearchTool::m_max_z |
|
private |
◆ m_outer_radius
float TRTTrackHoleSearchTool::m_outer_radius |
|
private |
◆ m_TRT_ID
◆ m_trt_outer_surf
◆ m_use_conditions_svc
bool TRTTrackHoleSearchTool::m_use_conditions_svc |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
bool is_pixel(Identifier id) const
Const iterator class for DataVector/DataList.
int straw_max(const Identifier &id) const
bool is_sct(Identifier id) const
const Amg::Vector3D & position() const
Access method for the position.
virtual const Surface & associatedSurface() const override=0
Access to the Surface associated to the Parameters.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
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
bool msgLvl(const MSG::Level lvl) const
bool is_trt(Identifier id) const
#define ATH_MSG_VERBOSE(x)
@ numberOfTRTHoles
number of TRT hits which pass the high threshold (only xenon counted) total number of TRT hits which ...
#define AmgSymMatrix(dim)
const_id_iterator straw_layer_end(void) const
void stable_sort(std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, std::reverse_iterator< DataModel_detail::iterator< DVL > > end, Compare comp)
Specialization of stable_sort for DataVector/List.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
Class providing comparison function, or relational definition, for sorting MeasurementBase objects.
int straw(const Identifier &id) const
DataVector< const Trk::TrackStateOnSurface > TrackStates
@ Hole
A hole on the track - this is defined in the following way.
Eigen::Affine3d Transform3D
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
int straw_layer(const Identifier &id) const
int layer_or_wheel(const Identifier &id) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
represents the track state (measurement, material, fit parameters and quality) at a surface.
virtual const SurfaceBounds & bounds() const =0
Surface Bounds method.
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 ...
int phi_module(const Identifier &id) const
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const Amg::Vector3D & momentum() const
Access method for the momentum.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
const_id_iterator straw_layer_begin(void) const
Iterators over full set of straw_layer ids. Straw_layer ids are sorted.
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
@ 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.
double halflengthZ() const
This method returns the halflengthZ.
Identifier straw_id(int barrel_ec, int phi_module, int layer_or_wheel, int straw_layer, int straw) const
Three ways of getting id for a single straw: