@@ -70,12 +70,14 @@ struct HfTaskElectronWeakBoson {
7070
7171 Configurable<float > vtxZ{" vtxZ" , 10 .f , " " };
7272
73- Configurable<float > etaTrMim{ " etaTrMim " , -1 .0f , " minimun track eta" };
73+ Configurable<float > etaTrMin{ " etaTrMin " , -1 .0f , " minimun track eta" };
7474 Configurable<float > etaTrMax{" etaTrMax" , 1 .0f , " maximum track eta" };
7575 Configurable<float > etaEmcMax{" etaEmcMax" , 0 .6f , " maximum track eta" };
7676 Configurable<float > dcaxyMax{" dcaxyMax" , 2 .0f , " mximum DCA xy" };
7777 Configurable<float > chi2ItsMax{" chi2ItsMax" , 15 .0f , " its chi2 cut" };
7878 Configurable<float > ptMin{" ptMin" , 3 .0f , " minimum pT cut" };
79+ Configurable<float > ptAssMin{" ptAssMin" , 0.15 , " minimum pT cut for associated hadrons" };
80+ Configurable<float > ptMatch{" ptMatch" , 0.001 , " pT match in Z->ee and associated tracks" };
7981 Configurable<float > ptZeeMin{" ptZeeMin" , 20 .0f , " minimum pT cut for Zee" };
8082 Configurable<float > chi2TpcMax{" chi2TpcMax" , 4 .0f , " tpc chi2 cut" };
8183 Configurable<float > nclItsMin{" nclItsMin" , 2 .0f , " its # of cluster cut" };
@@ -100,6 +102,9 @@ struct HfTaskElectronWeakBoson {
100102 Configurable<float > energyIsolationMax{" energyIsolationMax" , 0.1 , " isolation cut on energy" };
101103 Configurable<int > trackIsolationMax{" trackIsolationMax" , 3 , " Maximum number of tracks in isolation cone" };
102104
105+ Configurable<float > massZMin{" massZMin" , 60.0 , " Minimum Z mass (GeV/c^2)" };
106+ Configurable<float > massZMax{" massZMax" , 120.0 , " Maximum Z mass (GeV/c^2)" };
107+
103108 // flag for THn
104109 Configurable<bool > isTHnElectron{" isTHnElectron" , true , " Enables THn for electrons" };
105110 Configurable<float > ptTHnThresh{" ptTHnThresh" , 5.0 , " Threshold for THn make" };
@@ -114,7 +119,7 @@ struct HfTaskElectronWeakBoson {
114119
115120 // KFParticle
116121 Configurable<int > kfConstructMethod{" kfConstructMethod" , 2 , " KF Construct Method" };
117- Configurable<int > kfChisqMassMax{ " kfChisqMassMax " , 10 , " Chi2 Max for mass reco by KF particle" };
122+ Configurable<int > chiSqNdfMax{ " chiSqNdfMax " , 10 , " Chi2 Max for mass reco by KF particle" };
118123
119124 // CCDB service object
120125 Service<o2::ccdb::BasicCCDBManager> ccdb;
@@ -129,7 +134,14 @@ struct HfTaskElectronWeakBoson {
129134 };
130135 std::vector<HfElectronCandidate> selectedElectronsIso;
131136 std::vector<HfElectronCandidate> selectedElectronsAss;
132- std::vector<HfElectronCandidate> reconstructedZ;
137+
138+ struct HfZeeCandidate {
139+ float pt, eta, phi, mass, ptchild0, ptchild1;
140+ int charge;
141+ HfZeeCandidate (float ptr, float e, float ph, float m, int ch, float ptzee0, float ptzee1)
142+ : pt(ptr), eta(e), phi(ph), mass(m), ptchild0(ptzee0), ptchild1(ptzee1), charge(ch) {}
143+ };
144+ std::vector<HfZeeCandidate> reconstructedZ;
133145
134146 using SelectedClusters = o2::aod::EMCALClusters;
135147 // PbPb
@@ -143,7 +155,7 @@ struct HfTaskElectronWeakBoson {
143155 Filter eventFilter = (o2::aod::evsel::sel8 == true );
144156 Filter posZFilter = (nabs(o2::aod::collision::posZ) < vtxZ);
145157
146- Filter etafilter = (aod::track::eta < etaTrMax) && (aod::track::eta > etaTrMim );
158+ Filter etafilter = (aod::track::eta < etaTrMax) && (aod::track::eta > etaTrMin );
147159 Filter dcaxyfilter = (nabs(aod::track::dcaXY) < dcaxyMax);
148160 Filter filterGlobalTr = requireGlobalTrackInFilter();
149161
@@ -200,6 +212,9 @@ struct HfTaskElectronWeakBoson {
200212 const AxisSpec axisIsoTrack{15 , -0.5 , 14.5 , " Isolation Track" };
201213 const AxisSpec axisInvMassZ{150 , 0 , 150 , " M_{ee} (GeV/c^{2})" };
202214 const AxisSpec axisTrigger{3 , -0.5 , 2.5 , " Trigger status of zorro" };
215+ const AxisSpec axisDPhiZh{64 , -o2::constants::math::PIHalf, 3 * o2::constants::math::PIHalf, " #Delta#phi(Z-h)" };
216+ const AxisSpec axisPtHadron{50 , 0 , 50 , " p_{T,hadron} (GeV/c)" };
217+ const AxisSpec axisZpt{150 , 0 , 150 , " p_{T,Z} (GeV/c)" };
203218
204219 // create registrygrams
205220 registry.add (" hZvtx" , " Z vertex" , kTH1F , {axisZvtx});
@@ -233,6 +248,10 @@ struct HfTaskElectronWeakBoson {
233248 registry.add (" hTHnElectrons" , " electron info" , HistType::kTHnSparseF , {axisPt, axisNsigma, axisM02, axisEop, axisIsoEnergy, axisIsoTrack});
234249 registry.add (" hTHnTrMatch" , " Track EMC Match" , HistType::kTHnSparseF , {axisPt, axisdPhi, axisdEta});
235250
251+ // Z-hadron correlation histograms
252+ registry.add (" hZHadronDphi" , " Z-hadron #Delta#phi correlation" , kTH2F , {{axisZpt}, {axisDPhiZh}});
253+ registry.add (" hZptSpectrum" , " Z boson p_{T} spectrum" , kTH1F , {axisZpt});
254+
236255 // hisotgram for EMCal trigger
237256 registry.add (" hEMCalTrigger" , " EMCal trigger" , kTH1F , {axisTrigger});
238257 }
@@ -302,46 +321,61 @@ struct HfTaskElectronWeakBoson {
302321 // LOG(info) << "Invarimass cal by KF particle ";
303322 for (const auto & track : tracks) {
304323
305- if (track.pt () < ptZeeMin)
324+ if (track.pt () < ptZeeMin) {
306325 continue ;
307- if (std::abs (track.tpcNSigmaEl ()) > nsigTpcMax)
326+ }
327+ if (std::abs (track.tpcNSigmaEl ()) > nsigTpcMax) {
308328 continue ;
309- if (std::abs (track.eta ()) > etaTrMax)
329+ }
330+ if (std::abs (track.eta ()) > etaTrMax) {
310331 continue ;
311-
332+ }
312333 int pdgAss = kElectron ;
313334 if (track.sign () > 0 ) {
314335 pdgAss = kPositron ;
315336 }
316337
317338 KFPTrack kfpTrackAssEle = createKFPTrackFromTrack (track);
318339 KFParticle kfpAssEle (kfpTrackAssEle, pdgAss);
340+ // reco by RecoDecay
341+ auto child1 = RecoDecayPtEtaPhi::pVector (kfpIsoEle.GetPt (), kfpIsoEle.GetEta (), kfpIsoEle.GetPhi ());
342+ auto child2 = RecoDecayPtEtaPhi::pVector (kfpAssEle.GetPt (), kfpAssEle.GetEta (), kfpAssEle.GetPhi ());
343+ double invMassEE = RecoDecay::m (std::array{child1, child2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
344+
345+ // reco by KFparticle
319346 const KFParticle* electronPairs[2 ] = {&kfpIsoEle, &kfpAssEle};
320347 KFParticle zeeKF;
321348 zeeKF.SetConstructMethod (kfConstructMethod);
322349 zeeKF.Construct (electronPairs, 2 );
323350 // LOG(info) << "Invarimass cal by KF particle Chi2/NDF = " << zeeKF.GetChi2()/zeeKF.GetNDF();
324- float massZeeChi2 = zeeKF.GetChi2 () / zeeKF.GetNDF ();
325- if (zeeKF.GetNDF () < 1 )
351+ float chiSqNdf = zeeKF.GetChi2 () / zeeKF.GetNDF ();
352+ if (zeeKF.GetNDF () < 1 ) {
326353 continue ;
327- if (std::abs (massZeeChi2) > kfChisqMassMax)
354+ }
355+ if (chiSqNdf > chiSqNdfMax) {
328356 continue ;
357+ }
329358 float massZee, massZeeErr;
330359 zeeKF.GetMass (massZee, massZeeErr);
331360 // LOG(info) << "Invarimass cal by KF particle mass = " << massZee;
361+ // LOG(info) << "Invarimass cal by RecoDecay = " << invMassEE;
332362
333363 if (track.sign () * charge > 0 ) {
334364 registry.fill (HIST (" hKfInvMassZeeLs" ), kfpIsoEle.GetPt (), massZee);
365+ registry.fill (HIST (" hInvMassZeeLs" ), kfpIsoEle.GetPt (), invMassEE);
335366 } else {
336367 registry.fill (HIST (" hKfInvMassZeeUls" ), kfpIsoEle.GetPt (), massZee);
368+ registry.fill (HIST (" hInvMassZeeUls" ), kfpIsoEle.GetPt (), invMassEE);
337369 }
338370
339371 reconstructedZ.emplace_back (
340372 zeeKF.GetPt (),
341373 zeeKF.GetEta (),
342374 zeeKF.GetPhi (),
343375 massZee,
344- track.sign () * charge);
376+ track.sign () * charge,
377+ kfpIsoEle.GetPt (),
378+ kfpAssEle.GetPt ());
345379 }
346380 }
347381
@@ -409,22 +443,27 @@ struct HfTaskElectronWeakBoson {
409443
410444 for (const auto & track : tracks) {
411445
412- if (std::abs (track.eta ()) > etaTrMax)
413- continue ;
414- if (track.tpcNClsCrossedRows () < nclcrossTpcMin)
446+ if (std::abs (track.eta ()) > etaTrMax) {
415447 continue ;
416- if (std::abs (track.dcaXY ()) > dcaxyMax)
448+ }
449+ if (track.tpcNClsCrossedRows () < nclcrossTpcMin) {
417450 continue ;
418- if (track.itsChi2NCl () > chi2ItsMax)
451+ }
452+ if (std::abs (track.dcaXY ()) > dcaxyMax) {
419453 continue ;
420- if (track.tpcChi2NCl () > chi2TpcMax)
454+ }
455+ if (track.itsChi2NCl () > chi2ItsMax) {
421456 continue ;
422- if (track.tpcNClsFound () < nclTpcMin)
457+ }
458+ if (track.tpcChi2NCl () > chi2TpcMax) {
423459 continue ;
424- if (track.itsNCls () < nclItsMin)
460+ }
461+ if (track.tpcNClsFound () < nclTpcMin) {
425462 continue ;
426- if (track.pt () < ptMin)
463+ }
464+ if (track.itsNCls () < nclItsMin) {
427465 continue ;
466+ }
428467
429468 registry.fill (HIST (" hEta" ), track.eta ());
430469 registry.fill (HIST (" hITSchi2" ), track.itsChi2NCl ());
@@ -437,7 +476,7 @@ struct HfTaskElectronWeakBoson {
437476
438477 float energyTrk = 0.0 ;
439478
440- if (track.tpcNSigmaEl () > nsigTpcMinLose && track. tpcNSigmaEl () < nsigTpcMax && track. pt () > ptZeeMin ) {
479+ if (track.pt () > ptAssMin ) {
441480 selectedElectronsAss.emplace_back (
442481 track.pt (),
443482 track.eta (),
@@ -446,6 +485,9 @@ struct HfTaskElectronWeakBoson {
446485 track.sign ());
447486 }
448487
488+ if (track.pt () < ptMin) {
489+ continue ;
490+ }
449491 // track - match
450492
451493 // continue;
@@ -550,7 +592,6 @@ struct HfTaskElectronWeakBoson {
550592 }
551593 }
552594 }
553-
554595 nMatch++;
555596 }
556597 }
@@ -561,30 +602,26 @@ struct HfTaskElectronWeakBoson {
561602 }
562603
563604 } // end of track loop
564-
565- // calculate inv. mass
566- if (selectedElectronsIso.size () > 0 ) {
567- for (size_t i = 0 ; i < selectedElectronsIso.size (); i++) {
568- const auto & e1 = selectedElectronsIso[i];
569- for (size_t j = 0 ; j < selectedElectronsAss.size (); j++) {
570- const auto & e2 = selectedElectronsAss[j];
571-
572- float ptIso = e1 .pt ;
573- float ptAss = e2 .pt ;
574- if (ptIso == ptAss)
605+ // Z-hadron
606+ if (reconstructedZ.size () > 0 ) {
607+ for (const auto & zBoson : reconstructedZ) {
608+ // Z boson selection
609+ if (zBoson.mass < massZMin || zBoson.mass > massZMax)
610+ continue ;
611+ registry.fill (HIST (" hZptSpectrum" ), zBoson.pt );
612+ for (const auto & trackAss : selectedElectronsAss) {
613+ if (std::abs (trackAss.pt - zBoson.ptchild0 ) < ptMatch) {
614+ continue ;
615+ }
616+ if (std::abs (trackAss.pt - zBoson.ptchild1 ) < ptMatch) {
575617 continue ;
576- auto arr1 = RecoDecayPtEtaPhi::pVector (e1 .pt , e1 .eta , e1 .phi );
577- auto arr2 = RecoDecayPtEtaPhi::pVector (e2 .pt , e2 .eta , e2 .phi );
578- double mass = RecoDecay::m (std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
579-
580- if (e1 .sign () * e2 .sign () > 0 ) {
581- registry.fill (HIST (" hInvMassZeeLs" ), ptIso, mass);
582- } else {
583- registry.fill (HIST (" hInvMassZeeUls" ), ptIso, mass);
584618 }
619+ // calculate Z-h correlation
620+ double deltaPhi = RecoDecay::constrainAngle (trackAss.phi - zBoson.phi , -o2::constants::math::PIHalf);
621+ registry.fill (HIST (" hZHadronDphi" ), zBoson.pt , deltaPhi);
585622 }
586623 }
587- } // end of inv. mass calculation
624+ } // end of Z-hadron correlation
588625 }
589626};
590627
0 commit comments