Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4INCLBook.hh
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26// INCL++ intra-nuclear cascade model
27// Pekka Kaitaniemi, CEA and Helsinki Institute of Physics
28// Davide Mancusi, CEA
29// Alain Boudard, CEA
30// Sylvie Leray, CEA
31// Joseph Cugnon, University of Liege
32//
33// INCL++ revision: v5.1.8
34//
35#define INCLXX_IN_GEANT4_MODE 1
36
37#include "globals.hh"
38
39#ifndef G4INCLBook_hh
40#define G4INCLBook_hh 1
41
42#include <map>
43#include "G4INCLIAvatar.hh"
44
45namespace G4INCL {
46 class Book {
47 public:
48 Book() {
49 reset();
50 }
51 ~Book() {};
52
53 void reset() {
54 nAcceptedCollisions = 0;
55 nBlockedCollisions = 0;
56 nAcceptedDecays = 0;
57 nBlockedDecays = 0;
58 currentTime = 0.0;
59 firstCollisionTime = 0.0;
60 firstCollisionXSec = 0.0;
61 nAvatars[SurfaceAvatarType] = 0;
62 nAvatars[CollisionAvatarType] = 0;
63 nAvatars[DecayAvatarType] = 0;
64 nAvatars[ParticleEntryAvatarType] = 0;
65 nCascading = 0;
66 };
67
68 void incrementAcceptedCollisions() { nAcceptedCollisions++; };
69 void incrementBlockedCollisions() { nBlockedCollisions++; };
70 void incrementAcceptedDecays() { nAcceptedDecays++; };
71 void incrementBlockedDecays() { nBlockedDecays++; };
72 void incrementAvatars(AvatarType type) { nAvatars[type]++; };
73 void incrementCascading() { nCascading++; }
74 void decrementCascading() { nCascading--; }
75
76 void setFirstCollisionTime(G4double t) { firstCollisionTime = t; };
77 G4double getFirstCollisionTime() { return firstCollisionTime; };
78
79 void setFirstCollisionXSec(G4double x) { firstCollisionXSec = x; };
80 G4double getFirstCollisionXSec() { return firstCollisionXSec; };
81
82 void setCurrentTime(G4double t) { currentTime = t; };
83 G4double getCurrentTime() { return currentTime; };
84
85 G4int getAcceptedCollisions() const { return nAcceptedCollisions; };
86 G4int getBlockedCollisions() const {return nBlockedCollisions; };
87 G4int getAcceptedDecays() const { return nAcceptedDecays; };
88 G4int getBlockedDecays() const {return nBlockedDecays; };
89 G4int getAvatars(AvatarType type) const { return nAvatars.find(type)->second; };
90 G4int getCascading() const { return nCascading; };
91
92 private:
93 G4int nAcceptedCollisions;
94 G4int nBlockedCollisions;
95 G4int nAcceptedDecays;
96 G4int nBlockedDecays;
97 G4double currentTime;
98 G4double firstCollisionTime;
99 G4double firstCollisionXSec;
100 std::map<AvatarType,G4int> nAvatars;
101 G4int nCascading;
102 };
103}
104
105#endif
double G4double
Definition: G4Types.hh:64
int G4int
Definition: G4Types.hh:66
void decrementCascading()
Definition: G4INCLBook.hh:74
G4int getAcceptedDecays() const
Definition: G4INCLBook.hh:87
G4double getFirstCollisionTime()
Definition: G4INCLBook.hh:77
G4int getCascading() const
Definition: G4INCLBook.hh:90
G4int getAvatars(AvatarType type) const
Definition: G4INCLBook.hh:89
void incrementAcceptedCollisions()
Definition: G4INCLBook.hh:68
void setCurrentTime(G4double t)
Definition: G4INCLBook.hh:82
G4int getAcceptedCollisions() const
Definition: G4INCLBook.hh:85
void reset()
Definition: G4INCLBook.hh:53
G4int getBlockedCollisions() const
Definition: G4INCLBook.hh:86
void incrementBlockedCollisions()
Definition: G4INCLBook.hh:69
void setFirstCollisionTime(G4double t)
Definition: G4INCLBook.hh:76
G4double getCurrentTime()
Definition: G4INCLBook.hh:83
G4double getFirstCollisionXSec()
Definition: G4INCLBook.hh:80
G4int getBlockedDecays() const
Definition: G4INCLBook.hh:88
void incrementAcceptedDecays()
Definition: G4INCLBook.hh:70
void setFirstCollisionXSec(G4double x)
Definition: G4INCLBook.hh:79
void incrementCascading()
Definition: G4INCLBook.hh:73
void incrementBlockedDecays()
Definition: G4INCLBook.hh:71
void incrementAvatars(AvatarType type)
Definition: G4INCLBook.hh:72
@ SurfaceAvatarType
@ CollisionAvatarType
@ DecayAvatarType
@ ParticleEntryAvatarType