00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef G4InteractionContent_h
00031 #define G4InteractionContent_h 1
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include "globals.hh"
00042 #include "G4VSplitableHadron.hh"
00043 #include "G4Nucleon.hh"
00044
00045
00046 #ifdef debug_QGSM
00047 #include "../../qgsm/include/G4QGSMSplitableHadron.hh"
00048 #include <deque>
00049 #endif
00050
00051 class G4InteractionContent
00052 {
00053
00054 public:
00055
00056 G4InteractionContent() {}
00057 G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
00058
00059 ~G4InteractionContent();
00060
00061 G4bool operator<(const G4InteractionContent &right) const;
00062
00063 G4VSplitableHadron * GetProjectile() const ;
00064 G4VSplitableHadron * GetTarget() const;
00065
00066 void SetTargetNucleon(G4Nucleon * aNucleon);
00067 G4Nucleon * GetTargetNucleon() const;
00068
00069 void SetTarget(G4VSplitableHadron *aTarget);
00070
00071 G4int GetNumberOfSoftCollisions();
00072 G4int GetNumberOfHardCollisions();
00073 void SetNumberOfSoftCollisions(int);
00074 void SetNumberOfHardCollisions(int);
00075 G4int GetNumberOfDiffractiveCollisions();
00076 void SetNumberOfDiffractiveCollisions(int);
00077
00078 void SplitHadrons();
00079
00080 void SetInteractionTime(G4double aValue);
00081 G4double GetInteractionTime() const;
00082 void SetStatus(G4int aValue);
00083 G4int GetStatus() const;
00084
00085 #ifdef G4DEBUG
00086 void Dump();
00087 #endif
00088
00089
00090 private:
00091 G4InteractionContent & operator=(const G4InteractionContent &right);
00092 G4InteractionContent(const G4InteractionContent &right);
00093 int operator==(const G4InteractionContent &right) const;
00094 int operator!=(const G4InteractionContent &right) const;
00095
00096 protected:
00097
00098 private:
00099
00100 G4VSplitableHadron * theTarget;
00101 G4VSplitableHadron * theProjectile;
00102 G4Nucleon * theTargetNucleon;
00103
00104 G4int theNumberOfHard;
00105 G4int theNumberOfSoft;
00106 G4int theNumberOfDiffractive;
00107
00108 G4double theInteractionTime;
00109 G4int curStatus;
00110
00111 };
00112
00113
00114
00115 inline G4VSplitableHadron * G4InteractionContent::GetProjectile() const
00116 {
00117 return theProjectile;
00118 }
00119
00120 inline G4VSplitableHadron * G4InteractionContent::GetTarget() const
00121 {
00122 return theTarget;
00123 }
00124
00125 inline void G4InteractionContent::SetTarget(G4VSplitableHadron *aTarget)
00126 {
00127 theTarget = aTarget;
00128 }
00129
00130 inline void G4InteractionContent::SetTargetNucleon(G4Nucleon * aNucleon)
00131 {
00132 theTargetNucleon = aNucleon;
00133 }
00134
00135 inline G4Nucleon * G4InteractionContent::GetTargetNucleon() const
00136 {
00137 return theTargetNucleon;
00138 }
00139
00140 inline G4int G4InteractionContent::GetNumberOfSoftCollisions()
00141 {
00142 return theNumberOfSoft;
00143 }
00144
00145 inline G4int G4InteractionContent::GetNumberOfHardCollisions()
00146 {
00147 return theNumberOfHard;
00148 }
00149
00150 inline void G4InteractionContent::SetNumberOfSoftCollisions(int nCol)
00151 {
00152 theNumberOfSoft = nCol;
00153 }
00154
00155 inline void G4InteractionContent::SetNumberOfHardCollisions(int nCol)
00156 {
00157 theNumberOfHard = nCol;
00158 }
00159
00160 inline G4int G4InteractionContent::GetNumberOfDiffractiveCollisions()
00161 {
00162 return theNumberOfDiffractive;
00163 }
00164
00165 inline void G4InteractionContent::SetNumberOfDiffractiveCollisions(int nCol)
00166 {
00167 theNumberOfDiffractive = nCol;
00168 }
00169
00170 inline void G4InteractionContent::SplitHadrons()
00171 {
00172 if ( theProjectile != NULL ) theProjectile->SplitUp();
00173 if ( theTarget != NULL ) theTarget->SplitUp();
00174 #ifdef G4DEBUG
00175
00176 #endif
00177 }
00178
00179 #ifdef G4DEBUG
00180 inline void G4InteractionContent::Dump()
00181 {
00182 G4LorentzVector mom(0.,0.,0.,0.);
00183 G4cout << " G4InteractionContent " << this << G4endl
00184 << "Hard/Soft/Diff "
00185 << theNumberOfHard<<" / "
00186 <<theNumberOfSoft<<" / "
00187 <<theNumberOfDiffractive << G4endl
00188 << "Projectile " ;
00189 if ( theProjectile ) {
00190 G4cout << theProjectile->GetDefinition()->GetPDGEncoding()
00191 << " " << theProjectile->Get4Momentum()<< G4endl;
00192 mom+=theProjectile->Get4Momentum();
00193 #ifdef debug_QGSM
00194 G4QGSMSplitableHadron * at =(G4QGSMSplitableHadron*)theProjectile;
00195 std::deque<G4Parton *>color=at->GetColorPartons();
00196 std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
00197 G4cout << " proj. color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
00198 std::deque<G4Parton *>::iterator p_iter;
00199 G4LorentzVector colmom(0.,0.,0.,0.);
00200 for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
00201 G4cout << "proj color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
00202 colmom+=(*p_iter)->Get4Momentum();
00203 }
00204
00205 G4LorentzVector anticolmom(0.,0.,0.,0.);
00206 for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
00207 G4cout << "proj antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
00208 anticolmom+=(*p_iter)->Get4Momentum();
00209 }
00210 G4cout << " proj. color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
00211 #endif
00212 } else {
00213 G4cout << " none " << G4endl;
00214 }
00215 if ( theTarget ) {
00216 G4cout << "Target " << theTarget->GetDefinition()->GetPDGEncoding()
00217 << " " << theTarget->Get4Momentum()<< G4endl;
00218 mom+=theTarget->Get4Momentum();
00219 #ifdef debug_QGSM
00220 G4QGSMSplitableHadron * at =(G4QGSMSplitableHadron*)theTarget;
00221 std::deque<G4Parton *>color=at->GetColorPartons();
00222 std::deque<G4Parton *>anticolor=at->GetAntiColorPartons();
00223 G4cout << " target color/anti size " << color.size() << " / " << anticolor.size() << G4endl;
00224 std::deque<G4Parton *>::iterator p_iter;
00225 G4LorentzVector colmom(0.,0.,0.,0.);
00226 for ( p_iter=color.begin(); p_iter!= color.end(); ++p_iter){
00227 G4cout << "target color : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
00228 colmom+=(*p_iter)->Get4Momentum();
00229 }
00230
00231 G4LorentzVector anticolmom(0.,0.,0.,0.);
00232 for ( p_iter=anticolor.begin(); p_iter!= anticolor.end(); ++p_iter){
00233 G4cout << "target antic : "<<(*p_iter)->GetPDGcode() << ", mom= "<< (*p_iter)->Get4Momentum()<<G4endl;
00234 anticolmom+=(*p_iter)->Get4Momentum();
00235 }
00236 G4cout << " target color/anti mom " << colmom << " / " << anticolmom << " Sum: " << colmom+anticolmom <<G4endl;
00237 #endif
00238 } else {
00239 G4cout << " none " << G4endl;
00240 }
00241 G4cout << "total 4-mom of interaction content " << mom << G4endl;
00242 }
00243 #endif
00244
00245 #endif
00246
00247