Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4CollisionInitialState.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: G4CollisionInitialState.hh 89688 2015-04-27 10:06:44Z gcosmo $
28 //
29 // $Id: G4CollisionInitialState.hh,v 1.0 1998/06/30
30 // -----------------------------------------------------------------------------
31 // GEANT 4 class header file
32 //
33 // History: first implementation, A. Feliciello, 30th June 1998
34 
35 // -----------------------------------------------------------------------------
36 
37 #ifndef G4CollisionInitialState_hh
38 #define G4CollisionInitialState_hh
39 
40 #include "G4KineticTrack.hh"
41 #include "G4KineticTrackVector.hh"
42 #include "G4HadTmpUtil.hh"
43 
44 class G4BCAction;
45 
47 {
48 
49 public:
52  G4KineticTrack * aTarget);
54  const G4KineticTrackVector & aTarget,
55  G4BCAction * aFSGenerator);
56 
58 
61 
63  {return (theCollisionTime < right.theCollisionTime);}
64 
66  {return (theCollisionTime == right.theCollisionTime);}
67 
68 
70  {return thePrimary;}
71  void SetPrimary(G4KineticTrack * aPrimary)
72  {thePrimary = aPrimary;}
73 
75  {return theTarget;}
76  void SetTarget(G4KineticTrack * aTarget)
77  {theTarget = aTarget;}
78 
79  void AddTarget(G4KineticTrack * aTarget)
80  {theTs.push_back(aTarget);}
82  {return theTs;}
85  {
86  G4double result=0;
87  for(size_t i=0; i<theTs.size(); i++)
88  {
89  result += theTs[i]->GetDefinition()->GetBaryonNumber();
90  }
91  return G4lrint(result);
92  }
94  {
95  G4double result=0;
96  for(size_t i=0; i<theTs.size(); i++)
97  {
98  result += theTs[i]->GetDefinition()->GetPDGCharge();
99  }
100  return G4lrint(result);
101  }
102 
103 // -new interface post pion:
104 
106  {return theCollisionTime;}
109 
110 // for debugging only
112  {
113  return theFSGenerator;
114  }
115 
116 
117  void Print() const;
118 
119 // friend std::ostream& operator<<(std::ostream & out, const G4CollisionInitialState & collision){
120 // out=1;
121 // return out;
122 // }
123 
124 
125 private:
126 
132 };
133 
134 #endif
135 
136 
void SetCollisionTime(G4double value)
G4KineticTrackVector & GetTargetCollection(void)
G4KineticTrackVector * GetFinalState()
void SetPrimary(G4KineticTrack *aPrimary)
const G4BCAction * GetGenerator()
void SetTarget(G4KineticTrack *aTarget)
G4CollisionInitialState & operator=(const G4CollisionInitialState &right)
int operator==(const G4CollisionInitialState &right) const
double G4double
Definition: G4Types.hh:76
const XML_Char int const XML_Char * value
Definition: expat.h:331
void AddTarget(G4KineticTrack *aTarget)
G4KineticTrack * GetPrimary(void)
G4double G4ParticleHPJENDLHEData::G4double result
int G4lrint(double ad)
Definition: templates.hh:151
int G4int
Definition: G4Types.hh:78
int operator<(const G4CollisionInitialState &right) const
G4KineticTrack * GetTarget(void)