Skip to content

Commit 3a3428f

Browse files
committed
Please consider the following formatting changes
1 parent f40ea3e commit 3a3428f

File tree

1 file changed

+67
-73
lines changed

1 file changed

+67
-73
lines changed

PWGHF/HFC/TableProducer/correlatorLcScHadrons.cxx

Lines changed: 67 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -266,27 +266,27 @@ struct HfCorrelatorLcScHadrons {
266266
Configurable<float> eventFractionToAnalyze{"eventFractionToAnalyze", -1, "Fraction of events to analyze (use only for ME offline on very large samples)"};
267267

268268
struct : ConfigurableGroup {
269-
Configurable<float> cfgDaughPrPtMax{"cfgDaughPrPtMax", 5., "max. pT Daughter Proton"};
270-
Configurable<float> cfgDaughPrPtMin{"cfgDaughPrPtMin", 0.3, "min. pT Daughter Proton"};
271-
Configurable<float> cfgDaughPiPtMax{"cfgDaughPiPtMax", 10., "max. pT Daughter Pion"};
272-
Configurable<float> cfgDaughPiPtMin{"cfgDaughPiPtMin", 0.3, "min. pT Daughter Pion"};
273-
Configurable<float> cfgDaughPIDCutsTPCPr{"cfgDaughPIDCutsTPCPr", 3., "max. TPCnSigma Proton"};
274-
Configurable<float> cfgDaughPIDCutsTPCPi{"cfgDaughPIDCutsTPCPi", 2., "max. TPCnSigma Pion"};
275-
Configurable<float> cfgDaughPIDCutsTOFPi{"cfgDaughPIDCutsTOFPi", 2., "max. TOFnSigma Pion"};
276-
277-
Configurable<float> cfgV0radiusMin{"cfgV0radiusMin", 1.2, "minimum decay radius"};
278-
Configurable<float> cfgDCAPosToPVMin{"cfgDCAPosToPVMin", 0.05, "minimum DCA to PV for positive track"};
279-
Configurable<float> cfgDCANegToPVMin{"cfgDCANegToPVMin", 0.2, "minimum DCA to PV for negative track"};
280-
Configurable<float> cfgV0CosPA{"cfgV0CosPA", 0.995, "minimum v0 cosine"};
281-
Configurable<float> cfgDCAV0Dau{"cfgDCAV0Dau", 1.0, "maximum DCA between daughters"};
282-
Configurable<float> cfgHypMassWindow{"cfgHypMassWindow", 0.5, "single lambda mass selection"};
283-
Configurable<float> cfgV0PtMin{"cfgV0PtMin", 0, "minimum pT for lambda"};
284-
Configurable<float> cfgV0LifeTime{"cfgV0LifeTime", 30., "maximum lambda lifetime"};
285-
Configurable<float> cfgPV{"cfgPV", 10., "maximum z-vertex"};
286-
Configurable<int> cfgMaxOccupancy{"cfgMaxOccupancy", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
287-
Configurable<int> cfgMinOccupancy{"cfgMinOccupancy", 0, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
288-
} cfgV0;
289-
269+
Configurable<float> cfgDaughPrPtMax{"cfgDaughPrPtMax", 5., "max. pT Daughter Proton"};
270+
Configurable<float> cfgDaughPrPtMin{"cfgDaughPrPtMin", 0.3, "min. pT Daughter Proton"};
271+
Configurable<float> cfgDaughPiPtMax{"cfgDaughPiPtMax", 10., "max. pT Daughter Pion"};
272+
Configurable<float> cfgDaughPiPtMin{"cfgDaughPiPtMin", 0.3, "min. pT Daughter Pion"};
273+
Configurable<float> cfgDaughPIDCutsTPCPr{"cfgDaughPIDCutsTPCPr", 3., "max. TPCnSigma Proton"};
274+
Configurable<float> cfgDaughPIDCutsTPCPi{"cfgDaughPIDCutsTPCPi", 2., "max. TPCnSigma Pion"};
275+
Configurable<float> cfgDaughPIDCutsTOFPi{"cfgDaughPIDCutsTOFPi", 2., "max. TOFnSigma Pion"};
276+
277+
Configurable<float> cfgV0radiusMin{"cfgV0radiusMin", 1.2, "minimum decay radius"};
278+
Configurable<float> cfgDCAPosToPVMin{"cfgDCAPosToPVMin", 0.05, "minimum DCA to PV for positive track"};
279+
Configurable<float> cfgDCANegToPVMin{"cfgDCANegToPVMin", 0.2, "minimum DCA to PV for negative track"};
280+
Configurable<float> cfgV0CosPA{"cfgV0CosPA", 0.995, "minimum v0 cosine"};
281+
Configurable<float> cfgDCAV0Dau{"cfgDCAV0Dau", 1.0, "maximum DCA between daughters"};
282+
Configurable<float> cfgHypMassWindow{"cfgHypMassWindow", 0.5, "single lambda mass selection"};
283+
Configurable<float> cfgV0PtMin{"cfgV0PtMin", 0, "minimum pT for lambda"};
284+
Configurable<float> cfgV0LifeTime{"cfgV0LifeTime", 30., "maximum lambda lifetime"};
285+
Configurable<float> cfgPV{"cfgPV", 10., "maximum z-vertex"};
286+
Configurable<int> cfgMaxOccupancy{"cfgMaxOccupancy", 999999, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
287+
Configurable<int> cfgMinOccupancy{"cfgMinOccupancy", 0, "maximum occupancy of tracks in neighbouring collisions in a given time range"};
288+
} cfgV0;
289+
290290
HfHelper hfHelper;
291291
SliceCache cache;
292292
Service<o2::framework::O2DatabasePDG> pdg;
@@ -429,7 +429,7 @@ struct HfCorrelatorLcScHadrons {
429429
registry.add("hPhiMcGen", "Lc,Hadron particles - MC Gen", {HistType::kTH1F, {axisPhi}});
430430
registry.add("hMultFT0AMcGen", "Lc,Hadron multiplicity FT0A - MC Gen", {HistType::kTH1F, {axisMultiplicity}});
431431

432-
//Lambda V0 histograms
432+
// Lambda V0 histograms
433433
registry.add("hEventLambdaV0", "Lambda, events", {HistType::kTH1F, {{2, 0, 2}}});
434434
registry.add("hV0Lambda", "V0 Lambda candidates;inv. mass (p #pi) (GeV/#it{c}^{2});GeV/#it{c};GeV/#it{c}", {HistType::kTH3F, {{axisMassV0}, {axisPtV0}, {axisPtHadron}}});
435435
registry.add("hV0LambdaRefl", "V0 Lambda reflected candidates;inv. mass (p #pi) (GeV/#it{c}^{2});GeV/#it{c};GeV/#it{c}", {HistType::kTH3F, {{axisMassV0}, {axisPtV0}, {axisPtHadron}}});
@@ -440,7 +440,6 @@ struct HfCorrelatorLcScHadrons {
440440
registry.add("hV0LambdaPiKRejMcRec", "McRec V0 Lambda candidates with #pi K rejection;inv. mass (p #pi) (GeV/#it{c}^{2});GeV/#it{c};GeV/#it{c}", {HistType::kTH3F, {{axisMassV0}, {axisPtV0}, {axisPtHadron}}});
441441
registry.add("hV0LambdaReflPiKRejMcRec", "McRec V0 Lambda reflected candidates with #pi K rejection;inv. mass (p #pi) (GeV/#it{c}^{2});GeV/#it{c};GeV/#it{c}", {HistType::kTH3F, {{axisMassV0}, {axisPtV0}, {axisPtHadron}}});
442442

443-
444443
corrBinning = {{binsZVtx, binsMultiplicity}, true};
445444
}
446445

@@ -474,59 +473,58 @@ struct HfCorrelatorLcScHadrons {
474473
template <typename TCollision, typename V0>
475474
bool SelectionV0(TCollision const& collision, V0 const& candidate)
476475
{
477-
if (candidate.v0radius() < cfgV0.cfgV0radiusMin){
476+
if (candidate.v0radius() < cfgV0.cfgV0radiusMin) {
478477
return false;
479478
}
480-
if (std::abs(candidate.dcapostopv()) < cfgV0.cfgDCAPosToPVMin){
479+
if (std::abs(candidate.dcapostopv()) < cfgV0.cfgDCAPosToPVMin) {
481480
return false;
482481
}
483-
if (std::abs(candidate.dcanegtopv()) < cfgV0.cfgDCANegToPVMin){
482+
if (std::abs(candidate.dcanegtopv()) < cfgV0.cfgDCANegToPVMin) {
484483
return false;
485484
}
486-
if (candidate.v0cosPA() < cfgV0.cfgV0CosPA){
485+
if (candidate.v0cosPA() < cfgV0.cfgV0CosPA) {
487486
return false;
488487
}
489-
if (std::abs(candidate.dcaV0daughters()) > cfgV0.cfgDCAV0Dau){
488+
if (std::abs(candidate.dcaV0daughters()) > cfgV0.cfgDCAV0Dau) {
490489
return false;
491490
}
492-
if (candidate.pt() < cfgV0.cfgV0PtMin){
491+
if (candidate.pt() < cfgV0.cfgV0PtMin) {
493492
return false;
494493
}
495-
if (std::abs(candidate.yLambda()) > yCandMax){
494+
if (std::abs(candidate.yLambda()) > yCandMax) {
496495
return false;
497496
}
498-
if (candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda > cfgV0.cfgV0LifeTime){
497+
if (candidate.distovertotmom(collision.posX(), collision.posY(), collision.posZ()) * massLambda > cfgV0.cfgV0LifeTime) {
499498
return false;
500499
}
501500

502501
return true;
503502
}
504503

505-
506-
template <typename T>
504+
template <typename T>
507505
bool isSelectedV0Daughter(T const& track, int pid)
508506
{
509-
//if (!track.isGlobalTrackWoDCA())
510-
// return false;
511-
if (std::abs(pid) == kProton && std::abs(track.tpcNSigmaPr()) > cfgV0.cfgDaughPIDCutsTPCPr){
507+
// if (!track.isGlobalTrackWoDCA())
508+
// return false;
509+
if (std::abs(pid) == kProton && std::abs(track.tpcNSigmaPr()) > cfgV0.cfgDaughPIDCutsTPCPr) {
512510
return false;
513511
}
514-
if (std::abs(pid) == kPiPlus && std::abs(track.tpcNSigmaPi()) > cfgV0.cfgDaughPIDCutsTPCPi && std::abs(track.tofNSigmaPi()) > cfgV0.cfgDaughPIDCutsTOFPi){
512+
if (std::abs(pid) == kPiPlus && std::abs(track.tpcNSigmaPi()) > cfgV0.cfgDaughPIDCutsTPCPi && std::abs(track.tofNSigmaPi()) > cfgV0.cfgDaughPIDCutsTOFPi) {
515513
return false;
516514
}
517-
if (std::abs(track.eta()) > etaTrackMax){
515+
if (std::abs(track.eta()) > etaTrackMax) {
518516
return false;
519517
}
520-
if (std::abs(pid) == kProton && track.pt() > cfgV0.cfgDaughPrPtMax){
518+
if (std::abs(pid) == kProton && track.pt() > cfgV0.cfgDaughPrPtMax) {
521519
return false;
522520
}
523-
if (std::abs(pid) == kProton && track.pt() < cfgV0.cfgDaughPrPtMin){
521+
if (std::abs(pid) == kProton && track.pt() < cfgV0.cfgDaughPrPtMin) {
524522
return false;
525523
}
526-
if (std::abs(pid) == kPiPlus && track.pt() > cfgV0.cfgDaughPiPtMax){
524+
if (std::abs(pid) == kPiPlus && track.pt() > cfgV0.cfgDaughPiPtMax) {
527525
return false;
528526
}
529-
if (std::abs(pid) == kPiPlus && track.pt() < cfgV0.cfgDaughPiPtMin){
527+
if (std::abs(pid) == kPiPlus && track.pt() < cfgV0.cfgDaughPiPtMin) {
530528
return false;
531529
}
532530

@@ -538,71 +536,68 @@ struct HfCorrelatorLcScHadrons {
538536
{
539537
for (auto& v0 : v0s) {
540538

541-
if (!SelectionV0(collV0, v0)){
539+
if (!SelectionV0(collV0, v0)) {
542540
continue;
543541
}
544542

545543
auto posTrack_V0 = v0.template posTrack_as<TrackType>();
546544
auto negTrack_V0 = v0.template negTrack_as<TrackType>();
547545

548546
if (isSelectedV0Daughter(posTrack_V0, kProton) && isSelectedV0Daughter(negTrack_V0, kPiPlus)) {
549-
if (std::abs(massLambda - v0.mLambda()) < cfgV0.cfgHypMassWindow){
547+
if (std::abs(massLambda - v0.mLambda()) < cfgV0.cfgHypMassWindow) {
550548
registry.fill(HIST("hV0Lambda"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
551549
registry.fill(HIST("hV0LambdaRefl"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
552550

553-
if(passPIDSelection(posTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)){
551+
if (passPIDSelection(posTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)) {
554552
registry.fill(HIST("hV0LambdaPiKRej"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
555553
registry.fill(HIST("hV0LambdaReflPiKRej"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
556554
}
557555
}
558-
559556
}
560557
if (isSelectedV0Daughter(negTrack_V0, kProton) && isSelectedV0Daughter(posTrack_V0, kPiPlus)) {
561-
if (std::abs(massLambda - v0.mAntiLambda()) > cfgV0.cfgHypMassWindow){
558+
if (std::abs(massLambda - v0.mAntiLambda()) > cfgV0.cfgHypMassWindow) {
562559
registry.fill(HIST("hV0Lambda"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
563560
registry.fill(HIST("hV0LambdaRefl"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
564561

565-
if(passPIDSelection(negTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)){
562+
if (passPIDSelection(negTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)) {
566563
registry.fill(HIST("hV0LambdaPiKRej"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
567564
registry.fill(HIST("hV0LambdaReflPiKRej"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
568565
}
569566
}
570567
}
571-
if constexpr (isMcRec){
572-
if (!v0.has_mcParticle() || !posTrack_V0.has_mcParticle() || !negTrack_V0.has_mcParticle()){
573-
continue;
568+
if constexpr (isMcRec) {
569+
if (!v0.has_mcParticle() || !posTrack_V0.has_mcParticle() || !negTrack_V0.has_mcParticle()) {
570+
continue;
574571
}
575572
auto v0Mc = v0.mcParticle();
576573
auto posTrack = posTrack_V0.mcParticle();
577574
auto negTrack = negTrack_V0.mcParticle();
578575

579-
if(std::abs(v0Mc.pdgCode()) == kLambda0) {
580-
if (std::abs(posTrack.pdgCode()) == kProton){
581-
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
582-
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
576+
if (std::abs(v0Mc.pdgCode()) == kLambda0) {
577+
if (std::abs(posTrack.pdgCode()) == kProton) {
578+
registry.fill(HIST("hV0LambdaMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
579+
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
583580

584-
if(passPIDSelection(posTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)){
585-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
586-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
587-
}
581+
if (passPIDSelection(posTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)) {
582+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
583+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
584+
}
588585
}
589-
if (std::abs(negTrack.pdgCode()) == kProton){
586+
if (std::abs(negTrack.pdgCode()) == kProton) {
590587
registry.fill(HIST("hV0LambdaMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
591588
registry.fill(HIST("hV0LambdaReflMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
592-
593-
if(passPIDSelection(negTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)){
594-
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
595-
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
596-
}
589+
590+
if (passPIDSelection(negTrack_V0, trkPIDspecies, pidTPCMax, pidTOFMax, tofPIDThreshold, forceTOF)) {
591+
registry.fill(HIST("hV0LambdaPiKRejMcRec"), v0.mAntiLambda(), v0.pt(), negTrack_V0.pt());
592+
registry.fill(HIST("hV0LambdaReflPiKRejMcRec"), v0.mLambda(), v0.pt(), posTrack_V0.pt());
593+
}
597594
}
598595
}
599-
600596
}
601-
602597
}
603598
}
604599

605-
template <typename TCollision>
600+
template <typename TCollision>
606601
bool eventSelV0(TCollision collision)
607602
{
608603
if (!collision.sel8()) {
@@ -1385,8 +1380,8 @@ struct HfCorrelatorLcScHadrons {
13851380
}
13861381
PROCESS_SWITCH(HfCorrelatorLcScHadrons, processMcGenMixedEvent, "Process Mixed Event McGen", false);
13871382

1388-
void processDataLambdaV0(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision,
1389-
TracksData const& tracks, aod::V0Datas const& V0s)
1383+
void processDataLambdaV0(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision,
1384+
TracksData const& tracks, aod::V0Datas const& V0s)
13901385
{
13911386
registry.fill(HIST("hEventLambdaV0"), 0.5);
13921387
if (!eventSelV0(collision)) {
@@ -1398,8 +1393,8 @@ struct HfCorrelatorLcScHadrons {
13981393
}
13991394
PROCESS_SWITCH(HfCorrelatorLcScHadrons, processDataLambdaV0, "Data process for v0 lambda", false);
14001395

1401-
void processMcLambdaV0(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision,
1402-
TracksWithMc const& tracks, soa::Join<aod::V0Datas,aod::McV0Labels> const& V0s, aod::McParticles const&)
1396+
void processMcLambdaV0(soa::Join<aod::Collisions, aod::EvSels>::iterator const& collision,
1397+
TracksWithMc const& tracks, soa::Join<aod::V0Datas, aod::McV0Labels> const& V0s, aod::McParticles const&)
14031398
{
14041399
registry.fill(HIST("hEventLambdaV0"), 0.5);
14051400
if (!eventSelV0(collision)) {
@@ -1410,7 +1405,6 @@ struct HfCorrelatorLcScHadrons {
14101405
FillV0Histograms<true>(collision, V0s, tracks);
14111406
}
14121407
PROCESS_SWITCH(HfCorrelatorLcScHadrons, processMcLambdaV0, "Mc process for v0 lambda", false);
1413-
14141408
};
14151409

14161410
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)

0 commit comments

Comments
 (0)