ATLAS Offline Software
Loading...
Searching...
No Matches
G4SMuonLMinus.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 "G4SMuonLMinus.hh"
6// ######################################################################
7// ### SMuonLMinus ###
8// ######################################################################
9
10
11G4SMuonLMinus* G4SMuonLMinus::theInstance = NULL;
12
13G4SMuonLMinus* G4SMuonLMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived)
14{
15
16 if (theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) )
17 {
18 G4ExceptionDescription description;
19 description << "Trying to redefine the G4SMuonL Minus properties after it has been constructed is not allowed";
20 G4Exception("G4SMuonLMinus", "FailedRedefinition", FatalException, description);
21 abort();
22 }
23
24 if (theInstance != 0)
25 {
26 return theInstance;
27 }
28
29
30 // Arguments for constructor are as follows
31 // name mass width charge
32 // 2*spin parity C-conjugation
33 // 2*Isospin 2*Isospin3 G-parity
34 // type lepton number baryon number PDG encoding
35 // stable lifetime decay table
36 // shortlived subType anti_encoding
37 if (mass >= 0) {
38 G4ParticleDefinition* anInstance =
39 new G4ParticleDefinition("s_mu_minus_L", mass, width, charge,
40 0, 0, 0,
41 0, 0, 0,
42 "slepton", 1, 0, PDG,
43 stable, lifetime, NULL,
44 shortlived, "SMuonLMinus");
45
46 theInstance = reinterpret_cast<G4SMuonLMinus*>(anInstance);
47 return theInstance;
48 }
49 else
50 {
51 G4ExceptionDescription description;
52 description << "Trying to create a particle with default constructor is not allowed";
53 G4Exception("G4SMuonLMinus", "DefaultConstructorCalled", FatalException, description);
54 abort();
55 }
56}
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