ATLAS Offline Software
BeamEffectsAlg.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef BEAMEFFECTS_BEAMEFFECTSALG_H
8 #define BEAMEFFECTS_BEAMEFFECTSALG_H
9 
10 // base class header
12 
13 // Athena includes
17 
18 // Gaudi includes
19 #include "GaudiKernel/ToolHandle.h"
21 
22 // Forward declarations
23 class McEventCollection;
25 namespace SimTesting {
26  class BeamEffectsAlg_test;
27 }
28 
29 namespace Simulation
30 {
31 
40  {
41 
43 
44  public:
45 
46  //** Constructor with parameters */
47  BeamEffectsAlg( const std::string& name, ISvcLocator* pSvcLocator );
48 
50  virtual ~BeamEffectsAlg() = default;
51 
53  virtual StatusCode initialize() override final;
54 
56  virtual StatusCode execute(const EventContext& ctx) const override final;
57 
59  virtual bool isClonable() const override final { return true; }
60 
61  private:
62 
64  StatusCode patchSignalProcessVertex(HepMC::GenEvent& ge) const;
65  SG::ReadHandleKey<McEventCollection> m_inputMcEventCollection{this, "InputMcEventCollection", "GEN_EVENT", "The name of the input McEventCollection"};
66  SG::WriteHandleKey<McEventCollection> m_outputMcEventCollection{this, "OutputMcEventCollection", "BeamTruthEvent", "The name of the output McEventCollection"};
67 
68  // Dummy xAOD::EventInfo dependency for McEventCollection P->T conversion
69  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfo", "EventInfo", "The name of the input xAOD::EventInfo"};
70 
72  ToolHandleArray<IGenEventManipulator> m_genEventManipulators{this, "GenEventManipulators", {}, "BeamEffectsAlg will send the read-in GenEvent to each individual IGenEventManipulator."};
73 
75  Gaudi::Property<bool> m_ISFRun{this, "ISFRun", false, "Temporary property so that we don't change the output in the initial switch to this code"};
76 
77  };
78 
79 }
80 
81 #endif // BEAMEFFECTS_BEAMEFFECTSALG_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Simulation::BeamEffectsAlg::~BeamEffectsAlg
virtual ~BeamEffectsAlg()=default
Destructor.
Simulation::BeamEffectsAlg::BeamEffectsAlg
BeamEffectsAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: BeamEffectsAlg.cxx:23
Simulation::BeamEffectsAlg
Definition: BeamEffectsAlg.h:40
Simulation::BeamEffectsAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's interface method execute()
Definition: BeamEffectsAlg.cxx:43
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< McEventCollection >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
Simulation::BeamEffectsAlg::isClonable
virtual bool isClonable() const override final
Can clone for AthenaMT.
Definition: BeamEffectsAlg.h:59
IGenEventManipulator.h
SG::WriteHandleKey< McEventCollection >
Simulation::BeamEffectsAlg::patchSignalProcessVertex
StatusCode patchSignalProcessVertex(HepMC::GenEvent &ge) const
Ensure that the GenEvent::signal_process_vertex has been set.
Definition: BeamEffectsAlg.cxx:69
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GenEvent_fwd.h
Simulation::BeamEffectsAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: BeamEffectsAlg.h:69
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
SimTesting
Definition: BeamEffectsAlg.h:25
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
EventInfo.h
Simulation::BeamEffectsAlg::m_inputMcEventCollection
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollection
Definition: BeamEffectsAlg.h:65
Simulation::BeamEffectsAlg::m_genEventManipulators
ToolHandleArray< IGenEventManipulator > m_genEventManipulators
Event manipulator tools (executed in given order)
Definition: BeamEffectsAlg.h:72
Simulation::BeamEffectsAlg::initialize
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize()
Definition: BeamEffectsAlg.cxx:29
Simulation
Definition: BeamEffectsAlg.cxx:21
Simulation::BeamEffectsAlg::m_ISFRun
Gaudi::Property< bool > m_ISFRun
Temporary property so that we don't change the output in the initial switch to this code.
Definition: BeamEffectsAlg.h:75
Simulation::BeamEffectsAlg::BeamEffectsAlg_test
friend class SimTesting::BeamEffectsAlg_test
Definition: BeamEffectsAlg.h:42
Simulation::BeamEffectsAlg::m_outputMcEventCollection
SG::WriteHandleKey< McEventCollection > m_outputMcEventCollection
Definition: BeamEffectsAlg.h:66