Import Geant4 11.3.0.beta source tree
This commit is contained in:
@@ -47,8 +47,6 @@ class ActionInitialization : public G4VUserActionInitialization
|
||||
void Build() const override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
#ifndef B2bChamberParameterisation_h
|
||||
#define B2bChamberParameterisation_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4Box;
|
||||
@@ -61,56 +61,39 @@ namespace B2b
|
||||
class ChamberParameterisation : public G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
ChamberParameterisation(G4int noChambers,
|
||||
G4double startZ,
|
||||
G4double spacing,
|
||||
G4double widthChamber,
|
||||
G4double lengthInitial,
|
||||
G4double lengthFinal );
|
||||
ChamberParameterisation(G4int noChambers, G4double startZ, G4double spacing,
|
||||
G4double widthChamber, G4double lengthInitial, G4double lengthFinal);
|
||||
|
||||
~ChamberParameterisation() override = default;
|
||||
|
||||
void ComputeTransformation (const G4int copyNo,
|
||||
G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeTransformation(const G4int copyNo, G4VPhysicalVolume* physVol) const override;
|
||||
|
||||
void ComputeDimensions (G4Tubs & trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const override;
|
||||
void ComputeDimensions(G4Tubs& trackerLayer, const G4int copyNo,
|
||||
const G4VPhysicalVolume* physVol) const override;
|
||||
|
||||
private: // Dummy declarations to get rid of warnings ...
|
||||
void ComputeDimensions (G4Box&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Trd&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Trap&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Cons&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Sphere&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Orb&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Ellipsoid&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Torus&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Para&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Hype&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Polycone&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions (G4Polyhedra&,const G4int,
|
||||
const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Box&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Trd&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Trap&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Cons&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Sphere&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Orb&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Ellipsoid&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Torus&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Para&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Hype&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Polycone&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
void ComputeDimensions(G4Polyhedra&, const G4int, const G4VPhysicalVolume*) const override {}
|
||||
|
||||
private:
|
||||
G4int fNoChambers;
|
||||
G4int fNoChambers;
|
||||
G4double fStartZ;
|
||||
G4double fHalfWidth; // The half-width of each tracker chamber
|
||||
G4double fSpacing; // The distance between the chambers' center
|
||||
G4double fRmaxFirst; // The first half-length
|
||||
G4double fRmaxIncr; // The Increment for the half-length
|
||||
G4double fHalfWidth; // The half-width of each tracker chamber
|
||||
G4double fSpacing; // The distance between the chambers' center
|
||||
G4double fRmaxFirst; // The first half-length
|
||||
G4double fRmaxIncr; // The Increment for the half-length
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2b
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,9 +30,10 @@
|
||||
#ifndef B2bDetectorConstruction_h
|
||||
#define B2bDetectorConstruction_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4VUserDetectorConstruction.hh"
|
||||
#include "tls.hh"
|
||||
|
||||
#include "G4Threading.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VPhysicalVolume;
|
||||
class G4LogicalVolume;
|
||||
@@ -59,10 +60,10 @@ class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
void ConstructSDandField() override;
|
||||
|
||||
// Set methods
|
||||
void SetTargetMaterial (G4String );
|
||||
void SetChamberMaterial(G4String );
|
||||
void SetMaxStep (G4double );
|
||||
void SetCheckOverlaps(G4bool );
|
||||
void SetTargetMaterial(G4String);
|
||||
void SetChamberMaterial(G4String);
|
||||
void SetMaxStep(G4double);
|
||||
void SetCheckOverlaps(G4bool);
|
||||
|
||||
private:
|
||||
// methods
|
||||
@@ -70,22 +71,22 @@ class DetectorConstruction : public G4VUserDetectorConstruction
|
||||
G4VPhysicalVolume* DefineVolumes();
|
||||
|
||||
// static data members
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
static G4ThreadLocal G4GlobalMagFieldMessenger* fMagFieldMessenger;
|
||||
// magnetic field messenger
|
||||
// data members
|
||||
G4LogicalVolume* fLogicTarget = nullptr; // pointer to the logical Target
|
||||
G4LogicalVolume* fLogicChamber = nullptr; // pointer to the logical Chamber
|
||||
G4LogicalVolume* fLogicTarget = nullptr; // pointer to the logical Target
|
||||
G4LogicalVolume* fLogicChamber = nullptr; // pointer to the logical Chamber
|
||||
|
||||
G4Material* fTargetMaterial = nullptr; // pointer to the target material
|
||||
G4Material* fChamberMaterial = nullptr; // pointer to the chamber material
|
||||
G4Material* fTargetMaterial = nullptr; // pointer to the target material
|
||||
G4Material* fChamberMaterial = nullptr; // pointer to the chamber material
|
||||
|
||||
G4UserLimits* fStepLimit = nullptr; // pointer to user step limits
|
||||
G4UserLimits* fStepLimit = nullptr; // pointer to user step limits
|
||||
|
||||
DetectorMessenger* fMessenger = nullptr; // messenger
|
||||
DetectorMessenger* fMessenger = nullptr; // messenger
|
||||
|
||||
G4bool fCheckOverlaps = true; // option to activate checking of volumes overlaps
|
||||
G4bool fCheckOverlaps = true; // option to activate checking of volumes overlaps
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2b
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,12 +30,13 @@
|
||||
#ifndef B2bDetectorMessenger_h
|
||||
#define B2bDetectorMessenger_h 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4UIdirectory;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithADoubleAndUnit;
|
||||
class G4UIcommand;
|
||||
|
||||
namespace B2b
|
||||
{
|
||||
@@ -49,26 +50,26 @@ class DetectorConstruction;
|
||||
/// - /B2/det/setChamberMaterial name
|
||||
/// - /B2/det/stepMax value unit
|
||||
|
||||
class DetectorMessenger: public G4UImessenger
|
||||
class DetectorMessenger : public G4UImessenger
|
||||
{
|
||||
public:
|
||||
DetectorMessenger(DetectorConstruction* );
|
||||
DetectorMessenger(DetectorConstruction*);
|
||||
~DetectorMessenger() override;
|
||||
|
||||
void SetNewValue(G4UIcommand*, G4String) override;
|
||||
|
||||
private:
|
||||
DetectorConstruction* fDetectorConstruction = nullptr;
|
||||
DetectorConstruction* fDetectorConstruction = nullptr;
|
||||
|
||||
G4UIdirectory* fDirectory = nullptr;
|
||||
G4UIdirectory* fDetDirectory = nullptr;
|
||||
G4UIdirectory* fDirectory = nullptr;
|
||||
G4UIdirectory* fDetDirectory = nullptr;
|
||||
|
||||
G4UIcmdWithAString* fTargMatCmd = nullptr;
|
||||
G4UIcmdWithAString* fChamMatCmd = nullptr;
|
||||
G4UIcmdWithAString* fTargMatCmd = nullptr;
|
||||
G4UIcmdWithAString* fChamMatCmd = nullptr;
|
||||
|
||||
G4UIcmdWithADoubleAndUnit* fStepMaxCmd = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2b
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "G4UserEventAction.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
class G4Event;
|
||||
|
||||
namespace B2
|
||||
{
|
||||
@@ -45,10 +45,10 @@ class EventAction : public G4UserEventAction
|
||||
EventAction() = default;
|
||||
~EventAction() override = default;
|
||||
|
||||
void BeginOfEventAction(const G4Event* ) override;
|
||||
void EndOfEventAction(const G4Event* ) override;
|
||||
void BeginOfEventAction(const G4Event*) override;
|
||||
void EndOfEventAction(const G4Event*) override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#define B2PrimaryGeneratorAction_h 1
|
||||
|
||||
#include "G4VUserPrimaryGeneratorAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4ParticleGun;
|
||||
class G4Event;
|
||||
@@ -52,14 +51,14 @@ class PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
|
||||
PrimaryGeneratorAction();
|
||||
~PrimaryGeneratorAction() override;
|
||||
|
||||
void GeneratePrimaries(G4Event* ) override;
|
||||
void GeneratePrimaries(G4Event*) override;
|
||||
|
||||
G4ParticleGun* GetParticleGun() {return fParticleGun;}
|
||||
G4ParticleGun* GetParticleGun() { return fParticleGun; }
|
||||
|
||||
private:
|
||||
G4ParticleGun* fParticleGun = nullptr; // G4 particle gun
|
||||
G4ParticleGun* fParticleGun = nullptr; // G4 particle gun
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#define B2RunAction_h 1
|
||||
|
||||
#include "G4UserRunAction.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Run;
|
||||
|
||||
@@ -47,9 +46,9 @@ class RunAction : public G4UserRunAction
|
||||
~RunAction() override = default;
|
||||
|
||||
void BeginOfRunAction(const G4Run* run) override;
|
||||
void EndOfRunAction(const G4Run* run) override;
|
||||
void EndOfRunAction(const G4Run* run) override;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,10 +31,12 @@
|
||||
#define B2TrackerHit_h 1
|
||||
|
||||
#include "G4VHit.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
|
||||
#include "G4Allocator.hh"
|
||||
#include "G4THitsCollection.hh"
|
||||
#include "G4Threading.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
#include "tls.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
namespace B2
|
||||
{
|
||||
@@ -57,28 +59,28 @@ class TrackerHit : public G4VHit
|
||||
G4bool operator==(const TrackerHit&) const;
|
||||
|
||||
inline void* operator new(size_t);
|
||||
inline void operator delete(void*);
|
||||
inline void operator delete(void*);
|
||||
|
||||
// methods from base class
|
||||
void Draw() override;
|
||||
void Print() override;
|
||||
|
||||
// Set methods
|
||||
void SetTrackID (G4int track) { fTrackID = track; };
|
||||
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
|
||||
void SetEdep (G4double de) { fEdep = de; };
|
||||
void SetPos (G4ThreeVector xyz){ fPos = xyz; };
|
||||
void SetTrackID(G4int track) { fTrackID = track; };
|
||||
void SetChamberNb(G4int chamb) { fChamberNb = chamb; };
|
||||
void SetEdep(G4double de) { fEdep = de; };
|
||||
void SetPos(G4ThreeVector xyz) { fPos = xyz; };
|
||||
|
||||
// Get methods
|
||||
G4int GetTrackID() const { return fTrackID; };
|
||||
G4int GetChamberNb() const { return fChamberNb; };
|
||||
G4double GetEdep() const { return fEdep; };
|
||||
G4int GetTrackID() const { return fTrackID; };
|
||||
G4int GetChamberNb() const { return fChamberNb; };
|
||||
G4double GetEdep() const { return fEdep; };
|
||||
G4ThreeVector GetPos() const { return fPos; };
|
||||
|
||||
private:
|
||||
G4int fTrackID = -1;
|
||||
G4int fChamberNb = -1;
|
||||
G4double fEdep = 0.;
|
||||
G4int fTrackID = -1;
|
||||
G4int fChamberNb = -1;
|
||||
G4double fEdep = 0.;
|
||||
G4ThreeVector fPos;
|
||||
};
|
||||
|
||||
@@ -92,20 +94,19 @@ extern G4ThreadLocal G4Allocator<TrackerHit>* TrackerHitAllocator;
|
||||
|
||||
inline void* TrackerHit::operator new(size_t)
|
||||
{
|
||||
if(!TrackerHitAllocator)
|
||||
TrackerHitAllocator = new G4Allocator<TrackerHit>;
|
||||
return (void *) TrackerHitAllocator->MallocSingle();
|
||||
if (!TrackerHitAllocator) TrackerHitAllocator = new G4Allocator<TrackerHit>;
|
||||
return (void*)TrackerHitAllocator->MallocSingle();
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
inline void TrackerHit::operator delete(void *hit)
|
||||
inline void TrackerHit::operator delete(void* hit)
|
||||
{
|
||||
TrackerHitAllocator->FreeSingle((TrackerHit*) hit);
|
||||
TrackerHitAllocator->FreeSingle((TrackerHit*)hit);
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,10 +34,11 @@
|
||||
|
||||
#include "TrackerHit.hh"
|
||||
|
||||
#include <vector>
|
||||
#include "globals.hh"
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
namespace B2
|
||||
{
|
||||
@@ -51,19 +52,18 @@ namespace B2
|
||||
class TrackerSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
TrackerSD(const G4String& name,
|
||||
const G4String& hitsCollectionName);
|
||||
TrackerSD(const G4String& name, const G4String& hitsCollectionName);
|
||||
~TrackerSD() override = default;
|
||||
|
||||
// methods from base class
|
||||
void Initialize(G4HCofThisEvent* hitCollection) override;
|
||||
void Initialize(G4HCofThisEvent* hitCollection) override;
|
||||
G4bool ProcessHits(G4Step* step, G4TouchableHistory* history) override;
|
||||
void EndOfEvent(G4HCofThisEvent* hitCollection) override;
|
||||
void EndOfEvent(G4HCofThisEvent* hitCollection) override;
|
||||
|
||||
private:
|
||||
TrackerHitsCollection* fHitsCollection = nullptr;
|
||||
};
|
||||
|
||||
}
|
||||
} // namespace B2
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user