Skip to content

Commit c35f62d

Browse files
committed
GLO: K0s optionally separating mass in low Occ and low pt and high
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 38c5429 commit c35f62d

File tree

5 files changed

+40
-3
lines changed

5 files changed

+40
-3
lines changed

Modules/GLO/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Documents the available task in the module and their parameters.
3131
- `cutK0Mass=0.05f` cut around K0s peak
3232
- `trackSourcesK0` SVertexer input sources
3333
- `publishK0s3D=false` publish 3D cycle,integral histograms
34+
- `splitK0sMassOccupancy=float` splitting point in TPC occupancy to define low and high region by default off
35+
- `splitK0sMassPt=float` splitting point in pt to define low and high region by default off
3436
+ K0Fitter options
3537
#### ITS-PV
3638
- `doPVITSQC=false` produce ITS vs PV plots

Modules/GLO/glo-itstpc-mtch-qcmn-test.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@
7676
"mFractionITSTPCmatch_ITS_Hist",
7777
"mFractionITSTPCmatchPhi_ITS_Hist",
7878
"mFractionITSTPCmatchEta_ITS_Hist",
79+
"mK0sMassVsPtVsOcc_Integral_pmass",
7980
"mK0sMassVsPtVsOcc_Cycle_pmass",
80-
"mK0sMassVsPtVsOcc_Integral_pmass"
81+
"mK0sMassVsPtVsOcc_Cycle_pmass_lowOcc",
82+
"mK0sMassVsPtVsOcc_Cycle_pmass_lowPt",
83+
"mK0sMassVsPtVsOcc_Cycle_pmass_highOcc",
84+
"mK0sMassVsPtVsOcc_Cycle_pmass_highPt"
8185
]
8286
}
8387
],

Modules/GLO/include/GLO/ITSTPCMatchingTask.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <CommonConstants/PhysicsConstants.h>
2727

2828
#include <memory>
29+
#include <limits>
2930

3031
#include <TH2F.h>
3132
#include <TH3F.h>
@@ -49,6 +50,9 @@ class ITSTPCMatchingTask final : public TaskInterface
4950
void reset() override;
5051

5152
private:
53+
template <typename T>
54+
static constexpr T OptValue = std::numeric_limits<T>::max();
55+
5256
o2::gloqc::MatchITSTPCQC mMatchITSTPCQC;
5357

5458
bool mIsSync{ false };
@@ -61,6 +65,8 @@ class ITSTPCMatchingTask final : public TaskInterface
6165

6266
bool mDoK0s{ false };
6367
bool mPublishK0s3D{ false };
68+
float mSplitTPCOccupancy{ OptValue<float> };
69+
float mSplitPt{ OptValue<float> };
6470
std::unique_ptr<TH3F> mK0sCycle;
6571
std::unique_ptr<TH3F> mK0sIntegral;
6672
helpers::K0sFitter mK0sFitter;

Modules/GLO/src/ITSTPCMatchingTask.cxx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ void ITSTPCMatchingTask::initialize(o2::framework::InitContext& /*ctx*/)
6767
}
6868

6969
mPublishK0s3D = getFromConfig(mCustomParameters, "publishK0s3D", false);
70+
mSplitTPCOccupancy = getFromConfig(mCustomParameters, "splitK0sMassOccupancy", mSplitTPCOccupancy);
71+
mSplitPt = getFromConfig(mCustomParameters, "splitK0sMassPt", mSplitPt);
7072
mK0sFitter.init(mCustomParameters);
7173
}
7274
// PV
@@ -203,6 +205,19 @@ void ITSTPCMatchingTask::endOfCycle()
203205

204206
TH1D* h{ nullptr };
205207
getObjectsManager()->startPublishing((h = mK0sCycle->ProjectionY("mK0sMassVsPtVsOcc_Cycle_pmass")), PublicationPolicy::Once);
208+
209+
if (mSplitTPCOccupancy != OptValue<float>) {
210+
auto splitOccBin = mK0sCycle->GetZaxis()->FindBin(mSplitTPCOccupancy);
211+
getObjectsManager()->startPublishing(mK0sCycle->ProjectionY("mK0sMassVsPtVsOcc_Cycle_pmass_lowOcc", 0, -1, 0, splitOccBin - 1), PublicationPolicy::Once);
212+
getObjectsManager()->startPublishing(mK0sCycle->ProjectionY("mK0sMassVsPtVsOcc_Cycle_pmass_highOcc", 0, -1, splitOccBin), PublicationPolicy::Once);
213+
}
214+
215+
if (mSplitPt != OptValue<float>) {
216+
auto splitPtBin = mK0sCycle->GetXaxis()->FindBin(mSplitPt);
217+
getObjectsManager()->startPublishing(mK0sCycle->ProjectionY("mK0sMassVsPtVsOcc_Cycle_pmass_lowPt", 0, splitPtBin - 1), PublicationPolicy::Once);
218+
getObjectsManager()->startPublishing(mK0sCycle->ProjectionY("mK0sMassVsPtVsOcc_Cycle_pmass_highPt", splitPtBin), PublicationPolicy::Once);
219+
}
220+
206221
if (mK0sFitter.fit(h)) {
207222
if (mDoPVITS && mPVITSCycle->GetEntries() != 0) {
208223
mK0sFitter.mSignalAndBackground->SetParameter(helpers::K0sFitter::Parameters::Pol0, mPVITSCycle->GetEntries());

Modules/GLO/src/ITSTPCmatchingCheck.cxx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,15 +481,25 @@ void ITSTPCmatchingCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality ch
481481
msg->AddText("Not-handled Quality flag, don't panic...");
482482
}
483483
eff->GetListOfFunctions()->Add(msg);
484-
} else if (mShowK0s && (name == "mK0sMassVsPtVsOcc_Cycle_pmass" || name == "mK0sMassVsPtVsOcc_Integral_pmass")) {
484+
} else if (mShowK0s && (name.starts_with("mK0sMassVsPtVsOcc_Cycle_pmass") || name.starts_with("mK0sMassVsPtVsOcc_Integral_pmass"))) {
485485
auto* h = dynamic_cast<TH1*>(mo->getObject());
486486
if (!h) {
487487
ILOG(Error) << "Failed cast for " << name << " beautify!" << ENDM;
488488
return;
489489
}
490490
auto isCycle = name.find("Cycle") != std::string::npos;
491+
auto isHigh = name.find("high") != std::string::npos;
492+
auto isLow = name.find("low") != std::string::npos;
493+
auto isOcc = name.ends_with("Occ");
494+
auto isPt = name.ends_with("Pt");
491495
auto msg = new TPaveText(0.6, 0.6, 0.88, 0.88, "NDC;NB");
492-
h->SetTitle(Form("K0s invariant mass (integrated over #it{p}_{T} and occupancy, %s);K0s mass (GeV/c^{2});entries", (isCycle) ? "current cycle" : "integrated"));
496+
if (!isLow && !isHigh) {
497+
h->SetTitle(Form("K0s invariant mass (integrated over #it{p}_{T} and occupancy, %s);K0s mass (GeV/c^{2});entries", (isCycle) ? "last cycle" : "integrated"));
498+
} else {
499+
h->SetTitle(Form("K0s invariant mass (integrated over%s#it{p}_{T} and%soccupancy, last cycle);K0s mass (GeV/c^{2});entries",
500+
(isPt) ? ((isLow) ? " low " : " high ") : " ",
501+
(isOcc) ? ((isLow) ? " low " : " high ") : " "));
502+
}
493503
if (!mK0sFitter.fit(h, true)) {
494504
msg->AddText("Fit: Failed");
495505
msg->SetFillColor(kRed);

0 commit comments

Comments
 (0)