-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46456 from mmusich/mm_tkmaps_add-help
Improve plotting utilities to generate Tracker maps given user input
- Loading branch information
Showing
6 changed files
with
224 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,5 @@ | |
<use name="root"/> | ||
<use name="catch2"/> | ||
</bin> | ||
|
||
<test name="testPrintTkMaps" command="testPrintTkMaps.sh"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
function die { echo $1: status $2; exit $2; } | ||
|
||
echo -e "Testing help functions" | ||
printPixelLayersDisksMap --help || die 'failed running printPixelLayersDisksMap --help' $? | ||
printPixelROCsMap --help || die 'failed running printPixelROCsMap --help' $? | ||
printPixelTrackerMap --help || die 'failed running printPixelTrackerMap --help' $? | ||
printStripTrackerMap --help || die 'failed running printStripTrackerMap --help' $? | ||
echo -e "\n" | ||
testPixelFile=$CMSSW_RELEASE_BASE/src/SLHCUpgradeSimulations/Geometry/data/PhaseI/PixelSkimmedGeometry_phase1.txt | ||
# Store the first 50 elements of the first column in a variable | ||
testPixelDetids=$(head -n 50 "$testPixelFile" | cut -d ' ' -f 1 | paste -sd ' ' -) | ||
|
||
echo "Using the following pixel DetIds:" $testPixelDetids | ||
echo -e "\n" | ||
echo -e "==== Testing printPixelLayersDisksMap" | ||
printPixelLayersDisksMap --input-file $testPixelFile || die 'failed printPixelLayersDisksMap --input-file' $? | ||
printPixelLayersDisksMap $testPixelDetids || die 'failed printPixelLayersDisksMap $testPixelDetids' $? | ||
echo -e "\n" | ||
echo -e "==== Testing printPixelROCsMap" | ||
printPixelROCsMap --input-file $testPixelFile || die 'failed printPixelROCsMap --input-file' $? | ||
printPixelROCsMap $testPixelDetids || die 'failed printPixelROCsMap $testPixelDetids' $? | ||
printPixelROCsMap $testPixelDetids --region barrel || die 'failed printPixelROCsMap $testPixelDetids --barrel' $? | ||
printPixelROCsMap $testPixelDetids --region forward || die 'failed printPixelROCsMap $testPixelDetids --forward' $? | ||
printPixelROCsMap $testPixelDetids --region full || die 'failed printPixelROCsMap $testPixelDetids --full' $? | ||
echo -e "\n" | ||
echo -e "==== Testing printPixelTrackerMap" | ||
printPixelTrackerMap --input-file $testPixelFile || die 'failed printPixelTrackerMap --input-file' $? | ||
printPixelTrackerMap $testPixelDetids || die 'failed printPixelTrackerMap $testPixelDetids' $? | ||
echo -e "\n" | ||
testStripFile=$CMSSW_RELEASE_BASE/src/CalibTracker/SiStripCommon/data/SiStripDetInfo.dat | ||
# Store the first 50 elements of the first column in a variable | ||
testStripDetids=$(head -n 50 "$testStripFile" | cut -d ' ' -f 1 | paste -sd ' ' -) | ||
|
||
echo "Using the following strip DetIds:" $testStripDetids | ||
echo -e "\n" | ||
echo -e "==== Testing printStripTrackerMap" | ||
printStripTrackerMap --input-file $testStripFile || die 'failed printStripTrackerMap --input-file' $? | ||
printStripTrackerMap $testStripDetids || die 'failed printStripTrackerMap $testPixelDetids' $? |