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 #include "ActsEvent/Seed.h"
15 
18 
21 #include "ActsEvent/Seed.h"
22 
26 
27 #include "GaudiKernel/ToolHandle.h"
31 
33 
34 namespace 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  PublicToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool {this, "TrackingGeometryTool", "ActsTrackingGeometryTool"};
66  ToolHandle< ActsTrk::IActsToTrkConverterTool > m_ATLASConverterTool{this, "ATLASConverterTool", "ActsToTrkConverterTool", "Acts to ATLAS converter tool"};
67 
69 
70  SG::ReadHandleKey< PRD_MultiTruthCollection > m_prdTruth {this, "ITkClustersTruth", "", ""};
71  SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey {this, "DetectorElements", "", "Key of input SiDetectorElementCollection"};
72 
73  SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey {this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot"};
74  SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey {this, "AtlasFieldCacheCondObj", "fieldCondObj",
75  "Name of the Magnetic Field conditions object key"};
76 
77  Gaudi::Property< std::string > m_monGroupName
78  {this, "MonGroupName", "ActsSeedAnalysisAlg"};
79 
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:70
ActsTrk::SeedAnalysisAlg::m_detEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_detEleCollKey
Definition: SeedAnalysisAlg.h:71
AtlasFieldCacheCondObj.h
PRD_MultiTruthCollection
A PRD is mapped onto all contributing particles.
Definition: PRD_MultiTruthCollection.h:24
ActsTrk::Seed
Acts::Seed< xAOD::SpacePoint > Seed
Definition: Seed.h:13
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:37
ActsTrk::SeedAnalysisAlg::SeedAnalysisAlg
SeedAnalysisAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SeedAnalysisAlg.cxx:20
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
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:360
ActsTrk::SeedAnalysisAlg::m_paramEstimationTool
ToolHandle< ActsTrk::ITrackParamsEstimationTool > m_paramEstimationTool
Definition: SeedAnalysisAlg.h:64
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:66
ActsTrk::SeedAnalysisAlg::m_fieldCondObjInputKey
SG::ReadCondHandleKey< AtlasFieldCacheCondObj > m_fieldCondObjInputKey
Definition: SeedAnalysisAlg.h:74
AtlasFieldCache.h
ActsTrk::SeedAnalysisAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: SeedAnalysisAlg.h:73
xAOD::StripCluster_v1
Definition: StripCluster_v1.h:17
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
ActsTrk::SeedAnalysisAlg::m_monGroupName
Gaudi::Property< std::string > m_monGroupName
Definition: SeedAnalysisAlg.h:78
ActsTrk::SeedAnalysisAlg::matchParticleToSeedClusters
void matchParticleToSeedClusters(const PRD_MultiTruthCollection *prdTruth, const Identifier &id, std::map< int, int > &countMap) const
Definition: SeedAnalysisAlg.cxx:331
ReadCondHandleKey.h
ActsTrk::SeedAnalysisAlg::estimateParameters
std::array< float, 7 > estimateParameters(const ActsTrk::Seed &seed, float pTPerHelixRadius) const
Definition: SeedAnalysisAlg.cxx:379
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
PixelClusterContainer.h
Seed.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:304
ActsTrk::SeedAnalysisAlg::fillHistograms
virtual StatusCode fillHistograms(const EventContext &ctx) const override
adds event to the monitoring histograms
Definition: SeedAnalysisAlg.cxx:49
StripClusterContainer.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: MuonDetectorBuilderTool.cxx:34
BeamSpotData.h
ActsTrk::SeedAnalysisAlg::m_inputSeedColletionKey
SG::ReadHandleKey< ActsTrk::SeedContainer > m_inputSeedColletionKey
Definition: SeedAnalysisAlg.h:68
IActsTrackingGeometryTool.h
ActsTrk::SeedAnalysisAlg::m_trackingGeometryTool
PublicToolHandle< IActsTrackingGeometryTool > m_trackingGeometryTool
Definition: SeedAnalysisAlg.h:65