ATLAS Offline Software
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
25 namespace ATHRNG {
26  class RNGWrapper;
27 }
28 namespace CLHEP {
29  class HepRandomEngine;
30 }
31 
32 namespace 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&);
74  BunchShape m_bunchShape{BunchShape::GAUSS}; // GAUSS or FLAT
75  Gaudi::Property<double> m_bunchLength{this, "BunchLength", 75., "75.0 mm"};
76  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
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
Simulation::CrabKissingVertexPositioner::m_bunchLength
Gaudi::Property< double > m_bunchLength
Parameter in the Z distribution of the beamspot.
Definition: CrabKissingVertexPositioner.h:75
Simulation::CrabKissingVertexPositioner::beamspotFunction
double beamspotFunction(double displacement, double angle1, double angle2) const
Definition: CrabKissingVertexPositioner.cxx:78
ATHRNG
Definition: IAthRNGSvc.h:23
Simulation::CrabKissingVertexPositioner::~CrabKissingVertexPositioner
virtual ~CrabKissingVertexPositioner()=default
Destructor.
Simulation::CrabKissingVertexPositioner::FLAT
@ FLAT
Definition: CrabKissingVertexPositioner.h:73
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Simulation::CrabKissingVertexPositioner::initialize
StatusCode initialize() override final
Athena algtool's Hooks.
Definition: CrabKissingVertexPositioner.cxx:41
D3PDTest::rng
uint32_t rng()
Definition: FillerAlg.cxx:40
Simulation::CrabKissingVertexPositioner::getDisplacement
double getDisplacement(double bunchSize, double angle1, double angle2, CLHEP::HepRandomEngine *rng) const
Definition: CrabKissingVertexPositioner.cxx:87
Simulation::CrabKissingVertexPositioner::BunchShape
BunchShape
Definition: CrabKissingVertexPositioner.h:73
Simulation::CrabKissingVertexPositioner::m_alphaX
Gaudi::Property< double > m_alphaX
Definition: CrabKissingVertexPositioner.h:80
Simulation::CrabKissingVertexPositioner::heaviside
double heaviside(double val) const
Definition: CrabKissingVertexPositioner.h:62
ILorentzVectorGenerator.h
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
Simulation::CrabKissingVertexPositioner::m_rndGenSvc
ServiceHandle< IAthRNGSvc > m_rndGenSvc
Definition: CrabKissingVertexPositioner.h:68
Simulation::CrabKissingVertexPositioner::m_betaStar
Gaudi::Property< double > m_betaStar
parameters according to S.Fartoukh Phys.Rev.ST Accel.Beams 17 (2014) no.11, 111001 ------------------...
Definition: CrabKissingVertexPositioner.h:77
Simulation::CrabKissingVertexPositioner::CrabKissingVertexPositioner
CrabKissingVertexPositioner(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: CrabKissingVertexPositioner.cxx:25
beamspotman.n
n
Definition: beamspotman.py:731
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::CrabKissingVertexPositioner::m_thetaX
Gaudi::Property< double > m_thetaX
Definition: CrabKissingVertexPositioner.h:81
Simulation::CrabKissingVertexPositioner::m_bunchShapeProp
Gaudi::Property< std::string > m_bunchShapeProp
Definition: CrabKissingVertexPositioner.h:71
Simulation::CrabKissingVertexPositioner::NSHAPES
@ NSHAPES
Definition: CrabKissingVertexPositioner.h:73
Simulation::CrabKissingVertexPositioner::finalize
StatusCode finalize() override final
Athena algtool's Hooks.
Definition: CrabKissingVertexPositioner.cxx:69
Simulation::CrabKissingVertexPositioner::m_epsilon
Gaudi::Property< double > m_epsilon
Definition: CrabKissingVertexPositioner.h:78
Simulation::CrabKissingVertexPositioner::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Definition: CrabKissingVertexPositioner.h:70
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
Simulation::CrabKissingVertexPositioner::BunchShapeHandler
void BunchShapeHandler(Gaudi::Details::PropertyBase &)
Definition: CrabKissingVertexPositioner.cxx:33
Simulation::CrabKissingVertexPositioner::ATLAS_THREAD_SAFE
ATHRNG::RNGWrapper *m_randomEngine ATLAS_THREAD_SAFE
Slot-local RNG.
Definition: CrabKissingVertexPositioner.h:69
generate
Definition: generate.cxx:28
Simulation::CrabKissingVertexPositioner::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: CrabKissingVertexPositioner.h:67
SG::ReadCondHandleKey< InDet::BeamSpotData >
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
Simulation
Definition: BeamEffectsAlg.cxx:21
BeamSpotData.h
Simulation::CrabKissingVertexPositioner::m_alphaPar
Gaudi::Property< double > m_alphaPar
Definition: CrabKissingVertexPositioner.h:79
checker_macros.h
Define macros for attributes used to control the static checker.
Simulation::CrabKissingVertexPositioner::GAUSS
@ GAUSS
Definition: CrabKissingVertexPositioner.h:73
Simulation::CrabKissingVertexPositioner
Definition: CrabKissingVertexPositioner.h:43
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >
Simulation::CrabKissingVertexPositioner::m_bunchShape
BunchShape m_bunchShape
Definition: CrabKissingVertexPositioner.h:74