ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
BeamEffects
src
BeamSpotReweightingAlg.h
Go to the documentation of this file.
1
// Dear emacs, this is -*- C++ -*-
2
3
/*
4
Copyright (C) 2002-2025 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
11
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
12
13
// Athena includes
14
#include "
StoreGate/ReadHandleKey.h
"
15
#include "
StoreGate/WriteHandleKey.h
"
16
#include "
StoreGate/WriteDecorHandleKey.h
"
17
#include "
xAODEventInfo/EventInfo.h
"
18
#include "
BeamSpotConditionsData/BeamSpotData.h
"
19
#include "
GeneratorObjects/McEventCollection.h
"
20
21
// Gaudi includes
22
#include "GaudiKernel/ToolHandle.h"
23
#include "GaudiKernel/PhysicalConstants.h"
24
25
// Forward declarations
26
#include "
AtlasHepMC/GenEvent_fwd.h
"
27
#include "
AtlasHepMC/GenVertex_fwd.h
"
28
29
namespace
Simulation
30
{
31
37
class
BeamSpotReweightingAlg
:
public
AthReentrantAlgorithm
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
56
HepMC
::ConstGenVertexPtr
GetSignalProcessVertex
(
const
HepMC
::GenEvent& ge)
const
;
57
58
SG
::ReadHandleKey<
McEventCollection
>
m_inputMcEventCollection
{
this
,
"InputMcEventCollection"
,
"TruthEvent"
,
"The name of the input McEventCollection"
};
59
60
SG::ReadHandleKey<xAOD::EventInfo>
m_eventInfo
{
this
,
"EventInfo"
,
"EventInfo"
,
"EventInfo object in SG"
};
61
62
SG::WriteDecorHandleKey<xAOD::EventInfo>
m_beamSpotWeight
{
this
,
"beamSpotWeight"
,
m_eventInfo
,
"beamSpotWeight"
,
"Decoration for a beam spot weight when reweighting the beam spot size"
};
63
64
SG::ReadCondHandleKey<InDet::BeamSpotData>
m_beamSpotKey
{
this
,
"BeamSpotKey"
,
"BeamSpotData"
,
"SG key for beam spot"
};
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
AthReentrantAlgorithm.h
BeamSpotData.h
GenEvent_fwd.h
GenVertex_fwd.h
McEventCollection.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
McEventCollection
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
Definition
McEventCollection.h:31
SG::ReadCondHandleKey
Definition
ReadCondHandleKey.h:21
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
Simulation::BeamSpotReweightingAlg::m_inputMcEventCollection
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollection
Definition
BeamSpotReweightingAlg.h:58
Simulation::BeamSpotReweightingAlg::m_eventInfo
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
Definition
BeamSpotReweightingAlg.h:60
Simulation::BeamSpotReweightingAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's interface method execute().
Definition
BeamSpotReweightingAlg.cxx:43
Simulation::BeamSpotReweightingAlg::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition
BeamSpotReweightingAlg.h:64
Simulation::BeamSpotReweightingAlg::initialize
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize().
Definition
BeamSpotReweightingAlg.cxx:29
Simulation::BeamSpotReweightingAlg::~BeamSpotReweightingAlg
virtual ~BeamSpotReweightingAlg()=default
Destructor.
Simulation::BeamSpotReweightingAlg::m_input_beam_sigma_z
Gaudi::Property< float > m_input_beam_sigma_z
Definition
BeamSpotReweightingAlg.h:66
Simulation::BeamSpotReweightingAlg::GetSignalProcessVertex
HepMC::ConstGenVertexPtr GetSignalProcessVertex(const HepMC::GenEvent &ge) const
Ensure that the GenEvent::signal_process_vertex has been set.
Definition
BeamSpotReweightingAlg.cxx:134
Simulation::BeamSpotReweightingAlg::BeamSpotReweightingAlg
BeamSpotReweightingAlg(const std::string &name, ISvcLocator *pSvcLocator)
Definition
BeamSpotReweightingAlg.cxx:23
Simulation::BeamSpotReweightingAlg::m_beamSpotWeight
SG::WriteDecorHandleKey< xAOD::EventInfo > m_beamSpotWeight
Definition
BeamSpotReweightingAlg.h:62
const
HepMC
Definition
Barcode.h:13
SG
Forward declaration.
Definition
CaloCellPacker_400_500.h:32
Simulation
Definition
BeamEffectsAlg.cxx:21
private
#define private
Definition
testRead.cxx:27
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0