ATLAS Offline Software
SimulationEnergies.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 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.
19 class G4Step;
20 class G4ParticleDefinition;
21 class G4Track;
22 
23 namespace 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  G4bool ParticleIsNeutrino( G4ParticleDefinition* particle ) const;
122 
123  std::unique_ptr<G4Step> CreateFakeStep(G4Track* a_track, G4double a_energy) const;
124 
125  }; // class SimulationEnergies
126 
127 } // namespace CaloG4
128 
129 #endif // CaloG4_SimulationEnergies_H
CaloG4::SimulationEnergies::Energies
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...
CaloG4::SimulationEnergies::kNumberOfEnergyCategories
@ kNumberOfEnergyCategories
Definition: SimulationEnergies.h:75
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
CaloG4::SimulationEnergies::kEm
@ kEm
Definition: SimulationEnergies.h:66
CaloG4::SimulationEnergies::Classify
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...
CaloG4::SimulationEnergies::measurableEnergyV2
G4double measurableEnergyV2(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, G4double kineticEnergy) const
CaloG4::SimulationEnergies
Definition: SimulationEnergies.h:47
CaloG4::SimulationEnergies::CreateFakeStep
std::unique_ptr< G4Step > CreateFakeStep(G4Track *a_track, G4double a_energy) const
CaloG4::SimulationEnergies::ParticleIsNeutrino
G4bool ParticleIsNeutrino(G4ParticleDefinition *particle) const
CaloG4::SimulationEnergies::kNonEm
@ kNonEm
Definition: SimulationEnergies.h:67
CaloG4::SimulationEnergies::kInvisible0
@ kInvisible0
Definition: SimulationEnergies.h:68
CaloG4::SimulationEnergies::measurableEnergy
G4double measurableEnergy(const G4ParticleDefinition *particleDef, G4int PDGEncoding, G4double totalEnergy, G4double kineticEnergy) const
Some private methods for internal calculations:
CaloG4::SimulationEnergies::kEscaped
@ kEscaped
Definition: SimulationEnergies.h:74
CaloG4
Definition: EscapedEnergyRegistry.h:21
CaloG4::SimulationEnergies::ClassifyResult_t
This defines the results returned by the energy classification; these detailed results are mostly use...
Definition: SimulationEnergies.h:81
CaloG4::SimulationEnergies::ClassifyResult_t::energy
std::map< eEnergyCategory, G4double > energy
Definition: SimulationEnergies.h:82
CaloG4::SimulationEnergies::~SimulationEnergies
virtual ~SimulationEnergies()
CaloG4::SimulationEnergies::SimulationEnergies
SimulationEnergies()
CaloG4::SimulationEnergies::ProcessEscapedEnergy
G4bool ProcessEscapedEnergy(G4Step *fakeStep) const
CaloG4::SimulationEnergies::eEnergyCategory
eEnergyCategory
Accessing detailed information:
Definition: SimulationEnergies.h:66