Use Analysis package
V.S.Vorobev (Talk | contribs) |
V.S.Vorobev (Talk | contribs) |
||
Line 3: | Line 3: | ||
The Analysis module implements all tools needed for: | The Analysis module implements all tools needed for: | ||
− | * | + | * Access the reconstructed final-state-particles |
− | * | + | * Reconstruction arbitrary decay trees |
* Imposing selection criteria | * Imposing selection criteria | ||
* Applying kinematic fit to the decay tree (TODO) | * Applying kinematic fit to the decay tree (TODO) | ||
− | * Saving flat ntuple for | + | * Saving a flat ntuple to a ROOT TTree for further analysis |
== The decay language == | == The decay language == | ||
− | + | The Analysis package supports an easy-to-read string description of particle decays. [https://git.inp.nsk.su/sctau/aurora/-/blob/master/Generation/Generators/EvtGen_i/share/evt.pdl The EvtGen particle naming scheme] is used. The following strings are valid decay expressions: | |
"D0" | "D0" | ||
Line 17: | Line 17: | ||
"D0 -> [rho0 -> pi+ pi-] pi0" | "D0 -> [rho0 -> pi+ pi-] pi0" | ||
− | + | A decay string may or may not contain the arrow and right-hand side. Spaces around the arrow are optional. Nested decays are expressed with square brackets. | |
− | + | A particle in the decay string can be '''labeled''': | |
"pi+:lowpt" | "pi+:lowpt" | ||
− | + | "lowpt" is a label. Labels allow working with different particle lists of the same type. For example: | |
"D*+ -> [D0 -> K- pi+] pi+:lowpt" | "D*+ -> [D0 -> K- pi+] pi+:lowpt" | ||
− | + | A particle in the decay string can be '''selected''' using the "^" symbol: | |
"D0 -> ^K- ^pi+" | "D0 -> ^K- ^pi+" | ||
− | + | "K-" and "pi+" are selected here. We will consider the use cases for these features below. | |
== The cuts language == | == The cuts language == | ||
− | The Analysis package contains large set of predefined variables. Most of these variables can be calculated for a given particle. Selection criteria are imposed with string expressions like: | + | The Analysis package contains large set of [[Analysis variables|predefined variables]]. Most of these variables can be calculated for a given particle. Selection criteria are imposed with string expressions like: |
* "M < 0.12" # the mass less than 0.12 GeV | * "M < 0.12" # the mass less than 0.12 GeV | ||
Line 76: | Line 76: | ||
= Low level interface = | = Low level interface = | ||
+ | |||
+ | [[Category:Not_public]] |
Revision as of 10:19, 10 February 2021
Contents |
Introduction
The Analysis module implements all tools needed for:
- Access the reconstructed final-state-particles
- Reconstruction arbitrary decay trees
- Imposing selection criteria
- Applying kinematic fit to the decay tree (TODO)
- Saving a flat ntuple to a ROOT TTree for further analysis
The decay language
The Analysis package supports an easy-to-read string description of particle decays. The EvtGen particle naming scheme is used. The following strings are valid decay expressions:
"D0" "D0 -> K- pi+" "D0 -> [rho0 -> pi+ pi-] pi0"
A decay string may or may not contain the arrow and right-hand side. Spaces around the arrow are optional. Nested decays are expressed with square brackets.
A particle in the decay string can be labeled:
"pi+:lowpt"
"lowpt" is a label. Labels allow working with different particle lists of the same type. For example:
"D*+ -> [D0 -> K- pi+] pi+:lowpt"
A particle in the decay string can be selected using the "^" symbol:
"D0 -> ^K- ^pi+"
"K-" and "pi+" are selected here. We will consider the use cases for these features below.
The cuts language
The Analysis package contains large set of predefined variables. Most of these variables can be calculated for a given particle. Selection criteria are imposed with string expressions like:
* "M < 0.12" # the mass less than 0.12 GeV * "charge == 0" # zero electric charge * "1.8 < M < 1.9" # the mass is between 1.8 GeV and 1.9 GeV * "charge == 0 and M < 0.12" * "charge == 0 and [M < 0.12 or pt > 0.1]"
Square brackets are used to manage the order of logical operations. The following operators are available: ">", ">=", "<", "<=", "==", "!=", "and", "or".
AuroraMaster interface
The simplest way to make an analysis joboption is using the AuroraMaster interface with the Analysis component.
from AuroraMaster.auroramaster import AuroraMaster, AuroraConfig from AuroraMaster.auroramaster import Analysis as A am = AuroraMaster('analysis', 'info') edminputCfg = AuroraConfig({ 'filename': './parsim.root', # should be in your run directory 'collections': ['Particles', 'allGenParticles'], }) am.add_edmi(cfg=edminputCfg) anaysisCfg = A.analysis( fsps=[ A.fspList('pi+ cc'), A.fspList('K+ cc'), ], combiners=[ A.combiner('Dkpi', 'D0 -> pi+ K-', '1.8 < M < 1.9'), ], tuples=[ A.ntuple('tup', 'D0', 'tuple.root', [ A.vars('root', ['momentumVars', 'E', 'M']), A.vars('D0 -> ^pi+ ^K-', ['momentumVars', 'pidVars', 'matchVars']), ]), ] ) am.add_analysis(cfg=anaysisCfg) am.run(evtmax=10**4)