Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please consider the following formatting changes to #12566 #18

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions Detectors/GlobalTracking/include/GlobalTracking/MatchITSTPCQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class MatchITSTPCQC
bool init();
void initDataRequest();
void run(o2::framework::ProcessingContext& ctx);
void setDataRequest(std::shared_ptr<o2::globaltracking::DataRequest> dr) { mDataRequest = dr; }
void setDataRequest(const std::shared_ptr<o2::globaltracking::DataRequest>& dr) { mDataRequest = dr; }
void finalize();
void reset();

Expand Down Expand Up @@ -87,6 +87,14 @@ class MatchITSTPCQC
TH2F* getHistoEtaVsPtDen(matchType m) const { return mEtaVsPtDen[m]; }
TEfficiency* getFractionITSTPCmatchEtaVsPt(matchType m) const { return mFractionITSTPCmatchEtaVsPt[m]; }

TH2F* getHistoClsVsPtNum(matchType m) const { return mClsVsPtNum[m]; }
TH2F* getHistoClsVsPtDen(matchType m) const { return mClsVsPtDen[m]; }
TEfficiency* getFractionITSTPCmatchClsVsPt(matchType m) const { return mFractionITSTPCmatchClsVsPt[m]; }

TH2F* getHistoChi2VsPtNum(matchType m) const { return mChi2VsPtNum[m]; }
TH2F* getHistoChi2VsPtDen(matchType m) const { return mChi2VsPtDen[m]; }
TEfficiency* getFractionITSTPCmatchChi2VsPt(matchType m) const { return mFractionITSTPCmatchChi2VsPt[m]; }

TH1F* getHistoPtPhysPrimNum(matchType m) const { return mPtPhysPrimNum[m]; }
TH1F* getHistoPtPhysPrimDen(matchType m) const { return mPtPhysPrimDen[m]; }
TEfficiency* getFractionITSTPCmatchPhysPrim(matchType m) const { return mFractionITSTPCmatchPhysPrim[m]; }
Expand All @@ -107,6 +115,7 @@ class MatchITSTPCQC
TH1F* getHistoChi2Refit() const { return mChi2Refit; }
TH2F* getHistoTimeResVsPt() const { return mTimeResVsPt; }
TH1F* getHistoDCAr() const { return mDCAr; }
TH2F* getHistoDCArVsPt() const { return mDCArVsPt; }

TH1D* getHisto1OverPtNum(matchType m) const { return m1OverPtNum[m]; }
TH1D* getHisto1OverPtDen(matchType m) const { return m1OverPtDen[m]; }
Expand All @@ -122,7 +131,7 @@ class MatchITSTPCQC
/// \tparam T type of the publisher
/// \param publisher the publisher e.g. getObjectsManager()
template <typename T>
void publishHistograms(std::shared_ptr<T> publisher)
void publishHistograms(const std::shared_ptr<T>& publisher)
{
for (int i = 0; i < matchType::SIZE; ++i) {
publisher->startPublishing(mPtNum[i]);
Expand Down Expand Up @@ -178,6 +187,14 @@ class MatchITSTPCQC
publisher->startPublishing(mEtaVsPtDen[i]);
publisher->startPublishing(mFractionITSTPCmatchEtaVsPt[i]);

publisher->startPublishing(mClsVsPtNum[i]);
publisher->startPublishing(mClsVsPtDen[i]);
publisher->startPublishing(mFractionITSTPCmatchClsVsPt[i]);

publisher->startPublishing(mChi2VsPtNum[i]);
publisher->startPublishing(mChi2VsPtDen[i]);
publisher->startPublishing(mFractionITSTPCmatchChi2VsPt[i]);

publisher->startPublishing(m1OverPtNum[i]);
publisher->startPublishing(m1OverPtDen[i]);
publisher->startPublishing(mFractionITSTPCmatch1OverPt[i]);
Expand All @@ -193,6 +210,7 @@ class MatchITSTPCQC
publisher->startPublishing(mResidualPhi);
publisher->startPublishing(mResidualEta);
publisher->startPublishing(mDCAr);
publisher->startPublishing(mDCArVsPt);
}

void setSources(GID::mask_t src) { mSrc = src; }
Expand Down Expand Up @@ -288,6 +306,14 @@ class MatchITSTPCQC
TH2F* mEtaVsPtNum[matchType::SIZE] = {};
TH2F* mEtaVsPtDen[matchType::SIZE] = {};
TEfficiency* mFractionITSTPCmatchEtaVsPt[matchType::SIZE] = {};
// Clusters
TH2F* mClsVsPtNum[matchType::SIZE] = {};
TH2F* mClsVsPtDen[matchType::SIZE] = {};
TEfficiency* mFractionITSTPCmatchClsVsPt[matchType::SIZE] = {};
// Chi2
TH2F* mChi2VsPtNum[matchType::SIZE] = {};
TH2F* mChi2VsPtDen[matchType::SIZE] = {};
TEfficiency* mFractionITSTPCmatchChi2VsPt[matchType::SIZE] = {};
// Eta split per PID hypothesis in tracking
TH1D* mEtaNumVsTrkPID[matchType::SIZE][track::PID::NIDs] = {};
TH1D* mEtaDenVsTrkPID[matchType::SIZE][track::PID::NIDs] = {};
Expand All @@ -301,6 +327,7 @@ class MatchITSTPCQC
TH1F* mChi2Refit = nullptr;
TH2F* mTimeResVsPt = nullptr;
TH1F* mDCAr = nullptr;
TH2F* mDCArVsPt = nullptr;
// 1/Pt
TH1D* m1OverPtNum[matchType::SIZE] = {};
TH1D* m1OverPtDen[matchType::SIZE] = {};
Expand Down
130 changes: 117 additions & 13 deletions Detectors/GlobalTracking/src/MatchITSTPCQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@ void MatchITSTPCQC::deleteHistograms()
delete mEtaVsPtDen[i];
delete mFractionITSTPCmatchEtaVsPt[i];

// Clusters
delete mClsVsPtNum[i];
delete mClsVsPtDen[i];
delete mFractionITSTPCmatchClsVsPt[i];

// Chi2
delete mChi2VsPtNum[i];
delete mChi2VsPtDen[i];
delete mFractionITSTPCmatchChi2VsPt[i];

if (mUseTrkPID) { // Vs Tracking PID hypothesis
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
// Pt
Expand Down Expand Up @@ -105,6 +115,7 @@ void MatchITSTPCQC::deleteHistograms()
delete mChi2Refit;
delete mTimeResVsPt;
delete mDCAr;
delete mDCArVsPt;
}

//__________________________________________________________
Expand Down Expand Up @@ -136,6 +147,14 @@ void MatchITSTPCQC::reset()
mEtaVsPtNum[i]->Reset();
mEtaVsPtDen[i]->Reset();

// Clusters
mClsVsPtNum[i]->Reset();
mClsVsPtDen[i]->Reset();

// Chi2
mChi2VsPtNum[i]->Reset();
mChi2VsPtDen[i]->Reset();

if (mUseTrkPID) { // Vs Tracking PID hypothesis
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
// Pt
Expand Down Expand Up @@ -164,6 +183,7 @@ void MatchITSTPCQC::reset()
mChi2Refit->Reset();
mTimeResVsPt->Reset();
mDCAr->Reset();
mDCArVsPt->Reset();
}

//__________________________________________________________
Expand All @@ -172,6 +192,7 @@ bool MatchITSTPCQC::init()

std::array<std::string, 2> title{"TPC", "ITS"};
std::array<std::string, 2> etaSel{"", ", |eta| < 0.9"};
std::array<int, 2> maxNCls{156, 7};
for (int i = 0; i < matchType::SIZE; ++i) {
// Pt
mPtNum[i] = new TH1D(Form("mPtNum_%s", title[i].c_str()), Form("Pt distribution of ITSTPC matched tracks, wrt %s tracks %s; Pt [GeV/c]; dNdPt", title[i].c_str(), etaSel[i].c_str()), 100, 0.f, 20.f);
Expand All @@ -191,9 +212,17 @@ bool MatchITSTPCQC::init()
mEtaNum[i] = new TH1F(Form("mEtaNum_%s", title[i].c_str()), Form("Eta distribution of ITSTPC matched tracks, wrt %s tracks; Eta; dNdEta", title[i].c_str()), 100, -2.f, 2.f);
mEtaDen[i] = new TH1F(Form("mEtaDen_%s", title[i].c_str()), Form("Eta distribution of %s tracks; Eta; dNdEta", title[i].c_str()), 100, -2.f, 2.f);
mFractionITSTPCmatchEta[i] = new TEfficiency(Form("mFractionITSTPCmatchEta_%s", title[i].c_str()), Form("Fraction of ITSTPC matched tracks , wrt %s tracks, vs Eta; Eta; Eff", title[i].c_str()), 100, -2.f, 2.f);
mEtaVsPtNum[i] = new TH2F(Form("mEtaVsPtNum_%s", title[i].c_str()), Form("Eta vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; #it{p}_{T} [GeV#it{c}]; Eta", title[i].c_str()), 100, 0.f, 20.f, 100, -2.f, 2.f);
mEtaVsPtDen[i] = new TH2F(Form("mEtaVsPtDen_%s", title[i].c_str()), Form("Eta vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; #it{p}_{T} [GeV#it{c}]; Eta", title[i].c_str()), 100, 0.f, 20.f, 100, -2.f, 2.f);
mEtaVsPtNum[i] = new TH2F(Form("mEtaVsPtNum_%s", title[i].c_str()), Form("Eta vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; Eta", title[i].c_str()), 100, 0.f, 20.f, 100, -2.f, 2.f);
mEtaVsPtDen[i] = new TH2F(Form("mEtaVsPtDen_%s", title[i].c_str()), Form("Eta vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; Eta", title[i].c_str()), 100, 0.f, 20.f, 100, -2.f, 2.f);
mFractionITSTPCmatchEtaVsPt[i] = new TEfficiency(Form("mFractionITSTPCmatchEtaVsPt_%s", title[i].c_str()), Form("Fraction of ITSTPC matched tracks, wrt %s tracks, Eta vs Pt; #it{p}_{T} [GeV#it{c}]; Eta; Eff", title[i].c_str()), 100, 0.f, 20.f, 100, -2.f, 2.f);
// Clusters
mClsVsPtNum[i] = new TH2F(Form("mClsVsPtNum_%s", title[i].c_str()), Form("#Clusters vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; #Clusters", title[i].c_str()), 100, 0.f, 20.f, maxNCls[i], 0, maxNCls[i]);
mClsVsPtDen[i] = new TH2F(Form("mClsVsPtDen_%s", title[i].c_str()), Form("#Clusters vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; #Clusters", title[i].c_str()), 100, 0.f, 20.f, maxNCls[i], 0, maxNCls[i]);
mFractionITSTPCmatchClsVsPt[i] = new TEfficiency(Form("mFractionITSTPCmatchClsVsPt_%s", title[i].c_str()), Form("Fraction of ITSTPC matched tracks, wrt %s tracks, #Clusters vs Pt; #it{p}_{T} [GeV#it{c}]; #Clusters; Eff", title[i].c_str()), 100, 0.f, 20.f, maxNCls[i], 0, maxNCls[i]);
// Chi2
mChi2VsPtNum[i] = new TH2F(Form("mChi2VsPtNum_%s", title[i].c_str()), Form("Chi2 vs Pt distribution of ITSTPC matched tracks, wrt %s tracks; #it{p}_{T} [GeV#it{c}]; Chi2", title[i].c_str()), 100, 0.f, 20.f, 200, 0, 300);
mChi2VsPtDen[i] = new TH2F(Form("mChi2VsPtDen_%s", title[i].c_str()), Form("Chi2 vs Pt distribution of %s tracks; #it{p}_{T} [GeV#it{c}]; Chi2", title[i].c_str()), 100, 0.f, 20.f, 200, 0, 300);
mFractionITSTPCmatchChi2VsPt[i] = new TEfficiency(Form("mFractionITSTPCmatchChi2VsPt_%s", title[i].c_str()), Form("Fraction of ITSTPC matched tracks, wrt %s tracks, Chi2 vs Pt; #it{p}_{T} [GeV#it{c}]; Chi2; Eff", title[i].c_str()), 100, 0.f, 20.f, 200, 0, 300);
if (mUseTrkPID) { // Vs Tracking PID hypothesis
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
// Pt
Expand Down Expand Up @@ -231,6 +260,7 @@ bool MatchITSTPCQC::init()
mChi2Matching = new TH1F("mChi2Matching", "Chi2 of matching; chi2", 200, 0, 300);
mChi2Refit = new TH1F("mChi2Refit", "Chi2 of refit; chi2", 200, 0, 300);
mDCAr = new TH1F("mDCAr", "DCA of TPC tracks; DCAr", 200, -100, 100);
mDCArVsPt = new TH2F("mDCArVsPt", "DCA of TPC tracks Vs Pt; #it{p}_{T} [GeV/c]; DCAr", 100, 0, 20., 200, -100, 100);

// log binning for pT
const Int_t nbinsPt = 100;
Expand Down Expand Up @@ -279,6 +309,14 @@ bool MatchITSTPCQC::init()
mEtaVsPtNum[i]->Sumw2();
mEtaVsPtDen[i]->Sumw2();

// Clusters
mClsVsPtNum[i]->Sumw2();
mClsVsPtDen[i]->Sumw2();

// Chi2
mChi2VsPtNum[i]->Sumw2();
mChi2VsPtDen[i]->Sumw2();

if (mUseTrkPID) { // Vs Tracking PID hypothesis
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
// Pt
Expand Down Expand Up @@ -507,6 +545,19 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
// we fill also the denominator
mEtaDen[i]->Fill(trkDen.getEta());
mEtaVsPtDen[i]->Fill(trkDen.getPt(), trkDen.getEta());
if (i == matchType::TPC) {
const auto& tpcTrk = mTPCTracks[trk.getRefTPC()];
mClsVsPtNum[i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
mChi2VsPtNum[i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
mClsVsPtDen[i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
mChi2VsPtDen[i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
} else {
const auto& itsTrk = mITSTracks[trk.getRefITS()];
mClsVsPtNum[i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
mChi2VsPtNum[i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
mClsVsPtDen[i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
mChi2VsPtDen[i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
}
if (mUseTrkPID) { // Vs Tracking PID hypothesis
mEtaNumVsTrkPID[i][trkDen.getPID()]->Fill(trkDen.getEta());
// we fill also the denominator
Expand Down Expand Up @@ -594,6 +645,15 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
mEtaNumVsTrkPID[i][trkRef.getPID()]->Fill(trkRef.getEta());
}
mEtaVsPtNum[i]->Fill(trkRef.getPt(), trkRef.getEta());
if (i == matchType::TPC) {
const auto& tpcTrk = mTPCTracks[trk.getRefTPC()];
mClsVsPtNum[i]->Fill(tpcTrk.getPt(), tpcTrk.getNClusters());
mChi2VsPtNum[i]->Fill(tpcTrk.getPt(), tpcTrk.getChi2());
} else {
const auto& itsTrk = mITSTracks[trk.getRefITS()];
mClsVsPtNum[i]->Fill(itsTrk.getPt(), itsTrk.getNClusters());
mChi2VsPtNum[i]->Fill(itsTrk.getPt(), itsTrk.getChi2());
}
}
if (i == matchType::TPC) {
mResidualPt->Fill(trk.getPt(), trk.getPt() - trkRef.getPt());
Expand All @@ -606,6 +666,7 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
std::array<float, 2> dca;
if (trkRef.propagateParamToDCA(v, mBz, &dca)) {
mDCAr->Fill(dca[0]);
mDCArVsPt->Fill(trk.getPt(), dca[0]);
}
LOG(debug) << "*** chi2Matching = " << trk.getChi2Match() << ", chi2refit = " << trk.getChi2Refit() << ", timeResolution = " << trk.getTimeMUS().getTimeStampError();
}
Expand Down Expand Up @@ -699,6 +760,8 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
mEtaDen[matchType::TPC]->Fill(trk.getEta());
mEtaVsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getEta());
m1OverPtDen[matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
mClsVsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
mChi2VsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getChi2());
if (el.second.mIsPhysicalPrimary) {
mPtPhysPrimDen[matchType::TPC]->Fill(trk.getPt());
mPhiPhysPrimDen[matchType::TPC]->Fill(trk.getPhi());
Expand All @@ -720,6 +783,8 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
}
mEtaDen[matchType::ITS]->Fill(trk.getEta());
mEtaVsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getEta());
mClsVsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
mChi2VsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getChi2());
if (el.second.mIsPhysicalPrimary) {
if (std::abs(trk.getEta()) < 0.9) {
mPtPhysPrimDen[matchType::ITS]->Fill(trk.getPt());
Expand Down Expand Up @@ -747,6 +812,8 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
mEtaDen[matchType::TPC]->Fill(trk.getEta());
mEtaVsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getEta());
m1OverPtDen[matchType::TPC]->Fill(trk.getSign() * trk.getPtInv());
mClsVsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getNClusters());
mChi2VsPtDen[matchType::TPC]->Fill(trk.getPt(), trk.getChi2());
++mNTPCSelectedTracks;
}
}
Expand All @@ -768,6 +835,8 @@ void MatchITSTPCQC::run(o2::framework::ProcessingContext& ctx)
}
mEtaDen[matchType::ITS]->Fill(trk.getEta());
mEtaVsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getEta());
mClsVsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getNClusters());
mChi2VsPtDen[matchType::ITS]->Fill(trk.getPt(), trk.getChi2());
++mNITSSelectedTracks;
} else {
LOG(debug) << "Not filling for this track (ITS) " << itrk << " with pt = " << trk.getPt();
Expand All @@ -793,7 +862,7 @@ bool MatchITSTPCQC::selectTrack(o2::tpc::TrackTPC const& track)
}

math_utils::Point3D<float> v{};
std::array<float, 2> dca;
std::array<float, 2> dca{};
if (!(const_cast<o2::tpc::TrackTPC&>(track).propagateParamToDCA(v, mBz, &dca, mDCATPCCut)) || std::abs(dca[0]) > mDCATPCCutY) {
return false;
}
Expand Down Expand Up @@ -841,6 +910,8 @@ void MatchITSTPCQC::finalize()
setEfficiency(mFractionITSTPCmatchPhiVsPt[ti], mPhiVsPtNum[ti], mPhiVsPtDen[ti], true);
setEfficiency(mFractionITSTPCmatchEtaVsPt[ti], mEtaVsPtNum[ti], mEtaVsPtDen[ti], true);
setEfficiency(mFractionITSTPCmatch1OverPt[ti], m1OverPtNum[ti], m1OverPtDen[ti]);
setEfficiency(mFractionITSTPCmatchClsVsPt[ti], mClsVsPtNum[ti], mClsVsPtDen[ti], true);
setEfficiency(mFractionITSTPCmatchChi2VsPt[ti], mChi2VsPtNum[ti], mChi2VsPtDen[ti], true);
if (mUseTrkPID) { // Vs Tracking PID hypothesis
for (int j = 0; j < o2::track::PID::NIDs; ++j) {
setEfficiency(mFractionITSTPCmatchPtVsTrkPID[ti][j], mPtNumVsTrkPID[ti][j], mPtDenVsTrkPID[ti][j]);
Expand Down Expand Up @@ -877,26 +948,50 @@ void MatchITSTPCQC::finalize()

void MatchITSTPCQC::setEfficiency(TEfficiency* eff, TH1* hnum, TH1* hden, bool is2D)
{
if (!eff) {
if (eff == nullptr) {
LOG(fatal) << "Cannot get TEfficiency object ";
}
if (!hnum) {
if (hnum == nullptr) {
LOG(fatal) << "Cannot get numerator histogram for TEfficiency object " << eff->GetName();
}
if (!hden) {
if (hden == nullptr) {
LOG(fatal) << "Cannot get denominator histogram for TEfficiency object " << eff->GetName();
}
LOG(info) << "Setting efficiency " << eff->GetName() << " from " << hnum->GetName() << " and " << hden->GetName();

// we need to force to replace the total histogram, otherwise it will compare it to the previous passed one, and it might get an error of inconsistency in the bin contents
if constexpr (0) { // checking
LOG(info) << "Num " << hnum->GetName() << " " << hnum->GetNbinsX() << " " << hnum->GetNbinsY();
LOG(info) << "Den " << hden->GetName() << " " << hden->GetNbinsX() << " " << hden->GetNbinsY();
for (int i = 1; i <= hden->GetNbinsX(); i++) {
if (hden->GetBinContent(i) < hnum->GetBinContent(i)) {
LOG(warning) << "bin " << i << " den: " << hden->GetBinContent(i) << " < num: " << hnum->GetBinContent(i) << " should be the opposite";
if constexpr (false) { // checking
bool bad{false};
LOG(info) << "Setting efficiency " << eff->GetName() << " from " << hnum->GetName() << " and " << hden->GetName();
LOG(info) << "Num " << hnum->GetName() << " " << hnum->GetNbinsX() << " " << hnum->GetNbinsY() << " with " << hnum->GetEntries() << " entries";
LOG(info) << "Den " << hden->GetName() << " " << hden->GetNbinsX() << " " << hden->GetNbinsY() << " with " << hden->GetEntries() << " entries";
if (hnum->GetDimension() != hden->GetDimension()) {
LOGP(warning, "Histograms have different dimensions (num={} to den={})", hnum->GetDimension(), hden->GetDimension());
bad = true;
}
if (!TEfficiency::CheckBinning(*hnum, *hden)) {
LOGP(warning, "Histograms do not have a compatible binning");
bad = true;
}
if (!is2D) {
for (int i = 1; i <= hden->GetNbinsX(); i++) {
if (hden->GetBinContent(i) < hnum->GetBinContent(i)) {
LOG(warning) << "bin " << i << " den: " << hden->GetBinContent(i) << " < num: " << hnum->GetBinContent(i) << " should be the opposite";
bad = true;
}
}
} else {
for (int i = 1; i <= hden->GetNbinsX(); i++) {
for (int j = 1; j <= hden->GetNbinsY(); j++) {
if (hden->GetBinContent(i, j) < hnum->GetBinContent(i, j)) {
LOGP(warning, "bin {}/{} -> den: {} < num: {}", i, j, hden->GetBinContent(i, j), hnum->GetBinContent(i, j));
bad = true;
}
}
}
}
if (bad) {
return;
}
}
// we need to force to replace the total histogram, otherwise it will compare it to the previous passed one, and it might get an error of inconsistency in the bin contents
if (!eff->SetTotalHistogram(*hden, "f")) {
Expand Down Expand Up @@ -971,6 +1066,14 @@ void MatchITSTPCQC::getHistos(TObjArray& objar)
objar.Add(mEtaVsPtDen[i]);
objar.Add(mFractionITSTPCmatchEtaVsPt[i]);

objar.Add(mClsVsPtNum[i]);
objar.Add(mClsVsPtDen[i]);
objar.Add(mFractionITSTPCmatchClsVsPt[i]);

objar.Add(mChi2VsPtNum[i]);
objar.Add(mChi2VsPtDen[i]);
objar.Add(mFractionITSTPCmatchChi2VsPt[i]);

objar.Add(m1OverPtNum[i]);
objar.Add(m1OverPtDen[i]);
objar.Add(mFractionITSTPCmatch1OverPt[i]);
Expand All @@ -986,4 +1089,5 @@ void MatchITSTPCQC::getHistos(TObjArray& objar)
objar.Add(mResidualPhi);
objar.Add(mResidualEta);
objar.Add(mDCAr);
objar.Add(mDCArVsPt);
}
Loading