ATLAS Offline Software
BeamSpotReweightingAlg.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_BeamSpotReweightingAlg_H
8 #define BEAMEFFECTS_BeamSpotReweightingAlg_H
9 
10 // base class header
12 
13 // Athena includes
20 
21 // Gaudi includes
22 #include "GaudiKernel/ToolHandle.h"
23 #include "GaudiKernel/PhysicalConstants.h"
24 
25 // Forward declarations
28 
29 namespace Simulation
30 {
31 
38  {
39  public:
40 
41  //** Constructor with parameters */
42  BeamSpotReweightingAlg( const std::string& name, ISvcLocator* pSvcLocator );
43 
45  virtual ~BeamSpotReweightingAlg() = default;
46 
48  virtual StatusCode initialize() override final;
49 
51  virtual StatusCode execute(const EventContext& ctx) const override final;
52 
53  private:
54 
57 
58  SG::ReadHandleKey<McEventCollection> m_inputMcEventCollection { this, "InputMcEventCollection", "TruthEvent", "The name of the input McEventCollection" };
59 
60  SG::WriteDecorHandleKey<xAOD::EventInfo> m_beamSpotWeight {this, "beamSpotWeight", "EventInfo.beamSpotWeight", "Decoration for a beam spot weight when reweighting the beam spot size" };
61 
62  SG::ReadCondHandleKey<InDet::BeamSpotData> m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" };
63 
64  SG::ReadHandleKey<xAOD::EventInfo> m_eventInfo { this, "EventInfo", "EventInfo", "EventInfo object in SG" };
65 
66  Gaudi::Property<float> m_input_beam_sigma_z{this, "Input_beam_sigma_z", 42*Gaudi::Units::mm, "Beam spot sigma of the input HIT file to be reweighted"};
67  };
68 
69 }
70 
71 #endif // BEAMEFFECTS_BeamSpotReweightingAlg_H
Simulation::BeamSpotReweightingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's interface method execute()
Definition: BeamSpotReweightingAlg.cxx:43
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SG::WriteDecorHandleKey< xAOD::EventInfo >
Simulation::BeamSpotReweightingAlg::~BeamSpotReweightingAlg
virtual ~BeamSpotReweightingAlg()=default
Destructor.
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
Simulation::BeamSpotReweightingAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: BeamSpotReweightingAlg.h:62
Simulation::BeamSpotReweightingAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition: BeamSpotReweightingAlg.h:64
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
SG::ReadHandleKey< xAOD::EventInfo >
Simulation::BeamSpotReweightingAlg::GetSignalProcessVertex
HepMC::ConstGenVertexPtr GetSignalProcessVertex(const HepMC::GenEvent &ge) const
Ensure that the GenEvent::signal_process_vertex has been set.
Definition: BeamSpotReweightingAlg.cxx:132
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
Simulation::BeamSpotReweightingAlg::initialize
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize()
Definition: BeamSpotReweightingAlg.cxx:29
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
McEventCollection.h
Simulation::BeamSpotReweightingAlg::BeamSpotReweightingAlg
BeamSpotReweightingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition: BeamSpotReweightingAlg.cxx:23
Simulation::BeamSpotReweightingAlg::m_inputMcEventCollection
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollection
Definition: BeamSpotReweightingAlg.h:58
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
GenVertex_fwd.h
GenEvent_fwd.h
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
Definition: McEventCollection.h:33
Simulation::BeamSpotReweightingAlg
Definition: BeamSpotReweightingAlg.h:38
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
Simulation::BeamSpotReweightingAlg::m_input_beam_sigma_z
Gaudi::Property< float > m_input_beam_sigma_z
Definition: BeamSpotReweightingAlg.h:66
EventInfo.h
SG::ReadCondHandleKey< InDet::BeamSpotData >
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
Simulation::BeamSpotReweightingAlg::m_beamSpotWeight
SG::WriteDecorHandleKey< xAOD::EventInfo > m_beamSpotWeight
Definition: BeamSpotReweightingAlg.h:60
HepMC
Definition: Barcode.h:14
Simulation
Definition: BeamEffectsAlg.cxx:21
BeamSpotData.h
HepMC::ConstGenVertexPtr
const HepMC::GenVertex * ConstGenVertexPtr
Definition: GenVertex.h:60