File indexing completed on 2025-01-18 09:58:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #define INCLXX_IN_GEANT4_MODE 1
0035
0036 #include "globals.hh"
0037
0038 #ifndef G4INCLBook_hh
0039 #define G4INCLBook_hh 1
0040
0041 #include <map>
0042 #include "G4INCLIAvatar.hh"
0043
0044 namespace G4INCL {
0045 class Book {
0046 public:
0047 Book() {
0048 reset();
0049 }
0050 ~Book() {};
0051
0052 void reset() {
0053 nAcceptedCollisions = 0;
0054 nBlockedCollisions = 0;
0055 nAcceptedDecays = 0;
0056 nBlockedDecays = 0;
0057 currentTime = 0.0;
0058 firstCollisionTime = 0.0;
0059 firstCollisionXSec = 0.0;
0060 firstCollisionSpectatorPosition = 0.0;
0061 firstCollisionSpectatorMomentum = 0.0;
0062 firstCollisionIsElastic = false;
0063 nAvatars[SurfaceAvatarType] = 0;
0064 nAvatars[CollisionAvatarType] = 0;
0065 nAvatars[DecayAvatarType] = 0;
0066 nAvatars[ParticleEntryAvatarType] = 0;
0067 nCascading = 0;
0068 nEmittedClusters = 0;
0069 nEnergyViolationInteraction = 0;
0070 };
0071
0072 void incrementAcceptedCollisions() { nAcceptedCollisions++; };
0073 void incrementBlockedCollisions() { nBlockedCollisions++; };
0074 void incrementAcceptedDecays() { nAcceptedDecays++; };
0075 void incrementBlockedDecays() { nBlockedDecays++; };
0076 void incrementAvatars(AvatarType type) { nAvatars[type]++; };
0077 void incrementCascading() { nCascading++; }
0078 void decrementCascading() { nCascading--; }
0079 void incrementEmittedClusters() { nEmittedClusters++; }
0080 void incrementEnergyViolationInteraction() { nEnergyViolationInteraction++; }
0081
0082 void setFirstCollisionTime(const G4double t) { firstCollisionTime = t; };
0083 G4double getFirstCollisionTime() const { return firstCollisionTime; };
0084
0085 void setFirstCollisionXSec(const G4double x) { firstCollisionXSec = x; };
0086 G4double getFirstCollisionXSec() const { return firstCollisionXSec; };
0087
0088 void setFirstCollisionSpectatorPosition(const G4double x) { firstCollisionSpectatorPosition = x; };
0089 G4double getFirstCollisionSpectatorPosition() const { return firstCollisionSpectatorPosition; };
0090
0091 void setFirstCollisionSpectatorMomentum(const G4double x) { firstCollisionSpectatorMomentum = x; };
0092 G4double getFirstCollisionSpectatorMomentum() const { return firstCollisionSpectatorMomentum; };
0093
0094 void setFirstCollisionIsElastic(const G4bool e) { firstCollisionIsElastic = e; };
0095 G4bool getFirstCollisionIsElastic() const { return firstCollisionIsElastic; };
0096
0097 void setCurrentTime(G4double t) { currentTime = t; };
0098 G4double getCurrentTime() const { return currentTime; };
0099
0100 G4int getAcceptedCollisions() const { return nAcceptedCollisions; };
0101 G4int getBlockedCollisions() const {return nBlockedCollisions; };
0102 G4int getAcceptedDecays() const { return nAcceptedDecays; };
0103 G4int getBlockedDecays() const {return nBlockedDecays; };
0104 G4int getAvatars(AvatarType type) const { return nAvatars.find(type)->second; };
0105 G4int getCascading() const { return nCascading; };
0106 G4int getEmittedClusters() const { return nEmittedClusters; };
0107 G4int getEnergyViolationInteraction() const { return nEnergyViolationInteraction; };
0108
0109 private:
0110 G4int nAcceptedCollisions;
0111 G4int nBlockedCollisions;
0112 G4int nAcceptedDecays;
0113 G4int nBlockedDecays;
0114 G4double currentTime;
0115 G4double firstCollisionTime;
0116 G4double firstCollisionXSec;
0117 G4double firstCollisionSpectatorPosition;
0118 G4double firstCollisionSpectatorMomentum;
0119 G4bool firstCollisionIsElastic;
0120 std::map<AvatarType,G4int> nAvatars;
0121 G4int nCascading;
0122 G4int nEmittedClusters;
0123 G4int nEnergyViolationInteraction;
0124 };
0125 }
0126
0127 #endif