Skip to content
Snippets Groups Projects
Commit 386e0180 authored by Maurizio Martinelli's avatar Maurizio Martinelli Committed by Eduardo Rodrigues
Browse files

Documentation of DaVinciTutorials and DaVinciExamples

parent 260cfec8
No related branches found
No related tags found
2 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!826Documentation of DaVinciTutorials and DaVinciExamples
Showing
with 152 additions and 23 deletions
evt_max: 10
histo_file: DV-example-tupling-DTF-his-filtered.root
ntuple_file: DV-example-tupling-DTF-ntp-filtered.root
\ No newline at end of file
evt_max: 10
histo_file: DV-example-tupling-DTF-his.root
input_raw_format: 4.3
ntuple_file: DV-example-tupling-DTF-ntp.root
\ No newline at end of file
evt_max: 10
ntuple_file: DV-example-tupling-advanced-ntp.root
histo_file: DV-example-tupling-advanced-his.root
input_raw_format: 4.3
\ No newline at end of file
input_files:
- root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lines_realtimereco_newPacking_newDst.dst'
input_manifest_file: 'root://eoslhcb.cern.ch//eos/lhcb/wg/dpa/wp3/tests/spruce_all_lines_realtime_newPacking_newDst.tck.json'
data_type: Upgrade
input_type: ROOT
simulation: true
conddb_tag: sim-20171127-vc-md100
dddb_tag: dddb-20171126
conditions_version: master
geometry_version: trunk
input_raw_format: 0.3
lumi: false
ntuple_file: 'DV_example_allFunctors_ntp.root'
print_freq: 1
input_process: 'Spruce'
stream: 'default'
\ No newline at end of file
ntuple_file: DV-example-tupling-basic-ntp.root
histo_file: DV-example-tupling-basic-his.root
evt_max: 10
input_raw_format: 4.3
input_process: Hlt2
\ No newline at end of file
evt_max: 10
histo_file: DV-example-tupling-basic-his-run-mc.root
input_raw_format: 4.3
ntuple_file: DV-example-tupling-basic-ntp-run-mc.root
input_process: Brunel
\ No newline at end of file
evt_pre_filters:
Hlt2TopoLineFilter: "HLT_PASS('Hlt2Topo2BodyLineDecision')"
ntuple_file: "DV_example_sprucing_ntp.root"
histo_file: "DV_example_sprucing_his.root"
print_freq: 1
\ No newline at end of file
input_type: ROOT
evt_max: 100
ntuple_file: davinci_ntuple_ft.root
print_freq: 1
data_type: Upgrade
simulation: true
input_process: Turbo
\ No newline at end of file
......@@ -12,7 +12,9 @@
Example of a DaVinci job printing decay trees via `PrintDecayTree`.
rst_title: Printing Decay Trees
rst_desc: This example shows how to print the decay tree of a candidate.
rst_description: This example shows how to print the decay tree of a candidate.
rst_running: lbexec DaVinciExamples.debugging:print_decay_tree "$DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml"
rst_yaml: ../DaVinciExamples/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml
"""
from PyConf.application import configure, configure_input
from PyConf.application import make_odin
......
......@@ -12,6 +12,10 @@
Example of a DaVinci job using v2 functor on composite particles.
rst_title: V2 Composites
rst_description: Combine particles to create a decay chain and produce a tuple.
Muons are created and combined to form a J/psi. The resulting J/psi candidates are combined with a kaon to build a B+ -> J/psi K+ candidate.
rst_running: lbexec DaVinciExamples.option_davinci_v2_composites:main "$DAVINCIEXAMPLESROOT/example_data/FEST_November_2021_dst_newPacking.yaml"
rst_yaml: ../DaVinciExamples/example_data/FEST_November_2021_dst_newPacking.yaml
"""
from PyConf.Algorithms import ChargedBasicsProducer, UniqueIDGeneratorAlg
from PyConf.Algorithms import ThOrCombiner__2ChargedBasics
......
......@@ -10,6 +10,15 @@
###############################################################################
"""
Example of a DaVinci job filling all available functors. This is obviously a stress test and not realistic.
rst_title: All Functors in DaVinci
rst_description: This example shows how to:
1. create a dictionary with functors of interest for various type of particles
2. add a tuple with the selected functors.
rst_running: lbexec DaVinciExamples.tupling.AllFunctors:alg_config $DAVINCIEXAMPLESROOT/example_options/example_tupling_allfunctors.yaml
rst_yaml: ../DaVinciExamples/example_options/example_tupling_allfunctors.yaml
"""
__author__ = "P. Koppenburg"
__date__ = "2021-11-23"
......
......@@ -9,11 +9,18 @@
# or submit itself to any jurisdiction. #
###############################################################################
"""
Example of a typical DaVinci job:
- selection of two detached opposite-charge muons
- tuple of the selected candidates
- filter to select only the particles of interest
- runs DecayTreeFitterAlg and stores some output
Example of a DaVinci job running DecayTreeFitterAlg on a filtered selection of particles
rst_title: DecayTreeFitter on filtered selection
rst_description: This example shows how to:
1. select two detached opposite-charge muons
2. create a tuple of the selected candidates
3. filter to select only the particles of interest
4. run DecayTreeFitterAlg and stores some output
rst_running: lbexec DaVinciExamples.tupling.DTF_filtered:main $DAVINCIEXAMPLESROOT/example_data/Spruce_all_lines_dst.yaml+$DAVINCIEXAMPLESROOT/example_options/example_tupling_DTF_filtered.yaml
rst_yaml: ../DaVinciExamples/example_data/Spruce_all_lines_dst.yaml+../DaVinciExamples/example_options/example_tupling_DTF_filtered.yaml
"""
import Functors as F
from Gaudi.Configuration import INFO
......
......@@ -9,10 +9,17 @@
# or submit itself to any jurisdiction. #
###############################################################################
"""
Example of a typical DaVinci job:
- selection of two detached opposite-charge muons
- tuple of the selected candidates
- runs DecayTreeFitterAlg and stores some output
Example of how to run DecayTreeFitter in DaVinci
rst_title: DecayTreeFitter in DaVinci
rst_description: This example shows how to:
1. select two detached opposite-charge muons
2. create a tuple of the selected candidates
3. run DecayTreeFitterAlg and stores some output
rst_running: lbexec DaVinciExamples.tupling.DTF_run_mc:main $DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+$DAVINCIEXAMPLESROOT/example_options/example_tupling_DTF_run_mc.yaml
rst_yaml: ../DaVinciExamples/example_data/Spruce_all_lines_dst.yaml+../DaVinciExamples/example_options/example_tupling_DTF_run_mc.yaml
"""
import Functors as F
from Hlt2Conf.standard_particles import make_detached_mumu
......
......@@ -8,10 +8,19 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""
Example of a typical DaVinci job:
- selection of two detached opposite-charge muons
- tuple of the selected candidates
r"""
Example of an advanced DaVinci job
rst_title: Advanced DaVinci Job on MC
rst_description: This example shows how to:
1. reconstruct and select two detached opposite-charge muons
2. add a tuple of the selected :math:`J/\psi` candidates.
3. reconstruct and select two detached opposite-charge pions
4. add a tuple of the selected :math:`K^0_S` candidates.
rst_running: lbexec DaVinciExamples.tupling.advanced_run_mc:main $DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+$DAVINCIEXAMPLESROOT/example_options/example_tupling_advanced_run_mc.yaml
rst_yaml: ../DaVinciExamples/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+../DaVinciExamples/example_options/example_tupling_advanced_run_mc.yaml
"""
import Functors as F
from Hlt2Conf.standard_particles import make_detached_mumu, make_KsDD
......
......@@ -9,10 +9,17 @@
# or submit itself to any jurisdiction. #
###############################################################################
"""
Example of a typical DaVinci job:
- reconstruction and selection of two detached muons
- user algorithm printing decay trees via `PrintDecayTree`
- tuple of the selected candidates
Example of a typical DaVinci job.
rst_title: Basic DaVinci Job
rst_description: This example shows how to:
1. reconstruct and select two detached muons
2. add a user algorithm to print the decay tree of a candidate via `PrintDecayTree`
3. add a tuple of the selected candidates.
rst_running: lbexec DaVinciExamples.tupling.basic:main $DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+$DAVINCIEXAMPLESROOT/example_options/example_tupling_basic.yaml
rst_yaml: ../DaVinciExamples/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+../DaVinciExamples/example_options/example_tupling_basic.yaml
"""
import Functors as F
......
......@@ -9,9 +9,16 @@
# or submit itself to any jurisdiction. #
###############################################################################
"""
Example of a typical DaVinci job:
- selection of two detached opposite-charge muons
- tuple of the selected candidates
Example of a typical DaVinci job on MC
rst_title: Basic DaVinci Job on MC
rst_description: This example shows how to:
1. reconstruct and select two detached opposite-charge muons
2. add a tuple of the selected candidates.
rst_running: lbexec DaVinciExamples.tupling.basic_run_mc:main $DAVINCIEXAMPLESROOT/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+$DAVINCIEXAMPLESROOT/example_options/example_tupling_basic_run_mc.yaml
rst_yaml: ../DaVinciExamples/example_data/Upgrade_Bd2KstarMuMu_ldst.yaml+../DaVinciExamples/example_options/example_tupling_basic_run_mc.yaml
"""
import Functors as F
from Hlt2Conf.standard_particles import make_detached_mumu
......
......@@ -11,6 +11,15 @@
"""
Example options to show the usage of the new DaVinciMCTools
`MCReconstructible` and `MCReconstructed` helper classes.
rst_title: Reconstructible and reconstructed candidates with DaVinciMCTools
rst_description: This example shows how to:
1. get variables related to reconstructible and reconstructed information on candidates
2. create a tuple of the candidates matching a specific decay chain
rst_running: lbexec DaVinciExamples.tupling.example-tupling-mc-reconstructible-reconstructed:main $DAVINCIEXAMPLESROOT/example_data/test_hlt1_trigger_decisions.yaml
rst_yaml: ../DaVinciExamples/example_data/test_hlt1_trigger_decisions.yaml
"""
from PyConf.reading import get_mc_particles, get_pp2mcp_relations, get_mc_track_info
from FunTuple import FunTuple_MCParticles as MCFuntuple
......
......@@ -11,6 +11,12 @@
"""
Example options to read the output of a Sprucing job with the new DaVinci configuration
filtering on an HLT2 line decision.
rst_title: Use `configured_FunTuple`
rst_description: This example shows how to read the output of a Sprucing job with the new DaVinci configuration
filtering on an HLT2 line decision.
rst_running: lbexec DaVinciExamples.tupling.option_davinci_configFuntuple:main $DAVINCIEXAMPLESROOT/example_data/Spruce_all_lines_dst.yaml
rst_yaml: ../DaVinciExamples/example_data/Spruce_all_lines_dst.yaml
"""
from FunTuple import FunctorCollection
import FunTuple.functorcollections as FC
......
......@@ -8,8 +8,13 @@
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
"""option_davinci_tupling_DTF_substitutePID.py
Example options to show the usage of the new DaVinciTools: DecayTreeFitter.
r"""option_davinci_tupling_DTF_substitutePID.py
Example options to show the usage of DecayTreeFitter with SubstitutePID.
rst_title: DecayTreeFitter with SubstitutePID
rst_description: This example shows how to use DecayTreeFitter with SubstitutePID.
Two tuples are made. One with the signal mode :math:`B^0_s \to J/\psi \phi` and another one with :math:`B^0 \to J/\psi K^*(892)` background obtained by sustituting the id of a :math:`K` with a :math:`\pi`.
rst_running: lbexec DaVinciExamples.tupling.option_davinci_tupling_DTF_substitutePID:main $DAVINCIEXAMPLESROOT/example_data/test_passthrough_thor_lines.yaml
rst_yaml: ../DaVinciExamples/example_data/test_passthrough_thor_lines.yaml
"""
from Gaudi.Configuration import INFO
......
......@@ -13,6 +13,14 @@ Example for tupling on and event-by-event basis via the `FunTuple_Event` helper.
This algorithm takes no input and is configured with "void" functors, i.e. functors that expect no input.
This is is contrast to `FunTuple_(MC)Particles`, which take as input the TES location of (MC)Particles
and are configured with functors that operate on a single Particle/MCParticle.
rst_title: FunTuple event-by-event
rst_description: Example for tupling on and event-by-event basis via the `FunTuple_Event` helper.
This algorithm takes no input and is configured with "void" functors, i.e. functors that expect no input.
This is is contrast to `FunTuple_(MC)Particles`, which take as input the TES location of (MC)Particles
and are configured with functors that operate on a single Particle/MCParticle.
rst_running: lbexec DaVinciExamples.tupling.option_davinci_tupling_FunTupleEvent:main $DAVINCIEXAMPLESROOT/example_data/Upgrade_LbToLcmunu.yaml
rst_yaml: ../DaVinciExamples/example_data/Upgrade_LbToLcmunu.yaml
"""
from PyConf.reading import get_rec_summary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment