ATLAS Offline Software
Loading...
Searching...
No Matches
Geant4SimSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ISF_GEANT4SIMSVC_H
6#define ISF_GEANT4SIMSVC_H 1
7
8// STL includes
9#include <string>
10
11// Gaudi
12#include "GaudiKernel/ServiceHandle.h"
13#include "GaudiKernel/ToolHandle.h"
14
15// ISF includes
21
22namespace iGeant4 {
23
28
29 public:
30 //** Constructor with parameters */
31 Geant4SimSvc(const std::string& name, ISvcLocator* pSvcLocator);
32
34 virtual ~Geant4SimSvc();
35
37 virtual StatusCode initialize() override;
38 virtual StatusCode finalize() override;
39
44
46 virtual StatusCode simulate(ISF::ISFParticle& isp,
47 McEventCollection* mcEventCollection,
48 std::shared_ptr<HitCollectionMap>) override;
49
51 virtual StatusCode simulateVector(
52 const ISF::ISFParticleVector& particles,
53 McEventCollection* mcEventCollection, std::shared_ptr<HitCollectionMap> hitCollections,
54 McEventCollection* shadowTruth = nullptr) override;
55
57 virtual StatusCode setupEvent(HitCollectionMap&) override;
58
60 virtual StatusCode releaseEvent(HitCollectionMap&) override;
61
62 private:
65
66 PublicToolHandle<ISF::ISimulatorTool> m_simulatorTool{this, "SimulatorTool",
67 "", ""};
68
71};
72}
73
74
75#endif //> !ISF_Geant4SimSvc_H
Define macros for attributes used to control the static checker.
#define ATLAS_NOT_THREAD_SAFE
getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats
Small wrapper around hit collection map to facilitate accessing the hit collection.
Base class for an ISimulatorSvc which requires a Geant4 UserInfo object.
virtual StatusCode simulateVector(const ISFParticleVector &particles, McEventCollection *mcEventCollection, std::shared_ptr< HitCollectionMap > hitCollections, McEventCollection *)
Simulation call for vectors of particles.
virtual StatusCode simulate(ISFParticle &, McEventCollection *, std::shared_ptr< HitCollectionMap >)=0
Simulation call for individual particles.
virtual StatusCode setupEvent(HitCollectionMap &)=0
Setup Event chain - in case of a begin-of event action is needed.
virtual StatusCode releaseEvent(HitCollectionMap &)=0
Release Event chain - in case of an end-of event action is needed.
The generic ISF particle definition,.
Definition ISFParticle.h:42
This defines the McEventCollection, which is really just an ObjectVector of McEvent objectsFile: Gene...
virtual StatusCode simulate(ISF::ISFParticle &isp, McEventCollection *mcEventCollection, std::shared_ptr< HitCollectionMap >) override
Simulation Call.
Geant4SimSvc()
Default constructor.
virtual StatusCode releaseEvent(HitCollectionMap &) override
Release Event chain - in case of an end-of event action is needed.
Geant4SimSvc(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
virtual StatusCode setupEvent(HitCollectionMap &) override
Setup Event chain - in case of a begin-of event action is needed.
PublicToolHandle< ISF::ISimulatorTool > m_simulatorTool
virtual StatusCode finalize() override
framework methods
virtual StatusCode simulateVector(const ISF::ISFParticleVector &particles, McEventCollection *mcEventCollection, std::shared_ptr< HitCollectionMap > hitCollections, McEventCollection *shadowTruth=nullptr) override
Simulation Call for vector of ISF particles.
ISF::BaseSimulatorG4Tool * m_simulatorG4Tool
pointer to the downcasted G4 simulator tool
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
void initialize()