ATLAS Offline Software
GenEventRotator.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_GENEVENTROTATOR_H
8 #define ISF_HEPMC_GENEVENTROTATOR_H 1
9 
10 // Base class headers
13 // Gaudi headers
14 #include "GaudiKernel/ServiceHandle.h"
15 // CLHEP headers
16 #include "CLHEP/Geometry/Transform3D.h"
17 #include "CLHEP/Vector/LorentzRotation.h"
18 
19 #include "AtlasHepMC/GenParticle.h"
20 
21 namespace Simulation {
22 
28  class GenEventRotator : public extends<AthAlgTool, IGenEventManipulator>
29  {
30 
31  public:
33  GenEventRotator( const std::string& t, const std::string& n, const IInterface* p );
34 
36  StatusCode initialize() override final;
37  StatusCode finalize() override final;
38 
39  StatusCode initializeAthenaEvent();// override final;
40 
42  StatusCode manipulate(HepMC::GenEvent& ge, const EventContext& ctx) const override final;
43  private:
45  StatusCode initializeGenEvent(CLHEP::HepLorentzRotation& transform, const EventContext& ctx) const;
47  void rotateParticle(HepMC::GenParticlePtr& p, const CLHEP::HepLorentzRotation& transform) const;
48 
49  Gaudi::Property<double> m_xangle{this, "xAngle", 0.0, "rotation about x-axis"};
50  Gaudi::Property<double> m_yangle{this, "yAngle", 0.0, "rotation about y-axis"};
51  Gaudi::Property<double> m_zangle{this, "zAngle", 0.0, "rotation about z-axis"};
52  };
53 
54 }
55 
56 #endif //> !ISF_HEPMC_GENEVENTROTATOR_H
Simulation::GenEventRotator::manipulate
StatusCode manipulate(HepMC::GenEvent &ge, const EventContext &ctx) const override final
modifies the given GenEvent
Definition: GenEventRotator.cxx:70
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
Simulation::GenEventRotator::GenEventRotator
GenEventRotator(const std::string &t, const std::string &n, const IInterface *p)
Constructor with parameters.
Definition: GenEventRotator.cxx:22
HepMC::GenParticlePtr
GenParticle * GenParticlePtr
Definition: GenParticle.h:37
Simulation::GenEventRotator::m_yangle
Gaudi::Property< double > m_yangle
Definition: GenEventRotator.h:50
Simulation::GenEventRotator::m_zangle
Gaudi::Property< double > m_zangle
Definition: GenEventRotator.h:51
Simulation::GenEventRotator::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: GenEventRotator.cxx:48
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
GenParticle.h
IGenEventManipulator.h
Simulation::GenEventRotator::initialize
StatusCode initialize() override final
Athena algtool's Hooks.
Definition: GenEventRotator.cxx:30
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::GenEventRotator::finalize
StatusCode finalize() override final
Athena algtool's Hooks.
Definition: GenEventRotator.cxx:37
Simulation::GenEventRotator
Definition: GenEventRotator.h:29
Simulation::GenEventRotator::m_xangle
Gaudi::Property< double > m_xangle
Definition: GenEventRotator.h:49
Simulation::GenEventRotator::initializeAthenaEvent
StatusCode initializeAthenaEvent()
Definition: GenEventRotator.cxx:43
Simulation
Definition: BeamEffectsAlg.cxx:21
Simulation::GenEventRotator::rotateParticle
void rotateParticle(HepMC::GenParticlePtr &p, const CLHEP::HepLorentzRotation &transform) const
apply rotations to individual GenParticles
Definition: GenEventRotator.cxx:82