ATLAS Offline Software
Loading...
Searching...
No Matches
AMSBCharginoMinus.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// class header
6#include "AMSBCharginoMinus.hh"
7// ######################################################################
8// ### CharginoMinus ###
9// ######################################################################
10
11
12AMSBCharginoMinus* AMSBCharginoMinus::s_theInstance = NULL;
13
14AMSBCharginoMinus* AMSBCharginoMinus::Definition(G4double mass, G4double width, G4double charge, G4double PDG, G4bool stable, G4double lifetime, G4bool shortlived)
15{
16
17 if (s_theInstance !=0 && (mass>=0. || width>=0. || lifetime>=0.) )
18 {
19 G4ExceptionDescription description;
20 description << "Trying to redefine the AMSB Chargino Minus properties after it has been constructed is not allowed";
21 G4Exception("AMSBCharginoMinus", "FailedRedefinition", FatalException, description);
22 abort();
23 }
24
25 if (s_theInstance != 0)
26 {
27 return s_theInstance;
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
38 if (mass >= 0)
39 {
40 G4ParticleDefinition* anInstance =
41 new G4ParticleDefinition("s_chi_minus_1", mass, width, charge,
42 1, 0, 0,
43 0, 0, 0,
44 "supersymmetric", 0, 0, PDG,
45 stable, lifetime, NULL,
46 shortlived, "CharginoMinus");
47 s_theInstance = reinterpret_cast<AMSBCharginoMinus*>(anInstance);
48 return s_theInstance;
49 }
50 else
51 {
52 G4ExceptionDescription description;
53 description << "Trying to create a particle with default constructor is not allowed";
54 G4Exception("AMSBCharginoMinus", "DefaultConstructorCalled", FatalException, description);
55 abort();
56 }
57}
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