Skip to content

Commit c8fafdf

Browse files
prottayCMTProttay Das
andauthored
[PWGLF] fill subdetector histograms with acc weight (#12507)
Co-authored-by: Prottay Das <prottay@alipap1.cern.ch>
1 parent 01da5ae commit c8fafdf

File tree

1 file changed

+24
-10
lines changed

1 file changed

+24
-10
lines changed

PWGLF/Tasks/Strangeness/lambdapolsp.cxx

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ struct lambdapolsp {
324324
if (!checkwithpub) {
325325
// histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{20, -10.0, 10.0}});
326326
histos.add("hpRes", "hpRes", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
327-
histos.add("hpResSin", "hpResSin", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
327+
// histos.add("hpResSin", "hpResSin", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
328328
/*histos.add("hpCosPsiA", "hpCosPsiA", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
329329
histos.add("hpCosPsiC", "hpCosPsiC", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
330330
histos.add("hpSinPsiA", "hpSinPsiA", HistType::kTHnSparseF, {axisGrp.configcentAxis, thnAxisres});
@@ -356,12 +356,16 @@ struct lambdapolsp {
356356
if (usesubdet) {
357357
histos.add("hSparseLambdaPolA", "hSparseLambdaPolA", HistType::kTHnSparseF, runaxes, true);
358358
histos.add("hSparseLambdaPolC", "hSparseLambdaPolC", HistType::kTHnSparseF, runaxes, true);
359+
histos.add("hSparseLambdaPolAwgt", "hSparseLambdaPolAwgt", HistType::kTHnSparseF, runaxes, true);
360+
histos.add("hSparseLambdaPolCwgt", "hSparseLambdaPolCwgt", HistType::kTHnSparseF, runaxes, true);
359361
}
360362
histos.add("hSparseAntiLambdaPol", "hSparseAntiLambdaPol", HistType::kTHnSparseF, runaxes, true);
361363
histos.add("hSparseAntiLambdaPolwgt", "hSparseAntiLambdaPolwgt", HistType::kTHnSparseF, runaxes, true);
362364
if (usesubdet) {
363365
histos.add("hSparseAntiLambdaPolA", "hSparseAntiLambdaPolA", HistType::kTHnSparseF, runaxes, true);
364366
histos.add("hSparseAntiLambdaPolC", "hSparseAntiLambdaPolC", HistType::kTHnSparseF, runaxes, true);
367+
histos.add("hSparseAntiLambdaPolAwgt", "hSparseAntiLambdaPolAwgt", HistType::kTHnSparseF, runaxes, true);
368+
histos.add("hSparseAntiLambdaPolCwgt", "hSparseAntiLambdaPolCwgt", HistType::kTHnSparseF, runaxes, true);
365369
}
366370
histos.add("hSparseLambda_corr1a", "hSparseLambda_corr1a", HistType::kTHnSparseF, runaxes, true);
367371
histos.add("hSparseLambda_corr1b", "hSparseLambda_corr1b", HistType::kTHnSparseF, runaxes, true);
@@ -433,7 +437,7 @@ struct lambdapolsp {
433437
}
434438

435439
template <typename V0, typename T>
436-
bool isSelectedV0Daughter(V0 const& candidate, T const& track, int pid)
440+
bool isSelectedV0Daughter(V0 const& candidate, T const& track, int pid, int pid2)
437441
{
438442
// const auto eta = track.eta();
439443
// const auto pt = track.pt();
@@ -467,10 +471,10 @@ struct lambdapolsp {
467471
return false;
468472
}
469473

470-
if (pid == 0 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPr || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPi)) {
474+
if (pid2 == 0 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPr || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPi)) {
471475
return false;
472476
}
473-
if (pid == 1 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPi || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPr)) {
477+
if (pid2 == 1 && (TMath::Abs(candidate.dcapostopv()) < cMinV0DCAPi || TMath::Abs(candidate.dcanegtopv()) < cMinV0DCAPr)) {
474478
return false;
475479
}
476480

@@ -627,6 +631,8 @@ struct lambdapolsp {
627631
// PolA = PolA / acvalue;
628632
// Pol = Pol / acvalue;
629633
auto Polwgt = Pol / acvalue;
634+
auto PolAwgt = PolA / acvalue;
635+
auto PolCwgt = PolC / acvalue;
630636

631637
// Fill histograms using constructed names
632638
if (tag2) {
@@ -642,6 +648,8 @@ struct lambdapolsp {
642648
if (usesubdet) {
643649
histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, PolA, centrality, desbinvalue);
644650
histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, PolC, centrality, desbinvalue);
651+
histos.fill(HIST("hSparseAntiLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality, desbinvalue);
652+
histos.fill(HIST("hSparseAntiLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality, desbinvalue);
645653
}
646654
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue);
647655
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue);
@@ -662,6 +670,8 @@ struct lambdapolsp {
662670
if (usesubdet) {
663671
histos.fill(HIST("hSparseAntiLambdaPolA"), candmass, candpt, PolA, centrality);
664672
histos.fill(HIST("hSparseAntiLambdaPolC"), candmass, candpt, PolC, centrality);
673+
histos.fill(HIST("hSparseAntiLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality);
674+
histos.fill(HIST("hSparseAntiLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality);
665675
}
666676
histos.fill(HIST("hSparseAntiLambdaPol"), candmass, candpt, Pol, centrality);
667677
histos.fill(HIST("hSparseAntiLambdaPolwgt"), candmass, candpt, Polwgt, centrality);
@@ -685,6 +695,8 @@ struct lambdapolsp {
685695
if (usesubdet) {
686696
histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, PolA, centrality, desbinvalue);
687697
histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, PolC, centrality, desbinvalue);
698+
histos.fill(HIST("hSparseLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality, desbinvalue);
699+
histos.fill(HIST("hSparseLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality, desbinvalue);
688700
}
689701
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality, desbinvalue);
690702
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality, desbinvalue);
@@ -705,6 +717,8 @@ struct lambdapolsp {
705717
if (usesubdet) {
706718
histos.fill(HIST("hSparseLambdaPolA"), candmass, candpt, PolA, centrality);
707719
histos.fill(HIST("hSparseLambdaPolC"), candmass, candpt, PolC, centrality);
720+
histos.fill(HIST("hSparseLambdaPolAwgt"), candmass, candpt, PolAwgt, centrality);
721+
histos.fill(HIST("hSparseLambdaPolCwgt"), candmass, candpt, PolCwgt, centrality);
708722
}
709723
histos.fill(HIST("hSparseLambdaPol"), candmass, candpt, Pol, centrality);
710724
histos.fill(HIST("hSparseLambdaPolwgt"), candmass, candpt, Polwgt, centrality);
@@ -812,7 +826,7 @@ struct lambdapolsp {
812826
if (!checkwithpub) {
813827
// histos.fill(HIST("hVtxZ"), collision.posZ());
814828
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
815-
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
829+
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
816830
/*histos.fill(HIST("hpCosPsiA"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA))));
817831
histos.fill(HIST("hpCosPsiC"), centrality, (TMath::Cos(GetPhiInRange(psiZDCC))));
818832
histos.fill(HIST("hpSinPsiA"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA))));
@@ -980,10 +994,10 @@ struct lambdapolsp {
980994
continue;
981995
}
982996

983-
if (isSelectedV0Daughter(v0, postrack, 0) && isSelectedV0Daughter(v0, negtrack, 1)) {
997+
if (isSelectedV0Daughter(v0, postrack, 0, 0) && isSelectedV0Daughter(v0, negtrack, 1, 0)) {
984998
LambdaTag = 1;
985999
}
986-
if (isSelectedV0Daughter(v0, negtrack, 0) && isSelectedV0Daughter(v0, postrack, 1)) {
1000+
if (isSelectedV0Daughter(v0, negtrack, 0, 1) && isSelectedV0Daughter(v0, postrack, 1, 1)) {
9871001
aLambdaTag = 1;
9881002
}
9891003

@@ -1193,7 +1207,7 @@ struct lambdapolsp {
11931207
if (!checkwithpub) {
11941208
// histos.fill(HIST("hVtxZ"), collision.posZ());
11951209
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
1196-
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
1210+
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
11971211
/*histos.fill(HIST("hpCosPsiA"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA))));
11981212
histos.fill(HIST("hpCosPsiC"), centrality, (TMath::Cos(GetPhiInRange(psiZDCC))));
11991213
histos.fill(HIST("hpSinPsiA"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA))));
@@ -1443,7 +1457,7 @@ struct lambdapolsp {
14431457
}
14441458

14451459
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
1446-
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
1460+
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
14471461

14481462
for (const auto& v0 : groupV0) {
14491463

@@ -1567,7 +1581,7 @@ struct lambdapolsp {
15671581

15681582
histos.fill(HIST("hCentrality"), centrality);
15691583
histos.fill(HIST("hpRes"), centrality, (TMath::Cos(GetPhiInRange(psiZDCA - psiZDCC))));
1570-
histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
1584+
// histos.fill(HIST("hpResSin"), centrality, (TMath::Sin(GetPhiInRange(psiZDCA - psiZDCC))));
15711585

15721586
// V0s from collision1 to match kinematics
15731587
auto v0sCol1 = V0s.sliceBy(tracksPerCollisionV0Mixed, collision1.index());

0 commit comments

Comments
 (0)