Skip to content

Commit 9da4f3d

Browse files
jikim1290alibuild
andauthored
[PWGLF] cha01710analysis.cxx: add DCA selection (#17465)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 2a90090 commit 9da4f3d

1 file changed

Lines changed: 9 additions & 13 deletions

File tree

PWGLF/Tasks/Resonances/cha01710analysis.cxx

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ struct Cha01710analysis {
6868

6969
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
7070

71-
Service<o2::ccdb::BasicCCDBManager> ccdb;
71+
Service<o2::ccdb::BasicCCDBManager> ccdb{};
7272

7373
Configurable<std::string> cfgUrl{"cfgUrl", "http://alice-ccdb.cern.ch", "CCDB URL"};
7474

@@ -269,12 +269,7 @@ struct Cha01710analysis {
269269
template <typename T>
270270
bool selectPionDaughter(T const& track)
271271
{
272-
if (!track.hasTPC() || track.tpcNClsFound() < v0Cuts.cfgV0DaughterTPCNClsMin ||
273-
track.pt() < v0Cuts.cfgV0DaughterPtMin || std::abs(track.eta()) > v0Cuts.cfgV0DaughterEtaMax ||
274-
std::abs(track.tpcNSigmaPi()) > v0Cuts.cfgV0DaughterTPCNSigmaPiMax) {
275-
return false;
276-
}
277-
return true;
272+
return !(!track.hasTPC() || track.tpcNClsFound() < v0Cuts.cfgV0DaughterTPCNClsMin || track.pt() < v0Cuts.cfgV0DaughterPtMin || std::abs(track.eta()) > v0Cuts.cfgV0DaughterEtaMax || std::abs(track.tpcNSigmaPi()) > v0Cuts.cfgV0DaughterTPCNSigmaPiMax);
278273
}
279274

280275
template <typename C, typename V>
@@ -284,7 +279,8 @@ struct Cha01710analysis {
284279
float ctau = v0.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * constants::physics::MassK0Short;
285280
if (v0.pt() < v0Cuts.cfgV0PtMin || v0.pt() > v0Cuts.cfgV0PtMax ||
286281
v0.dcaV0daughters() > v0Cuts.cfgV0DcaDaughtersMax || v0.v0cosPA() < v0Cuts.cfgV0CosPAMin ||
287-
v0.v0radius() < v0Cuts.cfgV0RadiusMin || std::abs(ctau) > v0Cuts.cfgV0CtauMax) {
282+
v0.v0radius() < v0Cuts.cfgV0RadiusMin || std::abs(ctau) > v0Cuts.cfgV0CtauMax ||
283+
std::abs(v0.dcapostopv()) < v0Cuts.cfgV0DaughterDcaPVMin || std::abs(v0.dcanegtopv()) < v0Cuts.cfgV0DaughterDcaPVMin) {
288284
return V0MassRegion::kReject;
289285
}
290286
if (v0Cuts.cfgRejectLambda &&
@@ -354,8 +350,9 @@ struct Cha01710analysis {
354350

355351
float relPhi = TVector2::Phi_0_2pi((mother.Phi() - eventPlaneDet) * harmonic);
356352
histos.fill(HIST("Pair/hMassVsK0SMass"), mother.M(), v0.mK0Short());
357-
if (region != kSignal)
353+
if (region != kSignal) {
358354
continue;
355+
}
359356
if (track.sign() > 0) {
360357
histos.fill(HIST("Pair/hSignalPlus"), mother.M(), mother.Pt(), centrality, relPhi);
361358
} else if (track.sign() < 0) {
@@ -366,9 +363,9 @@ struct Cha01710analysis {
366363
randomPhi += kaon.Phi();
367364
auto kaonRot = ROOT::Math::PxPyPzMVector(kaon.Pt() * std::cos(randomPhi), kaon.Pt() * std::sin(randomPhi), track.pz(), o2::constants::physics::MassKaonCharged);
368365
auto motherRot = k0 + kaonRot;
369-
if (std::abs(motherRot.Rapidity()) > cfgMotherRapidityMax)
366+
if (std::abs(motherRot.Rapidity()) > cfgMotherRapidityMax) {
370367
continue;
371-
368+
}
372369
if (track.sign() > 0) {
373370
histos.fill(HIST("Pair/hRotatedPlus"), motherRot.M(), motherRot.Pt(), centrality);
374371
} else if (track.sign() < 0) {
@@ -384,12 +381,11 @@ struct Cha01710analysis {
384381
if (!selectEvent(collision)) {
385382
return;
386383
}
384+
centrality = collision.centFT0M();
387385
if (eventCuts.cfgCentEst == kFT0M) {
388386
centrality = collision.centFT0M();
389387
} else if (eventCuts.cfgCentEst == kFT0C) {
390388
centrality = collision.centFT0C();
391-
} else {
392-
centrality = collision.centFT0M();
393389
}
394390

395391
histos.fill(HIST("Event/hCentDist"), centrality);

0 commit comments

Comments
 (0)