ATLAS Offline Software
Loading...
Searching...
No Matches
MuonTrackStatisticsAlg.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 MUONTRACKSTATISTICSALG_MUONTRACKSTATISTICSALG_H
6#define MUONTRACKSTATISTICSALG_MUONTRACKSTATISTICSALG_H
7
8#include <fstream>
9#include <string>
10
12#include "GaudiKernel/ToolHandle.h"
16
18
20public:
21 // Algorithm Constructor
22 MuonTrackStatisticsAlg(const std::string &name, ISvcLocator *pSvcLocator);
24
25 // Gaudi algorithm hooks
26 virtual StatusCode initialize() override;
27 virtual StatusCode execute() override;
28 virtual StatusCode finalize() override;
29
30 virtual unsigned int cardinality() const override final { return 1;}
31
32private:
33 ToolHandle<MuonTrackStatisticsTool> m_statisticsTool{this, "StatTool", "" };
34
35
36
38 std::string m_fileName;
39
41 std::ofstream m_fileOutput;
42
45
47 this, "TrackLocationList", {"MuonSpectrometerTracks"}, "track collections to track"};
49 this, "TruthTrackLocationList", {"MuonSpectrometerTracksTruth"}, "truth track collections"};
50
51 void storeTruthTracks(void);
52};
53
54#endif // MUONTRACKSTATISTICSALG_MUONTRACKSTATISTICSALG_H
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
virtual StatusCode execute() override
std::string m_fileName
name of external file to write statistics
SG::ReadHandleKeyArray< DetailedTrackTruthCollection > m_truthKeys
std::ofstream m_fileOutput
output file
SG::ReadHandleKeyArray< TrackCollection > m_trackKeys
virtual unsigned int cardinality() const override final
virtual StatusCode initialize() override
ToolHandle< MuonTrackStatisticsTool > m_statisticsTool
MuonTrackStatisticsAlg(const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode finalize() override
virtual ~MuonTrackStatisticsAlg()
HandleKeyArray< ReadHandle< T >, ReadHandleKey< T >, Gaudi::DataHandle::Reader > ReadHandleKeyArray