ATLAS Offline Software
Loading...
Searching...
No Matches
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
12
13// Athena includes
20
21// Gaudi includes
22#include "GaudiKernel/ToolHandle.h"
23#include "GaudiKernel/PhysicalConstants.h"
24
25// Forward declarations
28
29namespace 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
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
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Property holding a SG store/key/clid from which a WriteHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollection
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfo
virtual StatusCode execute(const EventContext &ctx) const override final
Athena algorithm's interface method execute()
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
virtual StatusCode initialize() override final
Athena algorithm's interface method initialize()
virtual ~BeamSpotReweightingAlg()=default
Destructor.
Gaudi::Property< float > m_input_beam_sigma_z
HepMC::ConstGenVertexPtr GetSignalProcessVertex(const HepMC::GenEvent &ge) const
Ensure that the GenEvent::signal_process_vertex has been set.
BeamSpotReweightingAlg(const std::string &name, ISvcLocator *pSvcLocator)
SG::WriteDecorHandleKey< xAOD::EventInfo > m_beamSpotWeight
Forward declaration.
#define private