ATLAS Offline Software
Loading...
Searching...
No Matches
G4SElectronRMinus.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5#include "G4SElectronRMinus.hh"
6// ######################################################################
7// ### SElectronRMinus ###
8// ######################################################################
9
10G4SElectronRMinus* G4SElectronRMinus::theInstance = NULL;
11
12G4SElectronRMinus* G4SElectronRMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived)
13{
14
15 if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) )
16 {
17 G4ExceptionDescription description;
18 description << "Trying to redefine the G4SElectronR Minus properties after it has been constructed is not allowed";
19 G4Exception("G4SElectronRMinus", "FailedRedefinition", FatalException, description);
20 abort();
21 }
22
23 if (theInstance != 0)
24 {
25 return theInstance;
26 }
27
28
29 // Arguments for constructor are as follows
30 // name mass width charge
31 // 2*spin parity C-conjugation
32 // 2*Isospin 2*Isospin3 G-parity
33 // type lepton number baryon number PDG encoding
34 // stable lifetime decay table
35 // shortlived subType anti_encoding
36 if (mass >= 0) {
37 G4ParticleDefinition* anInstance =
38 new G4ParticleDefinition("s_e_minus_R", mass, width, charge,
39 0, 0, 0,
40 0, 0, 0,
41 "slepton", 1, 0, PDG,
42 stable, lifetime, NULL,
43 shortlived, "SElectronRMinus");
44
45 theInstance = reinterpret_cast<G4SElectronRMinus*>(anInstance);
46 return theInstance;
47 }
48 else
49 {
50 G4ExceptionDescription description;
51 description << "Trying to create a particle with default constructor is not allowed";
52 G4Exception("G4SElectronRMinus", "DefaultConstructorCalled", FatalException, description);
53 abort();
54 }
55}
double charge(const T &p)
Definition AtlasPID.h:997
const double width
struct PDG20 PDG
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91