Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE01TrackInformation.hh
Go to the documentation of this file.
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 //
28 //
29 //
30 // $Id: RE01TrackInformation.hh 97671 2016-06-07 08:25:00Z gcosmo $
31 //
32 
33 #ifndef RE01TrackInformation_h
34 #define RE01TrackInformation_h 1
35 
36 #include "globals.hh"
37 #include "G4ThreeVector.hh"
38 #include "G4ParticleDefinition.hh"
39 #include "G4Track.hh"
40 #include "G4Allocator.hh"
42 
44 {
45 public:
47  RE01TrackInformation(const G4Track* aTrack);
48  RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
49  virtual ~RE01TrackInformation();
50 
51  inline void *operator new(size_t);
52  inline void operator delete(void *aTrackInfo);
53 
55 
56  void SetSourceTrackInformation(const G4Track* aTrack);
57  virtual void Print() const;
58 
59 public:
60  inline G4int GetTrackingStatus() const {return fTrackingStatus;}
61  inline void SetTrackingStatus(G4int i) {fTrackingStatus = i;}
62  inline G4int GetSourceTrackID() const {return fSourceTrackID;}
63  inline void SetSuspendedStepID(G4int i) {fSuspendedStepID = i;}
64  inline G4int GetSuspendedStepID() const {return fSuspendedStepID;}
65 
66 private:
67  // Information of the primary track at the primary vertex
68  G4int fOriginalTrackID; // Track ID of primary particle
69  G4ParticleDefinition* fParticleDefinition;
70  G4ThreeVector fOriginalPosition;
71  G4ThreeVector fOriginalMomentum;
72  G4double fOriginalEnergy;
73  G4double fOriginalTime;
74 
75  G4int fTrackingStatus;
76  // trackingStatus = 1 : primary or secondary track which has not yet reached
77  // to calorimeter
78  // = 0 : track which or ancester of which has reached to
79  // calorimeter
80  // = 2 : track or its ancester had reached to calorimeter
81  // and then escaped from it
82  // Information of the track which reached to the calorimeter boundary at the
83  // boundary surface.
84  // This information is valid only for trackingStatus = 0 or 2
85  G4int fSourceTrackID;
86  G4ParticleDefinition* fSourceDefinition;
87  G4ThreeVector fSourcePosition;
88  G4ThreeVector fSourceMomentum;
89  G4double fSourceEnergy;
90  G4double fSourceTime;
91  G4int fSuspendedStepID;
92 };
93 
94 extern G4ThreadLocal
96 
97 inline void* RE01TrackInformation::operator new(size_t)
98 {
101  return (void*)aTrackInformationAllocator->MallocSingle();
102 }
103 
104 inline void RE01TrackInformation::operator delete(void *aTrackInfo)
105 { aTrackInformationAllocator->FreeSingle((RE01TrackInformation*)aTrackInfo);}
106 
107 #endif
108 
#define G4ThreadLocal
Definition: tls.hh:89
int G4int
Definition: G4Types.hh:78
void SetSourceTrackInformation(const G4Track *aTrack)
G4int GetTrackingStatus() const
G4ThreadLocal G4Allocator< RE01TrackInformation > * aTrackInformationAllocator
RE01TrackInformation & operator=(const RE01TrackInformation &right)
G4int GetSuspendedStepID() const
void SetSuspendedStepID(G4int i)
virtual void Print() const
double G4double
Definition: G4Types.hh:76
G4int GetSourceTrackID() const