ATLAS Offline Software
Loading...
Searching...
No Matches
AFPTDBasicTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
10#ifndef AFP_LOCRECO_AFPTDBASICKALMANTOOL_H
11#define AFP_LOCRECO_AFPTDBASICKALMANTOOL_H 1
12
13
14// FrameWork includes
16#include "GaudiKernel/ServiceHandle.h"
17
18// xAOD includes
26
27// AFP_LocReco includes
31
32// STL includes
33#include "nlohmann/json.hpp"
34#include <string>
35#include <list>
36#include <vector>
37
43 : public extends<AthAlgTool, IAFPTDLocRecoTrackAlgTool>
44{
45public:
46 AFPTDBasicTool(const std::string& type,
47 const std::string& name,
48 const IInterface* parent);
49
50 virtual ~AFPTDBasicTool() override {}
51
53 virtual StatusCode initialize() override;
54
56 virtual StatusCode finalize() override;
57
62 StatusCode reconstructTracks(std::unique_ptr<xAOD::AFPToFTrackContainer>& outputContainer, const EventContext& ctx) const override;
63
65 const std::string& outputContainerName () const override {return m_tracksContainerName;}
66
67
68private:
70 Gaudi::Property<std::string> m_tracksContainerName{this, "tracksContainerName", "AFPToFTrackContainer", "Name of the container in which ToF tracks are saved"};
71
73 Gaudi::Property<int> m_stationID{this, "stationID", 0, "ID number of station for which tracks should be reconstructed"};
74
76 SG::ReadHandleKey<xAOD::AFPToFHitContainer> m_hitContainerKey{this, "AFPToFHitContainerKey", "AFPToFHitContainer", "Name of the container with ToF hits from which ToF tracks are to be reconstructed"};
77
79 Gaudi::Property<unsigned int> m_minHitsNumber{this, "minHitsNumber", 3, "Minimal number of bars in track. If there are less bars, track is rejected"};
80
81 Gaudi::Property<double> m_maxAllowedLength{this, "maxAllowedLength", 100, "Maximal length of the bar signal at which bar can be joined to the track"};
82
84 ToolHandle<AFP::IToFLocParamDBTool> m_tofLocParamDBTool {this, "tofLocParamDBTool", "AFP__ToFLocParamDBTool", "Tool to access DB to get the local ToF parameters"};
85
87 void fillTrainWithBars(std::vector<const xAOD::AFPToFHit*> my_trainBars[4], SG::ReadHandle<xAOD::AFPToFHitContainer>& hitContainer) const;
88
90 void clearTrains(std::vector<const xAOD::AFPToFHit*> my_trainBars[4]) const
91 {my_trainBars[0].clear(); my_trainBars[1].clear(); my_trainBars[2].clear(); my_trainBars[3].clear();}
92
94 void saveToXAOD (const AFPTDBasicToolTrack& recoTrack, std::unique_ptr<xAOD::AFPToFTrackContainer>& containerToFill, SG::ReadHandle<xAOD::AFPToFHitContainer>& hitContainer) const;
95};
96
97
98#endif // > !AFP_LOCRECO_AFPTDBASICKALMANTOOL_H
Full implementation of class AFPLocRecoStationBasicObj.
Header file for AFPTDBasicToolTrack used in ToF tracks reconstruction.
Header file for interface IAFPTDLocRecoTrackAlgTool.
Class representing a reconstructed basic ToF track.
Gaudi::Property< std::string > m_tracksContainerName
Name of the xAOD container to which tracks will be saved.
StatusCode reconstructTracks(std::unique_ptr< xAOD::AFPToFTrackContainer > &outputContainer, const EventContext &ctx) const override
Does actual tracks reconstruction.
virtual StatusCode finalize() override
Does nothing.
Gaudi::Property< unsigned int > m_minHitsNumber
Minimal number of bars in track. If there are less bars, track is rejected (Default = 3)
void fillTrainWithBars(std::vector< const xAOD::AFPToFHit * > my_trainBars[4], SG::ReadHandle< xAOD::AFPToFHitContainer > &hitContainer) const
Fills Station with ToF hits, dividing them into stations.
void saveToXAOD(const AFPTDBasicToolTrack &recoTrack, std::unique_ptr< xAOD::AFPToFTrackContainer > &containerToFill, SG::ReadHandle< xAOD::AFPToFHitContainer > &hitContainer) const
Save reconstructed track to the xAOD container.
Gaudi::Property< int > m_stationID
AFP station ID for which tracks will be reconstructed.
SG::ReadHandleKey< xAOD::AFPToFHitContainer > m_hitContainerKey
Name of the xAOD container with ToF hits to be used in track reconstruction.
virtual StatusCode initialize() override
Read parameters from job options and print tool configuration.
virtual ~AFPTDBasicTool() override
void clearTrains(std::vector< const xAOD::AFPToFHit * > my_trainBars[4]) const
clear station from bars saved in my_trainBars;
AFPTDBasicTool(const std::string &type, const std::string &name, const IInterface *parent)
const std::string & outputContainerName() const override
Gaudi::Property< double > m_maxAllowedLength
ToolHandle< AFP::IToFLocParamDBTool > m_tofLocParamDBTool
@ brief Tool for accessing DB to get the local ToF parameters
Property holding a SG store/key/clid from which a ReadHandle is made.