Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zdcLG
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Chad Lantz
zdcLG
Commits
4473ca8b
Commit
4473ca8b
authored
5 years ago
by
clantz
Browse files
Options
Downloads
Patches
Plain Diff
removed explicit CADMesh dependencies
parent
bd29ebf1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+1
-9
1 addition, 9 deletions
CMakeLists.txt
include/DetectorConstruction.hh
+0
-8
0 additions, 8 deletions
include/DetectorConstruction.hh
src/DetectorConstruction.cc
+6
-20
6 additions, 20 deletions
src/DetectorConstruction.cc
with
7 additions
and
37 deletions
CMakeLists.txt
+
1
−
9
View file @
4473ca8b
...
...
@@ -19,14 +19,6 @@ endif()
list
(
APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}
)
find_package
(
ROOT REQUIRED
)
include
(
${
ROOT_USE_FILE
}
)
#----------------------------------------------------------------------------
# Find CADMesh
find_package
(
cadmesh
)
include_directories
(
${
CADMESH_INCLUDE_DIRS
}
)
if
(
CADMESH_INCLUDE_DIRS
)
add_definitions
(
-DCADMESH
)
endif
()
#----------------------------------------------------------------------------
# Setup Geant4 include directories and compile definitions
#
...
...
@@ -44,7 +36,7 @@ file(GLOB headers ${PROJECT_SOURCE_DIR}/include/*.hh)
# Add the executable, and link it to the Geant4 libraries
#
add_executable
(
lightGuide lightGuide.cc
${
sources
}
${
headers
}
)
target_link_libraries
(
lightGuide
${
Geant4_LIBRARIES
}
${
ROOT_LIBRARIES
}
cadmesh
)
target_link_libraries
(
lightGuide
${
Geant4_LIBRARIES
}
${
ROOT_LIBRARIES
}
)
add_executable
(
plotHisto
${
DEPENDENCIES
}
Analysis/plotHisto.cc
)
TARGET_LINK_LIBRARIES
(
plotHisto
${
ROOT_LIBRARIES
}
)
...
...
This diff is collapsed.
Click to expand it.
include/DetectorConstruction.hh
+
0
−
8
View file @
4473ca8b
...
...
@@ -40,10 +40,6 @@
#include
"G4GDMLParser.hh"
#include
"G4RunManager.hh"
#ifdef CADMESH
#include
"CADMesh.hh"
#endif
#include
"Materials.hh"
#include
"DetectorMessenger.hh"
...
...
@@ -80,10 +76,6 @@ class DetectorConstruction : public G4VUserDetectorConstruction
G4LogicalVolume
*
m_logicHalfWorld
;
G4VPhysicalVolume
*
m_physHalfWorld
;
#ifdef CADMESH
CADMesh
*
m_mesh
;
#endif
G4LogicalVolume
*
m_logicLightGuide
;
G4VPhysicalVolume
*
m_physLightGuide
;
...
...
This diff is collapsed.
Click to expand it.
src/DetectorConstruction.cc
+
6
−
20
View file @
4473ca8b
...
...
@@ -74,10 +74,6 @@ DetectorConstruction::DetectorConstruction()
m_filler
=
G4NistManager
::
Instance
()
->
FindOrBuildMaterial
(
"G4_AIR"
);
m_GasMPT
=
new
G4MaterialPropertiesTable
();
m_filler
->
SetMaterialPropertiesTable
(
m_GasMPT
);
#ifdef CADMESH
m_mesh
=
0
;
#endif
}
...
...
@@ -282,27 +278,17 @@ void DetectorConstruction::UseCADModel(G4String fileName){
if
(
m_logicLightGuide
)
delete
m_logicLightGuide
;
if
(
m_physLightGuide
)
delete
m_physLightGuide
;
G4String
fileType
=
fileName
.
substr
(
fileName
.
last
(
'.'
)
+
1
,
fileName
.
size
()
-
fileName
.
last
(
'.'
));
#ifdef CADMESH
if
(
fileType
==
"stl"
){
if
(
m_mesh
!=
0
)
delete
m_mesh
;
m_mesh
=
new
CADMesh
((
char
*
)
fileName
.
c_str
());
m_mesh
->
SetScale
(
mm
);
m_mesh
->
SetOffset
(
G4ThreeVector
(
-
20
*
cm
,
0
,
0
)
);
m_mesh
->
SetReverse
(
false
);
m_logicLightGuide
=
new
G4LogicalVolume
(
m_mesh
->
TessellatedMesh
(),
//solid
materials
->
Al
,
//material
"LightGuide"
);
//name
G4String
fileType
;
if
(
fileName
.
last
(
'.'
)
!=
std
::
string
::
npos
){
fileType
=
fileName
.
substr
(
fileName
.
last
(
'.'
)
+
1
,
fileName
.
size
()
-
fileName
.
last
(
'.'
));
}
else
{
fileType
=
"geom"
;
}
#endif
if
(
fileType
==
"gdml"
){
m_Parser
.
Read
(
fileName
);
}
if
(
fileType
==
"
step
"
){
if
(
fileType
==
"
geom
"
){
m_logicLightGuide
=
m_Parser
.
ParseST
(
fileName
,
materials
->
Air
,
materials
->
Al
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment