Skip to content
Snippets Groups Projects
Commit 08b2637d authored by Wouter Deconinck's avatar Wouter Deconinck
Browse files

Use JUGGLER_DETECTOR_CONFIG for xml file

parent 7e5aecf4
Branches
No related tags found
1 merge request!253Use JUGGLER_DETECTOR_CONFIG for xml file
Showing
with 28 additions and 28 deletions
...@@ -75,7 +75,7 @@ if [[ ! -n "${DETECTOR_PATH}" ]] ; then ...@@ -75,7 +75,7 @@ if [[ ! -n "${DETECTOR_PATH}" ]] ; then
export DETECTOR_PATH=${DETECTOR_PATH} export DETECTOR_PATH=${DETECTOR_PATH}
fi fi
compact_path=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml compact_path=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
export JUGGLER_FILE_NAME_TAG="${nametag}" export JUGGLER_FILE_NAME_TAG="${nametag}"
export JUGGLER_GEN_FILE="gen_${JUGGLER_FILE_NAME_TAG}.hepmc" export JUGGLER_GEN_FILE="gen_${JUGGLER_FILE_NAME_TAG}.hepmc"
......
...@@ -9,8 +9,8 @@ import ROOT ...@@ -9,8 +9,8 @@ import ROOT
from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena"))
detector_version = str(os.environ.get("JUGGLER_DETECTOR", "master")) detector_version = str(os.environ.get("JUGGLER_DETECTOR_VERSION", "master"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
compact_path = os.path.join(detector_path, detector_name) compact_path = os.path.join(detector_path, detector_name)
......
...@@ -9,7 +9,7 @@ import ROOT ...@@ -9,7 +9,7 @@ import ROOT
from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name))))
......
...@@ -8,7 +8,7 @@ import ROOT ...@@ -8,7 +8,7 @@ import ROOT
from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name))))
......
...@@ -9,7 +9,7 @@ import ROOT ...@@ -9,7 +9,7 @@ import ROOT
from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioInput, PodioOutput, GeoSvc
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name))))
ci_ecal_sf = float(os.environ.get("CI_ECAL_SAMP_FRAC", 0.253)) ci_ecal_sf = float(os.environ.get("CI_ECAL_SAMP_FRAC", 0.253))
......
...@@ -32,7 +32,7 @@ default_type = { ...@@ -32,7 +32,7 @@ default_type = {
} }
default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')),
'{}.xml'.format(os.environ.get('JUGGLER_DETECTOR', ''))) '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR_CONFIG', '')))
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('run_type', help='Run type, support {}'.format(list(default_type.keys()))) parser.add_argument('run_type', help='Run type, support {}'.format(list(default_type.keys())))
parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.')
......
...@@ -83,7 +83,7 @@ then ...@@ -83,7 +83,7 @@ then
--filter.tracker edep0 \ --filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
......
...@@ -3,7 +3,7 @@ from Gaudi.Configuration import * ...@@ -3,7 +3,7 @@ from Gaudi.Configuration import *
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad from GaudiKernel.SystemOfUnits import MeV, GeV, mm, cm, mrad
detector_name = str(os.environ.get("JUGGLER_DETECTOR", "athena")) detector_name = str(os.environ.get("JUGGLER_DETECTOR_CONFIG", "athena"))
detector_path = str(os.environ.get("DETECTOR_PATH", ".")) detector_path = str(os.environ.get("DETECTOR_PATH", "."))
compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name)))) compact_path = str(os.environ.get("JUGGLER_COMPACT_PATH", "{}.xml".format(os.path.join(detector_path, detector_name))))
......
...@@ -67,7 +67,7 @@ if [[ ! -n "${ZDC_SCI_SAMP_FRAC}" ]] ; then ...@@ -67,7 +67,7 @@ if [[ ! -n "${ZDC_SCI_SAMP_FRAC}" ]] ; then
export ZDC_PbSCI_SAMP_FRAC=1.0 export ZDC_PbSCI_SAMP_FRAC=1.0
fi fi
export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
export JUGGLER_FILE_NAME_TAG="zdc_neutrons" export JUGGLER_FILE_NAME_TAG="zdc_neutrons"
export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc"
...@@ -93,7 +93,7 @@ then ...@@ -93,7 +93,7 @@ then
--filter.tracker edep0 \ --filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
......
...@@ -67,7 +67,7 @@ if [[ ! -n "${ZDC_SCI_SAMP_FRAC}" ]] ; then ...@@ -67,7 +67,7 @@ if [[ ! -n "${ZDC_SCI_SAMP_FRAC}" ]] ; then
export ZDC_PbSCI_SAMP_FRAC=1.0 export ZDC_PbSCI_SAMP_FRAC=1.0
fi fi
export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export DETECTOR_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
export JUGGLER_FILE_NAME_TAG="zdc_photons" export JUGGLER_FILE_NAME_TAG="zdc_photons"
export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc" export JUGGLER_GEN_FILE="${JUGGLER_FILE_NAME_TAG}.hepmc"
...@@ -93,7 +93,7 @@ then ...@@ -93,7 +93,7 @@ then
--filter.tracker edep0 \ --filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
......
...@@ -95,8 +95,8 @@ void emcal_barrel_pion_rejection_analysis( ...@@ -95,8 +95,8 @@ void emcal_barrel_pion_rejection_analysis(
if(std::getenv("DETECTOR_PATH")) { if(std::getenv("DETECTOR_PATH")) {
detector_path = std::getenv("DETECTOR_PATH"); detector_path = std::getenv("DETECTOR_PATH");
} }
if(std::getenv("JUGGLER_DETECTOR")) { if(std::getenv("JUGGLER_DETECTOR_CONFIG")) {
detector_name = std::getenv("JUGGLER_DETECTOR"); detector_name = std::getenv("JUGGLER_DETECTOR_CONFIG");
} }
// MCParticles Functions///////////////////////////////////////////////////////////////////////////////////// // MCParticles Functions/////////////////////////////////////////////////////////////////////////////////////
......
...@@ -47,7 +47,7 @@ do ...@@ -47,7 +47,7 @@ do
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then
export CB_EMCAL_NUMEV=1000 export CB_EMCAL_NUMEV=1000
......
...@@ -47,7 +47,7 @@ do ...@@ -47,7 +47,7 @@ do
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then
export CB_EMCAL_NUMEV=1000 export CB_EMCAL_NUMEV=1000
......
...@@ -47,7 +47,7 @@ do ...@@ -47,7 +47,7 @@ do
done done
set -- "${POSITIONAL[@]}" # restore positional parameters set -- "${POSITIONAL[@]}" # restore positional parameters
export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml export CB_EMCAL_COMPACT_PATH=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml
if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then if [[ ! -n "${CB_EMCAL_NUMEV}" ]] ; then
export CB_EMCAL_NUMEV=1000 export CB_EMCAL_NUMEV=1000
......
...@@ -12,7 +12,7 @@ import argparse ...@@ -12,7 +12,7 @@ import argparse
default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')), default_compact = os.path.join(os.environ.get('DETECTOR_PATH', os.environ.get('DETECTOR_PATH', '')),
'{}.xml'.format(os.environ.get('JUGGLER_DETECTOR', ''))) '{}.xml'.format(os.environ.get('JUGGLER_DETECTOR_CONFIG', '')))
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.') parser.add_argument('-n', '--numberOfEvents', dest='nev', type=int, default=100, help='Number of events to process.')
parser.add_argument('-t', '--nametag', type=str, default='IMCAL_ML', help='Name tag for output files.') parser.add_argument('-t', '--nametag', type=str, default='IMCAL_ML', help='Name tag for output files.')
......
...@@ -45,7 +45,7 @@ fi ...@@ -45,7 +45,7 @@ fi
# This script appears to be missing # This script appears to be missing
## run geant4 simulations ## run geant4 simulations
#python benchmakrs/options/ForwardRICH/simu.py \ #python benchmakrs/options/ForwardRICH/simu.py \
# --compact=${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ # --compact=${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
# -i ${JUGGLER_FILE_NAME_TAG}.hepmc \ # -i ${JUGGLER_FILE_NAME_TAG}.hepmc \
# -o ${JUGGLER_SIM_FILE} # -o ${JUGGLER_SIM_FILE}
# -n ${JUGGLER_N_EVENTS} # -n ${JUGGLER_N_EVENTS}
...@@ -63,7 +63,7 @@ ddsim --runType batch \ ...@@ -63,7 +63,7 @@ ddsim --runType batch \
--filter.tracker edep0 \ --filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
......
...@@ -4,8 +4,8 @@ from GaudiKernel import SystemOfUnits as units ...@@ -4,8 +4,8 @@ from GaudiKernel import SystemOfUnits as units
from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
detector_name = "topside" detector_name = "topside"
if "JUGGLER_DETECTOR" in os.environ : if "JUGGLER_DETECTOR_CONFIG" in os.environ :
detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
if "DETECTOR_PATH" in os.environ : if "DETECTOR_PATH" in os.environ :
detector_name = str(os.environ["DETECTOR_PATH"])+"/"+detector_name detector_name = str(os.environ["DETECTOR_PATH"])+"/"+detector_name
......
...@@ -68,7 +68,7 @@ ddsim --runType batch \ ...@@ -68,7 +68,7 @@ ddsim --runType batch \
--filter.tracker edep0 \ --filter.tracker edep0 \
-v WARNING \ -v WARNING \
--numberOfEvents ${JUGGLER_N_EVENTS} \ --numberOfEvents ${JUGGLER_N_EVENTS} \
--compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR}.xml \ --compactFile ${DETECTOR_PATH}/${JUGGLER_DETECTOR_CONFIG}.xml \
--inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \ --inputFiles ${JUGGLER_FILE_NAME_TAG}.hepmc \
--outputFile ${JUGGLER_SIM_FILE} --outputFile ${JUGGLER_SIM_FILE}
if [[ "$?" -ne "0" ]] ; then if [[ "$?" -ne "0" ]] ; then
......
...@@ -4,8 +4,8 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc ...@@ -4,8 +4,8 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel import SystemOfUnits as units from GaudiKernel import SystemOfUnits as units
detector_name = "topside" detector_name = "topside"
if "JUGGLER_DETECTOR" in os.environ : if "JUGGLER_DETECTOR_CONFIG" in os.environ :
detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
detector_path = "" detector_path = ""
if "DETECTOR_PATH" in os.environ : if "DETECTOR_PATH" in os.environ :
......
...@@ -4,8 +4,8 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc ...@@ -4,8 +4,8 @@ from Configurables import ApplicationMgr, EICDataSvc, PodioOutput, GeoSvc
from GaudiKernel import SystemOfUnits as units from GaudiKernel import SystemOfUnits as units
detector_name = "athena" detector_name = "athena"
if "JUGGLER_DETECTOR" in os.environ : if "JUGGLER_DETECTOR_CONFIG" in os.environ :
detector_name = str(os.environ["JUGGLER_DETECTOR"]) detector_name = str(os.environ["JUGGLER_DETECTOR_CONFIG"])
detector_path = "" detector_path = ""
if "DETECTOR_PATH" in os.environ : if "DETECTOR_PATH" in os.environ :
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment