|
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...
|
|
| DeclareInterfaceID (ITrackHoleSearchTool, 1, 0) |
|
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 |
|
|
ToolHandle< Trk::IExtrapolator > | m_extrapolator {this, "extrapolator", "Trk::Extrapolator"} |
|
ServiceHandle< IInDetConditionsSvc > | m_conditions_svc {this, "conditions_svc", "TRT_ConditionsSummarySvc"} |
|
BooleanProperty | m_use_conditions_svc {this, "use_conditions_svc", true} |
|
FloatProperty | m_outer_radius {this, "outer_radius", 1075.0*CLHEP::mm} |
|
FloatProperty | m_max_z {this, "max_z", 2715.0*CLHEP::mm} |
|
IntegerProperty | m_max_trailing_holes {this, "max_trailing_holes", 1} |
|
BooleanProperty | m_begin_at_first_trt_hit {this, "begin_at_first_trt_hit", false} |
|
BooleanProperty | m_end_at_last_trt_hit {this, "end_at_last_trt_hit", false} |
|
BooleanProperty | m_bcheck {this, "bcheck", false} |
|
BooleanProperty | m_do_dump_bad_straw_log {this, "do_dump_bad_straw_log", false} |
|
FloatProperty | m_locR_cut {this, "locR_cut", -1.} |
|
FloatProperty | m_locR_sigma_cut {this, "locR_sigma_cut", -1.} |
|
FloatProperty | m_locZ_cut {this, "locZ_cut", 5.0*CLHEP::mm} |
|
std::atomic_bool | m_has_been_called {false} |
|
const TRT_ID * | m_TRT_ID {nullptr} |
|
Trk::CylinderSurface * | m_trt_outer_surf {nullptr} |
|
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 |
|
Definition at line 37 of file TRTTrackHoleSearchTool.h.
◆ StoreGateSvc_t
◆ TRTTrackHoleSearchTool()
TRTTrackHoleSearchTool::TRTTrackHoleSearchTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ addHolesToTrack()
Definition at line 422 of file TRTTrackHoleSearchTool.cxx.
433 auto tsos = std::make_unique<Trk::TrackStates>();
434 for (
const auto *
it : *
track.trackStateOnSurfaces()) {
443 if (
track.trackStateOnSurfaces()->size() == tsos->size() &&
holes->empty()) {
448 track.fitQuality() ?
track.fitQuality()->uniqueClone() :
nullptr);
453 tsos->insert(tsos->end(),
holes->begin(),
holes->end());
458 perigee = (*(
track.trackStateOnSurfaces()->begin()))->trackParameters();
463 if (fabs(perigee->parameters()[
Trk::qOverP]) > 0.002) {
467 msg() <<
"sorting vector with stable_sort" <<
endmsg;
471 tsos->sort(CompFunc);
479 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 76 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]
◆ DeclareInterfaceID()
◆ 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()
◆ dump_bad_straw_log()
void TRTTrackHoleSearchTool::dump_bad_straw_log |
( |
| ) |
const |
|
private |
Definition at line 354 of file TRTTrackHoleSearchTool.cxx.
355 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::dump_bad_straw_log" );
356 std::ofstream
out(
"TRT_ConditionsSummarySvc_bad_straws.log");
357 out <<
"# id barrel_ec phi_module layer_or_wheel straw_layer straw" << std::endl;
362 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 226 of file TRTTrackHoleSearchTool.cxx.
240 std::vector<std::unique_ptr<Trk::TrackParameters> >
steps =
241 m_extrapolator->extrapolateStepwise(Gaudi::Hive::currentContext(),
248 ATH_MSG_DEBUG(
"extrapolateBetweenHits: extrapolateStepwise returned null");
252 for(std::vector<std::unique_ptr<Trk::TrackParameters> >::const_iterator
step =
steps.begin();
step !=
steps.end()-1; ++
step) {
254 const Trk::Surface& surf = (*step)->associatedSurface();
261 ATH_MSG_DEBUG(
"extrapolateBetweenHits: surf is not a TRT straw. Skipping.");
266 if(
id == previous_id) {
278 if(
id == 0xffffffff) {
279 ATH_MSG_DEBUG(
"extrapolateBetweenHits: id == 0xffffffff. Skipping.");
285 ATH_MSG_DEBUG(
"extrapolateBetweenHits: ConditionsSvc says this straw is bad. Skipping.");
308 ATH_MSG_WARNING(
"extrapolateBetweenHits: Track parameters failed to dynamic_cast< const Trk::MeasuredTrackParameters* >.");
325 ATH_MSG_WARNING(
"extrapolateBetweenHits: Surface failed to dynamic_cast to Trk::CylinderBounds. Skipping.");
331 ATH_MSG_DEBUG(
" HOLE Found! Identifier = " <<
id.getString() <<
" indicates:\n"
340 <<
" rho = " << (*step)->position().perp() );
342 std::bitset<Trk::TrackStateOnSurface::NumberOfTrackStateOnSurfaceTypes> typePattern;
◆ finalize()
StatusCode TRTTrackHoleSearchTool::finalize |
( |
| ) |
|
◆ find_first_trt_hit()
◆ find_last_hit_before_trt()
Definition at line 399 of file TRTTrackHoleSearchTool.cxx.
400 ATH_MSG_DEBUG(
"TRTTrackHoleSearchTool::find_last_hit_before_trt" );
404 if(track_states.
size() < 2 || track_state == track_states.
begin()) {
405 return track_states.
end();
408 for(; track_state != track_states.
begin(); --track_state) {
415 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 91 of file TRTTrackHoleSearchTool.cxx.
103 if (
track.perigeeParameters()) {
105 <<
" pT = " <<
track.perigeeParameters()->pT()/
CLHEP::GeV <<
" CLHEP::GeV\n"
106 <<
" eta = " <<
track.perigeeParameters()->eta() <<
"\n"
107 <<
" phi = " <<
track.perigeeParameters()->parameters()[
Trk::phi0] <<
"\n"
108 <<
" d0 = " <<
track.perigeeParameters()->parameters()[
Trk::d0] <<
"\n"
109 <<
" z0 = " <<
track.perigeeParameters()->parameters()[
Trk::z0] );
115 ATH_MSG_DEBUG(
" This track has " << track_states->
size() <<
" track states on surface." );
117 ATH_MSG_WARNING(
" This track has null track states on surface. Returning 0." );
121 if (track_states->
size() < 2) {
134 if (beginning_track_state == track_states->
end()) {
135 ATH_MSG_WARNING(
" beginning_track_state == track_states->end(). There must be no Si hits.\n"
136 <<
" Will try to begin at the first TRT hit." );
141 if (beginning_track_state == track_states->
end()) {
142 ATH_MSG_WARNING(
" beginning_track_state == track_states->end(). No where to extrapolate to. Returning 0." );
153 for (; track_state != track_states->
end(); ++track_state) {
156 ATH_MSG_VERBOSE(
" TrackStateOnSurface is not of type Trk::TrackStateOnSurface::Measurement." );
163 << end_parameters->
position().x() <<
", "
164 << end_parameters->
position().y() <<
", "
165 << end_parameters->
position().z() <<
"); (rho, eta, phi) = ("
166 << end_parameters->
position().perp() <<
", "
167 << end_parameters->
position().eta() <<
", "
168 << end_parameters->
position().phi() <<
")");
175 if (!start_parameters) {
176 start_parameters = end_parameters;
179 start_parameters = end_parameters;
189 ATH_MSG_DEBUG(
"There are " << trailing_hole_count <<
" trailing holes removed.");
190 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 204 of file TRTTrackHoleSearchTool.cxx.
206 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 215 of file TRTTrackHoleSearchTool.cxx.
217 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.
◆ 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
BooleanProperty TRTTrackHoleSearchTool::m_bcheck {this, "bcheck", false} |
|
private |
◆ m_begin_at_first_trt_hit
BooleanProperty TRTTrackHoleSearchTool::m_begin_at_first_trt_hit {this, "begin_at_first_trt_hit", false} |
|
private |
◆ m_conditions_svc
◆ m_detStore
◆ m_do_dump_bad_straw_log
BooleanProperty TRTTrackHoleSearchTool::m_do_dump_bad_straw_log {this, "do_dump_bad_straw_log", false} |
|
private |
◆ m_end_at_last_trt_hit
BooleanProperty TRTTrackHoleSearchTool::m_end_at_last_trt_hit {this, "end_at_last_trt_hit", false} |
|
private |
◆ m_evtStore
◆ m_extrapolator
◆ m_has_been_called
std::atomic_bool TRTTrackHoleSearchTool::m_has_been_called {false} |
|
mutableprivate |
◆ m_locR_cut
FloatProperty TRTTrackHoleSearchTool::m_locR_cut {this, "locR_cut", -1.} |
|
private |
◆ m_locR_sigma_cut
FloatProperty TRTTrackHoleSearchTool::m_locR_sigma_cut {this, "locR_sigma_cut", -1.} |
|
private |
◆ m_locZ_cut
FloatProperty TRTTrackHoleSearchTool::m_locZ_cut {this, "locZ_cut", 5.0*CLHEP::mm} |
|
private |
◆ m_max_trailing_holes
IntegerProperty TRTTrackHoleSearchTool::m_max_trailing_holes {this, "max_trailing_holes", 1} |
|
private |
◆ m_max_z
FloatProperty TRTTrackHoleSearchTool::m_max_z {this, "max_z", 2715.0*CLHEP::mm} |
|
private |
◆ m_outer_radius
FloatProperty TRTTrackHoleSearchTool::m_outer_radius {this, "outer_radius", 1075.0*CLHEP::mm} |
|
private |
◆ m_TRT_ID
const TRT_ID* TRTTrackHoleSearchTool::m_TRT_ID {nullptr} |
|
private |
◆ m_trt_outer_surf
◆ m_use_conditions_svc
BooleanProperty TRTTrackHoleSearchTool::m_use_conditions_svc {this, "use_conditions_svc", true} |
|
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: