ATLAS Offline Software
Loading...
Searching...
No Matches
SeedAnalysisAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ACTSTRKANALYSIS_SEEDANALYSISALG_H
6#define ACTSTRKANALYSIS_SEEDANALYSISALG_H
7
10
14
17
21
25
26#include "GaudiKernel/ToolHandle.h"
31
33
34namespace ActsTrk {
35
36 class SeedAnalysisAlg final :
37 public AthMonitorAlgorithm {
38 public:
39 SeedAnalysisAlg(const std::string& name, ISvcLocator* pSvcLocator);
40 virtual ~SeedAnalysisAlg() override = default;
41
42 virtual StatusCode initialize() override;
43 virtual StatusCode fillHistograms(const EventContext& ctx) const override;
44
45 private:
46 StatusCode fillTruthHistograms(const EventContext& ctx,
47 const ActsTrk::SeedContainer& seed_container,
48 std::vector<int>&,
49 std::vector<double>&) const;
50
51 const Identifier identify(const xAOD::PixelCluster&) const;
52 const Identifier identify(const xAOD::StripCluster&) const;
53
54 private:
56 const Identifier& id,
57 std::map<int, int>& countMap) const;
58 std::pair<int, double> findSeedMajorityTruthParticle(const std::map<int, int>& countMap) const;
59
60 std::array<float, 7> estimateParameters(const ActsTrk::Seed& seed,
61 float pTPerHelixRadius) const;
62
63 private:
64 ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool {this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"};
65
66 PublicToolHandle<IGeometryRealmConvTool> m_geometryConvTool{this, "GeometryRealmConvTool", ""};
67
69 ServiceHandle<ActsTrk::ITrackingGeometrySvc> m_trackingGeometrySvc{this, "TrackingGeometrySvc", "ActsTrackingGeometrySvc"};
70
72 SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey {this, "DetectorElements", "", "Key of input SiDetectorElementCollection"};
73
74 SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
75 SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
76 "Name of the Magnetic Field conditions object key"};
77
78 Gaudi::Property< std::string > m_monGroupName
79 {this, "MonGroupName", "ActsSeedAnalysisAlg"};
80
81 Gaudi::Property< bool > m_useTopSp {this, "useTopSp", false, "Use top SP. By default, use bottom SP."};
82 Gaudi::Property< bool > m_usePixel {this, "UsePixel", true, ""};
83
87 };
88
89}
90
91#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
std::pair< int, double > findSeedMajorityTruthParticle(const std::map< int, int > &countMap) const
SeedAnalysisAlg(const std::string &name, ISvcLocator *pSvcLocator)
Gaudi::Property< bool > m_usePixel
StatusCode fillTruthHistograms(const EventContext &ctx, const ActsTrk::SeedContainer &seed_container, std::vector< int > &, std::vector< double > &) const
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
const Identifier identify(const xAOD::PixelCluster &) const
virtual ~SeedAnalysisAlg() override=default
void matchParticleToSeedClusters(const PRD_MultiTruthCollection *prdTruth, const Identifier &id, std::map< int, int > &countMap) const
std::array< float, 7 > estimateParameters(const ActsTrk::Seed &seed, float pTPerHelixRadius) const
SG::ReadHandleKey< PRD_MultiTruthCollection > m_prdTruth
virtual StatusCode initialize() override
initialize
ServiceHandle< ActsTrk::ITrackingGeometrySvc > m_trackingGeometrySvc
Gaudi::Property< std::string > m_monGroupName
PublicToolHandle< IGeometryRealmConvTool > m_geometryConvTool
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
SG::ReadHandleKey< ActsTrk::SeedContainer > m_inputSeedColletionKey
ContextUtility m_ctxProvider
Auxiliary class to access the calibration context.
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey
Gaudi::Property< bool > m_useTopSp
AthMonitorAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
A PRD is mapped onto all contributing particles.
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
StripCluster_v1 StripCluster
Define the version of the strip cluster class.
PixelCluster_v1 PixelCluster
Define the version of the pixel cluster class.