LCDetectors
diff -u -r1.25 -r1.26
--- Makefile 7 Feb 2007 21:07:16 -0000 1.25
+++ Makefile 3 May 2010 20:45:28 -0000 1.26
@@ -1,9 +1,9 @@
-# $Id: Makefile,v 1.25 2007/02/07 21:07:16 jeremy Exp $
+# $Id: Makefile,v 1.26 2010/05/03 20:45:28 jeremy Exp $
#
# Makefile using GeomConverter and shell tools to
-# create LCDD/HepRep files, update detectors,
-# and create zips.
+# create LCDD/HepRep/slicPandora geometry files,
+# update detectors, and create packaged zip files.
#
# Execute the help target to see available targets:
#
@@ -14,41 +14,36 @@
# at www.lcsim.org/detectors
#
-# How to run GeomConverter?
+# The full path to the GeomConverter jar file (NOT the base dir).
ifndef GEOMCONVERTER
GEOMCONVERTER=GeomConverter
endif
-# How to run SLIC?
+# How to run slic.
ifndef SLICBIN
SLICBIN=slic
endif
-# How to run Python?
-#ifndef PYTHON
-# PYTHON=python
-#endif
-
-# How to call root?
-ifndef ROOT
- ROOT=root
-endif
-
-# How to run DAWN?
+# How to run dawn.
ifndef DAWN
DAWN=dawn
endif
-# How to run dawncut?
+# How to run dawncut.
ifndef DAWNCUT
DAWNCUT=dawncut
endif
-# What editor to use?
+# Command-line editor.
ifndef EDITOR
EDITOR=emacs
endif
+# Java execution.
+ifndef JAVA
+ JAVA=java
+endif
+
# Location of the LCSim website.
# Default is SLAC NFS.
ifndef PRJ_WWW
@@ -88,13 +83,13 @@
echo "godl - make GODL file for single detector"; \
echo "heprep - make HepRep file for single detector"; \
echo "lcdd - make LCDD file for single detector"; \
+ echo "pandora - make slicPandora geometry file for single detector"; \
echo "new - create a new detector"; \
echo "ogl - load the LCDD into SLIC and start OpenGL viewer"; \
echo "olap - check a single detector for overlaps"; \
echo "mkdir - make directory for new detector"; \
echo "oiv - load LCDD file into Geant4 OpenInventor viewer"; \
echo "properties - create detector.properties file for single detector"; \
- echo "root - load the GDML file into the ROOT OpenGL viewer"; \
echo "slic - load the LCDD file into SLIC"; \
echo "template - copy template files to new detector dir"; \
echo "tree - output drawTree command to file"; \
@@ -166,6 +161,11 @@
@for detector in $(DETECTORS); do \
$(MAKE) lcdd DETECTOR=$$detector; done
+# Create the slicPandora geometry for each detector.
+pandora_all:
+ @for detector in $(DETECTORS); do \
+ $(MAKE) pandora DETECTOR=$$detector; done
+
# Create a GDML file for each detector.
gdml_all:
@for detector in $(DETECTORS); do \
@@ -242,7 +242,7 @@
# Create the LCDD file for a single detector.
lcdd:
- @$(GEOMCONVERTER) -o lcdd ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).lcdd; \
+ @$(JAVA) -jar $(GEOMCONVERTER) -o lcdd ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).lcdd; \
echo "Created ./detectors/$(DETECTOR)/$(DETECTOR).lcdd"
# Use SLIC to dump a pure GDML file for a single detector.
@@ -268,6 +268,11 @@
mv g4_00.prim ./detectors/$(DETECTOR)/$(DETECTOR).prim; \
echo "Created ./detectors/$(DETECTOR)/$(DETECTOR).prim"
+# Generate the slicPandora input file.
+pandora:
+ @$(JAVA) -jar $(GEOMCONVERTER) -o pandora ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR)_pandora.xml; \
+ echo "Created ./detectors/$(DETECTOR)/$(DETECTOR)_pandora.xml"
+
# Do a ZY cutaway using dawncut.
dawncut_zy:
@$(DAWNCUT) 1 0 0 0 ./detectors/$(DETECTOR)/$(DETECTOR).prim ./detectors/$(DETECTOR)/$(DETECTOR)_cut_zy.prim &>/dev/null; \
@@ -304,18 +309,9 @@
@$(SLICBIN) -g ./detectors/$(DETECTOR)/$(DETECTOR).lcdd -m ./g4macros/tree.mac &> ./detectors/$(DETECTOR)/$(DETECTOR)_geom_tree.txt; \
echo "Created ./detectors/$(DETECTOR)/$(DETECTOR)_geom_tree.txt"
-# Only define this target if ROOT is defined in the user environment.
-ifdef ROOTSYS
-
-# Load the GDML file into the Python/GDML/ROOT viewer.
-.PHONY: root
-root:
- $(ROOT) './root/gdml.C("./detectors/$(DETECTOR)/$(DETECTOR).gdml")'
-endif
-
# Use GeomConverter to create the HepRep file for a single detector.
heprep:
- @$(GEOMCONVERTER) -o heprep ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).heprep; \
+ @java -jar $(GEOMCONVERTER) -o heprep ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).heprep; \
echo "Created ./detectors/$(DETECTOR)/$(DETECTOR).heprep"
# Use SLIC to make a Geant4 Heprep.
@@ -326,7 +322,7 @@
# Use GeomConverter to create the GODL file for a single detector.
godl:
- @$(GEOMCONVERTER) -o godl ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).godl; \
+ @java -jar $(GEOMCONVERTER) -o godl ./detectors/$(DETECTOR)/compact.xml ./detectors/$(DETECTOR)/$(DETECTOR).godl; \
echo "Created ./detectors/$(DETECTOR)/$(DETECTOR).godl"
# Commit changes to LCDetectors cvs for a single detector.