Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -31,100 +31,86 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
|
||||
|
||||
#ifndef WLSTrajectory_h_seen
|
||||
#define WLSTrajectory_h_seen 1
|
||||
|
||||
#include <vector>
|
||||
#include <stdlib.h>
|
||||
#ifndef WLSTrajectory_h
|
||||
#define WLSTrajectory_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> WLSTrajectoryPointContainer;
|
||||
|
||||
class WLSTrajectory : public G4VTrajectory
|
||||
{
|
||||
public:
|
||||
WLSTrajectory();
|
||||
WLSTrajectory(const G4Track*);
|
||||
WLSTrajectory(WLSTrajectory&);
|
||||
~WLSTrajectory();
|
||||
|
||||
//--------
|
||||
public: // without description
|
||||
//--------
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator==(const WLSTrajectory& right) const
|
||||
{
|
||||
return (this == &right);
|
||||
}
|
||||
|
||||
// Constructor/Destructor
|
||||
inline virtual G4int GetTrackID() const { return fTrackID; }
|
||||
inline virtual G4int GetParentID() const { return fParentID; }
|
||||
inline virtual G4String GetParticleName() const { return fParticleName; }
|
||||
inline virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
inline virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const
|
||||
{
|
||||
return fInitialMomentum;
|
||||
}
|
||||
|
||||
WLSTrajectory();
|
||||
WLSTrajectory(const G4Track* );
|
||||
WLSTrajectory(WLSTrajectory &);
|
||||
virtual ~WLSTrajectory();
|
||||
virtual void ShowTrajectory(std::ostream& os = G4cout) const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
// Operators
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const WLSTrajectory& right) const
|
||||
{ return (this==&right); }
|
||||
virtual int GetPointEntries() const { return fpPointsContainer->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{
|
||||
return (*fpPointsContainer)[i];
|
||||
}
|
||||
|
||||
// Get/Set functions
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
inline virtual G4int GetTrackID() const { return fTrackID; }
|
||||
inline virtual G4int GetParentID() const { return fParentID; }
|
||||
inline virtual G4String GetParticleName() const { return fParticleName; }
|
||||
inline virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
inline virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const
|
||||
{return fInitialMomentum;}
|
||||
private:
|
||||
WLSTrajectoryPointContainer* fpPointsContainer;
|
||||
|
||||
// Other member functions
|
||||
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
virtual int GetPointEntries() const
|
||||
{ return fpPointsContainer->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*fpPointsContainer)[i]; }
|
||||
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
|
||||
WLSTrajectoryPointContainer* fpPointsContainer;
|
||||
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4double fPDGCharge;
|
||||
G4int fPDGEncoding;
|
||||
G4String fParticleName;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4double fPDGCharge;
|
||||
G4int fPDGEncoding;
|
||||
G4String fParticleName;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<WLSTrajectory>* WLSTrajectoryAllocator;
|
||||
|
||||
inline void* WLSTrajectory::operator new(size_t) {
|
||||
if(!WLSTrajectoryAllocator)
|
||||
WLSTrajectoryAllocator = new G4Allocator<WLSTrajectory>;
|
||||
return (void*) WLSTrajectoryAllocator->MallocSingle();
|
||||
inline void* WLSTrajectory::operator new(size_t)
|
||||
{
|
||||
if(!WLSTrajectoryAllocator)
|
||||
WLSTrajectoryAllocator = new G4Allocator<WLSTrajectory>;
|
||||
return (void*) WLSTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void WLSTrajectory::operator delete(void* aTrajectory) {
|
||||
WLSTrajectoryAllocator->FreeSingle((WLSTrajectory*)aTrajectory);
|
||||
inline void WLSTrajectory::operator delete(void* aTrajectory)
|
||||
{
|
||||
WLSTrajectoryAllocator->FreeSingle((WLSTrajectory*) aTrajectory);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user