1212// / \file taskElectronWeakBoson.cxx
1313// / \brief task for WeakBoson (W/Z) based on electron in mid-rapidity
1414// / \author S. Sakai & S. Ito (Univ. of Tsukuba)
15-
1615#ifndef HomogeneousField
1716#define HomogeneousField // o2-linter: disable=name/macro (required by KFParticle)
1817#endif
1918
19+ #include " PWGHF/Core/HfHelper.h"
2020#include " PWGJE/DataModel/EMCALClusters.h"
2121
2222#include " Common/Core/RecoDecay.h"
23+ #include " Common/Core/TrackSelection.h"
24+ #include " Common/Core/trackUtilities.h"
2325#include " Common/DataModel/EventSelection.h"
24- #include " Common/DataModel/PIDResponseTPC .h"
26+ #include " Common/DataModel/PIDResponse .h"
2527#include " Common/DataModel/TrackSelectionTables.h"
2628#include " EventFiltering/Zorro.h"
27- #include " EventFiltering/ZorroSummary.h"
2829#include " Tools/KFparticle/KFUtilities.h"
2930
30- #include < CCDB/BasicCCDBManager.h>
31- #include < CommonConstants/MathConstants.h>
32- #include < CommonConstants/PhysicsConstants.h>
33- #include < DataFormatsParameters/GRPMagField.h>
34- #include < DetectorsBase/Propagator.h>
35- #include < Framework/ASoA.h>
36- #include < Framework/AnalysisDataModel.h>
37- #include < Framework/AnalysisHelpers.h>
38- #include < Framework/AnalysisTask.h>
39- #include < Framework/Configurable.h>
40- #include < Framework/HistogramRegistry.h>
41- #include < Framework/HistogramSpec.h>
42- #include < Framework/InitContext.h>
43- #include < Framework/Logger.h>
44- #include < Framework/runDataProcessing.h>
45-
46- #include < TPDGCode.h>
47-
48- #include < KFPTrack.h>
49- #include < KFParticle.h>
50-
51- #include < array>
52- #include < cmath>
53- #include < cstddef>
54- #include < cstdint>
55- #include < cstdlib>
31+ #include " CCDB/BasicCCDBManager.h"
32+ #include " DataFormatsEMCAL/AnalysisCluster.h"
33+ #include " DataFormatsEMCAL/Cell.h"
34+ #include " DataFormatsEMCAL/Constants.h"
35+ #include " DataFormatsParameters/GRPMagField.h"
36+ #include " DataFormatsParameters/GRPObject.h"
37+ #include " DetectorsBase/GeometryManager.h"
38+ #include " DetectorsBase/Propagator.h"
39+ #include " EMCALBase/Geometry.h"
40+ #include " EMCALCalib/BadChannelMap.h"
41+ #include " Framework/ASoAHelpers.h"
42+ #include " Framework/AnalysisTask.h"
43+ #include " Framework/runDataProcessing.h"
44+
45+ #include " TPDGCode.h"
46+
47+ #include " KFPTrack.h"
48+ #include " KFPVertex.h"
49+ #include " KFParticle.h"
50+ #include " KFParticleBase.h"
51+ #include " KFVertex.h"
52+
5653#include < string>
5754#include < vector>
5855
@@ -70,12 +67,14 @@ struct HfTaskElectronWeakBoson {
7067
7168 Configurable<float > vtxZ{" vtxZ" , 10 .f , " " };
7269
73- Configurable<float > etaTrMim{ " etaTrMim " , -1 .0f , " minimun track eta" };
70+ Configurable<float > etaTrMin{ " etaTrMin " , -1 .0f , " minimun track eta" };
7471 Configurable<float > etaTrMax{" etaTrMax" , 1 .0f , " maximum track eta" };
7572 Configurable<float > etaEmcMax{" etaEmcMax" , 0 .6f , " maximum track eta" };
7673 Configurable<float > dcaxyMax{" dcaxyMax" , 2 .0f , " mximum DCA xy" };
7774 Configurable<float > chi2ItsMax{" chi2ItsMax" , 15 .0f , " its chi2 cut" };
7875 Configurable<float > ptMin{" ptMin" , 3 .0f , " minimum pT cut" };
76+ Configurable<float > ptAssMin{" ptAssMin" , 0.15 , " minimum pT cut for associated hadrons" };
77+ Configurable<float > ptMatch{" ptMatch" , 0.001 , " pT match in Z->ee and associated tracks" };
7978 Configurable<float > ptZeeMin{" ptZeeMin" , 20 .0f , " minimum pT cut for Zee" };
8079 Configurable<float > chi2TpcMax{" chi2TpcMax" , 4 .0f , " tpc chi2 cut" };
8180 Configurable<float > nclItsMin{" nclItsMin" , 2 .0f , " its # of cluster cut" };
@@ -100,6 +99,10 @@ struct HfTaskElectronWeakBoson {
10099 Configurable<float > energyIsolationMax{" energyIsolationMax" , 0.1 , " isolation cut on energy" };
101100 Configurable<int > trackIsolationMax{" trackIsolationMax" , 3 , " Maximum number of tracks in isolation cone" };
102101
102+ Configurable<float > zMassMin{" zMassMin" , 60.0 , " Minimum Z mass (GeV/c^2)" };
103+ Configurable<float > zMassMax{" zMassMax" , 120.0 , " Maximum Z mass (GeV/c^2)" };
104+ Configurable<float > hadronPtMin{" hadronPtMin" , 0.5 , " Minimum hadron pT for correlation" };
105+
103106 // flag for THn
104107 Configurable<bool > isTHnElectron{" isTHnElectron" , true , " Enables THn for electrons" };
105108 Configurable<float > ptTHnThresh{" ptTHnThresh" , 5.0 , " Threshold for THn make" };
@@ -129,7 +132,14 @@ struct HfTaskElectronWeakBoson {
129132 };
130133 std::vector<HfElectronCandidate> selectedElectronsIso;
131134 std::vector<HfElectronCandidate> selectedElectronsAss;
132- std::vector<HfElectronCandidate> reconstructedZ;
135+
136+ struct ZeeCandidate {
137+ float pt, eta, phi, mass, ptchild0, ptchild1;
138+ int charge;
139+ ZeeCandidate (float ptr, float e, float ph, float m, int ch, float ptzee0, float ptzee1)
140+ : pt(ptr), eta(e), phi(ph), mass(m), ptchild0(ptzee0), ptchild1(ptzee1), charge(ch) {}
141+ };
142+ std::vector<ZeeCandidate> reconstructedZ;
133143
134144 using SelectedClusters = o2::aod::EMCALClusters;
135145 // PbPb
@@ -143,7 +153,7 @@ struct HfTaskElectronWeakBoson {
143153 Filter eventFilter = (o2::aod::evsel::sel8 == true );
144154 Filter posZFilter = (nabs(o2::aod::collision::posZ) < vtxZ);
145155
146- Filter etafilter = (aod::track::eta < etaTrMax) && (aod::track::eta > etaTrMim );
156+ Filter etafilter = (aod::track::eta < etaTrMax) && (aod::track::eta > etaTrMin );
147157 Filter dcaxyfilter = (nabs(aod::track::dcaXY) < dcaxyMax);
148158 Filter filterGlobalTr = requireGlobalTrackInFilter();
149159
@@ -200,6 +210,9 @@ struct HfTaskElectronWeakBoson {
200210 const AxisSpec axisIsoTrack{15 , -0.5 , 14.5 , " Isolation Track" };
201211 const AxisSpec axisInvMassZ{150 , 0 , 150 , " M_{ee} (GeV/c^{2})" };
202212 const AxisSpec axisTrigger{3 , -0.5 , 2.5 , " Trigger status of zorro" };
213+ const AxisSpec axisDPhiZh{64 , -TMath::Pi () / 2 , 3 * TMath::Pi () / 2 , " #Delta#phi(Z-h)" };
214+ const AxisSpec axisPtHadron{50 , 0 , 50 , " p_{T,hadron} (GeV/c)" };
215+ const AxisSpec axisZpt{150 , 0 , 150 , " p_{T,Z} (GeV/c)" };
203216
204217 // create registrygrams
205218 registry.add (" hZvtx" , " Z vertex" , kTH1F , {axisZvtx});
@@ -233,6 +246,10 @@ struct HfTaskElectronWeakBoson {
233246 registry.add (" hTHnElectrons" , " electron info" , HistType::kTHnSparseF , {axisPt, axisNsigma, axisM02, axisEop, axisIsoEnergy, axisIsoTrack});
234247 registry.add (" hTHnTrMatch" , " Track EMC Match" , HistType::kTHnSparseF , {axisPt, axisdPhi, axisdEta});
235248
249+ // Z-hadron correlation histograms
250+ registry.add (" hZHadronDphi" , " Z-hadron #Delta#phi correlation" , kTH2F , {{axisZpt}, {axisDPhiZh}});
251+ registry.add (" hZptSpectrum" , " Z boson p_{T} spectrum" , kTH1F , {axisZpt});
252+
236253 // hisotgram for EMCal trigger
237254 registry.add (" hEMCalTrigger" , " EMCal trigger" , kTH1F , {axisTrigger});
238255 }
@@ -316,6 +333,12 @@ struct HfTaskElectronWeakBoson {
316333
317334 KFPTrack kfpTrackAssEle = createKFPTrackFromTrack (track);
318335 KFParticle kfpAssEle (kfpTrackAssEle, pdgAss);
336+ // reco by RecoDecay
337+ auto arr1 = RecoDecayPtEtaPhi::pVector (kfpIsoEle.GetPt (), kfpIsoEle.GetEta (), kfpIsoEle.GetPhi ());
338+ auto arr2 = RecoDecayPtEtaPhi::pVector (kfpAssEle.GetPt (), kfpAssEle.GetEta (), kfpAssEle.GetPhi ());
339+ double massZeeRecoDecay = RecoDecay::m (std::array{arr1, arr2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
340+
341+ // reco by KFparticle
319342 const KFParticle* electronPairs[2 ] = {&kfpIsoEle, &kfpAssEle};
320343 KFParticle zeeKF;
321344 zeeKF.SetConstructMethod (kfConstructMethod);
@@ -329,19 +352,24 @@ struct HfTaskElectronWeakBoson {
329352 float massZee, massZeeErr;
330353 zeeKF.GetMass (massZee, massZeeErr);
331354 // LOG(info) << "Invarimass cal by KF particle mass = " << massZee;
355+ // LOG(info) << "Invarimass cal by RecoDecay = " << massZeeRecoDecay;
332356
333357 if (track.sign () * charge > 0 ) {
334358 registry.fill (HIST (" hKfInvMassZeeLs" ), kfpIsoEle.GetPt (), massZee);
359+ registry.fill (HIST (" hInvMassZeeLs" ), kfpIsoEle.GetPt (), massZeeRecoDecay);
335360 } else {
336361 registry.fill (HIST (" hKfInvMassZeeUls" ), kfpIsoEle.GetPt (), massZee);
362+ registry.fill (HIST (" hInvMassZeeUls" ), kfpIsoEle.GetPt (), massZeeRecoDecay);
337363 }
338364
339365 reconstructedZ.emplace_back (
340366 zeeKF.GetPt (),
341367 zeeKF.GetEta (),
342368 zeeKF.GetPhi (),
343369 massZee,
344- track.sign () * charge);
370+ track.sign () * charge,
371+ kfpIsoEle.GetPt (),
372+ kfpAssEle.GetPt ());
345373 }
346374 }
347375
@@ -423,8 +451,6 @@ struct HfTaskElectronWeakBoson {
423451 continue ;
424452 if (track.itsNCls () < nclItsMin)
425453 continue ;
426- if (track.pt () < ptMin)
427- continue ;
428454
429455 registry.fill (HIST (" hEta" ), track.eta ());
430456 registry.fill (HIST (" hITSchi2" ), track.itsChi2NCl ());
@@ -437,7 +463,7 @@ struct HfTaskElectronWeakBoson {
437463
438464 float energyTrk = 0.0 ;
439465
440- if (track.tpcNSigmaEl () > nsigTpcMinLose && track. tpcNSigmaEl () < nsigTpcMax && track. pt () > ptZeeMin ) {
466+ if (track.pt () > ptAssMin ) {
441467 selectedElectronsAss.emplace_back (
442468 track.pt (),
443469 track.eta (),
@@ -446,6 +472,9 @@ struct HfTaskElectronWeakBoson {
446472 track.sign ());
447473 }
448474
475+ if (track.pt () < ptMin)
476+ continue ;
477+
449478 // track - match
450479
451480 // continue;
@@ -550,7 +579,6 @@ struct HfTaskElectronWeakBoson {
550579 }
551580 }
552581 }
553-
554582 nMatch++;
555583 }
556584 }
@@ -561,14 +589,17 @@ struct HfTaskElectronWeakBoson {
561589 }
562590
563591 } // end of track loop
564-
592+ /*
565593 // calculate inv. mass
566594 if (selectedElectronsIso.size() > 0) {
567595 for (size_t i = 0; i < selectedElectronsIso.size(); i++) {
568596 const auto& e1 = selectedElectronsIso[i];
569597 for (size_t j = 0; j < selectedElectronsAss.size(); j++) {
570598 const auto& e2 = selectedElectronsAss[j];
571-
599+ if (std::abs(e2.nSigEl) > nsigTpcMax)
600+ continue;
601+ if (e2.pt < ptZeeMin)
602+ continue;
572603 float ptIso = e1.pt;
573604 float ptAss = e2.pt;
574605 if (ptIso == ptAss)
@@ -585,6 +616,29 @@ struct HfTaskElectronWeakBoson {
585616 }
586617 }
587618 } // end of inv. mass calculation
619+ */
620+ // Z-hadron
621+ if (reconstructedZ.size () > 0 ) {
622+ for (const auto & zBoson : reconstructedZ) {
623+ // Z boson selection
624+ if (zBoson.mass < zMassMin || zBoson.mass > zMassMax)
625+ continue ;
626+ registry.fill (HIST (" hZptSpectrum" ), zBoson.pt );
627+ for (const auto & trackAss : selectedElectronsAss) {
628+ if (std::abs (trackAss.pt - zBoson.ptchild0 ) < ptMatch)
629+ continue ;
630+ if (std::abs (trackAss.pt - zBoson.ptchild1 ) < ptMatch)
631+ continue ;
632+ // calculate Z-h correlation
633+ double deltaPhi = trackAss.phi - zBoson.phi ;
634+ while (deltaPhi < -TMath::Pi () / 2 )
635+ deltaPhi += 2 * TMath::Pi ();
636+ while (deltaPhi > 3 * TMath::Pi () / 2 )
637+ deltaPhi -= 2 * TMath::Pi ();
638+ registry.fill (HIST (" hZHadronDphi" ), zBoson.pt , deltaPhi);
639+ }
640+ }
641+ } // end of Z-hadron correlation
588642 }
589643};
590644
0 commit comments