Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4InteractionContent.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//
27//
28
29#ifndef G4InteractionContent_h
30#define G4InteractionContent_h 1
31
32// ------------------------------------------------------------
33// GEANT 4 class header file
34//
35// ---------------- G4InteractionContent----------------
36// by Gunter Folger, June 1998.
37// class for a storing colliding particles in PartonString Models
38// ------------------------------------------------------------
39
40#include "globals.hh"
41#include "G4VSplitableHadron.hh"
42#include "G4Nucleon.hh"
43
44
46{
47 public:
49 G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
50
52
53 G4bool operator<(const G4InteractionContent &right) const;
54
57
58 void SetProjectileNucleon(G4Nucleon * aNucleon);
60
61 void SetTargetNucleon(G4Nucleon * aNucleon);
63
64 void SetTarget(G4VSplitableHadron *aTarget);
65
72
73 void SplitHadrons();
74
75 void SetInteractionTime(G4double aValue);
77 void SetStatus(G4int aValue);
78 G4int GetStatus() const;
79
80 #ifdef G4DEBUG
81 void Dump();
82 #endif
83
84 private:
85 G4InteractionContent & operator=(const G4InteractionContent &right);
87 G4bool operator==(const G4InteractionContent &right) const;
88 G4bool operator!=(const G4InteractionContent &right) const;
89
90 protected:
91
92 private:
93 G4VSplitableHadron * theTarget;
94 G4VSplitableHadron * theProjectile;
95
96 G4Nucleon * theProjectileNucleon;
97 G4Nucleon * theTargetNucleon;
98
99 G4int theNumberOfHard;
100 G4int theNumberOfSoft;
101 G4int theNumberOfDiffractive;
102
103 G4double theInteractionTime;
104 G4int curStatus;
105};
106
107// Class G4InteractionContent
108
110{
111 return theProjectile;
112}
113
115{
116 return theTarget;
117}
118
120{
121 theTarget = aTarget;
122}
123
125{
126 theProjectileNucleon = aNucleon;
127}
128
130{
131 return theProjectileNucleon;
132}
133
135{
136 theTargetNucleon = aNucleon;
137}
138
140{
141 return theTargetNucleon;
142}
143
145{
146 return theNumberOfSoft;
147}
148
150{
151 return theNumberOfHard;
152}
153
155{
156 theNumberOfSoft = nCol;
157}
158
160{
161 theNumberOfHard = nCol;
162}
163
165{
166 return theNumberOfDiffractive;
167}
168
170{
171 theNumberOfDiffractive = nCol;
172}
173
175{
176 //G4cout<<"InterContent Proj "<<theProjectile<<G4endl;
177 if ( theProjectile != NULL ) {theProjectile->SplitUp();}
178 //G4cout<<"InterContent Targ "<<theTarget<<G4endl;
179 if ( theTarget != NULL ) {theTarget->SplitUp();}
180 #ifdef G4DEBUG
181 //Dump();
182 #endif
183}
184
185#ifdef G4DEBUG
186inline void G4InteractionContent::Dump()
187{
188 G4LorentzVector mom(0.,0.,0.,0.);
189 G4cout << " G4InteractionContent " << this << G4endl
190 << "Hard/Soft/Diff "
191 << theNumberOfHard<<" / "
192 <<theNumberOfSoft<<" / "
193 <<theNumberOfDiffractive << G4endl
194 << "Projectile " ;
195
196 if ( theProjectile ) {
197 G4cout << theProjectile->GetDefinition()->GetPDGEncoding()
198 << " " << theProjectile->Get4Momentum()<< G4endl;
199 mom+=theProjectile->Get4Momentum();
200 } else {
201 G4cout << " none " << G4endl;
202 }
203
204 if ( theTarget ) {
205 G4cout << "Target " << theTarget->GetDefinition()->GetPDGEncoding()
206 << " " << theTarget->Get4Momentum()<< G4endl;
207 mom+=theTarget->Get4Momentum();
208 } else {
209 G4cout << " none " << G4endl;
210 }
211 G4cout << "total 4-mom of interaction content " << mom << G4endl;
212}
213#endif
214
215#endif
216
double G4double
Definition: G4Types.hh:83
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
void SetNumberOfDiffractiveCollisions(int)
G4double GetInteractionTime() const
void SetTargetNucleon(G4Nucleon *aNucleon)
G4Nucleon * GetTargetNucleon() const
G4bool operator<(const G4InteractionContent &right) const
G4VSplitableHadron * GetProjectile() const
void SetTarget(G4VSplitableHadron *aTarget)
G4Nucleon * GetProjectileNucleon() const
void SetStatus(G4int aValue)
void SetInteractionTime(G4double aValue)
G4VSplitableHadron * GetTarget() const
void SetProjectileNucleon(G4Nucleon *aNucleon)
virtual void SplitUp()=0
const G4ParticleDefinition * GetDefinition() const
const G4LorentzVector & Get4Momentum() const