ATLAS Offline Software
GenEventBeamEffectBooster.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef ISF_HEPMC_GENEVENTBEAMEFFECTBOOSTER_H
8 #define ISF_HEPMC_GENEVENTBEAMEFFECTBOOSTER_H 1
9 
10 // Base class headers
13 // Athena headers
16 // Gaudi headers
17 #include "GaudiKernel/ServiceHandle.h"
18 // CLHEP headers
19 #include "CLHEP/Geometry/Transform3D.h"
20 #include "CLHEP/Vector/LorentzRotation.h"
21 
22 namespace ATHRNG {
23  class RNGWrapper;
24 }
25 
27 
28 namespace Simulation {
29 
38  class GenEventBeamEffectBooster : public extends<AthAlgTool, IGenEventManipulator>
39  {
40 
41  public:
43  GenEventBeamEffectBooster( const std::string& t, const std::string& n, const IInterface* p );
44 
46  StatusCode initialize() override final;
47  StatusCode finalize() override final;
48 
49  StatusCode initializeAthenaEvent();// override final;
50 
52  StatusCode manipulate(HepMC::GenEvent& ge, const EventContext& ctx) const override final;
53  private:
55  StatusCode initializeGenEvent(CLHEP::HepLorentzRotation& transform, const EventContext& ctx) const;
57  void boostParticle(HepMC::GenParticlePtr& p, const CLHEP::HepLorentzRotation& transform) const;
58 
59  ServiceHandle<IAthRNGSvc> m_rndGenSvc{this, "RandomSvc", "AthRNGSvc"};
61  Gaudi::Property<std::string> m_randomEngineName{this, "RandomStream", "BEAM"};
62  Gaudi::Property<bool> m_applyBoost{this, "ApplyBoost", true};
63  Gaudi::Property<bool> m_applyDivergence{this, "ApplyDivergence", true};
64 
65  //BACKUP properties needed until IBeamCondSvc is updated
66  Gaudi::Property<double> m_sigma_px_b1{this, "Sigma_px_b1", 20.e-6, "angular divergence in x of beam 1 [rad]"};
67  Gaudi::Property<double> m_sigma_px_b2{this, "Sigma_px_b2", 21.e-6, "angular divergence in x of beam 2 [rad]"};
68  Gaudi::Property<double> m_sigma_py_b1{this, "Sigma_py_b1", 22.e-6, "angular divergence in y of beam 1 [rad]"};
69  Gaudi::Property<double> m_sigma_py_b2{this, "Sigma_py_b2", 23.e-6, "angular divergence in y of beam 2 [rad]"};
70  // Crossing angles, note the convention here is taken from online https://atlas-dcs.cern.ch/index.php?page=LHC_INS::INS_BPM
71  Gaudi::Property<double> m_xing_x_b1{this, "HalfXing_x_b1", 19.e-6, "half-crossing in x for beam 1 at IP1, i.e. angle between beam 1 and z-axis"};
72  Gaudi::Property<double> m_xing_x_b2{this, "HalfXing_x_b2", 1.e-6, "half-crossing in x for beam 2 at IP1, i.e. angle between beam 2 and z-axis"};
73  Gaudi::Property<double> m_xing_y_b1{this, "HalfXing_y_b1", 150.e-6, "half-crossing in y for beam 1 at IP1, i.e. angle between beam 1 and z-axis"};
74  Gaudi::Property<double> m_xing_y_b2{this, "HalfXing_y_b2", -152.e-6, "half-crossing in y for beam 2 at IP1, i.e. angle between beam 2 and z-axis"};
75  Gaudi::Property<double> m_dE{this, "deltaEOverE", 1.1E-4, "Delta_E/E theoretical value"}; // Delta_E/E theoretical value
76  Gaudi::Property<double> m_pbeam1{this, "pbeam1", 3500.0E3, "Beam 1 Momentum / MeV"};
77  Gaudi::Property<double> m_pbeam2{this, "pbeam2", 3500.0E3, "Beam 2 Momentum / MeV"};
78  Gaudi::Property<double> m_beam1ParticleMass{this, "Beam1ParticleMass", CLHEP::proton_mass_c2, "Mass of particle used in beam 1"};
79  Gaudi::Property<double> m_beam2ParticleMass{this, "Beam2ParticleMass", CLHEP::proton_mass_c2, "Mass of particle used in beam 2"};
80  };
81 
82 }
83 
84 #endif //> !ISF_HEPMC_GENEVENTBEAMEFFECTBOOSTER_H
Simulation::GenEventBeamEffectBooster::m_pbeam1
Gaudi::Property< double > m_pbeam1
Definition: GenEventBeamEffectBooster.h:76
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Simulation::GenEventBeamEffectBooster::m_xing_x_b2
Gaudi::Property< double > m_xing_x_b2
Definition: GenEventBeamEffectBooster.h:72
ATHRNG
Definition: IAthRNGSvc.h:23
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
GenParticle_fwd.h
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Simulation::GenEventBeamEffectBooster::initializeAthenaEvent
StatusCode initializeAthenaEvent()
Definition: GenEventBeamEffectBooster.cxx:53
Simulation::GenEventBeamEffectBooster::initializeGenEvent
StatusCode initializeGenEvent(CLHEP::HepLorentzRotation &transform, const EventContext &ctx) const
calculate the transformations that we want to apply to the particles in the current GenEvent
Definition: GenEventBeamEffectBooster.cxx:77
Simulation::GenEventBeamEffectBooster::m_dE
Gaudi::Property< double > m_dE
Definition: GenEventBeamEffectBooster.h:75
Simulation::GenEventBeamEffectBooster::m_xing_x_b1
Gaudi::Property< double > m_xing_x_b1
Definition: GenEventBeamEffectBooster.h:71
Simulation::GenEventBeamEffectBooster::m_sigma_px_b1
Gaudi::Property< double > m_sigma_px_b1
Definition: GenEventBeamEffectBooster.h:66
Simulation::GenEventBeamEffectBooster::m_beam1ParticleMass
Gaudi::Property< double > m_beam1ParticleMass
Definition: GenEventBeamEffectBooster.h:78
IGenEventManipulator.h
Simulation::GenEventBeamEffectBooster::m_xing_y_b1
Gaudi::Property< double > m_xing_y_b1
Definition: GenEventBeamEffectBooster.h:73
Simulation::GenEventBeamEffectBooster::initialize
StatusCode initialize() override final
Athena algtool's Hooks.
Definition: GenEventBeamEffectBooster.cxx:32
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAlgTool.h
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
Simulation::GenEventBeamEffectBooster::m_xing_y_b2
Gaudi::Property< double > m_xing_y_b2
Definition: GenEventBeamEffectBooster.h:74
Simulation::GenEventBeamEffectBooster::m_sigma_py_b2
Gaudi::Property< double > m_sigma_py_b2
Definition: GenEventBeamEffectBooster.h:69
Simulation::GenEventBeamEffectBooster::ATLAS_THREAD_SAFE
ATHRNG::RNGWrapper *m_randomEngine ATLAS_THREAD_SAFE
Slot-local RNG.
Definition: GenEventBeamEffectBooster.h:60
python.PhysicalConstants.proton_mass_c2
float proton_mass_c2
Definition: PhysicalConstants.py:87
Simulation::GenEventBeamEffectBooster::boostParticle
void boostParticle(HepMC::GenParticlePtr &p, const CLHEP::HepLorentzRotation &transform) const
apply boost to individual GenParticles
Definition: GenEventBeamEffectBooster.cxx:151
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
Simulation::GenEventBeamEffectBooster::GenEventBeamEffectBooster
GenEventBeamEffectBooster(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: GenEventBeamEffectBooster.cxx:23
Simulation::GenEventBeamEffectBooster::m_rndGenSvc
ServiceHandle< IAthRNGSvc > m_rndGenSvc
Definition: GenEventBeamEffectBooster.h:59
Simulation::GenEventBeamEffectBooster::finalize
StatusCode finalize() override final
Athena algtool's Hooks.
Definition: GenEventBeamEffectBooster.cxx:47
Simulation::GenEventBeamEffectBooster::m_pbeam2
Gaudi::Property< double > m_pbeam2
Definition: GenEventBeamEffectBooster.h:77
Simulation::GenEventBeamEffectBooster::m_randomEngineName
Gaudi::Property< std::string > m_randomEngineName
Name of the random number stream.
Definition: GenEventBeamEffectBooster.h:61
Simulation::GenEventBeamEffectBooster::m_sigma_px_b2
Gaudi::Property< double > m_sigma_px_b2
Definition: GenEventBeamEffectBooster.h:67
Simulation::GenEventBeamEffectBooster::m_sigma_py_b1
Gaudi::Property< double > m_sigma_py_b1
Definition: GenEventBeamEffectBooster.h:68
Simulation
Definition: BeamEffectsAlg.cxx:21
Simulation::GenEventBeamEffectBooster::m_applyDivergence
Gaudi::Property< bool > m_applyDivergence
Definition: GenEventBeamEffectBooster.h:63
Simulation::GenEventBeamEffectBooster::m_beam2ParticleMass
Gaudi::Property< double > m_beam2ParticleMass
Definition: GenEventBeamEffectBooster.h:79
Simulation::GenEventBeamEffectBooster
Definition: GenEventBeamEffectBooster.h:39
checker_macros.h
Define macros for attributes used to control the static checker.
Simulation::GenEventBeamEffectBooster::m_applyBoost
Gaudi::Property< bool > m_applyBoost
Definition: GenEventBeamEffectBooster.h:62
IAthRNGSvc.h
ServiceHandle< IAthRNGSvc >
Simulation::GenEventBeamEffectBooster::manipulate
StatusCode manipulate(HepMC::GenEvent &ge, const EventContext &ctx) const override final
modifies the given GenEvent
Definition: GenEventBeamEffectBooster.cxx:139