ATLAS Offline Software
Loading...
Searching...
No Matches
MuonAlignmentUncertTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6// MuonAlignmentUncertTool
7// Helper classes to read the scattering and alignment uncertainties
8// of the muons from the histograms
10
11#ifndef MUONCOMBINEDBASETOOLS_MUONALIGNMENTUNCERTTOOL_H
12#define MUONCOMBINEDBASETOOLS_MUONALIGNMENTUNCERTTOOL_H
13
15#include <GaudiKernel/ServiceHandle.h>
19#include <TrkTrack/Track.h>
21
22#include "GaudiKernel/ToolHandle.h"
24#include <memory>
26#include <TH1.h>
27
28#include <functional>
29#include <map>
30#include <string>
31#include <vector>
32
33namespace Muon {
35 public:
36 MuonAlignmentUncertTool(const std::string& type, const std::string& name, const IInterface* parent);
38
39 StatusCode initialize() override;
40
41 float get_uncertainty(const Trk::Track* trk) const override;
42
46 void get_track_state_measures(const Trk::Track* track, const Trk::TrackStateOnSurface*& id_exit,
47 const Trk::TrackStateOnSurface*& calo_entrance, const Trk::TrackStateOnSurface*& calo_exit,
48 const Trk::TrackStateOnSurface*& ms_entrance) const override;
49
50 private:
53 std::function<int(const Trk::Track* trk)> make_reader(const TAxis* axis) const;
54
57 ServiceHandle<Trk::ITrackingVolumesSvc> m_trackingVolumesSvc{this, "TrackingVolumesSvc", "Trk::TrackingVolumesSvc/TrackingVolumesSvc"};
58
59 Gaudi::Property<std::string> m_in_file{this, "InFile",
60 "MuonCombinedBaseTools/AlignmentUncertainties/201029_initial/ID_MS_Uncertainties.root",
61 "Location of the calibration file"};
62 Gaudi::Property<std::string> m_histo_name{this, "HistoName", "", "Name of the histogram in the file"};
63
65 std::unique_ptr<TH1> m_histo;
66 unsigned int m_dim;
69 std::function<int(const Trk::Track* trk)> m_x_reader;
70 std::function<int(const Trk::Track* trk)> m_y_reader;
71 std::function<int(const Trk::Track* trk)> m_z_reader;
72
73 std::unique_ptr<const Trk::Volume> m_calorimeterVolume;
74 std::unique_ptr<const Trk::Volume> m_indetVolume;
75 };
76
77} // namespace Muon
78
79#endif
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
Base class for MuonAlignmentUncertTool AlgTool.
std::unique_ptr< const Trk::Volume > m_calorimeterVolume
Gaudi::Property< std::string > m_in_file
std::function< int(const Trk::Track *trk)> make_reader(const TAxis *axis) const
Helper function to assign the uncertainty from the Axis.
ServiceHandle< Trk::ITrackingVolumesSvc > m_trackingVolumesSvc
Volume service to.
MuonAlignmentUncertTool(const std::string &type, const std::string &name, const IInterface *parent)
void get_track_state_measures(const Trk::Track *track, const Trk::TrackStateOnSurface *&id_exit, const Trk::TrackStateOnSurface *&calo_entrance, const Trk::TrackStateOnSurface *&calo_exit, const Trk::TrackStateOnSurface *&ms_entrance) const override
Helper method to retrieve the last measurement of the ID, the first and last scatterer in the calorim...
std::function< int(const Trk::Track *trk)> m_y_reader
Gaudi::Property< std::string > m_histo_name
float get_uncertainty(const Trk::Track *trk) const override
IMuonAlignmentUncertTool interface: retrieve the associated uncertainties.
std::unique_ptr< TH1 > m_histo
Histogram to be cached.
std::function< int(const Trk::Track *trk)> m_x_reader
Standard functions used to read the histogram having as input a Trk::Track.
std::unique_ptr< const Trk::Volume > m_indetVolume
std::function< int(const Trk::Track *trk)> m_z_reader
represents the track state (measurement, material, fit parameters and quality) at a surface.
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.