Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4PrimaryVertex.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: G4PrimaryVertex.hh 110257 2018-05-17 14:20:12Z gcosmo $
28 //
29 //
30 
31 
32 #ifndef G4PrimaryVertex_h
33 #define G4PrimaryVertex_h 1
34 
35 #include "globals.hh"
36 #include "pwdefs.hh"
37 #include "G4Allocator.hh"
38 #include "G4ThreeVector.hh"
39 #include "G4PrimaryParticle.hh"
40 
42 
43 // class description:
44 //
45 // This is the class which represents a primary vertex. The ofject of this
46 // class is set to G4Event objct by G4VPrimaryGenerator concrete class.
47 // This class object has one or more G4PrimaryParticle objects as primary
48 // particles.
49 
51 {
52  public:
53  inline void *operator new(size_t);
54  inline void operator delete(void *aStackedTrack);
55 
56  public: // with description
60  virtual ~G4PrimaryVertex();
61 
62  public:
65 
66  G4int operator==(const G4PrimaryVertex &right) const;
67  G4int operator!=(const G4PrimaryVertex &right) const;
68 
69  public: // with description
70  G4ThreeVector GetPosition() const;
71  void SetPosition(G4double x0,G4double y0,G4double z0);
72  G4double GetX0() const;
73  G4double GetY0() const;
74  G4double GetZ0() const;
75  G4double GetT0() const;
76  void SetT0(G4double t0);
77  G4int GetNumberOfParticle() const;
80  void SetNext(G4PrimaryVertex* nv);
81  void ClearNext();
82  G4PrimaryVertex* GetNext() const;
83  G4double GetWeight() const;
84  void SetWeight(G4double w);
87 
88  void Print() const;
89 
90  private:
102 
103 };
104 
106 
107 inline void * G4PrimaryVertex::operator new(size_t)
108 {
110  {
112  }
113  return (void *) aPrimaryVertexAllocator()->MallocSingle();
114 }
115 
116 inline void G4PrimaryVertex::operator delete(void * aPrimaryVertex)
117 {
118  aPrimaryVertexAllocator()->FreeSingle((G4PrimaryVertex *) aPrimaryVertex);
119 }
120 
122 { return G4ThreeVector(X0,Y0,Z0); }
123 
125 { X0 = x0; Y0 = y0; Z0 = z0; }
126 
128 { return X0; }
129 
131 { return Y0; }
132 
134 { return Z0; }
135 
137 { return T0; }
138 
140 { T0 = t0; }
141 
143 { return numberOfParticle; }
144 
146 {
147  if(theParticle == 0) { theParticle = pp; }
148  else { theTail->SetNext(pp); }
149  theTail = pp;
151 }
152 
154 {
155  if(nextVertex == 0) { nextVertex = nv; }
156  else { tailVertex->SetNext(nv); }
157  tailVertex = nv;
158 }
159 
161 {
162  nextVertex = nullptr;
163  tailVertex = nullptr;
164 }
165 
167 { return nextVertex; }
168 
170 { return Weight0; }
171 
173 { Weight0 = w; }
174 
176 { userInfo = anInfo; }
177 
179 { return userInfo; }
180 
181 #endif
182 
G4PrimaryParticle * GetPrimary(G4int i=0) const
G4PrimaryVertex * tailVertex
CLHEP::Hep3Vector G4ThreeVector
G4PrimaryVertex & operator=(const G4PrimaryVertex &right)
void SetWeight(G4double w)
void SetUserInformation(G4VUserPrimaryVertexInformation *anInfo)
G4double GetY0() const
void SetPosition(G4double x0, G4double y0, G4double z0)
G4VUserPrimaryVertexInformation * userInfo
void SetT0(G4double t0)
G4PART_DLL G4Allocator< G4PrimaryVertex > *& aPrimaryVertexAllocator()
G4PrimaryVertex * nextVertex
G4double GetX0() const
G4double GetWeight() const
G4int operator!=(const G4PrimaryVertex &right) const
G4int GetNumberOfParticle() const
virtual ~G4PrimaryVertex()
double G4double
Definition: G4Types.hh:76
void SetPrimary(G4PrimaryParticle *pp)
G4ThreeVector GetPosition() const
G4double GetT0() const
int G4int
Definition: G4Types.hh:78
G4PrimaryVertex * GetNext() const
G4double GetZ0() const
G4int operator==(const G4PrimaryVertex &right) const
#define G4PART_DLL
Definition: pwdefs.hh:48
void SetNext(G4PrimaryVertex *nv)
G4PrimaryParticle * theTail
void SetNext(G4PrimaryParticle *np)
void Print() const
G4PrimaryParticle * theParticle
G4VUserPrimaryVertexInformation * GetUserInformation() const