| [827] | 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 | //
|
|---|
| [1228] | 27 | // $Id: G4RichTrajectoryPoint.hh,v 1.7 2009/11/24 10:04:14 perl Exp $
|
|---|
| 28 | // GEANT4 tag $Name: geant4-09-03 $
|
|---|
| [827] | 29 | //
|
|---|
| 30 | //---------------------------------------------------------------
|
|---|
| 31 | //
|
|---|
| 32 | // G4RichTrajectoryPoint.hh
|
|---|
| 33 | //
|
|---|
| 34 | // class description:
|
|---|
| 35 | // This class extends G4TrajectoryPoint.
|
|---|
| 36 | // From G4Trajectory, the following information is included:
|
|---|
| 37 | // 1) Position (end of step).
|
|---|
| 38 | // The extended information, only publicly accessible through AttValues,
|
|---|
| 39 | // includes:
|
|---|
| 40 | // 2) Auxiliary points, as in G4SmoothTrajectory.
|
|---|
| 41 | // 3) Total energy deposit.
|
|---|
| [1228] | 42 | // 4) Remaining energy.
|
|---|
| 43 | // 5) Process defining end of step.
|
|---|
| 44 | // 6) Global time (from start of event) at pre- amd post-step.
|
|---|
| 45 | // ...and more.
|
|---|
| [827] | 46 | //
|
|---|
| 47 | // Contact:
|
|---|
| 48 | // Questions and comments to this code should be sent to
|
|---|
| 49 | // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
|---|
| 50 | // Makoto Asai (e-mail: asai@kekvax.kek.jp)
|
|---|
| 51 | // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
|---|
| 52 | // and on the extended code to:
|
|---|
| 53 | // John Allison (e-mail: John.Allison@manchester.ac.uk)
|
|---|
| 54 | // Joseph Perl (e-mail: perl@slac.stanford.edu)
|
|---|
| 55 | //
|
|---|
| 56 | // ---------------------------------------------------------------
|
|---|
| 57 |
|
|---|
| 58 | #ifndef G4RICHTRAJECTORYPOINT_HH
|
|---|
| 59 | #define G4RICHTRAJECTORYPOINT_HH
|
|---|
| 60 |
|
|---|
| 61 | #include "G4TrajectoryPoint.hh"
|
|---|
| 62 |
|
|---|
| [1228] | 63 | #include "G4TouchableHandle.hh"
|
|---|
| [827] | 64 | #include "G4ThreeVector.hh"
|
|---|
| 65 | #include <vector>
|
|---|
| 66 |
|
|---|
| 67 | class G4Track;
|
|---|
| 68 | class G4Step;
|
|---|
| 69 | class G4VProcess;
|
|---|
| 70 |
|
|---|
| 71 | class G4RichTrajectoryPoint : public G4TrajectoryPoint
|
|---|
| 72 | {
|
|---|
| 73 |
|
|---|
| 74 | public: // without description
|
|---|
| 75 |
|
|---|
| 76 | // Constructor/Destructor
|
|---|
| 77 | G4RichTrajectoryPoint();
|
|---|
| 78 | G4RichTrajectoryPoint(const G4Track*); // For first point.
|
|---|
| 79 | G4RichTrajectoryPoint(const G4Step*); // For subsequent points.
|
|---|
| 80 | G4RichTrajectoryPoint(const G4RichTrajectoryPoint &right);
|
|---|
| 81 | virtual ~G4RichTrajectoryPoint();
|
|---|
| 82 |
|
|---|
| 83 | // Get/Set functions
|
|---|
| 84 | const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const
|
|---|
| 85 | { return fpAuxiliaryPointVector; }
|
|---|
| 86 |
|
|---|
| 87 | // Operators
|
|---|
| 88 | inline void *operator new(size_t);
|
|---|
| 89 | inline void operator delete(void *aRichTrajectoryPoint);
|
|---|
| 90 | inline int operator==(const G4RichTrajectoryPoint& right) const
|
|---|
| 91 | { return (this==&right); }
|
|---|
| 92 |
|
|---|
| 93 | // Get methods for HepRep style attributes
|
|---|
| 94 | virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
|---|
| 95 | virtual std::vector<G4AttValue>* CreateAttValues() const;
|
|---|
| 96 |
|
|---|
| 97 | private:
|
|---|
| 98 |
|
|---|
| 99 | // Extended member data
|
|---|
| 100 | std::vector<G4ThreeVector>* fpAuxiliaryPointVector;
|
|---|
| 101 | G4double fTotEDep;
|
|---|
| [1196] | 102 | G4double fRemainingEnergy;
|
|---|
| [827] | 103 | const G4VProcess* fpProcess;
|
|---|
| 104 | G4double fPreStepPointGlobalTime;
|
|---|
| 105 | G4double fPostStepPointGlobalTime;
|
|---|
| [1228] | 106 | G4TouchableHandle fpPreStepPointVolume;
|
|---|
| 107 | G4TouchableHandle fpPostStepPointVolume;
|
|---|
| [827] | 108 | };
|
|---|
| 109 |
|
|---|
| 110 | #if defined G4TRACKING_ALLOC_EXPORT
|
|---|
| 111 | extern G4DLLEXPORT G4Allocator<G4RichTrajectoryPoint>
|
|---|
| 112 | aRichTrajectoryPointAllocator;
|
|---|
| 113 | #else
|
|---|
| 114 | extern G4DLLIMPORT G4Allocator<G4RichTrajectoryPoint>
|
|---|
| 115 | aRichTrajectoryPointAllocator;
|
|---|
| 116 | #endif
|
|---|
| 117 |
|
|---|
| 118 | inline void* G4RichTrajectoryPoint::operator new(size_t)
|
|---|
| 119 | {
|
|---|
| 120 | void *aRichTrajectoryPoint;
|
|---|
| 121 | aRichTrajectoryPoint =
|
|---|
| 122 | (void *) aRichTrajectoryPointAllocator.MallocSingle();
|
|---|
| 123 | return aRichTrajectoryPoint;
|
|---|
| 124 | }
|
|---|
| 125 |
|
|---|
| 126 | inline void G4RichTrajectoryPoint::operator delete
|
|---|
| 127 | (void *aRichTrajectoryPoint)
|
|---|
| 128 | {
|
|---|
| 129 | aRichTrajectoryPointAllocator.FreeSingle
|
|---|
| 130 | ((G4RichTrajectoryPoint *) aRichTrajectoryPoint);
|
|---|
| 131 | }
|
|---|
| 132 |
|
|---|
| 133 | #endif
|
|---|
| 134 |
|
|---|