ATLAS Offline Software
Loading...
Searching...
No Matches
CrabKissingVertexPositioner.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_CRABKISSINGVERTEXPOSITIONER_H
6#define BEAMEFFECTS_CRABKISSINGVERTEXPOSITIONER_H 1
7
8// STL includes
9#include <string>
10#include <utility>
11#include <vector>
12#include <map>
13
14// FrameWork includes
15#include "GaudiKernel/ServiceHandle.h"
20
21// InDetBeamSpotService
23
24// Forward declarations
25namespace ATHRNG {
26 class RNGWrapper;
27}
28namespace CLHEP {
29 class HepRandomEngine;
30}
31
32namespace Simulation
33{
34
43 class CrabKissingVertexPositioner : public extends<AthAlgTool, ILorentzVectorGenerator> {
44
45 public:
46
48 CrabKissingVertexPositioner( const std::string& t, const std::string& n, const IInterface* p );
49
51 virtual ~CrabKissingVertexPositioner() = default;
52
54 StatusCode initialize() override final;
55 StatusCode finalize() override final;
56
58 CLHEP::HepLorentzVector *generate(const EventContext& ctx) const override final;
59
60 private:
61
62 inline double heaviside(double val) const {return (val >= 0.0) ? 1.0 : 0.0;};
63 double getDisplacement(double bunchSize, double angle1, double angle2,
64 CLHEP::HepRandomEngine* rng) const;
65 double beamspotFunction(double displacement, double angle1, double angle2) const;
66
67 SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
68 ServiceHandle<IAthRNGSvc> m_rndGenSvc{this, "RandomSvc", "AthRNGSvc"};
70 Gaudi::Property<std::string> m_randomEngineName{this, "RandomStream", "VERTEX", "Name of the random number stream"};
71 Gaudi::Property<std::string> m_bunchShapeProp{this, "BunchShape", "GAUSS", "GAUSS or FLAT"};
72 void BunchShapeHandler(Gaudi::Details::PropertyBase&);
75 Gaudi::Property<double> m_bunchLength{this, "BunchLength", 75., "75.0 mm"};
77 Gaudi::Property<double> m_betaStar{this, "BetaStar", 150., "beta* in the parallel (kissing) plane, we assume betax=betay, units: mm"};
78 Gaudi::Property<double> m_epsilon{this, "Epsilon", 2.5e-3, "Normalized emittance, unit: mm"};
79 Gaudi::Property<double> m_alphaPar{this, "AlfasParallel", 0., "Kissing angle (Radians)"}; // Kissing angle
80 Gaudi::Property<double> m_alphaX{this, "AlfaX", 295e-6};
81 Gaudi::Property<double> m_thetaX{this, "ThetaX", 295e-6};
82 // ----------------------------------------------------------------------------------------------------------------
83 };
84
85}
86
87#endif //> !BEAMEFFECTS_CRABKISSINGVERTEXPOSITIONER_H
Define macros for attributes used to control the static checker.
A wrapper class for event-slot-local random engines.
Definition RNGWrapper.h:56
StatusCode finalize() override final
Athena algtool's Hooks.
virtual ~CrabKissingVertexPositioner()=default
Destructor.
Gaudi::Property< double > m_betaStar
parameters according to S.Fartoukh Phys.Rev.ST Accel.Beams 17 (2014) no.11, 111001 ------------------...
double beamspotFunction(double displacement, double angle1, double angle2) const
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
CrabKissingVertexPositioner(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
ATHRNG::RNGWrapper *m_randomEngine ATLAS_THREAD_SAFE
Slot-local RNG.
StatusCode initialize() override final
Athena algtool's Hooks.
void BunchShapeHandler(Gaudi::Details::PropertyBase &)
double getDisplacement(double bunchSize, double angle1, double angle2, CLHEP::HepRandomEngine *rng) const
Gaudi::Property< double > m_bunchLength
Parameter in the Z distribution of the beamspot.
#define private