ATLAS Offline Software
Loading...
Searching...
No Matches
AFPSiClusterTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef AFP_SICLUSTERTOOLS_AFPSICLUSTERTOOL_H
6#define AFP_SICLUSTERTOOLS_AFPSICLUSTERTOOL_H 1
7
15
16
17// FrameWork includes
19#include "GaudiKernel/ServiceHandle.h"
20#include "GaudiKernel/ToolHandle.h"
21
22// Monitoring includes
25
33
41
42// STL includes
43#include "nlohmann/json.hpp"
44#include <string>
45#include <vector>
46
54 : public extends<AthAlgTool, IAFPSiClusterTool>
55{
56public:
57 AFPSiClusterTool(const std::string& type, const std::string& name, const IInterface* parent);
58
59 virtual ~AFPSiClusterTool() override {}
60
61 // Athena algtool's Hooks
62 virtual StatusCode initialize() override;
63
65 virtual StatusCode finalize() override;
66
68 StatusCode clusterHits(std::unique_ptr<xAOD::AFPSiHitsClusterContainer>& clustr, const EventContext &ctx) const override;
69
70private:
71 SG::ReadHandleKey<xAOD::AFPSiHitContainer> m_AFPSiHitContainerKey { this, "AFPSiHitsContainerName", "AFPSiHitContainer", "name of AFPSiHit container" };
72
74 ToolHandle<IAFPSiClusterAlgTool> m_clusterAlgToolHandle{this,"clusterAlgTool", "AFPSiClusterAlgTool","Tool with algorithm to perform actual clustering"};
75
77 ToolHandle<IAFPSiRowColToLocalCSTool> m_rowColToLocalCSToolHandle{this,"rowColToLocalCSTool", "AFPSiRowColToLocalCSTool","Tool to rewrite clusters to xAOD and transform rows and columns to station local coordinates"};
78
80 ToolHandle<GenericMonitoringTool> m_monTool {this, "MonTool", "", "Monitoring tool"};
81
82
84 ToolHandle<AFP::ISiLocAlignDBTool> m_siLocAlignDBTool {this, "siLocAlignDBTool", "AFP__SiLocAlignDBTool", "Tool to access DB to get the local alignment constants"};
85
87 ToolHandle<AFP::ISiGlobAlignDBTool> m_siGlobAlignDBTool {this, "siGlobAlignDBTool", "AFP__SiGlobAlignDBTool", "Tool to access DB to get the global alignment constants"};
88
93 Gaudi::Property<std::vector<int>> m_numberOfLayersInStations {this, "numberOfLayersInStations",{4,4,4,4}, "The size of the array in argument defines number of stations, the value in each entry defines number of layers in the station."};
94
96 StatusCode clearAllLayers(std::vector< std::vector<AFPSiClusterLayerBasicObj> > &my_layers) const;
97
99 StatusCode fillLayersWithHits(std::vector< std::vector<AFPSiClusterLayerBasicObj> > &my_layers, const EventContext &ctx) const;
100
102 StatusCode clusterEachLayer(std::vector< std::vector<AFPSiClusterLayerBasicObj> > &my_layers) const;
103
110 StatusCode saveToXAOD(std::unique_ptr<xAOD::AFPSiHitsClusterContainer>& clustr, std::vector< std::vector<AFPSiClusterLayerBasicObj> > &my_layers, const EventContext &ctx) const;
111
116 std::vector< std::vector<AFPSiClusterLayerBasicObj> > initLayers (const std::vector<int>& layersInStations) const;
117};
118
119
120#endif // > !AFP_SICLUSTERTOOLS_AFPSICLUSTERTOOL_H
Header file for interface IAFPSiClusterAlgTool.
Header file for interface IAFPSiClusterTool.
Header file for interface IAFPSiRowColToLocalCSTool.
Header file to be included by clients of the Monitored infrastructure.
Source file for class SiGlobAlignData.
Header file for class SiLocAlignData.
ToolHandle< IAFPSiRowColToLocalCSTool > m_rowColToLocalCSToolHandle
Tool that creates xAOD and transforms rows and pixels to local coordinate system.
StatusCode clusterEachLayer(std::vector< std::vector< AFPSiClusterLayerBasicObj > > &my_layers) const
Runs tool reconstructing clusters on each layer.
virtual ~AFPSiClusterTool() override
AFPSiClusterTool(const std::string &type, const std::string &name, const IInterface *parent)
std::vector< std::vector< AFPSiClusterLayerBasicObj > > initLayers(const std::vector< int > &layersInStations) const
Initialise size as well as station and layer ID for my_layers.
ToolHandle< IAFPSiClusterAlgTool > m_clusterAlgToolHandle
Tool that does the clustering on hits.
ToolHandle< AFP::ISiLocAlignDBTool > m_siLocAlignDBTool
@ brief Tool for accessing DB to get the local alignment constants
StatusCode fillLayersWithHits(std::vector< std::vector< AFPSiClusterLayerBasicObj > > &my_layers, const EventContext &ctx) const
Reads hits from StoreGate and saves them to appropriate layers in my_layers.
StatusCode clusterHits(std::unique_ptr< xAOD::AFPSiHitsClusterContainer > &clustr, const EventContext &ctx) const override
Run clusters reconstruction.
ToolHandle< GenericMonitoringTool > m_monTool
@ brief Monitoring tool
ToolHandle< AFP::ISiGlobAlignDBTool > m_siGlobAlignDBTool
@ brief Tool for accessing DB to get the global alignment constants
virtual StatusCode finalize() override
does nothing
virtual StatusCode initialize() override
Gaudi::Property< std::vector< int > > m_numberOfLayersInStations
Array defining number of stations and layers in each station.
StatusCode saveToXAOD(std::unique_ptr< xAOD::AFPSiHitsClusterContainer > &clustr, std::vector< std::vector< AFPSiClusterLayerBasicObj > > &my_layers, const EventContext &ctx) const
Save clusters in xAOD::AFPSiHitsClusterContainer.
StatusCode clearAllLayers(std::vector< std::vector< AFPSiClusterLayerBasicObj > > &my_layers) const
Runs AFPSiClusterLayerBasicObj::clearHitsAndClusters() on all layers in my_layers.
SG::ReadHandleKey< xAOD::AFPSiHitContainer > m_AFPSiHitContainerKey
Property holding a SG store/key/clid from which a ReadHandle is made.