Skip to content
Snippets Groups Projects
Commit 546e6a39 authored by Chad Lantz's avatar Chad Lantz
Browse files

Re-enabled CADmodel macro command

parent 6d252eff
Branches master
No related tags found
No related merge requests found
......@@ -74,7 +74,7 @@ DetectorConstruction::DetectorConstruction()
m_ConstructionHasBeenDone(false),
m_UsingCADmodel(true),
m_logicWorld(0),
m_physLG(0),
m_logicLG(0),
m_physPMT(0),
m_DetectorMessenger(nullptr)
{
......@@ -164,8 +164,9 @@ void DetectorConstruction::BuildDefaultLG( ){
// Build the light guide here up until the logical volume
// Maybe build the aluminum portion into a single CAD solid and add
// fibers and air here
UseCADModel("../models/LED-GMS-light-guide.stl");
if(m_logicLG == 0){
UseCADModel("../models/LED-GMS-light-guide.stl");
}
bool CHECK_OVERLAPS = true;
......@@ -211,7 +212,7 @@ void DetectorConstruction::BuildDefaultLG( ){
m_logicBuffer = new G4LogicalVolume( m_fiberBuffer, // solid to be created from
materials->pQuartz, // material
"fiber_logicBuffer"); // name
// Place the fibers
G4RotationMatrix* fiberRotation = new G4RotationMatrix();
fiberRotation->rotateX(90.*deg);
......@@ -315,7 +316,7 @@ void DetectorConstruction::BuildPMT(){
m_logicIntSD.push_back( new G4LogicalVolume(m_solidIntSD.back(), materials->Air, "logicIntSD2") );
m_logicIntSD.back()->SetVisAttributes(VisAtt_PMT);
m_logicIntSD.back()->SetSensitiveDetector( PMT );
/***********************************
* Intermediate Sensitive Detector 3
......@@ -323,11 +324,11 @@ void DetectorConstruction::BuildPMT(){
m_SDnames.push_back("PhotodiodeSD");
PMT = new PMTSD(m_SDnames.back(), true); // isIntermediate set to true
SDman->AddNewDetector( PMT );
m_solidIntSD.push_back( new G4Box("solidPhotodiodeSD", 2.5*mm, 0.001*mm, 0.75*mm) );
m_solidIntSD.push_back( new G4Box("solidPhotodiodeSD", 2.5*mm, 0.001*mm, 0.75*mm) );
m_logicIntSD.push_back( new G4LogicalVolume(m_solidIntSD.back(), materials->Air, "logicPhotodiodeSD"));
m_logicIntSD.back()->SetVisAttributes(VisAtt_PMT);
m_logicIntSD.back()->SetSensitiveDetector( PMT );
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment