120 lines
4.3 KiB
C++
120 lines
4.3 KiB
C++
//
|
|
// ********************************************************************
|
|
// * DISCLAIMER *
|
|
// * *
|
|
// * The following disclaimer summarizes all the specific disclaimers *
|
|
// * of contributors to this software. The specific disclaimers,which *
|
|
// * govern, are listed with their locations in: *
|
|
// * http://cern.ch/geant4/license *
|
|
// * *
|
|
// * Neither the authors of this software system, nor their employing *
|
|
// * institutes,nor the agencies providing financial support for this *
|
|
// * work make any representation or warranty, express or implied, *
|
|
// * regarding this software system or assume any liability for its *
|
|
// * use. *
|
|
// * *
|
|
// * This code implementation is the intellectual property of the *
|
|
// * GEANT4 collaboration. *
|
|
// * By copying, distributing or modifying the Program (or any work *
|
|
// * based on the Program) you indicate your acceptance of this *
|
|
// * statement, and all its terms. *
|
|
// ********************************************************************
|
|
//
|
|
//
|
|
// $Id: G4RichTrajectory.hh,v 1.1 2005/11/24 12:47:36 allison Exp $
|
|
// GEANT4 tag $Name: geant4-08-00 $
|
|
//
|
|
//
|
|
//---------------------------------------------------------------
|
|
//
|
|
// G4RichTrajectory.hh
|
|
//
|
|
// class description:
|
|
// This class extends G4Trajectory, which includes the following:
|
|
// 1) List of trajectory points which compose the trajectory,
|
|
// 2) static information of particle which generated the
|
|
// trajectory,
|
|
// 3) trackID and parent particle ID of the trajectory.
|
|
// The extended information, only publicly accessible through AttValues,
|
|
// includes:
|
|
// 4) physical volume and next physical volume;
|
|
// 5) creator process;
|
|
//
|
|
// Contact:
|
|
// Questions and comments on G4Trajectory should be sent to
|
|
// Katsuya Amako (e-mail: Katsuya.Amako@kek.jp)
|
|
// Makoto Asai (e-mail: asai@kekvax.kek.jp)
|
|
// Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
|
|
// and on the extended code to:
|
|
// John Allison (e-mail: John.Allison@manchester.ac.uk)
|
|
// Joseph Perl (e-mail: perl@slac.stanford.edu)
|
|
//
|
|
// ---------------------------------------------------------------
|
|
|
|
#ifndef G4RICHTRAJECTORY_HH
|
|
#define G4RICHTRAJECTORY_HH
|
|
|
|
#include "G4Trajectory.hh"
|
|
|
|
typedef std::vector<G4VTrajectoryPoint*> RichTrajectoryPointsContainer;
|
|
|
|
class G4RichTrajectory : public G4Trajectory {
|
|
|
|
public: // with description
|
|
|
|
// Constructors/destructors
|
|
G4RichTrajectory();
|
|
G4RichTrajectory(const G4Track* aTrack);
|
|
G4RichTrajectory(G4RichTrajectory &);
|
|
virtual ~G4RichTrajectory();
|
|
|
|
// Operators
|
|
inline void* operator new(size_t);
|
|
inline void operator delete(void*);
|
|
inline int operator == (const G4RichTrajectory& right) const
|
|
{return (this==&right);}
|
|
|
|
// Other (virtual) member functions
|
|
void AppendStep(const G4Step* aStep);
|
|
void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
|
int GetPointEntries() const { return fpRichPointsContainer->size(); }
|
|
G4VTrajectoryPoint* GetPoint(G4int i) const
|
|
{ return (*fpRichPointsContainer)[i]; }
|
|
|
|
// Get methods for HepRep style attributes
|
|
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
|
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
|
|
|
private:
|
|
|
|
// Extended information (only publicly accessible through AttValues)...
|
|
RichTrajectoryPointsContainer* fpRichPointsContainer;
|
|
G4VPhysicalVolume* fpInitialVolume;
|
|
G4VPhysicalVolume* fpInitialNextVolume;
|
|
const G4VProcess* fpCreatorProcess;
|
|
|
|
};
|
|
|
|
#if defined G4TRACKING_ALLOC_EXPORT
|
|
extern G4DLLEXPORT G4Allocator<G4RichTrajectory>
|
|
aRichTrajectoryAllocator;
|
|
#else
|
|
extern G4DLLIMPORT G4Allocator<G4RichTrajectory>
|
|
aRichTrajectoryAllocator;
|
|
#endif
|
|
|
|
inline void* G4RichTrajectory::operator new(size_t)
|
|
{
|
|
void* aRichTrajectory;
|
|
aRichTrajectory = (void*)aRichTrajectoryAllocator.MallocSingle();
|
|
return aRichTrajectory;
|
|
}
|
|
|
|
inline void G4RichTrajectory::operator delete(void* aRichTrajectory)
|
|
{
|
|
aRichTrajectoryAllocator.FreeSingle
|
|
((G4RichTrajectory*)aRichTrajectory);
|
|
}
|
|
|
|
#endif
|