Skip to content

Commit 1667521

Browse files
sashingovkucera
andauthored
[PWGHF] Updated to Z->ee trig. study (#13165)
Co-authored-by: Vít Kučera <vit.kucera@cern.ch>
1 parent 618df32 commit 1667521

File tree

1 file changed

+89
-32
lines changed

1 file changed

+89
-32
lines changed

PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx

Lines changed: 89 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ struct HfTaskElectronWeakBoson {
104104

105105
Configurable<float> rIsolation{"rIsolation", 0.3, "cone radius for isolation cut"};
106106
Configurable<float> energyIsolationMax{"energyIsolationMax", 0.1, "isolation cut on energy"};
107+
Configurable<float> momentumIsolationMax{"momentumIsolationMax", 0.1, "isolation cut on momentum"};
107108
Configurable<int> trackIsolationMax{"trackIsolationMax", 3, "Maximum number of tracks in isolation cone"};
108109

109110
Configurable<float> massZMin{"massZMin", 60.0, "Minimum Z mass (GeV/c^2)"};
@@ -180,6 +181,27 @@ struct HfTaskElectronWeakBoson {
180181
Preslice<o2::aod::EMCALAmbiguousClusterCells> perClusterAmb = o2::aod::emcalclustercell::emcalambiguousclusterId;
181182
PresliceUnsorted<o2::aod::EMCALMatchedTracks> perClusterMatchedTracks = o2::aod::emcalmatchedtrack::trackId;
182183

184+
// config axis
185+
ConfigurableAxis confaxisPt{"confaxisPt", {100, 0, 100}, "p_{T}"};
186+
ConfigurableAxis confaxisPtZee{"confaxisPtZee", {60, 20, 80}, "p_{T}"};
187+
ConfigurableAxis confaxisPtZneg{"confaxisPtZneg", {60, 20, 80}, "p_{T,neg} (GeV/c)"};
188+
ConfigurableAxis confaxisPtZpos{"confaxisPtZpos", {60, 20, 80}, "p_{T,pos} (GeV/c)"};
189+
ConfigurableAxis confaxisEop{"confaxisEop", {300, -0.01, 1.49}, "E/p"};
190+
ConfigurableAxis confaxisEopZneg{"confaxisEopZneg", {300, -0.01, 1.49}, "E/p_{neg}"};
191+
ConfigurableAxis confaxisEopZpos{"confaxisEopZpos", {300, -0.01, 1.49}, "E/p_{pos}"};
192+
ConfigurableAxis confaxisIsoEnergy{"confaxisIsoEnergy", {255, 0, 2.0}, "E_{iso}"};
193+
ConfigurableAxis confaxisIsoEnergyZneg{"confaxisIsoEnergyZneg", {255, 0, 2.0}, "E_{iso,neg}"};
194+
ConfigurableAxis confaxisIsoEnergyZpos{"confaxisIsoEnergyZpos", {255, 0, 2.0}, "E_{iso,pos}"};
195+
ConfigurableAxis confaxisIsoMomentum{"confaxisIsoMomentum", {255, 0, 2.0}, "E_{iso}"};
196+
ConfigurableAxis confaxisIsoMomentumZneg{"confaxisIsoMomentumZneg", {255, 0, 1.5}, "E_{iso,neg}"};
197+
ConfigurableAxis confaxisIsoMomentumZpos{"confaxisIsoMomentumZpos", {255, 0, 1.5}, "E_{iso,pos}"};
198+
ConfigurableAxis confaxisIsoTrack{"confaxisIsoTrack", {25, -0.5, 24.5}, "Isolation Track"};
199+
ConfigurableAxis confaxisIsoTrackZneg{"confaxisIsoTrackZneg", {25, -0.5, 24.5}, "N_{isotrk,neg}"};
200+
ConfigurableAxis confaxisIsoTrackZpos{"confaxisIsoTrackZpos", {25, -0.5, 24.5}, "N_{isotrk,pos}"};
201+
ConfigurableAxis confaxisInvMassZgamma{"confaxisInvMassZgamma", {150, 0, 150}, "M_{ee} (GeV/c^{2})"};
202+
ConfigurableAxis confaxisInvMassZ{"confaxisInvMassZ", {130, 20, 150}, "M_{ee} (GeV/c^{2})"};
203+
ConfigurableAxis confaxisZfrag{"confaxisZfrag", {200, 0, 2.0}, "p_{T,h}/p_{T,Z}"};
204+
183205
// Histogram registry: an object to hold your registrygrams
184206
HistogramRegistry registry{"registry"};
185207

@@ -212,10 +234,6 @@ struct HfTaskElectronWeakBoson {
212234
const AxisSpec axisZvtx{40, -20, 20, "Zvtx"};
213235
const AxisSpec axisCounter{1, 0, 1, "events"};
214236
const AxisSpec axisEta{20, -1.0, 1.0, "#eta"};
215-
const AxisSpec axisPt{nBinsPt, 0, binPtmax, "p_{T}"};
216-
const AxisSpec axisPtZee{60, 20, 80, "p_{T}"};
217-
const AxisSpec axisPtZneg{60, 20, 80, "p_{T,neg} (GeV/c)"};
218-
const AxisSpec axisPtZpos{60, 20, 80, "p_{T,pos} (GeV/c)"};
219237
const AxisSpec axisDCAxyneg{150, 0, 0.3, "DCAxy_{neg}"};
220238
const AxisSpec axisDCAxypos{150, 0, 0.3, "DCAxy_{pos}"};
221239
const AxisSpec axisDCAzneg{150, 0, 0.3, "DCAz_{neg}"};
@@ -235,31 +253,35 @@ struct HfTaskElectronWeakBoson {
235253
const AxisSpec axisdR{20, 0.0, 0.2, "dR"};
236254
const AxisSpec axisNcell{50, 0.0, 50.0, "Ncell"};
237255
const AxisSpec axisPhi{350, 0, 7, "Phi"};
238-
const AxisSpec axisEop{200, 0, 2, "E/p"};
239-
const AxisSpec axisEopZneg{200, 0, 2, "E/p neg"};
240-
const AxisSpec axisEopZpos{200, 0, 2, "E/p pos"};
241256
const AxisSpec axisChi2{250, 0.0, 25.0, "#chi^{2}"};
242257
const AxisSpec axisCluster{100, 0.0, 200.0, "counts"};
243258
const AxisSpec axisITSNCls{10, 0.0, 10, "counts"};
244259
const AxisSpec axisEMCtime{100, -50.0, 50, "EMC time"};
245-
const AxisSpec axisIsoEnergy{100, 0, 1.0, "E_{iso}"};
246-
const AxisSpec axisIsoEnergyZneg{100, 0, 1.0, "E_{iso,neg}"};
247-
const AxisSpec axisIsoEnergyZpos{100, 0, 1.0, "E_{iso,pos}"};
248-
const AxisSpec axisIsoMomentum{100, 0, 10.0, "Isolation momentum(GeV/C)"};
249-
const AxisSpec axisIsoMomentumZneg{100, 0, 10.0, "p_{iso,neg}"};
250-
const AxisSpec axisIsoMomentumZpos{100, 0, 10.0, "p_{iso,pos}"};
251-
const AxisSpec axisIsoTrack{25, -0.5, 24.5, "Isolation Track"};
252-
const AxisSpec axisIsoTrackZneg{25, -0.5, 24.5, "N_{isotrk,neg}"};
253-
const AxisSpec axisIsoTrackZpos{25, -0.5, 24.5, "N_{isotrk,pos}"};
254-
const AxisSpec axisInvMassZgamma{150, 0, 150, "M_{ee} (GeV/c^{2})"};
255-
const AxisSpec axisInvMassZ{130, 20, 150, "M_{ee} (GeV/c^{2})"};
256260
const AxisSpec axisTrigger{3, -0.5, 2.5, "Trigger status of zorro"};
257261
const AxisSpec axisDPhiZh{64, -o2::constants::math::PIHalf, 3 * o2::constants::math::PIHalf, "#Delta#phi(Z-h)"};
258-
const AxisSpec axisPtHadron{50, 0, 50, "p_{T,hadron} (GeV/c)"};
259-
const AxisSpec axisPtZ{150, 0, 150, "p_{T,Z} (GeV/c)"};
262+
const AxisSpec axisPtHadron{nBinsPt, 0, binPtmax, "p_{T,hadron} (GeV/c)"};
263+
const AxisSpec axisPtZ{nBinsPt, 0, binPtmax, "p_{T,Z} (GeV/c)"};
260264
const AxisSpec axisSign{2, -2, 2, "charge sign"};
261-
const AxisSpec axisCentrality{centralityBins};
262-
const AxisSpec axisPtRatio{200, 0, 2.0, "pt ratio for h and Z"};
265+
const AxisSpec axisCentrality{centralityBins, "centrality"};
266+
const AxisSpec axisEop{confaxisEop, "E/p"};
267+
const AxisSpec axisEopZneg{confaxisEopZneg, "E/p_{neg}"};
268+
const AxisSpec axisEopZpos{confaxisEopZpos, "E/p_{[pos}"};
269+
const AxisSpec axisPt{confaxisPt, "p_{T}"};
270+
const AxisSpec axisPtZee{confaxisPtZee, "p_{T}"};
271+
const AxisSpec axisPtZneg{confaxisPtZneg, "p_{T,neg} (GeV/c)"};
272+
const AxisSpec axisPtZpos{confaxisPtZpos, "p_{T,pos} (GeV/c)"};
273+
const AxisSpec axisIsoEnergy{confaxisIsoEnergy, "E_{iso}"};
274+
const AxisSpec axisIsoEnergyZneg{confaxisIsoEnergyZneg, "E_{iso}"};
275+
const AxisSpec axisIsoEnergyZpos{confaxisIsoEnergyZpos, "E_{iso}"};
276+
const AxisSpec axisIsoMomentum{confaxisIsoMomentum, "Isolation momentum(GeV/C)"};
277+
const AxisSpec axisIsoMomentumZneg{confaxisIsoMomentumZneg, "Isolation momentum(GeV/C)"};
278+
const AxisSpec axisIsoMomentumZpos{confaxisIsoMomentumZpos, "Isolation momentum(GeV/C)"};
279+
const AxisSpec axisIsoTrack{confaxisIsoTrack, "Isolation Track"};
280+
const AxisSpec axisIsoTrackZneg{confaxisIsoTrackZneg, "N_{isotrk,neg}"};
281+
const AxisSpec axisIsoTrackZpos{confaxisIsoTrackZpos, "N_{isotrk,pos}"};
282+
const AxisSpec axisInvMassZgamma{confaxisInvMassZgamma, "M_{ee} (GeV/c^{2})"};
283+
const AxisSpec axisInvMassZ{confaxisInvMassZ, "M_{ee} (GeV/c^{2})"};
284+
const AxisSpec axisZfrag{confaxisZfrag, "p_{T,h}/p_{T,Z}"};
263285

264286
// create registrygrams
265287
registry.add("hZvtx", "Z vertex", kTH1D, {axisZvtx});
@@ -289,11 +311,12 @@ struct HfTaskElectronWeakBoson {
289311
registry.add("hInvMassZee", "invariant mass for Z ULS pair", HistType::kTHnSparseF, {axisCentrality, axisSign, axisPt, axisInvMassZgamma});
290312
registry.add("hKfInvMassZee", "invariant mass for Z ULS pair KFp", HistType::kTHnSparseF, {axisCentrality, axisSign, axisPt, axisInvMassZgamma});
291313
registry.add("hInvMassZeeQA", "QA for invariant mass for Z", HistType::kTHnSparseF, {axisInvMassZ, axisPtZneg, axisPtZpos, axisDCAxyneg, axisDCAxypos, axisDCAzpos, axisNclsTPCneg, axisNclsTPCpos, axisNclsITSneg, axisNclsITSpos, axisSectorTPCneg, axisSectorTPCneg, axisEopZneg, axisEopZpos, axisIsoEnergyZneg, axisIsoEnergyZpos, axisIsoMomentumZneg, axisIsoMomentumZpos, axisIsoTrackZneg, axisIsoTrackZpos});
292-
registry.add("hTHnElectrons", "electron info", HistType::kTHnSparseF, {axisPt, axisNsigma, axisM02, axisEop, axisIsoEnergy, axisIsoTrack, axisEta, axisDedx});
314+
registry.add("hInvMassZeeQAbg", "QA for invariant mass for Z", HistType::kTHnSparseF, {axisInvMassZ, axisPtZneg, axisPtZpos, axisDCAxyneg, axisDCAxypos, axisDCAzpos, axisNclsTPCneg, axisNclsTPCpos, axisNclsITSneg, axisNclsITSpos, axisSectorTPCneg, axisSectorTPCneg, axisEopZneg, axisEopZpos, axisIsoEnergyZneg, axisIsoEnergyZpos, axisIsoMomentumZneg, axisIsoMomentumZpos, axisIsoTrackZneg, axisIsoTrackZpos});
315+
registry.add("hTHnElectrons", "electron info", HistType::kTHnSparseF, {axisPt, axisNsigma, axisM02, axisEop, axisIsoEnergy, axisIsoMomentum, axisIsoTrack, axisEta, axisDedx});
293316
registry.add("hTHnTrMatch", "Track EMC Match", HistType::kTHnSparseF, {axisPt, axisdPhi, axisdEta});
294317

295318
// Z-hadron correlation histograms
296-
registry.add("hZHadronDphi", "Z-hadron #Delta#phi correlation", HistType::kTHnSparseF, {axisCentrality, axisSign, axisPtZ, axisDPhiZh, axisPtRatio, axisPtHadron});
319+
registry.add("hZHadronDphi", "Z-hadron #Delta#phi correlation", HistType::kTHnSparseF, {axisCentrality, axisSign, axisPtZ, axisDPhiZh, axisZfrag, axisPtHadron});
297320
registry.add("hZptSpectrum", "Z boson p_{T} spectrum", kTH2F, {{axisSign}, {axisPtZ}});
298321

299322
// hisotgram for EMCal trigger
@@ -390,6 +413,10 @@ struct HfTaskElectronWeakBoson {
390413
if (track.sign() > 0) {
391414
pdgAss = kPositron;
392415
}
416+
auto [trackCount, isoMomentum] = getIsolatedTrack(track.eta(), track.phi(), track.p(), tracks);
417+
if (isoMomentum > momentumIsolationMax) {
418+
continue;
419+
}
393420

394421
KFPTrack kfpTrackAssEle = createKFPTrackFromTrack(track);
395422
KFParticle kfpAssEle(kfpTrackAssEle, pdgAss);
@@ -540,7 +567,7 @@ struct HfTaskElectronWeakBoson {
540567
registry.fill(HIST("hPt"), track.pt());
541568
registry.fill(HIST("hTPCNsigma"), track.p(), track.tpcNSigmaEl());
542569

543-
float eop = 0.0;
570+
float eop = -0.01;
544571
float isoEnergy = 1.0;
545572
// track isolation
546573
auto [trackCount, isoMomentum] = getIsolatedTrack(track.eta(), track.phi(), track.p(), tracks);
@@ -631,7 +658,7 @@ struct HfTaskElectronWeakBoson {
631658
isoEnergy = getIsolatedCluster(cluster, emcClusters);
632659

633660
if (match.track_as<TrackEle>().pt() > ptTHnThresh && isTHnElectron) {
634-
registry.fill(HIST("hTHnElectrons"), match.track_as<TrackEle>().pt(), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc, eop, isoEnergy, trackCount, track.eta(), track.tpcSignal());
661+
registry.fill(HIST("hTHnElectrons"), match.track_as<TrackEle>().pt(), match.track_as<TrackEle>().tpcNSigmaEl(), m02Emc, eop, isoEnergy, isoMomentum, trackCount, track.eta(), track.tpcSignal());
635662
}
636663
// LOG(info) << "E/p" << eop;
637664
registry.fill(HIST("hEopNsigTPC"), match.track_as<TrackEle>().tpcNSigmaEl(), eop);
@@ -643,7 +670,7 @@ struct HfTaskElectronWeakBoson {
643670
registry.fill(HIST("hEop"), match.track_as<TrackEle>().pt(), eop);
644671
if (eop > eopMin && eop < eopMax && isoEnergy < energyIsolationMax)
645672
isIsolated = true;
646-
if (eop > eopMin && eop < eopMax && trackCount < trackIsolationMax)
673+
if (eop > eopMin && eop < eopMax && trackCount < trackIsolationMax && isoMomentum < momentumIsolationMax)
647674
isIsolatedTr = true;
648675

649676
if (isIsolated && isIsolatedTr) {
@@ -729,20 +756,50 @@ struct HfTaskElectronWeakBoson {
729756
// Z->ee QA
730757
if (enableZeeRecoQA) {
731758
if (selectedElectronsIso.size() > 0 && selectedPositronsIso.size() > 0) {
759+
// signal
732760
for (const auto& trackEle : selectedElectronsIso) {
761+
auto child1 = RecoDecayPtEtaPhi::pVector(trackEle.pt, trackEle.eta, trackEle.phi);
762+
float sectorneg = trackEle.phi / o2::constants::math::SectorSpanRad;
733763
for (const auto& trackPos : selectedPositronsIso) {
734-
auto child1 = RecoDecayPtEtaPhi::pVector(trackEle.pt, trackEle.eta, trackEle.phi);
735764
auto child2 = RecoDecayPtEtaPhi::pVector(trackPos.pt, trackPos.eta, trackPos.phi);
736765
double invMass = RecoDecay::m(std::array{child1, child2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
766+
float sectorpos = trackPos.phi / o2::constants::math::SectorSpanRad;
737767
if (invMass > massZMinQA) {
738-
float sectorneg = trackEle.phi / o2::constants::math::SectorSpanRad;
739-
float sectorpos = trackPos.phi / o2::constants::math::SectorSpanRad;
740-
// LOG(info) << "TPC sector= " << sectorneg << " ; " << sectorpos;
741768
registry.fill(HIST("hInvMassZeeQA"), invMass, trackEle.pt, trackPos.pt, trackEle.dcaxyTrk, trackPos.dcaxyTrk, trackPos.dcazTrk, trackEle.nclusterTPC, trackPos.nclusterTPC, trackEle.nclusterITS, trackPos.nclusterITS, sectorneg, sectorpos, trackEle.eop, trackPos.eop, trackEle.energyIso, trackPos.energyIso, trackEle.momIso, trackPos.momIso, trackEle.ntrackIso, trackPos.ntrackIso);
742769
}
743770
}
744771
}
745-
}
772+
// bg e-e-
773+
for (size_t i = 0; i < selectedElectronsIso.size(); ++i) {
774+
const auto& trackEle = selectedElectronsIso[i];
775+
auto child1 = RecoDecayPtEtaPhi::pVector(trackEle.pt, trackEle.eta, trackEle.phi);
776+
float sectorneg = trackEle.phi / o2::constants::math::SectorSpanRad;
777+
for (size_t j = i + 1; j < selectedElectronsIso.size(); ++j) {
778+
const auto& trackEle2 = selectedElectronsIso[j];
779+
auto child2 = RecoDecayPtEtaPhi::pVector(trackEle2.pt, trackEle2.eta, trackEle2.phi);
780+
float sectorpos = trackEle2.phi / o2::constants::math::SectorSpanRad;
781+
double invMass = RecoDecay::m(std::array{child1, child2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
782+
if (invMass > massZMinQA) {
783+
registry.fill(HIST("hInvMassZeeQAbg"), invMass, trackEle.pt, trackEle2.pt, trackEle.dcaxyTrk, trackEle2.dcaxyTrk, trackEle2.dcazTrk, trackEle.nclusterTPC, trackEle2.nclusterTPC, trackEle.nclusterITS, trackEle2.nclusterITS, sectorneg, sectorpos, trackEle.eop, trackEle2.eop, trackEle.energyIso, trackEle2.energyIso, trackEle.momIso, trackEle2.momIso, trackEle.ntrackIso, trackEle2.ntrackIso);
784+
}
785+
}
786+
}
787+
// bg e+e+
788+
for (size_t i = 0; i < selectedPositronsIso.size(); ++i) {
789+
const auto& trackPos = selectedPositronsIso[i];
790+
auto child1 = RecoDecayPtEtaPhi::pVector(trackPos.pt, trackPos.eta, trackPos.phi);
791+
float sectorneg = trackPos.phi / o2::constants::math::SectorSpanRad;
792+
for (size_t j = i + 1; j < selectedPositronsIso.size(); ++j) {
793+
const auto& trackPos2 = selectedPositronsIso[j];
794+
auto child2 = RecoDecayPtEtaPhi::pVector(trackPos2.pt, trackPos2.eta, trackPos2.phi);
795+
float sectorpos = trackPos2.phi / o2::constants::math::SectorSpanRad;
796+
double invMass = RecoDecay::m(std::array{child1, child2}, std::array{o2::constants::physics::MassElectron, o2::constants::physics::MassElectron});
797+
if (invMass > massZMinQA) {
798+
registry.fill(HIST("hInvMassZeeQAbg"), invMass, trackPos.pt, trackPos2.pt, trackPos.dcaxyTrk, trackPos2.dcaxyTrk, trackPos2.dcazTrk, trackPos.nclusterTPC, trackPos2.nclusterTPC, trackPos.nclusterITS, trackPos2.nclusterITS, sectorneg, sectorpos, trackPos.eop, trackPos2.eop, trackPos.energyIso, trackPos2.energyIso, trackPos.momIso, trackPos2.momIso, trackPos.ntrackIso, trackPos2.ntrackIso);
799+
}
800+
}
801+
}
802+
} // check arrays aren't empty
746803
} // end of Z->ee QA
747804
} // process
748805
}; // struct HfTaskElectronWeakBoson

0 commit comments

Comments
 (0)