diff --git a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimBankGen/python/FPGATrackSimBankGenConfig.py b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimBankGen/python/FPGATrackSimBankGenConfig.py index 4325df9b524a86150d023f8d0bff00ecacd9d7ab..2aaa249e0705143f88ca3211e4c27b691f131cdd 100644 --- a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimBankGen/python/FPGATrackSimBankGenConfig.py +++ b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimBankGen/python/FPGATrackSimBankGenConfig.py @@ -85,10 +85,10 @@ if __name__ == "__main__": log = logging.getLogger(__name__) flags.fillFromArgs() + flags.Trigger.FPGATrackSim.Hough.IdealGeoRoads = False flags = prepareFlagsForFPGATrackSimBankGen(flags) ### we don't want to load sectors when running bank gen, set this to false - flags.Trigger.FPGATrackSim.ActiveConfig.IdealGeoRoads = False flags.lock() diff --git a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/CMakeLists.txt b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/CMakeLists.txt index 38f43dfa6e0865bdd5d1e7f5c22881ac776d86e2..f5ee1f2994f2b39651b447795bfd946b418e86ed 100644 --- a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/CMakeLists.txt +++ b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/CMakeLists.txt @@ -38,6 +38,7 @@ atlas_add_test( FPGATrackSimConfigFlags_test POST_EXEC_SCRIPT noerror.sh ) atlas_add_test( FPGATrackSimWorflows_test - SCRIPT FPGATrackWorkflow.sh - POST_EXEC_SCRIPT noerror.sh) + SCRIPT FPGATrackWorkflow.sh + POST_EXEC_SCRIPT noerror.sh + PROPERTIES TIMEOUT 300) diff --git a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/test/FPGATrackWorkflow.sh b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/test/FPGATrackWorkflow.sh index c87a92bc0187e7e178946ea9ea5c2e278da00543..5cbc6e3280ec8c3ff05e3064e53c90c3d10ebeb9 100755 --- a/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/test/FPGATrackWorkflow.sh +++ b/Trigger/EFTracking/FPGATrackSim/FPGATrackSimConfTools/test/FPGATrackWorkflow.sh @@ -1,103 +1,93 @@ #!/bin/bash +set -e -# get the file from CERNBOX -# this is temporary measure, the test will switch to file on CVMFS once there is one available -if [ ! -f rdo_small.root ] -then - curl https://cernbox.cern.ch/remote.php/dav/public-files/12CCGeTUn0I3MLv/eos/user/t/tbold/EFTracking/rdo_small.root --output rdo_small.root - if [ ! -f rdo_small.root ] - then - echo "Could not fetch the input rdo file, exiting, ..." - return 1 2> /dev/null || exit 1 - fi - echo "A small input RDO has been downloaded, ..." -else - echo "A small input RDO has been downloaded previously, ..." -fi - +RDO=/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/RDO/ATLAS-P2-RUN4-03-00-00/mc21_14TeV.900498.PG_single_muonpm_Pt100_etaFlatnp0_43.recon.RDO.e8481_s4149_r14697/RDO.33675668._000016.pool.root.1 +RDO_EVT=200 GEO_TAG="ATLAS-P2-RUN4-03-00-00" #make wrapper file +echo "... RDO to AOD with sim" Reco_tf.py --CA \ --steering doRAWtoALL \ --preExec "flags.Trigger.FPGATrackSim.wrapperFileName='wrapper.root'" \ --preInclude "InDetConfig.ConfigurationHelpers.OnlyTrackingPreInclude,ActsConfig.ActsCIFlags.actsValidateTracksFlags" \ --postInclude "FPGATrackSimSGInput.FPGATrackSimSGInputConfig.FPGATrackSimSGInputCfg" \ - --inputRDOFile rdo_small.root \ + --inputRDOFile ${RDO} \ --outputAODFile AOD.pool.root \ - --maxEvents -1 && -ls -l && + --maxEvents ${RDO_EVT} +ls -l +echo "... RDO to AOD with sim, this part is done ..." # generate maps +echo "... Maps Making" python -m FPGATrackSimConfTools.FPGATrackSimMapMakerConfig \ --filesInput=wrapper.root \ OutFileName="MyMaps_" \ region=0 \ -GeoModel.AtlasVersion="ATLAS-P2-RUN4-03-00-00" && -ls -l && +GeoModel.AtlasVersion="ATLAS-P2-RUN4-03-00-00" +ls -l +echo "... Maps Making, this part is done ..." -mkdir -p maps && -mv MyMaps_region0.rmap maps/eta0103phi0305.rmap && -mv *.rmap maps/eta0103phi0305.subrmap && -mv MyMaps_region0.pmap maps/pmap && -touch maps/moduleidmap && +mkdir -p maps +mv MyMaps_region0.rmap maps/eta0103phi0305.rmap +mv *.rmap maps/eta0103phi0305.subrmap +mv MyMaps_region0.pmap maps/pmap +touch maps/moduleidmap +echo "... Banks generation" python -m FPGATrackSimBankGen.FPGATrackSimBankGenConfig \ ---filesInput=rdo_small.root \ -Trigger.FPGATrackSim.mapsDir=maps && -ls -l && - -### The above bank is great but is too small to make fit constants -# get the file from CERNBOX -# this is temporary measure, the test will switch to file on CVMFS once there is one available -if [ ! -f combined_input_matrix.root ] -then - curl https://cernbox.cern.ch/remote.php/dav/public-files/WRZ2LVU6K4P8iQV/combined_matrix.root --output combined_input_matrix.root - if [ ! -f combined_input_matrix.root ] - then - echo "Could not fetch the input matrix file, exitting, ..." - return 1 2> /dev/null || exit 1 - fi - echo "A matrix file has been downloaded, ..." -else - echo "A matrix file has been downloaded previously, ..." -fi +--filesInput=${RDO} \ +--evtMax=${RDO_EVT} \ +Trigger.FPGATrackSim.mapsDir=maps +ls -l +echo "... Banks generation, this part is done ..." -### Run const generation on combined matrix file +echo "... const generation on combined matrix file" python -m FPGATrackSimBankGen.FPGATrackSimBankConstGenConfig \ - Trigger.FPGATrackSim.FPGATrackSimMatrixFileRegEx='./combined_input_matrix.root' \ + Trigger.FPGATrackSim.FPGATrackSimMatrixFileRegEx='/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/PhaseIIUpgrade/EFTracking/ATLAS-P2-RUN4-03-00-00/combined_matrix.root' \ Trigger.FPGATrackSim.mapsDir=./maps/ \ - --evtMax=1 && \ -ls -l && + --evtMax=1 +ls -l +echo "... const generation on combined matrix file, this part is done ..." -mkdir -p banks && -mv sectors* slices* corr* const.root combined_matrix.root banks && +mkdir -p banks +mv sectors* slices* corr* const.root combined_matrix.root banks -# # run analysis +echo "... analysis on wrapper" python -m FPGATrackSimConfTools.FPGATrackSimAnalysisConfig \ Trigger.FPGATrackSim.wrapperFileName="wrapper.root" \ Trigger.FPGATrackSim.mapsDir=./maps \ Trigger.FPGATrackSim.tracking=True \ -Trigger.FPGATrackSim.bankDir=./banks/ && -ls -l && +Trigger.FPGATrackSim.bankDir=./banks/ +ls -l +echo "... analysis on wrapper, this part is done ..." +echo "... analysis on RDO" python -m FPGATrackSimConfTools.FPGATrackSimAnalysisConfig \ ---filesInput=rdo_small.root \ +--filesInput=${RDO} \ +--evtMax=${RDO_EVT} \ Trigger.FPGATrackSim.mapsDir=./maps \ Trigger.FPGATrackSim.tracking=True \ Trigger.FPGATrackSim.sampleType='skipTruth' \ -Trigger.FPGATrackSim.bankDir=./banks/ && -ls -l && +Trigger.FPGATrackSim.bankDir=./banks/ +ls -l +echo "... analysis on RDO, this part is done ..." + +echo "... analysis output verification" cat << EOF > checkHist.C { _file0->cd("FPGATrackSimLogicalHitsProcessAlg"); - TH1* h = (TH1*)gDirectory->Get("nroads_1st"); + TH1* h = (TH1*)gDirectory->Get("nroads_1st"); + if ( h == nullptr ) + throw std::runtime_error("oh dear, after all of this there are no roads histogram"); h->Print(); if ( h->GetEntries() == 0 ) { - throw std::runtime_error("oh dear, after all of this there are no roads"); + throw std::runtime_error("oh dear, after all of this there are zero roads"); } } EOF root -b -q monitoring.root checkHist.C +echo "... analysis output verification, this part is done ..." +echo "... all done ..."