ATLAS Offline Software
|
A summary of the information contained by a track. More...
#include <TrackSummary.h>
Public Member Functions | |
TrackSummary () | |
needed by POOL More... | |
TrackSummary (const std::vector< int > &information, std::bitset< numberOfDetectorTypes > &hitPattern) | |
ctor should probably only be called by TrkSummaryTool. More... | |
TrackSummary (const TrackSummary &rhs) | |
copy ctor More... | |
TrackSummary & | operator= (const TrackSummary &) |
assignment operator More... | |
TrackSummary (TrackSummary &&rhs) noexcept=default | |
Move ctor. More... | |
TrackSummary & | operator= (TrackSummary &&) noexcept=default |
Move assignment operator. More... | |
~TrackSummary () | |
TrackSummary & | operator+= (const TrackSummary &ts) |
adds the values of the passed TrackSummary to this TrackSummary. More... | |
int | get (const SummaryType &type) const |
returns the summary information for the passed SummaryType. More... | |
unsigned long | getHitPattern () const |
bool | isHit (const DetectorType &type) const |
returns true if the detector type 'type' is hit. More... | |
const MuonTrackSummary * | muonTrackSummary () const |
returns a pointer to the MuonTrackSummary if available More... | |
MuonTrackSummary * | muonTrackSummary () |
returns pointer to a modifiable (non-const) MuonTrackSummary if available More... | |
bool | update (Trk::SummaryType type, int new_value) |
Update unset summary information. More... | |
Static Public Member Functions | |
static std::size_t | numberOfInstantiations () |
Static Public Attributes | |
static const int | SummaryTypeNotSet = -1 |
Value set in the cxx file to -1. More... | |
static std::atomic_size_t | s_numberOfInstantiations |
Private Attributes | |
std::vector< int > | m_information |
vector containing the persistent summary information. More... | |
unsigned long | m_idHitPattern |
contains the 'hit pattern' More... | |
std::unique_ptr< MuonTrackSummary > | m_muonTrackSummary |
pointer to the MuonTrackSummary More... | |
Friends | |
class | InDet::InDetTrackSummaryHelperTool |
class | Muon::MuonTrackSummaryHelperTool |
class | Trk::TrackSummaryTool |
class | ::TrackSummaryCnv_p1 |
class | ::TrackSummaryCnv_p2 |
A summary of the information contained by a track.
If there is information missing, or if I could add useful methods then let me know. I have deliberately tried to keep this as simple as possible, whilst allowing for future expansion.
A recent addition is the isHit() method. This is analogous to the old 'hit patterns' in that you can use it to check if a specific sub-detector element has been hit by the track.
For example, you could do: if (summary.isHit(Trk::pixelBarrel0) ) callSomething();
Please note that this class does NO error checking - i.e. it would be possible for someone to fill this object in an inconsistent manner and it would not be caught.
Definition at line 286 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
Trk::TrackSummary::TrackSummary | ( | ) |
Trk::TrackSummary::TrackSummary | ( | const std::vector< int > & | information, |
std::bitset< numberOfDetectorTypes > & | hitPattern | ||
) |
ctor should probably only be called by TrkSummaryTool.
information | The vector passed should be complete i.e. it should be the size required by m_numSummaryTypes, and any undefined values should be set to -1. The vector should be filled using SummaryType to select the position of the information. |
hitPattern | this bitset should be filled using the DetectorType enum. True indicates that a sub-detector was hit |
Definition at line 24 of file TrackSummary.cxx.
Trk::TrackSummary::TrackSummary | ( | const TrackSummary & | rhs | ) |
|
defaultnoexcept |
Move ctor.
|
default |
int Trk::TrackSummary::get | ( | const SummaryType & | type | ) | const |
returns the summary information for the passed SummaryType.
type | Use the provided enums to access it, i.e. by summary.get(numberOfPixelHits) |
unsigned long Trk::TrackSummary::getHitPattern | ( | ) | const |
bool Trk::TrackSummary::isHit | ( | const DetectorType & | type | ) | const |
returns true if the detector type 'type' is hit.
type | Please use the DetectorType enum to access the information (the internal positions may change!) |
MuonTrackSummary* Trk::TrackSummary::muonTrackSummary | ( | ) |
returns pointer to a modifiable (non-const) MuonTrackSummary if available
const MuonTrackSummary* Trk::TrackSummary::muonTrackSummary | ( | ) | const |
returns a pointer to the MuonTrackSummary if available
|
inlinestaticinherited |
Definition at line 25 of file TrkObjectCounter.h.
Trk::TrackSummary & Trk::TrackSummary::operator+= | ( | const TrackSummary & | ts | ) |
adds the values of the passed TrackSummary to this TrackSummary.
Mainly intended for adding Muon and ID TrackSummaries, when making a combined Track for example WARNING: may not make much sense for e.g. Trk::numberOfContribPixelLayers
Definition at line 62 of file TrackSummary.cxx.
Trk::TrackSummary & Trk::TrackSummary::operator= | ( | const TrackSummary & | rhs | ) |
|
defaultnoexcept |
Move assignment operator.
bool Trk::TrackSummary::update | ( | Trk::SummaryType | type, |
int | new_value | ||
) |
Update unset summary information.
type | the type of the summary information to be updated. |
new_value | the value to be set for the given type. |
|
friend |
Definition at line 360 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
friend |
Definition at line 361 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
friend |
Definition at line 289 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
friend |
Definition at line 290 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
friend |
Definition at line 291 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
private |
contains the 'hit pattern'
Definition at line 367 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
private |
vector containing the persistent summary information.
Definition at line 364 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
private |
pointer to the MuonTrackSummary
Definition at line 370 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.
|
inlinestaticinherited |
Definition at line 22 of file TrkObjectCounter.h.
|
static |
Value set in the cxx file to -1.
If any of the values returned by get(const SummaryType& type)==SummaryTypeNotSet then this means that the information has not been filled. i.e. ID information cannot be filled if the TrackSummaryTool does not have access to the InDetTrackSummaryHelperTool
Definition at line 297 of file Tracking/TrkEvent/TrkTrackSummary/TrkTrackSummary/TrackSummary.h.