Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4CrossSectionType.cxx
Go to the documentation of this file.
1//------------------------------------------------
2// The Geant4 Virtual Monte Carlo package
3// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
14
15#include "TG4CrossSectionType.h"
16
17//_____________________________________________________________________________
18G4String TG4CrossSectionTypeName(G4int type)
19{
20 switch (type) {
21 case kElastic:
22 return "Elastic";
23 case kInelastic:
24 return "Inelastic";
25 case kCapture:
26 return "Capture";
27 case kFission:
28 return "Fission";
29 case kChargeExchange:
30 return "ChargeExchange";
31 default:
32 return "Undefined";
33 }
34}
35
36//_____________________________________________________________________________
38{
39 switch (type) {
40 case kElastic:
41 return kElastic;
42 case kInelastic:
43 return kInelastic;
44 case kCapture:
45 return kCapture;
46 case kFission:
47 return kFission;
48 case kChargeExchange:
49 return kChargeExchange;
50 default:
52 }
53}
54
55//_____________________________________________________________________________
57{
59 return kElastic;
60 else if (name == TG4CrossSectionTypeName(kInelastic))
61 return kInelastic;
62 else if (name == TG4CrossSectionTypeName(kCapture))
63 return kCapture;
64 else if (name == TG4CrossSectionTypeName(kFission))
65 return kFission;
67 return kChargeExchange;
68 else
70}
G4String TG4CrossSectionTypeName(G4int type)
Return name for given cross section type.
TG4CrossSectionType GetCrossSectionType(G4int type)
Convert G4int to TG4CrossSectionType (for loops)
Definition of the enumeration TG4CrossSectionType.
TG4CrossSectionType
Enumeration for cross section types.
@ kNoCrossSectionType
no cross section type
@ kCapture
capture cross section
@ kElastic
elastic cross section
@ kFission
fission cross section
@ kInelastic
inelastic cross section
@ kChargeExchange
charge exchane cross section