Commit 8866d6a5 authored by Niels Van Eldik's avatar Niels Van Eldik Committed by Graeme Stewart
Browse files

update jobO (MuonTestEDM-01-00-03)

parent d300f512
package MuonTestEDM
public
use AtlasPolicy AtlasPolicy-*
private
use AtlasROOT AtlasROOT-* External
use GaudiInterface GaudiInterface-* External
use MuonIdHelpers MuonIdHelpers-* MuonSpectrometer
use MuonPrepRawData MuonPrepRawData-* MuonSpectrometer/MuonReconstruction/MuonRecEvent
use MuonRDO MuonRDO-* MuonSpectrometer
use MuonReadoutGeometry MuonReadoutGeometry-* MuonSpectrometer/MuonDetDescr
use MuonTrigCoinData MuonTrigCoinData-* MuonSpectrometer/MuonReconstruction/MuonRecEvent
use Particle Particle-* Reconstruction
use StoreGate StoreGate-* Control
use AthenaBaseComps AthenaBaseComps-* Control
use TrkSegment TrkSegment-* Tracking/TrkEvent
use TrkTrack TrkTrack-* Tracking/TrkEvent
use TrkValAlgs TrkValAlgs-* Tracking/TrkValidation
private
use AthenaKernel AthenaKernel-* Control
public
library MuonTestEDM *.cxx -s=components *.cxx
apply_pattern component_library
apply_pattern declare_joboptions files="-s=../share *.py"
# --- Install run-time files
apply_pattern declare_runtime files="*.py *.sh"
apply_pattern install_xmls
# --- automatic testing upon gmake check
#apply_pattern athenarun_test name="MuonTestEDMTesting" pre_script="../test/script_pre_check.sh" options="../share/*.py" post_script="../test/script_post_check.sh"
private
#macro cppdebugflags '$(cppdebugflags_s)'
#macro_remove componentshr_linkopts "-Wl,-s"
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
/**
@mainpage MuonTestEDM
@author Edward.Moyse@cern.ch
@section MuonTestEDMIntro Introduction
This package is intended to test the persistency of the Muon EDM. At the moment, it runs reco, produces an ESD,
reads the ESD and compares the objects in SG to see how similar they are (hopefully identical!)
@see https://twiki.cern.ch/twiki/bin/view/Atlas/UsingMuonTestEDM
@ref used_MuonTestEDM
@ref requirements_MuonTestEDM
*/
/**
@page used_MuonTestEDM Used Packages
@htmlinclude used_packages.html
*/
/**
@page requirements_MuonTestEDM Requirements
@include requirements
*/
#!/usr/bin/env zsh
CURRDIR=`pwd`
echo in $CURRDIR
echo CMTPATH=$CMTPATH
#echo PATH=$PATH
#echo $LD_LIBRARY_PATH=$LD_LIBRARY_PATH
if [ "x${ATN_PACKAGE}" = "x" ] ; then
ATN_PACKAGE=..
echo Seem to be running outside of ATN. Have set ATN_PACKAGE to be ${ATN_PACKAGE}
fi
# echo "****** Directory contains:"
# ls
# different stages
WRITE=X
CHECKESD=X
READ=X
CHECKREF=X
CHECKSUMMARIES=X
RDOTOBS="Not run"
BSTOESD="Not run"
echo "Part 1: Writing ESD." > logfile
rm -f ESD.pool.root
#athena.py -c "doRecoOff=True" -s WriteESDfromRDO/writeTopOptions.py >! write.log 2>&1
athena.py -c 'doRecoOff=False' MuonTestEDM/writeTopOptions.py >! write.log 2>&1
if [ "${?}" != 0 ] ; then
echo " - FAILURE! "
grep WARNING write.log | grep -v OutputLevel
grep ERROR write.log | grep -v OutputLevel
else
WRITE=OK
echo " - Passed. Scanning for ERRORs, WARNINGs, FATALS (but will continue even if found)"
grep WARNING write.log | grep -v OutputLevel
grep ERROR write.log | grep -v OutputLevel
echo
echo " ============ Summary:"
cat WriteESDfromRDO.summary.log
echo
echo "Lengths of dump files:"
wc -l WriteESDfromRDO.rdo.log
wc -l WriteESDfromRDO.prd.log
wc -l WriteESDfromRDO.track.log
wc -l WriteESDfromRDO.segment.log
echo
echo "Part 2: Checking contents of ESD file."
checkFile.py ESD.pool.root >! checkFile.log 2>&1
if [ "${?}" != 0 ] ; then
echo " - FAILURE! "
#cat checkFile.log
#echo "Directory contains:"
#ls
#exit 999
else
CHECKESD=OK
echo " - Passed."
echo "Dumping checkFile.log:"
cat checkFile.log
echo
echo "Part 3: Reading ESD."
athena.py MuonTestEDM/readTopOptions.py >! read.log 2>&1
if [ "${?}" != 0 ] ; then
echo "FAILURE! "
grep WARNING write.log | grep -v OutputLevel
grep ERROR write.log | grep -v OutputLevel
#cat read.log
#exit 999
else
READ=OK
echo " - Athena terminated okay. Now checking if MuonTestEDM found problems."
grep MuonTestEDM read.log | grep ERROR
if [ "${?}" != 1 ] ; then
READ=X
echo "FAILURE! MuonTestEDM reported an error!"
fi
echo
echo " ============ Summary:"
cat ReadESD.summary.log
echo
echo "Part 4: Comparing dump files (ignoring positions)"
diff -I "Position" --text WriteESDfromRDO.rdo.log ReadESD.rdo.log >! diffRDO.log
wc -l diffRDO.log
diff -I "Position" --text WriteESDfromRDO.prd.log ReadESD.prd.log >! diffPRD.log
wc -l diffPRD.log
diff -I "Position" --text WriteESDfromRDO.track.log ReadESD.track.log >! diffTrack.log
wc -l diffTrack.log
diff -I "Position" --text WriteESDfromRDO.segment.log ReadESD.segment.log >! diffSegment.log
wc -l diffSegment.log
echo
echo "Part 5. Now dumping Diff files"
echo " ============ diffRDO.log"
# cat diffRDO.log
echo " - Suppressed, until I can hide minor position / momentum shifts"
echo " ============ diffPRD.log"
cat diffPRD.log
echo " ============ diffTrack.log"
# cat diffTrack.log
echo " - Suppressed, until I can hide minor position / momentum shifts"
echo " ============ diffSegment.log"
# cat diffSegment.log
echo " - Suppressed, until I can hide minor position / momentum shifts"
fi
fi
fi
# echo
# echo "Part 6i. Now checking reference ESD file (from 13.0.30)."
# #athena.py -c 'PoolESDInput=["/afs/cern.ch/atlas/maxidisk/d33/referencefiles/T1_5200.13.0.30.2.ESD.013836._00001.pool.root"]' ../share/readTopOptions.py >! readOld.log 2>&1
# # athena.py -c 'PoolESDInput=["/afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD.13.0.40.pool.root"] ; DumpFileName="ReadOut13040"' ../share/readTopOptions.py >! readOld.log 2>&1
# # if [ "${?}" != 0 ] ; then
# # echo "FAILURE! Tail of readOld.log: "
# # #tail readOld.log
# # #exit 999
# # CHECKREF=X
# # else
# # CHECKREF=OK
# # fi
# echo "Test temporarily disabled, until I find a new reference file"
echo
echo "Part 6i. Now checking reference ESD file (from 15.0.1)"
athena.py -s -c 'EvtMax=-1; DetDescrVersion="ATLAS-GEO-02-01-00" ; PoolESDInput=["/afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.0.1_ttbar.pool.root"] ; PoolESDOutput="copy_ESD.15.0.1.pool.root" ;DumpFileName="ReadOut150001"' ../share/readTopOptions.py >! read15.0.1.log 2>&1
if [ "${?}" != 0 ] ; then
echo "FAILURE!"
CHECKREF=X
else
CHECKREF=OK
fi
if test "${ATN_PACKAGE+set}" != set ; then
ATN_PACKAGE=..
fi
echo "Part 6ii. Now check positions"
cd ${ATN_PACKAGE}/test
make
cd $CURRDIR
# Do not check local positions for RPC PRDs for this sample becayuse of https://savannah.cern.ch/bugs/?56227
${ATN_PACKAGE}/test/comparePositions -l --prd RPC --ref /afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.0.1_ttbar.root --file ReadOut150001.root
if [ "${?}" != 0 ] ; then
echo "RPC FAILURE!"
CHECKREF=X
fi
${ATN_PACKAGE}/test/comparePositions --prd MDT --ref /afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.0.1_ttbar.root --file ReadOut150001.root
if [ "${?}" != 0 ] ; then
echo "MDT FAILURE!"
CHECKREF=X
fi
${ATN_PACKAGE}/test/comparePositions --prd CSC --ref /afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.0.1_ttbar.root --file ReadOut150001.root
if [ "${?}" != 0 ] ; then
echo "CSC FAILURE!"
CHECKREF=X
fi
${ATN_PACKAGE}/test/comparePositions --prd TGC --ref /afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.0.1_ttbar.root --file ReadOut150001.root
if [ "${?}" != 0 ] ; then
echo "TGC FAILURE!"
CHECKREF=X
fi
# echo "Part 6iii.Now checking reference ESD file (from 15.5.1)"
# athena.py -s -c 'EvtMax=-1; DetDescrVersion="ATLAS-GEO-08-00-00" ; PoolESDInput=["/afs/cern.ch/user/e/emoyse/public/ReferenceESD/ESD_15.5.1.pool.root"] ; DumpFileName="ReadOut150501"' ../share/readTopOptions.py >! read15.5.1.log 2>&1
#
# if [ "${?}" != 0 ] ; then
# echo "FAILURE!"
# #tail read15.5.1.log
# CHECKREF=X
# else
# CHECKREF=OK
# fi
echo "Part 7. BS to ESD test"
#athena.py ../share/bstoesd.py >! bstoESD.log 2>&1
# if [ "${?}" != 0 ] ; then
# echo "FAILURE!"
# BSTOESD=X
# else
# BSTOESD=OK
# fi
# echo "Part 8. RDO to BS test (just see if it runs for now)"
# athena.py ../share/rdotobs.py >! rdoToBS.log 2>&1
# if [ "${?}" != 0 ] ; then
# echo "FAILURE! Tail of rdotobs.log: "
# #tail readOld.log
# #exit 999
# else
# RDOTOBS=OK
# fi
echo "Part 8. Finalise. Comparing summaries (diff WriteESDfromRDO.summary.log ReadESD.summary.log)"
diff --text WriteESDfromRDO.summary.log ReadESD.summary.log
if [ "${?}" != 0 ] ; then
echo " - FAILURE! Summaries differ when comparing written and read ESDs!"
#exit 999
else
echo " - OKAY : Summaries appear to match."
CHECKSUMMARIES=OK
echo Summaries match. All okay.
fi
echo "Part 9. Check to see if ANY of the summary files reported errors."
grep -L "Detailed tests found : 0 problems." *.summary.log >! listOfSummariesWithErrors.txt
LENGTH=`wc -l listOfSummariesWithErrors.txt | awk '{ print $1 }' - `
if [[ $LENGTH -gt 0 ]] ; then
echo " - FAILURE! Summaries below have found errors with the detailed checks! "
cat listOfSummariesWithErrors.txt
CHECKSUMMARIES=X
else
CHECKSUMMARIES=OK
echo Summaries match. All okay.
fi
#echo "And for 13.0.40 ESDs (diff ReadOut13040.summary.log ReadOut13040.ref.summary.log)"
#diff ReadOut13040.summary.log /afs/cern.ch/user/e/emoyse/public/WriteESDfromRDOFiles/ReadOut13040.ref.summary.log
#if [ "${?}" != 0 ] ; then
# echo " - FAILURE! Summaries differ when reading reference 13.0.40 file!"
#fi
echo "| Write File | Check File | Read File | Read 13.0.40 | Check Summaries | BS to ESD | RDO to BS "
echo "-------------|------------|-----------|--------------|-----------------|------------"
echo " ${WRITE} $CHECKESD $READ $CHECKREF $CHECKSUMMARIES $BSTOESD $RDOTOBS"
echo "-------------|------------|-----------|--------------|-----------------|------------"
FAILURE=NO
if test "$WRITE" = 'X'; then echo "Write test failed. Dumping log"; cat write.log; FAILURE=YES ;fi
if test "$READ" = 'X'; then echo "Read test failed. Dumping log"; cat read.log; FAILURE=YES ;fi
if test "$CHECKREF" = 'X'; then echo "Read ref test failed. Dumping log"; cat read15.0.1.log; FAILURE=YES ;fi
if test "$CHECKSUMMARIES" = 'X'; then echo "Summaries test failed."; FAILURE=YES ;fi
if test "$RDOTOBS" = 'X'; then echo "RDO to BS test failed. Dumping log"; cat rdoToBS.log; FAILURE=YES ;fi
if test "$BSTOESD" = 'X'; then echo "BS to ESD test failed. Dumping log"; cat bstoESD.log; FAILURE=YES ;fi
# make test fail
if test "$FAILURE" = 'YES'; then echo "Reporting failure and exiting." ; exit 1 ;fi
#----
from AthenaCommon.AthenaCommonFlags import jobproperties
from AthenaCommon.AthenaCommonFlags import jobproperties,athenaCommonFlags
# import service manager
import AthenaCommon.AtlasUnixStandardJob
## get a handle to the default top-level algorithm sequence
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
## get a handle to the ServiceManager
from AthenaCommon.AppMgr import ServiceMgr
## get a handle to the ApplicationManager
from AthenaCommon.AppMgr import theApp
#--------------------------------------------------------------
# Load POOL support - to read conditions in POOL, not events
#--------------------------------------------------------------
#import AthenaPoolCnvSvc.AthenaPool
#ServiceMgr.EventSelector.RunNumber = 122189
#ServiceMgr.EventSelector.InitialTimeStamp = 1342888195
# Turn off all detector systems except the Muon Spectrometer
from AthenaCommon.DetFlags import DetFlags
#DetFlags.detdescr.all_setOff()
DetFlags.detdescr.ID_setOff()
DetFlags.detdescr.LAr_setOff()
DetFlags.detdescr.Tile_setOff()
DetFlags.detdescr.Muon_setOn()
# Select geometry version
if not 'DetDescrVersion' in dir():
DetDescrVersion="ATLAS-GEO-20-00-01"
print 'MuonGeoModelTest/runAmdcMGM DetDescrVersion now set to ', DetDescrVersion
else:
print 'MuonGeoModelTest/runAmdcMGM DetDescrVersion is already ', DetDescrVersion
from AthenaCommon.JobProperties import jobproperties
jobproperties.Global.DetDescrVersion = DetDescrVersion
from AtlasGeoModel import SetGeometryVersion
from AtlasGeoModel import GeoModelInit
######################################################################## end setup GeoModel
# 0 to run MuonGM checks init time only
# 1 to run MuonGM checks at each event
GMCheckLoop = 0
if GMCheckLoop:
#import AthenaPoolCnvSvc.ReadAthenaPool
#ServiceMgr.EventSelector.InputCollections = [ "/afs/le.infn.it/user/s/spagnolo/projAtlas/hlt/stef/data/mc12.csc120.007218.digit.muminus_pt20GeV._00001.pool.root" ]
theApp.EvtMax = 10
else:
#theApp.EvtSel = "NONE"
theApp.EvtMax = 1
# Set output level threshold
#(0=NIL 1=VERBOSE, 2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL )
MessageSvc.OutputLevel = INFO
MessageSvc.Format = "% F%50W%S%7W%R%T %0W%M"
#***************************************************** HERE override MuonSpectrometer tag
from AtlasGeoModel import SetGeometryVersion
from GeoModelSvc.GeoModelSvcConf import GeoModelSvc
GeoModelSvc = GeoModelSvc()
from DetDescrCnvSvc.DetDescrCnvSvcConf import DetDescrCnvSvc
DetDescrCnvSvc.MuonIDFileName = "IdDictMuonSpectrometer_R.01.xml"
DetDescrCnvSvc.OutputLevel = DEBUG
DetDescrCnvSvc.IdDictFromRDB = False
DetDescrCnvSvc.IdDictGlobalTag = "destaged_layout"
DetDescrCnvSvc.LArIDFileName = "IdDictLArCalorimeter_DC3-05-Comm-01.xml"
DetDescrCnvSvc.CaloIDFileName = "IdDictCalorimeter_L1Onl.xml"
DetDescrCnvSvc.ForwardIDFileName = "IdDictForwardDetectors_2010.xml"
######################################################
############### HERE DEFINE THE SEQUENCE #############
######################################################
# Add top algorithms to be run
from MuonTestEDM.MuonTestEDMConf import Muon__IdHelpersValidation
topSequence += Muon__IdHelpersValidation("IdHelperTest",
FilePrefix = "/tmp/pfleisch/mig3/",
OutputLevel=2,
CheckMdtIds=True,
CheckCscIds=True,
CheckRpcIds=True,
CheckTgcIds=True,
CheckMmIds=True,
CheckStgcIds=True)
print " "
print "List of all Dlls"
print theApp.Dlls
print " "
print "List of all Ext services"
print theApp.ExtSvc
print " "
print "List of all top algorithms"
print theApp.TopAlg
#print "Print here Top Sequence"
#print topSequence
#print "Print here Service Manager"
#print ServiceMgr
# Begin Test_jobOptions.py
# ------------------------
# ------------------------------------------------------------
# TEST EDM
# ------------------------------------------------------------
SegCollNames = ["MuonSegments"]
TrackCollNames = ["MuonSpectrometerTracks" ]
TrackPartCollNames = ["MuonSpectrometerTrackParticles"]
from MuonTestEDM.MuonTestEDMConf import MuonTestEDM
MyEDMTester = MuonTestEDM(SegmentCollectionNames=SegCollNames, TrackCollectionNames=TrackCollNames, DoDetailedChecks=False)
MyEDMTester.DoDumpPRDs=True
MyEDMTester.DoDumpTracks=True
MyEDMTester.DoDumpRDOs=True
MyEDMTester.DoDumpSegments=True
if not 'DumpFileName' in dir(): DumpFileName="MuonTestEDM"
# override output names if necessary
if 'DumpFileName' in dir():
MyEDMTester.RdoDumpFileName = DumpFileName+".rdo.log"
MyEDMTester.PrdDumpFileName = DumpFileName+".prd.log"
MyEDMTester.TrackDumpFileName = DumpFileName+".track.log"
MyEDMTester.SegmentDumpFileName= DumpFileName+".segment.log"
MyEDMTester.SummaryDumpFileName= DumpFileName+".summary.log"
topSequence += MyEDMTester
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
# create a THistSvc configurable *only* if not there already
if not hasattr(svcMgr, 'THistSvc'):
svcMgr += CfgMgr.THistSvc()
# short-hand
hsvc = svcMgr.THistSvc
RootTupleOutputFileName = DumpFileName+'.root'
#--------------------------------------------------------------
# ntuples: AANT (Athena Aware NTuples)
#--------------------------------------------------------------
# if os.path.exists(RootTupleOutputFileName):
# os.remove(RootTupleOutputFileName)
hsvc.Output += ["MuonHits DATAFILE='%s' OPT='RECREATE'" % RootTupleOutputFileName]
#print MyEDMTester
#ServiceMgr.PoolSvc.AttemptCatalogPatch=True
# End Test_jobOptions.py
# ------------------------
# #######################################################################
# TopOptions to process cosmics /single beam data
# M. Woudstra, R. Nikolaidou
#
# By default we run on 10 events of the 121080 (taken on June 2009) run,
# autoconfiguration of bfield and conditions tag, full reconstruction
# Muonboy and Moore and we produce as
# output : CBNT, ESD, Monitoring, ascii file with the configuration of the job
# #######################################################################
from AthenaCommon.AthenaCommonFlags import athenaCommonFlags
from AthenaCommon.BeamFlags import jobproperties
from AthenaCommon.GlobalFlags import globalflags
from AthenaCommon.BFieldFlags import jobproperties
from AthenaCommon.AlgSequence import AlgSequence
from AthenaCommon.DetFlags import DetFlags
from RecExConfig.RecFlags import rec
from RecExConfig.RecConfFlags import recConfFlags
# setup environment
from MuonRecExample.MuonRecFlags import muonRecFlags
from MuonRecExample import MuonRecStandaloneOnlySetup
# in Standalone mode, don't allow any configuration errors
athenaCommonFlags.AllowIgnoreConfigError = False
#
# command line parameters (-c)
#
if 'EvtMax' not in dir():
EvtMax = 10 # maximum number of events to process
if 'SkipEvents' not in dir():
SkipEvents = 0
# Set properly beam type, DataSource, InputFormat, Detector Description, Conditions Tag
globalflags.DataSource.set_Value_and_Lock('data')
jobproperties.Beam.beamType.set_Value_and_Lock("cosmics")
globalflags.InputFormat.set_Value_and_Lock('bytestream')
################################################################################
# Data 2009 without CSCs
muonRecFlags.doCSCs = False
athenaCommonFlags.BSRDOInput.set_Value_and_Lock(['/castor/cern.ch/grid/atlas/DAQ/2009/00121080/physics_RPCwBeam/data09_cos.00121080.physics_RPCwBeam.daq.RAW._lb0000._SFO-5._0605.data'])
#athenaCommonFlags.BSRDOInput.set_Value_and_Lock(['/castor/cern.ch/grid/atlas/DAQ/2009/00121064/physics_RPCwBeam/data09_cos.00121064.physics_RPCwBeam.daq.RAW._lb0000._SFO-5._0002.data'])
# set the following to override the auto-config
#globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-GEO-08-00-00')
#jobproperties.BField.solenoidOn.set_Value_and_Lock(True)
#jobproperties.BField.barrelToroidOn.set_Value_and_Lock(True)
#jobproperties.BField.endcapToroidOn.set_Value_and_Lock(True)
#globalflags.ConditionsTag.set_Value_and_Lock('COMCOND-REPC-002-03')
# Use auto-config with caution! It is tuned to Summer 2009 reprocessing.
rec.triggerStream = "RPCwBeam"
rec.AutoConfiguration = ['FieldAndGeo', 'ConditionsTag']
#rec.AutoConfiguration = ['TriggerStream','FieldAndGeo', 'ConditionsTag'] # ConditionsTag requires TriggerStream, which is broken
################################################################################
## # Data 2008 with CSCs
## muonRecFlags.doCSCs=True
## athenaCommonFlags.BSRDOInput.set_Value_and_Lock([
## '/castor/cern.ch/grid/atlas/DAQ/2008/91897/physics_TGCwBeam/daq.ATLAS.0091897.physics.TGCwBeam.LB0001.SFO-1._0001.data'])
## globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-GEONF-04-00-00')
## jobproperties.BField.solenoidOn.set_Value_and_Lock(False)
## jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
## jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
## globalflags.ConditionsTag.set_Value_and_Lock('COMCOND-REPC-001-02')
################################################################################
## # Data 2008 without CSCs
## muonRecFlags.doCSCs=False
## athenaCommonFlags.BSRDOInput.set_Value_and_Lock([
## '/castor/cern.ch/grid/atlas/atlasdatadisk/data08_cos/RAW/data08_cos.00091060.physics_RPCwBeam.daq.RAW.o4/daq.ATLAS.0091060.physics.RPCwBeam.LB0032.SFO-1._0013.data'])
## # '/castor/cern.ch/grid/atlas/atlasdatadisk/data08_cos/RAW/data08_cos.00091060.physics_RPCwBeam.daq.RAW.o4/daq.ATLAS.0091060.physics.RPCwBeam.LB0001.SFO-1._0001.data'])
## # '/castor/cern.ch/grid/atlas/DAQ/2008/87863/physics_BPTX/daq.NoTag.0087863.physics.BPTX.LB0000.SFO-1._0001.data'])
## # WARNING: the files on that atlsdatadisk may disappear after some time
## # WARNING: the STAGE_SVCCLASS below is only needed for files on atlasdatadisk
## if athenaCommonFlags.BSRDOInput()[0].startswith("/castor/cern.ch/grid/atlas/atlasdatadisk/"):
## import os
## os.environ["STAGE_SVCCLASS"]='atldata'
## globalflags.DetDescrVersion.set_Value_and_Lock('ATLAS-GEONF-04-00-00')
## jobproperties.BField.solenoidOn.set_Value_and_Lock(False)
## jobproperties.BField.barrelToroidOn.set_Value_and_Lock(False)
## jobproperties.BField.endcapToroidOn.set_Value_and_Lock(False)
## globalflags.ConditionsTag.set_Value_and_Lock('COMCOND-REPC-001-03')
# Max number of events to run, number of events to skip
athenaCommonFlags.EvtMax.set_Value_and_Lock(EvtMax)
athenaCommonFlags.SkipEvents.set_Value_and_Lock(SkipEvents)
# setup environment
from MuonRecExample import MuonRecStandaloneOnlySetup