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"
30
32
33namespace ActsTrk {
34
35 class SeedAnalysisAlg final :
36 public AthMonitorAlgorithm {
37 public:
38 SeedAnalysisAlg(const std::string& name, ISvcLocator* pSvcLocator);
39 virtual ~SeedAnalysisAlg() override = default;
40
41 virtual StatusCode initialize() override;
42 virtual StatusCode fillHistograms(const EventContext& ctx) const override;
43
44 private:
45 StatusCode fillTruthHistograms(const EventContext& ctx,
46 const ActsTrk::SeedContainer& seed_container,
47 std::vector<int>&,
48 std::vector<double>&) const;
49
50 const Identifier identify(const xAOD::PixelCluster&) const;
51 const Identifier identify(const xAOD::StripCluster&) const;
52
53 private:
55 const Identifier& id,
56 std::map<int, int>& countMap) const;
57 std::pair<int, double> findSeedMajorityTruthParticle(const std::map<int, int>& countMap) const;
58
59 std::array<float, 7> estimateParameters(const ActsTrk::Seed& seed,
60 float pTPerHelixRadius) const;
61
62 private:
63 ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool {this, "TrackParamsEstimationTool", "", "Track Param Estimation from Seeds"};
64 PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool {this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
65 ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool{this, "ATLASConverterTool", "ActsToTrkConverterTool", "Acts to ATLAS converter tool"};
66
68
70 SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey {this, "DetectorElements", "", "Key of input SiDetectorElementCollection"};
71
72 SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
73 SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
74 "Name of the Magnetic Field conditions object key"};
75
76 Gaudi::Property< std::string > m_monGroupName
77 {this, "MonGroupName", "ActsSeedAnalysisAlg"};
78
79 Gaudi::Property< bool > m_useTopSp {this, "useTopSp", false, "Use top SP. By default, use bottom SP."};
80 Gaudi::Property< bool > m_usePixel {this, "UsePixel", true, ""};
81 };
82
83}
84
85#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
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::IActsToTrkConverterTool > m_ATLASConverterTool
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
Gaudi::Property< std::string > m_monGroupName
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
SG::ReadHandleKey< ActsTrk::SeedContainer > m_inputSeedColletionKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
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.