@@ -302,6 +302,8 @@ struct Photonhbt {
302302 Configurable<float > cfgMaxAsymmetry{" cfgMaxAsymmetry" , -1 .f , " max |p_{T, 1} - p_{T, 2}|/(p_{T, 1} + p_{T, 2}) asymmetry cut" };
303303 } ggpaircuts;
304304
305+
306+
305307 EMPhotonEventCut fEMEventCut ;
306308 struct : ConfigurableGroup {
307309 std::string prefix = " eventcut_group" ;
@@ -598,6 +600,21 @@ struct Photonhbt {
598600 float alphaTrue = 0 .f;
599601 };
600602
603+ struct PhotonWithLegs {
604+ float fPt {0 }, fEta {0 }, fPhi {0 };
605+ float fVx {0 }, fVy {0 }, fVz {0 };
606+ std::array<float , 2 > fLegPt {}, fLegEta {}, fLegPhi {}; // [0] = e+, [1] = e-
607+ float pt () const { return fPt ; }
608+ float eta () const { return fEta ; }
609+ float phi () const { return fPhi ; }
610+ float vx () const { return fVx ; }
611+ float vy () const { return fVy ; }
612+ float vz () const { return fVz ; }
613+ float legEta (int i) const { return fLegEta [i]; }
614+ float legPhi (int i) const { return fLegPhi [i]; }
615+ float legPt (int i) const { return fLegPt [i]; }
616+ };
617+
601618 std::map<std::tuple<int , int , int , int >, std::deque<std::vector<TruthGamma>>> truthGammaPool;
602619
603620 void addSinglePhotonQAHistogramsForStep (const std::string& path)
@@ -1833,15 +1850,23 @@ struct Photonhbt {
18331850 pos1.eta (), ele1.eta (),
18341851 pos2.eta (), ele2.eta ()),
18351852 obs.deta , obs.dphi , obs.kt );
1836- auto addToPool = [&](auto const & g) {
1837- if (usedPhotonIdsPerCol.insert (g.globalIndex ()).second ) {
1838- EMPair gtmp (g.pt (), g.eta (), g.phi (), 0 .f );
1839- gtmp.setConversionPointXYZ (g.vx (), g.vy (), g.vz ());
1840- emh1->AddTrackToEventPool (keyDFCollision, gtmp);
1841- }
1842- };
1843- addToPool (g1);
1844- addToPool (g2);
1853+ auto addToPool = [&](auto const & g, auto const & pos, auto const & ele) {
1854+ if (usedPhotonIdsPerCol.insert (g.globalIndex ()).second ) {
1855+ PhotonWithLegs p;
1856+ p.fPt = g.pt ();
1857+ p.fEta = g.eta ();
1858+ p.fPhi = g.phi ();
1859+ p.fVx = g.vx ();
1860+ p.fVy = g.vy ();
1861+ p.fVz = g.vz ();
1862+ p.fLegPt = {static_cast <float >(pos.pt ()), static_cast <float >(ele.pt ())};
1863+ p.fLegEta = {static_cast <float >(pos.eta ()), static_cast <float >(ele.eta ())};
1864+ p.fLegPhi = {static_cast <float >(pos.phi ()), static_cast <float >(ele.phi ())};
1865+ emh1->AddTrackToEventPool (keyDFCollision, p);
1866+ }
1867+ };
1868+ addToPool (g1, pos1, ele1);
1869+ addToPool (g2, pos2, ele2);
18451870 }
18461871 if (qaflags.doSinglePhotonQa ) {
18471872 for (const auto & g : photons1Coll) {
@@ -2060,15 +2085,23 @@ struct Photonhbt {
20602085 }
20612086 }
20622087
2063- auto addToPool = [&](auto const & g) {
2064- if (usedPhotonIdsPerCol.insert (g.globalIndex ()).second ) {
2065- EMPair gtmp (g.pt (), g.eta (), g.phi (), 0 .f );
2066- gtmp.setConversionPointXYZ (g.vx (), g.vy (), g.vz ());
2067- emh1->AddTrackToEventPool (keyDFCollision, gtmp);
2068- }
2069- };
2070- addToPool (g1);
2071- addToPool (g2);
2088+ auto addToPool = [&](auto const & g, auto const & pos, auto const & ele) {
2089+ if (usedPhotonIdsPerCol.insert (g.globalIndex ()).second ) {
2090+ PhotonWithLegs p;
2091+ p.fPt = g.pt ();
2092+ p.fEta = g.eta ();
2093+ p.fPhi = g.phi ();
2094+ p.fVx = g.vx ();
2095+ p.fVy = g.vy ();
2096+ p.fVz = g.vz ();
2097+ p.fLegPt = {static_cast <float >(pos.pt ()), static_cast <float >(ele.pt ())};
2098+ p.fLegEta = {static_cast <float >(pos.eta ()), static_cast <float >(ele.eta ())};
2099+ p.fLegPhi = {static_cast <float >(pos.phi ()), static_cast <float >(ele.phi ())};
2100+ emh1->AddTrackToEventPool (keyDFCollision, p);
2101+ }
2102+ };
2103+ addToPool (g1, pos1, ele1);
2104+ addToPool (g2, pos2, ele2);
20722105 }
20732106 if (qaflags.doSinglePhotonQa ) {
20742107 for (const auto & g : photonsColl) {
@@ -2516,7 +2549,7 @@ struct Photonhbt {
25162549 } // end runTruthEfficiency
25172550
25182551 using MyEMH = o2::aod::pwgem::dilepton::utils::EventMixingHandler<
2519- std::tuple<int , int , int , int >, std::pair<int , int >, EMPair >;
2552+ std::tuple<int , int , int , int >, std::pair<int , int >, PhotonWithLegs >;
25202553
25212554 MyEMH* emh1 = nullptr ;
25222555 MyEMH* emh2 = nullptr ;
0 commit comments