Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -38,27 +38,25 @@
|
||||
//
|
||||
// --------------------------------------------------------------
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#include "RE01DetectorConstruction.hh"
|
||||
#include "RE01CalorimeterROGeometry.hh"
|
||||
#include "QGSP_BERT.hh"
|
||||
#include "G4UnknownDecayPhysics.hh"
|
||||
#include "G4ParallelWorldPhysics.hh"
|
||||
#include "RE01ActionInitialization.hh"
|
||||
#include "RE01CalorimeterROGeometry.hh"
|
||||
#include "RE01DetectorConstruction.hh"
|
||||
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4ParallelWorldPhysics.hh"
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4UnknownDecayPhysics.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
@@ -68,34 +66,28 @@ int main(int argc,char** argv)
|
||||
visManager->Initialize();
|
||||
|
||||
G4String parallelWorldName = "ReadoutWorld";
|
||||
G4VUserDetectorConstruction* detector
|
||||
= new RE01DetectorConstruction();
|
||||
detector->RegisterParallelWorld(
|
||||
new RE01CalorimeterROGeometry(parallelWorldName));
|
||||
G4VUserDetectorConstruction* detector = new RE01DetectorConstruction();
|
||||
detector->RegisterParallelWorld(new RE01CalorimeterROGeometry(parallelWorldName));
|
||||
runManager->SetUserInitialization(detector);
|
||||
|
||||
G4VModularPhysicsList* physicsList = new QGSP_BERT;
|
||||
physicsList->RegisterPhysics(new G4UnknownDecayPhysics);
|
||||
physicsList->RegisterPhysics(
|
||||
new G4ParallelWorldPhysics(parallelWorldName));
|
||||
physicsList->RegisterPhysics(new G4ParallelWorldPhysics(parallelWorldName));
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
runManager->SetUserInitialization(
|
||||
new RE01ActionInitialization);
|
||||
runManager->SetUserInitialization(new RE01ActionInitialization);
|
||||
|
||||
runManager->Initialize();
|
||||
|
||||
if(ui)
|
||||
{
|
||||
if (ui) {
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
}
|
||||
|
||||
delete visManager;
|
||||
@@ -104,4 +96,3 @@ int main(int argc,char** argv)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -29,21 +29,25 @@
|
||||
//
|
||||
|
||||
#include "RE01ActionInitialization.hh"
|
||||
|
||||
#include "RE01EventAction.hh"
|
||||
#include "RE01PrimaryGeneratorAction.hh"
|
||||
#include "RE01RunAction.hh"
|
||||
#include "RE01EventAction.hh"
|
||||
|
||||
#include "RE01StackingAction.hh"
|
||||
#include "RE01TrackingAction.hh"
|
||||
#include "RE01SteppingAction.hh"
|
||||
#include "RE01TrackingAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01ActionInitialization::RE01ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01ActionInitialization::~RE01ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01ActionInitialization::Build() const
|
||||
@@ -70,4 +74,3 @@ void RE01ActionInitialization::BuildForMaster() const
|
||||
G4UserRunAction* run_action = new RE01RunAction;
|
||||
SetUserAction(run_action);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,79 +30,86 @@
|
||||
//
|
||||
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<RE01CalorimeterHit> * RE01CalorimeterHitAllocator = 0;
|
||||
G4ThreadLocal G4Allocator<RE01CalorimeterHit>* RE01CalorimeterHitAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterHit::RE01CalorimeterHit(G4LogicalVolume* logVol,
|
||||
G4int z, G4int phi)
|
||||
:G4VHit(), fZCellID(z), fPhiCellID(phi), fEdep(0.0),
|
||||
fPos(0),fRot(0.,0.,0.),fPLogV(logVol),fEdepByATrack(0.0),fTrackInfo()
|
||||
{;}
|
||||
RE01CalorimeterHit::RE01CalorimeterHit(G4LogicalVolume* logVol, G4int z, G4int phi)
|
||||
: G4VHit(),
|
||||
fZCellID(z),
|
||||
fPhiCellID(phi),
|
||||
fEdep(0.0),
|
||||
fPos(0),
|
||||
fRot(0., 0., 0.),
|
||||
fPLogV(logVol),
|
||||
fEdepByATrack(0.0),
|
||||
fTrackInfo()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterHit::~RE01CalorimeterHit()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
G4Transform3D trans(fRot,fPos);
|
||||
if (pVVisManager) {
|
||||
G4Transform3D trans(fRot, fPos);
|
||||
G4VisAttributes attribs;
|
||||
const G4VisAttributes* pVA = fPLogV->GetVisAttributes();
|
||||
if(pVA) attribs = *pVA;
|
||||
G4Colour colour(1.,0.,0.);
|
||||
if (pVA) attribs = *pVA;
|
||||
G4Colour colour(1., 0., 0.);
|
||||
attribs.SetColour(colour);
|
||||
attribs.SetForceWireframe(false);
|
||||
attribs.SetForceSolid(true);
|
||||
pVVisManager->Draw(*fPLogV,attribs,trans);
|
||||
pVVisManager->Draw(*fPLogV, attribs, trans);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String,G4AttDef>* RE01CalorimeterHit::GetAttDefs() const
|
||||
const std::map<G4String, G4AttDef>* RE01CalorimeterHit::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
std::map<G4String,G4AttDef>* store
|
||||
= G4AttDefStore::GetInstance("RE01CalorimeterHit",isNew);
|
||||
std::map<G4String, G4AttDef>* store = G4AttDefStore::GetInstance("RE01CalorimeterHit", isNew);
|
||||
if (isNew) {
|
||||
G4String hitType("HitType");
|
||||
(*store)[hitType] = G4AttDef(hitType,"Hit Type","Physics","","G4String");
|
||||
(*store)[hitType] = G4AttDef(hitType, "Hit Type", "Physics", "", "G4String");
|
||||
|
||||
G4String zCellID("ZCellID");
|
||||
(*store)[zCellID] = G4AttDef(zCellID,"Z Cell ID","Physics","","G4int");
|
||||
(*store)[zCellID] = G4AttDef(zCellID, "Z Cell ID", "Physics", "", "G4int");
|
||||
|
||||
G4String phiCellID("PhiCellID");
|
||||
(*store)[phiCellID] = G4AttDef(phiCellID,"Phi Cell ID","Physics","","G4int");
|
||||
(*store)[phiCellID] = G4AttDef(phiCellID, "Phi Cell ID", "Physics", "", "G4int");
|
||||
|
||||
G4String energy("Energy");
|
||||
(*store)[energy] = G4AttDef(energy,"Energy Deposited","Physics","G4BestUnit",
|
||||
"G4double");
|
||||
(*store)[energy] = G4AttDef(energy, "Energy Deposited", "Physics", "G4BestUnit", "G4double");
|
||||
|
||||
G4String eTrack("ETrack");
|
||||
(*store)[eTrack] = G4AttDef(eTrack,"Energy Deposited By Track","Physics",
|
||||
"G4BestUnit","G4double");
|
||||
(*store)[eTrack] =
|
||||
G4AttDef(eTrack, "Energy Deposited By Track", "Physics", "G4BestUnit", "G4double");
|
||||
|
||||
G4String pos("Pos");
|
||||
(*store)[pos] = G4AttDef(pos, "Position",
|
||||
"Physics","G4BestUnit","G4ThreeVector");
|
||||
(*store)[pos] = G4AttDef(pos, "Position", "Physics", "G4BestUnit", "G4ThreeVector");
|
||||
|
||||
G4String lvol("LVol");
|
||||
(*store)[lvol] = G4AttDef(lvol,"Logical Volume","Physics","","G4String");
|
||||
(*store)[lvol] = G4AttDef(lvol, "Logical Volume", "Physics", "", "G4String");
|
||||
}
|
||||
|
||||
return store;
|
||||
@@ -113,29 +120,22 @@ std::vector<G4AttValue>* RE01CalorimeterHit::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
values->push_back(G4AttValue("HitType","RE01CalorimeterHit",""));
|
||||
values->push_back(G4AttValue("HitType", "RE01CalorimeterHit", ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("ZCellID",G4UIcommand::ConvertToString(fZCellID),""));
|
||||
values->push_back(G4AttValue("ZCellID", G4UIcommand::ConvertToString(fZCellID), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("PhiCellID",G4UIcommand::ConvertToString(fPhiCellID),""));
|
||||
values->push_back(G4AttValue("PhiCellID", G4UIcommand::ConvertToString(fPhiCellID), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Energy",G4BestUnit(fEdep,"Energy"),""));
|
||||
values->push_back(G4AttValue("Energy", G4BestUnit(fEdep, "Energy"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("ETrack",G4BestUnit(fEdepByATrack,"Energy"),""));
|
||||
values->push_back(G4AttValue("ETrack", G4BestUnit(fEdepByATrack, "Energy"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
|
||||
values->push_back(G4AttValue("Pos", G4BestUnit(fPos, "Length"), ""));
|
||||
|
||||
if (fPLogV)
|
||||
values->push_back
|
||||
(G4AttValue("LVol",fPLogV->GetName(),""));
|
||||
values->push_back(G4AttValue("LVol", fPLogV->GetName(), ""));
|
||||
else
|
||||
values->push_back
|
||||
(G4AttValue("LVol"," ",""));
|
||||
values->push_back(G4AttValue("LVol", " ", ""));
|
||||
|
||||
return values;
|
||||
}
|
||||
@@ -143,8 +143,6 @@ std::vector<G4AttValue>* RE01CalorimeterHit::CreateAttValues() const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterHit::Print()
|
||||
{
|
||||
G4cout << "Cell[" << fZCellID << "," << fPhiCellID << "] "
|
||||
<< fEdep/GeV << " [GeV]" << G4endl;
|
||||
G4cout << "Cell[" << fZCellID << "," << fPhiCellID << "] " << fEdep / GeV << " [GeV]"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,38 +30,38 @@
|
||||
|
||||
#include "RE01CalorimeterParametrisation.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterParametrisation::RE01CalorimeterParametrisation()
|
||||
:G4VPVParameterisation()
|
||||
RE01CalorimeterParametrisation::RE01CalorimeterParametrisation() : G4VPVParameterisation()
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterParametrisation::~RE01CalorimeterParametrisation()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterParametrisation::ComputeTransformation
|
||||
(const G4int,G4VPhysicalVolume *physVol) const
|
||||
void RE01CalorimeterParametrisation::ComputeTransformation(const G4int,
|
||||
G4VPhysicalVolume* physVol) const
|
||||
{
|
||||
G4ThreeVector origin;
|
||||
physVol->SetTranslation(origin);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterParametrisation::ComputeDimensions
|
||||
(G4Tubs & calorimeterLayer, const G4int copyNo, const G4VPhysicalVolume*) const
|
||||
void RE01CalorimeterParametrisation::ComputeDimensions(G4Tubs& calorimeterLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
G4double innerRad = fCaloTubs_rmin
|
||||
+ copyNo*(fAbsorber_thick+fScinti_thick);
|
||||
G4double innerRad = fCaloTubs_rmin + copyNo * (fAbsorber_thick + fScinti_thick);
|
||||
calorimeterLayer.SetInnerRadius(innerRad);
|
||||
calorimeterLayer.SetOuterRadius(innerRad+fAbsorber_thick);
|
||||
calorimeterLayer.SetOuterRadius(innerRad + fAbsorber_thick);
|
||||
calorimeterLayer.SetZHalfLength(fCaloTubs_dz);
|
||||
calorimeterLayer.SetStartPhiAngle(fCaloTubs_sphi);
|
||||
calorimeterLayer.SetDeltaPhiAngle(fCaloTubs_dphi);
|
||||
|
||||
@@ -29,21 +29,21 @@
|
||||
//
|
||||
|
||||
#include "RE01CalorimeterROGeometry.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PVReplica.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterROGeometry::
|
||||
RE01CalorimeterROGeometry(G4String& parallelWorldName)
|
||||
RE01CalorimeterROGeometry::RE01CalorimeterROGeometry(G4String& parallelWorldName)
|
||||
: G4VUserParallelWorld(parallelWorldName)
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
@@ -51,7 +51,9 @@ RE01CalorimeterROGeometry(G4String& parallelWorldName)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterROGeometry::~RE01CalorimeterROGeometry()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterROGeometry::Construct()
|
||||
@@ -59,45 +61,38 @@ void RE01CalorimeterROGeometry::Construct()
|
||||
// A dummy material is used to fill the volumes of the readout geometry.
|
||||
// ( It will be allowed to set a NULL pointer in volumes of such virtual
|
||||
// division in future, since this material is irrelevant for tracking.)
|
||||
G4Material* dummyMat = nullptr;
|
||||
G4Material* dummyMat = nullptr;
|
||||
|
||||
//the ReadOut World:
|
||||
// the ReadOut World:
|
||||
G4VPhysicalVolume* ROWorldPhys = GetWorld();
|
||||
G4LogicalVolume *ROWorldLog = ROWorldPhys->GetLogicalVolume();
|
||||
G4LogicalVolume* ROWorldLog = ROWorldPhys->GetLogicalVolume();
|
||||
|
||||
// Calorimeter volume:
|
||||
G4VSolid * caloROtub
|
||||
= new G4Tubs("caloROtub",fCaloTubs_rmin,fCaloTubs_rmax,
|
||||
fCaloTubs_dz,fCaloTubs_sphi,fCaloTubs_dphi);
|
||||
G4LogicalVolume * caloROlog
|
||||
= new G4LogicalVolume(caloROtub,dummyMat,"caloROlogical",0,0,0);
|
||||
// G4VPhysicalVolume * caloROphys =
|
||||
new G4PVPlacement(0,G4ThreeVector(),caloROlog,"calROphysical",
|
||||
ROWorldLog,false,0);
|
||||
G4VSolid* caloROtub = new G4Tubs("caloROtub", fCaloTubs_rmin, fCaloTubs_rmax, fCaloTubs_dz,
|
||||
fCaloTubs_sphi, fCaloTubs_dphi);
|
||||
G4LogicalVolume* caloROlog = new G4LogicalVolume(caloROtub, dummyMat, "caloROlogical", 0, 0, 0);
|
||||
// G4VPhysicalVolume * caloROphys =
|
||||
new G4PVPlacement(0, G4ThreeVector(), caloROlog, "calROphysical", ROWorldLog, false, 0);
|
||||
|
||||
// -------------------------------
|
||||
// Calorimeter readout division:
|
||||
// -------------------------------
|
||||
// Phi division first: 48 sectors
|
||||
G4VSolid * caloROphiDivisionTub
|
||||
= new G4Tubs("caloROphiDivision", fCaloCell_rmin, fCaloCell_rmax,
|
||||
fCaloCell_dz, fCaloCell_sphi, fCaloCell_dphi);
|
||||
G4LogicalVolume * caloROphiDivisionLog
|
||||
= new G4LogicalVolume(caloROphiDivisionTub, dummyMat,
|
||||
"caloROphiDivisionLogical",0,0,0);
|
||||
// G4VPhysicalVolume * caloROphiDivisionPhys =
|
||||
new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog,
|
||||
caloROlog, kPhi, fSegmentsinPhi, fCaloCell_dphi);
|
||||
G4VSolid* caloROphiDivisionTub = new G4Tubs("caloROphiDivision", fCaloCell_rmin, fCaloCell_rmax,
|
||||
fCaloCell_dz, fCaloCell_sphi, fCaloCell_dphi);
|
||||
G4LogicalVolume* caloROphiDivisionLog =
|
||||
new G4LogicalVolume(caloROphiDivisionTub, dummyMat, "caloROphiDivisionLogical", 0, 0, 0);
|
||||
// G4VPhysicalVolume * caloROphiDivisionPhys =
|
||||
new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog, caloROlog, kPhi,
|
||||
fSegmentsinPhi, fCaloCell_dphi);
|
||||
// then z division: 20 slices:
|
||||
G4VSolid * caloROcellTub
|
||||
= new G4Tubs("caloROcellTub", fCaloRing_rmin, fCaloRing_rmax,
|
||||
fCaloRing_dz, fCaloRing_sphi, fCaloRing_dphi);
|
||||
G4LogicalVolume * caloROcellLog
|
||||
= new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical",0,0,0);
|
||||
// G4VPhysicalVolume * caloROcellPhys =
|
||||
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionLog,
|
||||
kZAxis, fSegmentsinZ,2.*fCaloRing_dz);
|
||||
|
||||
G4VSolid* caloROcellTub = new G4Tubs("caloROcellTub", fCaloRing_rmin, fCaloRing_rmax,
|
||||
fCaloRing_dz, fCaloRing_sphi, fCaloRing_dphi);
|
||||
G4LogicalVolume* caloROcellLog =
|
||||
new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical", 0, 0, 0);
|
||||
// G4VPhysicalVolume * caloROcellPhys =
|
||||
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionLog, kZAxis, fSegmentsinZ,
|
||||
2. * fCaloRing_dz);
|
||||
}
|
||||
|
||||
#include "RE01CalorimeterSD.hh"
|
||||
@@ -108,8 +103,7 @@ void RE01CalorimeterROGeometry::ConstructSD()
|
||||
// Sensitive Detector
|
||||
//------------------------------------------------------------------
|
||||
G4String calorimeterSDname = "/mydet/calorimeter";
|
||||
RE01CalorimeterSD * calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
|
||||
RE01CalorimeterSD* calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(calorimeterSD);
|
||||
SetSensitiveDetector("caloROcellLogical", calorimeterSD);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,94 +29,91 @@
|
||||
//
|
||||
|
||||
#include "RE01CalorimeterSD.hh"
|
||||
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterSD::RE01CalorimeterSD(G4String name)
|
||||
:G4VSensitiveDetector(name), fCalCollection(0),
|
||||
fNumberOfCellsInZ(20),fNumberOfCellsInPhi(48)
|
||||
: G4VSensitiveDetector(name), fCalCollection(0), fNumberOfCellsInZ(20), fNumberOfCellsInPhi(48)
|
||||
{
|
||||
// Initialize data member.
|
||||
for(G4int j=0;j<fNumberOfCellsInZ;j++)
|
||||
for(G4int k=0;k<fNumberOfCellsInPhi;k++)
|
||||
{
|
||||
fCellID[j][k] = -1;
|
||||
}
|
||||
for (G4int j = 0; j < fNumberOfCellsInZ; j++)
|
||||
for (G4int k = 0; k < fNumberOfCellsInPhi; k++) {
|
||||
fCellID[j][k] = -1;
|
||||
}
|
||||
//
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="calCollection");
|
||||
collectionName.insert(HCname = "calCollection");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterSD::~RE01CalorimeterSD()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01CalorimeterSD::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
fCalCollection = new RE01CalorimeterHitsCollection
|
||||
(SensitiveDetectorName,collectionName[0]);
|
||||
for(G4int j=0;j<fNumberOfCellsInZ;j++)
|
||||
for(G4int k=0;k<fNumberOfCellsInPhi;k++)
|
||||
{
|
||||
fCellID[j][k] = -1;
|
||||
}
|
||||
fCalCollection = new RE01CalorimeterHitsCollection(SensitiveDetectorName, collectionName[0]);
|
||||
for (G4int j = 0; j < fNumberOfCellsInZ; j++)
|
||||
for (G4int k = 0; k < fNumberOfCellsInPhi; k++) {
|
||||
fCellID[j][k] = -1;
|
||||
}
|
||||
|
||||
static G4int HCID = -1;
|
||||
if(HCID<0)
|
||||
{ HCID = GetCollectionID(0); }
|
||||
HCE->AddHitsCollection( HCID, fCalCollection );
|
||||
if (HCID < 0) {
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
HCE->AddHitsCollection(HCID, fCalCollection);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool RE01CalorimeterSD::ProcessHits(G4Step*aStep,G4TouchableHistory*)
|
||||
G4bool RE01CalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
{
|
||||
//***** RE05CalorimeterSD has been migrated to Geant4 version 10 that does not
|
||||
//***** support Readout Geometry in multi-threaded mode. Now RE05CalorimeterSD
|
||||
//***** is assigned to a dedicaed parallel world. The pointer "aStep" points to
|
||||
//***** a G4Step object for the parallel world.
|
||||
//***** RE05CalorimeterSD has been migrated to Geant4 version 10 that does not
|
||||
//***** support Readout Geometry in multi-threaded mode. Now RE05CalorimeterSD
|
||||
//***** is assigned to a dedicaed parallel world. The pointer "aStep" points to
|
||||
//***** a G4Step object for the parallel world.
|
||||
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.) return false;
|
||||
if (edep == 0.) return false;
|
||||
|
||||
const G4VTouchable* ROhist = aStep->GetPreStepPoint()->GetTouchable();
|
||||
G4int copyIDinZ = ROhist->GetReplicaNumber();
|
||||
G4int copyIDinPhi = ROhist->GetReplicaNumber(1);
|
||||
|
||||
if(fCellID[copyIDinZ][copyIDinPhi]==-1)
|
||||
{
|
||||
RE01CalorimeterHit* calHit = new RE01CalorimeterHit
|
||||
(ROhist->GetVolume()->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
|
||||
calHit->SetEdep( edep );
|
||||
if (fCellID[copyIDinZ][copyIDinPhi] == -1) {
|
||||
RE01CalorimeterHit* calHit =
|
||||
new RE01CalorimeterHit(ROhist->GetVolume()->GetLogicalVolume(), copyIDinZ, copyIDinPhi);
|
||||
calHit->SetEdep(edep);
|
||||
G4AffineTransform aTrans = ROhist->GetHistory()->GetTopTransform();
|
||||
aTrans.Invert();
|
||||
calHit->SetPos(aTrans.NetTranslation());
|
||||
calHit->SetRot(aTrans.NetRotation());
|
||||
calHit->SetTrackInformation(aStep->GetTrack());
|
||||
G4int icell = fCalCollection->insert( calHit );
|
||||
G4int icell = fCalCollection->insert(calHit);
|
||||
fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
|
||||
if(verboseLevel>0)
|
||||
{ G4cout << " New Calorimeter Hit on CellID "
|
||||
<< copyIDinZ << " " << copyIDinPhi << G4endl; }
|
||||
if (verboseLevel > 0) {
|
||||
G4cout << " New Calorimeter Hit on CellID " << copyIDinZ << " " << copyIDinPhi << G4endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
(*fCalCollection)[fCellID[copyIDinZ][copyIDinPhi]]->AddEdep(edep);
|
||||
(*fCalCollection)[fCellID[copyIDinZ][copyIDinPhi]]
|
||||
->SetTrackInformation(aStep->GetTrack());
|
||||
if(verboseLevel>0)
|
||||
{ G4cout << " Energy added to CellID "
|
||||
<< copyIDinZ << " " << copyIDinPhi << G4endl; }
|
||||
(*fCalCollection)[fCellID[copyIDinZ][copyIDinPhi]]->SetTrackInformation(aStep->GetTrack());
|
||||
if (verboseLevel > 0) {
|
||||
G4cout << " Energy added to CellID " << copyIDinZ << " " << copyIDinPhi << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,44 +29,46 @@
|
||||
//
|
||||
|
||||
#include "RE01DetectorConstruction.hh"
|
||||
#include "RE01TrackerSD.hh"
|
||||
#include "RE01TrackerParametrisation.hh"
|
||||
|
||||
#include "RE01CalorimeterParametrisation.hh"
|
||||
#include "RE01Field.hh"
|
||||
#include "RE01RegionInformation.hh"
|
||||
#include "RE01TrackerParametrisation.hh"
|
||||
#include "RE01TrackerSD.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4Element.hh"
|
||||
#include "G4ElementTable.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MaterialTable.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4Region.hh"
|
||||
#include "G4RegionStore.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01DetectorConstruction::RE01DetectorConstruction()
|
||||
: G4VUserDetectorConstruction()
|
||||
RE01DetectorConstruction::RE01DetectorConstruction() : G4VUserDetectorConstruction()
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01DetectorConstruction::~RE01DetectorConstruction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* RE01DetectorConstruction::Construct()
|
||||
@@ -79,21 +81,21 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
|
||||
G4String name, symbol;
|
||||
G4int nel;
|
||||
|
||||
a = 1.01*g/mole;
|
||||
G4Element* elH = new G4Element(name="Hydrogen", symbol="H", iz=1., a);
|
||||
a = 1.01 * g / mole;
|
||||
G4Element* elH = new G4Element(name = "Hydrogen", symbol = "H", iz = 1., a);
|
||||
|
||||
a = 12.01*g/mole;
|
||||
G4Element* elC = new G4Element(name="Carbon", symbol="C", iz=6., a);
|
||||
a = 12.01 * g / mole;
|
||||
G4Element* elC = new G4Element(name = "Carbon", symbol = "C", iz = 6., a);
|
||||
|
||||
// Material Information imported from NIST database.
|
||||
G4NistManager* NISTman = G4NistManager::Instance();
|
||||
G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
|
||||
G4Material* arGas = NISTman->FindOrBuildMaterial("G4_Ar");
|
||||
G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
|
||||
G4Material* arGas = NISTman->FindOrBuildMaterial("G4_Ar");
|
||||
G4Material* silicon = NISTman->FindOrBuildMaterial("G4_Si");
|
||||
|
||||
density = 1.032*g/cm3;
|
||||
G4Material* scinti = new G4Material(name="Scintillator", density, nel=2);
|
||||
density = 1.032 * g / cm3;
|
||||
G4Material* scinti = new G4Material(name = "Scintillator", density, nel = 2);
|
||||
scinti->AddElement(elC, 9);
|
||||
scinti->AddElement(elH, 10);
|
||||
|
||||
@@ -101,15 +103,12 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
|
||||
// Detector geometry
|
||||
//-------------------------------------------------------------------------
|
||||
//------------------------------ experimental hall
|
||||
G4Box * experimentalHall_box
|
||||
= new G4Box("expHall_b",fExpHall_x,fExpHall_y,fExpHall_z);
|
||||
G4LogicalVolume * experimentalHall_log
|
||||
= new G4LogicalVolume(experimentalHall_box,air,"expHall_L",0,0,0);
|
||||
G4VPhysicalVolume * experimentalHall_phys
|
||||
= new G4PVPlacement(0,G4ThreeVector(),experimentalHall_log,"expHall_P",
|
||||
0,false,0);
|
||||
G4VisAttributes* experimentalHallVisAtt
|
||||
= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
G4Box* experimentalHall_box = new G4Box("expHall_b", fExpHall_x, fExpHall_y, fExpHall_z);
|
||||
G4LogicalVolume* experimentalHall_log =
|
||||
new G4LogicalVolume(experimentalHall_box, air, "expHall_L", 0, 0, 0);
|
||||
G4VPhysicalVolume* experimentalHall_phys =
|
||||
new G4PVPlacement(0, G4ThreeVector(), experimentalHall_log, "expHall_P", 0, false, 0);
|
||||
G4VisAttributes* experimentalHallVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
experimentalHallVisAtt->SetForceWireframe(true);
|
||||
experimentalHall_log->SetVisAttributes(experimentalHallVisAtt);
|
||||
G4Region* defaultRegion = (*(G4RegionStore::GetInstance()))[0];
|
||||
@@ -119,16 +118,13 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
|
||||
defaultRegion->SetUserInformation(defaultRInfo);
|
||||
|
||||
//------------------------------ tracker
|
||||
G4VSolid * tracker_tubs
|
||||
= new G4Tubs("trkTubs_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
|
||||
fTrkTubs_sphi,fTrkTubs_dphi);
|
||||
G4LogicalVolume * tracker_log
|
||||
= new G4LogicalVolume(tracker_tubs,arGas,"trackerT_L",0,0,0);
|
||||
G4VSolid* tracker_tubs = new G4Tubs("trkTubs_tubs", fTrkTubs_rmin, fTrkTubs_rmax, fTrkTubs_dz,
|
||||
fTrkTubs_sphi, fTrkTubs_dphi);
|
||||
G4LogicalVolume* tracker_log = new G4LogicalVolume(tracker_tubs, arGas, "trackerT_L", 0, 0, 0);
|
||||
// G4VPhysicalVolume * tracker_phys =
|
||||
new G4PVPlacement(0,G4ThreeVector(),tracker_log,"tracker_phys",
|
||||
experimentalHall_log,false,0);
|
||||
G4VisAttributes* tracker_logVisAtt
|
||||
= new G4VisAttributes(G4Colour(1.0,0.0,1.0));
|
||||
new G4PVPlacement(0, G4ThreeVector(), tracker_log, "tracker_phys", experimentalHall_log, false,
|
||||
0);
|
||||
G4VisAttributes* tracker_logVisAtt = new G4VisAttributes(G4Colour(1.0, 0.0, 1.0));
|
||||
tracker_logVisAtt->SetForceWireframe(true);
|
||||
tracker_log->SetVisAttributes(tracker_logVisAtt);
|
||||
G4Region* trackerRegion = new G4Region("TrackerRegion");
|
||||
@@ -139,65 +135,52 @@ G4VPhysicalVolume* RE01DetectorConstruction::Construct()
|
||||
trackerRegion->AddRootLogicalVolume(tracker_log);
|
||||
|
||||
//------------------------------ tracker layers
|
||||
// As an example for Parameterised volume
|
||||
// As an example for Parameterised volume
|
||||
// dummy values for G4Tubs -- modified by parameterised volume
|
||||
G4VSolid * trackerLayer_tubs
|
||||
= new G4Tubs("trackerLayer_tubs",fTrkTubs_rmin,fTrkTubs_rmax,fTrkTubs_dz,
|
||||
fTrkTubs_sphi,fTrkTubs_dphi);
|
||||
fTrackerLayer_log
|
||||
= new G4LogicalVolume(trackerLayer_tubs,silicon,"trackerB_L",0,0,0);
|
||||
G4VPVParameterisation * trackerParam
|
||||
= new RE01TrackerParametrisation;
|
||||
G4VSolid* trackerLayer_tubs = new G4Tubs("trackerLayer_tubs", fTrkTubs_rmin, fTrkTubs_rmax,
|
||||
fTrkTubs_dz, fTrkTubs_sphi, fTrkTubs_dphi);
|
||||
fTrackerLayer_log = new G4LogicalVolume(trackerLayer_tubs, silicon, "trackerB_L", 0, 0, 0);
|
||||
G4VPVParameterisation* trackerParam = new RE01TrackerParametrisation;
|
||||
// dummy value : kXAxis -- modified by parameterised volume
|
||||
// G4VPhysicalVolume *trackerLayer_phys =
|
||||
new G4PVParameterised("trackerLayer_phys",fTrackerLayer_log,tracker_log,
|
||||
kXAxis, fNotrkLayers, trackerParam);
|
||||
G4VisAttributes* trackerLayer_logVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.5,0.0,1.0));
|
||||
new G4PVParameterised("trackerLayer_phys", fTrackerLayer_log, tracker_log, kXAxis, fNotrkLayers,
|
||||
trackerParam);
|
||||
G4VisAttributes* trackerLayer_logVisAtt = new G4VisAttributes(G4Colour(0.5, 0.0, 1.0));
|
||||
trackerLayer_logVisAtt->SetForceWireframe(true);
|
||||
fTrackerLayer_log->SetVisAttributes(trackerLayer_logVisAtt);
|
||||
|
||||
//------------------------------ calorimeter
|
||||
G4VSolid * calorimeter_tubs
|
||||
= new G4Tubs("calorimeter_tubs",fCaloTubs_rmin,fCaloTubs_rmax,
|
||||
fCaloTubs_dz,fCaloTubs_sphi,fCaloTubs_dphi);
|
||||
fCalorimeter_log
|
||||
= new G4LogicalVolume(calorimeter_tubs,scinti,"caloT_L",0,0,0);
|
||||
G4VSolid* calorimeter_tubs = new G4Tubs("calorimeter_tubs", fCaloTubs_rmin, fCaloTubs_rmax,
|
||||
fCaloTubs_dz, fCaloTubs_sphi, fCaloTubs_dphi);
|
||||
fCalorimeter_log = new G4LogicalVolume(calorimeter_tubs, scinti, "caloT_L", 0, 0, 0);
|
||||
// G4VPhysicalVolume * calorimeter_phys =
|
||||
new G4PVPlacement(0,G4ThreeVector(),fCalorimeter_log,"caloM_P",
|
||||
experimentalHall_log,false,0);
|
||||
G4VisAttributes* calorimeter_logVisATT
|
||||
= new G4VisAttributes(G4Colour(1.0,1.0,0.0));
|
||||
new G4PVPlacement(0, G4ThreeVector(), fCalorimeter_log, "caloM_P", experimentalHall_log, false,
|
||||
0);
|
||||
G4VisAttributes* calorimeter_logVisATT = new G4VisAttributes(G4Colour(1.0, 1.0, 0.0));
|
||||
calorimeter_logVisATT->SetForceWireframe(true);
|
||||
fCalorimeter_log->SetVisAttributes(calorimeter_logVisATT);
|
||||
G4Region* calorimeterRegion = new G4Region("CalorimeterRegion");
|
||||
RE01RegionInformation* calorimeterInfo
|
||||
= new RE01RegionInformation();
|
||||
RE01RegionInformation* calorimeterInfo = new RE01RegionInformation();
|
||||
calorimeterInfo->SetCalorimeter();
|
||||
calorimeterRegion->SetUserInformation(calorimeterInfo);
|
||||
fCalorimeter_log->SetRegion(calorimeterRegion);
|
||||
calorimeterRegion->AddRootLogicalVolume(fCalorimeter_log);
|
||||
|
||||
//------------------------------- Lead layers
|
||||
// As an example for Parameterised volume
|
||||
// As an example for Parameterised volume
|
||||
// dummy values for G4Tubs -- modified by parameterised volume
|
||||
G4VSolid * caloLayer_tubs
|
||||
= new G4Tubs("caloLayer_tubs",fCaloRing_rmin,fCaloRing_rmax,
|
||||
fCaloRing_dz,fCaloRing_sphi,fCaloRing_dphi);
|
||||
G4LogicalVolume * caloLayer_log
|
||||
= new G4LogicalVolume(caloLayer_tubs,lead,"caloR_L",0,0,0);
|
||||
G4VPVParameterisation * calorimeterParam
|
||||
= new RE01CalorimeterParametrisation;
|
||||
G4VSolid* caloLayer_tubs = new G4Tubs("caloLayer_tubs", fCaloRing_rmin, fCaloRing_rmax,
|
||||
fCaloRing_dz, fCaloRing_sphi, fCaloRing_dphi);
|
||||
G4LogicalVolume* caloLayer_log = new G4LogicalVolume(caloLayer_tubs, lead, "caloR_L", 0, 0, 0);
|
||||
G4VPVParameterisation* calorimeterParam = new RE01CalorimeterParametrisation;
|
||||
// dummy value : kXAxis -- modified by parameterised volume
|
||||
// G4VPhysicalVolume * caloLayer_phys =
|
||||
new G4PVParameterised("caloLayer_phys",caloLayer_log,fCalorimeter_log,
|
||||
kXAxis, fNocaloLayers, calorimeterParam);
|
||||
G4VisAttributes* caloLayer_logVisAtt
|
||||
= new G4VisAttributes(G4Colour(0.7,1.0,0.0));
|
||||
new G4PVParameterised("caloLayer_phys", caloLayer_log, fCalorimeter_log, kXAxis, fNocaloLayers,
|
||||
calorimeterParam);
|
||||
G4VisAttributes* caloLayer_logVisAtt = new G4VisAttributes(G4Colour(0.7, 1.0, 0.0));
|
||||
caloLayer_logVisAtt->SetForceWireframe(true);
|
||||
caloLayer_log->SetVisAttributes(caloLayer_logVisAtt);
|
||||
|
||||
|
||||
return experimentalHall_phys;
|
||||
}
|
||||
|
||||
@@ -207,9 +190,9 @@ void RE01DetectorConstruction::ConstructSDandField()
|
||||
//------------------------------------------------------------------
|
||||
// Sensitive Detector
|
||||
//------------------------------------------------------------------
|
||||
|
||||
|
||||
G4String trackerSDname = "/mydet/tracker";
|
||||
RE01TrackerSD * trackerSD = new RE01TrackerSD(trackerSDname);
|
||||
RE01TrackerSD* trackerSD = new RE01TrackerSD(trackerSDname);
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(trackerSD);
|
||||
SetSensitiveDetector(fTrackerLayer_log, trackerSD);
|
||||
|
||||
@@ -218,11 +201,9 @@ void RE01DetectorConstruction::ConstructSDandField()
|
||||
//-------------------------------------------------------------------------
|
||||
// Magnetic field
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
|
||||
RE01Field* myField = new RE01Field;
|
||||
G4FieldManager* fieldMgr
|
||||
= G4TransportationManager::GetTransportationManager()->GetFieldManager();
|
||||
G4FieldManager* fieldMgr = G4TransportationManager::GetTransportationManager()->GetFieldManager();
|
||||
fieldMgr->SetDetectorField(myField);
|
||||
fieldMgr->CreateChordFinder(myField);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,42 +29,44 @@
|
||||
//
|
||||
|
||||
#include "RE01EventAction.hh"
|
||||
#include "RE01TrackerHit.hh"
|
||||
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
#include "RE01TrackerHit.hh"
|
||||
#include "RE01Trajectory.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "RE01Trajectory.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01EventAction::RE01EventAction()
|
||||
:G4UserEventAction(),
|
||||
fTrackerCollID(-1),fCalorimeterCollID(-1)
|
||||
{;}
|
||||
RE01EventAction::RE01EventAction() : G4UserEventAction(), fTrackerCollID(-1), fCalorimeterCollID(-1)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01EventAction::~RE01EventAction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01EventAction::BeginOfEventAction(const G4Event*)
|
||||
{
|
||||
G4SDManager * SDman = G4SDManager::GetSDMpointer();
|
||||
if(fTrackerCollID<0||fCalorimeterCollID<0)
|
||||
{
|
||||
G4SDManager* SDman = G4SDManager::GetSDMpointer();
|
||||
if (fTrackerCollID < 0 || fCalorimeterCollID < 0) {
|
||||
G4String colNam;
|
||||
fTrackerCollID = SDman->GetCollectionID(colNam="trackerCollection");
|
||||
fCalorimeterCollID = SDman->GetCollectionID(colNam="calCollection");
|
||||
fTrackerCollID = SDman->GetCollectionID(colNam = "trackerCollection");
|
||||
fCalorimeterCollID = SDman->GetCollectionID(colNam = "calCollection");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,53 +74,45 @@ void RE01EventAction::BeginOfEventAction(const G4Event*)
|
||||
void RE01EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4cout << ">>> Summary of Event " << evt->GetEventID() << G4endl;
|
||||
if(evt->GetNumberOfPrimaryVertex()==0)
|
||||
{
|
||||
if (evt->GetNumberOfPrimaryVertex() == 0) {
|
||||
G4cout << "Event is empty." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(fTrackerCollID<0||fCalorimeterCollID<0) return;
|
||||
|
||||
G4HCofThisEvent * HCE = evt->GetHCofThisEvent();
|
||||
if (fTrackerCollID < 0 || fCalorimeterCollID < 0) return;
|
||||
|
||||
G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
|
||||
RE01TrackerHitsCollection* THC = 0;
|
||||
RE01CalorimeterHitsCollection* CHC = 0;
|
||||
if(HCE)
|
||||
{
|
||||
if (HCE) {
|
||||
THC = (RE01TrackerHitsCollection*)(HCE->GetHC(fTrackerCollID));
|
||||
CHC = (RE01CalorimeterHitsCollection*)(HCE->GetHC(fCalorimeterCollID));
|
||||
}
|
||||
|
||||
if(THC)
|
||||
{
|
||||
if (THC) {
|
||||
int n_hit = THC->entries();
|
||||
G4cout << G4endl;
|
||||
G4cout << "Tracker hits " <<
|
||||
"--------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
G4cout << n_hit << " hits are stored in RE01TrackerHitsCollection."
|
||||
<< G4endl;
|
||||
if(fpEventManager->GetVerboseLevel()>0)
|
||||
{
|
||||
G4cout << "Tracker hits "
|
||||
<< "--------------------------------------------------------------" << G4endl;
|
||||
G4cout << n_hit << " hits are stored in RE01TrackerHitsCollection." << G4endl;
|
||||
if (fpEventManager->GetVerboseLevel() > 0) {
|
||||
G4cout << "List of hits in tracker" << G4endl;
|
||||
for(int i=0;i<n_hit;i++)
|
||||
{ (*THC)[i]->Print(); }
|
||||
for (int i = 0; i < n_hit; i++) {
|
||||
(*THC)[i]->Print();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CHC)
|
||||
{
|
||||
if (CHC) {
|
||||
int n_hit = CHC->entries();
|
||||
G4cout << G4endl;
|
||||
G4cout << "Calorimeter hits "<<
|
||||
"--------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
G4cout << n_hit << " hits are stored in RE01CalorimeterHitsCollection."
|
||||
<< G4endl;
|
||||
G4cout << "Calorimeter hits "
|
||||
<< "--------------------------------------------------------------" << G4endl;
|
||||
G4cout << n_hit << " hits are stored in RE01CalorimeterHitsCollection." << G4endl;
|
||||
G4double totE = 0;
|
||||
for(int i=0;i<n_hit;i++)
|
||||
{ totE += (*CHC)[i]->GetEdep(); }
|
||||
G4cout << " Total energy deposition in calorimeter : "
|
||||
<< totE / GeV << " (GeV)" << G4endl;
|
||||
for (int i = 0; i < n_hit; i++) {
|
||||
totE += (*CHC)[i]->GetEdep();
|
||||
}
|
||||
G4cout << " Total energy deposition in calorimeter : " << totE / GeV << " (GeV)" << G4endl;
|
||||
}
|
||||
|
||||
// get number of stored trajectories
|
||||
@@ -127,37 +121,28 @@ void RE01EventAction::EndOfEventAction(const G4Event* evt)
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
// extract the trajectories and print them out
|
||||
G4cout << G4endl;
|
||||
G4cout << "Trajectories in tracker "<<
|
||||
"--------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
if(fpEventManager->GetVerboseLevel()>0)
|
||||
{
|
||||
for(G4int i=0; i<n_trajectories; i++)
|
||||
{
|
||||
RE01Trajectory* trj =
|
||||
(RE01Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
G4cout << "Trajectories in tracker "
|
||||
<< "--------------------------------------------------------------" << G4endl;
|
||||
if (fpEventManager->GetVerboseLevel() > 0) {
|
||||
for (G4int i = 0; i < n_trajectories; i++) {
|
||||
RE01Trajectory* trj = (RE01Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
trj->ShowTrajectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4cout << G4endl;
|
||||
G4cout << "Primary particles "<<
|
||||
"--------------------------------------------------------------"
|
||||
<< G4endl;
|
||||
G4cout << "Primary particles "
|
||||
<< "--------------------------------------------------------------" << G4endl;
|
||||
G4int n_vertex = evt->GetNumberOfPrimaryVertex();
|
||||
for(G4int iv=0;iv<n_vertex;iv++)
|
||||
{
|
||||
for (G4int iv = 0; iv < n_vertex; iv++) {
|
||||
G4PrimaryVertex* pv = evt->GetPrimaryVertex(iv);
|
||||
G4cout << G4endl;
|
||||
G4cout << "Primary vertex "
|
||||
<< G4ThreeVector(pv->GetX0(),pv->GetY0(),pv->GetZ0())
|
||||
<< " at t = " << (pv->GetT0())/ns << " [ns]" << G4endl;
|
||||
if(fpEventManager->GetVerboseLevel()>0)
|
||||
{
|
||||
G4cout << "Primary vertex " << G4ThreeVector(pv->GetX0(), pv->GetY0(), pv->GetZ0())
|
||||
<< " at t = " << (pv->GetT0()) / ns << " [ns]" << G4endl;
|
||||
if (fpEventManager->GetVerboseLevel() > 0) {
|
||||
G4PrimaryParticle* pp = pv->GetPrimary();
|
||||
while(pp)
|
||||
{
|
||||
PrintPrimary(pp,0);
|
||||
while (pp) {
|
||||
PrintPrimary(pp, 0);
|
||||
pp = pp->GetNext();
|
||||
}
|
||||
}
|
||||
@@ -165,27 +150,29 @@ void RE01EventAction::EndOfEventAction(const G4Event* evt)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01EventAction::PrintPrimary(G4PrimaryParticle* pp,G4int ind)
|
||||
void RE01EventAction::PrintPrimary(G4PrimaryParticle* pp, G4int ind)
|
||||
{
|
||||
for(G4int ii=0;ii<=ind;ii++)
|
||||
{ G4cout << " "; }
|
||||
for (G4int ii = 0; ii <= ind; ii++) {
|
||||
G4cout << " ";
|
||||
}
|
||||
G4cout << "==PDGcode " << pp->GetPDGcode() << " ";
|
||||
if(pp->GetG4code()!=0)
|
||||
{ G4cout << "(" << pp->GetG4code()->GetParticleName() << ")"; }
|
||||
else
|
||||
{ G4cout << "is not defined in G4"; }
|
||||
G4cout << " " << pp->GetMomentum()/GeV << " [GeV] ";
|
||||
if(pp->GetTrackID()<0)
|
||||
{ G4cout << G4endl; }
|
||||
else
|
||||
{ G4cout << ">>> G4Track ID " << pp->GetTrackID() << G4endl; }
|
||||
if (pp->GetG4code() != 0) {
|
||||
G4cout << "(" << pp->GetG4code()->GetParticleName() << ")";
|
||||
}
|
||||
else {
|
||||
G4cout << "is not defined in G4";
|
||||
}
|
||||
G4cout << " " << pp->GetMomentum() / GeV << " [GeV] ";
|
||||
if (pp->GetTrackID() < 0) {
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << ">>> G4Track ID " << pp->GetTrackID() << G4endl;
|
||||
}
|
||||
|
||||
G4PrimaryParticle* daughter = pp->GetDaughter();
|
||||
while(daughter)
|
||||
{
|
||||
PrintPrimary(daughter,ind+1);
|
||||
while (daughter) {
|
||||
PrintPrimary(daughter, ind + 1);
|
||||
daughter = daughter->GetNext();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,29 +29,32 @@
|
||||
//
|
||||
|
||||
#include "RE01Field.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01Field::RE01Field()
|
||||
:G4MagneticField()
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01Field::RE01Field() : G4MagneticField()
|
||||
{
|
||||
fBz = 3.0*tesla;
|
||||
fRmax_sq = sqr(50.*cm);
|
||||
fZmax = 100.*cm;
|
||||
fBz = 3.0 * tesla;
|
||||
fRmax_sq = sqr(50. * cm);
|
||||
fZmax = 100. * cm;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01Field::~RE01Field()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Field::GetFieldValue(const double point[3],double *bfield) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Field::GetFieldValue(const double point[3], double* bfield) const
|
||||
{
|
||||
bfield[0] = 0.;
|
||||
bfield[1] = 0.;
|
||||
if(std::abs(point[2])<fZmax && (sqr(point[0])+sqr(point[1]))<fRmax_sq)
|
||||
{ bfield[2] = fBz; }
|
||||
else
|
||||
{ bfield[2] = 0.; }
|
||||
if (std::abs(point[2]) < fZmax && (sqr(point[0]) + sqr(point[1])) < fRmax_sq) {
|
||||
bfield[2] = fBz;
|
||||
}
|
||||
else {
|
||||
bfield[2] = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,19 +29,19 @@
|
||||
//
|
||||
|
||||
#include "RE01PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "RE01PrimaryGeneratorMessenger.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4HEPEvtInterface.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01PrimaryGeneratorAction::RE01PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fHEPEvt(0), fParticleGun(0), fMessenger(0)
|
||||
: G4VUserPrimaryGeneratorAction(), fHEPEvt(0), fParticleGun(0), fMessenger(0)
|
||||
{
|
||||
const char* filename = "pythia_event.data";
|
||||
fHEPEvt = new G4HEPEvtInterface(filename);
|
||||
@@ -50,30 +50,32 @@ RE01PrimaryGeneratorAction::RE01PrimaryGeneratorAction()
|
||||
G4ParticleGun* particleGun = new G4ParticleGun(n_particle);
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
= particleTable->FindParticle(particleName="mu+");
|
||||
G4ParticleDefinition* particle = particleTable->FindParticle(particleName = "mu+");
|
||||
particleGun->SetParticleDefinition(particle);
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0.,1.,0.));
|
||||
particleGun->SetParticleEnergy(100.*GeV);
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0.*cm,0.*cm,0.*cm));
|
||||
particleGun->SetParticleMomentumDirection(G4ThreeVector(0., 1., 0.));
|
||||
particleGun->SetParticleEnergy(100. * GeV);
|
||||
particleGun->SetParticlePosition(G4ThreeVector(0. * cm, 0. * cm, 0. * cm));
|
||||
fParticleGun = particleGun;
|
||||
|
||||
fMessenger = new RE01PrimaryGeneratorMessenger(this);
|
||||
fUseHEPEvt = true;
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
#include "G4AutoLock.hh"
|
||||
namespace {
|
||||
G4Mutex RE01PrimGenDestrMutex = G4MUTEX_INITIALIZER;
|
||||
G4Mutex RE01PrimGenMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
namespace
|
||||
{
|
||||
G4Mutex RE01PrimGenDestrMutex = G4MUTEX_INITIALIZER;
|
||||
G4Mutex RE01PrimGenMutex = G4MUTEX_INITIALIZER;
|
||||
} // namespace
|
||||
|
||||
RE01PrimaryGeneratorAction::~RE01PrimaryGeneratorAction()
|
||||
{
|
||||
G4AutoLock lock(&RE01PrimGenDestrMutex);
|
||||
if(fHEPEvt) {delete fHEPEvt; fHEPEvt = 0;}
|
||||
if (fHEPEvt) {
|
||||
delete fHEPEvt;
|
||||
fHEPEvt = 0;
|
||||
}
|
||||
delete fParticleGun;
|
||||
delete fMessenger;
|
||||
}
|
||||
@@ -81,16 +83,15 @@ RE01PrimaryGeneratorAction::~RE01PrimaryGeneratorAction()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
if(fUseHEPEvt)
|
||||
{
|
||||
if (fUseHEPEvt) {
|
||||
G4AutoLock lock(&RE01PrimGenMutex);
|
||||
fHEPEvt->GeneratePrimaryVertex(anEvent);
|
||||
if(anEvent->GetNumberOfPrimaryVertex()==0)
|
||||
{ // End-of-file
|
||||
G4Exception("RE01PrimaryGeneratorAction::GeneratePrimaries",
|
||||
"RE01_0001",RunMustBeAborted,"End of file detected.");
|
||||
if (anEvent->GetNumberOfPrimaryVertex() == 0) { // End-of-file
|
||||
G4Exception("RE01PrimaryGeneratorAction::GeneratePrimaries", "RE01_0001", RunMustBeAborted,
|
||||
"End of file detected.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{ fParticleGun->GeneratePrimaryVertex(anEvent); }
|
||||
else {
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,56 +29,56 @@
|
||||
//
|
||||
|
||||
#include "RE01PrimaryGeneratorMessenger.hh"
|
||||
|
||||
#include "RE01PrimaryGeneratorAction.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4UIdirectory.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01PrimaryGeneratorMessenger
|
||||
::RE01PrimaryGeneratorMessenger(RE01PrimaryGeneratorAction * mpga)
|
||||
:G4UImessenger(),fMyAction(mpga),
|
||||
fMydetDirectory(0),fGenCmd(0)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01PrimaryGeneratorMessenger ::RE01PrimaryGeneratorMessenger(RE01PrimaryGeneratorAction* mpga)
|
||||
: G4UImessenger(), fMyAction(mpga), fMydetDirectory(0), fGenCmd(0)
|
||||
{
|
||||
fMydetDirectory = new G4UIdirectory("/mydet/");
|
||||
fMydetDirectory->SetGuidance("RE01 detector control commands.");
|
||||
|
||||
fGenCmd = new G4UIcmdWithAString("/mydet/generator",this);
|
||||
fGenCmd = new G4UIcmdWithAString("/mydet/generator", this);
|
||||
fGenCmd->SetGuidance("Select primary generator.");
|
||||
fGenCmd->SetGuidance(" Available generators : PYTHIA, particleGun");
|
||||
fGenCmd->SetParameterName("generator",true);
|
||||
fGenCmd->SetParameterName("generator", true);
|
||||
fGenCmd->SetDefaultValue("PYTHIA");
|
||||
fGenCmd->SetCandidates("PYTHIA particleGun");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01PrimaryGeneratorMessenger::~RE01PrimaryGeneratorMessenger()
|
||||
{
|
||||
delete fGenCmd;
|
||||
delete fMydetDirectory;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01PrimaryGeneratorMessenger
|
||||
::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01PrimaryGeneratorMessenger ::SetNewValue(G4UIcommand* command, G4String newValue)
|
||||
{
|
||||
if( command==fGenCmd )
|
||||
{ fMyAction->SetHEPEvtGenerator(newValue=="PYTHIA"); }
|
||||
if (command == fGenCmd) {
|
||||
fMyAction->SetHEPEvtGenerator(newValue == "PYTHIA");
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4String RE01PrimaryGeneratorMessenger::GetCurrentValue(G4UIcommand * command)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4String RE01PrimaryGeneratorMessenger::GetCurrentValue(G4UIcommand* command)
|
||||
{
|
||||
G4String cv;
|
||||
|
||||
if( command==fGenCmd )
|
||||
{
|
||||
if(fMyAction->GetHEPEvtGenerator())
|
||||
{ cv = "PYTHIA"; }
|
||||
else
|
||||
{ cv = "particleGun"; }
|
||||
|
||||
if (command == fGenCmd) {
|
||||
if (fMyAction->GetHEPEvtGenerator()) {
|
||||
cv = "PYTHIA";
|
||||
}
|
||||
else {
|
||||
cv = "particleGun";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return cv;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,26 +30,37 @@
|
||||
//
|
||||
|
||||
#include "RE01RegionInformation.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RegionInformation::RE01RegionInformation()
|
||||
:G4VUserRegionInformation(),
|
||||
fIsWorld(false),fIsTracker(false),fIsCalorimeter(false)
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RegionInformation::~RE01RegionInformation()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01RegionInformation::Print() const
|
||||
: G4VUserRegionInformation(), fIsWorld(false), fIsTracker(false), fIsCalorimeter(false)
|
||||
{
|
||||
G4cout << "I'm ";
|
||||
if(fIsWorld) { G4cout << "World."; }
|
||||
else if(fIsTracker) { G4cout << "Tracker."; }
|
||||
else if(fIsCalorimeter) { G4cout << "Calorimeter."; }
|
||||
else { G4cout << "unknown."; }
|
||||
G4cout << G4endl;
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RegionInformation::~RE01RegionInformation()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01RegionInformation::Print() const
|
||||
{
|
||||
G4cout << "I'm ";
|
||||
if (fIsWorld) {
|
||||
G4cout << "World.";
|
||||
}
|
||||
else if (fIsTracker) {
|
||||
G4cout << "Tracker.";
|
||||
}
|
||||
else if (fIsCalorimeter) {
|
||||
G4cout << "Calorimeter.";
|
||||
}
|
||||
else {
|
||||
G4cout << "unknown.";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
/// \brief Implementation of the RE01RunAction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#include "RE01RunAction.hh"
|
||||
|
||||
@@ -35,14 +35,17 @@
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RunAction::RE01RunAction()
|
||||
:G4UserRunAction()
|
||||
{;}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RunAction::RE01RunAction() : G4UserRunAction()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01RunAction::~RE01RunAction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
@@ -51,10 +54,8 @@ void RE01RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
G4RunManager::GetRunManager()->SetRandomNumberStore(true);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01RunAction::EndOfRunAction(const G4Run*)
|
||||
{;}
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -29,51 +29,53 @@
|
||||
//
|
||||
|
||||
#include "RE01StackingAction.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "RE01CalorimeterHit.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01StackingAction::RE01StackingAction()
|
||||
:G4UserStackingAction(),
|
||||
fStage(0),fCalorimeterHitsColID(-1)
|
||||
{;}
|
||||
: G4UserStackingAction(), fStage(0), fCalorimeterHitsColID(-1)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01StackingAction::~RE01StackingAction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4ClassificationOfNewTrack RE01StackingAction
|
||||
::ClassifyNewTrack(const G4Track * aTrack)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4ClassificationOfNewTrack RE01StackingAction ::ClassifyNewTrack(const G4Track* aTrack)
|
||||
{
|
||||
G4ClassificationOfNewTrack classification = fUrgent;
|
||||
|
||||
if(fStage==0)
|
||||
{
|
||||
if (fStage == 0) {
|
||||
RE01TrackInformation* trackInfo;
|
||||
if(aTrack->GetTrackStatus()==fSuspend) // Track reached to calorimeter
|
||||
if (aTrack->GetTrackStatus() == fSuspend) // Track reached to calorimeter
|
||||
{
|
||||
trackInfo = (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
trackInfo->SetTrackingStatus(0);
|
||||
trackInfo->SetSourceTrackInformation(aTrack);
|
||||
// G4cout << "Track " << aTrack->GetTrackID()
|
||||
// << " (parentID " << aTrack->GetParentID()
|
||||
// << ") has reached to calorimeter and has been suspended at "
|
||||
// << aTrack->GetPosition() << G4endl;
|
||||
// G4cout << "Track " << aTrack->GetTrackID()
|
||||
// << " (parentID " << aTrack->GetParentID()
|
||||
// << ") has reached to calorimeter and has been suspended at "
|
||||
// << aTrack->GetPosition() << G4endl;
|
||||
classification = fWaiting;
|
||||
}
|
||||
else if(aTrack->GetParentID()==0) // Primary particle
|
||||
else if (aTrack->GetParentID() == 0) // Primary particle
|
||||
{
|
||||
trackInfo = new RE01TrackInformation(aTrack);
|
||||
trackInfo->SetTrackingStatus(1);
|
||||
@@ -84,15 +86,15 @@ G4ClassificationOfNewTrack RE01StackingAction
|
||||
return classification;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VHitsCollection* RE01StackingAction::GetCalCollection()
|
||||
{
|
||||
G4SDManager* SDMan = G4SDManager::GetSDMpointer();
|
||||
G4RunManager* runMan = G4RunManager::GetRunManager();
|
||||
if(fCalorimeterHitsColID<0)
|
||||
{ fCalorimeterHitsColID = SDMan->GetCollectionID("calCollection"); }
|
||||
if(fCalorimeterHitsColID>=0)
|
||||
{
|
||||
if (fCalorimeterHitsColID < 0) {
|
||||
fCalorimeterHitsColID = SDMan->GetCollectionID("calCollection");
|
||||
}
|
||||
if (fCalorimeterHitsColID >= 0) {
|
||||
const G4Event* currentEvent = runMan->GetCurrentEvent();
|
||||
G4HCofThisEvent* HCE = currentEvent->GetHCofThisEvent();
|
||||
return HCE->GetHC(fCalorimeterHitsColID);
|
||||
@@ -100,75 +102,64 @@ G4VHitsCollection* RE01StackingAction::GetCalCollection()
|
||||
return 0;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01StackingAction::NewStage()
|
||||
{
|
||||
// G4cout << "+++++++++++ Stage " << fStage << G4endl;
|
||||
if(fStage==0)
|
||||
{
|
||||
if (fStage == 0) {
|
||||
// display trajetory information in the tracking region
|
||||
G4cout << G4endl;
|
||||
G4cout << "Tracks in tracking region have been processed. -- Stage 0 over."
|
||||
<< G4endl;
|
||||
G4cout << "Tracks in tracking region have been processed. -- Stage 0 over." << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
// display calorimeter information caused by a "source" track
|
||||
else {
|
||||
// display calorimeter information caused by a "source" track
|
||||
// in the tracker region
|
||||
// G4cout << G4endl;
|
||||
// G4cout << "Processing one shower originated by a source track "
|
||||
// << "in tracker region is over." << G4endl;
|
||||
// G4cout << G4endl;
|
||||
RE01CalorimeterHitsCollection* CHC =
|
||||
(RE01CalorimeterHitsCollection*)GetCalCollection();
|
||||
if(CHC)
|
||||
{
|
||||
RE01CalorimeterHitsCollection* CHC = (RE01CalorimeterHitsCollection*)GetCalCollection();
|
||||
if (CHC) {
|
||||
int n_hit = CHC->entries();
|
||||
G4double totE = 0;
|
||||
G4int n_hitByATrack = 0;
|
||||
for(int i=0;i<n_hit;i++)
|
||||
{
|
||||
for (int i = 0; i < n_hit; i++) {
|
||||
G4double edepByATrack = (*CHC)[i]->GetEdepByATrack();
|
||||
if(edepByATrack>0.)
|
||||
{
|
||||
if (edepByATrack > 0.) {
|
||||
totE += edepByATrack;
|
||||
if(n_hitByATrack==0)
|
||||
{ (*CHC)[i]->GetTrackInformation()->Print(); }
|
||||
if (n_hitByATrack == 0) {
|
||||
(*CHC)[i]->GetTrackInformation()->Print();
|
||||
}
|
||||
n_hitByATrack++;
|
||||
G4cout << "Cell[" << (*CHC)[i]->GetZ() << ","
|
||||
<< (*CHC)[i]->GetPhi() << "] "
|
||||
<< edepByATrack/GeV << " [GeV]" << G4endl;
|
||||
G4cout << "Cell[" << (*CHC)[i]->GetZ() << "," << (*CHC)[i]->GetPhi() << "] "
|
||||
<< edepByATrack / GeV << " [GeV]" << G4endl;
|
||||
(*CHC)[i]->ClearEdepByATrack();
|
||||
}
|
||||
}
|
||||
if(n_hitByATrack>0)
|
||||
{
|
||||
G4cout <<
|
||||
"### Total energy deposition in calorimeter by a source track in "
|
||||
<< n_hitByATrack << " cells : " << totE / GeV << " (GeV)"
|
||||
<< G4endl;
|
||||
if (n_hitByATrack > 0) {
|
||||
G4cout << "### Total energy deposition in calorimeter by a source track in "
|
||||
<< n_hitByATrack << " cells : " << totE / GeV << " (GeV)" << G4endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(stackManager->GetNUrgentTrack())
|
||||
{
|
||||
if (stackManager->GetNUrgentTrack()) {
|
||||
// Transfer all tracks in Urgent stack to Waiting stack, since all tracks
|
||||
// in Waiting stack have already been transfered to Urgent stack before
|
||||
// invokation of this method.
|
||||
stackManager->TransferStackedTracks(fUrgent,fWaiting);
|
||||
stackManager->TransferStackedTracks(fUrgent, fWaiting);
|
||||
|
||||
// Then, transfer only one track to Urgent stack.
|
||||
stackManager->TransferOneStackedTrack(fWaiting,fUrgent);
|
||||
stackManager->TransferOneStackedTrack(fWaiting, fUrgent);
|
||||
|
||||
fStage++;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01StackingAction::PrepareNewEvent()
|
||||
{
|
||||
fStage = 0;
|
||||
{
|
||||
fStage = 0;
|
||||
}
|
||||
|
||||
@@ -29,65 +29,64 @@
|
||||
//
|
||||
|
||||
#include "RE01SteppingAction.hh"
|
||||
|
||||
#include "RE01RegionInformation.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4StepPoint.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Region.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4StepPoint.hh"
|
||||
#include "G4SteppingManager.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackStatus.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01SteppingAction::RE01SteppingAction()
|
||||
: G4UserSteppingAction()
|
||||
{;}
|
||||
RE01SteppingAction::RE01SteppingAction() : G4UserSteppingAction()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01SteppingAction::~RE01SteppingAction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01SteppingAction::UserSteppingAction(const G4Step * theStep)
|
||||
void RE01SteppingAction::UserSteppingAction(const G4Step* theStep)
|
||||
{
|
||||
// Suspend a track if it is entering into the calorimeter
|
||||
|
||||
// check if it is alive
|
||||
G4Track * theTrack = theStep->GetTrack();
|
||||
if(theTrack->GetTrackStatus()!=fAlive) { return; }
|
||||
G4Track* theTrack = theStep->GetTrack();
|
||||
if (theTrack->GetTrackStatus() != fAlive) {
|
||||
return;
|
||||
}
|
||||
|
||||
// get region information
|
||||
G4StepPoint * thePrePoint = theStep->GetPreStepPoint();
|
||||
G4LogicalVolume * thePreLV =
|
||||
thePrePoint->GetPhysicalVolume()->GetLogicalVolume();
|
||||
RE01RegionInformation* thePreRInfo
|
||||
= (RE01RegionInformation*)(thePreLV->GetRegion()->GetUserInformation());
|
||||
G4StepPoint * thePostPoint = theStep->GetPostStepPoint();
|
||||
G4LogicalVolume * thePostLV =
|
||||
thePostPoint->GetPhysicalVolume()->GetLogicalVolume();
|
||||
RE01RegionInformation* thePostRInfo
|
||||
= (RE01RegionInformation*)(thePostLV->GetRegion()->GetUserInformation());
|
||||
G4StepPoint* thePrePoint = theStep->GetPreStepPoint();
|
||||
G4LogicalVolume* thePreLV = thePrePoint->GetPhysicalVolume()->GetLogicalVolume();
|
||||
RE01RegionInformation* thePreRInfo =
|
||||
(RE01RegionInformation*)(thePreLV->GetRegion()->GetUserInformation());
|
||||
G4StepPoint* thePostPoint = theStep->GetPostStepPoint();
|
||||
G4LogicalVolume* thePostLV = thePostPoint->GetPhysicalVolume()->GetLogicalVolume();
|
||||
RE01RegionInformation* thePostRInfo =
|
||||
(RE01RegionInformation*)(thePostLV->GetRegion()->GetUserInformation());
|
||||
|
||||
// check if it is entering to the calorimeter volume
|
||||
if(!(thePreRInfo->IsCalorimeter()) && (thePostRInfo->IsCalorimeter()))
|
||||
{
|
||||
if (!(thePreRInfo->IsCalorimeter()) && (thePostRInfo->IsCalorimeter())) {
|
||||
// if the track had already been suspended at the previous step, let it go.
|
||||
RE01TrackInformation* trackInfo
|
||||
= static_cast<RE01TrackInformation*>(theTrack->GetUserInformation());
|
||||
if(trackInfo->GetSuspendedStepID()>-1)
|
||||
{
|
||||
if(fpSteppingManager->GetverboseLevel()>0)
|
||||
{
|
||||
G4cout<<"++++ This track had already been suspended at step #"
|
||||
<<trackInfo->GetSuspendedStepID()<<". Tracking resumed."
|
||||
<<G4endl;
|
||||
RE01TrackInformation* trackInfo =
|
||||
static_cast<RE01TrackInformation*>(theTrack->GetUserInformation());
|
||||
if (trackInfo->GetSuspendedStepID() > -1) {
|
||||
if (fpSteppingManager->GetverboseLevel() > 0) {
|
||||
G4cout << "++++ This track had already been suspended at step #"
|
||||
<< trackInfo->GetSuspendedStepID() << ". Tracking resumed." << G4endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
trackInfo->SetSuspendedStepID(theTrack->GetCurrentStepNumber());
|
||||
theTrack->SetTrackStatus(fSuspend);
|
||||
}
|
||||
|
||||
@@ -30,120 +30,114 @@
|
||||
//
|
||||
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<RE01TrackInformation> *
|
||||
aTrackInformationAllocator = 0;
|
||||
G4ThreadLocal G4Allocator<RE01TrackInformation>* aTrackInformationAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackInformation::RE01TrackInformation()
|
||||
: G4VUserTrackInformation()
|
||||
RE01TrackInformation::RE01TrackInformation() : G4VUserTrackInformation()
|
||||
{
|
||||
fOriginalTrackID = 0;
|
||||
fParticleDefinition = 0;
|
||||
fOriginalPosition = G4ThreeVector(0.,0.,0.);
|
||||
fOriginalMomentum = G4ThreeVector(0.,0.,0.);
|
||||
fOriginalEnergy = 0.;
|
||||
fOriginalTime = 0.;
|
||||
fTrackingStatus = 1;
|
||||
fSourceTrackID = -1;
|
||||
fSourceDefinition = 0;
|
||||
fSourcePosition = G4ThreeVector(0.,0.,0.);
|
||||
fSourceMomentum = G4ThreeVector(0.,0.,0.);
|
||||
fSourceEnergy = 0.;
|
||||
fSourceTime = 0.;
|
||||
fSuspendedStepID = -1;
|
||||
fOriginalTrackID = 0;
|
||||
fParticleDefinition = 0;
|
||||
fOriginalPosition = G4ThreeVector(0., 0., 0.);
|
||||
fOriginalMomentum = G4ThreeVector(0., 0., 0.);
|
||||
fOriginalEnergy = 0.;
|
||||
fOriginalTime = 0.;
|
||||
fTrackingStatus = 1;
|
||||
fSourceTrackID = -1;
|
||||
fSourceDefinition = 0;
|
||||
fSourcePosition = G4ThreeVector(0., 0., 0.);
|
||||
fSourceMomentum = G4ThreeVector(0., 0., 0.);
|
||||
fSourceEnergy = 0.;
|
||||
fSourceTime = 0.;
|
||||
fSuspendedStepID = -1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackInformation::RE01TrackInformation(const G4Track* aTrack)
|
||||
: G4VUserTrackInformation()
|
||||
RE01TrackInformation::RE01TrackInformation(const G4Track* aTrack) : G4VUserTrackInformation()
|
||||
{
|
||||
fOriginalTrackID = aTrack->GetTrackID();
|
||||
fParticleDefinition = aTrack->GetDefinition();
|
||||
fOriginalPosition = aTrack->GetPosition();
|
||||
fOriginalMomentum = aTrack->GetMomentum();
|
||||
fOriginalEnergy = aTrack->GetTotalEnergy();
|
||||
fOriginalTime = aTrack->GetGlobalTime();
|
||||
fTrackingStatus = 1;
|
||||
fSourceTrackID = -1;
|
||||
fSourceDefinition = 0;
|
||||
fSourcePosition = G4ThreeVector(0.,0.,0.);
|
||||
fSourceMomentum = G4ThreeVector(0.,0.,0.);
|
||||
fSourceEnergy = 0.;
|
||||
fSourceTime = 0.;
|
||||
fSuspendedStepID = -1;
|
||||
fOriginalTrackID = aTrack->GetTrackID();
|
||||
fParticleDefinition = aTrack->GetDefinition();
|
||||
fOriginalPosition = aTrack->GetPosition();
|
||||
fOriginalMomentum = aTrack->GetMomentum();
|
||||
fOriginalEnergy = aTrack->GetTotalEnergy();
|
||||
fOriginalTime = aTrack->GetGlobalTime();
|
||||
fTrackingStatus = 1;
|
||||
fSourceTrackID = -1;
|
||||
fSourceDefinition = 0;
|
||||
fSourcePosition = G4ThreeVector(0., 0., 0.);
|
||||
fSourceMomentum = G4ThreeVector(0., 0., 0.);
|
||||
fSourceEnergy = 0.;
|
||||
fSourceTime = 0.;
|
||||
fSuspendedStepID = -1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackInformation
|
||||
::RE01TrackInformation(const RE01TrackInformation* aTrackInfo)
|
||||
RE01TrackInformation ::RE01TrackInformation(const RE01TrackInformation* aTrackInfo)
|
||||
: G4VUserTrackInformation()
|
||||
{
|
||||
fOriginalTrackID = aTrackInfo->fOriginalTrackID;
|
||||
fParticleDefinition = aTrackInfo->fParticleDefinition;
|
||||
fOriginalPosition = aTrackInfo->fOriginalPosition;
|
||||
fOriginalMomentum = aTrackInfo->fOriginalMomentum;
|
||||
fOriginalEnergy = aTrackInfo->fOriginalEnergy;
|
||||
fOriginalTime = aTrackInfo->fOriginalTime;
|
||||
fTrackingStatus = aTrackInfo->fTrackingStatus;
|
||||
fSourceTrackID = aTrackInfo->fSourceTrackID;
|
||||
fSourceDefinition = aTrackInfo->fSourceDefinition;
|
||||
fSourcePosition = aTrackInfo->fSourcePosition;
|
||||
fSourceMomentum = aTrackInfo->fSourceMomentum;
|
||||
fSourceEnergy = aTrackInfo->fSourceEnergy;
|
||||
fSourceTime = aTrackInfo->fSourceTime;
|
||||
fSuspendedStepID = -1;
|
||||
fOriginalTrackID = aTrackInfo->fOriginalTrackID;
|
||||
fParticleDefinition = aTrackInfo->fParticleDefinition;
|
||||
fOriginalPosition = aTrackInfo->fOriginalPosition;
|
||||
fOriginalMomentum = aTrackInfo->fOriginalMomentum;
|
||||
fOriginalEnergy = aTrackInfo->fOriginalEnergy;
|
||||
fOriginalTime = aTrackInfo->fOriginalTime;
|
||||
fTrackingStatus = aTrackInfo->fTrackingStatus;
|
||||
fSourceTrackID = aTrackInfo->fSourceTrackID;
|
||||
fSourceDefinition = aTrackInfo->fSourceDefinition;
|
||||
fSourcePosition = aTrackInfo->fSourcePosition;
|
||||
fSourceMomentum = aTrackInfo->fSourceMomentum;
|
||||
fSourceEnergy = aTrackInfo->fSourceEnergy;
|
||||
fSourceTime = aTrackInfo->fSourceTime;
|
||||
fSuspendedStepID = -1;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackInformation::~RE01TrackInformation()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackInformation& RE01TrackInformation
|
||||
::operator =(const RE01TrackInformation& aTrackInfo)
|
||||
RE01TrackInformation& RE01TrackInformation ::operator=(const RE01TrackInformation& aTrackInfo)
|
||||
{
|
||||
fOriginalTrackID = aTrackInfo.fOriginalTrackID;
|
||||
fParticleDefinition = aTrackInfo.fParticleDefinition;
|
||||
fOriginalPosition = aTrackInfo.fOriginalPosition;
|
||||
fOriginalMomentum = aTrackInfo.fOriginalMomentum;
|
||||
fOriginalEnergy = aTrackInfo.fOriginalEnergy;
|
||||
fOriginalTime = aTrackInfo.fOriginalTime;
|
||||
fTrackingStatus = aTrackInfo.fTrackingStatus;
|
||||
fSourceTrackID = aTrackInfo.fSourceTrackID;
|
||||
fSourceDefinition = aTrackInfo.fSourceDefinition;
|
||||
fSourcePosition = aTrackInfo.fSourcePosition;
|
||||
fSourceMomentum = aTrackInfo.fSourceMomentum;
|
||||
fSourceEnergy = aTrackInfo.fSourceEnergy;
|
||||
fSourceTime = aTrackInfo.fSourceTime;
|
||||
fSuspendedStepID = -1;
|
||||
fOriginalTrackID = aTrackInfo.fOriginalTrackID;
|
||||
fParticleDefinition = aTrackInfo.fParticleDefinition;
|
||||
fOriginalPosition = aTrackInfo.fOriginalPosition;
|
||||
fOriginalMomentum = aTrackInfo.fOriginalMomentum;
|
||||
fOriginalEnergy = aTrackInfo.fOriginalEnergy;
|
||||
fOriginalTime = aTrackInfo.fOriginalTime;
|
||||
fTrackingStatus = aTrackInfo.fTrackingStatus;
|
||||
fSourceTrackID = aTrackInfo.fSourceTrackID;
|
||||
fSourceDefinition = aTrackInfo.fSourceDefinition;
|
||||
fSourcePosition = aTrackInfo.fSourcePosition;
|
||||
fSourceMomentum = aTrackInfo.fSourceMomentum;
|
||||
fSourceEnergy = aTrackInfo.fSourceEnergy;
|
||||
fSourceTime = aTrackInfo.fSourceTime;
|
||||
fSuspendedStepID = -1;
|
||||
|
||||
return *this;
|
||||
return *this;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackInformation::SetSourceTrackInformation(const G4Track* aTrack)
|
||||
{
|
||||
fSourceTrackID = aTrack->GetTrackID();
|
||||
fSourceDefinition = aTrack->GetDefinition();
|
||||
fSourcePosition = aTrack->GetPosition();
|
||||
fSourceMomentum = aTrack->GetMomentum();
|
||||
fSourceEnergy = aTrack->GetTotalEnergy();
|
||||
fSourceTime = aTrack->GetGlobalTime();
|
||||
fSourceTrackID = aTrack->GetTrackID();
|
||||
fSourceDefinition = aTrack->GetDefinition();
|
||||
fSourcePosition = aTrack->GetPosition();
|
||||
fSourceMomentum = aTrack->GetMomentum();
|
||||
fSourceEnergy = aTrack->GetTotalEnergy();
|
||||
fSourceTime = aTrack->GetGlobalTime();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackInformation::Print() const
|
||||
{
|
||||
G4cout
|
||||
<< "Source track ID " << fSourceTrackID << " ("
|
||||
<< fSourceDefinition->GetParticleName() << ","
|
||||
<< fSourceEnergy/GeV << "[GeV]) at " << fSourcePosition << G4endl;
|
||||
G4cout
|
||||
<< "Original primary track ID " << fOriginalTrackID << " ("
|
||||
<< fParticleDefinition->GetParticleName() << ","
|
||||
<< fOriginalEnergy/GeV << "[GeV])" << G4endl;
|
||||
G4cout << "Source track ID " << fSourceTrackID << " (" << fSourceDefinition->GetParticleName()
|
||||
<< "," << fSourceEnergy / GeV << "[GeV]) at " << fSourcePosition << G4endl;
|
||||
G4cout << "Original primary track ID " << fOriginalTrackID << " ("
|
||||
<< fParticleDefinition->GetParticleName() << "," << fOriginalEnergy / GeV << "[GeV])"
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
|
||||
@@ -30,98 +30,93 @@
|
||||
|
||||
#include "RE01TrackerHit.hh"
|
||||
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<RE01TrackerHit> * RE01TrackerHitAllocator = 0;
|
||||
G4ThreadLocal G4Allocator<RE01TrackerHit>* RE01TrackerHitAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerHit::RE01TrackerHit()
|
||||
: G4VHit(), fEdep(0.0), fPos(0),fTrackID(-1)
|
||||
{;}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerHit::RE01TrackerHit() : G4VHit(), fEdep(0.0), fPos(0), fTrackID(-1)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerHit::~RE01TrackerHit()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerHit::Draw()
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
if(pVVisManager)
|
||||
{
|
||||
if (pVVisManager) {
|
||||
G4Circle circle(fPos);
|
||||
circle.SetScreenSize(0.04);
|
||||
circle.SetFillStyle(G4Circle::filled);
|
||||
G4Colour colour(1.,0.,0.);
|
||||
G4Colour colour(1., 0., 0.);
|
||||
G4VisAttributes attribs(colour);
|
||||
circle.SetVisAttributes(attribs);
|
||||
pVVisManager->Draw(circle);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String,G4AttDef>* RE01TrackerHit::GetAttDefs() const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String, G4AttDef>* RE01TrackerHit::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
std::map<G4String,G4AttDef>* store
|
||||
= G4AttDefStore::GetInstance("RE01TrackerHit",isNew);
|
||||
std::map<G4String, G4AttDef>* store = G4AttDefStore::GetInstance("RE01TrackerHit", isNew);
|
||||
if (isNew) {
|
||||
G4String hitType("HitType");
|
||||
(*store)[hitType] = G4AttDef(hitType,"Hit Type","Physics","","G4String");
|
||||
(*store)[hitType] = G4AttDef(hitType, "Hit Type", "Physics", "", "G4String");
|
||||
|
||||
G4String trackID("TrackID");
|
||||
(*store)[trackID] = G4AttDef(trackID,"Track ID","Physics","","G4int");
|
||||
(*store)[trackID] = G4AttDef(trackID, "Track ID", "Physics", "", "G4int");
|
||||
|
||||
G4String energy("Energy");
|
||||
(*store)[energy] = G4AttDef(energy,"Energy Deposited","Physics",
|
||||
"G4BestUnit","G4double");
|
||||
(*store)[energy] = G4AttDef(energy, "Energy Deposited", "Physics", "G4BestUnit", "G4double");
|
||||
|
||||
G4String eTrack("ETrack");
|
||||
(*store)[eTrack] = G4AttDef(eTrack,"Energy Deposited By Track","Physics",
|
||||
"G4BestUnit","G4double");
|
||||
(*store)[eTrack] =
|
||||
G4AttDef(eTrack, "Energy Deposited By Track", "Physics", "G4BestUnit", "G4double");
|
||||
|
||||
G4String pos("Pos");
|
||||
(*store)[pos] = G4AttDef(pos, "Position",
|
||||
"Physics","G4BestUnit","G4ThreeVector");
|
||||
(*store)[pos] = G4AttDef(pos, "Position", "Physics", "G4BestUnit", "G4ThreeVector");
|
||||
}
|
||||
return store;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
std::vector<G4AttValue>* RE01TrackerHit::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
values->push_back(G4AttValue("HitType","RE01TrackerHit",""));
|
||||
values->push_back(G4AttValue("HitType", "RE01TrackerHit", ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("TrackID",G4UIcommand::ConvertToString(fTrackID),""));
|
||||
values->push_back(G4AttValue("TrackID", G4UIcommand::ConvertToString(fTrackID), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Energy",G4BestUnit(fEdep,"Energy"),""));
|
||||
values->push_back(G4AttValue("Energy", G4BestUnit(fEdep, "Energy"), ""));
|
||||
|
||||
G4double noEnergy = 0.*MeV;
|
||||
values->push_back
|
||||
(G4AttValue("ETrack",G4BestUnit(noEnergy,"Energy"),""));
|
||||
G4double noEnergy = 0. * MeV;
|
||||
values->push_back(G4AttValue("ETrack", G4BestUnit(noEnergy, "Energy"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Pos",G4BestUnit(fPos,"Length"),""));
|
||||
|
||||
return values;
|
||||
values->push_back(G4AttValue("Pos", G4BestUnit(fPos, "Length"), ""));
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerHit::Print()
|
||||
{
|
||||
G4cout << "TrackID " << fTrackID << " Position " << fPos << " : "
|
||||
<< fEdep/keV << " [keV]" << G4endl;
|
||||
G4cout << "TrackID " << fTrackID << " Position " << fPos << " : " << fEdep / keV
|
||||
<< " [keV]" << G4endl;
|
||||
}
|
||||
|
||||
@@ -30,36 +30,36 @@
|
||||
|
||||
#include "RE01TrackerParametrisation.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerParametrisation::RE01TrackerParametrisation()
|
||||
: G4VPVParameterisation()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerParametrisation::RE01TrackerParametrisation() : G4VPVParameterisation()
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerParametrisation::~RE01TrackerParametrisation()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerParametrisation
|
||||
::ComputeTransformation(const G4int, G4VPhysicalVolume* physVol) const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerParametrisation ::ComputeTransformation(const G4int,
|
||||
G4VPhysicalVolume* physVol) const
|
||||
{
|
||||
G4ThreeVector origin;
|
||||
physVol->SetTranslation(origin);
|
||||
}
|
||||
|
||||
void RE01TrackerParametrisation
|
||||
::ComputeDimensions(G4Tubs& trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume*) const
|
||||
void RE01TrackerParametrisation ::ComputeDimensions(G4Tubs& trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
trackerLayer.SetInnerRadius(fTracker_radius[copyNo]);
|
||||
trackerLayer.SetOuterRadius(fTracker_radius[copyNo]+fTracker_thick);
|
||||
trackerLayer.SetOuterRadius(fTracker_radius[copyNo] + fTracker_thick);
|
||||
trackerLayer.SetZHalfLength(fTracker_length[copyNo]);
|
||||
trackerLayer.SetStartPhiAngle(fTrkTubs_sphi);
|
||||
trackerLayer.SetDeltaPhiAngle(fTrkTubs_dphi);
|
||||
|
||||
@@ -29,56 +29,63 @@
|
||||
//
|
||||
|
||||
#include "RE01TrackerSD.hh"
|
||||
#include "RE01TrackerHit.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4Step.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
#include "RE01TrackerHit.hh"
|
||||
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4TouchableHistory.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerSD::RE01TrackerSD(G4String name)
|
||||
:G4VSensitiveDetector(name),fTrackerCollection(0)
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerSD::RE01TrackerSD(G4String name) : G4VSensitiveDetector(name), fTrackerCollection(0)
|
||||
{
|
||||
G4String HCname;
|
||||
collectionName.insert(HCname="trackerCollection");
|
||||
collectionName.insert(HCname = "trackerCollection");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerSD::~RE01TrackerSD(){;}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackerSD::~RE01TrackerSD()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerSD::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
static int HCID = -1;
|
||||
fTrackerCollection = new RE01TrackerHitsCollection
|
||||
(SensitiveDetectorName,collectionName[0]);
|
||||
if(HCID<0)
|
||||
{ HCID = GetCollectionID(0); }
|
||||
HCE->AddHitsCollection(HCID,fTrackerCollection);
|
||||
fTrackerCollection = new RE01TrackerHitsCollection(SensitiveDetectorName, collectionName[0]);
|
||||
if (HCID < 0) {
|
||||
HCID = GetCollectionID(0);
|
||||
}
|
||||
HCE->AddHitsCollection(HCID, fTrackerCollection);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4bool RE01TrackerSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
{
|
||||
G4double edep = aStep->GetTotalEnergyDeposit();
|
||||
if(edep==0.) return false;
|
||||
if (edep == 0.) return false;
|
||||
|
||||
RE01TrackerHit* newHit = new RE01TrackerHit();
|
||||
newHit->SetEdep( edep );
|
||||
newHit->SetPos( aStep->GetPreStepPoint()->GetPosition() );
|
||||
RE01TrackInformation* trackInfo =
|
||||
newHit->SetEdep(edep);
|
||||
newHit->SetPos(aStep->GetPreStepPoint()->GetPosition());
|
||||
RE01TrackInformation* trackInfo =
|
||||
(RE01TrackInformation*)(aStep->GetTrack()->GetUserInformation());
|
||||
if(trackInfo->GetTrackingStatus()>0)
|
||||
{ newHit->SetTrackID( aStep->GetTrack()->GetTrackID() ); }
|
||||
else
|
||||
{ newHit->SetTrackID( -1 ); }
|
||||
fTrackerCollection->insert( newHit );
|
||||
if (trackInfo->GetTrackingStatus() > 0) {
|
||||
newHit->SetTrackID(aStep->GetTrack()->GetTrackID());
|
||||
}
|
||||
else {
|
||||
newHit->SetTrackID(-1);
|
||||
}
|
||||
fTrackerCollection->insert(newHit);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackerSD::EndOfEvent(G4HCofThisEvent*)
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -29,50 +29,45 @@
|
||||
//
|
||||
|
||||
#include "RE01TrackingAction.hh"
|
||||
#include "RE01Trajectory.hh"
|
||||
|
||||
#include "RE01TrackInformation.hh"
|
||||
#include "RE01Trajectory.hh"
|
||||
|
||||
#include "G4TrackingManager.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4TrackingManager.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackingAction::RE01TrackingAction()
|
||||
:G4UserTrackingAction()
|
||||
{;}
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01TrackingAction::RE01TrackingAction() : G4UserTrackingAction()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
void RE01TrackingAction::PreUserTrackingAction(const G4Track* aTrack)
|
||||
{
|
||||
// Create trajectory only for track in tracking region
|
||||
RE01TrackInformation* trackInfo =
|
||||
(RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
RE01TrackInformation* trackInfo = (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
|
||||
if(trackInfo->GetTrackingStatus() > 0)
|
||||
{
|
||||
if (trackInfo->GetTrackingStatus() > 0) {
|
||||
fpTrackingManager->SetStoreTrajectory(true);
|
||||
fpTrackingManager->SetTrajectory(new RE01Trajectory(aTrack));
|
||||
}
|
||||
else
|
||||
{ fpTrackingManager->SetStoreTrajectory(false); }
|
||||
else {
|
||||
fpTrackingManager->SetStoreTrajectory(false);
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01TrackingAction::PostUserTrackingAction(const G4Track* aTrack)
|
||||
{
|
||||
G4TrackVector* secondaries = fpTrackingManager->GimmeSecondaries();
|
||||
if(secondaries)
|
||||
{
|
||||
RE01TrackInformation* info =
|
||||
(RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
if (secondaries) {
|
||||
RE01TrackInformation* info = (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
size_t nSeco = secondaries->size();
|
||||
if(nSeco>0)
|
||||
{
|
||||
for(size_t i=0;i<nSeco;i++)
|
||||
{
|
||||
if (nSeco > 0) {
|
||||
for (size_t i = 0; i < nSeco; i++) {
|
||||
RE01TrackInformation* infoNew = new RE01TrackInformation(info);
|
||||
(*secondaries)[i]->SetUserInformation(infoNew);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,246 +30,223 @@
|
||||
//
|
||||
|
||||
#include "RE01Trajectory.hh"
|
||||
|
||||
#include "RE01TrackInformation.hh"
|
||||
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleTypes.hh"
|
||||
#include "G4Polyline.hh"
|
||||
#include "G4Circle.hh"
|
||||
#include "G4Colour.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
#include "G4AttDef.hh"
|
||||
#include "G4AttValue.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4DynamicParticle.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
#include "RE01TrackInformation.hh"
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
|
||||
G4ThreadLocal G4Allocator<RE01Trajectory> * myTrajectoryAllocator = 0;
|
||||
G4ThreadLocal G4Allocator<RE01Trajectory>* myTrajectoryAllocator = 0;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01Trajectory::RE01Trajectory(const G4Track* aTrack)
|
||||
:G4VTrajectory(),
|
||||
fPositionRecord(0),fParticleDefinition(0)
|
||||
: G4VTrajectory(), fPositionRecord(0), fParticleDefinition(0)
|
||||
{
|
||||
fParticleDefinition = aTrack->GetDefinition();
|
||||
fParticleName = fParticleDefinition->GetParticleName();
|
||||
fPDGCharge = fParticleDefinition->GetPDGCharge();
|
||||
fPDGEncoding = fParticleDefinition->GetPDGEncoding();
|
||||
if(fParticleName=="unknown")
|
||||
{
|
||||
G4PrimaryParticle*pp = aTrack->GetDynamicParticle()->GetPrimaryParticle();
|
||||
if(pp)
|
||||
{
|
||||
if(pp->GetCharge()<DBL_MAX) fPDGCharge = pp->GetCharge();
|
||||
fPDGEncoding = pp->GetPDGcode();
|
||||
if(pp->GetG4code()!=0)
|
||||
{
|
||||
fParticleName += " : ";
|
||||
fParticleName += pp->GetG4code()->GetParticleName();
|
||||
}
|
||||
}
|
||||
}
|
||||
fTrackID = aTrack->GetTrackID();
|
||||
RE01TrackInformation* trackInfo
|
||||
= (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
fTrackStatus = trackInfo->GetTrackingStatus();
|
||||
if(fTrackStatus == 1)
|
||||
{ fParentID = aTrack->GetParentID(); }
|
||||
else if(fTrackStatus == 2)
|
||||
{ fParentID = trackInfo->GetSourceTrackID(); }
|
||||
else
|
||||
{ fParentID = -1; }
|
||||
fPositionRecord = new RE01TrajectoryPointContainer();
|
||||
fPositionRecord->push_back(new G4TrajectoryPoint(aTrack->GetPosition()));
|
||||
fMomentum = aTrack->GetMomentum();
|
||||
fVertexPosition = aTrack->GetPosition();
|
||||
fGlobalTime = aTrack->GetGlobalTime();
|
||||
fParticleDefinition = aTrack->GetDefinition();
|
||||
fParticleName = fParticleDefinition->GetParticleName();
|
||||
fPDGCharge = fParticleDefinition->GetPDGCharge();
|
||||
fPDGEncoding = fParticleDefinition->GetPDGEncoding();
|
||||
if (fParticleName == "unknown") {
|
||||
G4PrimaryParticle* pp = aTrack->GetDynamicParticle()->GetPrimaryParticle();
|
||||
if (pp) {
|
||||
if (pp->GetCharge() < DBL_MAX) fPDGCharge = pp->GetCharge();
|
||||
fPDGEncoding = pp->GetPDGcode();
|
||||
if (pp->GetG4code() != 0) {
|
||||
fParticleName += " : ";
|
||||
fParticleName += pp->GetG4code()->GetParticleName();
|
||||
}
|
||||
}
|
||||
}
|
||||
fTrackID = aTrack->GetTrackID();
|
||||
RE01TrackInformation* trackInfo = (RE01TrackInformation*)(aTrack->GetUserInformation());
|
||||
fTrackStatus = trackInfo->GetTrackingStatus();
|
||||
if (fTrackStatus == 1) {
|
||||
fParentID = aTrack->GetParentID();
|
||||
}
|
||||
else if (fTrackStatus == 2) {
|
||||
fParentID = trackInfo->GetSourceTrackID();
|
||||
}
|
||||
else {
|
||||
fParentID = -1;
|
||||
}
|
||||
fPositionRecord = new RE01TrajectoryPointContainer();
|
||||
fPositionRecord->push_back(new G4TrajectoryPoint(aTrack->GetPosition()));
|
||||
fMomentum = aTrack->GetMomentum();
|
||||
fVertexPosition = aTrack->GetPosition();
|
||||
fGlobalTime = aTrack->GetGlobalTime();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01Trajectory::~RE01Trajectory()
|
||||
{
|
||||
size_t i;
|
||||
for(i=0;i<fPositionRecord->size();i++){
|
||||
delete (*fPositionRecord)[i];
|
||||
for (i = 0; i < fPositionRecord->size(); i++) {
|
||||
delete (*fPositionRecord)[i];
|
||||
}
|
||||
fPositionRecord->clear();
|
||||
|
||||
delete fPositionRecord;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Trajectory::ShowTrajectory(std::ostream& os) const
|
||||
{
|
||||
os << G4endl << "TrackID =" << fTrackID
|
||||
<< " : ParentID=" << fParentID << " : TrackStatus=" << fTrackStatus << G4endl;
|
||||
os << "Particle name : " << fParticleName << " PDG code : " << fPDGEncoding
|
||||
<< " Charge : " << fPDGCharge << G4endl;
|
||||
os << "Original momentum : " <<
|
||||
G4BestUnit(fMomentum,"Energy") << G4endl;
|
||||
os << "Vertex : " << G4BestUnit(fVertexPosition,"Length")
|
||||
<< " Global time : " << G4BestUnit(fGlobalTime,"Time") << G4endl;
|
||||
os << " Current trajectory has " << fPositionRecord->size()
|
||||
<< " points." << G4endl;
|
||||
os << G4endl << "TrackID =" << fTrackID << " : ParentID=" << fParentID
|
||||
<< " : TrackStatus=" << fTrackStatus << G4endl;
|
||||
os << "Particle name : " << fParticleName << " PDG code : " << fPDGEncoding
|
||||
<< " Charge : " << fPDGCharge << G4endl;
|
||||
os << "Original momentum : " << G4BestUnit(fMomentum, "Energy") << G4endl;
|
||||
os << "Vertex : " << G4BestUnit(fVertexPosition, "Length")
|
||||
<< " Global time : " << G4BestUnit(fGlobalTime, "Time") << G4endl;
|
||||
os << " Current trajectory has " << fPositionRecord->size() << " points." << G4endl;
|
||||
|
||||
for( size_t i=0 ; i < fPositionRecord->size() ; i++){
|
||||
G4TrajectoryPoint* aTrajectoryPoint =
|
||||
(G4TrajectoryPoint*)((*fPositionRecord)[i]);
|
||||
os << "Point[" << i << "]"
|
||||
<< " Position= " << aTrajectoryPoint->GetPosition() << G4endl;
|
||||
}
|
||||
for (size_t i = 0; i < fPositionRecord->size(); i++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*fPositionRecord)[i]);
|
||||
os << "Point[" << i << "]"
|
||||
<< " Position= " << aTrajectoryPoint->GetPosition() << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Trajectory::DrawTrajectory() const
|
||||
{
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
G4ThreeVector pos;
|
||||
|
||||
G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance();
|
||||
G4ThreeVector pos;
|
||||
G4Polyline pPolyline;
|
||||
for (size_t i = 0; i < fPositionRecord->size(); i++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint = (G4TrajectoryPoint*)((*fPositionRecord)[i]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
pPolyline.push_back(pos);
|
||||
}
|
||||
|
||||
G4Polyline pPolyline;
|
||||
for (size_t i = 0; i < fPositionRecord->size() ; i++) {
|
||||
G4TrajectoryPoint* aTrajectoryPoint =
|
||||
(G4TrajectoryPoint*)((*fPositionRecord)[i]);
|
||||
pos = aTrajectoryPoint->GetPosition();
|
||||
pPolyline.push_back( pos );
|
||||
}
|
||||
G4Colour colour(0.2, 0.2, 0.2);
|
||||
if (fParticleDefinition == G4Gamma::GammaDefinition())
|
||||
colour = G4Colour(0., 0., 1.);
|
||||
else if (fParticleDefinition == G4Electron::ElectronDefinition()
|
||||
|| fParticleDefinition == G4Positron::PositronDefinition())
|
||||
colour = G4Colour(1., 1., 0.);
|
||||
else if (fParticleDefinition == G4MuonMinus::MuonMinusDefinition()
|
||||
|| fParticleDefinition == G4MuonPlus::MuonPlusDefinition())
|
||||
colour = G4Colour(0., 1., 0.);
|
||||
else if (fParticleDefinition->GetParticleType() == "meson") {
|
||||
if (fPDGCharge != 0.)
|
||||
colour = G4Colour(1., 0., 0.);
|
||||
else
|
||||
colour = G4Colour(0.5, 0., 0.);
|
||||
}
|
||||
else if (fParticleDefinition->GetParticleType() == "baryon") {
|
||||
if (fPDGCharge != 0.)
|
||||
colour = G4Colour(0., 1., 1.);
|
||||
else
|
||||
colour = G4Colour(0., 0.5, 0.5);
|
||||
}
|
||||
|
||||
G4Colour colour(0.2,0.2,0.2);
|
||||
if(fParticleDefinition==G4Gamma::GammaDefinition())
|
||||
colour = G4Colour(0.,0.,1.);
|
||||
else if(fParticleDefinition==G4Electron::ElectronDefinition()
|
||||
||fParticleDefinition==G4Positron::PositronDefinition())
|
||||
colour = G4Colour(1.,1.,0.);
|
||||
else if(fParticleDefinition==G4MuonMinus::MuonMinusDefinition()
|
||||
||fParticleDefinition==G4MuonPlus::MuonPlusDefinition())
|
||||
colour = G4Colour(0.,1.,0.);
|
||||
else if(fParticleDefinition->GetParticleType()=="meson")
|
||||
{
|
||||
if(fPDGCharge!=0.)
|
||||
colour = G4Colour(1.,0.,0.);
|
||||
else
|
||||
colour = G4Colour(0.5,0.,0.);
|
||||
}
|
||||
else if(fParticleDefinition->GetParticleType()=="baryon")
|
||||
{
|
||||
if(fPDGCharge!=0.)
|
||||
colour = G4Colour(0.,1.,1.);
|
||||
else
|
||||
colour = G4Colour(0.,0.5,0.5);
|
||||
}
|
||||
|
||||
G4VisAttributes attribs(colour);
|
||||
pPolyline.SetVisAttributes(attribs);
|
||||
if(pVVisManager) pVVisManager->Draw(pPolyline);
|
||||
G4VisAttributes attribs(colour);
|
||||
pPolyline.SetVisAttributes(attribs);
|
||||
if (pVVisManager) pVVisManager->Draw(pPolyline);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String,G4AttDef>* RE01Trajectory::GetAttDefs() const
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
const std::map<G4String, G4AttDef>* RE01Trajectory::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
std::map<G4String,G4AttDef>* store
|
||||
= G4AttDefStore::GetInstance("RE01Trajectory",isNew);
|
||||
std::map<G4String, G4AttDef>* store = G4AttDefStore::GetInstance("RE01Trajectory", isNew);
|
||||
if (isNew) {
|
||||
|
||||
G4String id("ID");
|
||||
(*store)[id] = G4AttDef(id,"Track ID","Bookkeeping","","G4int");
|
||||
(*store)[id] = G4AttDef(id, "Track ID", "Bookkeeping", "", "G4int");
|
||||
|
||||
G4String pid("PID");
|
||||
(*store)[pid] = G4AttDef(pid,"Parent ID","Bookkeeping","","G4int");
|
||||
(*store)[pid] = G4AttDef(pid, "Parent ID", "Bookkeeping", "", "G4int");
|
||||
|
||||
G4String status("Status");
|
||||
(*store)[status] = G4AttDef(status,"Track Status","Bookkeeping","","G4int");
|
||||
(*store)[status] = G4AttDef(status, "Track Status", "Bookkeeping", "", "G4int");
|
||||
|
||||
G4String pn("PN");
|
||||
(*store)[pn] = G4AttDef(pn,"Particle Name","Bookkeeping","","G4String");
|
||||
(*store)[pn] = G4AttDef(pn, "Particle Name", "Bookkeeping", "", "G4String");
|
||||
|
||||
G4String ch("Ch");
|
||||
(*store)[ch] = G4AttDef(ch,"Charge","Physics","e+","G4double");
|
||||
(*store)[ch] = G4AttDef(ch, "Charge", "Physics", "e+", "G4double");
|
||||
|
||||
G4String pdg("PDG");
|
||||
(*store)[pdg] = G4AttDef(pdg,"PDG Encoding","Bookkeeping","","G4int");
|
||||
(*store)[pdg] = G4AttDef(pdg, "PDG Encoding", "Bookkeeping", "", "G4int");
|
||||
|
||||
G4String imom("IMom");
|
||||
(*store)[imom] = G4AttDef(imom, "Momentum of track at start of trajectory",
|
||||
"Physics","G4BestUnit","G4ThreeVector");
|
||||
(*store)[imom] = G4AttDef(imom, "Momentum of track at start of trajectory", "Physics",
|
||||
"G4BestUnit", "G4ThreeVector");
|
||||
|
||||
G4String imag("IMag");
|
||||
(*store)[imag] =
|
||||
G4AttDef(imag, "Magnitude of momentum of track at start of trajectory",
|
||||
"Physics","G4BestUnit","G4double");
|
||||
(*store)[imag] = G4AttDef(imag, "Magnitude of momentum of track at start of trajectory",
|
||||
"Physics", "G4BestUnit", "G4double");
|
||||
|
||||
G4String vtxPos("VtxPos");
|
||||
(*store)[vtxPos] = G4AttDef(vtxPos, "Vertex position",
|
||||
"Physics","G4BestUnit","G4ThreeVector");
|
||||
(*store)[vtxPos] =
|
||||
G4AttDef(vtxPos, "Vertex position", "Physics", "G4BestUnit", "G4ThreeVector");
|
||||
|
||||
G4String ntp("NTP");
|
||||
(*store)[ntp] = G4AttDef(ntp,"No. of points","Bookkeeping","","G4int");
|
||||
|
||||
(*store)[ntp] = G4AttDef(ntp, "No. of points", "Bookkeeping", "", "G4int");
|
||||
}
|
||||
return store;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
std::vector<G4AttValue>* RE01Trajectory::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("ID",G4UIcommand::ConvertToString(fTrackID),""));
|
||||
values->push_back(G4AttValue("ID", G4UIcommand::ConvertToString(fTrackID), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("PID",G4UIcommand::ConvertToString(fParentID),""));
|
||||
values->push_back(G4AttValue("PID", G4UIcommand::ConvertToString(fParentID), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Status",G4UIcommand::ConvertToString(fTrackStatus),""));
|
||||
values->push_back(G4AttValue("Status", G4UIcommand::ConvertToString(fTrackStatus), ""));
|
||||
|
||||
values->push_back(G4AttValue("PN",fParticleName,""));
|
||||
values->push_back(G4AttValue("PN", fParticleName, ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("Ch",G4UIcommand::ConvertToString(fPDGCharge),""));
|
||||
values->push_back(G4AttValue("Ch", G4UIcommand::ConvertToString(fPDGCharge), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("PDG",G4UIcommand::ConvertToString(fPDGEncoding),""));
|
||||
values->push_back(G4AttValue("PDG", G4UIcommand::ConvertToString(fPDGEncoding), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("IMom",G4BestUnit(fMomentum,"Energy"),""));
|
||||
values->push_back(G4AttValue("IMom", G4BestUnit(fMomentum, "Energy"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("IMag",G4BestUnit(fMomentum.mag(),"Energy"),""));
|
||||
values->push_back(G4AttValue("IMag", G4BestUnit(fMomentum.mag(), "Energy"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("VtxPos",G4BestUnit(fVertexPosition,"Length"),""));
|
||||
values->push_back(G4AttValue("VtxPos", G4BestUnit(fVertexPosition, "Length"), ""));
|
||||
|
||||
values->push_back
|
||||
(G4AttValue("NTP",G4UIcommand::ConvertToString(GetPointEntries()),""));
|
||||
values->push_back(G4AttValue("NTP", G4UIcommand::ConvertToString(GetPointEntries()), ""));
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Trajectory::AppendStep(const G4Step* aStep)
|
||||
{
|
||||
fPositionRecord->push_back(
|
||||
new G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition() ));
|
||||
fPositionRecord->push_back(new G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition()));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE01Trajectory::MergeTrajectory(G4VTrajectory* secondTrajectory)
|
||||
{
|
||||
if(!secondTrajectory) return;
|
||||
if (!secondTrajectory) return;
|
||||
|
||||
RE01Trajectory* seco = (RE01Trajectory*)secondTrajectory;
|
||||
G4int ent = seco->GetPointEntries();
|
||||
//
|
||||
// initial point of the second trajectory should not be merged
|
||||
for(int i=1;i<ent;i++)
|
||||
{
|
||||
for (int i = 1; i < ent; i++) {
|
||||
fPositionRecord->push_back((*(seco->fPositionRecord))[i]);
|
||||
}
|
||||
delete (*seco->fPositionRecord)[0];
|
||||
seco->fPositionRecord->clear();
|
||||
|
||||
}
|
||||
|
||||
@@ -28,26 +28,24 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#include "RE02DetectorConstruction.hh"
|
||||
#include "QGS_BIC.hh"
|
||||
#include "RE02ActionInitialization.hh"
|
||||
#include "RE02DetectorConstruction.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//
|
||||
int main(int argc,char** argv) {
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
@@ -57,21 +55,21 @@ int main(int argc,char** argv) {
|
||||
//---
|
||||
// Create Detector
|
||||
RE02DetectorConstruction* detector = new RE02DetectorConstruction;
|
||||
detector->SetPhantomSize(G4ThreeVector(200*mm,200*mm,400*mm)); //Default
|
||||
detector->SetNumberOfSegmentsInPhantom(100,100,200); //Default
|
||||
detector->SetPhantomSize(G4ThreeVector(200 * mm, 200 * mm, 400 * mm)); // Default
|
||||
detector->SetNumberOfSegmentsInPhantom(100, 100, 200); // Default
|
||||
// If your machine does not have enough memory,
|
||||
// please try to reduce Number of Segements in phantom.
|
||||
//detector->SetNumberOfSegmentsInPhantom(1,1,100); // For small memory size.
|
||||
// detector->SetNumberOfSegmentsInPhantom(1,1,100); // For small memory size.
|
||||
//
|
||||
detector->SetLeadSegment(TRUE); // Default (Water and Lead)
|
||||
detector->SetLeadSegment(TRUE); // Default (Water and Lead)
|
||||
// Water and Lead segments are placed alternately, by defult.,
|
||||
// If you want to simulation homogeneous water phantom, please set it FALSE.
|
||||
//detector->SetLeadSegment(FALSE); // Homogeneous water phantom
|
||||
// detector->SetLeadSegment(FALSE); // Homogeneous water phantom
|
||||
//
|
||||
runManager->SetUserInitialization(detector);
|
||||
//
|
||||
runManager->SetUserInitialization(new QGS_BIC());
|
||||
|
||||
|
||||
// Visualization, if you choose to have it!
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
@@ -79,25 +77,25 @@ int main(int argc,char** argv) {
|
||||
// UserAction classes
|
||||
runManager->SetUserInitialization(new RE02ActionInitialization);
|
||||
|
||||
//Initialize G4 kernel
|
||||
// Initialize G4 kernel
|
||||
runManager->Initialize();
|
||||
|
||||
//get the pointer to the User Interface manager
|
||||
G4UImanager * pUI = G4UImanager::GetUIpointer();
|
||||
|
||||
if(ui)
|
||||
// Define (G)UI terminal for interactive mode
|
||||
{
|
||||
pUI->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
// get the pointer to the User Interface manager
|
||||
G4UImanager* pUI = G4UImanager::GetUIpointer();
|
||||
|
||||
if (ui)
|
||||
// Define (G)UI terminal for interactive mode
|
||||
{
|
||||
pUI->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else
|
||||
// Batch mode
|
||||
{
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
pUI->ApplyCommand(command+fileName);
|
||||
pUI->ApplyCommand(command + fileName);
|
||||
}
|
||||
|
||||
delete visManager;
|
||||
@@ -107,4 +105,3 @@ int main(int argc,char** argv) {
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
|
||||
@@ -31,20 +31,19 @@
|
||||
#ifndef RE02ActionInitialization_H
|
||||
#define RE02ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE02ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE02ActionInitialization();//G4bool bParallelWorld);
|
||||
RE02ActionInitialization(); // G4bool bParallelWorld);
|
||||
virtual ~RE02ActionInitialization();
|
||||
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
#ifndef RE02DetectorConstruction_h
|
||||
#define RE02DetectorConstruction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Box;
|
||||
class G4LogicalVolume;
|
||||
@@ -47,34 +47,34 @@ class G4Material;
|
||||
/// (Description)
|
||||
///
|
||||
/// Detector construction for example RE02.
|
||||
///
|
||||
/// [Geometry]
|
||||
///
|
||||
/// [Geometry]
|
||||
/// The world volume is defined as 200 cm x 200 cm x 200 cm box with Air.
|
||||
/// Water phantom is defined as 200 mm x 200 mm x 400 mm box with Water.
|
||||
/// The water phantom is divided into 100 segments in x,y plane using
|
||||
/// replication,
|
||||
/// and then divided into 200 segments perpendicular to z axis using nested
|
||||
/// parameterised volume.
|
||||
/// and then divided into 200 segments perpendicular to z axis using nested
|
||||
/// parameterised volume.
|
||||
/// These values are defined at constructor,
|
||||
/// e.g. the size of water phantom (fPhantomSize), and number of segmentation
|
||||
/// of water phantom (fNx, fNy, fNz).
|
||||
///
|
||||
/// By default, lead plates are inserted into the position of even order
|
||||
/// By default, lead plates are inserted into the position of even order
|
||||
/// segments.
|
||||
/// NIST database is used for materials.
|
||||
///
|
||||
///
|
||||
/// [Scorer]
|
||||
/// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer
|
||||
/// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer
|
||||
/// is demonstrated in this example.
|
||||
/// -------------------------------------------------
|
||||
/// The collection names of defined Primitives are
|
||||
/// 0 PhantomSD/totalEDep
|
||||
/// 0 PhantomSD/totalEDep
|
||||
/// 1 PhantomSD/protonEDep
|
||||
/// 2 PhantomSD/protonNStep
|
||||
/// 3 PhantomSD/chargedPassCellFlux
|
||||
/// 4 PhantomSD/chargedCellFlux
|
||||
/// 5 PhantomSD/chargedSurfFlux
|
||||
/// 4 PhantomSD/chargedCellFlux
|
||||
/// 5 PhantomSD/chargedSurfFlux
|
||||
/// 6 PhantomSD/gammaSurfCurr000
|
||||
/// 7 PhantomSD/gammaSurfCurr001
|
||||
/// 9 PhantomSD/gammaSurdCurr002
|
||||
@@ -94,10 +94,10 @@ class G4Material;
|
||||
/// - const G4ThreeVector& GetPhantomSize() const
|
||||
/// gets the water phantom size
|
||||
///
|
||||
/// - void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
|
||||
/// - void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
|
||||
/// sets the number of segments of the water phantom
|
||||
///
|
||||
/// - void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz)
|
||||
/// - void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz)
|
||||
/// gets the number of segments of the water phantom
|
||||
///
|
||||
/// - void SetLeadSegment(G4bool flag=TRUE)
|
||||
@@ -109,36 +109,43 @@ class G4Material;
|
||||
//
|
||||
class RE02DetectorConstruction : public G4VUserDetectorConstruction
|
||||
{
|
||||
public:
|
||||
// constructor and destructor.
|
||||
RE02DetectorConstruction();
|
||||
virtual ~RE02DetectorConstruction();
|
||||
public:
|
||||
// constructor and destructor.
|
||||
RE02DetectorConstruction();
|
||||
virtual ~RE02DetectorConstruction();
|
||||
|
||||
public:
|
||||
// virtual method from G4VUserDetectorConstruction.
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
public:
|
||||
// virtual method from G4VUserDetectorConstruction.
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
public:
|
||||
// Get/Set Access methods for data members
|
||||
// Size of Whater Phantom
|
||||
void SetPhantomSize(G4ThreeVector size) { fPhantomSize=size; }
|
||||
const G4ThreeVector& GetPhantomSize() const { return fPhantomSize; }
|
||||
// Number of segments of water phantom
|
||||
void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
|
||||
{ fNx=nx; fNy=ny; fNz=nz; }
|
||||
void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz)
|
||||
const{ nx=fNx; ny = fNy; nz = fNz; }
|
||||
// Insert Lead plate in water or simple homogeneous water phantom
|
||||
void SetLeadSegment(G4bool flag=TRUE){ fInsertLead = flag; }
|
||||
G4bool IsLeadSegment(){ return fInsertLead; }
|
||||
|
||||
private:
|
||||
// Data members
|
||||
G4ThreeVector fPhantomSize; // Size of Water Phantom
|
||||
G4int fNx,fNy,fNz; // Number of segmentation of water phantom.
|
||||
G4bool fInsertLead; // Flag for inserting lead plate in water phantom
|
||||
G4LogicalVolume* fLVPhantomSens;
|
||||
public:
|
||||
// Get/Set Access methods for data members
|
||||
// Size of Whater Phantom
|
||||
void SetPhantomSize(G4ThreeVector size) { fPhantomSize = size; }
|
||||
const G4ThreeVector& GetPhantomSize() const { return fPhantomSize; }
|
||||
// Number of segments of water phantom
|
||||
void SetNumberOfSegmentsInPhantom(G4int nx, G4int ny, G4int nz)
|
||||
{
|
||||
fNx = nx;
|
||||
fNy = ny;
|
||||
fNz = nz;
|
||||
}
|
||||
void GetNumberOfSegmentsInPhantom(G4int& nx, G4int& ny, G4int& nz) const
|
||||
{
|
||||
nx = fNx;
|
||||
ny = fNy;
|
||||
nz = fNz;
|
||||
}
|
||||
// Insert Lead plate in water or simple homogeneous water phantom
|
||||
void SetLeadSegment(G4bool flag = TRUE) { fInsertLead = flag; }
|
||||
G4bool IsLeadSegment() { return fInsertLead; }
|
||||
|
||||
private:
|
||||
// Data members
|
||||
G4ThreeVector fPhantomSize; // Size of Water Phantom
|
||||
G4int fNx, fNy, fNz; // Number of segmentation of water phantom.
|
||||
G4bool fInsertLead; // Flag for inserting lead plate in water phantom
|
||||
G4LogicalVolume* fLVPhantomSens;
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef RE02EventAction_h
|
||||
#define RE02EventAction_h 1
|
||||
|
||||
@@ -47,17 +47,15 @@ class G4Event;
|
||||
//
|
||||
class RE02EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
RE02EventAction();
|
||||
~RE02EventAction();
|
||||
public:
|
||||
RE02EventAction();
|
||||
~RE02EventAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -31,10 +31,11 @@
|
||||
#ifndef RE02NESTEDPARAMETERISATION_HH
|
||||
#define RE02NESTEDPARAMETERISATION_HH
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VNestedParameterisation.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VNestedParameterisation.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
@@ -82,88 +83,67 @@ class G4Hype;
|
||||
/// according to copyNo
|
||||
/// Its position is defined as G4ThreeVector(0.,0.,fpZ[copyNo]).
|
||||
///
|
||||
/// - void ComputeDimensions(G4Box &, const G4int,
|
||||
/// - void ComputeDimensions(G4Box &, const G4int,
|
||||
/// const G4VPhysicalVolume *) const
|
||||
/// returns dimensions of this parameterized volume with the physical
|
||||
/// returns dimensions of this parameterized volume with the physical
|
||||
/// volume of the 3rd argument.
|
||||
///
|
||||
//
|
||||
class RE02NestedPhantomParameterisation: public G4VNestedParameterisation
|
||||
class RE02NestedPhantomParameterisation : public G4VNestedParameterisation
|
||||
{
|
||||
public: // with description
|
||||
|
||||
RE02NestedPhantomParameterisation(const G4ThreeVector& voxelSize,
|
||||
G4int nz,
|
||||
RE02NestedPhantomParameterisation(const G4ThreeVector& voxelSize, G4int nz,
|
||||
std::vector<G4Material*>& mat);
|
||||
~RE02NestedPhantomParameterisation();
|
||||
~RE02NestedPhantomParameterisation();
|
||||
|
||||
// Methods required in derived classes
|
||||
// -----------------------------------
|
||||
G4Material* ComputeMaterial(G4VPhysicalVolume *currentVol,
|
||||
const G4int repNo,
|
||||
const G4VTouchable *parentTouch=0
|
||||
);
|
||||
// Required method, as it is the reason for this class.
|
||||
// Must cope with parentTouch=0 for navigator's SetupHierarchy
|
||||
G4Material* ComputeMaterial(G4VPhysicalVolume* currentVol, const G4int repNo,
|
||||
const G4VTouchable* parentTouch = 0);
|
||||
// Required method, as it is the reason for this class.
|
||||
// Must cope with parentTouch=0 for navigator's SetupHierarchy
|
||||
|
||||
G4int GetNumberOfMaterials() const;
|
||||
G4int GetNumberOfMaterials() const;
|
||||
G4Material* GetMaterial(G4int idx) const;
|
||||
// Needed to define materials for instances of Nested Parameterisation
|
||||
// Current convention: each call should return the materials
|
||||
// of all instances with the same mother/ancestor volume.
|
||||
// Needed to define materials for instances of Nested Parameterisation
|
||||
// Current convention: each call should return the materials
|
||||
// of all instances with the same mother/ancestor volume.
|
||||
|
||||
void ComputeTransformation(const G4int no,
|
||||
G4VPhysicalVolume *currentPV) const;
|
||||
void ComputeTransformation(const G4int no, G4VPhysicalVolume* currentPV) const;
|
||||
|
||||
// Methods optional in derived classes
|
||||
// -----------------------------------
|
||||
|
||||
// Additional standard Parameterisation methods,
|
||||
// Additional standard Parameterisation methods,
|
||||
// which can be optionally defined, in case solid is used.
|
||||
|
||||
void ComputeDimensions(G4Box &,
|
||||
const G4int,
|
||||
const G4VPhysicalVolume *) const;
|
||||
void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) 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(G4Orb&, 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(G4Tubs&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
// G4Material* ComputeMaterial(const G4int repNo,
|
||||
// G4VPhysicalVolume* currentVol,
|
||||
// const G4VTouchable* parentTouch)
|
||||
// { return ComputeMaterial( currentVol, repNo, parentTouch ); }
|
||||
using G4VNestedParameterisation::ComputeMaterial;
|
||||
|
||||
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 (G4Orb&,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 (G4Tubs&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
// G4Material* ComputeMaterial(const G4int repNo,
|
||||
// G4VPhysicalVolume* currentVol,
|
||||
// const G4VTouchable* parentTouch)
|
||||
// { return ComputeMaterial( currentVol, repNo, parentTouch ); }
|
||||
using G4VNestedParameterisation::ComputeMaterial;
|
||||
|
||||
private:
|
||||
|
||||
G4double fdX,fdY,fdZ;
|
||||
G4int fNz;
|
||||
//
|
||||
std::vector<G4double> fpZ;
|
||||
std::vector<G4Material*> fMat;
|
||||
private:
|
||||
G4double fdX, fdY, fdZ;
|
||||
G4int fNz;
|
||||
//
|
||||
std::vector<G4double> fpZ;
|
||||
std::vector<G4Material*> fMat;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,20 +48,19 @@
|
||||
///
|
||||
///
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class RE02PSCellFlux : public G4PSCellFlux
|
||||
{
|
||||
public: // with description
|
||||
RE02PSCellFlux(G4String name,G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSCellFlux();
|
||||
public: // with description
|
||||
RE02PSCellFlux(G4String name, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSCellFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -37,20 +37,19 @@
|
||||
// (Description)
|
||||
// This is a primitive scorer class for scoring energy deposit.
|
||||
//
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura
|
||||
// Created: 2005-11-14 Tsukasa ASO, Akinori Kimura
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class RE02PSEnergyDeposit : public G4PSEnergyDeposit
|
||||
{
|
||||
public: // with description
|
||||
RE02PSEnergyDeposit(G4String name,G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSEnergyDeposit();
|
||||
public: // with description
|
||||
RE02PSEnergyDeposit(G4String name, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSEnergyDeposit();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,16 +54,14 @@
|
||||
|
||||
class RE02PSFlatSurfaceCurrent : public G4PSFlatSurfaceCurrent
|
||||
{
|
||||
public: // with description
|
||||
RE02PSFlatSurfaceCurrent(G4String name, G4int direction,
|
||||
G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSFlatSurfaceCurrent();
|
||||
public: // with description
|
||||
RE02PSFlatSurfaceCurrent(G4String name, G4int direction, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSFlatSurfaceCurrent();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -57,16 +57,14 @@
|
||||
|
||||
class RE02PSFlatSurfaceFlux : public G4PSFlatSurfaceFlux
|
||||
{
|
||||
public: // with description
|
||||
RE02PSFlatSurfaceFlux(G4String name, G4int direction,
|
||||
G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSFlatSurfaceFlux();
|
||||
public: // with description
|
||||
RE02PSFlatSurfaceFlux(G4String name, G4int direction, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSFlatSurfaceFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -43,15 +43,14 @@
|
||||
|
||||
class RE02PSNofStep : public G4PSNofStep
|
||||
{
|
||||
public: // with description
|
||||
RE02PSNofStep(G4String name,G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSNofStep();
|
||||
public: // with description
|
||||
RE02PSNofStep(G4String name, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSNofStep();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
@@ -48,16 +48,15 @@
|
||||
|
||||
class RE02PSPassageCellFlux : public G4PSPassageCellFlux
|
||||
{
|
||||
public: // with description
|
||||
RE02PSPassageCellFlux(G4String name,G4int nx,G4int ny, G4int nz);
|
||||
virtual ~RE02PSPassageCellFlux();
|
||||
public: // with description
|
||||
RE02PSPassageCellFlux(G4String name, G4int nx, G4int ny, G4int nz);
|
||||
virtual ~RE02PSPassageCellFlux();
|
||||
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
protected: // with description
|
||||
virtual G4int GetIndex(G4Step*);
|
||||
|
||||
private:
|
||||
G4int fNx, fNy, fNz;
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#ifndef RE02PrimaryGeneratorAction_h
|
||||
#define RE02PrimaryGeneratorAction_h 1
|
||||
|
||||
@@ -43,26 +43,24 @@ class G4Event;
|
||||
/// User primary particle generator class
|
||||
///
|
||||
/// - void GeneratePrimaries(G4Event*)
|
||||
/// an incident particle is proton with 150 MeV energy at the position
|
||||
/// an incident particle is proton with 150 MeV energy at the position
|
||||
/// (x,y,-100 cm) toward the (0,0,1) direction. The x and y positions are
|
||||
/// uniformly varied from -5 mm to 5 mm, respectively.
|
||||
//
|
||||
class RE02PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
RE02PrimaryGeneratorAction();
|
||||
~RE02PrimaryGeneratorAction();
|
||||
RE02PrimaryGeneratorAction();
|
||||
~RE02PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
private:
|
||||
G4double fSigmaPosition; // Initial beam spot size in x-y plane.
|
||||
G4double fSigmaPosition; // Initial beam spot size in x-y plane.
|
||||
G4ParticleGun* fParticleGun;
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -27,24 +27,24 @@
|
||||
/// \brief Definition of the RE02Run class
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef RE02Run_h
|
||||
#define RE02Run_h 1
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4Event.hh"
|
||||
|
||||
#include "G4Run.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
/// User run class
|
||||
///
|
||||
/// (Description)
|
||||
/// An example implementation for the multi-functional-detector and
|
||||
/// (Description)
|
||||
/// An example implementation for the multi-functional-detector and
|
||||
/// primitive scorers.
|
||||
/// This RE02Run class has collections which accumulate event information
|
||||
/// This RE02Run class has collections which accumulate event information
|
||||
/// into run information.
|
||||
///
|
||||
/// - constructor
|
||||
@@ -60,7 +60,7 @@
|
||||
/// - G4THitsMap<G4double>* GetHitsMap(G4int i)
|
||||
/// gets a run HitsMap of the i-th primitive scorer
|
||||
///
|
||||
/// - G4THitsMap<G4double>* GetHitsMap(const G4String& detName,
|
||||
/// - G4THitsMap<G4double>* GetHitsMap(const G4String& detName,
|
||||
/// const G4String& colName)
|
||||
/// gets a run HitsMap with the detName and the colName
|
||||
///
|
||||
@@ -71,39 +71,38 @@
|
||||
/// shows all HitsMap information of this run.
|
||||
/// This method calls G4THisMap::PrintAll() for individual HitsMap.
|
||||
//---------------------------------------------------------------------
|
||||
class RE02Run : public G4Run {
|
||||
class RE02Run : public G4Run
|
||||
{
|
||||
public:
|
||||
// constructor and destructor.
|
||||
// vector of multifunctionaldetector name has to given to constructor.
|
||||
RE02Run(const std::vector<G4String> mfdName);
|
||||
virtual ~RE02Run();
|
||||
|
||||
public:
|
||||
// constructor and destructor.
|
||||
// vector of multifunctionaldetector name has to given to constructor.
|
||||
RE02Run(const std::vector<G4String> mfdName);
|
||||
virtual ~RE02Run();
|
||||
public:
|
||||
// virtual method from G4Run.
|
||||
// The method is overriden in this class for scoring.
|
||||
virtual void RecordEvent(const G4Event*);
|
||||
virtual void Merge(const G4Run*);
|
||||
|
||||
public:
|
||||
// virtual method from G4Run.
|
||||
// The method is overriden in this class for scoring.
|
||||
virtual void RecordEvent(const G4Event*);
|
||||
virtual void Merge(const G4Run*);
|
||||
// Access methods for scoring information.
|
||||
// - Number of HitsMap for this RUN.
|
||||
// This is equal to number of collections.
|
||||
G4int GetNumberOfHitsMap() const { return fRunMap.size(); }
|
||||
// - Get HitsMap of this RUN.
|
||||
// by sequential number, by multifucntional name and collection name,
|
||||
// and by collection name with full path.
|
||||
G4THitsMap<G4double>* GetHitsMap(G4int i) { return fRunMap[i]; }
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& detName, const G4String& colName);
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& fullName);
|
||||
// - Dump All HitsMap of this RUN.
|
||||
// This method calls G4THisMap::PrintAll() for individual HitsMap.
|
||||
void DumpAllScorer();
|
||||
|
||||
// Access methods for scoring information.
|
||||
// - Number of HitsMap for this RUN.
|
||||
// This is equal to number of collections.
|
||||
G4int GetNumberOfHitsMap() const {return fRunMap.size();}
|
||||
// - Get HitsMap of this RUN.
|
||||
// by sequential number, by multifucntional name and collection name,
|
||||
// and by collection name with full path.
|
||||
G4THitsMap<G4double>* GetHitsMap(G4int i){return fRunMap[i];}
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& detName,
|
||||
const G4String& colName);
|
||||
G4THitsMap<G4double>* GetHitsMap(const G4String& fullName);
|
||||
// - Dump All HitsMap of this RUN.
|
||||
// This method calls G4THisMap::PrintAll() for individual HitsMap.
|
||||
void DumpAllScorer();
|
||||
|
||||
private:
|
||||
std::vector<G4String> fCollName;
|
||||
std::vector<G4int> fCollID;
|
||||
std::vector<G4THitsMap<G4double>*> fRunMap;
|
||||
private:
|
||||
std::vector<G4String> fCollName;
|
||||
std::vector<G4int> fCollID;
|
||||
std::vector<G4THitsMap<G4double>*> fRunMap;
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
/// \brief Definition of the RE02RunAction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef RE02RunAction_h
|
||||
@@ -36,13 +36,14 @@
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4Run;
|
||||
|
||||
//=======================================================================
|
||||
// RE02RunAction
|
||||
//
|
||||
//
|
||||
// Generate Run object and Dumping Run summary.
|
||||
//
|
||||
// T.Aso Created. 2007.Nov.
|
||||
@@ -55,7 +56,7 @@ class G4Run;
|
||||
/// instanciates a run of RE02Run with a sensitive detector name
|
||||
///
|
||||
/// - void BeginOfRunAction(const G4Run*)
|
||||
/// shows the run number
|
||||
/// shows the run number
|
||||
///
|
||||
/// - void EndOfRunAction(const G4Run*)
|
||||
/// shows accumulated information of primitive scorers and
|
||||
@@ -67,38 +68,31 @@ class G4Run;
|
||||
//
|
||||
class RE02RunAction : public G4UserRunAction
|
||||
{
|
||||
public:
|
||||
// constructor and destructor
|
||||
RE02RunAction();
|
||||
virtual ~RE02RunAction();
|
||||
public:
|
||||
// constructor and destructor
|
||||
RE02RunAction();
|
||||
virtual ~RE02RunAction();
|
||||
|
||||
public:
|
||||
// virtual method from G4UserRunAction.
|
||||
virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
public:
|
||||
// virtual method from G4UserRunAction.
|
||||
virtual G4Run* GenerateRun();
|
||||
virtual void BeginOfRunAction(const G4Run*);
|
||||
virtual void EndOfRunAction(const G4Run*);
|
||||
|
||||
public:
|
||||
// Utility method for converting segment number of
|
||||
// water phantom to copyNo of HitsMap.
|
||||
G4int CopyNo(G4int ix, G4int iy, G4int iz)
|
||||
{ return (iy*(fNx*fNz)+ix*fNz+iz); }
|
||||
public:
|
||||
// Utility method for converting segment number of
|
||||
// water phantom to copyNo of HitsMap.
|
||||
G4int CopyNo(G4int ix, G4int iy, G4int iz) { return (iy * (fNx * fNz) + ix * fNz + iz); }
|
||||
|
||||
private:
|
||||
// Data member
|
||||
// - vector of MultiFunctionalDetecor names.
|
||||
std::vector<G4String> fSDName;
|
||||
|
||||
// for conversion of sengment number to copyNo.
|
||||
G4int fNx, fNy, fNz;
|
||||
private:
|
||||
// Data member
|
||||
// - vector of MultiFunctionalDetecor names.
|
||||
std::vector<G4String> fSDName;
|
||||
|
||||
// for conversion of sengment number to copyNo.
|
||||
G4int fNx, fNy, fNz;
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-patch-02 (21-June-2024)
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -54,14 +54,21 @@ Registered graphics systems are:
|
||||
RayTracerX (RayTracerX)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
- by argument in the construction of G4VisExecutive
|
||||
- by environment variable "G4VIS_DEFAULT_DRIVER"
|
||||
- by entry in "~/.g4session"
|
||||
- by build flags.
|
||||
- Note: This feature is not allowed in batch mode.
|
||||
For further information see "examples/basic/B1/exampleB1.cc"
|
||||
and "vis.mac".
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -211,6 +218,15 @@ gamma
|
||||
/gun/energy 356. keV
|
||||
#
|
||||
/gun/position 0 0 -100. cm
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
*** G4Exception : Event0401
|
||||
issued by : G4VPrimaryGenerator::SetParticlePosition
|
||||
Invalid vertex position ((0,0,-1000)). Position MUST be located -inside- the world volume.
|
||||
Gun position has NOT been changed!
|
||||
*** This is just a warning message. ***
|
||||
-------- WWWW -------- G4Exception-END --------- WWWW -------
|
||||
|
||||
/gun/direction 0 0 1
|
||||
#
|
||||
/run/beamOn 10
|
||||
@@ -357,7 +373,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
annihil: for e+ XStype:2 SubType=5 AtRestModel:Simple BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -925,7 +941,7 @@ Min energy per nucleon for multifragmentation 200 GeV
|
||||
Limit excitation energy for Fermi BreakUp 20 MeV
|
||||
Level density (1/MeV) 0.075
|
||||
Use simple level density model 1
|
||||
Use discrete excitation energy of the residual 1
|
||||
Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
@@ -1354,7 +1370,7 @@ Step# X(mm) Y(mm) Z(mm) KinE(MeV) dE(MeV) StepLeng TrackLeng NextVolu
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10
|
||||
User=0.000000s Real=0.002538s Sys=0.000000s
|
||||
User=0.000000s Real=0.002727s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,totalEDep
|
||||
Number of entries 10
|
||||
PrimitiveScorer RUN PhantomSD,protonEDep
|
||||
@@ -1584,11 +1600,12 @@ Run Summary
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
UserPhysicsList deleted.
|
||||
UserActionInitialization deleted.
|
||||
UserWorkerInitialization deleted.
|
||||
UserWorkerThreadInitialization deleted.
|
||||
Deleting G4Run (id:0)
|
||||
UserDetectorConstruction deleted 0x247d9b0
|
||||
UserPhysicsList deleted 0x247da20
|
||||
UserActionInitialization deleted 0x268e340
|
||||
UserWorkerInitialization deleted 0
|
||||
UserWorkerThreadInitialization deleted 0
|
||||
UserRunAction deleted.
|
||||
UserPrimaryGenerator deleted.
|
||||
RunManager is deleting RunManagerKernel.
|
||||
@@ -1602,8 +1619,6 @@ G4RNGHelper object is deleted.
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.00673 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.00192 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.0192 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.00961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
@@ -1611,8 +1626,8 @@ Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.00385 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.048 MB
|
||||
Number of memory pools allocated: 10 of which, static: 0
|
||||
Dynamic pools deleted: 10 / Total memory freed: 0.019 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-patch-02 (21-June-2024)
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -54,14 +54,21 @@ Registered graphics systems are:
|
||||
RayTracerX (RayTracerX)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
- by argument in the construction of G4VisExecutive
|
||||
- by environment variable "G4VIS_DEFAULT_DRIVER"
|
||||
- by entry in "~/.g4session"
|
||||
- by build flags.
|
||||
- Note: This feature is not allowed in batch mode.
|
||||
For further information see "examples/basic/B1/exampleB1.cc"
|
||||
and "vis.mac".
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -209,6 +216,15 @@ gamma
|
||||
/gun/energy 30. MeV
|
||||
#
|
||||
/gun/position 0 0 -100 cm
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
*** G4Exception : Event0401
|
||||
issued by : G4VPrimaryGenerator::SetParticlePosition
|
||||
Invalid vertex position ((0,0,-1000)). Position MUST be located -inside- the world volume.
|
||||
Gun position has NOT been changed!
|
||||
*** This is just a warning message. ***
|
||||
-------- WWWW -------- G4Exception-END --------- WWWW -------
|
||||
|
||||
/gun/direction 0 0 1
|
||||
#
|
||||
/run/beamOn 10000
|
||||
@@ -355,7 +371,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
annihil: for e+ XStype:2 SubType=5 AtRestModel:Simple BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -923,7 +939,7 @@ Min energy per nucleon for multifragmentation 200 GeV
|
||||
Limit excitation energy for Fermi BreakUp 20 MeV
|
||||
Level density (1/MeV) 0.075
|
||||
Use simple level density model 1
|
||||
Use discrete excitation energy of the residual 1
|
||||
Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
@@ -1034,124 +1050,124 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=10.780000s Real=12.159889s Sys=0.050000s
|
||||
User=10.060000s Real=10.389782s Sys=0.030000s
|
||||
PrimitiveScorer RUN PhantomSD,totalEDep
|
||||
Number of entries 52027
|
||||
Number of entries 51910
|
||||
PrimitiveScorer RUN PhantomSD,protonEDep
|
||||
Number of entries 31
|
||||
Number of entries 18
|
||||
PrimitiveScorer RUN PhantomSD,protonNStep
|
||||
Number of entries 31
|
||||
Number of entries 18
|
||||
PrimitiveScorer RUN PhantomSD,chargedPassCellFlux
|
||||
Number of entries 20657
|
||||
Number of entries 20357
|
||||
PrimitiveScorer RUN PhantomSD,chargedCellFlux
|
||||
Number of entries 51831
|
||||
Number of entries 51696
|
||||
PrimitiveScorer RUN PhantomSD,chargedSurfFlux
|
||||
Number of entries 11958
|
||||
Number of entries 12007
|
||||
PrimitiveScorer RUN PhantomSD,gammaSurfCurr000
|
||||
Number of entries 31
|
||||
Number of entries 26
|
||||
PrimitiveScorer RUN PhantomSD,gammaSurfCurr001
|
||||
Number of entries 349
|
||||
Number of entries 335
|
||||
PrimitiveScorer RUN PhantomSD,gammaSurfCurr002
|
||||
Number of entries 50713
|
||||
Number of entries 51536
|
||||
PrimitiveScorer RUN PhantomSD,gammaSurfCurr003
|
||||
Number of entries 72315
|
||||
Number of entries 72382
|
||||
=============================================================
|
||||
Number of event processed : 10000
|
||||
=============================================================
|
||||
#Z Cell# totalEDep protonEDep protonNStep chargedPassCellFlux chargedCellFlux chargedSurfFlux gammaSurfCurr000 gammaSurfCurr001 gammaSurfCurr002 gammaSurfCurr003
|
||||
0 44.386 MeV 0 eV 0 2864.82 /cm2 3018.04 /cm2 2372.6 /cm2 0 /cm2 25 /cm2 525 /cm2 300 /cm2
|
||||
1 515.569 MeV 0 eV 0 3520.71 /cm2 4829.25 /cm2 415766 /cm2 0 /cm2 75 /cm2 1175 /cm2 675 /cm2
|
||||
2 56.7764 MeV 0 eV 0 3604.73 /cm2 3915.16 /cm2 7315.55 /cm2 0 /cm2 0 /cm2 3375 /cm2 3900 /cm2
|
||||
3 290.932 MeV 0 eV 0 1721.66 /cm2 2720.68 /cm2 4333.46 /cm2 0 /cm2 25 /cm2 3775 /cm2 3650 /cm2
|
||||
4 19.8145 MeV 0 eV 0 1185.08 /cm2 1352.58 /cm2 2323.47 /cm2 0 /cm2 0 /cm2 2950 /cm2 3775 /cm2
|
||||
5 102.578 MeV 0 eV 0 229.567 /cm2 953.196 /cm2 1526.8 /cm2 0 /cm2 0 /cm2 2250 /cm2 3100 /cm2
|
||||
6 7.86254 MeV 0 eV 0 468.151 /cm2 549.581 /cm2 654.286 /cm2 0 /cm2 0 /cm2 2075 /cm2 2650 /cm2
|
||||
7 44.8579 MeV 0 eV 0 73.8981 /cm2 411.001 /cm2 1089.25 /cm2 0 /cm2 0 /cm2 1825 /cm2 2750 /cm2
|
||||
8 2.88322 MeV 0 eV 0 45.1992 /cm2 150.994 /cm2 151.94 /cm2 0 /cm2 0 /cm2 1250 /cm2 2500 /cm2
|
||||
9 36.1381 MeV 0 eV 0 121.287 /cm2 311.86 /cm2 389.103 /cm2 0 /cm2 0 /cm2 875 /cm2 1925 /cm2
|
||||
10 2.91052 MeV 0 eV 0 157.833 /cm2 178.921 /cm2 232.874 /cm2 0 /cm2 0 /cm2 925 /cm2 1625 /cm2
|
||||
11 17.9066 MeV 0 eV 0 24.8926 /cm2 163.363 /cm2 165.055 /cm2 0 /cm2 0 /cm2 650 /cm2 1450 /cm2
|
||||
12 1.59431 MeV 0 eV 0 103.174 /cm2 119.835 /cm2 78.6724 /cm2 0 /cm2 0 /cm2 475 /cm2 1100 /cm2
|
||||
13 18.6114 MeV 0 eV 0 15.9593 /cm2 165.464 /cm2 1172.54 /cm2 0 /cm2 0 /cm2 225 /cm2 1075 /cm2
|
||||
14 2.90419 MeV 0 eV 0 129.487 /cm2 184.259 /cm2 104.245 /cm2 0 /cm2 25 /cm2 300 /cm2 1100 /cm2
|
||||
15 10.6198 MeV 0 eV 0 21.5993 /cm2 81.4308 /cm2 222.427 /cm2 0 /cm2 0 /cm2 400 /cm2 950 /cm2
|
||||
16 1.09779 MeV 0 eV 0 75.416 /cm2 76.0432 /cm2 60.4938 /cm2 0 /cm2 0 /cm2 400 /cm2 775 /cm2
|
||||
17 11.3059 MeV 0 eV 0 72.6344 /cm2 111.529 /cm2 51.6244 /cm2 0 /cm2 0 /cm2 175 /cm2 625 /cm2
|
||||
18 779.377 keV 0 eV 0 27.0639 /cm2 42.7092 /cm2 129.45 /cm2 0 /cm2 0 /cm2 100 /cm2 450 /cm2
|
||||
19 11.927 MeV 0 eV 0 6.79688 /cm2 101.403 /cm2 38.2673 /cm2 0 /cm2 0 /cm2 100 /cm2 575 /cm2
|
||||
20 280.605 keV 0 eV 0 15.2339 /cm2 15.2339 /cm2 0 /cm2 0 /cm2 0 /cm2 75 /cm2 475 /cm2
|
||||
21 5.83575 MeV 0 eV 0 0 /cm2 55.0113 /cm2 0 /cm2 0 /cm2 0 /cm2 225 /cm2 400 /cm2
|
||||
22 491.304 keV 0 eV 0 5.491 /cm2 29.1653 /cm2 0 /cm2 0 /cm2 0 /cm2 125 /cm2 250 /cm2
|
||||
23 6.60744 MeV 0 eV 0 0.416297 /cm2 48.5831 /cm2 362.44 /cm2 0 /cm2 0 /cm2 150 /cm2 250 /cm2
|
||||
24 937.689 keV 0 eV 0 46.4278 /cm2 61.4511 /cm2 0 /cm2 0 /cm2 0 /cm2 300 /cm2 150 /cm2
|
||||
25 3.15325 MeV 0 eV 0 5.57218 /cm2 28.9431 /cm2 27.5931 /cm2 0 /cm2 0 /cm2 150 /cm2 150 /cm2
|
||||
26 671.931 keV 0 eV 0 53.913 /cm2 53.9166 /cm2 110.713 /cm2 0 /cm2 0 /cm2 150 /cm2 150 /cm2
|
||||
27 1.3406 MeV 0 eV 0 5.14124 /cm2 12.4285 /cm2 27.1077 /cm2 0 /cm2 0 /cm2 175 /cm2 225 /cm2
|
||||
28 23.9282 keV 0 eV 0 2.90245 /cm2 2.90245 /cm2 0 /cm2 0 /cm2 0 /cm2 125 /cm2 225 /cm2
|
||||
29 970.405 keV 0 eV 0 5.89056 /cm2 9.18227 /cm2 32.656 /cm2 0 /cm2 0 /cm2 75 /cm2 125 /cm2
|
||||
30 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 175 /cm2
|
||||
31 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 150 /cm2
|
||||
32 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 125 /cm2
|
||||
33 296.613 keV 0 eV 0 0.711623 /cm2 0.9259 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 100 /cm2
|
||||
34 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2 100 /cm2
|
||||
35 575.943 keV 0 eV 0 3.10075 /cm2 3.8622 /cm2 0 /cm2 0 /cm2 0 /cm2 75 /cm2 175 /cm2
|
||||
36 59.3084 keV 0 eV 0 3.61915 /cm2 3.61915 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2 175 /cm2
|
||||
37 242.955 keV 0 eV 0 0.161291 /cm2 0.873565 /cm2 78.4966 /cm2 0 /cm2 0 /cm2 50 /cm2 100 /cm2
|
||||
38 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
39 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
40 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
41 420.032 keV 0 eV 0 0 /cm2 3.00295 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
42 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
43 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
44 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
45 826.542 keV 0 eV 0 8.35001 /cm2 8.35001 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
46 521.356 keV 0 eV 0 30.9717 /cm2 33.3225 /cm2 36.5514 /cm2 0 /cm2 0 /cm2 25 /cm2 25 /cm2
|
||||
0 42.2327 MeV 0 eV 0 2913.37 /cm2 3046.65 /cm2 2441.59 /cm2 0 /cm2 0 /cm2 575 /cm2 275 /cm2
|
||||
1 521.973 MeV 0 eV 0 3659.68 /cm2 4931.24 /cm2 4491.65 /cm2 0 /cm2 50 /cm2 1575 /cm2 750 /cm2
|
||||
2 58.3239 MeV 0 eV 0 3667.74 /cm2 3967.82 /cm2 5509.12 /cm2 0 /cm2 0 /cm2 3775 /cm2 3350 /cm2
|
||||
3 303.959 MeV 0 eV 0 1660.32 /cm2 2855.69 /cm2 2944 /cm2 0 /cm2 0 /cm2 3525 /cm2 3075 /cm2
|
||||
4 28.3144 MeV 0 eV 0 1704.13 /cm2 1881.83 /cm2 3817.96 /cm2 0 /cm2 0 /cm2 3325 /cm2 3450 /cm2
|
||||
5 122.958 MeV 0 eV 0 571.062 /cm2 1126.25 /cm2 2443.75 /cm2 0 /cm2 50 /cm2 2550 /cm2 3050 /cm2
|
||||
6 9.51299 MeV 0 eV 0 543.698 /cm2 647.291 /cm2 470.587 /cm2 0 /cm2 0 /cm2 2350 /cm2 2950 /cm2
|
||||
7 67.5444 MeV 0 eV 0 228.732 /cm2 617.927 /cm2 763.297 /cm2 0 /cm2 25 /cm2 1925 /cm2 2750 /cm2
|
||||
8 5.97265 MeV 0 eV 0 329.553 /cm2 371.688 /cm2 773.819 /cm2 0 /cm2 0 /cm2 1500 /cm2 2100 /cm2
|
||||
9 61.3121 MeV 0 eV 0 103.418 /cm2 571.021 /cm2 329.328 /cm2 0 /cm2 0 /cm2 1175 /cm2 1950 /cm2
|
||||
10 4.4351 MeV 0 eV 0 149.576 /cm2 245.572 /cm2 694.391 /cm2 0 /cm2 0 /cm2 675 /cm2 1800 /cm2
|
||||
11 18.5561 MeV 0 eV 0 23.5878 /cm2 159.29 /cm2 151.702 /cm2 0 /cm2 0 /cm2 725 /cm2 1650 /cm2
|
||||
12 2.52666 MeV 0 eV 0 108.322 /cm2 168.5 /cm2 177.486 /cm2 0 /cm2 0 /cm2 650 /cm2 1450 /cm2
|
||||
13 27.429 MeV 0 eV 0 121.541 /cm2 272.004 /cm2 268.992 /cm2 0 /cm2 0 /cm2 375 /cm2 1375 /cm2
|
||||
14 3.5216 MeV 0 eV 0 190.821 /cm2 211.883 /cm2 186.624 /cm2 0 /cm2 0 /cm2 400 /cm2 1150 /cm2
|
||||
15 7.01702 MeV 0 eV 0 14.0926 /cm2 56.7483 /cm2 81.2818 /cm2 0 /cm2 0 /cm2 525 /cm2 1075 /cm2
|
||||
16 1.41876 MeV 0 eV 0 114.334 /cm2 114.334 /cm2 68.7782 /cm2 0 /cm2 0 /cm2 250 /cm2 675 /cm2
|
||||
17 12.1807 MeV 0 eV 0 37.7173 /cm2 115.282 /cm2 359.888 /cm2 0 /cm2 0 /cm2 250 /cm2 475 /cm2
|
||||
18 582.702 keV 0 eV 0 31.2308 /cm2 31.2308 /cm2 0 /cm2 0 /cm2 0 /cm2 175 /cm2 650 /cm2
|
||||
19 12.4225 MeV 0 eV 0 10.5381 /cm2 102.539 /cm2 870.813 /cm2 0 /cm2 0 /cm2 200 /cm2 475 /cm2
|
||||
20 2.84438 MeV 0 eV 0 148.005 /cm2 189.199 /cm2 68.1002 /cm2 0 /cm2 0 /cm2 350 /cm2 350 /cm2
|
||||
21 7.08656 MeV 0 eV 0 24.3932 /cm2 69.4336 /cm2 26.4078 /cm2 0 /cm2 0 /cm2 275 /cm2 375 /cm2
|
||||
22 1.49265 MeV 0 eV 0 33.7237 /cm2 88.3176 /cm2 26.1053 /cm2 0 /cm2 0 /cm2 200 /cm2 200 /cm2
|
||||
23 6.83995 MeV 0 eV 0 0 /cm2 59.3401 /cm2 0 /cm2 0 /cm2 0 /cm2 175 /cm2 200 /cm2
|
||||
24 229.495 keV 0 eV 0 0 /cm2 7.34187 /cm2 0 /cm2 0 /cm2 0 /cm2 100 /cm2 275 /cm2
|
||||
25 1.76602 MeV 0 eV 0 0 /cm2 10.27 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 275 /cm2
|
||||
26 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 175 /cm2
|
||||
27 1.03531 MeV 0 eV 0 1.09018 /cm2 8.32663 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2 150 /cm2
|
||||
28 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2 125 /cm2
|
||||
29 3.09284 MeV 0 eV 0 0 /cm2 27.7223 /cm2 0 /cm2 0 /cm2 0 /cm2 100 /cm2 75 /cm2
|
||||
30 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 75 /cm2
|
||||
31 320.013 keV 0 eV 0 0 /cm2 1.55202 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 175 /cm2
|
||||
32 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 150 /cm2
|
||||
33 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 50 /cm2
|
||||
34 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
35 323.595 keV 0 eV 0 0 /cm2 1.30391 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 25 /cm2
|
||||
36 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
37 281.255 keV 0 eV 0 0 /cm2 0.96567 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 50 /cm2
|
||||
38 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 75 /cm2
|
||||
39 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 25 /cm2
|
||||
40 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 25 /cm2
|
||||
41 273.795 keV 0 eV 0 0 /cm2 0.909026 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
42 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 25 /cm2
|
||||
43 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
44 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
45 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
46 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
47 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
48 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
49 2.01004 MeV 0 eV 0 0 /cm2 21.0106 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
50 972.411 keV 0 eV 0 46.7949 /cm2 60.8169 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
49 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
50 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
51 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
52 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 50 /cm2
|
||||
53 684.999 keV 0 eV 0 0 /cm2 5.23611 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
54 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
55 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
52 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2
|
||||
53 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
54 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
55 906.795 keV 0 eV 0 0 /cm2 6.90754 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
56 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
57 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
58 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
59 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
60 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
61 206.772 keV 0 eV 0 0 /cm2 0.450992 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
62 598.052 keV 0 eV 0 11.8606 /cm2 33.4972 /cm2 0 /cm2 0 /cm2 0 /cm2 50 /cm2 0 /cm2
|
||||
63 544.4 keV 0 eV 0 0 /cm2 4.44881 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
64 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
65 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
57 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
58 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
59 750.453 keV 0 eV 0 0 /cm2 6.44167 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
60 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
61 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
62 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
63 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
64 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
65 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
66 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
67 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
68 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
69 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
70 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
71 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
71 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2 0 /cm2
|
||||
72 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
73 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
74 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
75 770.854 keV 0 eV 0 0 /cm2 6.05763 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
74 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
75 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
76 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
77 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
78 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
79 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
80 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
81 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
82 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
83 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
84 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
85 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
86 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
87 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
88 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
89 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
90 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
91 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
92 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
77 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
78 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
79 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
80 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
81 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
82 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
83 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
84 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
85 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
86 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
87 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
88 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
89 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
90 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
91 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
92 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 25 /cm2
|
||||
93 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
94 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
95 0 eV 0 eV 0 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2 0 /cm2
|
||||
@@ -1264,11 +1280,12 @@ Run Summary
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
UserPhysicsList deleted.
|
||||
UserActionInitialization deleted.
|
||||
UserWorkerInitialization deleted.
|
||||
UserWorkerThreadInitialization deleted.
|
||||
Deleting G4Run (id:0)
|
||||
UserDetectorConstruction deleted 0x11839b0
|
||||
UserPhysicsList deleted 0x1183a20
|
||||
UserActionInitialization deleted 0x1394340
|
||||
UserWorkerInitialization deleted 0
|
||||
UserWorkerThreadInitialization deleted 0
|
||||
UserRunAction deleted.
|
||||
UserPrimaryGenerator deleted.
|
||||
RunManager is deleting RunManagerKernel.
|
||||
@@ -1276,25 +1293,23 @@ G4SDManager deleted.
|
||||
EventManager deleted.
|
||||
Units table cleared.
|
||||
TransportationManager deleted.
|
||||
Total navigation history collections cleaned: 19
|
||||
Total navigation history collections cleaned: 20
|
||||
G4RNGHelper object is deleted.
|
||||
================== Deleting memory pools ===================
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0279 MB
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.0298 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.0106 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.0192 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.00961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.00961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.0211 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00192 MB
|
||||
Pool ID '7G4Track', size : 0.0183 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.00288 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Pool ID '10G4Fragment', size : 0.000961 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.000961 MB
|
||||
Number of memory pools allocated: 14 of which, static: 0
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.098 MB
|
||||
Pool ID '10G4Fragment', size : 0.00192 MB
|
||||
Pool ID '17G4ReactionProduct', size : 0.00192 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.07 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-patch-02 (21-June-2024)
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -54,14 +54,21 @@ Registered graphics systems are:
|
||||
RayTracerX (RayTracerX)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
- by argument in the construction of G4VisExecutive
|
||||
- by environment variable "G4VIS_DEFAULT_DRIVER"
|
||||
- by entry in "~/.g4session"
|
||||
- by build flags.
|
||||
- Note: This feature is not allowed in batch mode.
|
||||
For further information see "examples/basic/B1/exampleB1.cc"
|
||||
and "vis.mac".
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -211,6 +218,15 @@ gamma
|
||||
#/gun/energy 356. keV
|
||||
#
|
||||
/gun/position 0 0 -100. cm
|
||||
|
||||
-------- WWWW ------- G4Exception-START -------- WWWW -------
|
||||
*** G4Exception : Event0401
|
||||
issued by : G4VPrimaryGenerator::SetParticlePosition
|
||||
Invalid vertex position ((0,0,-1000)). Position MUST be located -inside- the world volume.
|
||||
Gun position has NOT been changed!
|
||||
*** This is just a warning message. ***
|
||||
-------- WWWW -------- G4Exception-END --------- WWWW -------
|
||||
|
||||
/gun/direction 0 0 1
|
||||
#
|
||||
/run/beamOn 10000
|
||||
@@ -357,7 +373,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
annihil: for e+ XStype:2 SubType=5 AtRestModel:Simple BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -925,7 +941,7 @@ Min energy per nucleon for multifragmentation 200 GeV
|
||||
Limit excitation energy for Fermi BreakUp 20 MeV
|
||||
Level density (1/MeV) 0.075
|
||||
Use simple level density model 1
|
||||
Use discrete excitation energy of the residual 1
|
||||
Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
@@ -1036,7 +1052,7 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 10000
|
||||
User=0.150000s Real=0.155088s Sys=0.000000s
|
||||
User=0.160000s Real=0.164177s Sys=0.000000s
|
||||
PrimitiveScorer RUN PhantomSD,totalEDep
|
||||
Number of entries 81
|
||||
PrimitiveScorer RUN PhantomSD,protonEDep
|
||||
@@ -1266,11 +1282,12 @@ Run Summary
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
G4 kernel has come to Quit state.
|
||||
UserDetectorConstruction deleted.
|
||||
UserPhysicsList deleted.
|
||||
UserActionInitialization deleted.
|
||||
UserWorkerInitialization deleted.
|
||||
UserWorkerThreadInitialization deleted.
|
||||
Deleting G4Run (id:0)
|
||||
UserDetectorConstruction deleted 0x23c39b0
|
||||
UserPhysicsList deleted 0x23c3a20
|
||||
UserActionInitialization deleted 0x25d4340
|
||||
UserWorkerInitialization deleted 0
|
||||
UserWorkerThreadInitialization deleted 0
|
||||
UserRunAction deleted.
|
||||
UserPrimaryGenerator deleted.
|
||||
RunManager is deleting RunManagerKernel.
|
||||
@@ -1284,8 +1301,6 @@ G4RNGHelper object is deleted.
|
||||
Pool ID '20G4NavigationLevelRep', size : 0.00865 MB
|
||||
Pool ID '24G4ReferenceCountedHandleIvE', size : 0.000961 MB
|
||||
Pool ID '17G4DynamicParticle', size : 0.00192 MB
|
||||
Pool ID '16G4SmartVoxelNode', size : 0.0192 MB
|
||||
Pool ID '17G4SmartVoxelProxy', size : 0.00961 MB
|
||||
Pool ID '7G4Event', size : 0.000961 MB
|
||||
Pool ID '15G4PrimaryVertex', size : 0.000961 MB
|
||||
Pool ID '17G4PrimaryParticle', size : 0.000961 MB
|
||||
@@ -1293,8 +1308,8 @@ Pool ID '15G4HCofThisEvent', size : 0.000961 MB
|
||||
Pool ID '7G4Track', size : 0.00288 MB
|
||||
Pool ID '18G4TouchableHistory', size : 0.000961 MB
|
||||
Pool ID '15G4CountedObjectIvE', size : 0.000961 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.049 MB
|
||||
Number of memory pools allocated: 10 of which, static: 0
|
||||
Dynamic pools deleted: 10 / Total memory freed: 0.02 MB
|
||||
============================================================
|
||||
G4Allocator objects are deleted.
|
||||
UImanager deleted.
|
||||
|
||||
@@ -29,17 +29,22 @@
|
||||
//
|
||||
|
||||
#include "RE02ActionInitialization.hh"
|
||||
|
||||
#include "RE02EventAction.hh"
|
||||
#include "RE02PrimaryGeneratorAction.hh"
|
||||
#include "RE02RunAction.hh"
|
||||
#include "RE02EventAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02ActionInitialization::RE02ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02ActionInitialization::~RE02ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE02ActionInitialization::Build() const
|
||||
@@ -59,4 +64,3 @@ void RE02ActionInitialization::BuildForMaster() const
|
||||
G4UserRunAction* run_action = new RE02RunAction;
|
||||
SetUserAction(run_action);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,34 +28,30 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#include "RE02DetectorConstruction.hh"
|
||||
|
||||
#include "G4PSEnergyDeposit3D.hh"
|
||||
#include "G4PSNofStep3D.hh"
|
||||
#include "G4PSCellFlux3D.hh"
|
||||
#include "G4PSPassageCellFlux3D.hh"
|
||||
#include "G4PSFlatSurfaceFlux3D.hh"
|
||||
#include "G4PSFlatSurfaceCurrent3D.hh"
|
||||
|
||||
#include "G4SDParticleWithEnergyFilter.hh"
|
||||
#include "G4SDParticleFilter.hh"
|
||||
#include "G4SDChargedFilter.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "RE02NestedPhantomParameterisation.hh"
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PSCellFlux3D.hh"
|
||||
#include "G4PSEnergyDeposit3D.hh"
|
||||
#include "G4PSFlatSurfaceCurrent3D.hh"
|
||||
#include "G4PSFlatSurfaceFlux3D.hh"
|
||||
#include "G4PSNofStep3D.hh"
|
||||
#include "G4PSPassageCellFlux3D.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SDChargedFilter.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SDParticleFilter.hh"
|
||||
#include "G4SDParticleWithEnergyFilter.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//=======================================================================
|
||||
@@ -64,34 +60,34 @@
|
||||
// (Description)
|
||||
//
|
||||
// Detector construction for example RE02.
|
||||
//
|
||||
// [Geometry]
|
||||
//
|
||||
// [Geometry]
|
||||
// The world volume is defined as 200 cm x 200 cm x 200 cm box with Air.
|
||||
// Water phantom is defined as 200 mm x 200 mm x 400 mm box with Water.
|
||||
// The water phantom is divided into 100 segments in x,y plane using
|
||||
// replication,
|
||||
// and then divided into 200 segments perpendicular to z axis using nested
|
||||
// parameterised volume.
|
||||
// and then divided into 200 segments perpendicular to z axis using nested
|
||||
// parameterised volume.
|
||||
// These values are defined at constructor,
|
||||
// e.g. the size of water phantom (fPhantomSize), and number of segmentation
|
||||
// of water phantom (fNx, fNy, fNz).
|
||||
//
|
||||
// By default, lead plates are inserted into the position of even order
|
||||
// By default, lead plates are inserted into the position of even order
|
||||
// segments.
|
||||
// NIST database is used for materials.
|
||||
//
|
||||
//
|
||||
// [Scorer]
|
||||
// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer
|
||||
// Assignment of G4MultiFunctionalDetector and G4PrimitiveScorer
|
||||
// is demonstrated in this example.
|
||||
// -------------------------------------------------
|
||||
// The collection names of defined Primitives are
|
||||
// 0 PhantomSD/totalEDep
|
||||
// 0 PhantomSD/totalEDep
|
||||
// 1 PhantomSD/protonEDep
|
||||
// 2 PhantomSD/protonNStep
|
||||
// 3 PhantomSD/chargedPassCellFlux
|
||||
// 4 PhantomSD/chargedCellFlux
|
||||
// 5 PhantomSD/chargedSurfFlux
|
||||
// 4 PhantomSD/chargedCellFlux
|
||||
// 5 PhantomSD/chargedSurfFlux
|
||||
// 6 PhantomSD/gammaSurfCurr000
|
||||
// 7 PhantomSD/gammaSurfCurr001
|
||||
// 9 PhantomSD/gammaSurdCurr002
|
||||
@@ -102,34 +98,35 @@
|
||||
//=======================================================================
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02DetectorConstruction::RE02DetectorConstruction()
|
||||
: G4VUserDetectorConstruction()
|
||||
RE02DetectorConstruction::RE02DetectorConstruction() : G4VUserDetectorConstruction()
|
||||
{
|
||||
// Default size of water phantom,and segmentation.
|
||||
fPhantomSize.setX(200.*mm);
|
||||
fPhantomSize.setY(200.*mm);
|
||||
fPhantomSize.setZ(400.*mm);
|
||||
fNx = fNy = fNz = 100;
|
||||
fInsertLead = TRUE;
|
||||
fPhantomSize.setX(200. * mm);
|
||||
fPhantomSize.setY(200. * mm);
|
||||
fPhantomSize.setZ(400. * mm);
|
||||
fNx = fNy = fNz = 100;
|
||||
fInsertLead = TRUE;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02DetectorConstruction::~RE02DetectorConstruction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* RE02DetectorConstruction::Construct()
|
||||
G4VPhysicalVolume* RE02DetectorConstruction::Construct()
|
||||
{
|
||||
//=====================
|
||||
// Material Definitions
|
||||
//=====================
|
||||
//
|
||||
//
|
||||
//-------- NIST Materials ----------------------------------------------------
|
||||
// Material Information imported from NIST database.
|
||||
//
|
||||
G4NistManager* NISTman = G4NistManager::Instance();
|
||||
G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* water = NISTman->FindOrBuildMaterial("G4_WATER");
|
||||
G4Material* air = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* water = NISTman->FindOrBuildMaterial("G4_WATER");
|
||||
G4Material* lead = NISTman->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
//
|
||||
@@ -138,31 +135,29 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
|
||||
G4cout << *(G4Material::GetMaterialTable()) << G4endl;
|
||||
|
||||
//============================================================================
|
||||
// Definitions of Solids, Logical Volumes, Physical Volumes
|
||||
// Definitions of Solids, Logical Volumes, Physical Volumes
|
||||
//============================================================================
|
||||
|
||||
//-------------
|
||||
// World Volume
|
||||
// World Volume
|
||||
//-------------
|
||||
|
||||
G4ThreeVector worldSize = G4ThreeVector(200*cm, 200*cm, 200*cm);
|
||||
|
||||
G4Box * solidWorld
|
||||
= new G4Box("world", worldSize.x()/2., worldSize.y()/2., worldSize.z()/2.);
|
||||
G4LogicalVolume * logicWorld
|
||||
= new G4LogicalVolume(solidWorld, air, "World", 0, 0, 0);
|
||||
G4ThreeVector worldSize = G4ThreeVector(200 * cm, 200 * cm, 200 * cm);
|
||||
|
||||
//
|
||||
G4Box* solidWorld =
|
||||
new G4Box("world", worldSize.x() / 2., worldSize.y() / 2., worldSize.z() / 2.);
|
||||
G4LogicalVolume* logicWorld = new G4LogicalVolume(solidWorld, air, "World", 0, 0, 0);
|
||||
|
||||
//
|
||||
// Must place the World Physical volume unrotated at (0,0,0).
|
||||
G4VPhysicalVolume * physiWorld
|
||||
= new G4PVPlacement(0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
logicWorld, // its logical volume
|
||||
"World", // its name
|
||||
0, // its mother volume
|
||||
false, // no boolean operations
|
||||
0); // copy number
|
||||
|
||||
G4VPhysicalVolume* physiWorld = new G4PVPlacement(0, // no rotation
|
||||
G4ThreeVector(), // at (0,0,0)
|
||||
logicWorld, // its logical volume
|
||||
"World", // its name
|
||||
0, // its mother volume
|
||||
false, // no boolean operations
|
||||
0); // copy number
|
||||
|
||||
//---------------
|
||||
// Water Phantom
|
||||
//---------------
|
||||
@@ -172,36 +167,33 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
|
||||
//................................
|
||||
|
||||
//-- Default size of water phantom is defined at constructor.
|
||||
G4ThreeVector phantomSize = fPhantomSize;
|
||||
|
||||
G4Box * solidPhantom
|
||||
= new G4Box("phantom",
|
||||
phantomSize.x()/2., phantomSize.y()/2., phantomSize.z()/2.);
|
||||
G4LogicalVolume * logicPhantom
|
||||
= new G4LogicalVolume(solidPhantom, water, "Phantom", 0, 0, 0);
|
||||
G4ThreeVector phantomSize = fPhantomSize;
|
||||
|
||||
G4Box* solidPhantom =
|
||||
new G4Box("phantom", phantomSize.x() / 2., phantomSize.y() / 2., phantomSize.z() / 2.);
|
||||
G4LogicalVolume* logicPhantom = new G4LogicalVolume(solidPhantom, water, "Phantom", 0, 0, 0);
|
||||
|
||||
G4RotationMatrix* rot = new G4RotationMatrix();
|
||||
//rot->rotateY(30.*deg);
|
||||
// rot->rotateY(30.*deg);
|
||||
G4ThreeVector positionPhantom;
|
||||
//G4VPhysicalVolume * physiPhantom =
|
||||
new G4PVPlacement(rot, // no rotation
|
||||
positionPhantom, // at (x,y,z)
|
||||
logicPhantom, // its logical volume
|
||||
"Phantom", // its name
|
||||
logicWorld, // its mother volume
|
||||
false, // no boolean operations
|
||||
0); // copy number
|
||||
// G4VPhysicalVolume * physiPhantom =
|
||||
new G4PVPlacement(rot, // no rotation
|
||||
positionPhantom, // at (x,y,z)
|
||||
logicPhantom, // its logical volume
|
||||
"Phantom", // its name
|
||||
logicWorld, // its mother volume
|
||||
false, // no boolean operations
|
||||
0); // copy number
|
||||
|
||||
//..............................................
|
||||
// Phantom segmentation using Parameterisation
|
||||
//..............................................
|
||||
//
|
||||
G4cout << "<-- RE02DetectorConstruction::Construct-------" <<G4endl;
|
||||
G4cout << " Water Phantom Size " << fPhantomSize/mm << G4endl;
|
||||
G4cout << " Segmentation ("<< fNx<<","<<fNy<<","<<fNz<<")"<< G4endl;
|
||||
G4cout << " Lead plate at even copy # (0-False,1-True): " << IsLeadSegment()
|
||||
<< G4endl;
|
||||
G4cout << "<---------------------------------------------"<< G4endl;
|
||||
G4cout << "<-- RE02DetectorConstruction::Construct-------" << G4endl;
|
||||
G4cout << " Water Phantom Size " << fPhantomSize / mm << G4endl;
|
||||
G4cout << " Segmentation (" << fNx << "," << fNy << "," << fNz << ")" << G4endl;
|
||||
G4cout << " Lead plate at even copy # (0-False,1-True): " << IsLeadSegment() << G4endl;
|
||||
G4cout << "<---------------------------------------------" << G4endl;
|
||||
// Number of segmentation.
|
||||
// - Default number of segmentation is defined at constructor.
|
||||
G4int nxCells = fNx;
|
||||
@@ -209,29 +201,27 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
|
||||
G4int nzCells = fNz;
|
||||
|
||||
G4ThreeVector sensSize;
|
||||
sensSize.setX(phantomSize.x()/(G4double)nxCells);
|
||||
sensSize.setY(phantomSize.y()/(G4double)nyCells);
|
||||
sensSize.setZ(phantomSize.z()/(G4double)nzCells);
|
||||
sensSize.setX(phantomSize.x() / (G4double)nxCells);
|
||||
sensSize.setY(phantomSize.y() / (G4double)nyCells);
|
||||
sensSize.setZ(phantomSize.z() / (G4double)nzCells);
|
||||
// i.e Voxel size will be 2.0 x 2.0 x 2.0 mm3 cube by default.
|
||||
//
|
||||
//
|
||||
|
||||
// Replication of Water Phantom Volume.
|
||||
// Y Slice
|
||||
G4String yRepName("RepY");
|
||||
G4VSolid* solYRep =
|
||||
new G4Box(yRepName,phantomSize.x()/2.,sensSize.y()/2.,phantomSize.z()/2.);
|
||||
G4LogicalVolume* logYRep =
|
||||
new G4LogicalVolume(solYRep,water,yRepName);
|
||||
//G4PVReplica* yReplica =
|
||||
new G4PVReplica(yRepName,logYRep,logicPhantom,kYAxis,fNy,sensSize.y());
|
||||
new G4Box(yRepName, phantomSize.x() / 2., sensSize.y() / 2., phantomSize.z() / 2.);
|
||||
G4LogicalVolume* logYRep = new G4LogicalVolume(solYRep, water, yRepName);
|
||||
// G4PVReplica* yReplica =
|
||||
new G4PVReplica(yRepName, logYRep, logicPhantom, kYAxis, fNy, sensSize.y());
|
||||
// X Slice
|
||||
G4String xRepName("RepX");
|
||||
G4VSolid* solXRep =
|
||||
new G4Box(xRepName,sensSize.x()/2.,sensSize.y()/2.,phantomSize.z()/2.);
|
||||
G4LogicalVolume* logXRep =
|
||||
new G4LogicalVolume(solXRep,water,xRepName);
|
||||
//G4PVReplica* xReplica =
|
||||
new G4PVReplica(xRepName,logXRep,logYRep,kXAxis,fNx,sensSize.x());
|
||||
new G4Box(xRepName, sensSize.x() / 2., sensSize.y() / 2., phantomSize.z() / 2.);
|
||||
G4LogicalVolume* logXRep = new G4LogicalVolume(solXRep, water, xRepName);
|
||||
// G4PVReplica* xReplica =
|
||||
new G4PVReplica(xRepName, logXRep, logYRep, kXAxis, fNx, sensSize.x());
|
||||
|
||||
//
|
||||
//..................................
|
||||
@@ -239,57 +229,55 @@ RE02DetectorConstruction::~RE02DetectorConstruction()
|
||||
//..................................
|
||||
// Z Slice
|
||||
G4String zVoxName("phantomSens");
|
||||
G4VSolid* solVoxel =
|
||||
new G4Box(zVoxName,sensSize.x()/2.,sensSize.y()/2.,sensSize.z()/2.);
|
||||
fLVPhantomSens = new G4LogicalVolume(solVoxel,water,zVoxName);
|
||||
G4VSolid* solVoxel = new G4Box(zVoxName, sensSize.x() / 2., sensSize.y() / 2., sensSize.z() / 2.);
|
||||
fLVPhantomSens = new G4LogicalVolume(solVoxel, water, zVoxName);
|
||||
//
|
||||
//
|
||||
std::vector<G4Material*> phantomMat(2,water);
|
||||
if ( IsLeadSegment() ) phantomMat[1]=lead;
|
||||
std::vector<G4Material*> phantomMat(2, water);
|
||||
if (IsLeadSegment()) phantomMat[1] = lead;
|
||||
//
|
||||
// Parameterisation for transformation of voxels.
|
||||
// (voxel size is fixed in this example.
|
||||
// (voxel size is fixed in this example.
|
||||
// e.g. nested parameterisation handles material and transfomation of voxels.)
|
||||
RE02NestedPhantomParameterisation* paramPhantom
|
||||
= new RE02NestedPhantomParameterisation(sensSize/2.,nzCells,phantomMat);
|
||||
//G4VPhysicalVolume * physiPhantomSens =
|
||||
new G4PVParameterised("PhantomSens", // their name
|
||||
fLVPhantomSens, // their logical volume
|
||||
logXRep, // Mother logical volume
|
||||
kUndefined, // Are placed along this axis
|
||||
nzCells, // Number of cells
|
||||
paramPhantom); // Parameterisation.
|
||||
RE02NestedPhantomParameterisation* paramPhantom =
|
||||
new RE02NestedPhantomParameterisation(sensSize / 2., nzCells, phantomMat);
|
||||
// G4VPhysicalVolume * physiPhantomSens =
|
||||
new G4PVParameterised("PhantomSens", // their name
|
||||
fLVPhantomSens, // their logical volume
|
||||
logXRep, // Mother logical volume
|
||||
kUndefined, // Are placed along this axis
|
||||
nzCells, // Number of cells
|
||||
paramPhantom); // Parameterisation.
|
||||
// Optimization flag is avaiable for,
|
||||
// kUndefined, kXAxis, kYAxis, kZAxis.
|
||||
//
|
||||
|
||||
//===============================
|
||||
// Visualization attributes
|
||||
//===============================
|
||||
// Visualization attributes
|
||||
//===============================
|
||||
|
||||
G4VisAttributes* boxVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
logicWorld ->SetVisAttributes(boxVisAtt);
|
||||
//logicWorld->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
G4VisAttributes* boxVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
logicWorld->SetVisAttributes(boxVisAtt);
|
||||
// logicWorld->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
|
||||
// Mother volume of WaterPhantom
|
||||
G4VisAttributes* phantomVisAtt = new G4VisAttributes(G4Colour(1.0,1.0,0.0));
|
||||
G4VisAttributes* phantomVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 0.0));
|
||||
logicPhantom->SetVisAttributes(phantomVisAtt);
|
||||
|
||||
|
||||
// Replica
|
||||
G4VisAttributes* yRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
G4VisAttributes* yRepVisAtt = new G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
|
||||
logYRep->SetVisAttributes(yRepVisAtt);
|
||||
G4VisAttributes* xRepVisAtt = new G4VisAttributes(G4Colour(0.0,1.0,0.0));
|
||||
G4VisAttributes* xRepVisAtt = new G4VisAttributes(G4Colour(0.0, 1.0, 0.0));
|
||||
logXRep->SetVisAttributes(xRepVisAtt);
|
||||
|
||||
|
||||
// Skip the visualization for those voxels.
|
||||
fLVPhantomSens->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
|
||||
|
||||
return physiWorld;
|
||||
}
|
||||
|
||||
void RE02DetectorConstruction::ConstructSDandField() {
|
||||
|
||||
void RE02DetectorConstruction::ConstructSDandField()
|
||||
{
|
||||
//================================================
|
||||
// Sensitive detectors : MultiFunctionalDetector
|
||||
//================================================
|
||||
@@ -299,17 +287,16 @@ void RE02DetectorConstruction::ConstructSDandField() {
|
||||
//
|
||||
// Sensitive Detector Name
|
||||
G4String phantomSDname = "PhantomSD";
|
||||
|
||||
|
||||
//------------------------
|
||||
// MultiFunctionalDetector
|
||||
//------------------------
|
||||
//
|
||||
// Define MultiFunctionalDetector with name.
|
||||
G4MultiFunctionalDetector* mFDet
|
||||
= new G4MultiFunctionalDetector(phantomSDname);
|
||||
pSDman->AddNewDetector( mFDet ); // Register SD to SDManager.
|
||||
fLVPhantomSens->SetSensitiveDetector(mFDet); // Assign SD to the logical volume.
|
||||
|
||||
G4MultiFunctionalDetector* mFDet = new G4MultiFunctionalDetector(phantomSDname);
|
||||
pSDman->AddNewDetector(mFDet); // Register SD to SDManager.
|
||||
fLVPhantomSens->SetSensitiveDetector(mFDet); // Assign SD to the logical volume.
|
||||
|
||||
//---------------------------------------
|
||||
// SDFilter : Sensitive Detector Filters
|
||||
//---------------------------------------
|
||||
@@ -318,22 +305,20 @@ void RE02DetectorConstruction::ConstructSDandField() {
|
||||
// and particle name(particleName),
|
||||
// or particle names are given by add("particle name"); method.
|
||||
//
|
||||
G4String fltName,particleName;
|
||||
G4String fltName, particleName;
|
||||
//
|
||||
//-- proton filter
|
||||
G4SDParticleFilter* protonFilter =
|
||||
new G4SDParticleFilter(fltName="protonFilter", particleName="proton");
|
||||
new G4SDParticleFilter(fltName = "protonFilter", particleName = "proton");
|
||||
//
|
||||
//-- electron filter
|
||||
G4SDParticleFilter* electronFilter =
|
||||
new G4SDParticleFilter(fltName="electronFilter");
|
||||
electronFilter->add(particleName="e+"); // accept electrons.
|
||||
electronFilter->add(particleName="e-"); // accept positorons.
|
||||
G4SDParticleFilter* electronFilter = new G4SDParticleFilter(fltName = "electronFilter");
|
||||
electronFilter->add(particleName = "e+"); // accept electrons.
|
||||
electronFilter->add(particleName = "e-"); // accept positorons.
|
||||
//
|
||||
//-- charged particle filter
|
||||
G4SDChargedFilter* chargedFilter =
|
||||
new G4SDChargedFilter(fltName="chargedFilter");
|
||||
|
||||
G4SDChargedFilter* chargedFilter = new G4SDChargedFilter(fltName = "chargedFilter");
|
||||
|
||||
//------------------------
|
||||
// PS : Primitive Scorers
|
||||
//------------------------
|
||||
@@ -343,30 +328,26 @@ void RE02DetectorConstruction::ConstructSDandField() {
|
||||
//-- Primitive Scorer for Energy Deposit.
|
||||
// Total, by protons, by electrons.
|
||||
G4String psName;
|
||||
G4PSEnergyDeposit3D * scorer0 = new G4PSEnergyDeposit3D(psName="totalEDep",
|
||||
fNx,fNy,fNz);
|
||||
G4PSEnergyDeposit3D * scorer1 = new G4PSEnergyDeposit3D(psName="protonEDep",
|
||||
fNx,fNy,fNz);
|
||||
G4PSEnergyDeposit3D* scorer0 = new G4PSEnergyDeposit3D(psName = "totalEDep", fNx, fNy, fNz);
|
||||
G4PSEnergyDeposit3D* scorer1 = new G4PSEnergyDeposit3D(psName = "protonEDep", fNx, fNy, fNz);
|
||||
scorer1->SetFilter(protonFilter);
|
||||
|
||||
|
||||
//
|
||||
//-- Number of Steps for protons
|
||||
G4PSNofStep3D * scorer2 =
|
||||
new G4PSNofStep3D(psName="protonNStep",fNx,fNy,fNz);
|
||||
G4PSNofStep3D* scorer2 = new G4PSNofStep3D(psName = "protonNStep", fNx, fNy, fNz);
|
||||
scorer2->SetFilter(protonFilter);
|
||||
|
||||
|
||||
//
|
||||
//-- CellFlux for charged particles
|
||||
G4PSPassageCellFlux3D * scorer3 =
|
||||
new G4PSPassageCellFlux3D(psName="chargedPassCellFlux", fNx,fNy,fNz);
|
||||
G4PSCellFlux3D * scorer4 =
|
||||
new G4PSCellFlux3D(psName="chargedCellFlux", fNx,fNy,fNz);
|
||||
G4PSFlatSurfaceFlux3D * scorer5 =
|
||||
new G4PSFlatSurfaceFlux3D(psName="chargedSurfFlux", fFlux_InOut,fNx,fNy,fNz);
|
||||
G4PSPassageCellFlux3D* scorer3 =
|
||||
new G4PSPassageCellFlux3D(psName = "chargedPassCellFlux", fNx, fNy, fNz);
|
||||
G4PSCellFlux3D* scorer4 = new G4PSCellFlux3D(psName = "chargedCellFlux", fNx, fNy, fNz);
|
||||
G4PSFlatSurfaceFlux3D* scorer5 =
|
||||
new G4PSFlatSurfaceFlux3D(psName = "chargedSurfFlux", fFlux_InOut, fNx, fNy, fNz);
|
||||
scorer3->SetFilter(chargedFilter);
|
||||
scorer4->SetFilter(chargedFilter);
|
||||
scorer5->SetFilter(chargedFilter);
|
||||
|
||||
|
||||
//
|
||||
//------------------------------------------------------------
|
||||
// Register primitive scorers to MultiFunctionalDetector
|
||||
@@ -377,7 +358,7 @@ void RE02DetectorConstruction::ConstructSDandField() {
|
||||
mFDet->RegisterPrimitive(scorer3);
|
||||
mFDet->RegisterPrimitive(scorer4);
|
||||
mFDet->RegisterPrimitive(scorer5);
|
||||
|
||||
|
||||
//========================
|
||||
// More additional Primitive Scoreres
|
||||
//========================
|
||||
@@ -390,23 +371,21 @@ void RE02DetectorConstruction::ConstructSDandField() {
|
||||
// 100 keV to 1 MeV, gammaSurfCurr002
|
||||
// 1 MeV to 10 MeV. gammaSurfCurr003
|
||||
//
|
||||
for ( G4int i = 0; i < 4; i++){
|
||||
for (G4int i = 0; i < 4; i++) {
|
||||
std::ostringstream name;
|
||||
name << "gammaSurfCurr" << std::setfill('0') << std::setw(3) << i;
|
||||
G4String psgName = name.str();
|
||||
G4double kmin = std::pow(10.,(G4double)i)*keV;
|
||||
G4double kmax = std::pow(10.,(G4double)(i+1))*keV;
|
||||
G4double kmin = std::pow(10., (G4double)i) * keV;
|
||||
G4double kmax = std::pow(10., (G4double)(i + 1)) * keV;
|
||||
//-- Particle with kinetic energy filter.
|
||||
G4SDParticleWithEnergyFilter* pkinEFilter =
|
||||
new G4SDParticleWithEnergyFilter(fltName="gammaE filter",kmin,kmax);
|
||||
new G4SDParticleWithEnergyFilter(fltName = "gammaE filter", kmin, kmax);
|
||||
pkinEFilter->add("gamma"); // Accept only gamma.
|
||||
pkinEFilter->show(); // Show accepting condition to stdout.
|
||||
pkinEFilter->show(); // Show accepting condition to stdout.
|
||||
//-- Surface Current Scorer which scores number of tracks in unit area.
|
||||
G4PSFlatSurfaceCurrent3D * scorer =
|
||||
new G4PSFlatSurfaceCurrent3D(psgName,fCurrent_InOut,fNx,fNy,fNz);
|
||||
scorer->SetFilter(pkinEFilter); // Assign filter.
|
||||
G4PSFlatSurfaceCurrent3D* scorer =
|
||||
new G4PSFlatSurfaceCurrent3D(psgName, fCurrent_InOut, fNx, fNy, fNz);
|
||||
scorer->SetFilter(pkinEFilter); // Assign filter.
|
||||
mFDet->RegisterPrimitive(scorer); // Register it to MultiFunctionalDetector.
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -28,38 +28,33 @@
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
#include "RE02EventAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4Trajectory.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02EventAction::RE02EventAction()
|
||||
: G4UserEventAction()
|
||||
{}
|
||||
RE02EventAction::RE02EventAction() : G4UserEventAction() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02EventAction::~RE02EventAction()
|
||||
{}
|
||||
RE02EventAction::~RE02EventAction() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE02EventAction::BeginOfEventAction(const G4Event*)
|
||||
{}
|
||||
void RE02EventAction::BeginOfEventAction(const G4Event*) {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE02EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4int event_id = evt->GetEventID();
|
||||
|
||||
|
||||
// periodic printing
|
||||
//
|
||||
if (event_id < 10 ||
|
||||
(event_id < 1000 && event_id%100 == 0) ||
|
||||
(event_id < 10000 && event_id%1000 == 0) ||
|
||||
(event_id < 100000 && event_id%10000 == 0)) {
|
||||
if (event_id < 10 || (event_id < 1000 && event_id % 100 == 0)
|
||||
|| (event_id < 10000 && event_id % 1000 == 0) || (event_id < 100000 && event_id % 10000 == 0))
|
||||
{
|
||||
G4cout << ">>> Event " << evt->GetEventID() << G4endl;
|
||||
#ifdef print_stored_trajectories
|
||||
// get number of stored trajectories
|
||||
@@ -67,11 +62,9 @@ void RE02EventAction::EndOfEventAction(const G4Event* evt)
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
G4cout << " " << n_trajectories
|
||||
<< " trajectories stored in this event." << G4endl;
|
||||
G4cout << " " << n_trajectories << " trajectories stored in this event." << G4endl;
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -30,12 +30,12 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#include "RE02NestedPhantomParameterisation.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
|
||||
//=======================================================================
|
||||
// (RE02NestedPhantomParameterisation)
|
||||
@@ -49,29 +49,30 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02NestedPhantomParameterisation
|
||||
::RE02NestedPhantomParameterisation(const G4ThreeVector& voxelSize,
|
||||
G4int nz,
|
||||
std::vector<G4Material*>& mat):
|
||||
G4VNestedParameterisation(),
|
||||
fdX(voxelSize.x()),fdY(voxelSize.y()),fdZ(voxelSize.z()),
|
||||
fNz(nz),fMat(mat)
|
||||
RE02NestedPhantomParameterisation ::RE02NestedPhantomParameterisation(
|
||||
const G4ThreeVector& voxelSize, G4int nz, std::vector<G4Material*>& mat)
|
||||
: G4VNestedParameterisation(),
|
||||
fdX(voxelSize.x()),
|
||||
fdY(voxelSize.y()),
|
||||
fdZ(voxelSize.z()),
|
||||
fNz(nz),
|
||||
fMat(mat)
|
||||
{
|
||||
// Position of voxels.
|
||||
// x and y positions are already defined in DetectorConstruction
|
||||
// Position of voxels.
|
||||
// x and y positions are already defined in DetectorConstruction
|
||||
// by using replicated volume. Here only we need to define is z positions
|
||||
// of voxles.
|
||||
fpZ.clear();
|
||||
G4double zp;
|
||||
for ( G4int iz = 0; iz < fNz; iz++){
|
||||
zp = (-fNz+1+2*iz)*fdZ;
|
||||
for (G4int iz = 0; iz < fNz; iz++) {
|
||||
zp = (-fNz + 1 + 2 * iz) * fdZ;
|
||||
fpZ.push_back(zp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02NestedPhantomParameterisation::~RE02NestedPhantomParameterisation(){
|
||||
RE02NestedPhantomParameterisation::~RE02NestedPhantomParameterisation()
|
||||
{
|
||||
fpZ.clear();
|
||||
}
|
||||
|
||||
@@ -79,22 +80,25 @@ RE02NestedPhantomParameterisation::~RE02NestedPhantomParameterisation(){
|
||||
//
|
||||
// Material assignment to geometry.
|
||||
//
|
||||
G4Material* RE02NestedPhantomParameterisation
|
||||
::ComputeMaterial(G4VPhysicalVolume* /*currentVol*/, const G4int copyNo,
|
||||
const G4VTouchable* parentTouch)
|
||||
G4Material* RE02NestedPhantomParameterisation ::ComputeMaterial(G4VPhysicalVolume* /*currentVol*/,
|
||||
const G4int copyNo,
|
||||
const G4VTouchable* parentTouch)
|
||||
{
|
||||
if(parentTouch==0) return fMat[0]; // protection for initialization and
|
||||
// vis at idle state
|
||||
// Copy number of voxels.
|
||||
if (parentTouch == 0)
|
||||
return fMat[0]; // protection for initialization and
|
||||
// vis at idle state
|
||||
// Copy number of voxels.
|
||||
// Copy number of X and Y are obtained from replication number.
|
||||
// Copy nymber of Z is the copy number of current voxel.
|
||||
G4int ix = parentTouch->GetReplicaNumber(0);
|
||||
G4int iy = parentTouch->GetReplicaNumber(1);
|
||||
G4int iz = copyNo;
|
||||
// For demonstration purpose,a couple of materials are chosen alternately.
|
||||
G4Material* mat=0;
|
||||
if ( ix%2 == 0 && iy%2 == 0 && iz%2 == 0 ) mat = fMat[0];
|
||||
else mat = fMat[1];
|
||||
G4Material* mat = 0;
|
||||
if (ix % 2 == 0 && iy % 2 == 0 && iz % 2 == 0)
|
||||
mat = fMat[0];
|
||||
else
|
||||
mat = fMat[1];
|
||||
|
||||
return mat;
|
||||
}
|
||||
@@ -102,9 +106,10 @@ G4Material* RE02NestedPhantomParameterisation
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
// Number of Materials
|
||||
// Material scanner is required for preparing physics tables and so on before
|
||||
// Material scanner is required for preparing physics tables and so on before
|
||||
// stating simulation, so that G4 has to know number of materials.
|
||||
G4int RE02NestedPhantomParameterisation::GetNumberOfMaterials() const{
|
||||
G4int RE02NestedPhantomParameterisation::GetNumberOfMaterials() const
|
||||
{
|
||||
return fMat.size();
|
||||
}
|
||||
|
||||
@@ -113,7 +118,8 @@ G4int RE02NestedPhantomParameterisation::GetNumberOfMaterials() const{
|
||||
// GetMaterial
|
||||
// This is needed for material scanner and realizing geometry.
|
||||
//
|
||||
G4Material* RE02NestedPhantomParameterisation::GetMaterial(G4int i) const{
|
||||
G4Material* RE02NestedPhantomParameterisation::GetMaterial(G4int i) const
|
||||
{
|
||||
return fMat[i];
|
||||
}
|
||||
|
||||
@@ -121,9 +127,10 @@ G4Material* RE02NestedPhantomParameterisation::GetMaterial(G4int i) const{
|
||||
//
|
||||
// Transformation of voxels.
|
||||
//
|
||||
void RE02NestedPhantomParameterisation
|
||||
::ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const{
|
||||
G4ThreeVector position(0.,0.,fpZ[copyNo]);
|
||||
void RE02NestedPhantomParameterisation ::ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const
|
||||
{
|
||||
G4ThreeVector position(0., 0., fpZ[copyNo]);
|
||||
physVol->SetTranslation(position);
|
||||
}
|
||||
|
||||
@@ -131,8 +138,9 @@ void RE02NestedPhantomParameterisation
|
||||
//
|
||||
// Dimensions are always same in this RE02 example.
|
||||
//
|
||||
void RE02NestedPhantomParameterisation
|
||||
::ComputeDimensions(G4Box& box, const G4int, const G4VPhysicalVolume* ) const{
|
||||
void RE02NestedPhantomParameterisation ::ComputeDimensions(G4Box& box, const G4int,
|
||||
const G4VPhysicalVolume*) const
|
||||
{
|
||||
box.SetXHalfLength(fdX);
|
||||
box.SetYHalfLength(fdY);
|
||||
box.SetZHalfLength(fdZ);
|
||||
|
||||
@@ -47,23 +47,27 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSCellFlux::RE02PSCellFlux(G4String name,G4int nx, G4int ny, G4int nz)
|
||||
:G4PSCellFlux(name),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSCellFlux::RE02PSCellFlux(G4String name, G4int nx, G4int ny, G4int nz)
|
||||
: G4PSCellFlux(name), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSCellFlux::~RE02PSCellFlux()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSCellFlux::GetIndex(G4Step* aStep)
|
||||
@@ -72,8 +76,10 @@ G4int RE02PSCellFlux::GetIndex(G4Step* aStep)
|
||||
G4int ix = touchable->GetReplicaNumber(1);
|
||||
G4int iy = touchable->GetReplicaNumber(2);
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -47,24 +47,27 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSEnergyDeposit::RE02PSEnergyDeposit(G4String name,
|
||||
G4int nx, G4int ny, G4int nz)
|
||||
:G4PSEnergyDeposit(name),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSEnergyDeposit::RE02PSEnergyDeposit(G4String name, G4int nx, G4int ny, G4int nz)
|
||||
: G4PSEnergyDeposit(name), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSEnergyDeposit::~RE02PSEnergyDeposit()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSEnergyDeposit::GetIndex(G4Step* aStep)
|
||||
@@ -75,6 +78,8 @@ G4int RE02PSEnergyDeposit::GetIndex(G4Step* aStep)
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -47,25 +47,28 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSFlatSurfaceCurrent::RE02PSFlatSurfaceCurrent(G4String name,
|
||||
G4int direction,
|
||||
G4int nx, G4int ny, G4int nz)
|
||||
:G4PSFlatSurfaceCurrent(name,direction),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSFlatSurfaceCurrent::RE02PSFlatSurfaceCurrent(G4String name, G4int direction, G4int nx,
|
||||
G4int ny, G4int nz)
|
||||
: G4PSFlatSurfaceCurrent(name, direction), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSFlatSurfaceCurrent::~RE02PSFlatSurfaceCurrent()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSFlatSurfaceCurrent::GetIndex(G4Step* aStep)
|
||||
@@ -74,8 +77,10 @@ G4int RE02PSFlatSurfaceCurrent::GetIndex(G4Step* aStep)
|
||||
G4int ix = touchable->GetReplicaNumber(1);
|
||||
G4int iy = touchable->GetReplicaNumber(2);
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -47,24 +47,28 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSFlatSurfaceFlux::RE02PSFlatSurfaceFlux(G4String name, G4int direction,
|
||||
G4int nx, G4int ny, G4int nz)
|
||||
:G4PSFlatSurfaceFlux(name,direction),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSFlatSurfaceFlux::RE02PSFlatSurfaceFlux(G4String name, G4int direction, G4int nx, G4int ny,
|
||||
G4int nz)
|
||||
: G4PSFlatSurfaceFlux(name, direction), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSFlatSurfaceFlux::~RE02PSFlatSurfaceFlux()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSFlatSurfaceFlux::GetIndex(G4Step* aStep)
|
||||
@@ -73,8 +77,10 @@ G4int RE02PSFlatSurfaceFlux::GetIndex(G4Step* aStep)
|
||||
G4int ix = touchable->GetReplicaNumber(1);
|
||||
G4int iy = touchable->GetReplicaNumber(2);
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -47,23 +47,27 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSNofStep::RE02PSNofStep(G4String name,G4int nx, G4int ny, G4int nz)
|
||||
:G4PSNofStep(name),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSNofStep::RE02PSNofStep(G4String name, G4int nx, G4int ny, G4int nz)
|
||||
: G4PSNofStep(name), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSNofStep::~RE02PSNofStep()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSNofStep::GetIndex(G4Step* aStep)
|
||||
@@ -72,8 +76,10 @@ G4int RE02PSNofStep::GetIndex(G4Step* aStep)
|
||||
G4int ix = touchable->GetReplicaNumber(1);
|
||||
G4int iy = touchable->GetReplicaNumber(2);
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -47,24 +47,27 @@
|
||||
// This is a primitive scorer class for scoring cell charge.
|
||||
// The Cell Charge is defined by a sum of charge inside the cell
|
||||
// which calculates the deposited charge in the cell.
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
// Created: 2006-06-20 Tsukasa ASO, Akinori Kimura.
|
||||
//
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSPassageCellFlux::RE02PSPassageCellFlux(G4String name,
|
||||
G4int nx, G4int ny, G4int nz)
|
||||
:G4PSPassageCellFlux(name),fNx(nx),fNy(ny),fNz(nz)
|
||||
{;}
|
||||
RE02PSPassageCellFlux::RE02PSPassageCellFlux(G4String name, G4int nx, G4int ny, G4int nz)
|
||||
: G4PSPassageCellFlux(name), fNx(nx), fNy(ny), fNz(nz)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE02PSPassageCellFlux::~RE02PSPassageCellFlux()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4int RE02PSPassageCellFlux::GetIndex(G4Step* aStep)
|
||||
@@ -73,8 +76,10 @@ G4int RE02PSPassageCellFlux::GetIndex(G4Step* aStep)
|
||||
G4int ix = touchable->GetReplicaNumber(1);
|
||||
G4int iy = touchable->GetReplicaNumber(2);
|
||||
G4int iz = touchable->GetReplicaNumber(0);
|
||||
|
||||
|
||||
G4int tmp = fNy;
|
||||
if (tmp) return iy*fNx*fNz+ix*fNz+iz;
|
||||
else return iy*fNx*fNz+ix*fNz+iz;
|
||||
if (tmp)
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
else
|
||||
return iy * fNx * fNz + ix * fNz + iz;
|
||||
}
|
||||
|
||||
@@ -32,38 +32,37 @@
|
||||
#include "RE02PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "Randomize.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
RE02PrimaryGeneratorAction::RE02PrimaryGeneratorAction()
|
||||
: G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
: G4VUserPrimaryGeneratorAction(), fParticleGun(0)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
// default particle
|
||||
// default particle
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4ParticleDefinition* particle = particleTable->FindParticle("proton");
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.0,0.0,1.));
|
||||
fParticleGun->SetParticleEnergy(150.0*MeV);
|
||||
//
|
||||
// default beam position
|
||||
G4double position = -200./2.*cm;
|
||||
//
|
||||
// Initial beam spot size in sigma.; This is not a part of ParticleGun.
|
||||
fSigmaPosition = 10.* mm;
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.0, 0.0, 1.));
|
||||
fParticleGun->SetParticleEnergy(150.0 * MeV);
|
||||
//
|
||||
// default beam position
|
||||
G4double position = -200. / 2. * cm;
|
||||
//
|
||||
// Initial beam spot size in sigma.; This is not a part of ParticleGun.
|
||||
fSigmaPosition = 10. * mm;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0.*cm, 0.*cm, position));
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0. * cm, 0. * cm, position));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -76,11 +75,10 @@ RE02PrimaryGeneratorAction::~RE02PrimaryGeneratorAction()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
void RE02PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
|
||||
{
|
||||
G4ThreeVector position = fParticleGun->GetParticlePosition();
|
||||
G4double dx = (G4UniformRand()-0.5)*fSigmaPosition;
|
||||
G4double dy = (G4UniformRand()-0.5)*fSigmaPosition;
|
||||
G4double dx = (G4UniformRand() - 0.5) * fSigmaPosition;
|
||||
G4double dy = (G4UniformRand() - 0.5) * fSigmaPosition;
|
||||
position.setX(dx);
|
||||
position.setY(dy);
|
||||
fParticleGun->SetParticlePosition(position);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
//=====================================================================
|
||||
//
|
||||
// (Description)
|
||||
// RE02Run Class is for accumulating scored quantities which is
|
||||
// RE02Run Class is for accumulating scored quantities which is
|
||||
// scored using G4MutiFunctionalDetector and G4VPrimitiveScorer.
|
||||
// Accumulation is done using G4THitsMap object.
|
||||
//
|
||||
@@ -41,10 +41,10 @@
|
||||
// was assigned at instantiation of MultiFunctionalDetector(MFD).
|
||||
// Then RE02Run constructor automatically scans primitive scorers
|
||||
// in the MFD, and obtains collectionIDs of all collections associated
|
||||
// to those primitive scorers. Futhermore, the G4THitsMap objects
|
||||
// to those primitive scorers. Futhermore, the G4THitsMap objects
|
||||
// for accumulating during a RUN are automatically created too.
|
||||
// (*) Collection Name is same as primitive scorer name.
|
||||
//
|
||||
//
|
||||
// The resultant information is kept inside RE02Run objects as
|
||||
// data members.
|
||||
// std::vector<G4String> fCollName; // Collection Name,
|
||||
@@ -57,14 +57,14 @@
|
||||
//=====================================================================
|
||||
|
||||
#include "RE02Run.hh"
|
||||
#include "G4SDManager.hh"
|
||||
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//
|
||||
// Constructor.
|
||||
// Constructor.
|
||||
// (The vector of MultiFunctionalDetector name has to given.)
|
||||
RE02Run::RE02Run(const std::vector<G4String> mfdName) : G4Run()
|
||||
{
|
||||
@@ -74,36 +74,35 @@ RE02Run::RE02Run(const std::vector<G4String> mfdName) : G4Run()
|
||||
// Get CollectionIDs for HitCollections.
|
||||
//=================================================
|
||||
G4int nMfd = mfdName.size();
|
||||
for ( G4int idet = 0; idet < nMfd ; idet++){ // Loop for all MFD.
|
||||
for (G4int idet = 0; idet < nMfd; idet++) { // Loop for all MFD.
|
||||
G4String detName = mfdName[idet];
|
||||
//--- Seek and Obtain MFD objects from SDmanager.
|
||||
G4MultiFunctionalDetector* mfd =
|
||||
(G4MultiFunctionalDetector*)(pSDman->FindSensitiveDetector(detName));
|
||||
//
|
||||
if ( mfd ){
|
||||
if (mfd) {
|
||||
//--- Loop over the registered primitive scorers.
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++){
|
||||
for (G4int icol = 0; icol < mfd->GetNumberOfPrimitives(); icol++) {
|
||||
// Get Primitive Scorer object.
|
||||
G4VPrimitiveScorer* scorer=mfd->GetPrimitive(icol);
|
||||
G4VPrimitiveScorer* scorer = mfd->GetPrimitive(icol);
|
||||
// collection name and collectionID for HitsCollection,
|
||||
// where type of HitsCollection is G4THitsMap in case of primitive
|
||||
// where type of HitsCollection is G4THitsMap in case of primitive
|
||||
// scorer.
|
||||
// The collection name is given by <MFD name>/<Primitive Scorer name>.
|
||||
G4String collectionName = scorer->GetName();
|
||||
G4String fullCollectionName = detName+"/"+collectionName;
|
||||
G4int collectionID = pSDman->GetCollectionID(fullCollectionName);
|
||||
G4String fullCollectionName = detName + "/" + collectionName;
|
||||
G4int collectionID = pSDman->GetCollectionID(fullCollectionName);
|
||||
//
|
||||
if ( collectionID >= 0 ){
|
||||
G4cout << "++ "<<fullCollectionName<< " id " << collectionID
|
||||
<< G4endl;
|
||||
if (collectionID >= 0) {
|
||||
G4cout << "++ " << fullCollectionName << " id " << collectionID << G4endl;
|
||||
// Store obtained HitsCollection information into data members.
|
||||
// And, creates new G4THitsMap for accumulating quantities during RUN.
|
||||
fCollName.push_back(fullCollectionName);
|
||||
fCollID.push_back(collectionID);
|
||||
fRunMap.push_back(new G4THitsMap<G4double>(detName,collectionName));
|
||||
}else{
|
||||
G4cout << "** collection " << fullCollectionName << " not found. "
|
||||
<< G4endl;
|
||||
fRunMap.push_back(new G4THitsMap<G4double>(detName, collectionName));
|
||||
}
|
||||
else {
|
||||
G4cout << "** collection " << fullCollectionName << " not found. " << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -118,8 +117,8 @@ RE02Run::~RE02Run()
|
||||
{
|
||||
//--- Clear HitsMap for RUN
|
||||
G4int nMap = fRunMap.size();
|
||||
for ( G4int i = 0; i < nMap; i++){
|
||||
if(fRunMap[i] ) fRunMap[i]->clear();
|
||||
for (G4int i = 0; i < nMap; i++) {
|
||||
if (fRunMap[i]) fRunMap[i]->clear();
|
||||
}
|
||||
fCollName.clear();
|
||||
fCollID.clear();
|
||||
@@ -145,14 +144,15 @@ void RE02Run::RecordEvent(const G4Event* aEvent)
|
||||
// Sum up HitsMap of this Event into HitsMap of this RUN
|
||||
//=======================================================
|
||||
G4int nCol = fCollID.size();
|
||||
for ( G4int i = 0; i < nCol ; i++ ){ // Loop over HitsCollection
|
||||
G4THitsMap<G4double>* evtMap=0;
|
||||
if ( fCollID[i] >= 0 ){ // Collection is attached to pHCE
|
||||
for (G4int i = 0; i < nCol; i++) { // Loop over HitsCollection
|
||||
G4THitsMap<G4double>* evtMap = 0;
|
||||
if (fCollID[i] >= 0) { // Collection is attached to pHCE
|
||||
evtMap = (G4THitsMap<G4double>*)(pHCE->GetHC(fCollID[i]));
|
||||
}else{
|
||||
G4cout <<" Error evtMap Not Found "<< i << G4endl;
|
||||
}
|
||||
if ( evtMap ) {
|
||||
else {
|
||||
G4cout << " Error evtMap Not Found " << i << G4endl;
|
||||
}
|
||||
if (evtMap) {
|
||||
//=== Sum up HitsMap of this event to HitsMap of RUN.===
|
||||
*fRunMap[i] += *evtMap;
|
||||
//======================================================
|
||||
@@ -160,21 +160,21 @@ void RE02Run::RecordEvent(const G4Event* aEvent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE02Run::Merge(const G4Run * aRun) {
|
||||
const RE02Run * localRun = static_cast<const RE02Run *>(aRun);
|
||||
|
||||
void RE02Run::Merge(const G4Run* aRun)
|
||||
{
|
||||
const RE02Run* localRun = static_cast<const RE02Run*>(aRun);
|
||||
|
||||
//=======================================================
|
||||
// Merge HitsMap of working threads
|
||||
//=======================================================
|
||||
G4int nCol = localRun->fCollID.size();
|
||||
for ( G4int i = 0; i < nCol ; i++ ){ // Loop over HitsCollection
|
||||
if ( localRun->fCollID[i] >= 0 ){
|
||||
for (G4int i = 0; i < nCol; i++) { // Loop over HitsCollection
|
||||
if (localRun->fCollID[i] >= 0) {
|
||||
*fRunMap[i] += *localRun->fRunMap[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
G4Run::Merge(aRun);
|
||||
}
|
||||
|
||||
@@ -185,10 +185,10 @@ void RE02Run::Merge(const G4Run * aRun) {
|
||||
//-----
|
||||
// Access HitsMap.
|
||||
// By MultiFunctionalDetector name and Collection Name.
|
||||
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& detName,
|
||||
const G4String& colName){
|
||||
G4String fullName = detName+"/"+colName;
|
||||
return GetHitsMap(fullName);
|
||||
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& detName, const G4String& colName)
|
||||
{
|
||||
G4String fullName = detName + "/" + colName;
|
||||
return GetHitsMap(fullName);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -197,14 +197,15 @@ G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& detName,
|
||||
// Access HitsMap.
|
||||
// By full description of collection name, that is
|
||||
// <MultiFunctional Detector Name>/<Primitive Scorer Name>
|
||||
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& fullName){
|
||||
G4int nCol = fCollName.size();
|
||||
for ( G4int i = 0; i < nCol; i++){
|
||||
if ( fCollName[i] == fullName ){
|
||||
return fRunMap[i];
|
||||
}
|
||||
G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& fullName)
|
||||
{
|
||||
G4int nCol = fCollName.size();
|
||||
for (G4int i = 0; i < nCol; i++) {
|
||||
if (fCollName[i] == fullName) {
|
||||
return fRunMap[i];
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -212,25 +213,23 @@ G4THitsMap<G4double>* RE02Run::GetHitsMap(const G4String& fullName){
|
||||
//-----
|
||||
// - Dump All HitsMap of this RUN. (for debuging and monitoring of quantity).
|
||||
// This method calls G4THisMap::PrintAll() for individual HitsMap.
|
||||
void RE02Run::DumpAllScorer(){
|
||||
|
||||
void RE02Run::DumpAllScorer()
|
||||
{
|
||||
// - Number of HitsMap in this RUN.
|
||||
G4int n = GetNumberOfHitsMap();
|
||||
// - GetHitsMap and dump values.
|
||||
for ( G4int i = 0; i < n ; i++ ){
|
||||
G4THitsMap<G4double>* runMap =GetHitsMap(i);
|
||||
if ( runMap ) {
|
||||
G4cout << " PrimitiveScorer RUN "
|
||||
<< runMap->GetSDname() <<","<< runMap->GetName() << G4endl;
|
||||
for (G4int i = 0; i < n; i++) {
|
||||
G4THitsMap<G4double>* runMap = GetHitsMap(i);
|
||||
if (runMap) {
|
||||
G4cout << " PrimitiveScorer RUN " << runMap->GetSDname() << "," << runMap->GetName()
|
||||
<< G4endl;
|
||||
G4cout << " Number of entries " << runMap->entries() << G4endl;
|
||||
//// std::map<G4int,G4double*>::iterator itr = runMap->GetMap()->begin();
|
||||
//// for(; itr != runMap->GetMap()->end(); itr++) {
|
||||
//// G4cout << " copy no.: " << itr->first
|
||||
//// << " Run Value : " << *(itr->second)
|
||||
//// << G4endl;
|
||||
//// }
|
||||
//// std::map<G4int,G4double*>::iterator itr = runMap->GetMap()->begin();
|
||||
//// for(; itr != runMap->GetMap()->end(); itr++) {
|
||||
//// G4cout << " copy no.: " << itr->first
|
||||
//// << " Run Value : " << *(itr->second)
|
||||
//// << G4endl;
|
||||
//// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -27,31 +27,30 @@
|
||||
/// \brief Implementation of the RE02RunAction class
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
#include "RE02RunAction.hh"
|
||||
|
||||
#include "RE02Run.hh"
|
||||
|
||||
//-- In order to obtain detector information.
|
||||
#include "G4RunManager.hh"
|
||||
#include "RE02DetectorConstruction.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
#include "G4UnitsTable.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
#include <fstream>
|
||||
//=======================================================================
|
||||
// RE02RunAction
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//=======================================================================
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
// Constructor
|
||||
RE02RunAction::RE02RunAction()
|
||||
: G4UserRunAction(),
|
||||
fNx(0), fNy(0), fNz(0)
|
||||
RE02RunAction::RE02RunAction() : G4UserRunAction(), fNx(0), fNy(0), fNz(0)
|
||||
{
|
||||
// - Prepare data member for RE02Run.
|
||||
// vector represents a list of MultiFunctionalDetector names.
|
||||
@@ -66,7 +65,7 @@ RE02RunAction::~RE02RunAction()
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//==
|
||||
//==
|
||||
G4Run* RE02RunAction::GenerateRun()
|
||||
{
|
||||
// Generate new RUN object, which is specially
|
||||
@@ -83,10 +82,10 @@ void RE02RunAction::BeginOfRunAction(const G4Run* aRun)
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
//==
|
||||
//==
|
||||
void RE02RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
{
|
||||
if(!IsMaster()) return;
|
||||
if (!IsMaster()) return;
|
||||
|
||||
//- RE02Run object.
|
||||
RE02Run* re02Run = (RE02Run*)aRun;
|
||||
@@ -98,38 +97,28 @@ void RE02RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
//- water phantom (Detector) Information.
|
||||
//-- Number of segments in the water phantom.
|
||||
const RE02DetectorConstruction* detector =
|
||||
(const RE02DetectorConstruction*)
|
||||
(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||
detector->GetNumberOfSegmentsInPhantom(fNx,fNy,fNz); //Fill fNx,y,z.
|
||||
(const RE02DetectorConstruction*)(G4RunManager::GetRunManager()->GetUserDetectorConstruction());
|
||||
detector->GetNumberOfSegmentsInPhantom(fNx, fNy, fNz); // Fill fNx,y,z.
|
||||
|
||||
//---------------------------------------------
|
||||
// Dump accumulated quantities for this RUN.
|
||||
// (Display only central region of x-y plane)
|
||||
//---------------------------------------------
|
||||
G4THitsMap<G4double>* totEdep = re02Run->GetHitsMap("PhantomSD/totalEDep");
|
||||
G4THitsMap<G4double>* proEdep = re02Run->GetHitsMap("PhantomSD/protonEDep");
|
||||
G4THitsMap<G4double>* totEdep = re02Run->GetHitsMap("PhantomSD/totalEDep");
|
||||
G4THitsMap<G4double>* proEdep = re02Run->GetHitsMap("PhantomSD/protonEDep");
|
||||
G4THitsMap<G4double>* proNstep = re02Run->GetHitsMap("PhantomSD/protonNStep");
|
||||
G4THitsMap<G4double>* passCFx =
|
||||
re02Run->GetHitsMap("PhantomSD/chargedPassCellFlux");
|
||||
G4THitsMap<G4double>* cFx =
|
||||
re02Run->GetHitsMap("PhantomSD/chargedCellFlux");
|
||||
G4THitsMap<G4double>* surfFx =
|
||||
re02Run->GetHitsMap("PhantomSD/chargedSurfFlux");
|
||||
G4THitsMap<G4double>* gCurr00 =
|
||||
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr000");
|
||||
G4THitsMap<G4double>* gCurr01 =
|
||||
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr001");
|
||||
G4THitsMap<G4double>* gCurr02 =
|
||||
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr002");
|
||||
G4THitsMap<G4double>* gCurr03 =
|
||||
re02Run->GetHitsMap("PhantomSD/gammaSurfCurr003");
|
||||
G4THitsMap<G4double>* passCFx = re02Run->GetHitsMap("PhantomSD/chargedPassCellFlux");
|
||||
G4THitsMap<G4double>* cFx = re02Run->GetHitsMap("PhantomSD/chargedCellFlux");
|
||||
G4THitsMap<G4double>* surfFx = re02Run->GetHitsMap("PhantomSD/chargedSurfFlux");
|
||||
G4THitsMap<G4double>* gCurr00 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr000");
|
||||
G4THitsMap<G4double>* gCurr01 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr001");
|
||||
G4THitsMap<G4double>* gCurr02 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr002");
|
||||
G4THitsMap<G4double>* gCurr03 = re02Run->GetHitsMap("PhantomSD/gammaSurfCurr003");
|
||||
|
||||
G4cout << "============================================================="
|
||||
<< G4endl;
|
||||
G4cout << " Number of event processed : "<< aRun->GetNumberOfEvent() << G4endl;
|
||||
G4cout << "============================================================="
|
||||
<< G4endl;
|
||||
G4cout << std::setw( 8) << "#Z Cell#";
|
||||
G4cout << "=============================================================" << G4endl;
|
||||
G4cout << " Number of event processed : " << aRun->GetNumberOfEvent() << G4endl;
|
||||
G4cout << "=============================================================" << G4endl;
|
||||
G4cout << std::setw(8) << "#Z Cell#";
|
||||
G4cout << std::setw(16) << totEdep->GetName();
|
||||
G4cout << std::setw(16) << proEdep->GetName();
|
||||
G4cout << std::setw(12) << proNstep->GetName();
|
||||
@@ -139,56 +128,49 @@ void RE02RunAction::EndOfRunAction(const G4Run* aRun)
|
||||
G4cout << std::setw(20) << gCurr00->GetName();
|
||||
G4cout << std::setw(20) << gCurr01->GetName();
|
||||
G4cout << std::setw(20) << gCurr02->GetName();
|
||||
G4cout << std::setw(20) << gCurr03->GetName()
|
||||
<< G4endl;
|
||||
G4int ix = fNx/2;
|
||||
G4int iy = fNy/2;
|
||||
G4cout << std::setw(20) << gCurr03->GetName() << G4endl;
|
||||
G4int ix = fNx / 2;
|
||||
G4int iy = fNy / 2;
|
||||
G4int iz;
|
||||
//G4double totE, proE, proN,pasCF,CF,surfF,gCr0,gCr1,gCr2,gCr3;
|
||||
for ( iz = 0; iz < fNz; iz++){
|
||||
G4double* totED = (*totEdep)[CopyNo(ix,iy,iz)];
|
||||
G4double* proED = (*proEdep)[CopyNo(ix,iy,iz)];
|
||||
G4double* proNS = (*proNstep)[CopyNo(ix,iy,iz)];
|
||||
G4double* pasCF = (*passCFx)[CopyNo(ix,iy,iz)];
|
||||
G4double* cF = (*cFx)[CopyNo(ix,iy,iz)];
|
||||
G4double* sfx = (*surfFx)[CopyNo(ix,iy,iz)];
|
||||
G4double* gcur0 = (*gCurr00)[CopyNo(ix,iy,iz)];
|
||||
G4double* gcur1 = (*gCurr01)[CopyNo(ix,iy,iz)];
|
||||
G4double* gcur2 = (*gCurr02)[CopyNo(ix,iy,iz)];
|
||||
G4double* gcur3 = (*gCurr03)[CopyNo(ix,iy,iz)];
|
||||
if ( !totED ) totED = new G4double(0.0);
|
||||
if ( !proED ) proED = new G4double(0.0);
|
||||
if ( !proNS ) proNS = new G4double(0.0);
|
||||
if ( !pasCF ) pasCF = new G4double(0.0);
|
||||
if ( !cF ) cF = new G4double(0.0);
|
||||
if ( !sfx ) sfx = new G4double(0.0);
|
||||
if ( !gcur0 ) gcur0 = new G4double(0.0);
|
||||
if ( !gcur1 ) gcur1 = new G4double(0.0);
|
||||
if ( !gcur2 ) gcur2 = new G4double(0.0);
|
||||
if ( !gcur3 ) gcur3 = new G4double(0.0);
|
||||
G4cout << std::setw( 6) << iz << " "
|
||||
<< std::setw(12) << G4BestUnit(*totED,"Energy")
|
||||
<< std::setw(12) << G4BestUnit(*proED,"Energy")
|
||||
<< std::setw(12) << (*proNS) << " "
|
||||
<< std::setw(13) << (*pasCF)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*cF)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*sfx)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*gcur0)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*gcur1)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*gcur2)*cm*cm <<" /cm2"
|
||||
<< std::setw(15) << (*gcur3)*cm*cm <<" /cm2"
|
||||
<< G4endl;
|
||||
// G4double totE, proE, proN,pasCF,CF,surfF,gCr0,gCr1,gCr2,gCr3;
|
||||
for (iz = 0; iz < fNz; iz++) {
|
||||
G4double* totED = (*totEdep)[CopyNo(ix, iy, iz)];
|
||||
G4double* proED = (*proEdep)[CopyNo(ix, iy, iz)];
|
||||
G4double* proNS = (*proNstep)[CopyNo(ix, iy, iz)];
|
||||
G4double* pasCF = (*passCFx)[CopyNo(ix, iy, iz)];
|
||||
G4double* cF = (*cFx)[CopyNo(ix, iy, iz)];
|
||||
G4double* sfx = (*surfFx)[CopyNo(ix, iy, iz)];
|
||||
G4double* gcur0 = (*gCurr00)[CopyNo(ix, iy, iz)];
|
||||
G4double* gcur1 = (*gCurr01)[CopyNo(ix, iy, iz)];
|
||||
G4double* gcur2 = (*gCurr02)[CopyNo(ix, iy, iz)];
|
||||
G4double* gcur3 = (*gCurr03)[CopyNo(ix, iy, iz)];
|
||||
if (!totED) totED = new G4double(0.0);
|
||||
if (!proED) proED = new G4double(0.0);
|
||||
if (!proNS) proNS = new G4double(0.0);
|
||||
if (!pasCF) pasCF = new G4double(0.0);
|
||||
if (!cF) cF = new G4double(0.0);
|
||||
if (!sfx) sfx = new G4double(0.0);
|
||||
if (!gcur0) gcur0 = new G4double(0.0);
|
||||
if (!gcur1) gcur1 = new G4double(0.0);
|
||||
if (!gcur2) gcur2 = new G4double(0.0);
|
||||
if (!gcur3) gcur3 = new G4double(0.0);
|
||||
G4cout << std::setw(6) << iz << " " << std::setw(12) << G4BestUnit(*totED, "Energy")
|
||||
<< std::setw(12) << G4BestUnit(*proED, "Energy") << std::setw(12) << (*proNS) << " "
|
||||
<< std::setw(13) << (*pasCF) * cm * cm << " /cm2" << std::setw(15) << (*cF) * cm * cm
|
||||
<< " /cm2" << std::setw(15) << (*sfx) * cm * cm << " /cm2" << std::setw(15)
|
||||
<< (*gcur0) * cm * cm << " /cm2" << std::setw(15) << (*gcur1) * cm * cm << " /cm2"
|
||||
<< std::setw(15) << (*gcur2) * cm * cm << " /cm2" << std::setw(15) << (*gcur3) * cm * cm
|
||||
<< " /cm2" << G4endl;
|
||||
}
|
||||
G4cout << "============================================="<<G4endl;
|
||||
|
||||
std::ofstream file("totED.txt");
|
||||
for ( iz = 0; iz < fNz; iz++){
|
||||
for ( iy = 0; iy < fNy; iy++){
|
||||
for ( ix = 0; ix < fNx; ix++){
|
||||
G4double* totED = (*totEdep)[CopyNo(ix,iy,iz)];
|
||||
if ( !totED ) totED = new G4double(0.0);
|
||||
file << ix << " "<<iy<<" "<<iz<<" "<< *totED/MeV << G4endl;
|
||||
G4cout << "=============================================" << G4endl;
|
||||
|
||||
std::ofstream file("totED.txt");
|
||||
for (iz = 0; iz < fNz; iz++) {
|
||||
for (iy = 0; iy < fNy; iy++) {
|
||||
for (ix = 0; ix < fNx; ix++) {
|
||||
G4double* totED = (*totEdep)[CopyNo(ix, iy, iz)];
|
||||
if (!totED) totED = new G4double(0.0);
|
||||
file << ix << " " << iy << " " << iz << " " << *totED / MeV << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,91 +29,89 @@
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "RE03ActionInitialization.hh"
|
||||
#include "RE03DetectorConstruction.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4ScoringManager.hh"
|
||||
|
||||
#include "RE03DetectorConstruction.hh"
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "RE03ActionInitialization.hh"
|
||||
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
//====================================================================
|
||||
// Un-comment this line for user defined score writer
|
||||
// #include "RE03UserScoreWriter.hh"
|
||||
//====================================================================
|
||||
|
||||
int main(int argc,char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Construct the run manager
|
||||
//
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
runManager->SetNumberOfThreads(4);
|
||||
// Construct the run manager
|
||||
//
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
runManager->SetNumberOfThreads(4);
|
||||
|
||||
// Activate UI-command base scorer
|
||||
G4ScoringManager * scManager = G4ScoringManager::GetScoringManager();
|
||||
scManager->SetVerboseLevel(1);
|
||||
// Activate UI-command base scorer
|
||||
G4ScoringManager* scManager = G4ScoringManager::GetScoringManager();
|
||||
scManager->SetVerboseLevel(1);
|
||||
|
||||
//====================================================================
|
||||
// Un-comment this line for user defined score writer
|
||||
// scManager->SetScoreWriter(new RE03UserScoreWriter());
|
||||
//====================================================================
|
||||
//====================================================================
|
||||
// Un-comment this line for user defined score writer
|
||||
// scManager->SetScoreWriter(new RE03UserScoreWriter());
|
||||
//====================================================================
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
G4VUserDetectorConstruction* detector = new RE03DetectorConstruction;
|
||||
runManager->SetUserInitialization(detector);
|
||||
//
|
||||
G4VUserPhysicsList* physics = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physics);
|
||||
|
||||
// Set user action classes through Worker Initialization
|
||||
//
|
||||
RE03ActionInitialization* actions = new RE03ActionInitialization;
|
||||
runManager->SetUserInitialization(actions);
|
||||
|
||||
// Visualization manager
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
G4VUserDetectorConstruction* detector = new RE03DetectorConstruction;
|
||||
runManager->SetUserInitialization(detector);
|
||||
//
|
||||
G4VUserPhysicsList* physics = new FTFP_BERT;
|
||||
runManager->SetUserInitialization(physics);
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
// Set user action classes through Worker Initialization
|
||||
//
|
||||
RE03ActionInitialization* actions = new RE03ActionInitialization;
|
||||
runManager->SetUserInitialization(actions);
|
||||
|
||||
if (ui) // Define UI session for interactive mode
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
// Visualization manager
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* UImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
if (ui) // Define UI session for interactive mode
|
||||
{
|
||||
UImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
UImanager->ApplyCommand(command + fileName);
|
||||
}
|
||||
|
||||
// Job termination
|
||||
// Free the store: user actions, physics_list and detector_description are
|
||||
// owned and deleted by the run manager, so they should not
|
||||
// be deleted in the main() program !
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -37,14 +37,11 @@
|
||||
class RE03ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE03ActionInitialization();
|
||||
RE03ActionInitialization();
|
||||
virtual ~RE03ActionInitialization();
|
||||
|
||||
public:
|
||||
virtual void Build() const;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/// \file runAndEvent/RE03/include/RE03DetectorConstruction.hh
|
||||
/// \brief Definition of the RE03DetectorConstruction class
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef RE03DetectorConstruction_h
|
||||
#define RE03DetectorConstruction_h 1
|
||||
@@ -46,7 +46,7 @@ class RE03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void SetupGeometry();
|
||||
@@ -60,4 +60,3 @@ class RE03DetectorConstruction : public G4VUserDetectorConstruction
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,17 +40,14 @@ class G4Event;
|
||||
class RE03PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
RE03PrimaryGeneratorAction();
|
||||
RE03PrimaryGeneratorAction();
|
||||
virtual ~RE03PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
virtual void GeneratePrimaries(G4Event*);
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
|
||||
G4ParticleGun* fParticleGun;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -31,28 +31,24 @@
|
||||
#ifndef RE03UserScoreWriter_h
|
||||
#define RE03UserScoreWriter_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VScoreWriter.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
// class description:
|
||||
//
|
||||
// This class represents storing the scored quantity into a file.
|
||||
//
|
||||
|
||||
class RE03UserScoreWriter : public G4VScoreWriter {
|
||||
|
||||
public:
|
||||
RE03UserScoreWriter();
|
||||
virtual ~RE03UserScoreWriter();
|
||||
|
||||
public:
|
||||
// store a quantity into a file
|
||||
virtual void DumpQuantityToFile(const G4String & psName,
|
||||
const G4String & fileName,
|
||||
const G4String & option);
|
||||
class RE03UserScoreWriter : public G4VScoreWriter
|
||||
{
|
||||
public:
|
||||
RE03UserScoreWriter();
|
||||
virtual ~RE03UserScoreWriter();
|
||||
|
||||
public:
|
||||
// store a quantity into a file
|
||||
virtual void DumpQuantityToFile(const G4String& psName, const G4String& fileName,
|
||||
const G4String& option);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-patch-02 (21-June-2024)
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -44,14 +44,21 @@ Registered graphics systems are:
|
||||
RayTracerX (RayTracerX)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
- by argument in the construction of G4VisExecutive
|
||||
- by environment variable "G4VIS_DEFAULT_DRIVER"
|
||||
- by entry in "~/.g4session"
|
||||
- by build flags.
|
||||
- Note: This feature is not allowed in batch mode.
|
||||
For further information see "examples/basic/B1/exampleB1.cc"
|
||||
and "vis.mac".
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -258,7 +265,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
annihil: for e+ XStype:2 SubType=5 AtRestModel:Simple BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -813,7 +820,7 @@ Min energy per nucleon for multifragmentation 200 GeV
|
||||
Limit excitation energy for Fermi BreakUp 20 MeV
|
||||
Level density (1/MeV) 0.075
|
||||
Use simple level density model 1
|
||||
Use discrete excitation energy of the residual 1
|
||||
Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
@@ -846,7 +853,7 @@ See commands in /vis/modeling/trajectories/ for other options.
|
||||
Run terminated.
|
||||
Run Summary
|
||||
Number of events processed : 2000
|
||||
User=43.050000s Real=45.389116s Sys=0.020000s
|
||||
User=44.460000s Real=46.031008s Sys=0.020000s
|
||||
#
|
||||
########################################
|
||||
#
|
||||
@@ -861,6 +868,6 @@ Run Summary
|
||||
Graphics systems deleted.
|
||||
Visualization Manager deleting...
|
||||
================== Deleting memory pools ===================
|
||||
Number of memory pools allocated: 14 of which, static: 0
|
||||
Dynamic pools deleted: 14 / Total memory freed: 0.19 MB
|
||||
Number of memory pools allocated: 12 of which, static: 0
|
||||
Dynamic pools deleted: 12 / Total memory freed: 0.17 MB
|
||||
============================================================
|
||||
|
||||
@@ -30,19 +30,23 @@
|
||||
//
|
||||
|
||||
#include "RE03ActionInitialization.hh"
|
||||
|
||||
#include "RE03PrimaryGeneratorAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03ActionInitialization::RE03ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03ActionInitialization::~RE03ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE03ActionInitialization::Build() const
|
||||
{
|
||||
SetUserAction(new RE03PrimaryGeneratorAction);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,42 +30,45 @@
|
||||
|
||||
#include "RE03DetectorConstruction.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4MultiFunctionalDetector.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PSEnergyDeposit.hh"
|
||||
#include "G4PSTrackLength.hh"
|
||||
#include "G4PSNofStep.hh"
|
||||
#include "G4PSTrackLength.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SDManager.hh"
|
||||
#include "G4SDParticleFilter.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03DetectorConstruction::RE03DetectorConstruction()
|
||||
:G4VUserDetectorConstruction(),
|
||||
fAir(0),fWater(0),fWorldPhys(0),fPhantomPhys(0),
|
||||
fConstructed(false)
|
||||
{;}
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAir(0),
|
||||
fWater(0),
|
||||
fWorldPhys(0),
|
||||
fPhantomPhys(0),
|
||||
fConstructed(false)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03DetectorConstruction::~RE03DetectorConstruction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* RE03DetectorConstruction::Construct()
|
||||
{
|
||||
if(!fConstructed)
|
||||
{
|
||||
if (!fConstructed) {
|
||||
fConstructed = true;
|
||||
DefineMaterials();
|
||||
SetupGeometry();
|
||||
@@ -75,41 +78,41 @@ G4VPhysicalVolume* RE03DetectorConstruction::Construct()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE03DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
{
|
||||
//-------- NIST Materials -----------------------------------------------
|
||||
// Material Information imported from NIST database.
|
||||
// Material Information imported from NIST database.
|
||||
G4NistManager* NISTman = G4NistManager::Instance();
|
||||
fWater = NISTman->FindOrBuildMaterial("G4_WATER");
|
||||
fAir = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
fAir = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE03DetectorConstruction::SetupGeometry()
|
||||
{
|
||||
//
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldSolid = new G4Box("World",2.*m,2.*m,2.*m);
|
||||
G4LogicalVolume* worldLogical = new G4LogicalVolume(worldSolid,fAir,"World");
|
||||
fWorldPhys = new G4PVPlacement(0,G4ThreeVector(),worldLogical,"World",
|
||||
0,false,0);
|
||||
|
||||
//
|
||||
G4VSolid* worldSolid = new G4Box("World", 2. * m, 2. * m, 2. * m);
|
||||
G4LogicalVolume* worldLogical = new G4LogicalVolume(worldSolid, fAir, "World");
|
||||
fWorldPhys = new G4PVPlacement(0, G4ThreeVector(), worldLogical, "World", 0, false, 0);
|
||||
|
||||
//
|
||||
// Phantom
|
||||
//
|
||||
G4VSolid* phantomSolid = new G4Box("Calor",1.*m,1.*m,1.*m);
|
||||
G4LogicalVolume* phantomLogical = new G4LogicalVolume(phantomSolid,fWater,"Phantom");
|
||||
fPhantomPhys = new G4PVPlacement(0,G4ThreeVector(),phantomLogical,"Phantom",
|
||||
worldLogical,false,0);
|
||||
//
|
||||
//
|
||||
G4VSolid* phantomSolid = new G4Box("Calor", 1. * m, 1. * m, 1. * m);
|
||||
G4LogicalVolume* phantomLogical = new G4LogicalVolume(phantomSolid, fWater, "Phantom");
|
||||
fPhantomPhys =
|
||||
new G4PVPlacement(0, G4ThreeVector(), phantomLogical, "Phantom", worldLogical, false, 0);
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
// worldLogical->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
G4VisAttributes* simpleBoxVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
phantomLogical->SetVisAttributes(simpleBoxVisAtt);
|
||||
}
|
||||
|
||||
void RE03DetectorConstruction::ConstructSDandField()
|
||||
{;}
|
||||
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
@@ -31,28 +31,26 @@
|
||||
#include "RE03PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleGun.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03PrimaryGeneratorAction::RE03PrimaryGeneratorAction()
|
||||
:G4VUserPrimaryGeneratorAction(),
|
||||
fParticleGun(0)
|
||||
: G4VUserPrimaryGeneratorAction(), fParticleGun(0)
|
||||
{
|
||||
G4int n_particle = 1;
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
fParticleGun = new G4ParticleGun(n_particle);
|
||||
|
||||
// default particle kinematic
|
||||
G4ParticleTable* particleTable = G4ParticleTable::GetParticleTable();
|
||||
G4String particleName;
|
||||
G4ParticleDefinition* particle
|
||||
= particleTable->FindParticle(particleName="e-");
|
||||
G4ParticleDefinition* particle = particleTable->FindParticle(particleName = "e-");
|
||||
fParticleGun->SetParticleDefinition(particle);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0.,0.,1.));
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0.,0.,-1.01*m));
|
||||
fParticleGun->SetParticleEnergy(1.*GeV);
|
||||
fParticleGun->SetParticleMomentumDirection(G4ThreeVector(0., 0., 1.));
|
||||
fParticleGun->SetParticlePosition(G4ThreeVector(0., 0., -1.01 * m));
|
||||
fParticleGun->SetParticleEnergy(1. * GeV);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -66,4 +64,3 @@ void RE03PrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
{
|
||||
fParticleGun->GeneratePrimaryVertex(anEvent);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,30 +35,31 @@
|
||||
#include "G4VPrimitiveScorer.hh"
|
||||
#include "G4VScoringMesh.hh"
|
||||
|
||||
#include <map>
|
||||
#include <fstream>
|
||||
#include <map>
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03UserScoreWriter::RE03UserScoreWriter()
|
||||
: G4VScoreWriter()
|
||||
{;}
|
||||
RE03UserScoreWriter::RE03UserScoreWriter() : G4VScoreWriter()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE03UserScoreWriter::~RE03UserScoreWriter()
|
||||
{;}
|
||||
RE03UserScoreWriter::~RE03UserScoreWriter()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE03UserScoreWriter::DumpQuantityToFile(const G4String & psName,
|
||||
const G4String & fileName,
|
||||
const G4String & option) {
|
||||
void RE03UserScoreWriter::DumpQuantityToFile(const G4String& psName, const G4String& fileName,
|
||||
const G4String& option)
|
||||
{
|
||||
using MeshScoreMap = G4VScoringMesh::MeshScoreMap;
|
||||
//
|
||||
if(verboseLevel > 0) {
|
||||
G4cout << "User-defined DumpQuantityToFile() method is invoked."
|
||||
if (verboseLevel > 0) {
|
||||
G4cout << "User-defined DumpQuantityToFile() method is invoked." << G4endl;
|
||||
G4cout << " -- to obtain a projection of the quantity <" << psName << "> onto the x-y plane --"
|
||||
<< G4endl;
|
||||
G4cout << " -- to obtain a projection of the quantity <"
|
||||
<< psName
|
||||
<< "> onto the x-y plane --" << G4endl;
|
||||
}
|
||||
|
||||
// change the option string into lowercase to the case-insensitive.
|
||||
@@ -66,68 +67,63 @@ void RE03UserScoreWriter::DumpQuantityToFile(const G4String & psName,
|
||||
std::transform(opt.begin(), opt.end(), opt.begin(), (int (*)(int))(tolower));
|
||||
|
||||
// confirm the option
|
||||
if(opt.size() == 0) opt = "csv";
|
||||
if (opt.size() == 0) opt = "csv";
|
||||
|
||||
// open the file
|
||||
std::ofstream ofile(fileName);
|
||||
if(!ofile) {
|
||||
G4cerr << "ERROR : DumpToFile : File open error -> "
|
||||
<< fileName << G4endl;
|
||||
if (!ofile) {
|
||||
G4cerr << "ERROR : DumpToFile : File open error -> " << fileName << G4endl;
|
||||
return;
|
||||
}
|
||||
ofile << "# mesh name: " << fScoringMesh->GetWorldName() << G4endl;
|
||||
|
||||
|
||||
// retrieve the map
|
||||
MeshScoreMap scMap = fScoringMesh->GetScoreMap();
|
||||
|
||||
MeshScoreMap::const_iterator msMapItr = scMap.find(psName);
|
||||
if(msMapItr == scMap.end()) {
|
||||
G4cerr << "ERROR : DumpToFile : Unknown quantity, \""
|
||||
<< psName << "\"." << G4endl;
|
||||
if (msMapItr == scMap.end()) {
|
||||
G4cerr << "ERROR : DumpToFile : Unknown quantity, \"" << psName << "\"." << G4endl;
|
||||
return;
|
||||
}
|
||||
std::map<G4int, G4StatDouble*> * score = msMapItr->second->GetMap();
|
||||
std::map<G4int, G4StatDouble*>* score = msMapItr->second->GetMap();
|
||||
ofile << "# primitive scorer name: " << msMapItr->first << G4endl;
|
||||
|
||||
// write header info
|
||||
// write header info
|
||||
ofile << "# xy projection" << G4endl;
|
||||
ofile << fNMeshSegments[0] << " " << fNMeshSegments[1] << " " << G4endl;
|
||||
|
||||
// declare xy array
|
||||
std::vector<double> projy;
|
||||
for(int y = 0; y < fNMeshSegments[1]; y++) projy.push_back(0.);
|
||||
std::vector<std::vector<double> > projxy;
|
||||
for(int x = 0; x < fNMeshSegments[0]; x++) projxy.push_back(projy);
|
||||
for (int y = 0; y < fNMeshSegments[1]; y++)
|
||||
projy.push_back(0.);
|
||||
std::vector<std::vector<double>> projxy;
|
||||
for (int x = 0; x < fNMeshSegments[0]; x++)
|
||||
projxy.push_back(projy);
|
||||
// accumulate
|
||||
ofile << std::setprecision(16); // for double value with 8 bytes
|
||||
for(int x = 0; x < fNMeshSegments[0]; x++) {
|
||||
for(int y = 0; y < fNMeshSegments[1]; y++) {
|
||||
for(int z = 0; z < fNMeshSegments[2]; z++) {
|
||||
|
||||
ofile << std::setprecision(16); // for double value with 8 bytes
|
||||
for (int x = 0; x < fNMeshSegments[0]; x++) {
|
||||
for (int y = 0; y < fNMeshSegments[1]; y++) {
|
||||
for (int z = 0; z < fNMeshSegments[2]; z++) {
|
||||
G4int idx = GetIndex(x, y, z);
|
||||
|
||||
std::map<G4int, G4StatDouble*>::iterator value = score->find(idx);
|
||||
if(value != score->end()) projxy[x][y] += value->second->sum_wx();
|
||||
|
||||
} // z
|
||||
} // y
|
||||
} // x
|
||||
std::map<G4int, G4StatDouble*>::iterator value = score->find(idx);
|
||||
if (value != score->end()) projxy[x][y] += value->second->sum_wx();
|
||||
|
||||
} // z
|
||||
} // y
|
||||
} // x
|
||||
|
||||
// write quantity
|
||||
ofile << std::setprecision(16); // for double value with 8 bytes
|
||||
for(int x = 0; x < fNMeshSegments[0]; x++) {
|
||||
for(int y = 0; y < fNMeshSegments[1]; y++) {
|
||||
|
||||
ofile << std::setprecision(16); // for double value with 8 bytes
|
||||
for (int x = 0; x < fNMeshSegments[0]; x++) {
|
||||
for (int y = 0; y < fNMeshSegments[1]; y++) {
|
||||
ofile << x << "," << y << ",";
|
||||
ofile << projxy[x][y] << G4endl;
|
||||
|
||||
} // y
|
||||
} // x
|
||||
} // y
|
||||
} // x
|
||||
ofile << std::setprecision(6);
|
||||
|
||||
// close the file
|
||||
ofile.close();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -27,82 +27,77 @@
|
||||
/// \brief Main program of the runAndEvent/RE04 example
|
||||
//
|
||||
//
|
||||
#include "G4Types.hh"
|
||||
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4ScoringManager.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#include "G4VisExecutive.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "RE04ActionInitialization.hh"
|
||||
#include "RE04DetectorConstruction.hh"
|
||||
#include "RE04ParallelWorldConstruction.hh"
|
||||
|
||||
#include "FTFP_BERT.hh"
|
||||
#include "G4ParallelWorldPhysics.hh"
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4ScoringManager.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4UIExecutive.hh"
|
||||
#include "G4UImanager.hh"
|
||||
#include "G4VisExecutive.hh"
|
||||
|
||||
int main(int argc,char** argv)
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if ( argc == 1 ) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
// Instantiate G4UIExecutive if there are no arguments (interactive mode)
|
||||
G4UIExecutive* ui = nullptr;
|
||||
if (argc == 1) {
|
||||
ui = new G4UIExecutive(argc, argv);
|
||||
}
|
||||
|
||||
// Construct the run manager
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
|
||||
G4ScoringManager::GetScoringManager();
|
||||
// Construct the run manager
|
||||
auto* runManager = G4RunManagerFactory::CreateRunManager();
|
||||
|
||||
G4String paraWorldName = "ParallelWorld";
|
||||
G4ScoringManager::GetScoringManager();
|
||||
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
RE04DetectorConstruction* realWorld = new RE04DetectorConstruction;
|
||||
RE04ParallelWorldConstruction* parallelWorld
|
||||
= new RE04ParallelWorldConstruction(paraWorldName);
|
||||
realWorld->RegisterParallelWorld(parallelWorld);
|
||||
runManager->SetUserInitialization(realWorld);
|
||||
//
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics
|
||||
(new G4ParallelWorldPhysics(paraWorldName,true));
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
G4String paraWorldName = "ParallelWorld";
|
||||
|
||||
// Set user action classes
|
||||
//
|
||||
runManager->SetUserInitialization(new RE04ActionInitialization);
|
||||
// Set mandatory initialization classes
|
||||
//
|
||||
RE04DetectorConstruction* realWorld = new RE04DetectorConstruction;
|
||||
RE04ParallelWorldConstruction* parallelWorld = new RE04ParallelWorldConstruction(paraWorldName);
|
||||
realWorld->RegisterParallelWorld(parallelWorld);
|
||||
runManager->SetUserInitialization(realWorld);
|
||||
//
|
||||
G4VModularPhysicsList* physicsList = new FTFP_BERT;
|
||||
physicsList->RegisterPhysics(new G4ParallelWorldPhysics(paraWorldName, true));
|
||||
runManager->SetUserInitialization(physicsList);
|
||||
|
||||
// Visualization manager
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
// Set user action classes
|
||||
//
|
||||
runManager->SetUserInitialization(new RE04ActionInitialization);
|
||||
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
// Visualization manager
|
||||
//
|
||||
G4VisManager* visManager = new G4VisExecutive;
|
||||
visManager->Initialize();
|
||||
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* pUImanager = G4UImanager::GetUIpointer();
|
||||
// Initialize G4 kernel
|
||||
//
|
||||
runManager->Initialize();
|
||||
|
||||
if (ui) // Define UI session for interactive mode
|
||||
{
|
||||
pUImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
pUImanager->ApplyCommand(command+fileName);
|
||||
}
|
||||
// Get the pointer to the User Interface manager
|
||||
//
|
||||
G4UImanager* pUImanager = G4UImanager::GetUIpointer();
|
||||
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
if (ui) // Define UI session for interactive mode
|
||||
{
|
||||
pUImanager->ApplyCommand("/control/execute vis.mac");
|
||||
ui->SessionStart();
|
||||
delete ui;
|
||||
}
|
||||
else // Batch mode
|
||||
{
|
||||
G4String command = "/control/execute ";
|
||||
G4String fileName = argv[1];
|
||||
pUImanager->ApplyCommand(command + fileName);
|
||||
}
|
||||
|
||||
return 0;
|
||||
delete visManager;
|
||||
delete runManager;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ Environment variable "G4FORCE_RUN_MANAGER_TYPE" enabled with value == Serial. Fo
|
||||
|
||||
|
||||
**************************************************************
|
||||
Geant4 version Name: geant4-11-02-patch-02 (21-June-2024)
|
||||
Geant4 version Name: geant4-11-02-ref-06 (28-June-2024)
|
||||
Copyright : Geant4 Collaboration
|
||||
References : NIM A 506 (2003), 250-303
|
||||
: IEEE-TNS 53 (2006), 270-278
|
||||
@@ -44,14 +44,21 @@ Registered graphics systems are:
|
||||
RayTracerX (RayTracerX)
|
||||
Qt3D (Qt3D)
|
||||
TOOLSSG_X11_GLES (TSG_X11_GLES, TSGX11, TSG_XT_GLES_FALLBACK)
|
||||
TOOLSSG_X11_ZB (TSG_X11_ZB, TSGX11ZB)
|
||||
TOOLSSG_XT_GLES (TSG_XT_GLES, TSGXt, TSG_QT_GLES_FALLBACK)
|
||||
TOOLSSG_XT_ZB (TSG_XT_ZB, TSGXtZB)
|
||||
TOOLSSG_QT_GLES (TSG_QT_GLES, TSGQt, TSG)
|
||||
TOOLSSG_QT_ZB (TSG_QT_ZB, TSGQtZB)
|
||||
Default graphics system is: TSG_OFFSCREEN (based on batch session).
|
||||
Default window size hint is: 600x600-0+0 (based on G4VisManager initialisation).
|
||||
Note: Parameters specified on the command line will override these defaults.
|
||||
Use "vis/open" without parameters to get these defaults.
|
||||
You may choose a graphics system (driver) with a parameter of
|
||||
the command "/vis/open" or "/vis/sceneHandler/create",
|
||||
or you may omit the driver parameter and choose at run time:
|
||||
- by argument in the construction of G4VisExecutive
|
||||
- by environment variable "G4VIS_DEFAULT_DRIVER"
|
||||
- by entry in "~/.g4session"
|
||||
- by build flags.
|
||||
- Note: This feature is not allowed in batch mode.
|
||||
For further information see "examples/basic/B1/exampleB1.cc"
|
||||
and "vis.mac".
|
||||
|
||||
Registering model factories...
|
||||
|
||||
@@ -296,7 +303,7 @@ eBrem: for e+ XStype:4 SubType=3
|
||||
eBremSB : Emin= 0 eV Emax= 1 GeV ModifiedTsai
|
||||
eBremLPM : Emin= 1 GeV Emax= 100 TeV ModifiedTsai
|
||||
|
||||
annihil: for e+ XStype:2 SubType=5 BuildTable=0
|
||||
annihil: for e+ XStype:2 SubType=5 AtRestModel:Simple BuildTable=0
|
||||
===== EM models for the G4Region DefaultRegionForTheWorld ======
|
||||
eplus2gg : Emin= 0 eV Emax= 100 TeV
|
||||
|
||||
@@ -851,7 +858,7 @@ Min energy per nucleon for multifragmentation 200 GeV
|
||||
Limit excitation energy for Fermi BreakUp 20 MeV
|
||||
Level density (1/MeV) 0.075
|
||||
Use simple level density model 1
|
||||
Use discrete excitation energy of the residual 1
|
||||
Use discrete excitation energy of the residual 0
|
||||
Time limit for long lived isomeres 1 ns
|
||||
Isomer production flag 1
|
||||
Internal e- conversion flag 1
|
||||
|
||||
@@ -31,21 +31,20 @@
|
||||
#ifndef RE04ActionInitialization_H
|
||||
#define RE04ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE04ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
public:
|
||||
RE04ActionInitialization();//G4bool bParallelWorld);
|
||||
RE04ActionInitialization(); // G4bool bParallelWorld);
|
||||
virtual ~RE04ActionInitialization();
|
||||
|
||||
virtual void Build() const;
|
||||
virtual void BuildForMaster() const;
|
||||
|
||||
private:
|
||||
//G4bool m_bParallelWorld;
|
||||
private:
|
||||
// G4bool m_bParallelWorld;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class RE04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void SetupGeometry();
|
||||
@@ -65,8 +65,6 @@ class RE04DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4Material* fPb;
|
||||
G4VPhysicalVolume* fWorldPhys;
|
||||
G4bool fConstructed;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -46,17 +46,15 @@ class G4PrimaryParticle;
|
||||
//
|
||||
class RE04EventAction : public G4UserEventAction
|
||||
{
|
||||
public:
|
||||
RE04EventAction();
|
||||
~RE04EventAction();
|
||||
public:
|
||||
RE04EventAction();
|
||||
~RE04EventAction();
|
||||
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
public:
|
||||
virtual void BeginOfEventAction(const G4Event*);
|
||||
virtual void EndOfEventAction(const G4Event*);
|
||||
|
||||
// private:
|
||||
// private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -56,4 +56,3 @@ class RE04ParallelWorldConstruction : public G4VUserParallelWorld
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#ifndef RE04ParallelWorldParam_h
|
||||
#define RE04ParallelWorldParam_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Material;
|
||||
@@ -52,7 +52,7 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
//
|
||||
/// Parameterisation class for volumes in a parallel world
|
||||
/// Parameterisation class for volumes in a parallel world
|
||||
///
|
||||
/// - void ComputeTransformation(const G4int copyNo,
|
||||
/// G4VPhysicalVolume *physVol) const
|
||||
@@ -70,48 +70,30 @@ class G4Polyhedra;
|
||||
class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
RE04ParallelWorldParam();
|
||||
~RE04ParallelWorldParam();
|
||||
~RE04ParallelWorldParam();
|
||||
|
||||
public:
|
||||
|
||||
void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
G4Material* ComputeMaterial(const G4int copyNo,
|
||||
G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch=0);
|
||||
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
G4Material* ComputeMaterial(const G4int copyNo, G4VPhysicalVolume* currentVol,
|
||||
const G4VTouchable* parentTouch = 0);
|
||||
|
||||
public:
|
||||
virtual void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*)
|
||||
const {}
|
||||
virtual void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
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 (G4Orb&,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 (G4Tubs&,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(G4Orb&, 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(G4Tubs&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
G4Material* fWater;
|
||||
@@ -119,4 +101,3 @@ class RE04ParallelWorldParam : public G4VPVParameterisation
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -40,14 +40,14 @@ class G4Event;
|
||||
/// User primary particle generator class
|
||||
///
|
||||
/// - void GeneratePrimaries(G4Event*)
|
||||
/// an incident particle is mu- with 10 GeV energy at the position
|
||||
/// an incident particle is mu- with 10 GeV energy at the position
|
||||
/// (-75 cm,y,0) toward the (1,0,0) direction. The y position is uniformly
|
||||
/// varied from 95.5 cm to 96.5 cm.
|
||||
//
|
||||
class RE04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
{
|
||||
public:
|
||||
RE04PrimaryGeneratorAction();
|
||||
RE04PrimaryGeneratorAction();
|
||||
virtual ~RE04PrimaryGeneratorAction();
|
||||
|
||||
public:
|
||||
@@ -55,9 +55,6 @@ class RE04PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -48,4 +48,3 @@ class RE04SteppingAction : public G4UserSteppingAction
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -41,15 +41,14 @@
|
||||
/// - void PostUserTrackingAction(const G4Track*)
|
||||
/// does nothing
|
||||
//
|
||||
class RE04TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
class RE04TrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
RE04TrackingAction() : G4UserTrackingAction() {};
|
||||
virtual ~RE04TrackingAction(){};
|
||||
|
||||
virtual ~RE04TrackingAction() {};
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
virtual void PostUserTrackingAction(const G4Track*);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,20 +30,22 @@
|
||||
#ifndef RE04Trajectory_h
|
||||
#define RE04Trajectory_h 1
|
||||
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "RE04TrajectoryPoint.hh" // Include from 'tracking'
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
#include "globals.hh" // Include from 'global'
|
||||
#include "G4ParticleDefinition.hh" // Include from 'particle+matter'
|
||||
#include "RE04TrajectoryPoint.hh" // Include from 'tracking'
|
||||
#include "G4Track.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4Track.hh"
|
||||
#include "G4VTrajectory.hh"
|
||||
#include "G4ios.hh" // Include from 'system'
|
||||
#include "globals.hh" // Include from 'global'
|
||||
|
||||
class G4Polyline; // Forward declaration.
|
||||
#include <stdlib.h> // Include from 'system'
|
||||
#include <vector> // G4RWTValOrderedVector
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
class G4Polyline; // Forward declaration.
|
||||
|
||||
typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
|
||||
//
|
||||
/// User trajectory class
|
||||
@@ -68,7 +70,7 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
/// - int GetPointEntries() const
|
||||
/// returns the number of point entries
|
||||
///
|
||||
/// - G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
/// - G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
/// gets the i-th trajectory point
|
||||
///
|
||||
/// - void MergeTrajectory(G4VTrajectory* secondTrajectory)
|
||||
@@ -80,7 +82,7 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
/// - const std::map<G4String,G4AttDef>* GetAttDefs() const
|
||||
/// defines the track ID, the parent ID, the particle name, the charge,
|
||||
/// the PDG encoding, the initial kinetic energy, the initial momentum,
|
||||
/// the initial momentum magnitude and the number of points as attiributes
|
||||
/// the initial momentum magnitude and the number of points as attiributes
|
||||
///
|
||||
/// - std::vector<G4AttValue>* CreateAttValues() const
|
||||
/// sets and returns the attributes
|
||||
@@ -89,76 +91,65 @@ typedef std::vector<G4VTrajectoryPoint*> TrajectoryPointContainer;
|
||||
class RE04Trajectory : public G4VTrajectory
|
||||
///////////////////
|
||||
{
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
// Constructor/Destrcutor
|
||||
|
||||
// Constructor/Destrcutor
|
||||
RE04Trajectory();
|
||||
|
||||
RE04Trajectory();
|
||||
RE04Trajectory(const G4Track* aTrack);
|
||||
RE04Trajectory(RE04Trajectory&);
|
||||
virtual ~RE04Trajectory();
|
||||
|
||||
RE04Trajectory(const G4Track* aTrack);
|
||||
RE04Trajectory(RE04Trajectory &);
|
||||
virtual ~RE04Trajectory();
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator==(const RE04Trajectory& right) const { return (this == &right); }
|
||||
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline int operator == (const RE04Trajectory& right) const
|
||||
{return (this==&right);}
|
||||
// Get/Set functions
|
||||
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 G4double GetInitialKineticEnergy() const { return fInitialKineticEnergy; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const { return fInitialMomentum; }
|
||||
|
||||
// Get/Set functions
|
||||
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 G4double GetInitialKineticEnergy() const
|
||||
{ return fInitialKineticEnergy; }
|
||||
inline virtual G4ThreeVector GetInitialMomentum() const
|
||||
{ return fInitialMomentum; }
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os = G4cout) const;
|
||||
// virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const { return (*fPositionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
|
||||
// Other member functions
|
||||
virtual void ShowTrajectory(std::ostream& os=G4cout) const;
|
||||
//virtual void DrawTrajectory() const;
|
||||
virtual void DrawTrajectory() const;
|
||||
virtual void AppendStep(const G4Step* aStep);
|
||||
virtual int GetPointEntries() const { return fPositionRecord->size(); }
|
||||
virtual G4VTrajectoryPoint* GetPoint(G4int i) const
|
||||
{ return (*fPositionRecord)[i]; }
|
||||
virtual void MergeTrajectory(G4VTrajectory* secondTrajectory);
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
|
||||
G4ParticleDefinition* GetParticleDefinition();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fPDGEncoding;
|
||||
G4double fPDGCharge;
|
||||
G4String fParticleName;
|
||||
G4double fInitialKineticEnergy;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
TrajectoryPointContainer* fPositionRecord;
|
||||
G4int fTrackID;
|
||||
G4int fParentID;
|
||||
G4int fPDGEncoding;
|
||||
G4double fPDGCharge;
|
||||
G4String fParticleName;
|
||||
G4double fInitialKineticEnergy;
|
||||
G4ThreeVector fInitialMomentum;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE04Trajectory> * faTrajAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04Trajectory>* faTrajAllocator;
|
||||
|
||||
inline void* RE04Trajectory::operator new(size_t)
|
||||
{
|
||||
if(!faTrajAllocator) faTrajAllocator = new G4Allocator<RE04Trajectory>;
|
||||
if (!faTrajAllocator) faTrajAllocator = new G4Allocator<RE04Trajectory>;
|
||||
return (void*)faTrajAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
@@ -168,4 +159,3 @@ inline void RE04Trajectory::operator delete(void* aTrajectory)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#ifndef RE04TrajectoryPoint_h
|
||||
#define RE04TrajectoryPoint_h 1
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4VTrajectoryPoint.hh"
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Allocator.hh"
|
||||
class G4Material;
|
||||
|
||||
//
|
||||
@@ -48,65 +48,58 @@ class G4Material;
|
||||
/// gets material that this trajectory has.
|
||||
///
|
||||
/// - const std::map<G4String,G4AttDef>* GetAttDefs() const
|
||||
/// defines the position and the material as attiributes
|
||||
/// defines the position and the material as attiributes
|
||||
///
|
||||
/// - std::vector<G4AttValue>* CreateAttValues() const
|
||||
/// sets and returns the attributes
|
||||
//
|
||||
////////////////////////
|
||||
class RE04TrajectoryPoint : public G4VTrajectoryPoint
|
||||
////////////////////////
|
||||
////////////////////////
|
||||
{
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
|
||||
//--------
|
||||
public:
|
||||
//--------
|
||||
// Constructor/Destructor
|
||||
RE04TrajectoryPoint();
|
||||
RE04TrajectoryPoint(G4ThreeVector pos, const G4Material* mat);
|
||||
RE04TrajectoryPoint(const RE04TrajectoryPoint& right);
|
||||
virtual ~RE04TrajectoryPoint();
|
||||
|
||||
// Constructor/Destructor
|
||||
RE04TrajectoryPoint();
|
||||
RE04TrajectoryPoint(G4ThreeVector pos,const G4Material* mat);
|
||||
RE04TrajectoryPoint(const RE04TrajectoryPoint &right);
|
||||
virtual ~RE04TrajectoryPoint();
|
||||
// Operators
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aTrajectoryPoint);
|
||||
inline G4bool operator==(const RE04TrajectoryPoint& right) const { return (this == &right); };
|
||||
|
||||
// Operators
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aTrajectoryPoint);
|
||||
inline G4bool operator==(const RE04TrajectoryPoint& right) const
|
||||
{ return (this==&right); };
|
||||
// Get/Set functions
|
||||
inline virtual const G4ThreeVector GetPosition() const { return fPosition; };
|
||||
inline const G4Material* GetMaterial() const { return fpMaterial; };
|
||||
|
||||
// Get/Set functions
|
||||
inline virtual const G4ThreeVector GetPosition() const
|
||||
{ return fPosition; };
|
||||
inline const G4Material* GetMaterial() const
|
||||
{ return fpMaterial; };
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
// Get method for HEPRep style attributes
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
G4ThreeVector fPosition;
|
||||
const G4Material* fpMaterial;
|
||||
//---------
|
||||
private:
|
||||
//---------
|
||||
|
||||
// Member data
|
||||
G4ThreeVector fPosition;
|
||||
const G4Material* fpMaterial;
|
||||
};
|
||||
|
||||
extern G4ThreadLocal G4Allocator<RE04TrajectoryPoint> * faTrajPointAllocator;
|
||||
extern G4ThreadLocal G4Allocator<RE04TrajectoryPoint>* faTrajPointAllocator;
|
||||
|
||||
inline void* RE04TrajectoryPoint::operator new(size_t)
|
||||
{
|
||||
if(!faTrajPointAllocator)
|
||||
faTrajPointAllocator = new G4Allocator<RE04TrajectoryPoint>;
|
||||
return (void *) faTrajPointAllocator->MallocSingle();
|
||||
if (!faTrajPointAllocator) faTrajPointAllocator = new G4Allocator<RE04TrajectoryPoint>;
|
||||
return (void*)faTrajPointAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE04TrajectoryPoint::operator delete(void *aTrajectoryPoint)
|
||||
inline void RE04TrajectoryPoint::operator delete(void* aTrajectoryPoint)
|
||||
{
|
||||
faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint *) aTrajectoryPoint);
|
||||
faTrajPointAllocator->FreeSingle((RE04TrajectoryPoint*)aTrajectoryPoint);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -29,18 +29,23 @@
|
||||
//
|
||||
|
||||
#include "RE04ActionInitialization.hh"
|
||||
#include "RE04PrimaryGeneratorAction.hh"
|
||||
|
||||
#include "RE04EventAction.hh"
|
||||
//#include "RE04TrackingAction.hh"
|
||||
//#include "RE04SteppingAction.hh"
|
||||
#include "RE04PrimaryGeneratorAction.hh"
|
||||
// #include "RE04TrackingAction.hh"
|
||||
// #include "RE04SteppingAction.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ActionInitialization::RE04ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ActionInitialization::~RE04ActionInitialization()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04ActionInitialization::Build() const
|
||||
@@ -50,16 +55,14 @@ void RE04ActionInitialization::Build() const
|
||||
//
|
||||
SetUserAction(new RE04EventAction);
|
||||
//
|
||||
//SetUserAction(new RE04TrackingAction);
|
||||
//SetUserAction(new RE04SteppingAction);
|
||||
|
||||
// SetUserAction(new RE04TrackingAction);
|
||||
// SetUserAction(new RE04SteppingAction);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04ActionInitialization::BuildForMaster() const
|
||||
{
|
||||
//
|
||||
//G4UserRunAction* run_action = new RE04RunAction;
|
||||
//SetUserAction(run_action);
|
||||
// G4UserRunAction* run_action = new RE04RunAction;
|
||||
// SetUserAction(run_action);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,35 +29,36 @@
|
||||
//
|
||||
#include "RE04DetectorConstruction.hh"
|
||||
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4FieldManager.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4NistManager.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4UniformMagField.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4ios.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04DetectorConstruction::RE04DetectorConstruction()
|
||||
: G4VUserDetectorConstruction(),
|
||||
fAir(0), fWater(0), fPb(0), fWorldPhys(0), fConstructed(false)
|
||||
{;}
|
||||
: G4VUserDetectorConstruction(), fAir(0), fWater(0), fPb(0), fWorldPhys(0), fConstructed(false)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04DetectorConstruction::~RE04DetectorConstruction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* RE04DetectorConstruction::Construct()
|
||||
{
|
||||
if(!fConstructed)
|
||||
{
|
||||
if (!fConstructed) {
|
||||
fConstructed = true;
|
||||
DefineMaterials();
|
||||
SetupGeometry();
|
||||
@@ -67,17 +68,17 @@ G4VPhysicalVolume* RE04DetectorConstruction::Construct()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04DetectorConstruction::DefineMaterials()
|
||||
{
|
||||
{
|
||||
//=====================
|
||||
// Material Definitions
|
||||
//=====================
|
||||
//
|
||||
//
|
||||
//-------- NIST Materials ----------------------------------------------------
|
||||
// Material Information imported from NIST database.
|
||||
//
|
||||
G4NistManager* pNISTman = G4NistManager::Instance();
|
||||
fAir = pNISTman->FindOrBuildMaterial("G4_AIR");
|
||||
fWater = pNISTman->FindOrBuildMaterial("G4_WATER");
|
||||
fAir = pNISTman->FindOrBuildMaterial("G4_AIR");
|
||||
fWater = pNISTman->FindOrBuildMaterial("G4_WATER");
|
||||
fPb = pNISTman->FindOrBuildMaterial("G4_Pb");
|
||||
|
||||
//
|
||||
@@ -89,30 +90,25 @@ void RE04DetectorConstruction::DefineMaterials()
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04DetectorConstruction::SetupGeometry()
|
||||
{
|
||||
//
|
||||
//
|
||||
// World
|
||||
//
|
||||
G4VSolid* worldSolid = new G4Box("World",1.*m,1.*m,1.*m);
|
||||
G4LogicalVolume* worldLogical = new G4LogicalVolume(worldSolid,fAir,"World");
|
||||
fWorldPhys = new G4PVPlacement(0,G4ThreeVector(),worldLogical,"World",
|
||||
0,false,0);
|
||||
|
||||
//
|
||||
// Phantom
|
||||
//
|
||||
G4VSolid* phantomSolid = new G4Box("Phantom",50.*cm,50.*cm,50.*cm);
|
||||
G4LogicalVolume* phantomLogical = new G4LogicalVolume(phantomSolid,fAir,
|
||||
"Phantom");
|
||||
new G4PVPlacement(0,G4ThreeVector(),phantomLogical,"Phantom",
|
||||
worldLogical,false,0);
|
||||
G4VSolid* worldSolid = new G4Box("World", 1. * m, 1. * m, 1. * m);
|
||||
G4LogicalVolume* worldLogical = new G4LogicalVolume(worldSolid, fAir, "World");
|
||||
fWorldPhys = new G4PVPlacement(0, G4ThreeVector(), worldLogical, "World", 0, false, 0);
|
||||
|
||||
//
|
||||
//
|
||||
// Phantom
|
||||
//
|
||||
G4VSolid* phantomSolid = new G4Box("Phantom", 50. * cm, 50. * cm, 50. * cm);
|
||||
G4LogicalVolume* phantomLogical = new G4LogicalVolume(phantomSolid, fAir, "Phantom");
|
||||
new G4PVPlacement(0, G4ThreeVector(), phantomLogical, "Phantom", worldLogical, false, 0);
|
||||
|
||||
//
|
||||
// Visualization attributes
|
||||
//
|
||||
worldLogical->SetVisAttributes(G4VisAttributes::GetInvisible());
|
||||
G4VisAttributes* simpleBoxVisAtt= new G4VisAttributes(G4Colour(1.0,1.0,1.0));
|
||||
G4VisAttributes* simpleBoxVisAtt = new G4VisAttributes(G4Colour(1.0, 1.0, 1.0));
|
||||
simpleBoxVisAtt->SetVisibility(true);
|
||||
phantomLogical->SetVisAttributes(simpleBoxVisAtt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -29,45 +29,47 @@
|
||||
//
|
||||
#include "RE04EventAction.hh"
|
||||
|
||||
#include "RE04Trajectory.hh"
|
||||
|
||||
#include "G4Event.hh"
|
||||
#include "G4EventManager.hh"
|
||||
#include "G4HCofThisEvent.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4TrajectoryContainer.hh"
|
||||
#include "G4VHitsCollection.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4ios.hh"
|
||||
#include "RE04Trajectory.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04EventAction::RE04EventAction()
|
||||
: G4UserEventAction()
|
||||
{;}
|
||||
RE04EventAction::RE04EventAction() : G4UserEventAction()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04EventAction::~RE04EventAction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04EventAction::BeginOfEventAction(const G4Event*)
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04EventAction::EndOfEventAction(const G4Event* evt)
|
||||
{
|
||||
G4cout << ">>> Summary of Event " << evt->GetEventID() << G4endl;
|
||||
|
||||
|
||||
// get number of stored trajectories
|
||||
G4TrajectoryContainer* trajectoryContainer = evt->GetTrajectoryContainer();
|
||||
G4int n_trajectories = 0;
|
||||
if (trajectoryContainer) n_trajectories = trajectoryContainer->entries();
|
||||
// extract the trajectories and print them out
|
||||
G4cout << G4endl;
|
||||
for(G4int i=0; i<n_trajectories; i++)
|
||||
{
|
||||
RE04Trajectory* trj
|
||||
= (RE04Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
for (G4int i = 0; i < n_trajectories; i++) {
|
||||
RE04Trajectory* trj = (RE04Trajectory*)((*(evt->GetTrajectoryContainer()))[i]);
|
||||
trj->ShowTrajectory();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,29 +28,33 @@
|
||||
//
|
||||
//
|
||||
#include "RE04ParallelWorldConstruction.hh"
|
||||
|
||||
#include "RE04ParallelWorldParam.hh"
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4PVParameterised.hh"
|
||||
#include "G4PVPlacement.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ParallelWorldConstruction
|
||||
::RE04ParallelWorldConstruction(G4String& parallelWorldName)
|
||||
:G4VUserParallelWorld(parallelWorldName),fConstructed(false)
|
||||
{;}
|
||||
RE04ParallelWorldConstruction ::RE04ParallelWorldConstruction(G4String& parallelWorldName)
|
||||
: G4VUserParallelWorld(parallelWorldName), fConstructed(false)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ParallelWorldConstruction::~RE04ParallelWorldConstruction()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04ParallelWorldConstruction::Construct()
|
||||
{
|
||||
if(fConstructed) return;
|
||||
if (fConstructed) return;
|
||||
fConstructed = true;
|
||||
|
||||
//
|
||||
@@ -67,28 +71,24 @@ void RE04ParallelWorldConstruction::Construct()
|
||||
//
|
||||
// parallel world placement box
|
||||
//
|
||||
G4VSolid* paraBox = new G4Box("paraBox",5.0*cm,30.0*cm,5.0*cm);
|
||||
G4LogicalVolume* paraBoxLogical = new G4LogicalVolume(paraBox,water,
|
||||
"paraBox");
|
||||
new G4PVPlacement(0,G4ThreeVector(-25.0*cm,0.,0.),paraBoxLogical,
|
||||
"paraBox",worldLogical,false,0);
|
||||
G4VSolid* paraBox = new G4Box("paraBox", 5.0 * cm, 30.0 * cm, 5.0 * cm);
|
||||
G4LogicalVolume* paraBoxLogical = new G4LogicalVolume(paraBox, water, "paraBox");
|
||||
new G4PVPlacement(0, G4ThreeVector(-25.0 * cm, 0., 0.), paraBoxLogical, "paraBox", worldLogical,
|
||||
false, 0);
|
||||
|
||||
//
|
||||
// mother of parallel world parameterized volumes
|
||||
//
|
||||
G4VSolid* paraMom = new G4Box("paraMom",20.0*cm,40.0*cm,20.0*cm);
|
||||
G4LogicalVolume* paraMomLogical = new G4LogicalVolume(paraMom,0,"paraMom");
|
||||
new G4PVPlacement(0,G4ThreeVector(10.0*cm,0.,0.),paraMomLogical,"paraMom",
|
||||
worldLogical,false,0);
|
||||
G4VSolid* paraMom = new G4Box("paraMom", 20.0 * cm, 40.0 * cm, 20.0 * cm);
|
||||
G4LogicalVolume* paraMomLogical = new G4LogicalVolume(paraMom, 0, "paraMom");
|
||||
new G4PVPlacement(0, G4ThreeVector(10.0 * cm, 0., 0.), paraMomLogical, "paraMom", worldLogical,
|
||||
false, 0);
|
||||
|
||||
//
|
||||
// parallel world parameterized volumes
|
||||
//
|
||||
G4VSolid* paraPara = new G4Box("paraPara",5.0*cm,15.0*cm,10.0*cm);
|
||||
G4LogicalVolume* paraParaLogical = new G4LogicalVolume(paraPara,water,
|
||||
"paraPara");
|
||||
G4VSolid* paraPara = new G4Box("paraPara", 5.0 * cm, 15.0 * cm, 10.0 * cm);
|
||||
G4LogicalVolume* paraParaLogical = new G4LogicalVolume(paraPara, water, "paraPara");
|
||||
RE04ParallelWorldParam* param = new RE04ParallelWorldParam();
|
||||
new G4PVParameterised("paraPara",paraParaLogical,paraMomLogical,
|
||||
kXAxis, 2, param);
|
||||
|
||||
new G4PVParameterised("paraPara", paraParaLogical, paraMomLogical, kXAxis, 2, param);
|
||||
}
|
||||
|
||||
@@ -29,15 +29,13 @@
|
||||
//
|
||||
#include "RE04ParallelWorldParam.hh"
|
||||
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4Box.hh"
|
||||
#include "G4Material.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ParallelWorldParam::RE04ParallelWorldParam()
|
||||
: G4VPVParameterisation(),
|
||||
fWater(0), fPb(0)
|
||||
RE04ParallelWorldParam::RE04ParallelWorldParam() : G4VPVParameterisation(), fWater(0), fPb(0)
|
||||
{
|
||||
fWater = G4Material::GetMaterial("G4_WATER");
|
||||
fPb = G4Material::GetMaterial("G4_Pb");
|
||||
@@ -45,18 +43,22 @@ RE04ParallelWorldParam::RE04ParallelWorldParam()
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE04ParallelWorldParam::~RE04ParallelWorldParam()
|
||||
{;}
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
void RE04ParallelWorldParam::ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const
|
||||
G4VPhysicalVolume* physVol) const
|
||||
{
|
||||
G4double x = copyNo ? -10.0*cm : 10.0*cm;
|
||||
physVol->SetTranslation(G4ThreeVector(x,x,0.));
|
||||
G4double x = copyNo ? -10.0 * cm : 10.0 * cm;
|
||||
physVol->SetTranslation(G4ThreeVector(x, x, 0.));
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4Material* RE04ParallelWorldParam::ComputeMaterial(const G4int copyNo,
|
||||
G4VPhysicalVolume* /*currentVol*/,const G4VTouchable* /*parentTouch*/)
|
||||
{ return copyNo ? fWater: fPb; }
|
||||
|
||||
G4VPhysicalVolume* /*currentVol*/,
|
||||
const G4VTouchable* /*parentTouch*/)
|
||||
{
|
||||
return copyNo ? fWater : fPb;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user