ATLAS Offline Software
G4SMuonLPlus.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 "G4SMuonLPlus.hh"
6 // ######################################################################
7 // ### SMuonLPlus ###
8 // ######################################################################
9 
10 G4SMuonLPlus* G4SMuonLPlus::theInstance = NULL;
11 
12 G4SMuonLPlus* G4SMuonLPlus::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 G4SMuonL Plus properties after it has been constructed is not allowed";
19  G4Exception("G4SMuonLPlus", "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 
38  G4ParticleDefinition* anInstance =
39  new G4ParticleDefinition("s_mu_plus_L", mass, width, charge,
40  0, 0, 0,
41  0, 0, 0,
42  "slepton", 1, 0, PDG,
43  stable, lifetime, NULL,
44  shortlived, "SMuonLPlus");
45 
46  theInstance = reinterpret_cast<G4SMuonLPlus*>(anInstance);
47  return theInstance;
48 
49  }
50  else
51  {
52  G4ExceptionDescription description;
53  description << "Trying to create a particle with default constructor is not allowed";
54  G4Exception("G4SMuonLPlus", "DefaultConstructorCalled", FatalException, description);
55  abort();
56  }
57 }
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
PDG20
Definition: Trigger/TrigHypothesis/TrigBphysHypo/src/Constants.h:9
MCTruthPartClassifier::stable
@ stable
Definition: TruthClassifiers.h:148
charge
double charge(const T &p)
Definition: AtlasPID.h:494
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88