diff --git a/Boole+Brunel/Boole-Data.py b/Boole+Brunel/Boole-Data.py new file mode 100644 index 0000000000000000000000000000000000000000..72fee540483bdc874a363c18b05cf12d85c93bb7 --- /dev/null +++ b/Boole+Brunel/Boole-Data.py @@ -0,0 +1,14 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from GaudiConf import IOHelper +import os +data = ["Boole-{}ev.digi".format(os.environ['MAX_EVENTS'])] +IOHelper('ROOT').inputFiles(data) diff --git a/Boole+Brunel/Brunel-DST-Data.py b/Boole+Brunel/Brunel-DST-Data.py new file mode 100644 index 0000000000000000000000000000000000000000..0ac3b3d2d01e7fd24dd5428cf35fa8fb931f405a --- /dev/null +++ b/Boole+Brunel/Brunel-DST-Data.py @@ -0,0 +1,15 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### + +from GaudiConf import IOHelper +import os +data = ["Brunel-{}ev.dst".format(os.environ['MAX_EVENTS'])] +IOHelper('ROOT').inputFiles(data) diff --git a/Boole+Brunel/Brunel-LDST-Data.py b/Boole+Brunel/Brunel-LDST-Data.py new file mode 100644 index 0000000000000000000000000000000000000000..a179c55f7ac115b3d5994f9957b016f69552bac7 --- /dev/null +++ b/Boole+Brunel/Brunel-LDST-Data.py @@ -0,0 +1,14 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from GaudiConf import IOHelper +import os +data = ["Brunel-{}ev.ldst".format(os.environ['MAX_EVENTS'])] +IOHelper('ROOT').inputFiles(data) diff --git a/Boole+Brunel/BrunelRef.txt b/Boole+Brunel/BrunelRef.txt new file mode 100644 index 0000000000000000000000000000000000000000..e0a446def33451f583de894240aa59f0a0a28ae5 --- /dev/null +++ b/Boole+Brunel/BrunelRef.txt @@ -0,0 +1,104 @@ +PrChecker2Fast INFO Results +PrChecker2Fast.Forward INFO **** Forward 334 tracks including 39 ghosts [11.68 %], Event average 6.21 % **** +PrChecker2Fast.Forward INFO **** for P>3GeV,Pt>0.5GeV 307 tracks including 34 ghosts [11.07 %] **** +PrChecker2Fast.Forward INFO 01_long : 281 from 751 [ 37.42 %] 0 clones [ 0.00 %], purity: 98.93 %, hitEff: 96.41 % +PrChecker2Fast.Forward INFO 02_long>5GeV : 255 from 463 [ 55.08 %] 0 clones [ 0.00 %], purity: 99.07 %, hitEff: 96.99 % +PrChecker2Fast.Forward INFO 03_long_strange : 12 from 48 [ 25.00 %] 0 clones [ 0.00 %], purity: 98.79 %, hitEff: 95.63 % +PrChecker2Fast.Forward INFO 04_long_strange>5GeV : 11 from 22 [ 50.00 %] 0 clones [ 0.00 %], purity: 99.55 %, hitEff: 97.72 % +PrChecker2Fast.Forward INFO +PrChecker2Fast.TTForward INFO **** TT Efficiency for Rec/Track/ForwardFast **** 41 ghost, 3.93 TT per track +PrChecker2Fast.TTForward INFO **** for P>3GeV,Pt>0.5GeV 311 tracks including 35 ghosts [11.3 %] **** +PrChecker2Fast.TTForward INFO 01_long : 281 tr 4.01 from 4.08 mcTT [ 98.3 %] 0.05 ghost hits on real tracks [ 1.3 %] +PrChecker2Fast.TTForward INFO 01_long >3TT : 281 tr 4.01 from 4.08 mcTT [ 98.3 %] 0.05 ghost hits on real tracks [ 1.3 %] +PrChecker2Fast.TTForward INFO 02_long>5GeV : 255 tr 4.02 from 4.08 mcTT [ 98.4 %] 0.06 ghost hits on real tracks [ 1.4 %] +PrChecker2Fast.TTForward INFO 02_long>5GeV >3TT : 255 tr 4.02 from 4.08 mcTT [ 98.4 %] 0.06 ghost hits on real tracks [ 1.4 %] +PrChecker2Fast.TTForward INFO +PrChecker2 INFO Results +PrChecker2.Velo INFO **** Velo 2688 tracks including 88 ghosts [ 3.27 %], Event average 2.28 % **** +PrChecker2.Velo INFO 01_velo : 1286 from 1303 [ 98.70 %] 53 clones [ 3.96 %], purity: 99.64 %, hitEff: 93.66 % +PrChecker2.Velo INFO 02_long : 745 from 751 [ 99.20 %] 16 clones [ 2.10 %], purity: 99.71 %, hitEff: 96.83 % +PrChecker2.Velo INFO 03_long>5GeV : 460 from 463 [ 99.35 %] 4 clones [ 0.86 %], purity: 99.68 %, hitEff: 98.28 % +PrChecker2.Velo INFO 04_long_strange : 47 from 48 [ 97.92 %] 1 clones [ 2.08 %], purity: 99.25 %, hitEff: 98.75 % +PrChecker2.Velo INFO 05_long_strange>5GeV : 22 from 22 [100.00 %] 0 clones [ 0.00 %], purity: 98.86 %, hitEff:100.00 % +PrChecker2.Velo INFO +PrChecker2.Forward INFO **** Forward 1205 tracks including 531 ghosts [44.07 %], Event average 23.29 % **** +PrChecker2.Forward INFO 01_long : 610 from 751 [ 81.23 %] 12 clones [ 1.93 %], purity: 98.64 %, hitEff: 95.00 % +PrChecker2.Forward INFO 02_long>5GeV : 410 from 463 [ 88.55 %] 1 clones [ 0.24 %], purity: 99.06 %, hitEff: 96.84 % +PrChecker2.Forward INFO 03_long_strange : 38 from 48 [ 79.17 %] 1 clones [ 2.56 %], purity: 97.62 %, hitEff: 90.26 % +PrChecker2.Forward INFO 04_long_strange>5GeV : 19 from 22 [ 86.36 %] 0 clones [ 0.00 %], purity: 98.45 %, hitEff: 94.02 % +PrChecker2.Forward INFO +PrChecker2.Match INFO **** Match 913 tracks including 224 ghosts [24.53 %], Event average 16.35 % **** +PrChecker2.Match INFO 01_long : 636 from 751 [ 84.69 %] 8 clones [ 1.24 %], purity: 99.22 %, hitEff: 95.72 % +PrChecker2.Match INFO 02_long>5GeV : 420 from 463 [ 90.71 %] 1 clones [ 0.24 %], purity: 99.56 %, hitEff: 97.81 % +PrChecker2.Match INFO 03_long_strange : 40 from 48 [ 83.33 %] 1 clones [ 2.44 %], purity: 98.39 %, hitEff: 92.54 % +PrChecker2.Match INFO 04_long_strange>5GeV : 21 from 22 [ 95.45 %] 0 clones [ 0.00 %], purity: 99.54 %, hitEff: 96.81 % +PrChecker2.Match INFO +PrChecker2.Upstream INFO **** Upstream 908 tracks including 224 ghosts [24.67 %], Event average 16.87 % **** +PrChecker2.Upstream INFO 01_velo : 659 from 1303 [ 50.58 %] 2 clones [ 0.30 %], purity: 99.24 %, hitEff: 96.62 % +PrChecker2.Upstream INFO 02_velo+UT : 656 from 1120 [ 58.57 %] 2 clones [ 0.30 %], purity: 99.29 %, hitEff: 96.61 % +PrChecker2.Upstream INFO 03_velo+UT>5GeV : 439 from 552 [ 79.53 %] 1 clones [ 0.23 %], purity: 99.42 %, hitEff: 97.85 % +PrChecker2.Upstream INFO 04_velo+notLong : 159 from 552 [ 28.80 %] 0 clones [ 0.00 %], purity: 98.79 %, hitEff: 94.69 % +PrChecker2.Upstream INFO 05_velo+UT+notLong : 156 from 380 [ 41.05 %] 0 clones [ 0.00 %], purity: 98.98 %, hitEff: 94.58 % +PrChecker2.Upstream INFO 06_velo+UT+notLong>5GeV : 84 from 100 [ 84.00 %] 0 clones [ 0.00 %], purity: 99.10 %, hitEff: 97.80 % +PrChecker2.Upstream INFO 07_long : 500 from 751 [ 66.58 %] 2 clones [ 0.40 %], purity: 99.39 %, hitEff: 97.24 % +PrChecker2.Upstream INFO 08_long>5GeV : 355 from 463 [ 76.67 %] 1 clones [ 0.28 %], purity: 99.50 %, hitEff: 97.86 % +PrChecker2.Upstream INFO +PrChecker2.TTrack INFO **** TTrack 930 tracks including 146 ghosts [15.70 %], Event average 7.60 % **** +PrChecker2.TTrack INFO 01_hasT : 942 from 1157 [ 81.42 %] 1 clones [ 0.11 %], purity: 99.26 %, hitEff: 94.56 % +PrChecker2.TTrack INFO 02_long : 684 from 751 [ 91.08 %] 1 clones [ 0.15 %], purity: 99.48 %, hitEff: 95.40 % +PrChecker2.TTrack INFO 03_long>5GeV : 437 from 463 [ 94.38 %] 0 clones [ 0.00 %], purity: 99.60 %, hitEff: 97.84 % +PrChecker2.TTrack INFO 06_UT+T_strange : 79 from 87 [ 90.80 %] 0 clones [ 0.00 %], purity: 99.50 %, hitEff: 92.79 % +PrChecker2.TTrack INFO 07_UT+T_strange>5GeV : 42 from 45 [ 93.33 %] 0 clones [ 0.00 %], purity: 99.78 %, hitEff: 97.06 % +PrChecker2.TTrack INFO 08_noVelo+UT+T_strange : 35 from 39 [ 89.74 %] 0 clones [ 0.00 %], purity: 99.76 %, hitEff: 95.30 % +PrChecker2.TTrack INFO 09_noVelo+UT+T_strange>5GeV : 21 from 23 [ 91.30 %] 0 clones [ 0.00 %], purity:100.00 %, hitEff: 97.31 % +PrChecker2.TTrack INFO +PrChecker2.Downstream INFO **** Downstream 1102 tracks including 395 ghosts [35.84 %], Event average 26.45 % **** +PrChecker2.Downstream INFO 01_UT+T : 642 from 846 [ 75.89 %] 1 clones [ 0.16 %], purity: 99.47 %, hitEff: 99.55 % +PrChecker2.Downstream INFO 02_UT+T>5GeV : 421 from 495 [ 85.05 %] 0 clones [ 0.00 %], purity: 99.52 %, hitEff: 99.67 % +PrChecker2.Downstream INFO 03_UT+T_strange : 64 from 87 [ 73.56 %] 0 clones [ 0.00 %], purity: 99.36 %, hitEff: 99.61 % +PrChecker2.Downstream INFO 04_UT+T_strange>5GeV : 39 from 45 [ 86.67 %] 0 clones [ 0.00 %], purity: 99.67 %, hitEff:100.00 % +PrChecker2.Downstream INFO 05_noVelo+UT+T_strange : 31 from 39 [ 79.49 %] 0 clones [ 0.00 %], purity: 99.40 %, hitEff: 99.19 % +PrChecker2.Downstream INFO 06_noVelo+UT+T_strange>5GeV : 20 from 23 [ 86.96 %] 0 clones [ 0.00 %], purity: 99.69 %, hitEff:100.00 % +PrChecker2.Downstream INFO +PrChecker2.Best INFO **** Best 2971 tracks including 263 ghosts [ 8.85 %], Event average 6.60 % **** +PrChecker2.Best INFO 01_long : 741 from 751 [ 98.67 %] 40 clones [ 5.12 %], purity: 98.81 %, hitEff: 88.25 % +PrChecker2.Best INFO 02_long>5GeV : 460 from 463 [ 99.35 %] 14 clones [ 2.95 %], purity: 99.00 %, hitEff: 93.61 % +PrChecker2.Best INFO 03_long_strange : 47 from 48 [ 97.92 %] 1 clones [ 2.08 %], purity: 98.99 %, hitEff: 88.70 % +PrChecker2.Best INFO 04_long_strange>5GeV : 22 from 22 [100.00 %] 0 clones [ 0.00 %], purity: 99.56 %, hitEff: 98.52 % +PrChecker2.Best INFO +PrChecker2.BestLong INFO **** BestLong 826 tracks including 118 ghosts [14.29 %], Event average 10.05 % **** +PrChecker2.BestLong INFO 01_long : 653 from 751 [ 86.95 %] 6 clones [ 0.91 %], purity: 99.29 %, hitEff: 96.58 % +PrChecker2.BestLong INFO 02_long>5GeV : 430 from 463 [ 92.87 %] 1 clones [ 0.23 %], purity: 99.42 %, hitEff: 98.18 % +PrChecker2.BestLong INFO 03_long_strange : 42 from 48 [ 87.50 %] 0 clones [ 0.00 %], purity: 98.85 %, hitEff: 95.28 % +PrChecker2.BestLong INFO 04_long_strange>5GeV : 22 from 22 [100.00 %] 0 clones [ 0.00 %], purity: 99.56 %, hitEff: 98.52 % +PrChecker2.BestLong INFO +PrChecker2.BestDown INFO **** BestDown 126 tracks including 26 ghosts [20.63 %], Event average 14.94 % **** +PrChecker2.BestDown INFO 01_UT+T : 72 from 846 [ 8.51 %] 0 clones [ 0.00 %], purity: 99.46 %, hitEff: 96.19 % +PrChecker2.BestDown INFO 02_UT+T>5GeV : 36 from 495 [ 7.27 %] 0 clones [ 0.00 %], purity: 99.64 %, hitEff: 98.47 % +PrChecker2.BestDown INFO 03_UT+T_strange : 31 from 87 [ 35.63 %] 0 clones [ 0.00 %], purity: 99.40 %, hitEff: 96.60 % +PrChecker2.BestDown INFO 04_UT+T_strange>5GeV : 20 from 45 [ 44.44 %] 0 clones [ 0.00 %], purity: 99.69 %, hitEff: 98.16 % +PrChecker2.BestDown INFO 05_noVelo+UT+T_strange : 30 from 39 [ 76.92 %] 0 clones [ 0.00 %], purity: 99.37 %, hitEff: 97.01 % +PrChecker2.BestDown INFO 06_noVelo+UT+T_strange>5GeV : 20 from 23 [ 86.96 %] 0 clones [ 0.00 %], purity: 99.69 %, hitEff: 98.16 % +PrChecker2.BestDown INFO +PrChecker2.TTForward INFO **** TT Efficiency for Rec/Track/ForwardBest **** 649 ghost, 1.38 TT per track +PrChecker2.TTForward INFO 01_long : 622 tr 3.81 from 4.01 mcTT [ 95.0 %] 0.14 ghost hits on real tracks [ 3.4 %] +PrChecker2.TTForward INFO 01_long >3TT : 615 tr 3.84 from 4.03 mcTT [ 95.4 %] 0.13 ghost hits on real tracks [ 3.4 %] +PrChecker2.TTForward INFO 02_long>5GeV : 411 tr 3.88 from 4.00 mcTT [ 97.0 %] 0.06 ghost hits on real tracks [ 1.5 %] +PrChecker2.TTForward INFO 02_long>5GeV >3TT : 404 tr 3.94 from 4.04 mcTT [ 97.5 %] 0.05 ghost hits on real tracks [ 1.4 %] +PrChecker2.TTForward INFO +PrChecker2.TTMatch INFO **** TT Efficiency for Rec/Track/Match **** 271 ghost, 2.06 TT per track +PrChecker2.TTMatch INFO 01_long : 644 tr 3.83 from 4.01 mcTT [ 95.5 %] 0.11 ghost hits on real tracks [ 2.8 %] +PrChecker2.TTMatch INFO 01_long >3TT : 637 tr 3.86 from 4.03 mcTT [ 95.9 %] 0.11 ghost hits on real tracks [ 2.7 %] +PrChecker2.TTMatch INFO 02_long>5GeV : 421 tr 3.90 from 4.00 mcTT [ 97.4 %] 0.04 ghost hits on real tracks [ 1.1 %] +PrChecker2.TTMatch INFO 02_long>5GeV >3TT : 414 tr 3.96 from 4.04 mcTT [ 98.0 %] 0.04 ghost hits on real tracks [ 1.0 %] +PrChecker2.TTMatch INFO +PrChecker2.TTDownstream INFO **** TT Efficiency for Rec/Track/Downstream **** 425 ghost, 3.79 TT per track +PrChecker2.TTDownstream INFO 01_has seed : 643 tr 4.03 from 4.05 mcTT [ 99.5 %] 0.03 ghost hits on real tracks [ 0.7 %] +PrChecker2.TTDownstream INFO 01_has seed >3TT : 643 tr 4.03 from 4.05 mcTT [ 99.5 %] 0.03 ghost hits on real tracks [ 0.7 %] +PrChecker2.TTDownstream INFO 02_has seed +noVelo, T+TT : 53 tr 3.96 from 4.00 mcTT [ 99.1 %] 0.04 ghost hits on real tracks [ 0.9 %] +PrChecker2.TTDownstream INFO 02_has seed +noVelo, T+TT >3TT : 53 tr 3.96 from 4.00 mcTT [ 99.1 %] 0.04 ghost hits on real tracks [ 0.9 %] +PrChecker2.TTDownstream INFO 03_down+strange : 64 tr 4.02 from 4.03 mcTT [ 99.6 %] 0.03 ghost hits on real tracks [ 0.8 %] +PrChecker2.TTDownstream INFO 03_down+strange >3TT : 64 tr 4.02 from 4.03 mcTT [ 99.6 %] 0.03 ghost hits on real tracks [ 0.8 %] +PrChecker2.TTDownstream INFO 04_down+strange+>5GeV : 39 tr 4.00 from 4.00 mcTT [100.0 %] 0.03 ghost hits on real tracks [ 0.6 %] +PrChecker2.TTDownstream INFO 04_down+strange+>5GeV >3TT : 39 tr 4.00 from 4.00 mcTT [100.0 %] 0.03 ghost hits on real tracks [ 0.6 %] +PrChecker2.TTDownstream INFO diff --git a/Boole+Brunel/CMakeLists.txt b/Boole+Brunel/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..2b44b04687c6e7e253f6c62925fb5e1adb8c03f6 --- /dev/null +++ b/Boole+Brunel/CMakeLists.txt @@ -0,0 +1,78 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +get_project_version(Boole) +get_project_version(Brunel) +get_project_version(DaVinci) +get_project_version(LHCb) + +# Define the number of events +set(max_events 10) + +set(src_dir ${CMAKE_CURRENT_SOURCE_DIR}) + +add_test(NAME Boole+Brunel.Boole + COMMAND ${src_dir}/logscript.sh BooleRaw.txt ${Boole_run} env MAX_EVENTS=${max_events} gaudirun.py $APPCONFIGOPTS/Boole/Default.py + $APPCONFIGOPTS/Boole/Boole-Upgrade-Baseline-20150522.py + $APPCONFIGOPTS/Boole/EnableSpillover.py + $APPCONFIGOPTS/Boole/Upgrade-RichMaPMT-NoSpilloverDigi.py + ${src_dir}/Job-Options.py ${src_dir}/Gauss-Data.py) +set_property(TEST Boole+Brunel.Boole PROPERTY TIMEOUT 2000) + +add_test(NAME Boole+Brunel.Brunel-ldst + COMMAND ${src_dir}/logscript.sh BrunelRaw.txt ${Brunel_run} env MAX_EVENTS=${max_events} gaudirun.py $APPCONFIGOPTS/Brunel/MC-WithTruth.py + $APPCONFIGOPTS/Brunel/Brunel-Upgrade-Baseline-20150522.py + $APPCONFIGOPTS/Brunel/ldst.py + ${src_dir}/Job-Options.py ${src_dir}/Boole-Data.py) +set_property(TEST Boole+Brunel.Brunel-ldst + APPEND PROPERTY DEPENDS Boole+Brunel.Boole) +set_property(TEST Boole+Brunel.Brunel-ldst PROPERTY TIMEOUT 2000) + +add_test(NAME Boole+Brunel.Brunel-dst + COMMAND ${src_dir}/logscript.sh BrunelRaw.txt ${Brunel_run} env MAX_EVENTS=${max_events} gaudirun.py $APPCONFIGOPTS/Brunel/MC-WithTruth.py + $APPCONFIGOPTS/Brunel/Brunel-Upgrade-Baseline-20150522.py + ${src_dir}/Job-Options.py ${src_dir}/Boole-Data.py) +set_property(TEST Boole+Brunel.Brunel-dst + APPEND PROPERTY DEPENDS Boole+Brunel.Boole) +set_property(TEST Boole+Brunel.Brunel-dst PROPERTY TIMEOUT 2000) + +add_test(NAME Boole+Brunel.DaVinci-ldst + COMMAND ${src_dir}/logscript.sh DaVinciRaw.txt ${DaVinci_run} env MAX_EVENTS=${max_events} gaudirun.py ${src_dir}/DaVinci-Options.py + ${src_dir}/Job-Options.py ${src_dir}/Brunel-LDST-Data.py) +set_property(TEST Boole+Brunel.DaVinci-ldst + APPEND PROPERTY DEPENDS Boole+Brunel.Brunel-ldst) +set_property(TEST Boole+Brunel.DaVinci-ldst PROPERTY TIMEOUT 2000) + +add_test(NAME Boole+Brunel.DaVinci-dst + COMMAND ${src_dir}/logscript.sh DaVinciRaw.txt ${DaVinci_run} env MAX_EVENTS=${max_events} gaudirun.py ${src_dir}/DaVinci-Options.py + ${src_dir}/Job-Options.py ${src_dir}/Brunel-DST-Data.py) +set_property(TEST Boole+Brunel.DaVinci-dst + APPEND PROPERTY DEPENDS Boole+Brunel.Brunel-dst) +set_property(TEST Boole+Brunel.DaVinci-dst PROPERTY TIMEOUT 2000) + +add_test(NAME Boole+Brunel.validateBrunel-ldst + COMMAND ${LHCb_run} python ${src_dir}/validate_brunel.py . ${src_dir}) +set_property(TEST Boole+Brunel.validateBrunel-ldst + APPEND PROPERTY DEPENDS Boole+Brunel.Brunel-ldst) + +add_test(NAME Boole+Brunel.validateBrunel-dst + COMMAND ${LHCb_run} python ${src_dir}/validate_brunel.py . ${src_dir}) +set_property(TEST Boole+Brunel.validateBrunel-dst + APPEND PROPERTY DEPENDS Boole+Brunel.Brunel-dst) + +add_test(NAME Boole+Brunel.validateDaVinci-ldst + COMMAND ${LHCb_run} python ${src_dir}/validate_davinci.py . ${src_dir}) +set_property(TEST Boole+Brunel.validateDaVinci-ldst + APPEND PROPERTY DEPENDS Boole+Brunel.DaVinci-ldst) + +add_test(NAME Boole+Brunel.validateDaVinci-dst + COMMAND ${LHCb_run} python ${src_dir}/validate_davinci.py . ${src_dir}) +set_property(TEST Boole+Brunel.validateDaVinci-dst + APPEND PROPERTY DEPENDS Boole+Brunel.DaVinci-dst) \ No newline at end of file diff --git a/Boole+Brunel/CountersHelper.py b/Boole+Brunel/CountersHelper.py new file mode 100644 index 0000000000000000000000000000000000000000..d7987049dc254dec293391fe3bb32248e2a53cf1 --- /dev/null +++ b/Boole+Brunel/CountersHelper.py @@ -0,0 +1,59 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from GaudiConf.QMTest.LHCbTest import LHCbTest + + +class CountersHelper(): + + counters = {} + + def __init__(self, stdout): + """ + Creates CountersHelper object and extracts counters from the test output + stdout: test output + """ + LbTest = LHCbTest() + self.counters = LbTest._extract(stdout) + + def simpleCounterValidation(self, key1, key2, index, expectedValue): + """ + Performs simple check of a single counter + stdout: the test output + key1: counter group name + key2: counter name + index: index of value in the counter (0 for #, 1 for sum, etc.) + expectedValue: value to test counter against + """ + if float(self.counters[key1][key2][index]) == float(expectedValue): + return True + else: + return False + + def simpleEfficiencyValidation(self, key1, key2, treshold=1.0): + """ + Performs simple check of a single efficiency counter + key1: counter group name + key2: counter name + treshold: minimal accepted value of efficiency in % (1.0 means 1%) + """ + if float(self.counters[key1][key2][2].split()[1]) >= treshold: + return True + else: + return False + + def getValue(self, key1, key2, index): + """ + Performs simple check of a single counter + key1: counter group name + key2: counter name + index: index of value in the counter (0 for #, 1 for sum, etc.) + """ + return self.counters[key1][key2][index] diff --git a/Boole+Brunel/DaVinci-Options.py b/Boole+Brunel/DaVinci-Options.py new file mode 100644 index 0000000000000000000000000000000000000000..9ed21dc56f0721ea6a308a5dda94a6e88f8e7113 --- /dev/null +++ b/Boole+Brunel/DaVinci-Options.py @@ -0,0 +1,47 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from Configurables import DaVinci +from PhysSelPython.Wrappers import SelectionSequence, DataOnDemand, Selection +from GaudiConfUtils.ConfigurableGenerators import FilterDesktop + +particles = { + "Muons": "mu+", + "Kaons": "K+", + "Pions": "pi+", + "Protons": "p+", + "Electrons": "e+" +} + +tracktypes = ["StdAllLoose", "StdNoPIDsDown"] +selections = [] +for name, descriptor in particles.iteritems(): + for tracktype in tracktypes: + stdparticles = DataOnDemand( + Location="Phys/{}{}/Particles".format(tracktype, name)) + truth_selection = Selection( + '{}{}_matched'.format(tracktype, name), + Algorithm=FilterDesktop( + Code="mcMatch('[{}]cc')".format(descriptor), + Preambulo=["from LoKiPhysMC.functions import mcMatch"]), + RequiredSelections=[stdparticles]) + + selseq = SelectionSequence( + '{}{}_sequence'.format(tracktype, name), + TopSelection=truth_selection) + selections.append(selseq) + +DaVinci().UserAlgorithms = [sel.sequence() for sel in selections] +DaVinci().TupleFile = 'DV-Ntuple.root' +DaVinci().InputType = 'DST' +DaVinci().DataType = 'Upgrade' +DaVinci().Lumi = False +DaVinci().Simulation = True +DaVinci().EvtMax = 100 diff --git a/Boole+Brunel/DaVinciRef.txt b/Boole+Brunel/DaVinciRef.txt new file mode 100644 index 0000000000000000000000000000000000000000..46e8c320fe239b4c5a88a8c4137b4b822ca4fe6f --- /dev/null +++ b/Boole+Brunel/DaVinciRef.txt @@ -0,0 +1,62 @@ +StdAllLoosePions_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdAllLoosePions" | 10 | 939 | 93.900 | 74.859 | 3.0000 | 235.00 | + | "# input particles" | 10 | 939 | 93.900 | 74.859 | 3.0000 | 235.00 | + |*"#accept" | 10 | 10 |( 100.000 +- 10.0000 )%| ------- | ------- | + | "#passed" | 10 | 563 | 56.300 | 40.000 | 1.0000 | 129.00 | +-- +StdNoPIDsDownPions_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdNoPIDsDownPions" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + | "# input particles" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + |*"#accept" | 9 | 9 |( 100.000 +- 11.1111 )%| ------- | ------- | + | "#passed" | 9 | 62 | 6.8889 | 3.3148 | 1.0000 | 13.000 | +-- +StdAllLooseMuons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdAllLooseMuons" | 8 | 89 | 11.125 | 12.791 | 1.0000 | 35.000 | + | "# input particles" | 8 | 89 | 11.125 | 12.791 | 1.0000 | 35.000 | + |*"#accept" | 8 | 2 |( 25.0000 +- 15.3093 )%| ------- | ------- | + |*"#passed" | 8 | 2 |( 25.0000 +- 15.3093 )%| ------- | ------- | +-- +StdAllLooseElectrons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdAllLooseElectrons" | 10 | 412 | 41.200 | 35.555 | 1.0000 | 119.00 | + | "# input particles" | 10 | 412 | 41.200 | 35.555 | 1.0000 | 119.00 | + |*"#accept" | 10 | 9 |( 90.0000 +- 9.48683 )%| ------- | ------- | + | "#passed" | 10 | 52 | 5.2000 | 4.6861 | 0.0000 | 13.000 | +-- +StdNoPIDsDownElectrons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdNoPIDsDownElectrons" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + | "# input particles" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + |*"#accept" | 9 | 8 |( 88.8889 +- 10.4757 )%| ------- | ------- | + | "#passed" | 9 | 30 | 3.3333 | 2.7080 | 0.0000 | 10.000 | +-- +StdAllLooseProtons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdAllLooseProtons" | 10 | 709 | 70.900 | 59.685 | 3.0000 | 184.00 | + | "# input particles" | 10 | 709 | 70.900 | 59.685 | 3.0000 | 184.00 | + |*"#accept" | 10 | 10 |( 100.000 +- 10.0000 )%| ------- | ------- | + | "#passed" | 10 | 63 | 6.3000 | 5.2545 | 1.0000 | 20.000 | +-- +StdNoPIDsDownProtons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdNoPIDsDownProtons" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + | "# input particles" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + |*"#accept" | 9 | 8 |( 88.8889 +- 10.4757 )%| ------- | ------- | + | "#passed" | 9 | 14 | 1.5556 | 1.3426 | 0.0000 | 5.0000 | +-- +StdAllLooseKaons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdAllLooseKaons" | 10 | 691 | 69.100 | 58.712 | 3.0000 | 182.00 | + | "# input particles" | 10 | 691 | 69.100 | 58.712 | 3.0000 | 182.00 | + |*"#accept" | 10 | 9 |( 90.0000 +- 9.48683 )%| ------- | ------- | + | "#passed" | 10 | 77 | 7.7000 | 6.5429 | 0.0000 | 20.000 | +-- +StdNoPIDsDownKaons_matched SUCCESS Number of counters : 5 + | Counter | # | sum | mean/eff^* | rms/err^* | min | max | + | "# Phys/StdNoPIDsDownKaons" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + | "# input particles" | 9 | 192 | 21.333 | 15.319 | 3.0000 | 52.000 | + |*"#accept" | 9 | 4 |( 44.4444 +- 16.5635 )%| ------- | ------- | + | "#passed" | 9 | 5 | 0.55556 | 0.68493 | 0.0000 | 2.0000 | diff --git a/Boole+Brunel/Gauss-Data.py b/Boole+Brunel/Gauss-Data.py new file mode 100644 index 0000000000000000000000000000000000000000..3adec7e175a2fa1879b71063774265296d12aeb4 --- /dev/null +++ b/Boole+Brunel/Gauss-Data.py @@ -0,0 +1,12 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from PRConfig import TestFileDB +TestFileDB.test_file_db['upgrade-baseline-FT61-sim'].run() diff --git a/Boole+Brunel/Job-Options.py b/Boole+Brunel/Job-Options.py new file mode 100644 index 0000000000000000000000000000000000000000..eff1e3ad2b6994ab8201ba6a6c9c36d2e2eba35d --- /dev/null +++ b/Boole+Brunel/Job-Options.py @@ -0,0 +1,21 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from Configurables import LHCbApp, CondDB +LHCbApp().DDDBtag = "dddb-20170301" +LHCbApp().CondDBtag = "sim-20180530-vc-md100" +import os +LHCbApp().EvtMax = os.environ['MAX_EVENTS'] +CondDB().Upgrade = True + +from Configurables import MessageSvc +MessageSvc().Format = '% F%40W%S%7W%R%T %0W%M' + +print 'CTEST_FULL_OUTPUT' diff --git a/Boole+Brunel/logscript.sh b/Boole+Brunel/logscript.sh new file mode 100755 index 0000000000000000000000000000000000000000..923a1c72281dc7b892164b034e6a50c7aab2d1e0 --- /dev/null +++ b/Boole+Brunel/logscript.sh @@ -0,0 +1,16 @@ +#!/bin/bash +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +log=$1 +shift +"$@" 2>&1 | tee $log +exit ${PIPESTATUS[0]} # return the exit code of the command, not tee + diff --git a/Boole+Brunel/validate_brunel.py b/Boole+Brunel/validate_brunel.py new file mode 100755 index 0000000000000000000000000000000000000000..c2524a8ed4a12ac1bc1ef882769f3d516642243f --- /dev/null +++ b/Boole+Brunel/validate_brunel.py @@ -0,0 +1,74 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +import subprocess +import sys +import re +from CountersHelper import CountersHelper + +sys.stdout.flush() + +rundir = sys.argv[1] +refdir = sys.argv[2] + + +def ok(): + print 'OK' + + +def error(): + print 'ERROR' + sys.exit(1) + + +stdout = '' +with open(rundir + '/BrunelRaw.txt', 'r') as raw_input: + stdout = raw_input.read() + +CH = CountersHelper(stdout) + +events_count = int( + CH.getValue('MCRichDigitSummaryUnpacker', '# UnPackedData', 0)) + +print 'VPClustering - Nb of Produced Clusters: ' +ok() if CH.simpleCounterValidation('VPClustering', 'Nb of Produced Clusters', + 0, events_count) else error() + +print 'PatPV3D - Nb PVs: ' +ok() if CH.simpleCounterValidation('PatPV3D', 'Nb PVs', 0, + events_count) else error() + +print 'PrVeloUTFast -#seeds: ' +ok() if CH.simpleCounterValidation('PrVeloUTFast', '#seeds', 0, + events_count) else error() + +print 'PrVeloUTFast - #tracks: ' +ok() if CH.simpleCounterValidation('PrVeloUTFast', '#tracks', 0, + events_count) else error() + +print 'ForwardFitterAlgFast - nFitted: ' +ok() if CH.simpleCounterValidation('ForwardFitterAlgFast', 'nFitted', 0, + events_count) else error() + +print 'PMuonTrackFitter - nFitted: ' +ok() if CH.simpleCounterValidation('MuonTrackFitter', 'nFitted', 0, + events_count) else error() + +print 'RichRecoStatsDown - RICH selection efficiency: ' +ok() if CH.simpleEfficiencyValidation( + 'RichRecoStatsDown', 'RICH selection efficiency') else error() + +print 'RichRecoStatsUp - RICH selection efficiency: ' +ok() if CH.simpleEfficiencyValidation( + 'RichRecoStatsUp', 'RICH selection efficiency') else error() + +print 'RichRecoStatsLongn - RICH selection efficiency: ' +ok() if CH.simpleEfficiencyValidation( + 'RichRecoStatsLong', 'RICH selection efficiency') else error() diff --git a/Boole+Brunel/validate_davinci.py b/Boole+Brunel/validate_davinci.py new file mode 100644 index 0000000000000000000000000000000000000000..8f85acb987e677375e707fb28bdd975b5c0c979a --- /dev/null +++ b/Boole+Brunel/validate_davinci.py @@ -0,0 +1,72 @@ +############################################################################### +# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +import subprocess +import sys +from CountersHelper import CountersHelper + +sys.stdout.flush() + +rundir = sys.argv[1] +refdir = sys.argv[2] + + +def ok(): + print 'OK' + + +def error(): + print 'ERROR' + sys.exit(1) + + +stdout = '' +with open(rundir + '/DaVinciRaw.txt', 'r') as raw_input: + stdout = raw_input.read() + +CH = CountersHelper(stdout) + +events_count = int(CH.getValue('StdAllLoosePions', '#accept', 0)) + +print 'StdAllLoosePions_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdAllLoosePions_matched', + 'efficiency') else error() + +print 'StdNoPIDsDownPions_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdNoPIDsDownPions_matched', + 'efficiency') else error() + +print 'StdAllLooseMuons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdAllLooseMuons_matched', + 'efficiency') else error() + +print 'StdAllLooseProtons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdAllLooseProtons_matched', + 'efficiency') else error() + +print 'StdNoPIDsDownElectrons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdNoPIDsDownElectrons_matched', + 'efficiency') else error() + +print 'StdAllLooseProtons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdAllLooseProtons_matched', + 'efficiency') else error() + +print 'StdNoPIDsDownProtons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdNoPIDsDownProtons_matched', + 'efficiency') else error() + +print 'StdAllLooseKaons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdAllLooseKaons_matched', + 'efficiency') else error() + +print 'StdNoPIDsDownKaons_matched efficiency: ' +ok() if CH.simpleEfficiencyValidation('StdNoPIDsDownKaons_matched', + 'efficiency') else error() diff --git a/CMakeLists.txt b/CMakeLists.txt index c57cd6bba5ad900d6db026f5aa2d6fdb54910c9d..05a57f6b1e9b8e42af6007cb78b8a8f02a9c6559 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,8 @@ include(GetTargetPlatform) include(GetProjectVersion) include(StandardLHCbNightlyTargets) -# === Add the subdirectories with the tests add_subdirectory(Moore+DaVinci) +add_subdirectory(Boole+Brunel) # Copy test configuration to the build directory so that it is picked up configure_file(cmake/CTestCustom.cmake CTestCustom.cmake COPYONLY)