diff --git a/Alignment/OfflineValidation/scripts/submitPVValidationJobs.py b/Alignment/OfflineValidation/scripts/submitPVValidationJobs.py index 62538355662fd..9a708ac97ad5f 100755 --- a/Alignment/OfflineValidation/scripts/submitPVValidationJobs.py +++ b/Alignment/OfflineValidation/scripts/submitPVValidationJobs.py @@ -443,7 +443,7 @@ def createTheCfgFile(self,lfn): self.outputCfgName=self.output_full_name+"_cfg.py" fout=open(os.path.join(self.cfg_dir,self.outputCfgName),'w') - template_cfg_file = os.path.join(self.the_dir,"PVValidation_T_cfg.py") + template_cfg_file = os.path.join(self.CMSSW_dir,"src/Alignment/OfflineValidation/test","PVValidation_T_cfg.py") file = open(template_cfg_file,'r') config_txt = '\n\n' + CopyRights + '\n\n' @@ -622,8 +622,7 @@ def main(): # CMSSW section input_CMSSW_BASE = os.environ.get('CMSSW_BASE') - AnalysisStep_dir = os.path.join(input_CMSSW_BASE,"src/Alignment/OfflineValidation/test") - lib_path = os.path.abspath(AnalysisStep_dir) + lib_path = os.path.abspath(os.path.join(input_CMSSW_BASE,"src/Alignment/OfflineValidation/test")) sys.path.append(lib_path) ## N.B.: this is dediced here once and for all @@ -923,7 +922,7 @@ def main(): ## print "==========>",conditions # for hadd script - scripts_dir = os.path.join(AnalysisStep_dir,"scripts") + scripts_dir = "scripts" if not os.path.exists(scripts_dir): os.makedirs(scripts_dir) hadd_script_file = os.path.join(scripts_dir,jobName[iConf]+"_"+opts.taskname+".sh") @@ -1055,7 +1054,7 @@ def main(): vertextype[iConf], tracktype[iConf], refittertype[iConf], ttrhtype[iConf], applyruncontrol[iConf], - ptcut[iConf],input_CMSSW_BASE,AnalysisStep_dir) + ptcut[iConf],input_CMSSW_BASE,'.') aJob.setEOSout(eosdir) aJob.createTheCfgFile(theSrcFiles) diff --git a/Alignment/OfflineValidation/test/BuildFile.xml b/Alignment/OfflineValidation/test/BuildFile.xml index 176fc9882290e..b557a9c8db03c 100644 --- a/Alignment/OfflineValidation/test/BuildFile.xml +++ b/Alignment/OfflineValidation/test/BuildFile.xml @@ -1,41 +1,25 @@ - - - - - + + - - - - + + - - - - + + - - - - + + - - - - + + - - - + - - - - + @@ -43,22 +27,10 @@ - - - - - - - - - - - - - - - - + + + + @@ -66,8 +38,5 @@ - - - - + diff --git a/Alignment/OfflineValidation/test/testAlignmentOfflineValidation.cpp b/Alignment/OfflineValidation/test/testAlignmentOfflineValidation.cpp deleted file mode 100644 index 2f0e0c40064da..0000000000000 --- a/Alignment/OfflineValidation/test/testAlignmentOfflineValidation.cpp +++ /dev/null @@ -1,2 +0,0 @@ -#include "FWCore/Utilities/interface/TestHelper.h" -RUNTEST() diff --git a/Alignment/OfflineValidation/test/testingScripts/testPVValidation.sh b/Alignment/OfflineValidation/test/testingScripts/testPVValidation.sh index c9b70a9464530..e58f4bcfac41c 100755 --- a/Alignment/OfflineValidation/test/testingScripts/testPVValidation.sh +++ b/Alignment/OfflineValidation/test/testingScripts/testPVValidation.sh @@ -3,4 +3,4 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Alignment/OfflineValidation ..." -cmsRun ${LOCAL_TEST_DIR}/test_all_cfg.py || die "Failure running test_all_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/test_all_cfg.py || die "Failure running test_all_cfg.py" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitDMR.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitDMR.sh index 5bc18e5023736..da3950b29d369 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitDMR.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitDMR.sh @@ -3,22 +3,28 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Alignment/DMR single configuration with json..." -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/DMR/single/TestSingleMC/unitTest/1/ +pushd test_yaml/DMR/single/TestSingleMC/unitTest/1/ ./cmsRun validation_cfg.py config=validation.json || die "Failure running DMR single configuration with json" $? echo "TESTING Alignment/DMR single configuration standalone..." ./cmsRun validation_cfg.py || die "Failure running DMR single configuration standalone" $? +popd echo "TESTING DMR merge step" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/DMR/merge/TestMergeMC/1/ +pushd test_yaml/DMR/merge/TestMergeMC/1/ ./DMRmerge validation.json || die "Failure running DMR merge step" $? +popd echo "TESTING DMR trends" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/DMR/trends/TestTrendMC/ +pushd test_yaml/DMR/trends/TestTrendMC/ ./DMRtrends validation.json --verbose || die "Failure running DMR trends" $? - +popd + echo "TESTING DMR averaged" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/DMR/averaged/TestAveragedMC/MC/ +pushd test_yaml/DMR/averaged/TestAveragedMC/MC/ ./mkLumiAveragedPlots.py validation.json || die "Failure running DMR averaged in merge mode" $? -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/DMR/averaged/TestAveragedMC/plots/ +popd + +pushd test_yaml/DMR/averaged/TestAveragedMC/plots/ ./mkLumiAveragedPlots.py validation.json || die "Failure running DMR averaged in plotting mode" $? +popd diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitDiMuonVertex.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitDiMuonVertex.sh index bf840b28a5828..284674d9104cd 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitDiMuonVertex.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitDiMuonVertex.sh @@ -3,4 +3,4 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Double Muon Vertex validation ..." -cmsRun ${LOCAL_TEST_DIR}/DiMuonVertexValidation_cfg.py maxEvents=10 || die "Failure running DiMuonVertexValidation_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/DiMuonVertexValidation_cfg.py maxEvents=10 || die "Failure running DiMuonVertexValidation_cfg.py" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitEoP.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitEoP.sh index 06b1693098004..3c570e8edf05f 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitEoP.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitEoP.sh @@ -2,7 +2,7 @@ function die { echo $1: status $2 ; exit $2; } echo -e "\n\nTESTING eopTreeWriter (Pion Analysis) ..." -cmsRun ${LOCAL_TEST_DIR}/eopTreeWriter_cfg.py unitTest=True maxEvents=100 || die "Failure running eopTreeWriter" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/eopTreeWriter_cfg.py unitTest=True maxEvents=100 || die "Failure running eopTreeWriter" $? echo -e "\n\nTESTING eopElecTreeWriter (Electron Analysis) ..." -cmsRun ${LOCAL_TEST_DIR}/eopElecTreeWriter_cfg.py maxEvents=100 || die "Failure running eopElecTreeWriter" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/eopElecTreeWriter_cfg.py maxEvents=100 || die "Failure running eopElecTreeWriter" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitGCP.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitGCP.sh index e4623cf84ad2e..e8c5f411071d8 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitGCP.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitGCP.sh @@ -3,19 +3,25 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING GCP Ntuple creation" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/GCP/GCPdetUnits/Ntuples/SURun3_1 +pushd test_yaml/GCP/GCPdetUnits/Ntuples/SURun3_1 ./cmsRun validation_cfg.py config=validation.json || die "Failure running GCP Ntuple for SURun3 alignment" $? -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/GCP/GCPdetUnits/Ntuples/ideal_1 +popd + +pushd test_yaml/GCP/GCPdetUnits/Ntuples/ideal_1 ./cmsRun validation_cfg.py config=validation.json || die "Failure running GCP Ntuple for ideal alignment" $? +popd echo "TESTING GCP comparison tree creation" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPtree/ +pushd test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPtree/ ./cmsRun validation_cfg.py config=validation.json || die "Failure running GCP comparison tree creation step" $? +popd echo "TESTING GCP cpp plots" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPcpp/ +pushd test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPcpp/ ./GCP validation.json -v || die "Failure running GCP cpp plots" $? +popd echo "TESTING GCP python plots" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPpython/ +pushd test_yaml/GCP/GCPdetUnits/SURun3vsIdeal/1_vs_1/GCPpython/ ./GCPpyPlots.py validation.json || die "Failure running GCP python plots" $? +popd diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitJetHT.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitJetHT.sh index 6a100c9cce8d6..c6e74305d7aa0 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitJetHT.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitJetHT.sh @@ -3,20 +3,22 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Alignment/JetHT single configuration with json..." -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/JetHT/single/testJob/unitTestJetHT +pushd test_yaml/JetHT/single/testJob/unitTestJetHT ./cmsRun validation_cfg.py config=validation.json || die "Failure running JetHT single configuration with json" $? echo "TESTING Alignment/JetHT single configuration standalone..." ./cmsRun validation_cfg.py || die "Failure running JetHT single configuration standalone" $? +popd echo "TESTING JetHT merge step" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/JetHT/merge/testJob/unitTestJetHT +pushd test_yaml/JetHT/merge/testJob/unitTestJetHT ./run.sh || die "Failure running JetHT merge step" $? +popd echo "TESTING JetHT plotting" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/JetHT/plot/testJob/ +pushd test_yaml/JetHT/plot/testJob/ ./run.sh || die "Failure running JetHT plotting" $? +popd echo "TESTING JetHT multi-IOV plotting" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/examples -jetHtPlotter jetHt_multiYearTrendPlot.json || die "Failure running multi-IOV JetHT plotting" $? +jetHtPlotter $CMSSW_BASE/src/Alignment/OfflineValidation/test/examples/jetHt_multiYearTrendPlot.json || die "Failure running multi-IOV JetHT plotting" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitMiscellanea.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitMiscellanea.sh index 409efa4d5a34b..1a4735bac6287 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitMiscellanea.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitMiscellanea.sh @@ -2,13 +2,13 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING inspect ALCARECO data ..." -cmsRun ${LOCAL_TEST_DIR}/inspectData_cfg.py unitTest=True trackCollection=ALCARECOTkAlCosmicsCTF0T || die "Failure running inspectData_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/inspectData_cfg.py unitTest=True trackCollection=ALCARECOTkAlCosmicsCTF0T || die "Failure running inspectData_cfg.py" $? echo "TESTING G4e refitter ..." -cmsRun ${LOCAL_TEST_DIR}/testG4Refitter_cfg.py maxEvents=10 || die "Failure running testG4Refitter_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/testG4Refitter_cfg.py maxEvents=10 || die "Failure running testG4Refitter_cfg.py" $? echo "TESTING Pixel BaryCenter Analyser ..." -cmsRun ${LOCAL_TEST_DIR}/PixelBaryCentreAnalyzer_cfg.py unitTest=True || die "Failure running PixelBaryCentreAnalyzer_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/PixelBaryCentreAnalyzer_cfg.py unitTest=True || die "Failure running PixelBaryCentreAnalyzer_cfg.py" $? echo "TESTING CosmicTrackSplitting Analyser ..." -cmsRun ${LOCAL_TEST_DIR}/testSplitterValidation_cfg.py unitTest=True || die "Failure running testSplitterValidation_cfg.py" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/testSplitterValidation_cfg.py unitTest=True || die "Failure running testSplitterValidation_cfg.py" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitPV.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitPV.sh index e9fe0c3e0cb9b..68c2bf75ce456 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitPV.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitPV.sh @@ -3,16 +3,19 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Alignment/PV single configuration with json..." -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/PV/single/TestDATA/unitTestPV/317087/ +pushd test_yaml/PV/single/TestDATA/unitTestPV/317087/ ./cmsRun validation_cfg.py config=validation.json || die "Failure running PV single configuration with json" $? echo "TESTING Alignment/PV single configuration standalone..." ./cmsRun validation_cfg.py || die "Failure running PV single configuration standalone" $? +popd echo "TESTING PV merge step" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/PV/merge/TestDATA/317087/ +pushd test_yaml/PV/merge/TestDATA/317087/ ./PVmerge validation.json --verbose || die "Failure running PV merge step" $? +popd echo "TESTING PV trends" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/PV/trends/TestDATA/ +pushd test_yaml/PV/trends/TestDATA/ ./PVtrends validation.json --verbose || die "Failure running PV trends" $? +popd diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitPrimaryVertex.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitPrimaryVertex.sh index e32bbf639098e..23db69ccf39e2 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitPrimaryVertex.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitPrimaryVertex.sh @@ -3,7 +3,7 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Primary Vertex Validation: phase-1 setup ..." -cmsRun ${LOCAL_TEST_DIR}/testPrimaryVertexRelatedValidations_cfg.py isPhase2=False maxEvents=100 || die "Failure running testPrimaryVertexRelatedValidations_cfg.py isPhase2=False" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/testPrimaryVertexRelatedValidations_cfg.py isPhase2=False maxEvents=100 || die "Failure running testPrimaryVertexRelatedValidations_cfg.py isPhase2=False" $? echo "TESTING Primary Vertex Validation: phase-2 setup ..." -cmsRun ${LOCAL_TEST_DIR}/testPrimaryVertexRelatedValidations_cfg.py isPhase2=True maxEvents=10 || die "Failure running testPrimaryVertexRelatedValidations_cfg.py isPhase2=True" $? +cmsRun ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/testPrimaryVertexRelatedValidations_cfg.py isPhase2=True maxEvents=10 || die "Failure running testPrimaryVertexRelatedValidations_cfg.py isPhase2=True" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSplitV.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSplitV.sh index 1f75c69a51f37..2c51f82fd34a0 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSplitV.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSplitV.sh @@ -3,12 +3,14 @@ function die { echo $1: status $2 ; exit $2; } echo "TESTING Alignment/SplitV single configuration with json..." -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/SplitV/single/testUnits/unitTest/1/ +pushd test_yaml/SplitV/single/testUnits/unitTest/1/ ./cmsRun validation_cfg.py config=validation.json || die "Failure running SplitV single configuration with json" $? echo "TESTING Alignment/SplitV single configuration standalone..." ./cmsRun validation_cfg.py || die "Failure running PV single configuration standalone" $? +popd echo "TESTING SplotV merge step" -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test/test_yaml/SplitV/merge/testUnits/1/ +pushd test_yaml/SplitV/merge/testUnits/1/ ./SplitVmerge validation.json --verbose || die "Failure running PV merge step" $? +popd diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh index 106016702ca84..0c99ceb34d40e 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVrbr.sh @@ -8,5 +8,6 @@ conddb --yes --db pro copy TrackerAlignment_Upgrade2017_design_v4 --destdb myfil conddb --yes --db pro copy TrackerAlignmentErrorsExtended_Upgrade2017_design_v0 --destdb myfile.db echo " TESTING Primary Vertex Validation run-by-run submission ..." -submitPVValidationJobs.py -j UNIT_TEST -D /HLTPhysics/Run2016C-TkAlMinBias-07Dec2018-v1/ALCARECO -i ${LOCAL_TEST_DIR}/testPVValidation_Relvals_DATA.ini -r --unitTest || die "Failure running PV Validation run-by-run submission" $? +submitPVValidationJobs.py -j UNIT_TEST -D /HLTPhysics/Run2016C-TkAlMinBias-07Dec2018-v1/ALCARECO \ + -i ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/testPVValidation_Relvals_DATA.ini -r --unitTest || die "Failure running PV Validation run-by-run submission" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh index 767455b55fcd2..44c7acd70b0b5 100755 --- a/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh +++ b/Alignment/OfflineValidation/test/testingScripts/test_unitSubmitPVsplit.sh @@ -3,4 +3,5 @@ function die { echo $1: status $2 ; exit $2; } echo " TESTING Split Vertex Validation submission ..." -submitPVResolutionJobs.py -j UNIT_TEST -D /JetHT/Run2018C-TkAlMinBias-12Nov2019_UL2018-v2/ALCARECO -i ${LOCAL_TEST_DIR}/PVResolutionExample.ini --unitTest || die "Failure running Split Vertex Validation submission" $? +submitPVResolutionJobs.py -j UNIT_TEST -D /JetHT/Run2018C-TkAlMinBias-12Nov2019_UL2018-v2/ALCARECO \ + -i ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/PVResolutionExample.ini --unitTest || die "Failure running Split Vertex Validation submission" $? diff --git a/Alignment/OfflineValidation/test/testingScripts/validateAlignments.sh b/Alignment/OfflineValidation/test/testingScripts/validateAlignments.sh index 8a2dcf55ad1db..e21c3ee8d68ed 100755 --- a/Alignment/OfflineValidation/test/testingScripts/validateAlignments.sh +++ b/Alignment/OfflineValidation/test/testingScripts/validateAlignments.sh @@ -1,12 +1,10 @@ #!/bin/zsh -cd $CMSSW_BASE/src/Alignment/OfflineValidation/test - echo "Printing help" validateAlignments.py -h echo "Running over YAML" -validateAlignments.py -v -f -d unit_test.yaml +validateAlignments.py -v -f -d ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/unit_test.yaml echo "Running over JSON" -validateAlignments.py -v -d -f unit_test.json +validateAlignments.py -v -d -f ${CMSSW_BASE}/src/Alignment/OfflineValidation/test/unit_test.json