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