[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 | // |
---|
| 27 | // $Id: G4RichTrajectoryPoint.hh,v 1.5 2006/09/27 20:42:52 asaim Exp $ |
---|
[1011] | 28 | // GEANT4 tag $Name: geant4-09-02-ref-02 $ |
---|
[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. |
---|
| 42 | // 4) Procees defining end of step. |
---|
| 43 | // 5) Global time (from start of event) at pre- amd post-step. |
---|
| 44 | // |
---|
| 45 | // Contact: |
---|
| 46 | // Questions and comments to this code should be sent to |
---|
| 47 | // Katsuya Amako (e-mail: Katsuya.Amako@kek.jp) |
---|
| 48 | // Makoto Asai (e-mail: asai@kekvax.kek.jp) |
---|
| 49 | // Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp) |
---|
| 50 | // and on the extended code to: |
---|
| 51 | // John Allison (e-mail: John.Allison@manchester.ac.uk) |
---|
| 52 | // Joseph Perl (e-mail: perl@slac.stanford.edu) |
---|
| 53 | // |
---|
| 54 | // --------------------------------------------------------------- |
---|
| 55 | |
---|
| 56 | #ifndef G4RICHTRAJECTORYPOINT_HH |
---|
| 57 | #define G4RICHTRAJECTORYPOINT_HH |
---|
| 58 | |
---|
| 59 | #include "G4TrajectoryPoint.hh" |
---|
| 60 | |
---|
| 61 | #include "G4ThreeVector.hh" |
---|
| 62 | #include <vector> |
---|
| 63 | |
---|
| 64 | class G4Track; |
---|
| 65 | class G4Step; |
---|
| 66 | class G4VProcess; |
---|
| 67 | |
---|
| 68 | class G4RichTrajectoryPoint : public G4TrajectoryPoint |
---|
| 69 | { |
---|
| 70 | |
---|
| 71 | public: // without description |
---|
| 72 | |
---|
| 73 | // Constructor/Destructor |
---|
| 74 | G4RichTrajectoryPoint(); |
---|
| 75 | G4RichTrajectoryPoint(const G4Track*); // For first point. |
---|
| 76 | G4RichTrajectoryPoint(const G4Step*); // For subsequent points. |
---|
| 77 | G4RichTrajectoryPoint(const G4RichTrajectoryPoint &right); |
---|
| 78 | virtual ~G4RichTrajectoryPoint(); |
---|
| 79 | |
---|
| 80 | // Get/Set functions |
---|
| 81 | const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const |
---|
| 82 | { return fpAuxiliaryPointVector; } |
---|
| 83 | |
---|
| 84 | // Operators |
---|
| 85 | inline void *operator new(size_t); |
---|
| 86 | inline void operator delete(void *aRichTrajectoryPoint); |
---|
| 87 | inline int operator==(const G4RichTrajectoryPoint& right) const |
---|
| 88 | { return (this==&right); } |
---|
| 89 | |
---|
| 90 | // Get methods for HepRep style attributes |
---|
| 91 | virtual const std::map<G4String,G4AttDef>* GetAttDefs() const; |
---|
| 92 | virtual std::vector<G4AttValue>* CreateAttValues() const; |
---|
| 93 | |
---|
| 94 | private: |
---|
| 95 | |
---|
| 96 | // Extended member data |
---|
| 97 | std::vector<G4ThreeVector>* fpAuxiliaryPointVector; |
---|
| 98 | G4double fTotEDep; |
---|
| 99 | const G4VProcess* fpProcess; |
---|
| 100 | G4double fPreStepPointGlobalTime; |
---|
| 101 | G4double fPostStepPointGlobalTime; |
---|
| 102 | }; |
---|
| 103 | |
---|
| 104 | #if defined G4TRACKING_ALLOC_EXPORT |
---|
| 105 | extern G4DLLEXPORT G4Allocator<G4RichTrajectoryPoint> |
---|
| 106 | aRichTrajectoryPointAllocator; |
---|
| 107 | #else |
---|
| 108 | extern G4DLLIMPORT G4Allocator<G4RichTrajectoryPoint> |
---|
| 109 | aRichTrajectoryPointAllocator; |
---|
| 110 | #endif |
---|
| 111 | |
---|
| 112 | inline void* G4RichTrajectoryPoint::operator new(size_t) |
---|
| 113 | { |
---|
| 114 | void *aRichTrajectoryPoint; |
---|
| 115 | aRichTrajectoryPoint = |
---|
| 116 | (void *) aRichTrajectoryPointAllocator.MallocSingle(); |
---|
| 117 | return aRichTrajectoryPoint; |
---|
| 118 | } |
---|
| 119 | |
---|
| 120 | inline void G4RichTrajectoryPoint::operator delete |
---|
| 121 | (void *aRichTrajectoryPoint) |
---|
| 122 | { |
---|
| 123 | aRichTrajectoryPointAllocator.FreeSingle |
---|
| 124 | ((G4RichTrajectoryPoint *) aRichTrajectoryPoint); |
---|
| 125 | } |
---|
| 126 | |
---|
| 127 | #endif |
---|
| 128 | |
---|