Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -31,21 +31,20 @@
|
||||
#ifndef RE01ActionInitialization_H
|
||||
#define RE01ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE01ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE01ActionInitialization();
|
||||
RE01ActionInitialization();
|
||||
virtual ~RE01ActionInitialization();
|
||||
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
//G4bool m_bParallelWorld;
|
||||
private:
|
||||
// G4bool m_bParallelWorld;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,87 +31,87 @@
|
||||
#ifndef RE01CalorimeterHit_h
|
||||
#define RE01CalorimeterHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
class RE01CalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
RE01CalorimeterHit(G4LogicalVolume* logVol,G4int z,G4int phi);
|
||||
virtual ~RE01CalorimeterHit();
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
public:
|
||||
RE01CalorimeterHit(G4LogicalVolume* logVol, G4int z, G4int phi);
|
||||
virtual ~RE01CalorimeterHit();
|
||||
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
inline G4int GetZ() { return fZCellID; }
|
||||
inline G4int GetPhi() { return fPhiCellID; }
|
||||
inline void SetEdep(G4double de)
|
||||
{ fEdep = de; fEdepByATrack = de; }
|
||||
inline void AddEdep(G4double de)
|
||||
{ fEdep += de; fEdepByATrack += de; }
|
||||
inline G4double GetEdep()
|
||||
{ return fEdep; }
|
||||
inline G4double GetEdepByATrack()
|
||||
{ return fEdepByATrack; }
|
||||
inline void ClearEdepByATrack()
|
||||
{ fEdepByATrack = 0.; fTrackInfo = RE01TrackInformation(); }
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ fPos = xyz; }
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{ fRot = rmat; }
|
||||
inline void SetTrackInformation(const G4Track* aTrack)
|
||||
{
|
||||
RE01TrackInformation* anInfo =
|
||||
(RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
fTrackInfo = *anInfo;
|
||||
}
|
||||
inline RE01TrackInformation* GetTrackInformation()
|
||||
{ return &fTrackInfo; }
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
private:
|
||||
G4int fZCellID;
|
||||
G4int fPhiCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fPLogV;
|
||||
G4double fEdepByATrack;
|
||||
RE01TrackInformation fTrackInfo;
|
||||
inline G4int GetZ() { return fZCellID; }
|
||||
inline G4int GetPhi() { return fPhiCellID; }
|
||||
inline void SetEdep(G4double de)
|
||||
{
|
||||
fEdep = de;
|
||||
fEdepByATrack = de;
|
||||
}
|
||||
inline void AddEdep(G4double de)
|
||||
{
|
||||
fEdep += de;
|
||||
fEdepByATrack += de;
|
||||
}
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
inline G4double GetEdepByATrack() { return fEdepByATrack; }
|
||||
inline void ClearEdepByATrack()
|
||||
{
|
||||
fEdepByATrack = 0.;
|
||||
fTrackInfo = RE01TrackInformation();
|
||||
}
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
inline void SetTrackInformation(const G4Track* aTrack)
|
||||
{
|
||||
RE01TrackInformation* anInfo = (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
fTrackInfo = *anInfo;
|
||||
}
|
||||
inline RE01TrackInformation* GetTrackInformation() { return &fTrackInfo; }
|
||||
|
||||
private:
|
||||
G4int fZCellID;
|
||||
G4int fPhiCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fPLogV;
|
||||
G4double fEdepByATrack;
|
||||
RE01TrackInformation fTrackInfo;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<RE01CalorimeterHit> RE01CalorimeterHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE01CalorimeterHit> * RE01CalorimeterHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE01CalorimeterHit>* RE01CalorimeterHitAllocator;
|
||||
|
||||
inline void* RE01CalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if(!RE01CalorimeterHitAllocator)
|
||||
if (!RE01CalorimeterHitAllocator)
|
||||
RE01CalorimeterHitAllocator = new G4Allocator<RE01CalorimeterHit>;
|
||||
return (void *) RE01CalorimeterHitAllocator->MallocSingle();
|
||||
return (void*)RE01CalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE01CalorimeterHit::operator delete(void *aHit)
|
||||
inline void RE01CalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
RE01CalorimeterHitAllocator->FreeSingle((RE01CalorimeterHit*) aHit);
|
||||
RE01CalorimeterHitAllocator->FreeSingle((RE01CalorimeterHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE01CalorimeterParametrisation_H
|
||||
#define RE01CalorimeterParametrisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Tubs;
|
||||
@@ -52,47 +52,31 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
class RE01CalorimeterParametrisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
RE01CalorimeterParametrisation();
|
||||
~RE01CalorimeterParametrisation();
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
void ComputeDimensions(G4Tubs & calorimeterLayer,
|
||||
const G4int copyNo,
|
||||
const G4VPhysicalVolume * physVol) const;
|
||||
{
|
||||
public:
|
||||
RE01CalorimeterParametrisation();
|
||||
~RE01CalorimeterParametrisation();
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
void ComputeDimensions(G4Trd&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Trap&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Cons&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Sphere&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Ellipsoid&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Torus&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Para&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Hype&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Box&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Orb&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Polycone&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Polyhedra&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
void ComputeDimensions(G4Tubs& calorimeterLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const;
|
||||
|
||||
private:
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
void ComputeDimensions(G4Trd&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Trap&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Cons&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Sphere&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Ellipsoid&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Torus&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Para&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Hype&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Orb&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
#include "RE01DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,17 +35,16 @@
|
||||
|
||||
class RE01CalorimeterROGeometry : public G4VUserParallelWorld
|
||||
{
|
||||
public:
|
||||
RE01CalorimeterROGeometry(G4String&);
|
||||
virtual ~RE01CalorimeterROGeometry();
|
||||
public:
|
||||
RE01CalorimeterROGeometry(G4String&);
|
||||
virtual ~RE01CalorimeterROGeometry();
|
||||
|
||||
protected:
|
||||
virtual void Construct();
|
||||
virtual void ConstructSD();
|
||||
protected:
|
||||
virtual void Construct();
|
||||
virtual void ConstructSD();
|
||||
|
||||
private:
|
||||
private:
|
||||
#include "RE01DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,31 +31,29 @@
|
||||
#ifndef RE01CalorimeterSD_h
|
||||
#define RE01CalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
|
||||
class RE01CalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
RE01CalorimeterSD(G4String name);
|
||||
virtual ~RE01CalorimeterSD();
|
||||
|
||||
public:
|
||||
RE01CalorimeterSD(G4String name);
|
||||
virtual ~RE01CalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual void Initialize(G4HCofThisEvent* HCE);
|
||||
|
||||
protected:
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
|
||||
private:
|
||||
RE01CalorimeterHitsCollection *fCalCollection;
|
||||
int fCellID[20][48];
|
||||
const int fNumberOfCellsInZ;
|
||||
const int fNumberOfCellsInPhi;
|
||||
protected:
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
|
||||
private:
|
||||
RE01CalorimeterHitsCollection* fCalCollection;
|
||||
int fCellID[20][48];
|
||||
const int fNumberOfCellsInZ;
|
||||
const int fNumberOfCellsInPhi;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -39,20 +39,19 @@ class G4LogicalVolume;
|
||||
|
||||
class RE01DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
RE01DetectorConstruction();
|
||||
virtual ~RE01DetectorConstruction();
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
private:
|
||||
public:
|
||||
RE01DetectorConstruction();
|
||||
virtual ~RE01DetectorConstruction();
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
private:
|
||||
#include "RE01DetectorParameterDef.hh"
|
||||
|
||||
G4LogicalVolume * fTrackerLayer_log;
|
||||
G4LogicalVolume * fCalorimeter_log;
|
||||
G4LogicalVolume* fTrackerLayer_log;
|
||||
G4LogicalVolume* fCalorimeter_log;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,41 +28,41 @@
|
||||
//
|
||||
//
|
||||
|
||||
G4double fExpHall_x;
|
||||
G4double fExpHall_y;
|
||||
G4double fExpHall_z;
|
||||
G4double fExpHall_x;
|
||||
G4double fExpHall_y;
|
||||
G4double fExpHall_z;
|
||||
|
||||
G4double fTrkTubs_rmax;
|
||||
G4double fTrkTubs_rmin;
|
||||
G4double fTrkTubs_dz;
|
||||
G4double fTrkTubs_sphi;
|
||||
G4double fTrkTubs_dphi;
|
||||
G4double fTrkTubs_rmax;
|
||||
G4double fTrkTubs_rmin;
|
||||
G4double fTrkTubs_dz;
|
||||
G4double fTrkTubs_sphi;
|
||||
G4double fTrkTubs_dphi;
|
||||
|
||||
G4int fNotrkLayers;
|
||||
G4double fTracker_radius[5];
|
||||
G4double fTracker_thick;
|
||||
G4double fTracker_length[5];
|
||||
G4int fNotrkLayers;
|
||||
G4double fTracker_radius[5];
|
||||
G4double fTracker_thick;
|
||||
G4double fTracker_length[5];
|
||||
|
||||
G4double fCaloTubs_rmax;
|
||||
G4double fCaloTubs_rmin;
|
||||
G4double fCaloTubs_dz;
|
||||
G4double fCaloTubs_sphi;
|
||||
G4double fCaloTubs_dphi;
|
||||
G4double fCaloTubs_rmax;
|
||||
G4double fCaloTubs_rmin;
|
||||
G4double fCaloTubs_dz;
|
||||
G4double fCaloTubs_sphi;
|
||||
G4double fCaloTubs_dphi;
|
||||
|
||||
G4int fNocaloLayers;
|
||||
G4double fAbsorber_thick;
|
||||
G4double fScinti_thick;
|
||||
G4int fNocaloLayers;
|
||||
G4double fAbsorber_thick;
|
||||
G4double fScinti_thick;
|
||||
|
||||
G4int fSegmentsinZ;
|
||||
G4double fCaloRing_rmax;
|
||||
G4double fCaloRing_rmin;
|
||||
G4double fCaloRing_dz;
|
||||
G4double fCaloRing_sphi;
|
||||
G4double fCaloRing_dphi;
|
||||
G4int fSegmentsinZ;
|
||||
G4double fCaloRing_rmax;
|
||||
G4double fCaloRing_rmin;
|
||||
G4double fCaloRing_dz;
|
||||
G4double fCaloRing_sphi;
|
||||
G4double fCaloRing_dphi;
|
||||
|
||||
G4int fSegmentsinPhi;
|
||||
G4double fCaloCell_rmax;
|
||||
G4double fCaloCell_rmin;
|
||||
G4double fCaloCell_dz;
|
||||
G4double fCaloCell_sphi;
|
||||
G4double fCaloCell_dphi;
|
||||
G4int fSegmentsinPhi;
|
||||
G4double fCaloCell_rmax;
|
||||
G4double fCaloCell_rmin;
|
||||
G4double fCaloCell_dz;
|
||||
G4double fCaloCell_sphi;
|
||||
G4double fCaloCell_dphi;
|
||||
|
||||
@@ -38,21 +38,19 @@ class G4PrimaryParticle;
|
||||
|
||||
class RE01EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
RE01EventAction();//G4bool);
|
||||
virtual ~RE01EventAction();
|
||||
public:
|
||||
RE01EventAction(); // G4bool);
|
||||
virtual ~RE01EventAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
private:
|
||||
G4int fTrackerCollID;
|
||||
G4int fCalorimeterCollID;
|
||||
|
||||
void PrintPrimary(G4PrimaryParticle* pp,G4int ind);
|
||||
private:
|
||||
G4int fTrackerCollID;
|
||||
G4int fCalorimeterCollID;
|
||||
|
||||
void PrintPrimary(G4PrimaryParticle* pp, G4int ind);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -31,23 +31,21 @@
|
||||
#ifndef RE01Field_H
|
||||
#define RE01Field_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4MagneticField.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE01Field : public G4MagneticField
|
||||
{
|
||||
public:
|
||||
RE01Field();
|
||||
virtual ~RE01Field();
|
||||
|
||||
virtual void GetFieldValue( const double point[3],
|
||||
double *bfield ) const;
|
||||
|
||||
private:
|
||||
G4double fBz;
|
||||
G4double fRmax_sq;
|
||||
G4double fZmax;
|
||||
public:
|
||||
RE01Field();
|
||||
virtual ~RE01Field();
|
||||
|
||||
virtual void GetFieldValue(const double point[3], double* bfield) const;
|
||||
|
||||
private:
|
||||
G4double fBz;
|
||||
G4double fRmax_sq;
|
||||
G4double fZmax;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -38,27 +38,22 @@ class G4VPrimaryGenerator;
|
||||
class G4Event;
|
||||
class RE01PrimaryGeneratorMessenger;
|
||||
|
||||
class RE01PrimaryGeneratorAction:public G4VUserPrimaryGeneratorAction
|
||||
class RE01PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
RE01PrimaryGeneratorAction();
|
||||
virtual ~RE01PrimaryGeneratorAction();
|
||||
public:
|
||||
RE01PrimaryGeneratorAction();
|
||||
virtual ~RE01PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event* anEvent);
|
||||
inline void SetHEPEvtGenerator(G4bool f)
|
||||
{ fUseHEPEvt = f; }
|
||||
inline G4bool GetHEPEvtGenerator()
|
||||
{ return fUseHEPEvt; }
|
||||
|
||||
private:
|
||||
G4VPrimaryGenerator* fHEPEvt;
|
||||
G4VPrimaryGenerator* fParticleGun;
|
||||
RE01PrimaryGeneratorMessenger* fMessenger;
|
||||
G4bool fUseHEPEvt;
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event* anEvent);
|
||||
inline void SetHEPEvtGenerator(G4bool f) { fUseHEPEvt = f; }
|
||||
inline G4bool GetHEPEvtGenerator() { return fUseHEPEvt; }
|
||||
|
||||
private:
|
||||
G4VPrimaryGenerator* fHEPEvt;
|
||||
G4VPrimaryGenerator* fParticleGun;
|
||||
RE01PrimaryGeneratorMessenger* fMessenger;
|
||||
G4bool fUseHEPEvt;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -38,25 +38,22 @@ class RE01PrimaryGeneratorAction;
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
|
||||
class RE01PrimaryGeneratorMessenger: public G4UImessenger
|
||||
class RE01PrimaryGeneratorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
RE01PrimaryGeneratorMessenger(RE01PrimaryGeneratorAction* mpga);
|
||||
virtual ~RE01PrimaryGeneratorMessenger();
|
||||
public:
|
||||
RE01PrimaryGeneratorMessenger(RE01PrimaryGeneratorAction* mpga);
|
||||
virtual ~RE01PrimaryGeneratorMessenger();
|
||||
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand* command, G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand* command);
|
||||
|
||||
private:
|
||||
RE01PrimaryGeneratorAction * fMyAction;
|
||||
|
||||
private: //commands
|
||||
G4UIdirectory * fMydetDirectory;
|
||||
G4UIcmdWithAString * fGenCmd;
|
||||
|
||||
private:
|
||||
RE01PrimaryGeneratorAction* fMyAction;
|
||||
|
||||
private: // commands
|
||||
G4UIdirectory* fMydetDirectory;
|
||||
G4UIcmdWithAString* fGenCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -32,26 +32,25 @@
|
||||
#ifndef RE01RegionInformation_H
|
||||
#define RE01RegionInformation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserRegionInformation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE01RegionInformation : public G4VUserRegionInformation
|
||||
{
|
||||
public:
|
||||
RE01RegionInformation();
|
||||
virtual ~RE01RegionInformation();
|
||||
virtual void Print() const;
|
||||
public:
|
||||
RE01RegionInformation();
|
||||
virtual ~RE01RegionInformation();
|
||||
virtual void Print() const;
|
||||
|
||||
inline void SetWorld(G4bool v=true) {fIsWorld = v;}
|
||||
inline void SetTracker(G4bool v=true) {fIsTracker = v;}
|
||||
inline void SetCalorimeter(G4bool v=true) {fIsCalorimeter = v;}
|
||||
inline G4bool IsCalorimeter() const {return fIsCalorimeter;}
|
||||
inline void SetWorld(G4bool v = true) { fIsWorld = v; }
|
||||
inline void SetTracker(G4bool v = true) { fIsTracker = v; }
|
||||
inline void SetCalorimeter(G4bool v = true) { fIsCalorimeter = v; }
|
||||
inline G4bool IsCalorimeter() const { return fIsCalorimeter; }
|
||||
|
||||
private:
|
||||
G4bool fIsWorld;
|
||||
G4bool fIsTracker;
|
||||
G4bool fIsCalorimeter;
|
||||
private:
|
||||
G4bool fIsWorld;
|
||||
G4bool fIsTracker;
|
||||
G4bool fIsCalorimeter;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Definition of the RE01RunAction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef RE01RunAction_h
|
||||
#define RE01RunAction_h 1
|
||||
@@ -39,18 +39,13 @@ class G4Run;
|
||||
|
||||
class RE01RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
RE01RunAction();
|
||||
virtual ~RE01RunAction();
|
||||
public:
|
||||
RE01RunAction();
|
||||
virtual ~RE01RunAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
public:
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -31,29 +31,28 @@
|
||||
#ifndef RE01StackingAction_H
|
||||
#define RE01StackingAction_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Track;
|
||||
class G4VHitsCollection;
|
||||
|
||||
class RE01StackingAction : public G4UserStackingAction
|
||||
{
|
||||
public:
|
||||
RE01StackingAction();
|
||||
virtual ~RE01StackingAction();
|
||||
public:
|
||||
RE01StackingAction();
|
||||
virtual ~RE01StackingAction();
|
||||
|
||||
public:
|
||||
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
|
||||
virtual void NewStage();
|
||||
virtual void PrepareNewEvent();
|
||||
public:
|
||||
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track* aTrack);
|
||||
virtual void NewStage();
|
||||
virtual void PrepareNewEvent();
|
||||
|
||||
private:
|
||||
G4VHitsCollection* GetCalCollection();
|
||||
|
||||
G4int fStage;
|
||||
G4int fCalorimeterHitsColID;
|
||||
private:
|
||||
G4VHitsCollection* GetCalCollection();
|
||||
|
||||
G4int fStage;
|
||||
G4int fCalorimeterHitsColID;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,17 +31,16 @@
|
||||
#ifndef RE01SteppingAction_H
|
||||
#define RE01SteppingAction_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE01SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
public:
|
||||
RE01SteppingAction();
|
||||
virtual ~RE01SteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
public:
|
||||
RE01SteppingAction();
|
||||
virtual ~RE01SteppingAction();
|
||||
|
||||
virtual void UserSteppingAction(const G4Step*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,76 +32,76 @@
|
||||
#ifndef RE01TrackInformation_h
|
||||
#define RE01TrackInformation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VUserTrackInformation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE01TrackInformation : public G4VUserTrackInformation
|
||||
class RE01TrackInformation : public G4VUserTrackInformation
|
||||
{
|
||||
public:
|
||||
RE01TrackInformation();
|
||||
RE01TrackInformation(const G4Track* aTrack);
|
||||
RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
|
||||
virtual ~RE01TrackInformation();
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrackInfo);
|
||||
public:
|
||||
RE01TrackInformation();
|
||||
RE01TrackInformation(const G4Track* aTrack);
|
||||
RE01TrackInformation(const RE01TrackInformation* aTrackInfo);
|
||||
virtual ~RE01TrackInformation();
|
||||
|
||||
RE01TrackInformation& operator =(const RE01TrackInformation& right);
|
||||
|
||||
void SetSourceTrackInformation(const G4Track* aTrack);
|
||||
virtual void Print() const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aTrackInfo);
|
||||
|
||||
public:
|
||||
inline G4int GetTrackingStatus() const {return fTrackingStatus;}
|
||||
inline void SetTrackingStatus(G4int i) {fTrackingStatus = i;}
|
||||
inline G4int GetSourceTrackID() const {return fSourceTrackID;}
|
||||
inline void SetSuspendedStepID(G4int i) {fSuspendedStepID = i;}
|
||||
inline G4int GetSuspendedStepID() const {return fSuspendedStepID;}
|
||||
RE01TrackInformation& operator=(const RE01TrackInformation& right);
|
||||
|
||||
private:
|
||||
// Information of the primary track at the primary vertex
|
||||
G4int fOriginalTrackID; // Track ID of primary particle
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4ThreeVector fOriginalPosition;
|
||||
G4ThreeVector fOriginalMomentum;
|
||||
G4double fOriginalEnergy;
|
||||
G4double fOriginalTime;
|
||||
void SetSourceTrackInformation(const G4Track* aTrack);
|
||||
virtual void Print() const;
|
||||
|
||||
G4int fTrackingStatus;
|
||||
// trackingStatus = 1 : primary or secondary track which has not yet reached
|
||||
// to calorimeter
|
||||
// = 0 : track which or ancester of which has reached to
|
||||
// calorimeter
|
||||
// = 2 : track or its ancester had reached to calorimeter
|
||||
// and then escaped from it
|
||||
// Information of the track which reached to the calorimeter boundary at the
|
||||
// boundary surface.
|
||||
// This information is valid only for trackingStatus = 0 or 2
|
||||
G4int fSourceTrackID;
|
||||
G4ParticleDefinition* fSourceDefinition;
|
||||
G4ThreeVector fSourcePosition;
|
||||
G4ThreeVector fSourceMomentum;
|
||||
G4double fSourceEnergy;
|
||||
G4double fSourceTime;
|
||||
G4int fSuspendedStepID;
|
||||
public:
|
||||
inline G4int GetTrackingStatus() const { return fTrackingStatus; }
|
||||
inline void SetTrackingStatus(G4int i) { fTrackingStatus = i; }
|
||||
inline G4int GetSourceTrackID() const { return fSourceTrackID; }
|
||||
inline void SetSuspendedStepID(G4int i) { fSuspendedStepID = i; }
|
||||
inline G4int GetSuspendedStepID() const { return fSuspendedStepID; }
|
||||
|
||||
private:
|
||||
// Information of the primary track at the primary vertex
|
||||
G4int fOriginalTrackID; // Track ID of primary particle
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4ThreeVector fOriginalPosition;
|
||||
G4ThreeVector fOriginalMomentum;
|
||||
G4double fOriginalEnergy;
|
||||
G4double fOriginalTime;
|
||||
|
||||
G4int fTrackingStatus;
|
||||
// trackingStatus = 1 : primary or secondary track which has not yet reached
|
||||
// to calorimeter
|
||||
// = 0 : track which or ancester of which has reached to
|
||||
// calorimeter
|
||||
// = 2 : track or its ancester had reached to calorimeter
|
||||
// and then escaped from it
|
||||
// Information of the track which reached to the calorimeter boundary at the
|
||||
// boundary surface.
|
||||
// This information is valid only for trackingStatus = 0 or 2
|
||||
G4int fSourceTrackID;
|
||||
G4ParticleDefinition* fSourceDefinition;
|
||||
G4ThreeVector fSourcePosition;
|
||||
G4ThreeVector fSourceMomentum;
|
||||
G4double fSourceEnergy;
|
||||
G4double fSourceTime;
|
||||
G4int fSuspendedStepID;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal
|
||||
G4Allocator<RE01TrackInformation> * aTrackInformationAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE01TrackInformation>* aTrackInformationAllocator;
|
||||
|
||||
inline void* RE01TrackInformation::operator new(size_t)
|
||||
{
|
||||
if(!aTrackInformationAllocator)
|
||||
if (!aTrackInformationAllocator)
|
||||
aTrackInformationAllocator = new G4Allocator<RE01TrackInformation>;
|
||||
return (void*)aTrackInformationAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE01TrackInformation::operator delete(void *aTrackInfo)
|
||||
{ aTrackInformationAllocator->FreeSingle((RE01TrackInformation*)aTrackInfo);}
|
||||
inline void RE01TrackInformation::operator delete(void* aTrackInfo)
|
||||
{
|
||||
aTrackInformationAllocator->FreeSingle((RE01TrackInformation*)aTrackInfo);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,63 +31,55 @@
|
||||
#ifndef RE01TrackerHit_h
|
||||
#define RE01TrackerHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
class G4AttValue;
|
||||
|
||||
class RE01TrackerHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
public:
|
||||
RE01TrackerHit();
|
||||
virtual ~RE01TrackerHit();
|
||||
|
||||
RE01TrackerHit();
|
||||
virtual ~RE01TrackerHit();
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
public:
|
||||
inline void SetEdep(G4double de)
|
||||
{ fEdep = de; }
|
||||
inline G4double GetEdep() const
|
||||
{ return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ fPos = xyz; }
|
||||
inline void SetTrackID(G4int i)
|
||||
{ fTrackID = i; }
|
||||
inline G4int GetTrackID() const
|
||||
{ return fTrackID; }
|
||||
virtual void Draw();
|
||||
virtual void Print();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
private:
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4int fTrackID;
|
||||
public:
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline G4double GetEdep() const { return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline void SetTrackID(G4int i) { fTrackID = i; }
|
||||
inline G4int GetTrackID() const { return fTrackID; }
|
||||
|
||||
private:
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4int fTrackID;
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<RE01TrackerHit> RE01TrackerHitsCollection;
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE01TrackerHit> * RE01TrackerHitAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE01TrackerHit>* RE01TrackerHitAllocator;
|
||||
|
||||
inline void* RE01TrackerHit::operator new(size_t)
|
||||
{
|
||||
if(!RE01TrackerHitAllocator)
|
||||
RE01TrackerHitAllocator = new G4Allocator<RE01TrackerHit>;
|
||||
return (void *) RE01TrackerHitAllocator->MallocSingle();
|
||||
if (!RE01TrackerHitAllocator) RE01TrackerHitAllocator = new G4Allocator<RE01TrackerHit>;
|
||||
return (void*)RE01TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE01TrackerHit::operator delete(void *aHit)
|
||||
inline void RE01TrackerHit::operator delete(void* aHit)
|
||||
{
|
||||
RE01TrackerHitAllocator->FreeSingle((RE01TrackerHit*) aHit);
|
||||
RE01TrackerHitAllocator->FreeSingle((RE01TrackerHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE01TrackerParametrisation_H
|
||||
#define RE01TrackerParametrisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Tubs;
|
||||
@@ -52,48 +52,31 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
class RE01TrackerParametrisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
RE01TrackerParametrisation();
|
||||
~RE01TrackerParametrisation();
|
||||
{
|
||||
public:
|
||||
RE01TrackerParametrisation();
|
||||
~RE01TrackerParametrisation();
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
void ComputeDimensions(G4Tubs & trackerLayer,
|
||||
const G4int copyNo,
|
||||
const G4VPhysicalVolume * physVol) const;
|
||||
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
void ComputeDimensions(G4Tubs& trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const;
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
void ComputeDimensions(G4Trd&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Trap&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Cons&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Sphere&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Ellipsoid&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Torus&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Para&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Hype&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Orb&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
void ComputeDimensions(G4Trd&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Trap&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Cons&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Sphere&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Ellipsoid&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Torus&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Para&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Hype&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Box&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Orb&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Polycone&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions(G4Polyhedra&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
|
||||
private:
|
||||
private:
|
||||
#include "RE01DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,28 +31,27 @@
|
||||
#ifndef RE01TrackerSD_h
|
||||
#define RE01TrackerSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "RE01TrackerHit.hh"
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
class RE01TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
RE01TrackerSD(G4String name);
|
||||
virtual ~RE01TrackerSD();
|
||||
public:
|
||||
RE01TrackerSD(G4String name);
|
||||
virtual ~RE01TrackerSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
|
||||
protected:
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
virtual void Initialize(G4HCofThisEvent* HCE);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* HCE);
|
||||
|
||||
private:
|
||||
RE01TrackerHitsCollection *fTrackerCollection;
|
||||
protected:
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
|
||||
private:
|
||||
RE01TrackerHitsCollection* fTrackerCollection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -33,15 +33,14 @@
|
||||
|
||||
#include "G4UserTrackingAction.hh"
|
||||
|
||||
class RE01TrackingAction : public G4UserTrackingAction
|
||||
class RE01TrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
RE01TrackingAction();
|
||||
virtual ~RE01TrackingAction(){};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
|
||||
public:
|
||||
RE01TrackingAction();
|
||||
virtual ~RE01TrackingAction() {};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,16 +32,17 @@
|
||||
#ifndef RE01Trajectory_h
|
||||
#define RE01Trajectory_h 1
|
||||
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h>
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrajectoryPoint.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <vector>
|
||||
|
||||
class G4Polyline;
|
||||
@@ -52,53 +53,49 @@ typedef std::vector<G4VTrajectoryPoint*> RE01TrajectoryPointContainer;
|
||||
|
||||
class RE01Trajectory : public G4VTrajectory
|
||||
{
|
||||
public:
|
||||
RE01Trajectory(const G4Track* aTrack);
|
||||
virtual ~RE01Trajectory();
|
||||
public:
|
||||
RE01Trajectory(const G4Track* aTrack);
|
||||
virtual ~RE01Trajectory();
|
||||
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
virtual void ShowTrajectory(std::ostream& os = G4cout) const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const RE01Trajectory& right) const
|
||||
{return (this==&right);}
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator==(const RE01Trajectory& right) const { return (this == &right); }
|
||||
|
||||
virtual G4int GetTrackID() const { return fTrackID; }
|
||||
virtual G4int GetParentID() const { return fParentID; }
|
||||
virtual G4String GetParticleName() const { return fParticleName; }
|
||||
virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
virtual G4ThreeVector GetInitialMomentum() const { return fMomentum; }
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*fPositionRecord)[i]; }
|
||||
|
||||
private:
|
||||
RE01TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fTrackStatus;
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4String fParticleName;
|
||||
G4double fPDGCharge;
|
||||
G4int fPDGEncoding;
|
||||
G4ThreeVector fMomentum;
|
||||
G4ThreeVector fVertexPosition;
|
||||
G4double fGlobalTime;
|
||||
virtual G4int GetTrackID() const { return fTrackID; }
|
||||
virtual G4int GetParentID() const { return fParentID; }
|
||||
virtual G4String GetParticleName() const { return fParticleName; }
|
||||
virtual G4double GetCharge() const { return fPDGCharge; }
|
||||
virtual G4int GetPDGEncoding() const { return fPDGEncoding; }
|
||||
virtual G4ThreeVector GetInitialMomentum() const { return fMomentum; }
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const { return (*fPositionRecord)[i]; }
|
||||
|
||||
private:
|
||||
RE01TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fTrackStatus;
|
||||
G4ParticleDefinition* fParticleDefinition;
|
||||
G4String fParticleName;
|
||||
G4double fPDGCharge;
|
||||
G4int fPDGEncoding;
|
||||
G4ThreeVector fMomentum;
|
||||
G4ThreeVector fVertexPosition;
|
||||
G4double fGlobalTime;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE01Trajectory> * myTrajectoryAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE01Trajectory>* myTrajectoryAllocator;
|
||||
|
||||
inline void* RE01Trajectory::operator new(size_t)
|
||||
{
|
||||
if(!myTrajectoryAllocator)
|
||||
myTrajectoryAllocator = new G4Allocator<RE01Trajectory>;
|
||||
if (!myTrajectoryAllocator) myTrajectoryAllocator = new G4Allocator<RE01Trajectory>;
|
||||
return (void*)myTrajectoryAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
@@ -108,4 +105,3 @@ inline void RE01Trajectory::operator delete(void* aTrajectory)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user