ATLAS Offline Software
Loading...
Searching...
No Matches
LArFastShower.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARG4FASTSIMULATION_LARFASTSHOWER_H
6#define LARG4FASTSIMULATION_LARFASTSHOWER_H
7
8// STL includes
9#include <string>
10#include <map>
11
12// Geant4 includes
13#include "G4VFastSimulationModel.hh"
14
15// Local includes
17
18// Forward declarations
21
24
25
27class LArFastShower : public G4VFastSimulationModel
28{
29public:
30
32 LArFastShower(const std::string& name, G4Region* region, const FastShowerConfigStruct& config,
33 IFastSimDedicatedSD* fastSimDedicatedSD);
34
36 virtual ~LArFastShower() {}
37
41 G4bool IsApplicable(const G4ParticleDefinition&) override;
42
46 virtual G4bool ModelTrigger(const G4FastTrack &) override;
47
48 virtual G4bool ForcedAccept(const G4FastTrack &);
49 virtual G4bool ForcedDeny (const G4FastTrack &);
50
53 void DoIt(const G4FastTrack&, G4FastStep&) override;
54
55protected:
56
59
61 void KillParticle(const G4FastTrack&, G4FastStep&);
63 void UseShowerLib(const G4FastTrack&, G4FastStep&);
64
66 virtual G4bool CheckContainment(const G4FastTrack &fastTrack);
67
68 std::unique_ptr<const HepMC::GenEvent> GetGenEvent(const G4FastTrack &fastTrack);
69
71 bool flagToShowerLib ( const G4ParticleDefinition& particleType ) const;
73 double maxEneToShowerLib( const G4ParticleDefinition& particleType ) const;
75 double minEneToShowerLib( const G4ParticleDefinition& particleType ) const;
76
77 bool generateFSStartingPoint( std::unique_ptr<const HepMC::GenEvent> &ge) const;
78
79private:
81
86
87 // data members for configuration
89 std::shared_ptr<HepMC3::WriterAscii> m_starting_points_file;
90 std::string m_detector_tag_str;
91 std::map<std::string,int> m_detmap;
92
94 std::map<int,bool> m_applicableMap;
95
96};
97
98#endif //LARG4FASTSIMULATION_LARFASTSHOWER_H
This is the interface for the fast simulation dedicated sensitive detector.
ILArG4ShowerLibSvc * showerLibSvc()
void KillParticle(const G4FastTrack &, G4FastStep &)
Method to kill a particle and deposit its energy using exponential decay function.
ILArG4ShowerLibSvc * m_showerLibSvc
Pointer to the shower library service.
IFastSimDedicatedSD * fastShowerSD()
virtual G4bool ForcedAccept(const G4FastTrack &)
If it returns true, the particle will be parameterized without further checks.
std::shared_ptr< HepMC3::WriterAscii > m_starting_points_file
void UseShowerLib(const G4FastTrack &, G4FastStep &)
Function for the application of shower library.
LArFastShower(const std::string &name, G4Region *region, const FastShowerConfigStruct &config, IFastSimDedicatedSD *fastSimDedicatedSD)
Constructor.
virtual G4bool ForcedDeny(const G4FastTrack &)
If it returns true, the particle will be returned to G4 without further checks.
bool generateFSStartingPoint(std::unique_ptr< const HepMC::GenEvent > &ge) const
bool flagToShowerLib(const G4ParticleDefinition &particleType) const
get switch for frozen showers
double minEneToShowerLib(const G4ParticleDefinition &particleType) const
get upper energy limit for frozen showers
double maxEneToShowerLib(const G4ParticleDefinition &particleType) const
get lower energy limit for frozen showers
std::map< int, bool > m_applicableMap
virtual G4bool ModelTrigger(const G4FastTrack &) override
Determines the applicability of the fast sim model to this particular track.
std::unique_ptr< const HepMC::GenEvent > GetGenEvent(const G4FastTrack &fastTrack)
bool m_generate_starting_points
G4bool IsApplicable(const G4ParticleDefinition &) override
Determines the applicability of the fast sim model to this particle type Called once for each track p...
const FastShowerConfigStruct m_configuration
std::string m_detector_tag_str
virtual ~LArFastShower()
Destructor.
void DoIt(const G4FastTrack &, G4FastStep &) override
Assigns the track to the appropriate method for application of the fast simulation.
virtual G4bool CheckContainment(const G4FastTrack &fastTrack)
Function to check the containment of a shower within a regular detector region.
std::map< std::string, int > m_detmap
IFastSimDedicatedSD * m_fastSimDedicatedSD
Shower library sensitive detector for this shower.