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

Last change on this file since 847 was 819, checked in by garnier, 16 years ago

import all except CVS

File size: 5.1 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.4 2007/01/24 10:28:54 gunter Exp $
28// GEANT4 tag $Name:  $
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
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 SetTarget(G4VSplitableHadron *aTarget);
62
63      G4int GetNumberOfSoftCollisions();
64      G4int GetNumberOfHardCollisions();
65      void  SetNumberOfSoftCollisions(int);
66      void  SetNumberOfHardCollisions(int);
67      G4int GetNumberOfDiffractiveCollisions();
68      void  SetNumberOfDiffractiveCollisions(int);
69
70      void SplitHadrons();
71 
72#ifdef G4DEBUG
73      void Dump();
74#endif     
75     
76
77public:
78      G4InteractionContent(){}
79      G4InteractionContent(const G4InteractionContent &right);
80      const G4InteractionContent & operator=(const G4InteractionContent &right);
81
82  protected:
83
84  private:
85
86      G4VSplitableHadron * theTarget;
87      G4VSplitableHadron * theProjectile;
88     
89      G4int theNumberOfHard;
90      G4int theNumberOfSoft;
91      G4int theNumberOfDiffractive;
92};
93
94// Class G4InteractionContent
95
96inline G4VSplitableHadron * G4InteractionContent::GetProjectile() const
97{
98        return theProjectile;
99}
100
101inline G4VSplitableHadron * G4InteractionContent::GetTarget() const
102{
103        return theTarget;
104}
105
106inline void G4InteractionContent::SetTarget(G4VSplitableHadron *aTarget)
107{
108        theTarget = aTarget;
109}
110
111inline G4int G4InteractionContent::GetNumberOfSoftCollisions()
112{
113        return theNumberOfSoft;
114}
115
116inline G4int G4InteractionContent::GetNumberOfHardCollisions()
117{
118        return theNumberOfHard;
119}
120
121inline void G4InteractionContent::SetNumberOfSoftCollisions(int nCol)
122{
123        theNumberOfSoft = nCol;
124}
125
126inline void G4InteractionContent::SetNumberOfHardCollisions(int nCol)
127{
128        theNumberOfHard = nCol;
129}
130
131inline G4int G4InteractionContent::GetNumberOfDiffractiveCollisions()
132{
133        return theNumberOfDiffractive;
134}
135
136inline void G4InteractionContent::SetNumberOfDiffractiveCollisions(int nCol)
137{
138        theNumberOfDiffractive = nCol;
139}
140
141inline void G4InteractionContent::SplitHadrons()
142{
143        if ( theProjectile != NULL ) theProjectile->SplitUp();
144        if ( theTarget != NULL ) theTarget->SplitUp();
145}
146#ifdef G4DEBUG
147inline void G4InteractionContent::Dump()
148{
149        G4cout  << " G4InteractionContent " << this << G4endl
150                << "Hard/Soft/Diff " 
151                << theNumberOfHard<<" / " 
152                <<theNumberOfSoft<<" / " 
153                <<theNumberOfDiffractive << G4endl
154                << "Projectile " ;
155        if ( theProjectile ) 
156        { G4cout <<  theProjectile->GetDefinition()->GetPDGEncoding() 
157                 << "  " << theProjectile->Get4Momentum()<< G4endl;
158        } else {         
159          G4cout << " none " << G4endl;
160        }           
161        if ( theTarget ) 
162        { G4cout <<  theTarget->GetDefinition()->GetPDGEncoding() 
163                 << "  " << theTarget->Get4Momentum()<< G4endl;
164        } else {         
165          G4cout << " none " << G4endl;
166        }           
167                   
168}     
169#endif     
170
171#endif
172
173
Note: See TracBrowser for help on using the repository browser.