Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
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 // $Id: G4InteractionContent.hh 100828 2016-11-02 15:25:59Z gcosmo $
28 //
29 
30 #ifndef G4InteractionContent_h
31 #define G4InteractionContent_h 1
32 
33 // ------------------------------------------------------------
34 // GEANT 4 class header file
35 //
36 // ---------------- G4InteractionContent----------------
37 // by Gunter Folger, June 1998.
38 // class for a storing colliding particles in PartonString Models
39 // ------------------------------------------------------------
40 
41 #include "globals.hh"
42 
43 //#include "G4PhysicalConstants.hh" // Uzhi 8.09.2014
44 //#include "G4SystemOfUnits.hh" // Uzhi 8.09.2014
45 
46 #include "G4VSplitableHadron.hh"
47 #include "G4Nucleon.hh"
48 
49 //#define debug_QGSM
50 #ifdef debug_QGSM
51  #include "../../qgsm/include/G4QGSMSplitableHadron.hh"
52  #include <deque>
53 #endif
54 
56 {
57  public:
59  G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
60 
62 
64 
66  G4VSplitableHadron * GetTarget() const;
67 
68  void SetProjectileNucleon(G4Nucleon * aNucleon);
70 
71  void SetTargetNucleon(G4Nucleon * aNucleon);
72  G4Nucleon * GetTargetNucleon() const;
73 
74  void SetTarget(G4VSplitableHadron *aTarget);
75 
78  void SetNumberOfSoftCollisions(int);
79  void SetNumberOfHardCollisions(int);
82 
83  void SplitHadrons();
84 
85  void SetInteractionTime(G4double aValue);
87  void SetStatus(G4int aValue);
88  G4int GetStatus() const;
89 
90  #ifdef G4DEBUG
91  void Dump();
92  #endif
93 
94  private:
97  int operator==(const G4InteractionContent &right) const;
98  int operator!=(const G4InteractionContent &right) const;
99 
100  protected:
101 
102  private:
105 
108 
112 
115 };
116 
117 // Class G4InteractionContent
118 
120 {
121  return theProjectile;
122 }
123 
125 {
126  return theTarget;
127 }
128 
130 {
131  theTarget = aTarget;
132 }
133 
135 {
136  theProjectileNucleon = aNucleon;
137 }
138 
140 {
141  return theProjectileNucleon;
142 }
143 
145 {
146  theTargetNucleon = aNucleon;
147 }
148 
150 {
151  return theTargetNucleon;
152 }
153 
155 {
156  return theNumberOfSoft;
157 }
158 
160 {
161  return theNumberOfHard;
162 }
163 
165 {
166  theNumberOfSoft = nCol;
167 }
168 
170 {
171  theNumberOfHard = nCol;
172 }
173 
175 {
176  return theNumberOfDiffractive;
177 }
178 
180 {
181  theNumberOfDiffractive = nCol;
182 }
183 
185 {
186  //G4cout<<"InterContent Proj "<<theProjectile<<G4endl;
187  if ( theProjectile != NULL ) {theProjectile->SplitUp();}
188  //G4cout<<"InterContent Targ "<<theTarget<<G4endl;
189  if ( theTarget != NULL ) {theTarget->SplitUp();}
190  #ifdef G4DEBUG
191  //Dump();
192  #endif
193 }
194 
195 #ifdef G4DEBUG
196 inline void G4InteractionContent::Dump()
197 {
198  G4LorentzVector mom(0.,0.,0.,0.);
199  G4cout << " G4InteractionContent " << this << G4endl
200  << "Hard/Soft/Diff "
201  << theNumberOfHard<<" / "
202  <<theNumberOfSoft<<" / "
204  << "Projectile " ;
205 
206  if ( theProjectile ) {
208  << " " << theProjectile->Get4Momentum()<< G4endl;
209  mom+=theProjectile->Get4Momentum();
210  #ifdef debug_QGSM
212  std::deque<G4Parton *>color=at->GetColorPartons();
213  std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
214  G4cout << " proj. color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
215  std::deque<G4Parton *>::iterator p_iter;
216  G4LorentzVector colmom(0.,0.,0.,0.);
217  for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
218  G4cout << "proj color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
219  colmom+=(*p_iter)->Get4Momentum();
220  }
221  G4LorentzVector anticolmom(0.,0.,0.,0.);
222  for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
223  G4cout << "proj antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
224  anticolmom+=(*p_iter)->Get4Momentum();
225  }
226  G4cout << " proj. color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
227  #endif
228  } else {
229  G4cout << " none " << G4endl;
230  }
231 
232  if ( theTarget ) {
233  G4cout << "Target " << theTarget->GetDefinition()->GetPDGEncoding()
234  << " " << theTarget->Get4Momentum()<< G4endl;
235  mom+=theTarget->Get4Momentum();
236  #ifdef debug_QGSM
238  std::deque<G4Parton *>color=at->GetColorPartons();
239  std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
240  G4cout << " target color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
241  std::deque<G4Parton *>::iterator p_iter;
242  G4LorentzVector colmom(0.,0.,0.,0.);
243  for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
244  G4cout << "target color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
245  colmom+=(*p_iter)->Get4Momentum();
246  }
247  G4LorentzVector anticolmom(0.,0.,0.,0.);
248  for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
249  G4cout << "target antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
250  anticolmom+=(*p_iter)->Get4Momentum();
251  }
252  G4cout << " target color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
253  #endif
254  } else {
255  G4cout << " none " << G4endl;
256  }
257  G4cout << "total 4-mom of interaction content " << mom << G4endl;
258 }
259 #endif
260 
261 #endif
262 
const G4ParticleDefinition * GetDefinition() const
void SetStatus(G4int aValue)
void SetInteractionTime(G4double aValue)
G4Nucleon * GetTargetNucleon() const
G4VSplitableHadron * GetTarget() const
#define G4endl
Definition: G4ios.hh:61
int operator!=(const G4InteractionContent &right) const
G4double GetInteractionTime() const
G4VSplitableHadron * GetProjectile() const
double G4double
Definition: G4Types.hh:76
bool G4bool
Definition: G4Types.hh:79
void SetNumberOfDiffractiveCollisions(int)
G4Nucleon * GetProjectileNucleon() const
G4VSplitableHadron * theProjectile
virtual void SplitUp()=0
G4bool operator<(const G4InteractionContent &right) const
int G4int
Definition: G4Types.hh:78
void SetTarget(G4VSplitableHadron *aTarget)
G4InteractionContent & operator=(const G4InteractionContent &right)
G4VSplitableHadron * theTarget
void SetProjectileNucleon(G4Nucleon *aNucleon)
G4GLOB_DLL std::ostream G4cout
const G4LorentzVector & Get4Momentum() const
void SetTargetNucleon(G4Nucleon *aNucleon)
int operator==(const G4InteractionContent &right) const