10#ifndef INDETRECSTATISTICS_TrackStatistics_H
11#define INDETRECSTATISTICS_TrackStatistics_H
15#include "GaudiKernel/ToolHandle.h"
18#include "Identifier/Identifier.h"
61 StatusCode
execute(
const EventContext &ctx)
const;
77 template <
typename T_Int=
int>
84 std::vector <std::pair<HepMC::ConstGenParticlePtr,int> > &,
91 std::vector <const Trk::Track *> & ,
92 std::vector <const Trk::Track *> &,
156 template <
typename T_Int>
162 template <
typename T_IntB>
172 static float calculatePull(
const float,
const float,
const float);
Extrapolation for HepMC particles.
DataVector< Trk::Track > TrackCollection
This typedef represents a collection of Trk::Track objects.
An algorithm that can be simultaneously executed in multiple threads.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...
IdDictManager is the interface to identifier dictionaries.
const TRT_ID * m_trtID
get trt layer from hit ID
float m_minZEndSecondary
If track has end vertex, this is min Z of end vertex to be considered secondary.
void selectGenSignal(const McEventCollection *, std::vector< std::pair< HepMC::ConstGenParticlePtr, int > > &, unsigned int, unsigned int, CounterLocal &counter) const
Select charged,stable particles which pass pt and eta cuts for analysis.
ToolHandle< Trk::ITruthToTrack > m_truthToTrack
tool to create track parameters from a gen particle
std::atomic< long > m_events_processed
number of events processed
Trk::IUpdator * m_updator
updator for unbiased states
std::atomic< int > m_isUnbiased
if can get unbiased residuals
float m_maxEta
Maximum Eta cut for tracks used by the algorithm.
SG::ReadHandleKey< McEventCollection > m_McTrackCollection_key
StatusCode getServices()
Get various services such as StoreGate, dictionaries, detector managers etc.
float m_minREndSecondary
If track has end vertex, this is min R of end vertex to be considered secondary.
float m_maxRStartSecondary
Maximum R of start vertex to be considered secondary.
StatusCode resetStatistics()
Clear statistics counters, called before each track collection is processed.
const AtlasDetectorID * m_idHelper
Used to find out the sub-det from PRD->identify().
SG::ReadHandleKeyArray< TrackTruthCollection > m_TrackTruthCollection_keys
std::atomic< bool > m_pullWarning
warn only once, if pull cannot be calculated
float m_minZEndPrimary
If track has end vertex, this is min Z of end vertex to be considered primary.
const IdDictManager * m_idDictMgr
void printStatistics()
Print tracking statistics calculated with TrackStatHelper.
float m_maxZStartPrimary
Maximum Z of start vertex to be considered primary.
bool m_printSecondary
Flag to print hit information for secondary tracks.
const PixelID * m_pixelID
get pixel layer from hit ID
float m_minREndPrimary
If track has end vertex, this is min R of end vertex to be considered primary.
InDetRecStatisticsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Default Constructor.
float m_fakeTrackCut2
Second definition of maximum probability for which a track will be considered a fake.
StatusCode execute(const EventContext &ctx) const
Calculation of statistics.
Counter< std::atomic< long > > m_counter ATLAS_THREAD_SAFE
float m_maxRStartPrimary
Maximum R of start vertex to be considered primary.
float m_maxEtaEndcap
define max eta of eta region
bool m_doTruth
Use truth information.
ToolHandle< Trk::IResidualPullCalculator > m_residualPullCalculator
The residual and pull calculator tool handle.
std::vector< class TrackStatHelper * > m_SignalCounters
Vector of TrackStatHelper objects, one for each track collection.
static float calculatePull(const float, const float, const float)
Calculate pull from residual, track and hit error.
float m_maxEtaTransition
define max eta of transition region
std::atomic< bool > m_UpdatorWarning
warn only once, if unbiased track states can not be calculated
ToolHandle< Trk::IUpdator > m_updatorHandle
Tool handle of updator for unbiased states.
void selectRecSignal(const TrackCollection *, std::vector< const Trk::Track * > &, std::vector< const Trk::Track * > &, CounterLocal &counter) const
Select for analysis reconstructed tracks passing Pt and eta cuts.
const SCT_ID * m_sctID
get sct layer from hit ID
Identifier getIdentifier(const Trk::MeasurementBase *measurement)
StatusCode finalize()
Statistics table printed, collection cleared.
ToolHandle< Trk::IExtendedTrackSummaryTool > m_trkSummaryTool
tool to get track summary information from track
const Trk::TrackParameters * getUnbiasedTrackParameters(const Trk::TrackParameters *, const Trk::MeasurementBase *)
Get Unbiased Track Parameters.
SG::ReadHandleKeyArray< TrackCollection > m_RecTrackCollection_keys
ToolHandle< Trk::ITrackSelectorTool > m_trackSelectorTool
float m_minPt
Minimum Pt cut for tracks used by the algorithm.
bool m_UseTrackSummary
Flag to print detailed statistics for each track collection.
float m_fakeTrackCut
Maximum probability for which a track will be considered a fake.
@ kN_gen_tracks_processed
number of generated tracks processed
@ kN_rec_tracks_processed
number of reconstructed tracks processed
@ kN_rec_tracks_without_perigee
number of tracks w/o perigee
@ kN_spacepoints_processed
number of space points processed
@ kN_unknown_hits
number of hits without track
Counter< int > CounterLocal
void printTrackSummary(MsgStream &out, enum eta_region)
Print track statistics for all and low proability tracks.
float m_maxEtaBarrel
define max eta of barrel region
StatusCode initialize()
Initialization of services, track collections, creates TrackStatHelper for each Track Collection.
bool m_useTrackSelection
Use track selector tool.
float m_maxZStartSecondary
Maximum Z of start vertex to be considered secondary.
float m_matchTrackCut
Minimum number of hits from a truth track to be considered a matched reco track.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
This is an Identifier helper class for the Pixel subdetector.
This is an Identifier helper class for the SCT subdetector.
Property holding a SG store/key/clid from which a ReadHandle is made.
This is an Identifier helper class for the TRT subdetector.
Set of interfaces for methods operating on track states, mainly for Kalman filtering.
This class is the pure abstract base class for all fittable tracking measurements.
A summary of the information contained by a track.
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray
Ensure that the ATLAS eigen extensions are properly loaded.
ParametersBase< TrackParametersDim, Charged > TrackParameters
Counter & operator+=(const Counter< T_IntB > &b)