Skip to content

Commit 9e05467

Browse files
committed
Enable histogram filling for the difference between true and generated eta and phi of primary particles.
1 parent 2c699ec commit 9e05467

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

DPG/Tasks/AOTTrack/qaMatchEff.cxx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,17 +1602,15 @@ struct qaMatchEff {
16021602
auto mcpart = track.mcParticle();
16031603
siPDGCode = mcpart.pdgCode();
16041604
tpPDGCode = std::abs(siPDGCode);
1605-
//if (mcpart.isPhysicalPrimary()) {
1606-
// histos.get<TH1>(HIST("MC/control/etahist_diff"))->Fill(mcpart.eta() - track.eta());
1607-
// auto delta = RecoDecay::constrainAngle(mcpart.phi() - track.phi());
1608-
// if (delta > o2::constants::math::PI) {
1609-
// delta -= o2::constants::math::TwoPI;
1610-
// }
1611-
// if (delta < o2::constants::math::PI) {
1612-
// delta += o2::constants::math::TwoPI;
1613-
// }
1614-
// histos.get<TH1>(HIST("MC/control/phihist_diff"))->Fill(delta);
1615-
//}
1605+
if (mcpart.isPhysicalPrimary()) {
1606+
histos.get<TH1>(HIST("MC/control/etahist_diff"))->Fill(mcpart.eta() - track.eta());
1607+
auto delta = RecoDecay::constrainAngle(mcpart.phi() - track.phi());
1608+
if (delta > o2::constants::math::PI) {
1609+
delta -= o2::constants::math::TwoPI;}
1610+
if (delta < o2::constants::math::PI) {
1611+
delta += o2::constants::math::TwoPI;}
1612+
histos.get<TH1>(HIST("MC/control/phihist_diff"))->Fill(delta);
1613+
}
16161614

16171615
/// MC info for THnSparse filling
16181616
sayPrim = -99;

0 commit comments

Comments
 (0)