ATLAS Offline Software
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 
20 public:
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 
32 private:
33  ToolHandle<MuonTrackStatisticsTool> m_statisticsTool{this, "StatTool", "" };
34 
35 
36 
38  std::string m_fileName;
39 
41  std::ofstream m_fileOutput;
42 
44  bool m_doTruth;
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
ReadHandleKeyArray.h
MuonTrackStatisticsAlg::initialize
virtual StatusCode initialize() override
Definition: MuonTrackStatisticsAlg.cxx:21
MuonTrackStatisticsAlg::storeTruthTracks
void storeTruthTracks(void)
Definition: MuonTrackStatisticsAlg.cxx:77
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
MuonTrackStatisticsAlg::m_statisticsTool
ToolHandle< MuonTrackStatisticsTool > m_statisticsTool
Definition: MuonTrackStatisticsAlg.h:33
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
MuonTrackStatisticsAlg::~MuonTrackStatisticsAlg
virtual ~MuonTrackStatisticsAlg()
MuonTrackStatisticsAlg::finalize
virtual StatusCode finalize() override
Definition: MuonTrackStatisticsAlg.cxx:65
AthAlgorithm.h
DetailedTrackTruthCollection.h
MuonTrackStatisticsAlg::m_fileOutput
std::ofstream m_fileOutput
output file
Definition: MuonTrackStatisticsAlg.h:41
MuonTrackStatisticsAlg::m_doTruth
bool m_doTruth
Definition: MuonTrackStatisticsAlg.h:44
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrackCollection.h
MuonTrackStatisticsAlg::m_writeToFile
bool m_writeToFile
Definition: MuonTrackStatisticsAlg.h:43
AthAlgorithm
Definition: AthAlgorithm.h:47
MuonTrackStatisticsAlg::m_truthKeys
SG::ReadHandleKeyArray< DetailedTrackTruthCollection > m_truthKeys
Definition: MuonTrackStatisticsAlg.h:48
MuonTrackStatisticsAlg::execute
virtual StatusCode execute() override
Definition: MuonTrackStatisticsAlg.cxx:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
MuonTrackStatisticsTool
Definition: MuonTrackStatisticsTool.h:28
MuonTrackStatisticsAlg::cardinality
virtual unsigned int cardinality() const override final
Definition: MuonTrackStatisticsAlg.h:30
MuonTrackStatisticsAlg::m_fileName
std::string m_fileName
name of external file to write statistics
Definition: MuonTrackStatisticsAlg.h:38
MuonTrackStatisticsAlg
Definition: MuonTrackStatisticsAlg.h:19
MuonTrackStatisticsAlg::MuonTrackStatisticsAlg
MuonTrackStatisticsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: MuonTrackStatisticsAlg.cxx:12
MuonTrackStatisticsAlg::m_trackKeys
SG::ReadHandleKeyArray< TrackCollection > m_trackKeys
Definition: MuonTrackStatisticsAlg.h:46