source: trunk/examples/extended/runAndEvent/RE01/include/RE01TrackInformation.hh@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 5.1 KB
Line 
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: RE01TrackInformation.hh,v 1.2 2006/06/29 17:43:19 gunter Exp $
28// GEANT4 tag $Name: $
29//
30
31#ifndef RE01TrackInformation_h
32#define RE01TrackInformation_h 1
33
34#include "globals.hh"
35#include "G4ThreeVector.hh"
36#include "G4ParticleDefinition.hh"
37#include "G4Track.hh"
38#include "G4Allocator.hh"
39#include "G4VUserTrackInformation.hh"
40
41class RE01TrackInformation : public G4VUserTrackInformation
42{
43 public:
44 RE01TrackInformation();
45 RE01TrackInformation(const G4Track* aTrack);
46 RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
47 virtual ~RE01TrackInformation();
48
49 inline void *operator new(size_t);
50 inline void operator delete(void *aTrackInfo);
51 inline int operator ==(const RE01TrackInformation& right) const
52 {return (this==&right);}
53
54 RE01TrackInformation& operator =(const RE01TrackInformation& right);
55
56 void SetSourceTrackInformation(const G4Track* aTrack);
57 void Print() const;
58
59 private:
60 // Information of the primary track at the primary vertex
61 G4int originalTrackID; // Track ID of primary particle
62 G4ParticleDefinition* particleDefinition;
63 G4ThreeVector originalPosition;
64 G4ThreeVector originalMomentum;
65 G4double originalEnergy;
66 G4double originalTime;
67
68 G4int trackingStatus;
69 // trackingStatus = 1 : primary or secondary track which has not yet reached to calorimeter
70 // = 0 : track which or ancester of which has reached to calorimeter
71
72 // = 2 : track or its ancester had once reached to calorimeter and
73 // then escaped from it
74 // Information of the track which reached to the calorimeter boundary at the boundary surface
75 // This information is valid only for trackingStatus = 0 or 2
76 G4int sourceTrackID;
77 G4ParticleDefinition* sourceDefinition;
78 G4ThreeVector sourcePosition;
79 G4ThreeVector sourceMomentum;
80 G4double sourceEnergy;
81 G4double sourceTime;
82
83 public:
84 inline G4int GetOriginalTrackID() const {return originalTrackID;}
85 inline G4ParticleDefinition* GetOriginalParticle() const {return particleDefinition;}
86 inline G4ThreeVector GetOriginalPosition() const {return originalPosition;}
87 inline G4ThreeVector GetOriginalMomentum() const {return originalMomentum;}
88 inline G4double GetOriginalEnergy() const {return originalEnergy;}
89 inline G4double GetOriginalTime() const {return originalTime;}
90
91 inline G4int GetTrackingStatus() const {return trackingStatus;}
92 inline void SetTrackingStatus(G4int i) {trackingStatus = i;}
93
94 inline G4int GetSourceTrackID() const {return sourceTrackID;}
95 inline G4ParticleDefinition* GetSourceParticle() const {return sourceDefinition;}
96 inline G4ThreeVector GetSourcePosition() const {return sourcePosition;}
97 inline G4ThreeVector GetSourceMomentum() const {return sourceMomentum;}
98 inline G4double GetSourceEnergy() const {return sourceEnergy;}
99 inline G4double GetSourceTime() const {return sourceTime;}
100};
101
102extern G4Allocator<RE01TrackInformation> aTrackInformationAllocator;
103
104inline void* RE01TrackInformation::operator new(size_t)
105{ void* aTrackInfo;
106 aTrackInfo = (void*)aTrackInformationAllocator.MallocSingle();
107 return aTrackInfo;
108}
109
110inline void RE01TrackInformation::operator delete(void *aTrackInfo)
111{ aTrackInformationAllocator.FreeSingle((RE01TrackInformation*)aTrackInfo);}
112
113#endif
114
Note: See TracBrowser for help on using the repository browser.