Skip to content

Commit 4630ffe

Browse files
authored
V2occupancy (#6263)
* improve event mix * Add time frame cut in pp phi * fix momentum cut * Add new thnsparse * Fix histogram name * Add rapidity bin in THnsparse * Q vector bining * Add shift correction * Add acceptance cut for generated * Fix costheta range * Preliminary task highmass lambda * Fix lorentz vector * Add decay length * add rotational background * Add Q vector amplitude information * Fix hnsparse * Modify PID and track sel * Remove fake track from mommentum correlation * Add small centrality for callibration * Update track selection * PID improve for Flow * Add improveddca variable * Improvement track cut * Add occupancy
1 parent 8e814f0 commit 4630ffe

2 files changed

Lines changed: 45 additions & 18 deletions

File tree

PWGLF/Tasks/Resonances/highmasslambda.cxx

Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ struct highmasslambda {
7474
Configurable<std::string> geoPath{"geoPath", "GLO/Config/GeometryAligned", "Path of the geometry file"};
7575

7676
// fill output
77+
Configurable<bool> fillDefault{"fillDefault", true, "fill Occupancy"};
78+
Configurable<bool> fillOccupancy{"fillOccupancy", true, "fill Occupancy"};
7779
Configurable<bool> fillPolarization{"fillPolarization", false, "fill polarization"};
7880
Configurable<bool> fillRotation{"fillRotation", false, "fill rotation"};
7981
// events
@@ -145,6 +147,7 @@ struct highmasslambda {
145147

146148
void init(o2::framework::InitContext&)
147149
{
150+
std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 3000.0, 6000.0, 50000.0};
148151
const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"};
149152
const AxisSpec thnAxisPt{configThnAxisPt, "#it{p}_{T} (GeV/#it{c})"};
150153
const AxisSpec thnAxisCosThetaStar{configThnAxisCosThetaStar, "cos(#vartheta)"};
@@ -161,6 +164,7 @@ struct highmasslambda {
161164
AxisSpec ptProtonAxis = {16, 0.0, 8, "V0M (%)"};
162165
AxisSpec dcaAxis = {100, 0.0, 0.1, "V0M (%)"};
163166
AxisSpec dcatoPVAxis = {50, 0.0, 0.4, "V0M (%)"};
167+
AxisSpec occupancyAxis = {occupancyBinning, "occupancy"};
164168

165169
histos.add("hRejectPID", "hRejectPID", kTH1F, {{2, 0.0f, 2.0f}});
166170
histos.add("hMomCorr", "hMomCorr", kTH3F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}, {8, 0.0f, 80.0f}});
@@ -172,6 +176,7 @@ struct highmasslambda {
172176
histos.add("hFTOCvsTPCSelected", "Mult correlation FT0C vs. TPC after selection", kTH2F, {{80, 0.0f, 80.0f}, {100, -0.5f, 5999.5f}});
173177
histos.add("hCentrality", "Centrality distribution", kTH1F, {{200, 0.0, 200.0}});
174178
histos.add("hVtxZ", "Vertex distribution in Z;Z (cm)", kTH1F, {{400, -20.0, 20.0}});
179+
histos.add("hOccupancy", "Occupancy", kTH1F, {{5000, 0.0, 50000.0}});
175180
histos.add("hEta", "Eta distribution", kTH1F, {{200, -1.0f, 1.0f}});
176181
histos.add("hDcaxy", "Dcaxy distribution", kTH1F, {{1000, -0.5f, 0.5f}});
177182
histos.add("hDcaz", "Dcaz distribution", kTH1F, {{1000, -0.5f, 0.5f}});
@@ -183,13 +188,20 @@ struct highmasslambda {
183188
histos.add("hPsiTPC", "PsiTPC", kTH2F, {centAxis, phiAxis});
184189
histos.add("hPsiTPCR", "PsiTPCR", kTH2F, {centAxis, phiAxis});
185190
histos.add("hPsiTPCL", "PsiTPCL", kTH2F, {centAxis, phiAxis});
186-
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
187-
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
188-
histos.add("hSparseV2SASameEventRotational_V2", "hSparseV2SASameEventRotational_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
189-
histos.add("hSparseV2SASameEvent_V2_new", "hSparseV2SASameEvent_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
190-
histos.add("hSparseV2SAMixedEvent_V2_new", "hSparseV2SAMixedEvent_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
191-
histos.add("hSparseV2SASameEventRotational_V2_new", "hSparseV2SASameEventRotational_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
192-
191+
if (fillDefault) {
192+
histos.add("hSparseV2SASameEvent_V2", "hSparseV2SASameEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
193+
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
194+
histos.add("hSparseV2SASameEventRotational_V2", "hSparseV2SASameEventRotational_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
195+
histos.add("hSparseV2SASameEvent_V2_new", "hSparseV2SASameEvent_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
196+
histos.add("hSparseV2SAMixedEvent_V2_new", "hSparseV2SAMixedEvent_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
197+
histos.add("hSparseV2SASameEventRotational_V2_new", "hSparseV2SASameEventRotational_V2_new", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality});
198+
}
199+
if (fillOccupancy) {
200+
histos.add("hSparseV2SASameEvent_V2_occupancy", "hSparseV2SASameEvent_V2_occupancy", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
201+
histos.add("hSparseV2SASameEventRotational_V2_occupancy", "hSparseV2SASameEventRotational_V2_occupancy", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
202+
histos.add("hSparseV2SASameEvent_V2_new_occupancy", "hSparseV2SASameEvent_V2_new_occupancy", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, thnAxisCentrality, occupancyAxis});
203+
histos.add("hSparseV2SASameEventRotational_V2_new_occupancy", "hSparseV2SASameEventRotational_V2_new_occupancy", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisDecayLength, thnAxisPtProton, occupancyAxis});
204+
}
193205
if (fillPolarization) {
194206
histos.add("hSparseV2SASameEventplus_SA", "hSparseV2SASameEventplus_SA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
195207
histos.add("hSparseV2SASameEventplus_SA_A0", "hSparseV2SASameEventplus_SA_A0", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
@@ -409,6 +421,7 @@ struct highmasslambda {
409421
if (!collision.triggereventep()) {
410422
return;
411423
}
424+
int occupancy = collision.trackOccupancyInTimeRange();
412425
auto psiFT0C = collision.psiFT0C();
413426
auto psiFT0A = collision.psiFT0A();
414427
auto psiTPC = collision.psiTPC();
@@ -429,6 +442,7 @@ struct highmasslambda {
429442
histos.fill(HIST("ResFT0ATPC"), centrality, TMath::Cos(2.0 * (psiTPC - psiFT0A)));
430443
histos.fill(HIST("hCentrality"), centrality);
431444
histos.fill(HIST("hVtxZ"), collision.posZ());
445+
histos.fill(HIST("hOccupancy"), occupancy);
432446
auto firstprimarytrack = 0;
433447
for (auto track1 : tracks) {
434448
if (!selectionTrack(track1)) {
@@ -493,10 +507,14 @@ struct highmasslambda {
493507

494508
auto diffangle = Proton.Phi() - Lambdac.Phi();
495509
auto decaylength = std::abs((track1.dcaXY() / TMath::Sin(diffangle)) / (Lambdac.P() / 2.286));
496-
497-
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, decaylength, Proton.Pt(), centrality);
498-
histos.fill(HIST("hSparseV2SASameEvent_V2_new"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), Proton.Pt(), centrality);
499-
510+
if (fillDefault) {
511+
histos.fill(HIST("hSparseV2SASameEvent_V2"), Lambdac.M(), Lambdac.Pt(), v2, decaylength, Proton.Pt(), centrality);
512+
histos.fill(HIST("hSparseV2SASameEvent_V2_new"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), Proton.Pt(), centrality);
513+
}
514+
if (fillOccupancy) {
515+
histos.fill(HIST("hSparseV2SASameEvent_V2_occupancy"), Lambdac.M(), Lambdac.Pt(), v2, decaylength, Proton.Pt(), centrality, occupancy);
516+
histos.fill(HIST("hSparseV2SASameEvent_V2_new_occupancy"), Lambdac.M(), Lambdac.Pt(), v2, std::abs(track1.dcaXY()), Proton.Pt(), centrality, occupancy);
517+
}
500518
if (fillRotation) {
501519
for (int nrotbkg = 1; nrotbkg < nBkgRotations; nrotbkg++) {
502520
auto anglestep = nrotbkg * (2.0 * TMath::Pi() / nBkgRotations);
@@ -508,8 +526,14 @@ struct highmasslambda {
508526
auto v2Rot = TMath::Cos(2.0 * phiminuspsiRot);
509527
auto diffangleRot = ProtonRot.Phi() - LambdacRot.Phi();
510528
auto decaylengthRot = std::abs((track1.dcaXY() / TMath::Sin(diffangleRot)) / (Lambdac.P() / 2.286));
511-
histos.fill(HIST("hSparseV2SASameEventRotational_V2"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, decaylengthRot, Proton.Pt(), centrality);
512-
histos.fill(HIST("hSparseV2SASameEventRotational_V2_new"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, std::abs(track1.dcaXY()), Proton.Pt(), centrality);
529+
if (fillDefault) {
530+
histos.fill(HIST("hSparseV2SASameEventRotational_V2"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, decaylengthRot, Proton.Pt(), centrality);
531+
histos.fill(HIST("hSparseV2SASameEventRotational_V2_new"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, std::abs(track1.dcaXY()), Proton.Pt(), centrality);
532+
}
533+
if (fillOccupancy) {
534+
histos.fill(HIST("hSparseV2SASameEventRotational_V2_occupancy"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, decaylengthRot, Proton.Pt(), centrality, occupancy);
535+
histos.fill(HIST("hSparseV2SASameEventRotational_V2_new_occupancy"), LambdacRot.M(), LambdacRot.Pt(), v2Rot, std::abs(track1.dcaXY()), Proton.Pt(), centrality, occupancy);
536+
}
513537
}
514538
}
515539
ROOT::Math::Boost boost{Lambdac.BoostToCM()};

PWGLF/Tasks/Resonances/phipbpb.cxx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ struct phipbpb {
143143

144144
void init(o2::framework::InitContext&)
145145
{
146+
std::vector<double> occupancyBinning = {0.0, 500.0, 1000.0, 3000.0, 6000.0, 50000.0};
146147
const AxisSpec thnAxisInvMass{configThnAxisInvMass, "#it{M} (GeV/#it{c}^{2})"};
147148
const AxisSpec thnAxisPt{configThnAxisPt, "#it{p}_{T} (GeV/#it{c})"};
148149
const AxisSpec thnAxisCosThetaStarOP{configThnAxisCosThetaStar, "cos(#vartheta_{OP})"};
@@ -157,6 +158,7 @@ struct phipbpb {
157158
AxisSpec phiAxis = {500, -6.28, 6.28, "phi"};
158159
AxisSpec resAxis = {2000, -10, 10, "Res"};
159160
AxisSpec centAxis = {8, 0, 80, "V0M (%)"};
161+
AxisSpec occupancyAxis = {occupancyBinning, "Occupancy"};
160162

161163
histos.add("hTPCglobalmomcorr", "Momentum correlation", kTH3F, {{200, -10.0f, 10.0f}, {200, -10.0f, 10.0f}, {8, 0.0f, 80.0f}});
162164
histos.add("hpTvsRapidity", "pT vs Rapidity", kTH2F, {{100, 0.0f, 10.0f}, {300, -1.5f, 1.5f}});
@@ -188,8 +190,8 @@ struct phipbpb {
188190
histos.add("hSparseV2SAMixedEvent_costheta_SA", "hSparseV2SAMixedEvent_costheta_SA", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxiscosthetaSA, thnAxisPhiminusPsi, thnAxisCentrality});
189191
histos.add("hSparseV2SAMixedEvent_SA_A0", "hSparseV2SAMixedEvent_SA_A0", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSA, thnAxisPhiminusPsi, thnAxisCentrality});
190192
histos.add("hSparseV2SAMixedEvent_V2", "hSparseV2SAMixedEvent_V2", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisV2, thnAxisCentrality});
191-
histos.add("hSparseV2SASameEvent_SP", "hSparseV2SASameEvent_SP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSP, thnAxisCentrality});
192-
histos.add("hSparseV2SAMixedEvent_SP", "hSparseV2SAMixedEvent_SP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSP, thnAxisCentrality});
193+
histos.add("hSparseV2SASameEvent_SP", "hSparseV2SASameEvent_SP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSP, thnAxisCentrality, occupancyAxis});
194+
histos.add("hSparseV2SAMixedEvent_SP", "hSparseV2SAMixedEvent_SP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisSP, thnAxisCentrality, occupancyAxis});
193195
}
194196
if (fillRapidity) {
195197
histos.add("hSparseV2SASameEvent_costhetastarOP", "hSparseV2SASameEvent_costhetastarOP", HistType::kTHnSparseF, {thnAxisInvMass, thnAxisPt, thnAxisCosThetaStarOP, thnAxisRapidity, thnAxisCentrality});
@@ -425,7 +427,7 @@ struct phipbpb {
425427
auto QTPC = collision.qTPC();
426428
auto QTPCR = collision.qTPCR();
427429
auto QTPCL = collision.qTPCL();
428-
430+
int occupancy = collision.trackOccupancyInTimeRange();
429431
histos.fill(HIST("hFTOCvsTPC"), centrality, multTPC);
430432
if (additionalEvsel && !eventSelected(collision, centrality)) {
431433
return;
@@ -533,7 +535,7 @@ struct phipbpb {
533535
histos.fill(HIST("hSparseV2SASameEvent_SA"), PhiMesonMother.M(), PhiMesonMother.Pt(), SA, phiminuspsi, centrality);
534536
histos.fill(HIST("hSparseV2SASameEvent_SA_A0"), PhiMesonMother.M(), PhiMesonMother.Pt(), SA_A0, phiminuspsi, centrality);
535537
histos.fill(HIST("hSparseV2SASameEvent_V2"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2, centrality);
536-
histos.fill(HIST("hSparseV2SASameEvent_SP"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality);
538+
histos.fill(HIST("hSparseV2SASameEvent_SP"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality, occupancy);
537539
}
538540

539541
if (fillRapidity) {
@@ -565,6 +567,7 @@ struct phipbpb {
565567
// printf("Mix = %d\n", 3);
566568
continue;
567569
}
570+
int occupancy = collision1.trackOccupancyInTimeRange();
568571
auto posThisColl = posTracks->sliceByCached(aod::track::collisionId, collision1.globalIndex(), cache);
569572
auto negThisColl = negTracks->sliceByCached(aod::track::collisionId, collision2.globalIndex(), cache);
570573
auto centrality = collision1.centFT0C();
@@ -634,7 +637,7 @@ struct phipbpb {
634637
histos.fill(HIST("hSparseV2SAMixedEvent_SA"), PhiMesonMother.M(), PhiMesonMother.Pt(), SA, phiminuspsi, centrality);
635638
histos.fill(HIST("hSparseV2SAMixedEvent_SA_A0"), PhiMesonMother.M(), PhiMesonMother.Pt(), SA_A0, phiminuspsi, centrality);
636639
histos.fill(HIST("hSparseV2SAMixedEvent_V2"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2, centrality);
637-
histos.fill(HIST("hSparseV2SAMixedEvent_SP"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality);
640+
histos.fill(HIST("hSparseV2SAMixedEvent_SP"), PhiMesonMother.M(), PhiMesonMother.Pt(), v2 * QFT0C, centrality, occupancy);
638641
}
639642
if (fillRapidity) {
640643
histos.fill(HIST("hSparseV2SAMixedEvent_costhetastarOP"), PhiMesonMother.M(), PhiMesonMother.Pt(), cosThetaStarOP, TMath::Abs(PhiMesonMother.Rapidity()), centrality);

0 commit comments

Comments
 (0)