ATLAS Offline Software
Loading...
Searching...
No Matches
SimulationEnergies.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef CaloG4_SimulationEnergies_H
6#define CaloG4_SimulationEnergies_H
7
8#include "G4TrackStatus.hh"
9#include "G4ParticleDefinition.hh"
10#include "G4DynamicParticle.hh"
11#include "G4ThreeVector.hh"
12#include "globals.hh"
13
14#include <map>
15#include <memory>
16#include <vector>
17
18// Forward declarations.
19class G4Step;
20class G4ParticleDefinition;
21class G4Track;
22
23namespace CaloG4
24{
25
47 {
48 public:
49
52
56 void Energies( const G4Step* , std::vector<G4double> & ) const;
57
66 { kEm = 0,
69 /* 12-Aug-2009 we compared three different techniques
70 kInvisible1, // to determine the energy lost
71 kInvisible2, // due to "invisible" processes in the detector
72 and chose one of them for production runs
73 */
76
81 typedef struct {
82 std::map<eEnergyCategory, G4double> energy;
84
85 /* 12-Aug-2009 We keep only info about energy in ClassifyResult_t
86 for production runs (see above).
87 typedef struct {
88 G4double time;
89 std::map<eEnergyCategory, G4double> energy;
90 G4TrackStatus trackStatus;
91 const G4ParticleDefinition* particle;
92 const G4DynamicParticle* dynamicParticle;
93 G4String processName;
94 } ClassifyResult_t;
95 */
96
102 ClassifyResult_t Classify( const G4Step*, const G4bool processEscaped = true ) const;
103
104 private:
105
107
108 G4double measurableEnergy(const G4ParticleDefinition *particleDef,
109 G4int PDGEncoding,
110 G4double totalEnergy,
111 G4double kineticEnergy) const;
112
113 G4double measurableEnergyV2(const G4ParticleDefinition *particleDef,
114 G4int PDGEncoding,
115 G4double totalEnergy,
116 G4double kineticEnergy) const;
117
118 // Escaped energy requires special processing.
119 G4bool ProcessEscapedEnergy( G4Step* fakeStep ) const;
120
121 std::unique_ptr<G4Step> CreateFakeStep(G4Track* a_track, G4double a_energy) const;
122
123 }; // class SimulationEnergies
124
125} // namespace CaloG4
126
127#endif // CaloG4_SimulationEnergies_H
ClassifyResult_t Classify(const G4Step *, const G4bool processEscaped=true) const
This method performs the actual function of this class: It classifies the components of the energy de...
std::unique_ptr< G4Step > CreateFakeStep(G4Track *a_track, G4double a_energy) const
G4bool ProcessEscapedEnergy(G4Step *fakeStep) const
G4double measurableEnergyV2(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, G4double kineticEnergy) const
void Energies(const G4Step *, std::vector< G4double > &) const
The simple method to call from a calibration calculator: Examine the G4Step and return the energies r...
eEnergyCategory
Accessing detailed information:
G4double measurableEnergy(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, G4double kineticEnergy) const
Some private methods for internal calculations:
This defines the results returned by the energy classification; these detailed results are mostly use...
std::map< eEnergyCategory, G4double > energy