ATLAS Offline Software
LongBeamspotVertexPositioner.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_LONGBEAMSPOTVERTEXPOSITIONER_H
6 #define BEAMEFFECTS_LONGBEAMSPOTVERTEXPOSITIONER_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"
20 namespace ATHRNG {
21  class RNGWrapper;
22 }
23 namespace CLHEP {
24  class HepRandomEngine;
25 }
26 
27 namespace Simulation {
28 
37  class LongBeamspotVertexPositioner : public extends<AthAlgTool, ILorentzVectorGenerator> {
38 
39  public:
40 
42  LongBeamspotVertexPositioner( const std::string& t, const std::string& n,
43  const IInterface* p );
44 
46  virtual ~LongBeamspotVertexPositioner() = default;
47 
49  StatusCode initialize() override final;
50  StatusCode finalize() override final;
51 
53  CLHEP::HepLorentzVector *generate(const EventContext& ctx) const override final;
54 
55  private:
56 
57  inline double heaviside(double val) const {return (val >= 0.0) ? 1.0 : 0.0;};
58  double getZpos(CLHEP::HepRandomEngine*) const;
59  double beamspotFunction(double z) const;
60  Gaudi::Property<double> m_L{this, "LParameter", 150.};
61  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
62  ServiceHandle<IAthRNGSvc> m_rndGenSvc{this, "RandomSvc", "AthRNGSvc"};
64 
65  Gaudi::Property<std::string> m_randomEngineName{this, "RandomStream", "VERTEX"};
66  Gaudi::Property<bool> m_timeSmearing{this, "SimpleTimeSmearing", false};
67 
68  };
69 
70 }
71 
72 #endif //> !BEAMEFFECTS_LONGBEAMSPOTVERTEXPOSITIONER_H
Simulation::LongBeamspotVertexPositioner::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: LongBeamspotVertexPositioner.h:61
Simulation::LongBeamspotVertexPositioner::initialize
StatusCode initialize() override final
Athena algtool's Hooks.
Definition: LongBeamspotVertexPositioner.cxx:34
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Simulation::LongBeamspotVertexPositioner::m_timeSmearing
Gaudi::Property< bool > m_timeSmearing
Do time smearing.
Definition: LongBeamspotVertexPositioner.h:66
ATHRNG
Definition: IAthRNGSvc.h:23
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
ILorentzVectorGenerator.h
z
#define z
beamspotman.n
n
Definition: beamspotman.py:731
Simulation::LongBeamspotVertexPositioner::~LongBeamspotVertexPositioner
virtual ~LongBeamspotVertexPositioner()=default
Destructor.
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CLHEP
STD'S.
Definition: IAtRndmGenSvc.h:19
AthAlgTool.h
Simulation::LongBeamspotVertexPositioner::m_L
Gaudi::Property< double > m_L
Parameter in the Z distribution of the beamspot - default 150.0 mm.
Definition: LongBeamspotVertexPositioner.h:60
Simulation::LongBeamspotVertexPositioner::ATLAS_THREAD_SAFE
ATHRNG::RNGWrapper *m_randomEngine ATLAS_THREAD_SAFE
Slot-local RNG.
Definition: LongBeamspotVertexPositioner.h:63
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
generate
Definition: generate.cxx:28
SG::ReadCondHandleKey< InDet::BeamSpotData >
Simulation::LongBeamspotVertexPositioner::finalize
StatusCode finalize() override final
Athena algtool's Hooks.
Definition: LongBeamspotVertexPositioner.cxx:53
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
Simulation::LongBeamspotVertexPositioner::m_rndGenSvc
ServiceHandle< IAthRNGSvc > m_rndGenSvc
Definition: LongBeamspotVertexPositioner.h:62
Simulation
Definition: BeamEffectsAlg.cxx:21
Simulation::LongBeamspotVertexPositioner::LongBeamspotVertexPositioner
LongBeamspotVertexPositioner(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: LongBeamspotVertexPositioner.cxx:26
BeamSpotData.h
Simulation::LongBeamspotVertexPositioner::heaviside
double heaviside(double val) const
Definition: LongBeamspotVertexPositioner.h:57
checker_macros.h
Define macros for attributes used to control the static checker.
Simulation::LongBeamspotVertexPositioner::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Name of the random number stream.
Definition: LongBeamspotVertexPositioner.h:65
Simulation::LongBeamspotVertexPositioner::beamspotFunction
double beamspotFunction(double z) const
Definition: LongBeamspotVertexPositioner.cxx:59
Simulation::LongBeamspotVertexPositioner::getZpos
double getZpos(CLHEP::HepRandomEngine *) const
Definition: LongBeamspotVertexPositioner.cxx:66
Simulation::LongBeamspotVertexPositioner
Definition: LongBeamspotVertexPositioner.h:37
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >