ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4InteractionContent.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4InteractionContent.hh
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 
54 
56  G4VSplitableHadron * GetTarget() const;
57 
58  void SetProjectileNucleon(G4Nucleon * aNucleon);
60 
61  void SetTargetNucleon(G4Nucleon * aNucleon);
62  G4Nucleon * GetTargetNucleon() const;
63 
64  void SetTarget(G4VSplitableHadron *aTarget);
65 
68  void SetNumberOfSoftCollisions(int);
69  void SetNumberOfHardCollisions(int);
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:
89 
90  protected:
91 
92  private:
95 
98 
102 
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
186 inline void G4InteractionContent::Dump()
187 {
188  G4LorentzVector mom(0.,0.,0.,0.);
189  G4cout << " G4InteractionContent " << this << G4endl
190  << "Hard/Soft/Diff "
191  << theNumberOfHard<<" / "
192  <<theNumberOfSoft<<" / "
194  << "Projectile " ;
195 
196  if ( theProjectile ) {
198  << " " << theProjectile->Get4Momentum()<< G4endl;
200  } else {
201  G4cout << " none " << G4endl;
202  }
203 
204  if ( theTarget ) {
205  G4cout << "Target " << theTarget->GetDefinition()->GetPDGEncoding()
206  << " " << theTarget->Get4Momentum()<< G4endl;
208  } else {
209  G4cout << " none " << G4endl;
210  }
211  G4cout << "total 4-mom of interaction content " << mom << G4endl;
212 }
213 #endif
214 
215 #endif
216