Geant4
11.4.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VMoleculeCounterInternalBase.cc
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
//
26
// Author: Christian Velten (2025)
27
28
#include "
G4VMoleculeCounterInternalBase.hh
"
29
#include "
G4SystemOfUnits.hh
"
30
31
namespace
G4
32
{
33
namespace
MoleculeCounter
34
{
35
36
G4bool
FixedTimeComparer::operator()
(
const
G4double
& a,
const
G4double
& b)
const
37
{
38
if
(std::fabs(a - b) <
fPrecision
) {
39
return
false
;
40
}
41
return
a < b;
42
}
43
44
G4ThreadLocal
G4double
FixedTimeComparer::fPrecision
= 0.1 * picosecond;
45
}
// namespace MoleculeCounter
46
}
// namespace G4
47
48
G4ThreadLocal
G4int
G4VMoleculeCounterInternalBase::_createdCounters = 0;
49
50
//------------------------------------------------------------------------------
51
52
G4VMoleculeCounterInternalBase::G4VMoleculeCounterInternalBase() : fId(_createdCounters++) {}
53
54
G4VMoleculeCounterInternalBase::G4VMoleculeCounterInternalBase(
const
G4String& name)
55
: fId(_createdCounters++), fName(
name
)
56
{}
57
58
//------------------------------------------------------------------------------
59
60
void
G4VMoleculeCounterInternalBase::SetFixedTimePrecision
(
G4double
precision)
61
{
62
G4::MoleculeCounter::FixedTimeComparer::fPrecision
= precision;
63
}
G4SystemOfUnits.hh
G4double
double G4double
Definition
G4Types.hh:83
G4bool
bool G4bool
Definition
G4Types.hh:86
G4int
int G4int
Definition
G4Types.hh:85
G4VMoleculeCounterInternalBase.hh
G4VMoleculeCounterInternalBase::SetFixedTimePrecision
static void SetFixedTimePrecision(G4double)
Definition
G4VMoleculeCounterInternalBase.cc:60
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition
G4InuclParticleNames.hh:76
G4::MoleculeCounter
Definition
G4MoleculeCounterTemplates.hh:41
G4
Definition
G4MoleculeCounterTemplates.hh:39
G4::MoleculeCounter::FixedTimeComparer::operator()
G4bool operator()(const G4double &a, const G4double &b) const
Definition
G4VMoleculeCounterInternalBase.cc:36
G4::MoleculeCounter::FixedTimeComparer::fPrecision
static G4ThreadLocal G4double fPrecision
Definition
G4VMoleculeCounterInternalBase.hh:51
G4ThreadLocal
#define G4ThreadLocal
Definition
tls.hh:77
geant4-v11.4.0
source
processes
electromagnetic
dna
molecules
management
src
G4VMoleculeCounterInternalBase.cc
Generated by
1.16.1