SimG4Core
CustomPhysics
src
CMSSIMP.cc
Go to the documentation of this file.
1
2
#include "
SimG4Core/CustomPhysics/interface/CMSSIMP.h
"
3
#include "G4PhysicalConstants.hh"
4
#include "G4SystemOfUnits.hh"
5
#include "G4ParticleTable.hh"
6
7
#include "G4PhaseSpaceDecayChannel.hh"
8
#include "G4DecayTable.hh"
9
10
CMSSIMP
*
CMSSIMP::theInstance
=
nullptr
;
11
12
CMSSIMP
*
CMSSIMP::Definition
(
double
mass
) {
13
if
(
theInstance
!=
nullptr
)
14
return
theInstance
;
15
const
G4String
name
=
"chi"
;
16
// search in particle table]
17
G4ParticleTable* pTable = G4ParticleTable::GetParticleTable();
18
G4ParticleDefinition* anInstance = pTable->FindParticle(
name
);
19
if
(anInstance ==
nullptr
) {
20
// create particle
21
//
22
// Arguments for constructor are as follows
23
// name mass width charge
24
// 2*spin parity C-conjugation
25
// 2*Isospin 2*Isospin3 G-parity
26
// type lepton number baryon number PDG encoding
27
// stable lifetime decay table
28
// shortlived subType anti_encoding
29
30
anInstance =
new
G4ParticleDefinition(
31
name
,
mass
, 0, 0.0, 1, +1, 0, 0, -1, 0,
"simp"
, 0, +1, 9000006,
true
, -1.0,
nullptr
,
false
,
"nucleon"
);
32
}
33
theInstance
=
reinterpret_cast<
CMSSIMP
*
>
(anInstance);
34
return
theInstance
;
35
}
36
37
CMSSIMP
*
CMSSIMP::SIMPDefinition
(
double
mass
) {
return
Definition
(
mass
); }
38
39
CMSSIMP
*
CMSSIMP::SIMP
() {
40
return
Definition
(1 * GeV);
// will use correct mass if instance exists
41
}
CMSSIMP::SIMPDefinition
static CMSSIMP * SIMPDefinition(double mass)
Definition:
CMSSIMP.cc:37
CMSSIMP
Definition:
CMSSIMP.h:8
CMSSIMP::theInstance
static CMSSIMP * theInstance
Definition:
CMSSIMP.h:10
CMSSIMP::SIMP
static CMSSIMP * SIMP()
Definition:
CMSSIMP.cc:39
EgHLTOffHistBins_cfi.mass
mass
Definition:
EgHLTOffHistBins_cfi.py:34
CMSSIMP.h
Skims_PA_cff.name
name
Definition:
Skims_PA_cff.py:17
CMSSIMP::Definition
static CMSSIMP * Definition(double mass)
Definition:
CMSSIMP.cc:12
Generated for CMSSW Reference Manual by
1.8.14