ATLAS Offline Software
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 
33 namespace ActsTrk {
34 
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 
69  SG::ReadHandleKey< PRD_MultiTruthCollection > m_prdTruth {this, "ITkClustersTruth", "", ""};
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
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ActsTrk::SeedAnalysisAlg::initialize
virtual StatusCode initialize() override
initialize
Definition: SeedAnalysisAlg.cxx:24
ActsTrk::SeedAnalysisAlg::m_prdTruth
SG::ReadHandleKey< PRD_MultiTruthCollection > m_prdTruth
Definition: SeedAnalysisAlg.h:69
ActsTrk::SeedContainer
Definition: SeedContainer.h:19
ActsTrk::SeedAnalysisAlg::m_detEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey
Definition: SeedAnalysisAlg.h:70
AtlasFieldCacheCondObj.h
PRD_MultiTruthCollection
A PRD is mapped onto all contributing particles.
Definition: PRD_MultiTruthCollection.h:24
ActsTrk::SeedAnalysisAlg::fillTruthHistograms
StatusCode fillTruthHistograms(const EventContext &ctx, const ActsTrk::SeedContainer &seed_container, std::vector< int > &, std::vector< double > &) const
Definition: SeedAnalysisAlg.cxx:209
ActsTrk::SeedAnalysisAlg
Definition: SeedAnalysisAlg.h:36
ActsTrk::SeedAnalysisAlg::SeedAnalysisAlg
SeedAnalysisAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SeedAnalysisAlg.cxx:20
SG::ReadHandleKey< ActsTrk::SeedContainer >
SeedContainer.h
AthMonitorAlgorithm
Base class for Athena Monitoring Algorithms.
Definition: AthMonitorAlgorithm.h:36
ActsTrk::SeedAnalysisAlg::findSeedMajorityTruthParticle
std::pair< int, double > findSeedMajorityTruthParticle(const std::map< int, int > &countMap) const
Definition: SeedAnalysisAlg.cxx:361
ActsTrk::SeedAnalysisAlg::m_useTopSp
Gaudi::Property< bool > m_useTopSp
Definition: SeedAnalysisAlg.h:79
ActsTrk::SeedAnalysisAlg::m_paramEstimationTool
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
Definition: SeedAnalysisAlg.h:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthMonitorAlgorithm.h
PixelClusterContainer.h
ActsTrk::SeedAnalysisAlg::m_ATLASConverterTool
ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool
Definition: SeedAnalysisAlg.h:65
ActsTrk::SeedAnalysisAlg::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SeedAnalysisAlg.h:73
AtlasFieldCache.h
ActsTrk::SeedAnalysisAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: SeedAnalysisAlg.h:72
ActsTrk::SeedAnalysisAlg::m_trackingGeometryTool
PublicToolHandle< ActsTrk::ITrackingGeometryTool > m_trackingGeometryTool
Definition: SeedAnalysisAlg.h:64
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
ActsTrk::SeedAnalysisAlg::m_monGroupName
Gaudi::Property< std::string > m_monGroupName
Definition: SeedAnalysisAlg.h:77
columnar::final
CM final
Definition: ColumnAccessor.h:106
ActsTrk::SeedAnalysisAlg::matchParticleToSeedClusters
void matchParticleToSeedClusters(const PRD_MultiTruthCollection *prdTruth, const Identifier &id, std::map< int, int > &countMap) const
Definition: SeedAnalysisAlg.cxx:332
ReadCondHandleKey.h
ActsTrk::SeedAnalysisAlg::estimateParameters
std::array< float, 7 > estimateParameters(const ActsTrk::Seed &seed, float pTPerHelixRadius) const
Definition: SeedAnalysisAlg.cxx:380
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
PixelClusterContainer.h
SiDetectorElementCollection.h
EventInfo.h
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
ActsTrk::SeedAnalysisAlg::m_usePixel
Gaudi::Property< bool > m_usePixel
Definition: SeedAnalysisAlg.h:80
xAOD::PixelCluster_v1
Definition: PixelCluster_v1.h:17
ActsTrk::SeedAnalysisAlg::identify
const Identifier identify(const xAOD::PixelCluster &) const
Definition: SeedAnalysisAlg.cxx:305
ActsTrk::SeedAnalysisAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: SeedAnalysisAlg.cxx:49
StripClusterContainer.h
ActsTrk::Seed
Definition: SeedContainer.h:75
ITrackingGeometryTool.h
SCT_ClusterContainer.h
ITrackParamsEstimationTool.h
ActsTrk::SeedAnalysisAlg::~SeedAnalysisAlg
virtual ~SeedAnalysisAlg() override=default
PRD_MultiTruthCollection.h
IActsToTrkConverterTool.h
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition: MdtCalibInput.h:31
BeamSpotData.h
ActsTrk::SeedAnalysisAlg::m_inputSeedColletionKey
SG::ReadHandleKey< ActsTrk::SeedContainer > m_inputSeedColletionKey
Definition: SeedAnalysisAlg.h:67
Identifier
Definition: IdentifierFieldParser.cxx:14