Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
F04Trajectory.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 // $Id: F04Trajectory.hh 90239 2015-05-21 09:07:05Z gcosmo $
27 //
30 //
31 
32 #ifndef F04Trajectory_h
33 #define F04Trajectory_h 1
34 
35 #include <vector>
36 #include <stdlib.h>
37 
38 #include "globals.hh"
39 
40 #include "G4ios.hh"
41 #include "G4Step.hh"
42 #include "G4Track.hh"
43 #include "G4Allocator.hh"
44 #include "G4VTrajectory.hh"
45 #include "G4ParticleDefinition.hh"
46 #include "G4TrajectoryPoint.hh"
47 
48 typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
49 
51 {
52 
53 //--------
54  public: // without description
55 //--------
56 
57 // Constructor/Destructor
58 
59  F04Trajectory();
60  F04Trajectory(const G4Track* aTrack);
62  virtual ~F04Trajectory();
63 
64 // Operators
65 
66  inline void* operator new(size_t);
67  inline void operator delete(void*);
68  inline int operator == (const F04Trajectory& right) const
69  { return (this==&right); }
70 
71 // Get/Set functions
72 
73  inline G4int GetTrackID() const { return fTrackID; }
74  inline G4int GetParentID() const { return fParentID; }
75  inline G4String GetParticleName() const { return fParticleName; }
76  inline G4double GetCharge() const { return fPDGCharge; }
77  inline G4int GetPDGEncoding() const { return fPDGEncoding; }
79 
80 // Other member functions
81 
82  virtual void ShowTrajectory(std::ostream& os=G4cout) const;
83  virtual void AppendStep(const G4Step* aStep);
84  virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
85 
87 
88  virtual int GetPointEntries() const
89  { return fpPointsContainer->size(); }
90  virtual G4VTrajectoryPoint* GetPoint(G4int i) const
91  { return (*fpPointsContainer)[i]; }
92 
93  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
94  virtual std::vector<G4AttValue>* CreateAttValues() const;
95 
96 //---------
97  private:
98 //---------
99 
100 // Member data
101 
103 
110 
111 };
112 
114 
115 inline void* F04Trajectory::operator new(size_t) {
118  return (void*) F04TrajectoryAllocator->MallocSingle();
119 }
120 
121 inline void F04Trajectory::operator delete(void* aTrajectory) {
122  F04TrajectoryAllocator->FreeSingle((F04Trajectory*)aTrajectory);
123 }
124 
125 #endif
virtual ~F04Trajectory()
virtual void MergeTrajectory(G4VTrajectory *secondTrajectory)
G4int GetPDGEncoding() const
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
int operator==(const F04Trajectory &right) const
G4String GetParticleName() const
G4int GetParentID() const
#define G4ThreadLocal
Definition: tls.hh:69
virtual void ShowTrajectory(std::ostream &os=G4cout) const
virtual int GetPointEntries() const
G4int GetTrackID() const
double G4double
Definition: G4Types.hh:76
G4ThreadLocal G4Allocator< F04Trajectory > * F04TrajectoryAllocator
virtual void AppendStep(const G4Step *aStep)
Definition: G4Step.hh:76
G4ThreeVector GetInitialMomentum() const
G4String fParticleName
int G4int
Definition: G4Types.hh:78
G4ThreeVector fInitialMomentum
G4double fPDGCharge
TrajectoryPointContainer * fpPointsContainer
G4GLOB_DLL std::ostream G4cout
std::vector< G4VTrajectoryPoint * > TrajectoryPointContainer
G4double GetCharge() const
virtual G4VTrajectoryPoint * GetPoint(G4int i) const
G4ParticleDefinition * GetParticleDefinition()