ATLAS Offline Software
Loading...
Searching...
No Matches
LRAVertexPositioner.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
3*/
4
5#ifndef BEAMEFFECTS_LRAVERTEXPOSITIONER_H
6#define BEAMEFFECTS_LRAVERTEXPOSITIONER_H 1
7
8#include <tuple>
9#include <vector>
10
11#include <TFile.h>
12#include <TH3.h>
13
16
18
19namespace Simulation
20{
26 class LRAVertexPositioner : public extends<AthAlgTool, ILorentzVectorGenerator>
27 {
28 public:
30 LRAVertexPositioner(const std::string &t, const std::string &n, const IInterface *p);
31
33 virtual ~LRAVertexPositioner() = default;
34
35 //---
36
38 virtual StatusCode initialize() override final;
39
41 virtual StatusCode finalize() override final;
42
44 virtual CLHEP::HepLorentzVector *generate(const EventContext &ctx) const override final;
45
46
47 private:
48 Gaudi::Property<std::string> m_FileName{this, "FileName", "<<Unset>>", "LRA input file name."};
49 Gaudi::Property<std::string> m_HistName{this, "HistName", "<<Unset>>", "LRA input histogram name."};
50
51 std::unique_ptr<TFile> m_LRAFile;
52 const TH3F *m_LRAHist = nullptr;
53
54 //---
55
56 ServiceHandle<IAthRNGSvc> m_RNGService{this, "RNGService", "AthRNGSvc"};
57 Gaudi::Property<std::string> m_RNGStream{this, "RNGStream", "LRAVertexPositioner", "Stream name for the RNG service."};
59
60 //---
61
62 using IntegralTuple = std::tuple<Int_t, Int_t, Int_t, Double_t>;
63 std::vector<IntegralTuple> m_Integral;
64
65 const TAxis *m_xAxis = nullptr;
66 const TAxis *m_yAxis = nullptr;
67 const TAxis *m_zAxis = nullptr;
68 };
69};
70
71#endif //> !BEAMEFFECTS_LRAVERTEXPOSITIONER_H
A wrapper class for event-slot-local random engines.
Definition RNGWrapper.h:56
Support class for PropertyMgr.
Definition Property.h:23
Gaudi::Property< std::string > m_RNGStream
Stream name for the RNG service.
virtual StatusCode initialize() override final
AthAlgTool initialization.
ServiceHandle< IAthRNGSvc > m_RNGService
Handle to the Athena RNG service.
virtual ~LRAVertexPositioner()=default
Destructor.
const TAxis * m_zAxis
Non-owning TAxis * to the histograms z-Axis.
Gaudi::Property< std::string > m_FileName
LRA input file name.
std::tuple< Int_t, Int_t, Int_t, Double_t > IntegralTuple
Tuple for [xBin, yBin, zBin, Integral].
const TH3F * m_LRAHist
Non-owning TH3F * to the LRA histogram.
virtual StatusCode finalize() override final
AthAlgTool finalization.
ATHRNG::RNGWrapper *m_RNGEngine ATLAS_THREAD_SAFE
Non-owning RNGWrapper * to the RNG engine.
Gaudi::Property< std::string > m_HistName
LRA input histogram name.
const TAxis * m_yAxis
Non-owning TAxis * to the histograms y-Axis.
std::vector< IntegralTuple > m_Integral
Vector to hold the running integral over bins.
std::unique_ptr< TFile > m_LRAFile
Owning TFile * to the LRA file.
LRAVertexPositioner(const std::string &t, const std::string &n, const IInterface *p)
Constructor.
const TAxis * m_xAxis
Non-owning TAxis * to the histograms x-Axis.
=============================================================================
STL namespace.
#define private