Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
/// \file runAndEvent/RE01/src/RE01CalorimeterROGeometry.cc
|
||||
/// \brief Implementation of the RE01CalorimeterROGeometry class
|
||||
//
|
||||
// $Id: RE01CalorimeterROGeometry.cc 75295 2013-10-30 09:32:52Z gcosmo $
|
||||
// $Id: RE01CalorimeterROGeometry.cc 97383 2016-06-02 09:56:35Z gcosmo $
|
||||
//
|
||||
|
||||
#include "RE01CalorimeterROGeometry.hh"
|
||||
@@ -43,15 +43,9 @@
|
||||
#include "G4SystemOfUnits.hh"
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterROGeometry::RE01CalorimeterROGeometry()
|
||||
: G4VReadOutGeometry()
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
RE01CalorimeterROGeometry::RE01CalorimeterROGeometry(G4String aString)
|
||||
: G4VReadOutGeometry(aString)
|
||||
RE01CalorimeterROGeometry::
|
||||
RE01CalorimeterROGeometry(G4String& parallelWorldName)
|
||||
: G4VUserParallelWorld(parallelWorldName)
|
||||
{
|
||||
#include "RE01DetectorParameterDef.icc"
|
||||
}
|
||||
@@ -61,34 +55,26 @@ RE01CalorimeterROGeometry::~RE01CalorimeterROGeometry()
|
||||
{;}
|
||||
|
||||
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
|
||||
G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
|
||||
void RE01CalorimeterROGeometry::Construct()
|
||||
{
|
||||
// Material Information imported from NIST database.
|
||||
//
|
||||
G4NistManager* NISTman = G4NistManager::Instance();
|
||||
|
||||
// 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 = NISTman->FindOrBuildMaterial("G4_AIR");
|
||||
G4Material* dummyMat = nullptr;
|
||||
|
||||
//the ReadOut World:
|
||||
G4VPhysicalVolume* ROWorldPhys = GetWorld();
|
||||
G4LogicalVolume *ROWorldLog = ROWorldPhys->GetLogicalVolume();
|
||||
|
||||
//Builds the ReadOut World:
|
||||
G4Box *ROWorldBox = new G4Box("ROWorldBox",fExpHall_x,fExpHall_y,fExpHall_z);
|
||||
G4LogicalVolume *ROWorldLog = new G4LogicalVolume(ROWorldBox, dummyMat,
|
||||
"ROWorldLogical", 0, 0, 0);
|
||||
G4PVPlacement *ROWorldPhys = new G4PVPlacement(0,G4ThreeVector(),
|
||||
"ROWorldPhysical",
|
||||
ROWorldLog,
|
||||
0,false,0);
|
||||
// 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(),"calROphysical",caloROlog,
|
||||
ROWorldPhys,false,0);
|
||||
// G4VPhysicalVolume * caloROphys =
|
||||
new G4PVPlacement(0,G4ThreeVector(),caloROlog,"calROphysical",
|
||||
ROWorldLog,false,0);
|
||||
|
||||
// -------------------------------
|
||||
// Calorimeter readout division:
|
||||
@@ -100,9 +86,9 @@ G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
|
||||
G4LogicalVolume * caloROphiDivisionLog
|
||||
= new G4LogicalVolume(caloROphiDivisionTub, dummyMat,
|
||||
"caloROphiDivisionLogical",0,0,0);
|
||||
G4VPhysicalVolume * caloROphiDivisionPhys
|
||||
= new G4PVReplica("caloROphiDivisionPhysical", caloROphiDivisionLog,
|
||||
caloROphys, kPhi, fSegmentsinPhi, fCaloCell_dphi);
|
||||
// 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,
|
||||
@@ -110,8 +96,20 @@ G4VPhysicalVolume* RE01CalorimeterROGeometry::Build()
|
||||
G4LogicalVolume * caloROcellLog
|
||||
= new G4LogicalVolume(caloROcellTub, dummyMat, "caloROcellLogical",0,0,0);
|
||||
// G4VPhysicalVolume * caloROcellPhys =
|
||||
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionPhys,
|
||||
new G4PVReplica("caloROcellPhysical", caloROcellLog, caloROphiDivisionLog,
|
||||
kZAxis, fSegmentsinZ,2.*fCaloRing_dz);
|
||||
|
||||
return ROWorldPhys;
|
||||
}
|
||||
|
||||
#include "RE01CalorimeterSD.hh"
|
||||
|
||||
void RE01CalorimeterROGeometry::ConstructSD()
|
||||
{
|
||||
//------------------------------------------------------------------
|
||||
// Sensitive Detector
|
||||
//------------------------------------------------------------------
|
||||
G4String calorimeterSDname = "/mydet/calorimeter";
|
||||
RE01CalorimeterSD * calorimeterSD = new RE01CalorimeterSD(calorimeterSDname);
|
||||
SetSensitiveDetector("caloROcellLogical", calorimeterSD);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user