renamed static data members (change of coding conventions)
[u/mrichter/AliRoot.git] / TGeant4 / TG4G3Defaults.cxx
CommitLineData
2817d3e2 1// $Id$
2// Category: physics
3//
4// See the class description in the header file.
5
6#include "TG4G3Defaults.h"
7#include "TG4Globals.h"
8
9#include <math.h>
10
11// static const data members
12
13// precision tolerance
c63f260d 14const G4double TG4G3Defaults::fgkCutTolerance = 1. * keV;
2817d3e2 15
16// kinetic energy cuts
c63f260d 17const G4double TG4G3Defaults::fgkCUTGAM = 0.001 * GeV;
18const G4double TG4G3Defaults::fgkCUTELE = 0.001 * GeV;
19const G4double TG4G3Defaults::fgkCUTNEU = 0.01 * GeV;
20const G4double TG4G3Defaults::fgkCUTHAD = 0.01 * GeV;
21const G4double TG4G3Defaults::fgkCUTMUO = 0.01 * GeV;
22const G4double TG4G3Defaults::fgkBCUTE = fgkCUTGAM;
23const G4double TG4G3Defaults::fgkBCUTM = fgkCUTGAM;
24const G4double TG4G3Defaults::fgkDCUTE = 10. * TeV;
25const G4double TG4G3Defaults::fgkDCUTM = 10. * TeV;
26const G4double TG4G3Defaults::fgkPPCUTM = 0.01 * GeV;
2817d3e2 27
28// physics processes
c63f260d 29const TG3FlagValue TG4G3Defaults::fgkPAIR = kActivate; // 1
30const TG3FlagValue TG4G3Defaults::fgkCOMP = kActivate; // 1
31const TG3FlagValue TG4G3Defaults::fgkPHOT = kActivate; // 1
32const TG3FlagValue TG4G3Defaults::fgkPFIS = kInActivate; // 0
33const TG3FlagValue TG4G3Defaults::fgkDRAY = kActivate2; // 2
34const TG3FlagValue TG4G3Defaults::fgkANNI = kActivate; // 1
35const TG3FlagValue TG4G3Defaults::fgkBREM = kActivate; // 1
36const TG3FlagValue TG4G3Defaults::fgkHADR = kActivate; // 1
37const TG3FlagValue TG4G3Defaults::fgkMUNU = kInActivate; // 0
38const TG3FlagValue TG4G3Defaults::fgkDCAY = kActivate; // 1
39const TG3FlagValue TG4G3Defaults::fgkLOSS = kActivate2; // 2
40const TG3FlagValue TG4G3Defaults::fgkMULS = kActivate; // 1
2817d3e2 41
42TG4G3Defaults::TG4G3Defaults() {
43//
44}
45
46TG4G3Defaults::~TG4G3Defaults() {
47//
48}
49
50G4double TG4G3Defaults::CutValue(G4int g3Cut)
51{
52// Returns the G3 default value for the specified cut.
53// ---
54
55 switch (g3Cut) {
56 case kCUTGAM:
c63f260d 57 return fgkCUTGAM; break;
2817d3e2 58 case kCUTELE:
c63f260d 59 return fgkCUTELE; break;
2817d3e2 60 case kCUTNEU:
c63f260d 61 return fgkCUTNEU; break;
2817d3e2 62 case kCUTHAD:
c63f260d 63 return fgkCUTHAD; break;
2817d3e2 64 case kCUTMUO:
c63f260d 65 return fgkCUTMUO; break;
2817d3e2 66 case kBCUTE:
c63f260d 67 return fgkBCUTE; break;
2817d3e2 68 case kBCUTM:
c63f260d 69 return fgkBCUTM; break;
2817d3e2 70 case kDCUTE:
c63f260d 71 return fgkDCUTE; break;
2817d3e2 72 case kDCUTM:
c63f260d 73 return fgkDCUTM; break;
2817d3e2 74 case kPPCUTM:
c63f260d 75 return fgkPPCUTM; break;
2817d3e2 76 default:
77 TG4Globals::Warning("TG4G3Defaults::CutValue: Inconsistent cut.");
78 return 0.;
79 }
80}
81
82TG3FlagValue TG4G3Defaults::FlagValue(G4int g3Flag)
83{
84// Returns the G3 default value for the specified flag.
85// ---
86
87 switch (g3Flag) {
88 case kPAIR:
c63f260d 89 return fgkPAIR; break;
2817d3e2 90 case kCOMP:
c63f260d 91 return fgkCOMP; break;
2817d3e2 92 case kPHOT:
c63f260d 93 return fgkPHOT; break;
2817d3e2 94 case kPFIS:
c63f260d 95 return fgkPFIS; break;
2817d3e2 96 case kDRAY:
c63f260d 97 return fgkDRAY; break;
2817d3e2 98 case kANNI:
c63f260d 99 return fgkANNI; break;
2817d3e2 100 case kBREM:
c63f260d 101 return fgkBREM; break;
2817d3e2 102 case kHADR:
c63f260d 103 return fgkHADR; break;
2817d3e2 104 case kMUNU:
c63f260d 105 return fgkMUNU; break;
2817d3e2 106 case kDCAY:
c63f260d 107 return fgkDCAY; break;
2817d3e2 108 case kLOSS:
c63f260d 109 return fgkLOSS; break;
2817d3e2 110 case kMULS:
c63f260d 111 return fgkMULS; break;
2817d3e2 112 default:
113 TG4Globals::Warning("TG4G3Defaults::FlagValue: Inconsistent flag.");
114 return kUnset;
115 }
116}
117
118G4bool TG4G3Defaults::IsDefaultCut(TG3Cut g3Cut, G4double value)
119{
120// Tests if the parameter value is equal to the G3 default value.
121// ---
122
c63f260d 123 if (abs(value*GeV - CutValue(g3Cut)) > fgkCutTolerance)
2817d3e2 124 return false;
125 else
126 return true;
127}
128
129G4bool TG4G3Defaults::IsDefaultFlag(TG3Flag g3Flag, G4double value)
130{
131// Tests if the parameter value is equal to the G3 default value.
132// ---
133
134 if (value == FlagValue(g3Flag))
135 return true;
136 else
137 return false;
138}