Geant4 11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ScintillationQuasiTrackInfo.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25// Class Description:
26//
27// Concrete implementation of G4VAuxiliaryTrackInformation used to store
28// metadata associated with a quasi-scintillation track generated during
29// the Scintillation process.
30//
31// This class is intended to be attached to a G4Track of G4QuasiOpticalPhoton
32// via G4Track::SetAuxiliaryTrackInformation(modelId, this) where modelId
33// is obtained by G4PhysicsModelCatalog::GetModelID("model_Scintillation")
34// The stored information can later be retrieved using:
35// G4Track::GetAuxiliaryTrackInformation(modelId).
36//
37#ifndef G4ScintillationQuasiTrackInfo_h
38#define G4ScintillationQuasiTrackInfo_h
39
40#include "G4Allocator.hh"
41#include "G4QuasiOpticalData.hh"
43
45{
46 public:
47 // Construct with scintillation quasi optical data and auxiliary information
49 G4double scint_time,
50 G4double rise_time);
51
52 ~G4ScintillationQuasiTrackInfo() override = default;
53
54 // Required by G4VAuxiliaryTrackInformation
55 void* operator new(size_t);
56 void operator delete(void* aScintillationTI);
57
58 // Copy Constructor/instruction
61 const G4ScintillationQuasiTrackInfo&) = default;
62
63 void Print() const override;
64
65 G4QuasiOpticalData GetQuasiOpticalData() const { return fQuasiOpticalData; }
66 G4double GetScintTime() const { return fScintTime; }
67 G4double GetRiseTime() const { return fRiseTime; }
68
69 // Static class allowing to check if a G4VAuxiliaryTrackInformation is a
70 // G4ScintillationQuasiTrackInfo and cast it without changing the pointer
71 // of the pointed data.
73 const G4VAuxiliaryTrackInformation* const);
74
75 private:
76 G4QuasiOpticalData fQuasiOpticalData; // Common optical data
77 G4double fScintTime{}; // Scintillation decay time constant
78 G4double fRiseTime{}; // Scintillation rise time constant
79};
80
81///
82// Inline methods
83// Implementation adapted from G4ScintillationTrackInformation
84///
85
86#if defined G4EM_ALLOC_EXPORT
89#else
92#endif
93
94inline void* G4ScintillationQuasiTrackInfo::operator new(size_t)
95{
96 if(aScintillationATIAllocator() == nullptr)
97 {
100 }
101 return (void*) aScintillationATIAllocator()->MallocSingle();
102}
103
104inline void G4ScintillationQuasiTrackInfo::operator delete(
105 void* aScintillationATI)
106{
107 aScintillationATIAllocator()->FreeSingle(
108 (G4ScintillationQuasiTrackInfo*) aScintillationATI);
109}
110
111#endif // G4ScintillationQuasiTrackInfo_h
G4DLLIMPORT G4Allocator< G4ScintillationQuasiTrackInfo > *& aScintillationATIAllocator()
double G4double
Definition G4Types.hh:83
#define G4DLLIMPORT
Definition G4Types.hh:69
#define G4DLLEXPORT
Definition G4Types.hh:68
~G4ScintillationQuasiTrackInfo() override=default
G4ScintillationQuasiTrackInfo(const G4ScintillationQuasiTrackInfo &)=default
G4ScintillationQuasiTrackInfo(const G4QuasiOpticalData &data, G4double scint_time, G4double rise_time)
static G4ScintillationQuasiTrackInfo * Cast(const G4VAuxiliaryTrackInformation *const)
G4ScintillationQuasiTrackInfo & operator=(const G4ScintillationQuasiTrackInfo &)=default
G4QuasiOpticalData GetQuasiOpticalData() const