ATLAS Offline Software
Loading...
Searching...
No Matches
ZeroLifetimePositioner.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef BEAMEFFECTS_ZEROLIFETIMEPOSITIONER_H
6#define BEAMEFFECTS_ZEROLIFETIMEPOSITIONER_H 1
7
8// FrameWork includes
9#include "GaudiKernel/ToolHandle.h"
12#include <vector>
13
14namespace Simulation {
15
21 class ZeroLifetimePositioner : public extends<AthService, Simulation::IZeroLifetimePatcher> {
22
23 public:
25 ZeroLifetimePositioner( const std::string& name, ISvcLocator* pSvcLocator );
26
28 StatusCode initialize() override final;
29 StatusCode finalize() override final;
30
32 virtual StatusCode applyWorkaround(HepMC::GenEvent& ge) const override final;
33
35 virtual StatusCode removeWorkaround(HepMC::GenEvent& ge) const override final;
36
37 private:
38 StatusCode manipulate(HepMC::GenEvent& ge, bool applyPatch, bool removePatch) const;
39 Gaudi::Property<bool> m_applyPatch{this, "ApplyPatch", false};
40 Gaudi::Property<bool> m_removePatch{this, "RemovePatch", false};
41 Gaudi::Property<std::vector<int>> m_pdgCodesToCheck{ this, "PDGCodesToCheck", {421,511,531} }; // Apply fix to neutral mesons with oscillations: B0, B0s, D0
42 };
43
44}
45
46#endif //> !BEAMEFFECTS_ZEROLIFETIMEPOSITIONER_H
Gaudi::Property< std::vector< int > > m_pdgCodesToCheck
virtual StatusCode removeWorkaround(HepMC::GenEvent &ge) const override final
Removes the workaround for zero-lifetime particles from the GenEvent.
ZeroLifetimePositioner(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters.
StatusCode finalize() override final
Athena algtool's Hooks.
StatusCode initialize() override final
Athena algtool's Hooks.
virtual StatusCode applyWorkaround(HepMC::GenEvent &ge) const override final
Applies the workaround for zero-lifetime particles to the GenEvent.
StatusCode manipulate(HepMC::GenEvent &ge, bool applyPatch, bool removePatch) const
modifies (displaces) the given GenEvent