Merge lp:~ma5dev/madanalysis5/pyhf_update into lp:~ma5dev/madanalysis5/v1.9_beta

Proposed by Jack Y. Araz
Status: Merged
Merged at revision: 195
Proposed branch: lp:~ma5dev/madanalysis5/pyhf_update
Merge into: lp:~ma5dev/madanalysis5/v1.9_beta
Diff against target: 35 lines (+13/-6)
1 file modified
tools/SampleAnalyzer/Commons/Base/SmearerBase.cpp (+13/-6)
To merge this branch: bzr merge lp:~ma5dev/madanalysis5/pyhf_update
Reviewer Review Type Date Requested Status
Benjamin Fuks Pending
Review via email: mp+412784@code.launchpad.net

Commit message

bugfix in particle propagator

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tools/SampleAnalyzer/Commons/Base/SmearerBase.cpp'
2--- tools/SampleAnalyzer/Commons/Base/SmearerBase.cpp 2021-06-30 08:31:09 +0000
3+++ tools/SampleAnalyzer/Commons/Base/SmearerBase.cpp 2021-12-05 10:54:16 +0000
4@@ -96,7 +96,8 @@
5 xd = x_helix * (1 - std::abs(R)/r_helix);
6 yd = y_helix * (1 - std::abs(R)/r_helix);
7 zd = part->mothers()[0]->decay_vertex().Z()
8- + part->pz()/part->pt() * R * atan2(-copysign(1.0,R)*part->px()*x_helix+part->py()*y_helix,-copysign(1.0,R)*part->px()*y_helix-part->py()*x_helix);
9+ + part->pz()/part->pt() * R * atan2(-copysign(1.0,R)*(part->px()*x_helix+part->py()*y_helix),
10+ -copysign(1.0,R)*(part->px()*y_helix-part->py()*x_helix));
11
12 part->setClosestApproach(MAVector3(xd,yd,zd));
13 part->setD0(copysign(1.0, R)*(r_helix-std::abs(R)));
14@@ -116,11 +117,17 @@
15 part->setMomentumRotation(RotAngle);
16
17 // Calculating the new decay vertex position
18- part->setDecayVertex(MALorentzVector(
19- x_helix + R/part->pt() * (part->px()*sin(omegat) - part->py()*cos(omegat)),
20- y_helix + R/part->pt() * (part->py()*sin(omegat) + part->px()*cos(omegat)),
21- part->mothers()[0]->decay_vertex().Z() + part->pz()/part->e()*prop_ctime,
22- part->ctau()));
23+ if (prop_ctime == 0.)
24+ {
25+ part->setDecayVertex(part->decay_vertex());
26+ } else
27+ {
28+ part->setDecayVertex(MALorentzVector(
29+ x_helix + R/part->pt() * (part->px()*sin(omegat) - part->py()*cos(omegat)),
30+ y_helix + R/part->pt() * (part->py()*sin(omegat) + part->px()*cos(omegat)),
31+ part->mothers()[0]->decay_vertex().Z() + part->pz()/part->e()*prop_ctime,
32+ part->ctau()));
33+ }
34 }
35 }
36

Subscribers

People subscribed via source and target branches

to all changes: