Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -31,8 +31,8 @@
|
||||
#ifndef RE05ActionInitialization_H
|
||||
#define RE05ActionInitialization_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserActionInitialization.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE05ActionInitialization : public G4VUserActionInitialization
|
||||
{
|
||||
@@ -45,4 +45,3 @@ class RE05ActionInitialization : public G4VUserActionInitialization
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,70 +31,60 @@
|
||||
#ifndef RE05CalorimeterHit_h
|
||||
#define RE05CalorimeterHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4RotationMatrix.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Transform3D.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
|
||||
class RE05CalorimeterHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
RE05CalorimeterHit();
|
||||
RE05CalorimeterHit(G4LogicalVolume* logVol, G4int z, G4int phi);
|
||||
virtual ~RE05CalorimeterHit();
|
||||
RE05CalorimeterHit(const RE05CalorimeterHit& right);
|
||||
const RE05CalorimeterHit& operator=(const RE05CalorimeterHit& right);
|
||||
G4bool operator==(const RE05CalorimeterHit& right) const;
|
||||
|
||||
RE05CalorimeterHit();
|
||||
RE05CalorimeterHit(G4LogicalVolume* logVol,G4int z,G4int phi);
|
||||
virtual ~RE05CalorimeterHit();
|
||||
RE05CalorimeterHit(const RE05CalorimeterHit &right);
|
||||
const RE05CalorimeterHit& operator=(const RE05CalorimeterHit &right);
|
||||
G4bool operator==(const RE05CalorimeterHit &right) const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
private:
|
||||
G4int fZCellID;
|
||||
G4int fPhiCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fLogV;
|
||||
static std::map<G4String,G4AttDef> fAttDefs;
|
||||
G4int fZCellID;
|
||||
G4int fPhiCellID;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
G4RotationMatrix fRot;
|
||||
const G4LogicalVolume* fLogV;
|
||||
static std::map<G4String, G4AttDef> fAttDefs;
|
||||
|
||||
public:
|
||||
inline void SetCellID(G4int z,G4int phi)
|
||||
{
|
||||
fZCellID = z;
|
||||
fPhiCellID = phi;
|
||||
}
|
||||
inline G4int GetZ() { return fZCellID; }
|
||||
inline G4int GetPhi() { return fPhiCellID; }
|
||||
inline void SetEdep(G4double de)
|
||||
{ fEdep = de; }
|
||||
inline void AddEdep(G4double de)
|
||||
{ fEdep += de; }
|
||||
inline G4double GetEdep()
|
||||
{ return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ fPos = xyz; }
|
||||
inline G4ThreeVector GetPos()
|
||||
{ return fPos; }
|
||||
inline void SetRot(G4RotationMatrix rmat)
|
||||
{ fRot = rmat; }
|
||||
inline G4RotationMatrix GetRot()
|
||||
{ return fRot; }
|
||||
inline const G4LogicalVolume * GetLogV()
|
||||
{ return fLogV; }
|
||||
|
||||
inline void SetCellID(G4int z, G4int phi)
|
||||
{
|
||||
fZCellID = z;
|
||||
fPhiCellID = phi;
|
||||
}
|
||||
inline G4int GetZ() { return fZCellID; }
|
||||
inline G4int GetPhi() { return fPhiCellID; }
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline void AddEdep(G4double de) { fEdep += de; }
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline G4ThreeVector GetPos() { return fPos; }
|
||||
inline void SetRot(G4RotationMatrix rmat) { fRot = rmat; }
|
||||
inline G4RotationMatrix GetRot() { return fRot; }
|
||||
inline const G4LogicalVolume* GetLogV() { return fLogV; }
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<RE05CalorimeterHit> RE05CalorimeterHitsCollection;
|
||||
@@ -103,14 +93,14 @@ extern G4ThreadLocal G4Allocator<RE05CalorimeterHit>* RE05CalorimeterHitAllocato
|
||||
|
||||
inline void* RE05CalorimeterHit::operator new(size_t)
|
||||
{
|
||||
if(!RE05CalorimeterHitAllocator)
|
||||
if (!RE05CalorimeterHitAllocator)
|
||||
RE05CalorimeterHitAllocator = new G4Allocator<RE05CalorimeterHit>;
|
||||
return (void*) RE05CalorimeterHitAllocator->MallocSingle();
|
||||
return (void*)RE05CalorimeterHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE05CalorimeterHit::operator delete(void *aHit)
|
||||
inline void RE05CalorimeterHit::operator delete(void* aHit)
|
||||
{
|
||||
RE05CalorimeterHitAllocator->FreeSingle((RE05CalorimeterHit*) aHit);
|
||||
RE05CalorimeterHitAllocator->FreeSingle((RE05CalorimeterHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -35,17 +35,16 @@
|
||||
|
||||
class RE05CalorimeterParallelWorld : public G4VUserParallelWorld
|
||||
{
|
||||
public:
|
||||
RE05CalorimeterParallelWorld(G4String& parallelWorldName);
|
||||
virtual ~RE05CalorimeterParallelWorld();
|
||||
public:
|
||||
RE05CalorimeterParallelWorld(G4String& parallelWorldName);
|
||||
virtual ~RE05CalorimeterParallelWorld();
|
||||
|
||||
public:
|
||||
virtual void Construct();
|
||||
virtual void ConstructSD();
|
||||
public:
|
||||
virtual void Construct();
|
||||
virtual void ConstructSD();
|
||||
|
||||
private:
|
||||
private:
|
||||
#include "RE05DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE05CalorimeterParametrisation_H
|
||||
#define RE05CalorimeterParametrisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Tubs;
|
||||
@@ -52,49 +52,31 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
class RE05CalorimeterParametrisation : public G4VPVParameterisation
|
||||
{
|
||||
{
|
||||
public:
|
||||
|
||||
RE05CalorimeterParametrisation();
|
||||
~RE05CalorimeterParametrisation();
|
||||
~RE05CalorimeterParametrisation();
|
||||
|
||||
virtual void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
virtual void ComputeDimensions(G4Tubs & calorimeterLayer,
|
||||
const G4int copyNo,
|
||||
const G4VPhysicalVolume * physVol) const;
|
||||
virtual void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
virtual void ComputeDimensions(G4Tubs& calorimeterLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const;
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
virtual void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Ellipsoid&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Torus&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Para&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Hype&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Box&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||
const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Trd&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Trap&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Cons&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Orb&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Sphere&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Ellipsoid&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Torus&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Para&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Hype&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
|
||||
#include "RE05DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#ifndef RE05CalorimeterSD_h
|
||||
#define RE05CalorimeterSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "RE05CalorimeterHit.hh"
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
@@ -40,21 +41,21 @@ class G4TouchableHistory;
|
||||
class RE05CalorimeterSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
RE05CalorimeterSD(G4String name);
|
||||
virtual ~RE05CalorimeterSD();
|
||||
RE05CalorimeterSD(G4String name);
|
||||
virtual ~RE05CalorimeterSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
virtual void Initialize(G4HCofThisEvent* HCE);
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
RE05CalorimeterHitsCollection *fCalCollection;
|
||||
G4int fCellID[20][48];
|
||||
const G4int fNumberOfCellsInZ;
|
||||
const G4int fNumberOfCellsInPhi;
|
||||
RE05CalorimeterHitsCollection* fCalCollection;
|
||||
G4int fCellID[20][48];
|
||||
const G4int fNumberOfCellsInZ;
|
||||
const G4int fNumberOfCellsInPhi;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,19 +45,19 @@ class RE05DetectorConstruction : public G4VUserDetectorConstruction
|
||||
virtual ~RE05DetectorConstruction();
|
||||
|
||||
public:
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
virtual G4VPhysicalVolume* Construct();
|
||||
virtual void ConstructSDandField();
|
||||
|
||||
private:
|
||||
void DefineMaterials();
|
||||
void DefineMaterials();
|
||||
|
||||
#include "RE05DetectorParameterDef.hh"
|
||||
|
||||
G4Material* fAir;
|
||||
G4Material* fAr;
|
||||
G4Material* fSilicon;
|
||||
G4Material* fScinti;
|
||||
G4Material* fLead;
|
||||
G4Material* fAir;
|
||||
G4Material* fAr;
|
||||
G4Material* fSilicon;
|
||||
G4Material* fScinti;
|
||||
G4Material* fLead;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,47 +28,47 @@
|
||||
/// \brief Definition of the RE05DetectorParameterDef class
|
||||
//
|
||||
|
||||
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;
|
||||
|
||||
G4int fNomucounter;
|
||||
G4double fMuBox_radius;
|
||||
G4double fMuBox_width;
|
||||
G4double fMuBox_thick;
|
||||
G4double fMuBox_length;
|
||||
G4int fNomucounter;
|
||||
G4double fMuBox_radius;
|
||||
G4double fMuBox_width;
|
||||
G4double fMuBox_thick;
|
||||
G4double fMuBox_length;
|
||||
|
||||
@@ -40,18 +40,16 @@ class G4Step;
|
||||
|
||||
class RE05DummySD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
RE05DummySD();
|
||||
virtual ~RE05DummySD() {}
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*) {}
|
||||
virtual G4bool ProcessHits(G4Step*,G4TouchableHistory*) {return false;}
|
||||
virtual void EndOfEvent(G4HCofThisEvent*) {}
|
||||
virtual void clear() {}
|
||||
virtual void DrawAll() {}
|
||||
virtual void PrintAll() {}
|
||||
public:
|
||||
RE05DummySD();
|
||||
virtual ~RE05DummySD() {}
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*) {}
|
||||
virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*) { return false; }
|
||||
virtual void EndOfEvent(G4HCofThisEvent*) {}
|
||||
virtual void clear() {}
|
||||
virtual void DrawAll() {}
|
||||
virtual void PrintAll() {}
|
||||
};
|
||||
RE05DummySD::RE05DummySD()
|
||||
: G4VSensitiveDetector("dummySD")
|
||||
{}
|
||||
RE05DummySD::RE05DummySD() : G4VSensitiveDetector("dummySD") {}
|
||||
#endif
|
||||
|
||||
@@ -51,5 +51,3 @@ class RE05EventAction : public G4UserEventAction
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE05Field_H
|
||||
#define RE05Field_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4MagneticField.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE05Field : public G4MagneticField
|
||||
{
|
||||
@@ -40,8 +40,7 @@ class RE05Field : public G4MagneticField
|
||||
RE05Field();
|
||||
virtual ~RE05Field();
|
||||
|
||||
virtual void GetFieldValue(const double Point[3],
|
||||
double *Bfield ) const;
|
||||
virtual void GetFieldValue(const double Point[3], double* Bfield) const;
|
||||
|
||||
private:
|
||||
G4double fBz;
|
||||
@@ -50,4 +49,3 @@ class RE05Field : public G4MagneticField
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -31,48 +31,42 @@
|
||||
#ifndef RE05MuonHit_h
|
||||
#define RE05MuonHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
|
||||
class RE05MuonHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
RE05MuonHit();
|
||||
virtual ~RE05MuonHit();
|
||||
RE05MuonHit(const RE05MuonHit& right);
|
||||
const RE05MuonHit& operator=(const RE05MuonHit& right);
|
||||
G4bool operator==(const RE05MuonHit& right) const;
|
||||
|
||||
RE05MuonHit();
|
||||
virtual ~RE05MuonHit();
|
||||
RE05MuonHit(const RE05MuonHit &right);
|
||||
const RE05MuonHit& operator=(const RE05MuonHit &right);
|
||||
G4bool operator==(const RE05MuonHit &right) const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
private:
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
static std::map<G4String,G4AttDef> fAttDefs;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
static std::map<G4String, G4AttDef> fAttDefs;
|
||||
|
||||
public:
|
||||
inline void SetEdep(G4double de)
|
||||
{ fEdep = de; }
|
||||
inline void AddEdep(G4double de)
|
||||
{ fEdep += de; }
|
||||
inline G4double GetEdep()
|
||||
{ return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ fPos = xyz; }
|
||||
inline G4ThreeVector GetPos()
|
||||
{ return fPos; }
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline void AddEdep(G4double de) { fEdep += de; }
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline G4ThreeVector GetPos() { return fPos; }
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<RE05MuonHit> RE05MuonHitsCollection;
|
||||
@@ -81,13 +75,13 @@ extern G4ThreadLocal G4Allocator<RE05MuonHit>* RE05MuonHitAllocator;
|
||||
|
||||
inline void* RE05MuonHit::operator new(size_t)
|
||||
{
|
||||
if(!RE05MuonHitAllocator) RE05MuonHitAllocator = new G4Allocator<RE05MuonHit>;
|
||||
return (void *) RE05MuonHitAllocator->MallocSingle();
|
||||
if (!RE05MuonHitAllocator) RE05MuonHitAllocator = new G4Allocator<RE05MuonHit>;
|
||||
return (void*)RE05MuonHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE05MuonHit::operator delete(void *aHit)
|
||||
inline void RE05MuonHit::operator delete(void* aHit)
|
||||
{
|
||||
RE05MuonHitAllocator->FreeSingle((RE05MuonHit*) aHit);
|
||||
RE05MuonHitAllocator->FreeSingle((RE05MuonHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,29 +31,29 @@
|
||||
#ifndef RE05MuonSD_h
|
||||
#define RE05MuonSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "RE05MuonHit.hh"
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
class RE05MuonSD : public G4VSensitiveDetector
|
||||
{
|
||||
|
||||
public:
|
||||
RE05MuonSD(G4String name);
|
||||
virtual ~RE05MuonSD();
|
||||
RE05MuonSD(G4String name);
|
||||
virtual ~RE05MuonSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
virtual void Initialize(G4HCofThisEvent* HCE);
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
RE05MuonHitsCollection* fMuonCollection;
|
||||
G4double fPositionResolution;
|
||||
RE05MuonHitsCollection* fMuonCollection;
|
||||
G4double fPositionResolution;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -54,10 +54,8 @@ class RE05PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
G4bool fUseHEPEvt;
|
||||
|
||||
public:
|
||||
inline void SetHEPEvtGenerator(G4bool option)
|
||||
{ fUseHEPEvt = option; }
|
||||
inline G4bool GetHEPEvtGenerator()
|
||||
{ return fUseHEPEvt; }
|
||||
inline void SetHEPEvtGenerator(G4bool option) { fUseHEPEvt = option; }
|
||||
inline G4bool GetHEPEvtGenerator() { return fUseHEPEvt; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -38,22 +38,22 @@ class G4UIcmdWithAString;
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE05PrimaryGeneratorMessenger: public G4UImessenger
|
||||
class RE05PrimaryGeneratorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
RE05PrimaryGeneratorMessenger(RE05PrimaryGeneratorAction* mpga);
|
||||
virtual ~RE05PrimaryGeneratorMessenger();
|
||||
|
||||
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
virtual void SetNewValue(G4UIcommand* command, G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand* command);
|
||||
|
||||
private:
|
||||
RE05PrimaryGeneratorAction * fMyAction;
|
||||
|
||||
//commands
|
||||
G4UIdirectory * fMydetDirectory;
|
||||
G4UIcmdWithAString * fGenCmd;
|
||||
RE05PrimaryGeneratorAction* fMyAction;
|
||||
|
||||
// commands
|
||||
G4UIdirectory* fMydetDirectory;
|
||||
G4UIcmdWithAString* fGenCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,14 +31,14 @@
|
||||
#ifndef RE05StackingAction_H
|
||||
#define RE05StackingAction_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4UserStackingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Track;
|
||||
|
||||
#include "RE05TrackerHit.hh"
|
||||
#include "RE05MuonHit.hh"
|
||||
#include "RE05TrackerHit.hh"
|
||||
class RE05StackingActionMessenger;
|
||||
|
||||
class RE05StackingAction : public G4UserStackingAction
|
||||
@@ -53,9 +53,9 @@ class RE05StackingAction : public G4UserStackingAction
|
||||
virtual void PrepareNewEvent();
|
||||
|
||||
private:
|
||||
G4bool InsideRoI(const G4Track * aTrack,G4double ang);
|
||||
G4bool InsideRoI(const G4Track* aTrack, G4double ang);
|
||||
G4VHitsCollection* GetCollection(G4String colName);
|
||||
|
||||
|
||||
RE05TrackerHitsCollection* fTrkHits;
|
||||
RE05MuonHitsCollection* fMuonHits;
|
||||
RE05StackingActionMessenger* fMessenger;
|
||||
@@ -65,7 +65,7 @@ class RE05StackingAction : public G4UserStackingAction
|
||||
G4int fReqIsoMuon;
|
||||
G4int fReqIso;
|
||||
G4double fAngRoI;
|
||||
|
||||
|
||||
public:
|
||||
inline void SetNRequestMuon(G4int val) { fReqMuon = val; }
|
||||
inline G4int GetNRequestMuon() const { return fReqMuon; }
|
||||
|
||||
@@ -38,24 +38,24 @@ class G4UIcmdWithADoubleAndUnit;
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE05StackingActionMessenger: public G4UImessenger
|
||||
class RE05StackingActionMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
RE05StackingActionMessenger(RE05StackingAction* msa);
|
||||
virtual ~RE05StackingActionMessenger();
|
||||
|
||||
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand * command,G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand * command);
|
||||
virtual void SetNewValue(G4UIcommand* command, G4String newValues);
|
||||
virtual G4String GetCurrentValue(G4UIcommand* command);
|
||||
|
||||
private:
|
||||
RE05StackingAction * fMyAction;
|
||||
|
||||
//commands
|
||||
RE05StackingAction* fMyAction;
|
||||
|
||||
// commands
|
||||
G4UIcmdWithAnInteger* fMuonCmd;
|
||||
G4UIcmdWithAnInteger* fIsoMuonCmd;
|
||||
G4UIcmdWithAnInteger* fIsoCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fRoiCmd;
|
||||
G4UIcmdWithADoubleAndUnit* fRoiCmd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE05SteppingAction_H
|
||||
#define RE05SteppingAction_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UserSteppingAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class RE05SteppingAction : public G4UserSteppingAction
|
||||
{
|
||||
|
||||
@@ -40,22 +40,20 @@ class RE05SteppingVerbose;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
/// This class manages the verbose outputs in G4SteppingManager.
|
||||
/// This class manages the verbose outputs in G4SteppingManager.
|
||||
/// It inherits from G4SteppingVerbose.
|
||||
/// It shows how to extract informations during the tracking of a particle.
|
||||
|
||||
class RE05SteppingVerbose : public G4SteppingVerbose
|
||||
class RE05SteppingVerbose : public G4SteppingVerbose
|
||||
{
|
||||
public:
|
||||
|
||||
RE05SteppingVerbose();
|
||||
virtual ~RE05SteppingVerbose();
|
||||
public:
|
||||
RE05SteppingVerbose();
|
||||
virtual ~RE05SteppingVerbose();
|
||||
|
||||
virtual G4VSteppingVerbose* Clone()
|
||||
{ return new RE05SteppingVerbose; }
|
||||
virtual G4VSteppingVerbose* Clone() { return new RE05SteppingVerbose; }
|
||||
|
||||
void StepInfo();
|
||||
void TrackingStarted();
|
||||
void StepInfo();
|
||||
void TrackingStarted();
|
||||
};
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
@@ -31,46 +31,41 @@
|
||||
#ifndef RE05TrackerHit_h
|
||||
#define RE05TrackerHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4VHit.hh"
|
||||
|
||||
class G4AttDef;
|
||||
|
||||
class RE05TrackerHit : public G4VHit
|
||||
{
|
||||
public:
|
||||
RE05TrackerHit();
|
||||
virtual ~RE05TrackerHit();
|
||||
RE05TrackerHit(const RE05TrackerHit& right);
|
||||
const RE05TrackerHit& operator=(const RE05TrackerHit& right);
|
||||
G4bool operator==(const RE05TrackerHit& right) const;
|
||||
|
||||
RE05TrackerHit();
|
||||
virtual ~RE05TrackerHit();
|
||||
RE05TrackerHit(const RE05TrackerHit &right);
|
||||
const RE05TrackerHit& operator=(const RE05TrackerHit &right);
|
||||
G4bool operator==(const RE05TrackerHit &right) const;
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void* aHit);
|
||||
|
||||
inline void *operator new(size_t);
|
||||
inline void operator delete(void *aHit);
|
||||
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
virtual void Draw();
|
||||
virtual const std::map<G4String, G4AttDef>* GetAttDefs() const;
|
||||
virtual std::vector<G4AttValue>* CreateAttValues() const;
|
||||
virtual void Print();
|
||||
|
||||
private:
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
static std::map<G4String,G4AttDef> fAttDefs;
|
||||
G4double fEdep;
|
||||
G4ThreeVector fPos;
|
||||
static std::map<G4String, G4AttDef> fAttDefs;
|
||||
|
||||
public:
|
||||
inline void SetEdep(G4double de)
|
||||
{ fEdep = de; }
|
||||
inline G4double GetEdep()
|
||||
{ return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz)
|
||||
{ fPos = xyz; }
|
||||
inline G4ThreeVector GetPos()
|
||||
{ return fPos; }
|
||||
inline void SetEdep(G4double de) { fEdep = de; }
|
||||
inline G4double GetEdep() { return fEdep; }
|
||||
inline void SetPos(G4ThreeVector xyz) { fPos = xyz; }
|
||||
inline G4ThreeVector GetPos() { return fPos; }
|
||||
};
|
||||
|
||||
typedef G4THitsCollection<RE05TrackerHit> RE05TrackerHitsCollection;
|
||||
@@ -79,13 +74,13 @@ extern G4ThreadLocal G4Allocator<RE05TrackerHit>* RE05TrackerHitAllocator;
|
||||
|
||||
inline void* RE05TrackerHit::operator new(size_t)
|
||||
{
|
||||
if(!RE05TrackerHitAllocator) RE05TrackerHitAllocator = new G4Allocator<RE05TrackerHit>;
|
||||
return (void *) RE05TrackerHitAllocator->MallocSingle();
|
||||
if (!RE05TrackerHitAllocator) RE05TrackerHitAllocator = new G4Allocator<RE05TrackerHit>;
|
||||
return (void*)RE05TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
inline void RE05TrackerHit::operator delete(void *aHit)
|
||||
inline void RE05TrackerHit::operator delete(void* aHit)
|
||||
{
|
||||
RE05TrackerHitAllocator->FreeSingle((RE05TrackerHit*) aHit);
|
||||
RE05TrackerHitAllocator->FreeSingle((RE05TrackerHit*)aHit);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#ifndef RE05TrackerParametrisation_H
|
||||
#define RE05TrackerParametrisation_H 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Tubs;
|
||||
@@ -52,37 +52,31 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
|
||||
class RE05TrackerParametrisation : public G4VPVParameterisation
|
||||
{
|
||||
{
|
||||
public:
|
||||
|
||||
RE05TrackerParametrisation();
|
||||
~RE05TrackerParametrisation();
|
||||
~RE05TrackerParametrisation();
|
||||
|
||||
virtual void ComputeTransformation(const G4int copyNo,
|
||||
G4VPhysicalVolume *physVol) const;
|
||||
virtual void ComputeDimensions(G4Tubs & trackerLayer,
|
||||
const G4int copyNo,
|
||||
const G4VPhysicalVolume * physVol) const;
|
||||
virtual void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const;
|
||||
virtual void ComputeDimensions(G4Tubs& trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const;
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
|
||||
virtual void ComputeDimensions (G4Trd&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Trap&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Cons&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Orb&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Sphere&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Ellipsoid&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Torus&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Para&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Hype&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Box&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polycone&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions (G4Polyhedra&,const G4int,const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Trd&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Trap&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Cons&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Orb&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Sphere&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Ellipsoid&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Torus&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Para&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Hype&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
virtual void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const {}
|
||||
|
||||
private:
|
||||
|
||||
#include "RE05DetectorParameterDef.hh"
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,9 @@
|
||||
#ifndef RE05TrackerSD_h
|
||||
#define RE05TrackerSD_h 1
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
#include "RE05TrackerHit.hh"
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
@@ -40,18 +41,18 @@ class G4TouchableHistory;
|
||||
class RE05TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
RE05TrackerSD(G4String name);
|
||||
virtual ~RE05TrackerSD();
|
||||
RE05TrackerSD(G4String name);
|
||||
virtual ~RE05TrackerSD();
|
||||
|
||||
virtual void Initialize(G4HCofThisEvent*HCE);
|
||||
virtual G4bool ProcessHits(G4Step*aStep,G4TouchableHistory*ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent*HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
virtual void Initialize(G4HCofThisEvent* HCE);
|
||||
virtual G4bool ProcessHits(G4Step* aStep, G4TouchableHistory* ROhist);
|
||||
virtual void EndOfEvent(G4HCofThisEvent* HCE);
|
||||
virtual void clear();
|
||||
virtual void DrawAll();
|
||||
virtual void PrintAll();
|
||||
|
||||
private:
|
||||
RE05TrackerHitsCollection* fTrackerCollection;
|
||||
RE05TrackerHitsCollection* fTrackerCollection;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,12 +33,12 @@
|
||||
|
||||
#include "G4UserTrackingAction.hh"
|
||||
|
||||
class RE05TrackingAction : public G4UserTrackingAction {
|
||||
|
||||
class RE05TrackingAction : public G4UserTrackingAction
|
||||
{
|
||||
public:
|
||||
RE05TrackingAction() : G4UserTrackingAction() {}
|
||||
virtual ~RE05TrackingAction() {}
|
||||
|
||||
|
||||
virtual void PreUserTrackingAction(const G4Track*);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user