source: trunk/source/processes/hadronic/models/parton_string/management/include/G4InteractionContent.hh @ 1340

Last change on this file since 1340 was 1340, checked in by garnier, 14 years ago

update ti head

File size: 5.6 KB
Line 
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,v 1.5 2009/07/17 12:36:41 vuzhinsk Exp $
28// GEANT4 tag $Name: geant4-09-03-ref-09 $
29//
30
31#ifndef G4InteractionContent_h
32#define G4InteractionContent_h 1
33
34// ------------------------------------------------------------
35//      GEANT 4 class header file
36//
37//      ---------------- G4InteractionContent----------------
38//             by Gunter Folger, June 1998.
39//       class for a storing colliding particles in PartonString Models
40// ------------------------------------------------------------
41
42#include "globals.hh"
43
44#include "G4VSplitableHadron.hh"
45#include "G4Nucleon.hh"                // Uzhi 16.07.09
46class G4InteractionContent 
47{
48
49  public:
50
51      G4InteractionContent(G4VSplitableHadron *aPrimaryParticipant);
52
53      ~G4InteractionContent();
54
55      int operator==(const G4InteractionContent &right) const;
56      int operator!=(const G4InteractionContent &right) const;
57     
58      G4VSplitableHadron * GetProjectile() const ;
59      G4VSplitableHadron * GetTarget() const;
60
61      void                 SetTargetNucleon(G4Nucleon * aNucleon); // Uzhi 16.07.09
62      G4Nucleon          * GetTargetNucleon() const;              // Uzhi 16.07.09
63
64      void SetTarget(G4VSplitableHadron *aTarget);
65
66      G4int GetNumberOfSoftCollisions();
67      G4int GetNumberOfHardCollisions();
68      void  SetNumberOfSoftCollisions(int);
69      void  SetNumberOfHardCollisions(int);
70      G4int GetNumberOfDiffractiveCollisions();
71      void  SetNumberOfDiffractiveCollisions(int);
72
73      void SplitHadrons();
74 
75#ifdef G4DEBUG
76      void Dump();
77#endif     
78     
79
80public:
81      G4InteractionContent(){}
82      G4InteractionContent(const G4InteractionContent &right);
83      const G4InteractionContent & operator=(const G4InteractionContent &right);
84
85  protected:
86
87  private:
88
89      G4VSplitableHadron * theTarget;
90      G4VSplitableHadron * theProjectile;
91      G4Nucleon          * theTargetNucleon;
92     
93      G4int theNumberOfHard;
94      G4int theNumberOfSoft;
95      G4int theNumberOfDiffractive;
96};
97
98// Class G4InteractionContent
99
100inline G4VSplitableHadron * G4InteractionContent::GetProjectile() const
101{
102        return theProjectile;
103}
104
105inline G4VSplitableHadron * G4InteractionContent::GetTarget() const
106{
107        return theTarget;
108}
109
110inline void G4InteractionContent::SetTarget(G4VSplitableHadron *aTarget)
111{
112        theTarget = aTarget;
113}
114
115inline void G4InteractionContent::SetTargetNucleon(G4Nucleon * aNucleon) // Uzhi 16.07.09
116{
117        theTargetNucleon = aNucleon;
118}
119
120inline G4Nucleon * G4InteractionContent::GetTargetNucleon() const       // Uzhi 16.07.09
121{
122       return theTargetNucleon;
123}
124
125inline G4int G4InteractionContent::GetNumberOfSoftCollisions()
126{
127        return theNumberOfSoft;
128}
129
130inline G4int G4InteractionContent::GetNumberOfHardCollisions()
131{
132        return theNumberOfHard;
133}
134
135inline void G4InteractionContent::SetNumberOfSoftCollisions(int nCol)
136{
137        theNumberOfSoft = nCol;
138}
139
140inline void G4InteractionContent::SetNumberOfHardCollisions(int nCol)
141{
142        theNumberOfHard = nCol;
143}
144
145inline G4int G4InteractionContent::GetNumberOfDiffractiveCollisions()
146{
147        return theNumberOfDiffractive;
148}
149
150inline void G4InteractionContent::SetNumberOfDiffractiveCollisions(int nCol)
151{
152        theNumberOfDiffractive = nCol;
153}
154
155inline void G4InteractionContent::SplitHadrons()
156{
157        if ( theProjectile != NULL ) theProjectile->SplitUp();
158        if ( theTarget != NULL ) theTarget->SplitUp();
159}
160#ifdef G4DEBUG
161inline void G4InteractionContent::Dump()
162{
163        G4cout  << " G4InteractionContent " << this << G4endl
164                << "Hard/Soft/Diff " 
165                << theNumberOfHard<<" / " 
166                <<theNumberOfSoft<<" / " 
167                <<theNumberOfDiffractive << G4endl
168                << "Projectile " ;
169        if ( theProjectile ) 
170        { G4cout <<  theProjectile->GetDefinition()->GetPDGEncoding() 
171                 << "  " << theProjectile->Get4Momentum()<< G4endl;
172        } else {         
173          G4cout << " none " << G4endl;
174        }           
175        if ( theTarget ) 
176        { G4cout <<  theTarget->GetDefinition()->GetPDGEncoding() 
177                 << "  " << theTarget->Get4Momentum()<< G4endl;
178        } else {         
179          G4cout << " none " << G4endl;
180        }           
181                   
182}     
183#endif     
184
185#endif
186
187
Note: See TracBrowser for help on using the repository browser.