Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -46,10 +46,6 @@ WLSActionInitialization::WLSActionInitialization(WLSDetectorConstruction* det)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSActionInitialization::~WLSActionInitialization() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSActionInitialization::BuildForMaster() const
|
||||
{
|
||||
SetUserAction(new WLSRunAction());
|
||||
@@ -62,7 +58,7 @@ void WLSActionInitialization::Build() const
|
||||
SetUserAction(new WLSPrimaryGeneratorAction(fDetector));
|
||||
SetUserAction(new WLSRunAction());
|
||||
|
||||
WLSEventAction* eventAction = new WLSEventAction();
|
||||
auto eventAction = new WLSEventAction();
|
||||
SetUserAction(eventAction);
|
||||
|
||||
SetUserAction(new WLSTrackingAction());
|
||||
|
||||
@@ -64,59 +64,20 @@
|
||||
|
||||
WLSDetectorConstruction::WLSDetectorConstruction()
|
||||
: fVisAttributes()
|
||||
, fMaterials(nullptr)
|
||||
, fLogicHole(nullptr)
|
||||
, fLogicWorld(nullptr)
|
||||
, fPhysiWorld(nullptr)
|
||||
, fPhysiHole(nullptr)
|
||||
{
|
||||
fDetectorMessenger = new WLSDetectorMessenger(this);
|
||||
|
||||
fNumOfCladLayers = 0;
|
||||
|
||||
fSurfaceRoughness = 1;
|
||||
|
||||
fMirrorToggle = true;
|
||||
fMirrorPolish = 1.;
|
||||
fMirrorReflectivity = 1.;
|
||||
|
||||
fMPPCPolish = 1.;
|
||||
fMPPCReflectivity = 0.;
|
||||
|
||||
fExtrusionPolish = 1.;
|
||||
fExtrusionReflectivity = 1.;
|
||||
|
||||
fXYRatio = 1.0;
|
||||
|
||||
fWLSfiberZ = 1. * m;
|
||||
fWLSfiberRY = 0.5 * mm;
|
||||
fWLSfiberOrigin = 0.0;
|
||||
|
||||
fMPPCShape = "Circle";
|
||||
fMPPCHalfL = fWLSfiberRY;
|
||||
fMPPCDist = 0.00 * mm;
|
||||
fMPPCTheta = 0.0 * deg;
|
||||
fMPPCZ = 0.05 * mm;
|
||||
|
||||
fClrfiberZ = fMPPCZ + 10. * nm;
|
||||
fMirrorZ = 0.1 * mm;
|
||||
|
||||
fBarLength = 1. * m;
|
||||
fBarBase = 9.6 * mm;
|
||||
fHoleRadius = 0.9 * mm;
|
||||
fHoleLength = fBarLength;
|
||||
fCoatingThickness = 0.25 * mm;
|
||||
fCoatingRadius = 1.875 * mm;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSDetectorConstruction::~WLSDetectorConstruction()
|
||||
{
|
||||
if(fDetectorMessenger)
|
||||
delete fDetectorMessenger;
|
||||
if(fMaterials)
|
||||
delete fMaterials;
|
||||
delete fDetectorMessenger;
|
||||
delete fMaterials;
|
||||
for (auto visAttributes: fVisAttributes)
|
||||
{
|
||||
delete visAttributes;
|
||||
@@ -163,7 +124,8 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4LogicalVolume(solidWorld, air, "World");
|
||||
|
||||
fPhysiWorld =
|
||||
new G4PVPlacement(0, G4ThreeVector(), fLogicWorld, "World", 0, false, 0);
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(), fLogicWorld, "World", nullptr,
|
||||
false, 0);
|
||||
|
||||
//--------------------------------------------------
|
||||
// Extrusion
|
||||
@@ -174,14 +136,13 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
G4VSolid* solidExtrusion = new G4Box("Extrusion", GetBarBase() / 2.,
|
||||
GetBarBase() / 2., GetBarLength() / 2.);
|
||||
|
||||
G4LogicalVolume* logicExtrusion =
|
||||
auto logicExtrusion =
|
||||
new G4LogicalVolume(solidExtrusion, coating, "Extrusion");
|
||||
|
||||
G4OpticalSurface* TiO2Surface = new G4OpticalSurface(
|
||||
auto TiO2Surface = new G4OpticalSurface(
|
||||
"TiO2Surface", glisur, ground, dielectric_metal, fExtrusionPolish);
|
||||
|
||||
G4MaterialPropertiesTable* TiO2SurfaceProperty =
|
||||
new G4MaterialPropertiesTable();
|
||||
auto TiO2SurfaceProperty = new G4MaterialPropertiesTable();
|
||||
|
||||
std::vector<G4double> p_TiO2 = { 2.00 * eV, 3.47 * eV };
|
||||
|
||||
@@ -194,7 +155,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
|
||||
TiO2Surface->SetMaterialPropertiesTable(TiO2SurfaceProperty);
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(), logicExtrusion, "Extrusion",
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(), logicExtrusion, "Extrusion",
|
||||
fLogicWorld, false, 0);
|
||||
|
||||
new G4LogicalSkinSurface("TiO2Surface", logicExtrusion, TiO2Surface);
|
||||
@@ -213,10 +174,10 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
GetBarBase() / 2. - GetCoatingThickness() - GetCoatingRadius(),
|
||||
GetBarLength() / 2.);
|
||||
|
||||
G4LogicalVolume* logicScintillator = new G4LogicalVolume(
|
||||
auto logicScintillator = new G4LogicalVolume(
|
||||
solidScintillator, polystyrene, "Scintillator");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(), logicScintillator, "Scintillator",
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(), logicScintillator, "Scintillator",
|
||||
logicExtrusion, false, 0);
|
||||
|
||||
G4LogicalVolume* logicScintSide = nullptr;
|
||||
@@ -247,7 +208,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., pos, 0.), logicScintSide,
|
||||
"SideOfBar", logicExtrusion, false, 1);
|
||||
|
||||
G4RotationMatrix* rot1 = new G4RotationMatrix();
|
||||
auto rot1 = new G4RotationMatrix();
|
||||
rot1->rotateZ(-90.*deg);
|
||||
|
||||
new G4PVPlacement(rot1, G4ThreeVector(pos, 0., 0.), logicScintSide,
|
||||
@@ -264,13 +225,13 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4PVPlacement(rot1, G4ThreeVector(-pos, pos, 0.), logicScintCrnr,
|
||||
"CrnrOfBar", logicExtrusion, false, 1);
|
||||
|
||||
G4RotationMatrix* rot2 = new G4RotationMatrix();
|
||||
auto rot2 = new G4RotationMatrix();
|
||||
rot2->rotateZ(-180.*deg);
|
||||
|
||||
new G4PVPlacement(rot2, G4ThreeVector(-pos, -pos, 0.), logicScintCrnr,
|
||||
"CrnrOfBar", logicExtrusion, false, 2);
|
||||
|
||||
G4RotationMatrix* rot3 = new G4RotationMatrix();
|
||||
auto rot3 = new G4RotationMatrix();
|
||||
rot3->rotateZ(-270.*deg);
|
||||
|
||||
new G4PVPlacement(rot3, G4ThreeVector(pos, -pos, 0.), logicScintCrnr,
|
||||
@@ -284,7 +245,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
|
||||
fLogicHole = new G4LogicalVolume(solidHole, air, "Hole");
|
||||
|
||||
fPhysiHole = new G4PVPlacement(0, G4ThreeVector(), fLogicHole, "Hole",
|
||||
fPhysiHole = new G4PVPlacement(nullptr, G4ThreeVector(), fLogicHole, "Hole",
|
||||
logicScintillator, false, 0);
|
||||
}
|
||||
|
||||
@@ -347,7 +308,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4LogicalVolume(solidClad2, fpethylene, "Clad2");
|
||||
|
||||
physiClad2 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0.0, 0.0, fWLSfiberOrigin),
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0.0, 0.0, fWLSfiberOrigin),
|
||||
logicClad2, "Clad2", logicPlacement, false, 0);
|
||||
|
||||
// Place the rough surface only if needed
|
||||
@@ -383,8 +344,8 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4LogicalVolume(solidClad1, pethylene, "Clad1");
|
||||
|
||||
physiClad1 =
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fWLSfiberOrigin), logicClad1,
|
||||
"Clad1", logicPlacement, false, 0);
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fWLSfiberOrigin),
|
||||
logicClad1, "Clad1", logicPlacement, false, 0);
|
||||
|
||||
// Place the rough surface only if needed
|
||||
if(opSurface)
|
||||
@@ -429,7 +390,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4UserLimits(DBL_MAX, DBL_MAX, 10. * ms));
|
||||
|
||||
G4VPhysicalVolume* physiWLSfiber =
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fWLSfiberOrigin),
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fWLSfiberOrigin),
|
||||
logicWLSfiber, "WLSFiber", logicPlacement, false, 0);
|
||||
|
||||
// Place the rough surface only if needed
|
||||
@@ -460,11 +421,10 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
logicMirror =
|
||||
new G4LogicalVolume(solidMirror, aluminum, "Mirror");
|
||||
|
||||
G4OpticalSurface* mirrorSurface = new G4OpticalSurface(
|
||||
auto mirrorSurface = new G4OpticalSurface(
|
||||
"MirrorSurface", glisur, ground, dielectric_metal, fMirrorPolish);
|
||||
|
||||
G4MaterialPropertiesTable* mirrorSurfaceProperty =
|
||||
new G4MaterialPropertiesTable();
|
||||
auto mirrorSurfaceProperty = new G4MaterialPropertiesTable();
|
||||
|
||||
std::vector<G4double> p_mirror = { 2.00 * eV, 3.47 * eV };
|
||||
std::vector<G4double> refl_mirror = { fMirrorReflectivity,
|
||||
@@ -476,8 +436,8 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
|
||||
mirrorSurface->SetMaterialPropertiesTable(mirrorSurfaceProperty);
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fMirrorOrigin), logicMirror,
|
||||
"Mirror", fLogicWorld, false, 0);
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fMirrorOrigin),
|
||||
logicMirror, "Mirror", fLogicWorld, false, 0);
|
||||
|
||||
new G4LogicalSkinSurface("MirrorSurface", logicMirror, mirrorSurface);
|
||||
}
|
||||
@@ -489,10 +449,9 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
// Clear Fiber (Coupling Layer)
|
||||
G4VSolid* solidCouple = new G4Box("Couple", fCoupleRX, fCoupleRY, fCoupleZ);
|
||||
|
||||
G4LogicalVolume* logicCouple =
|
||||
new G4LogicalVolume(solidCouple, air, "Couple");
|
||||
auto logicCouple = new G4LogicalVolume(solidCouple, air, "Couple");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., fCoupleOrigin), logicCouple,
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., fCoupleOrigin), logicCouple,
|
||||
"Couple", fLogicWorld, false, 0);
|
||||
|
||||
//--------------------------------------------------
|
||||
@@ -526,8 +485,7 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
new G4Tubs("ClearFiber", 0., fClrfiberHalfL, fClrfiberZ, 0., twopi);
|
||||
}
|
||||
|
||||
G4LogicalVolume* logicClrfiber =
|
||||
new G4LogicalVolume(solidClrfiber, air, "ClearFiber");
|
||||
auto logicClrfiber = new G4LogicalVolume(solidClrfiber, air, "ClearFiber");
|
||||
|
||||
new G4PVPlacement(new G4RotationMatrix(CLHEP::HepRotationY(-fMPPCTheta)),
|
||||
G4ThreeVector(fMPPCOriginX, 0.0, fMPPCOriginZ),
|
||||
@@ -545,18 +503,17 @@ G4VPhysicalVolume* WLSDetectorConstruction::ConstructDetector()
|
||||
else
|
||||
solidPhotonDet = new G4Tubs("PhotonDet", 0., fMPPCHalfL, fMPPCZ, 0., twopi);
|
||||
|
||||
G4LogicalVolume* logicPhotonDet =
|
||||
auto logicPhotonDet =
|
||||
new G4LogicalVolume(solidPhotonDet, aluminum, "PhotonDet_LV");
|
||||
|
||||
new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicPhotonDet, "PhotonDet",
|
||||
logicClrfiber, false, 0);
|
||||
new G4PVPlacement(nullptr, G4ThreeVector(0., 0., 0.), logicPhotonDet,
|
||||
"PhotonDet", logicClrfiber, false, 0);
|
||||
|
||||
// PhotonDet Surface Properties
|
||||
G4OpticalSurface* photonDetSurface = new G4OpticalSurface(
|
||||
auto photonDetSurface = new G4OpticalSurface(
|
||||
"PhotonDetSurface", glisur, ground, dielectric_metal, fMPPCPolish);
|
||||
|
||||
G4MaterialPropertiesTable* photonDetSurfaceProperty =
|
||||
new G4MaterialPropertiesTable();
|
||||
auto photonDetSurfaceProperty = new G4MaterialPropertiesTable();
|
||||
|
||||
std::vector<G4double> p_mppc = { 2.00 * eV, 3.47 * eV };
|
||||
std::vector<G4double> refl_mppc = { fMPPCReflectivity, fMPPCReflectivity };
|
||||
@@ -658,7 +615,7 @@ void WLSDetectorConstruction::ConstructSDandField()
|
||||
if(!fmppcSD.Get())
|
||||
{
|
||||
G4String mppcSDName = "WLS/PhotonDet";
|
||||
WLSPhotonDetSD* mppcSD = new WLSPhotonDetSD(mppcSDName);
|
||||
auto mppcSD = new WLSPhotonDetSD(mppcSDName);
|
||||
G4SDManager::GetSDMpointer()->AddNewDetector(mppcSD);
|
||||
fmppcSD.Put(mppcSD);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,7 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSEventAction::WLSEventAction()
|
||||
: fVerboseLevel(0)
|
||||
{
|
||||
fMPPCCollID = 0;
|
||||
|
||||
fEventMessenger = new WLSEventActionMessenger(this);
|
||||
}
|
||||
|
||||
@@ -133,7 +130,7 @@ void WLSEventAction::EndOfEventAction(const G4Event* evt)
|
||||
<< " Detector hit: " << n_hit << G4endl;
|
||||
}
|
||||
|
||||
WLSRun* run = static_cast<WLSRun*>(
|
||||
auto run = static_cast<WLSRun*>(
|
||||
G4RunManager::GetRunManager()->GetNonConstCurrentRun());
|
||||
|
||||
run->AddTIR(fNTIR);
|
||||
|
||||
@@ -49,11 +49,13 @@ WLSMaterials::WLSMaterials()
|
||||
|
||||
WLSMaterials::~WLSMaterials()
|
||||
{
|
||||
delete fAir;
|
||||
delete fPMMA;
|
||||
delete fPethylene;
|
||||
delete fFPethylene;
|
||||
delete fPolystyrene;
|
||||
delete fSilicone;
|
||||
delete fCoating;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -254,7 +256,7 @@ void WLSMaterials::CreateMaterials()
|
||||
|
||||
std::vector<G4double> refractiveIndex = { 1.0, 1.0 };
|
||||
|
||||
G4MaterialPropertiesTable* mpt = new G4MaterialPropertiesTable();
|
||||
auto mpt = new G4MaterialPropertiesTable();
|
||||
mpt->AddProperty("RINDEX", energySmall, refractiveIndex);
|
||||
|
||||
fAir->SetMaterialPropertiesTable(mpt);
|
||||
@@ -285,7 +287,7 @@ void WLSMaterials::CreateMaterials()
|
||||
};
|
||||
|
||||
// Add entries into properties table
|
||||
G4MaterialPropertiesTable* mptWLSfiber = new G4MaterialPropertiesTable();
|
||||
auto mptWLSfiber = new G4MaterialPropertiesTable();
|
||||
mptWLSfiber->AddProperty("RINDEX", energySmall, refractiveIndexWLSfiber);
|
||||
mptWLSfiber->AddProperty("WLSABSLENGTH", energy, absWLSfiber);
|
||||
mptWLSfiber->AddProperty("WLSCOMPONENT", energy, emissionFib);
|
||||
@@ -302,7 +304,7 @@ void WLSMaterials::CreateMaterials()
|
||||
std::vector<G4double> absClad = { 20.0 * m, 20.0 * m };
|
||||
|
||||
// Add entries into properties table
|
||||
G4MaterialPropertiesTable* mptClad1 = new G4MaterialPropertiesTable();
|
||||
auto mptClad1 = new G4MaterialPropertiesTable();
|
||||
mptClad1->AddProperty("RINDEX", energySmall, refractiveIndexClad1);
|
||||
mptClad1->AddProperty("ABSLENGTH", energySmall, absClad);
|
||||
|
||||
@@ -315,7 +317,7 @@ void WLSMaterials::CreateMaterials()
|
||||
std::vector<G4double> refractiveIndexClad2 = { 1.42, 1.42 };
|
||||
|
||||
// Add entries into properties table
|
||||
G4MaterialPropertiesTable* mptClad2 = new G4MaterialPropertiesTable();
|
||||
auto mptClad2 = new G4MaterialPropertiesTable();
|
||||
mptClad2->AddProperty("RINDEX", energySmall, refractiveIndexClad2);
|
||||
mptClad2->AddProperty("ABSLENGTH", energySmall, absClad);
|
||||
|
||||
@@ -328,7 +330,7 @@ void WLSMaterials::CreateMaterials()
|
||||
std::vector<G4double> refractiveIndexSilicone = { 1.46, 1.46 };
|
||||
|
||||
// Add entries into properties table
|
||||
G4MaterialPropertiesTable* mptSilicone = new G4MaterialPropertiesTable();
|
||||
auto mptSilicone = new G4MaterialPropertiesTable();
|
||||
mptSilicone->AddProperty("RINDEX", energySmall, refractiveIndexSilicone);
|
||||
mptSilicone->AddProperty("ABSLENGTH", energySmall, absClad);
|
||||
|
||||
@@ -350,7 +352,7 @@ void WLSMaterials::CreateMaterials()
|
||||
};
|
||||
|
||||
// Add entries into properties table
|
||||
G4MaterialPropertiesTable* mptPolystyrene = new G4MaterialPropertiesTable();
|
||||
auto mptPolystyrene = new G4MaterialPropertiesTable();
|
||||
mptPolystyrene->AddProperty("RINDEX", energySmall, refractiveIndexPS);
|
||||
mptPolystyrene->AddProperty("ABSLENGTH", energySmall, absPS);
|
||||
mptPolystyrene->AddProperty("SCINTILLATIONCOMPONENT1", energy, scintilFast);
|
||||
|
||||
@@ -38,8 +38,6 @@ G4ThreadLocal G4Allocator<WLSPhotonDetHit>* WLSPhotonDetHitAllocator = nullptr;
|
||||
|
||||
WLSPhotonDetHit::WLSPhotonDetHit()
|
||||
{
|
||||
fArrivalTime = 0.;
|
||||
fEnergy = 0.;
|
||||
fPosArrive = G4ThreeVector(0., 0., 0.);
|
||||
fPosExit = G4ThreeVector(0., 0., 0.);
|
||||
}
|
||||
@@ -57,10 +55,6 @@ WLSPhotonDetHit::WLSPhotonDetHit(G4ThreeVector pExit, G4ThreeVector pArrive,
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSPhotonDetHit::~WLSPhotonDetHit() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSPhotonDetHit::WLSPhotonDetHit(const WLSPhotonDetHit& right)
|
||||
: G4VHit()
|
||||
{
|
||||
|
||||
@@ -45,18 +45,12 @@
|
||||
|
||||
WLSPhotonDetSD::WLSPhotonDetSD(G4String name)
|
||||
: G4VSensitiveDetector(name)
|
||||
, fPhotonDetHitCollection(nullptr)
|
||||
, fHCID(-1)
|
||||
{
|
||||
collectionName.insert("PhotonDetHitCollection");
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSPhotonDetSD::~WLSPhotonDetSD() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSPhotonDetSD::Initialize(G4HCofThisEvent* HCE)
|
||||
{
|
||||
fPhotonDetHitCollection =
|
||||
@@ -87,11 +81,10 @@ G4bool WLSPhotonDetSD::ProcessHits(G4Step* aStep, G4TouchableHistory*)
|
||||
// Find out information regarding the hit
|
||||
G4StepPoint* thePostPoint = aStep->GetPostStepPoint();
|
||||
|
||||
WLSUserTrackInformation* trackInformation =
|
||||
auto trackInformation =
|
||||
(WLSUserTrackInformation*) theTrack->GetUserInformation();
|
||||
|
||||
G4TouchableHistory* theTouchable =
|
||||
(G4TouchableHistory*) (thePostPoint->GetTouchable());
|
||||
auto theTouchable = (G4TouchableHistory*) (thePostPoint->GetTouchable());
|
||||
|
||||
G4ThreeVector photonExit = trackInformation->GetExitPosition();
|
||||
G4ThreeVector photonArrive = thePostPoint->GetPosition();
|
||||
|
||||
@@ -58,14 +58,9 @@ WLSPrimaryGeneratorAction::WLSPrimaryGeneratorAction(
|
||||
WLSDetectorConstruction* dc)
|
||||
{
|
||||
fDetector = dc;
|
||||
fIntegralTable = nullptr;
|
||||
|
||||
fParticleGun = new G4GeneralParticleSource();
|
||||
|
||||
fGunMessenger = new WLSPrimaryGeneratorMessenger(this);
|
||||
|
||||
fTimeConstant = 0.;
|
||||
fUseSampledEnergy = false;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
@@ -103,7 +98,7 @@ void WLSPrimaryGeneratorAction::BuildEmissionSpectrum()
|
||||
|
||||
for(G4int i = 0; i < numOfMaterials; ++i)
|
||||
{
|
||||
G4PhysicsFreeVector* vec = new G4PhysicsFreeVector();
|
||||
auto vec = new G4PhysicsFreeVector();
|
||||
|
||||
G4MaterialPropertiesTable* MPT =
|
||||
(*theMaterialTable)[i]->GetMaterialPropertiesTable();
|
||||
@@ -168,8 +163,7 @@ void WLSPrimaryGeneratorAction::GeneratePrimaries(G4Event* anEvent)
|
||||
|
||||
if(WLSIntensity)
|
||||
{
|
||||
G4PhysicsFreeVector* WLSIntegral =
|
||||
(G4PhysicsFreeVector*) ((*fIntegralTable)(
|
||||
auto WLSIntegral = (G4PhysicsFreeVector*) ((*fIntegralTable)(
|
||||
fMaterial->GetIndex()));
|
||||
|
||||
G4double CIImax = WLSIntegral->GetMaxValue();
|
||||
|
||||
@@ -33,44 +33,9 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSRun::WLSRun()
|
||||
: G4Run()
|
||||
{
|
||||
fNTIR = 0.;
|
||||
fNTIR2 = 0.;
|
||||
fNExiting = 0.;
|
||||
fNExiting2 = 0.;
|
||||
fEscapedEnd = 0.;
|
||||
fEscapedEnd2 = 0.;
|
||||
fEscapedMid = 0.;
|
||||
fEscapedMid2 = 0.;
|
||||
fBounce = 0.;
|
||||
fBounce2 = 0.;
|
||||
fWLSBounce = 0.;
|
||||
fWLSBounce2 = 0.;
|
||||
fClad1Bounce = 0.;
|
||||
fClad1Bounce2 = 0.;
|
||||
fClad2Bounce = 0.;
|
||||
fClad2Bounce2 = 0.;
|
||||
fReflected = 0.;
|
||||
fReflected2 = 0.;
|
||||
fEscaped = 0.;
|
||||
fEscaped2 = 0.;
|
||||
fMirror = 0.;
|
||||
fMirror2 = 0.;
|
||||
fDetectorHits = 0.;
|
||||
fDetectorHits2 = 0.;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSRun::~WLSRun() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
void WLSRun::Merge(const G4Run* run)
|
||||
{
|
||||
const WLSRun* localRun = static_cast<const WLSRun*>(run);
|
||||
const auto localRun = static_cast<const WLSRun*>(run);
|
||||
|
||||
fNTIR += localRun->fNTIR;
|
||||
fNTIR2 += localRun->fNTIR2;
|
||||
@@ -106,7 +71,7 @@ void WLSRun::EndOfRun()
|
||||
{
|
||||
if(numberOfEvent == 0)
|
||||
return;
|
||||
G4double TotNbofEvents = G4double(numberOfEvent);
|
||||
auto TotNbofEvents = G4double(numberOfEvent);
|
||||
|
||||
fNTIR = fNTIR / TotNbofEvents;
|
||||
fNTIR2 = fNTIR2 / TotNbofEvents;
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSRunAction::WLSRunAction()
|
||||
: fRun(nullptr)
|
||||
{
|
||||
auto analysisManager = G4AnalysisManager::Instance();
|
||||
|
||||
@@ -55,14 +54,10 @@ WLSRunAction::WLSRunAction()
|
||||
2.*CLHEP::eV, 3.2*CLHEP::eV);
|
||||
analysisManager->CreateH1("Time", "Arrival time", 100, 0., 100.*CLHEP::ns);
|
||||
analysisManager->CreateH1("Number of photons", "Number of photons", 100, 0., 100.);
|
||||
|
||||
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSRunAction::~WLSRunAction() {}
|
||||
|
||||
G4Run* WLSRunAction::GenerateRun()
|
||||
{
|
||||
fRun = new WLSRun();
|
||||
@@ -84,7 +79,7 @@ void WLSRunAction::EndOfRunAction(const G4Run*)
|
||||
if (analysisManager->GetH1(0)) {
|
||||
G4cout << G4endl << " ----> print histograms statistics ";
|
||||
if(isMaster)
|
||||
{
|
||||
{
|
||||
G4cout << "for the entire run " << G4endl << G4endl;
|
||||
}
|
||||
else {
|
||||
@@ -95,13 +90,11 @@ void WLSRunAction::EndOfRunAction(const G4Run*)
|
||||
<< analysisManager->GetH1(2)->mean()
|
||||
<< " rms = "
|
||||
<< analysisManager->GetH1(2)->rms() << G4endl;
|
||||
|
||||
}
|
||||
|
||||
analysisManager->Write();
|
||||
analysisManager->CloseFile();
|
||||
|
||||
|
||||
if(isMaster)
|
||||
fRun->EndOfRun();
|
||||
}
|
||||
|
||||
@@ -36,16 +36,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSStackingAction::WLSStackingAction()
|
||||
: fPhotonCounter(0)
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSStackingAction::~WLSStackingAction() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4ClassificationOfNewTrack WLSStackingAction::ClassifyNewTrack(
|
||||
const G4Track* aTrack)
|
||||
{
|
||||
|
||||
@@ -61,13 +61,6 @@ WLSSteppingAction::WLSSteppingAction(WLSDetectorConstruction* detector,
|
||||
, fEventAction(event)
|
||||
{
|
||||
fSteppingMessenger = new WLSSteppingActionMessenger(this);
|
||||
|
||||
fCounterEnd = 0;
|
||||
fCounterMid = 0;
|
||||
fBounceLimit = 100000;
|
||||
|
||||
fOpProcess = nullptr;
|
||||
|
||||
ResetCounters();
|
||||
}
|
||||
|
||||
@@ -115,7 +108,7 @@ G4int WLSSteppingAction::ResetSuccessCounter()
|
||||
void WLSSteppingAction::UserSteppingAction(const G4Step* theStep)
|
||||
{
|
||||
G4Track* theTrack = theStep->GetTrack();
|
||||
WLSUserTrackInformation* trackInformation =
|
||||
auto trackInformation =
|
||||
(WLSUserTrackInformation*) theTrack->GetUserInformation();
|
||||
|
||||
G4StepPoint* thePrePoint = theStep->GetPreStepPoint();
|
||||
|
||||
@@ -47,7 +47,7 @@ void WLSTrackingAction::PreUserTrackingAction(const G4Track* aTrack)
|
||||
// Use custom trajectory class
|
||||
fpTrackingManager->SetTrajectory(new WLSTrajectory(aTrack));
|
||||
|
||||
WLSUserTrackInformation* trackInformation = new WLSUserTrackInformation();
|
||||
auto trackInformation = new WLSUserTrackInformation();
|
||||
|
||||
if(aTrack->GetMomentumDirection().z() > 0.0)
|
||||
{
|
||||
|
||||
@@ -50,20 +50,6 @@ G4ThreadLocal G4Allocator<WLSTrajectory>* WLSTrajectoryAllocator = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSTrajectory::WLSTrajectory()
|
||||
: fpPointsContainer(0)
|
||||
, fTrackID(0)
|
||||
, fParentID(0)
|
||||
, fPDGCharge(0.0)
|
||||
, fPDGEncoding(0)
|
||||
, fParticleName("")
|
||||
, fInitialMomentum(G4ThreeVector())
|
||||
{
|
||||
fParticleDefinition = nullptr;
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSTrajectory::WLSTrajectory(const G4Track* aTrack)
|
||||
{
|
||||
fParticleDefinition = aTrack->GetDefinition();
|
||||
@@ -94,8 +80,7 @@ WLSTrajectory::WLSTrajectory(WLSTrajectory& right)
|
||||
|
||||
for(size_t i = 0; i < right.fpPointsContainer->size(); ++i)
|
||||
{
|
||||
WLSTrajectoryPoint* rightPoint =
|
||||
(WLSTrajectoryPoint*) ((*(right.fpPointsContainer))[i]);
|
||||
auto rightPoint = (WLSTrajectoryPoint*) ((*(right.fpPointsContainer))[i]);
|
||||
fpPointsContainer->push_back(new WLSTrajectoryPoint(*rightPoint));
|
||||
}
|
||||
}
|
||||
@@ -142,8 +127,8 @@ void WLSTrajectory::MergeTrajectory(G4VTrajectory* secondTrajectory)
|
||||
if(!secondTrajectory)
|
||||
return;
|
||||
|
||||
WLSTrajectory* second = (WLSTrajectory*) secondTrajectory;
|
||||
G4int ent = second->GetPointEntries();
|
||||
auto second = (WLSTrajectory*) secondTrajectory;
|
||||
G4int ent = second->GetPointEntries();
|
||||
// initial point of the second trajectory should not be merged
|
||||
for(G4int i = 1; i < ent; ++i)
|
||||
{
|
||||
@@ -197,7 +182,7 @@ const std::map<G4String, G4AttDef>* WLSTrajectory::GetAttDefs() const
|
||||
|
||||
std::vector<G4AttValue>* WLSTrajectory::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
auto values = new std::vector<G4AttValue>;
|
||||
|
||||
values->push_back(
|
||||
G4AttValue("ID", G4UIcommand::ConvertToString(fTrackID), ""));
|
||||
|
||||
@@ -44,15 +44,6 @@ G4ThreadLocal G4Allocator<WLSTrajectoryPoint>* WLSTrajPointAllocator = nullptr;
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSTrajectoryPoint::WLSTrajectoryPoint()
|
||||
: fTime(0.)
|
||||
, fMomentum(0., 0., 0.)
|
||||
, fStepStatus(fUndefined)
|
||||
, fVolumeName("")
|
||||
{}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSTrajectoryPoint::WLSTrajectoryPoint(const G4Step* aStep)
|
||||
: G4TrajectoryPoint(aStep->GetPostStepPoint()->GetPosition())
|
||||
{
|
||||
@@ -94,10 +85,6 @@ WLSTrajectoryPoint::WLSTrajectoryPoint(const WLSTrajectoryPoint& right)
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSTrajectoryPoint::~WLSTrajectoryPoint() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
const std::map<G4String, G4AttDef>* WLSTrajectoryPoint::GetAttDefs() const
|
||||
{
|
||||
G4bool isNew;
|
||||
@@ -132,7 +119,7 @@ const std::map<G4String, G4AttDef>* WLSTrajectoryPoint::GetAttDefs() const
|
||||
|
||||
std::vector<G4AttValue>* WLSTrajectoryPoint::CreateAttValues() const
|
||||
{
|
||||
std::vector<G4AttValue>* values = new std::vector<G4AttValue>;
|
||||
auto values = new std::vector<G4AttValue>;
|
||||
|
||||
values->push_back(G4AttValue("Time", G4BestUnit(fTime, "Time"), ""));
|
||||
values->push_back(
|
||||
|
||||
@@ -33,14 +33,6 @@
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSUserTrackInformation::WLSUserTrackInformation() { fStatus = undefined; }
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
WLSUserTrackInformation::~WLSUserTrackInformation() {}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
|
||||
G4bool WLSUserTrackInformation::AddStatusFlag(TrackStatus s)
|
||||
// Try adding a status flag and return if it is successful or not
|
||||
// Cannot Add Undefine or a flag that conflicts with another flag
|
||||
|
||||
Reference in New Issue
Block a user