ATLAS Offline Software
VertexPositionFromFile.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef BEAMEFFECTS_VERTEXPOSITIONFROMFILE_H
6 #define BEAMEFFECTS_VERTEXPOSITIONFROMFILE_H 1
7 
8 // STL includes
9 #include <string>
10 #include <utility>
11 #include <vector>
12 #include <map>
13 // FrameWork includes
14 #include "GaudiKernel/ServiceHandle.h"
17 // EventInfo
19 
21 
22 namespace Simulation {
23 
35  class VertexPositionFromFile : public extends<AthAlgTool, ILorentzVectorGenerator> {
36 
37  public:
39  VertexPositionFromFile( const std::string& t, const std::string& n, const IInterface* p );
40 
42  virtual ~VertexPositionFromFile() = default;
43 
45  StatusCode initialize() override final;
46  StatusCode finalize() override final;
47 
49  CLHEP::HepLorentzVector *generate(const EventContext& ctx) const override final;
50 
51  private:
52 
54  typedef std::pair< int, int > RunEventPair;
55  typedef std::vector< double > XYZCoordinates;
57 
62 
64  Gaudi::Property<std::string> m_vertexPositionFile{this, "VertexPositionsFile", ""};
66 
69  Gaudi::Property<std::string> m_runEventNumbersFile{this, "RunAndEventNumbersFile", ""};
70  std::vector<int> m_vertexPositionRunNum{};
71  std::vector<int> m_vertexPositionEventNum{};
72  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"};
73  };
74 
75 }
76 
77 #endif //> !BEAMEFECTS_VERTEXPOSITIONFROMFILE_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Simulation::VertexPositionFromFile::m_runEventNumbersFile
Gaudi::Property< std::string > m_runEventNumbersFile
run and event number overrides according to file (to be used optionally in combination with 'set vert...
Definition: VertexPositionFromFile.h:69
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Simulation::VertexPositionFromFile::finalize
StatusCode finalize() override final
Athena algtool's Hooks.
Definition: VertexPositionFromFile.cxx:55
Simulation::VertexPositionFromFile::XYZCoordinates
std::vector< double > XYZCoordinates
Definition: VertexPositionFromFile.h:55
Simulation::VertexPositionFromFile
Definition: VertexPositionFromFile.h:35
Simulation::VertexPositionFromFile::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Name of the EventInfo object in StoreGate.
Definition: VertexPositionFromFile.h:72
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
SG::ReadHandleKey< xAOD::EventInfo >
Simulation::VertexPositionFromFile::VertexPositionFromFile
VertexPositionFromFile(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: VertexPositionFromFile.cxx:19
Simulation::VertexPositionFromFile::initialize
StatusCode initialize() override final
Athena algtool's Hooks.
Definition: VertexPositionFromFile.cxx:27
Property
Support class for PropertyMgr.
Definition: Property.h:23
Simulation::VertexPositionFromFile::~VertexPositionFromFile
virtual ~VertexPositionFromFile()=default
Destructor.
Simulation::VertexPositionFromFile::m_vertexPositionMap
EventCoordinatesMap m_vertexPositionMap
vertex position for (run,event) pairs
Definition: VertexPositionFromFile.h:65
ILorentzVectorGenerator.h
Simulation::VertexPositionFromFile::EventCoordinatesMap
std::map< RunEventPair, XYZCoordinates > EventCoordinatesMap
Definition: VertexPositionFromFile.h:56
beamspotman.n
n
Definition: beamspotman.py:731
Simulation::VertexPositionFromFile::readVertexPosFile
StatusCode readVertexPosFile()
read-in and cache vertex positions from file
Definition: VertexPositionFromFile.cxx:62
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
AthAlgTool.h
Simulation::VertexPositionFromFile::m_vertexPositionEventNum
std::vector< int > m_vertexPositionEventNum
event number override vector
Definition: VertexPositionFromFile.h:71
Simulation::VertexPositionFromFile::m_vertexPositionRunNum
std::vector< int > m_vertexPositionRunNum
run number override vector
Definition: VertexPositionFromFile.h:70
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
EventInfo.h
generate
Definition: generate.cxx:28
Simulation::VertexPositionFromFile::m_vertexPositionFile
Gaudi::Property< std::string > m_vertexPositionFile
set vertex position by file
Definition: VertexPositionFromFile.h:64
Simulation
Definition: BeamEffectsAlg.cxx:21
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
Simulation::VertexPositionFromFile::readRunEventNumFile
StatusCode readRunEventNumFile()
read-in and cache run/event number overrides locally for vertex positioning
Definition: VertexPositionFromFile.cxx:118
Simulation::VertexPositionFromFile::RunEventPair
std::pair< int, int > RunEventPair
using typedefs to make code more readable for (run,event) -> (x,y,z) mapping
Definition: VertexPositionFromFile.h:54