Belle II Software  release-05-01-25
Validate_B2VV.py
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 
4 """
5 <header>
6  <contact>P. Urquijo phillip.urquijo@unimelb.edu.au</contact>
7  <output>../Validate_B2VV.root</output>
8 </header>
9 """
10 
11 import basf2
12 from generators import add_evtgen_generator
13 from modularAnalysis import findMCDecay
14 from variables import variables
15 from validation_tools.metadata import create_validation_histograms
16 
17 basf2.set_random_seed('B+ => [rho0 -> pi+ pi-] [rho+ -> pi0 pi+]')
18 
19 variables.addAlias('cosThetaRhoZ', 'cosHelicityAngle(0, 0)')
20 variables.addAlias('cosThetaRhoP', 'cosHelicityAngle(1, 1)')
21 variables.addAlias('planarAngle', 'cosAcoplanarityAngle(0, 0)')
22 
23 path = basf2.Path()
24 path.add_module('EventInfoSetter', evtNumList=[10000])
25 add_evtgen_generator(path, 'signal', basf2.find_file('decfiles/dec/Bu_rho0rho+.dec'))
26 findMCDecay('B+:sig', 'B+ -> [rho0 -> pi+ pi-] [rho+ -> pi0 pi+]', path=path)
27 create_validation_histograms(
28  path, '../Validate_B2VV.root', 'B+:sig',
29  [
30  ('cosThetaRhoZ', 50, -1.2, 1.2, '', 'P. Urquijo <phillip.urquijo@unimelb.edu.au>',
31  r'B2VV helicity angle of the $\rho^0 \to \pi^+ \pi^-$ in $B^+ \to \rho^0 \rho^+$ (truth values)',
32  'should follow the reference', 'cos#theta_{helicity}(V1)'),
33  ('cosThetaRhoP', 50, -1.2, 1.2, '', 'P. Urquijo <phillip.urquijo@unimelb.edu.au>',
34  r'B2VV helicity angle of the $\rho^+ \to \pi^0 \pi^+$ in $B^+ \to \rho^0 \rho^+$ (truth values)',
35  'should follow the reference', 'cos#theta_{helicity}(V1)'),
36  ('planarAngle', 50, -3.2, 3.2, '', 'P. Urquijo <phillip.urquijo@unimelb.edu.au>',
37  r'B2VV planar angle of the $B^+ \to \rho^0 \rho^+$ (truth values)',
38  'should follow the reference', '#chi (planar angle)'),
39  ],
40  description='B2VV Validation to check generator level distributions',
41 )
42 basf2.process(path)
basf2.process
def process(path, max_event=0)
Definition: __init__.py:25
validation_tools.metadata
Definition: metadata.py:1