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