Skip to content

Commit b2ccedd

Browse files
authored
[PWGLF] adding qa for event reduction (#10088)
1 parent 3e2af9d commit b2ccedd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

PWGLF/Tasks/Strangeness/lambdalambda.cxx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,17 @@ struct lambdalambda {
147147

148148
TRandom* rn = new TRandom();
149149

150+
bool IsTriggered;
151+
bool IsSelected;
152+
150153
void init(o2::framework::InitContext&)
151154
{
152155
AxisSpec centQaAxis = {80, 0.0, 80.0};
153156
AxisSpec PVzQaAxis = {300, -15.0, 15.0};
154157
AxisSpec combAxis = {3, -0.5, 2.5};
155158

159+
histos.add("hEventstat", "", {HistType::kTH1F, {{4, 0, 4}}});
160+
156161
histos.add("Radius_V0V0_full", "", {HistType::kTHnSparseF, {massAxis, ptAxis, RadiusAxis, combAxis}});
157162
histos.add("CPA_V0V0_full", "", {HistType::kTHnSparseF, {massAxis, ptAxis, CPAAxis, combAxis}});
158163
histos.add("Distance_V0V0_full", "", {HistType::kTHnSparseF, {massAxis, ptAxis, DistanceAxis, combAxis}});
@@ -349,6 +354,9 @@ struct lambdalambda {
349354
template <typename C1, typename C2, typename V01, typename V02>
350355
void FillHistograms(C1 const& c1, C2 const& c2, V01 const& V01s, V02 const& V02s)
351356
{
357+
IsTriggered = false;
358+
IsSelected = false;
359+
352360
for (auto& v01 : V01s) {
353361
auto postrack_v01 = v01.template posTrack_as<TrackCandidates>();
354362
auto negtrack_v01 = v01.template negTrack_as<TrackCandidates>();
@@ -426,6 +434,7 @@ struct lambdalambda {
426434

427435
if (std::abs(RecoV0V0.Rapidity()) > cfgV0V0RapMax)
428436
continue;
437+
IsTriggered = true;
429438

430439
histos.fill(HIST("Radius_V0V0_full"), RecoV0V0.M(), RecoV0V0.Pt(), getRadius(v01, v02), V01Tag + V02Tag);
431440
histos.fill(HIST("CPA_V0V0_full"), RecoV0V0.M(), RecoV0V0.Pt(), getCPA(v01, v02), V01Tag + V02Tag);
@@ -437,6 +446,7 @@ struct lambdalambda {
437446
histos.fill(HIST("CPA_V0V0_sel"), RecoV0V0.M(), RecoV0V0.Pt(), getCPA(v01, v02), V01Tag + V02Tag);
438447
histos.fill(HIST("Distance_V0V0_sel"), RecoV0V0.M(), RecoV0V0.Pt(), getDistance(v01, v02), V01Tag + V02Tag);
439448
histos.fill(HIST("DCA_V0V0_sel"), RecoV0V0.M(), RecoV0V0.Pt(), getDCAofV0V0(v01, v02), V01Tag + V02Tag);
449+
IsSelected = true;
440450
}
441451

442452
if (doprocessDataSame) {
@@ -476,9 +486,11 @@ struct lambdalambda {
476486
} else if (cfgCentEst == 2) {
477487
centrality = collision.centFT0M();
478488
}
489+
histos.fill(HIST("hEventstat"), 0.5);
479490
if (!eventSelected(collision)) {
480491
return;
481492
}
493+
histos.fill(HIST("hEventstat"), 1.5);
482494

483495
histos.fill(HIST("QA/CentDist"), centrality, 1.0);
484496
histos.fill(HIST("QA/PVzDist"), collision.posZ(), 1.0);
@@ -488,6 +500,11 @@ struct lambdalambda {
488500
EffMap = ccdb->getForTimeStamp<TProfile2D>(cfgEffCorPath.value, bc.timestamp());
489501
}
490502
FillHistograms(collision, collision, V0s, V0s);
503+
504+
if (IsTriggered)
505+
histos.fill(HIST("hEventstat"), 2.5);
506+
if (IsSelected)
507+
histos.fill(HIST("hEventstat"), 3.5);
491508
}
492509
PROCESS_SWITCH(lambdalambda, processDataSame, "Process Event for same data", true);
493510

0 commit comments

Comments
 (0)