Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-06-23 03:27:45

0001 #!/bin/bash -ex
0002 
0003 VGEO_DIR=$CMSSW_BASE/src/Validation/Geometry
0004 TEST_DIR=${VGEO_DIR}/test/materialBudgetTrackerPlots
0005 
0006 if [ -d $TEST_DIR ] ; then rm -rf $TEST_DIR ; fi
0007 mkdir $TEST_DIR && cd $TEST_DIR
0008 
0009 cmsRun ${VGEO_DIR}/test/single_neutrino_cfg.py nEvents=1000 >$TEST_DIR/single_neutrino_cfg.log 2>&1
0010 
0011 python_cmd="python2"
0012 python3 -c "from FWCore.PythonFramework.CmsRun import CmsRun" 2>/dev/null && python_cmd="python3"
0013 
0014 for geom in {'Extended2015','Extended2017Plan1'}; do
0015   ${python_cmd} ${VGEO_DIR}/test/runP_Tracker.py geom=$geom label=Tracker >$TEST_DIR/runP_Tracker_cfg.log 2>&1
0016     
0017 done
0018 
0019 ${python_cmd} ${VGEO_DIR}/test/MaterialBudget.py -s -d Tracker -g 'Extended2017Plan1'
0020 ${python_cmd} ${VGEO_DIR}/test/MaterialBudget.py -s -d Tracker -g 'Extended2015' -gc 'Extended2017Plan1'
0021 
0022 echo '<html> <head><title>Reference Tracker Material Budget</title></head> <style>img.Reference{margin: 20px auto 20px auto; border: 10px solid green; border-radius: 10px;}img.PullRequest{margin: 20px auto 20px auto; border: 10px solid red; border-radius: 10px;}</style> <body> <h1>Reference Plots</h1> <p>Please check any diferences in the plots compared with the given reference. <en>Reference plots</en> have a green border followed by the output of the PR which features a red border</p><h2>Geometry: Extended2017Plan1</h2> <hr/> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_l_vs_z_vs_R_bw.png" width="1000"/><br/> <img class="PullRequest" src="Tracker_l_vs_z_vs_R_Extended2017Plan1_bw.png" width="1000"/><br/> <hr/> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_x_vs_eta.png" width="375"/> <img class="PullRequest" src="Tracker_x_vs_eta_Extended2017Plan1.png" width="375"/><br/> <hr/> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_x_vs_phi.png" width="375"/> <img class="PullRequest" src="Tracker_x_vs_phi_Extended2017Plan1.png" width="375"/><br/> <hr/> <h2>Geometry Comparison: Extended2017Plan1 vs Extended2015</h2> <h3>Comparison Ratio</h3> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_ComparisonRatio_l_vs_R.png" width="1000"/><br/> <img class="PullRequest" src="Tracker_ComparisonRatio_l_vs_R_Extended2015_vs_Extended2017Plan1.png" width="1000"/><br/> <hr/> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_ComparisonRatio_l_vs_z_vs_R.png" width="1000"/><br/> <img class="PullRequest" src="Tracker_Comparison_l_vs_z_vs_R_geocomp_Extended2015_vs_Extended2017Plan1.png" width="1000"/><br/> <hr/> <img class="Reference" src="https://twiki.cern.ch/twiki/pub/CUAHEP/ValidationGeometryReferencePlots/Tracker_Comparison_x_vs_eta.png" width="1000"/><br/> <img class="PullRequest" src="Tracker_ComparisonRatio_x_vs_eta_Extended2015_vs_Extended2017Plan1.png" width="1000"/><br/> <hr/> </body></html>' > ${TEST_DIR}/index.html
0023 
0024 if [[ ! -z ${JENKINS_UPLOAD_DIR} ]] ; then
0025    mkdir ${JENKINS_UPLOAD_DIR}/materialBudgetTrackerPlots
0026    cp  ${TEST_DIR}/Images/*.png ${JENKINS_UPLOAD_DIR}/materialBudgetTrackerPlots/
0027    cp  ${TEST_DIR}/index.html ${JENKINS_UPLOAD_DIR}/materialBudgetTrackerPlots/
0028    cp  ${TEST_DIR}/*.log ${JENKINS_UPLOAD_DIR}/materialBudgetTrackerPlots/ 
0029 fi