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 #13552 #94

Closed
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
12 changes: 4 additions & 8 deletions DataFormats/Detectors/GlobalTracking/src/RecoContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -833,13 +833,11 @@ void RecoContainer::addSVertices(ProcessingContext& pc, bool)
//____________________________________________________________
void RecoContainer::addPVertices(ProcessingContext& pc, bool mc)
{
if (!pvtxPool.isLoaded(PVTX)) { // in case was loaded via addPVerticesTMP
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
}
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackIndex>>("pvtx_trmtc"), PVTX_TRMTC);
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackRef>>("pvtx_tref"), PVTX_TRMTCREFS);

if (mc && !pvtxPool.isLoaded(PVTX_MCTR)) { // in case was loaded via addPVerticesTMP
if (mc) { // in case was loaded via addPVerticesTMP
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::MCEventLabel>>("pvtx_mc"), PVTX_MCTR);
}
}
Expand All @@ -856,13 +854,11 @@ void RecoContainer::addStrangeTracks(ProcessingContext& pc, bool mc)
//____________________________________________________________
void RecoContainer::addPVerticesTMP(ProcessingContext& pc, bool mc)
{
if (!pvtxPool.isLoaded(PVTX)) { // in case was loaded via addPVertices
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
}
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::PrimaryVertex>>("pvtx"), PVTX);
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackIndex>>("pvtx_cont"), PVTX_CONTID);
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::dataformats::VtxTrackRef>>("pvtx_contref"), PVTX_CONTIDREFS);

if (mc && !pvtxPool.isLoaded(PVTX_MCTR)) { // in case was loaded via addPVertices
if (mc) { // in case was loaded via addPVertices
pvtxPool.registerContainer(pc.inputs().get<gsl::span<o2::MCEventLabel>>("pvtx_mc"), PVTX_MCTR);
}
}
Expand Down
4 changes: 3 additions & 1 deletion Detectors/GLOQC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ o2_add_library(GLOQC
SOURCES src/MatchITSTPCQC.cxx
src/ITSTPCMatchingQCParams.cxx

PUBLIC_LINK_LIBRARIES O2::DetectorsVertexing)
PUBLIC_LINK_LIBRARIES O2::DetectorsVertexing
PRIVATE_LINK_LIBRARIES O2::GPUO2Interface
O2::GPUTracking)

o2_target_root_dictionary(GLOQC
HEADERS include/GLOQC/MatchITSTPCQC.h
Expand Down
31 changes: 27 additions & 4 deletions Detectors/GLOQC/include/GLOQC/MatchITSTPCQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <TH1D.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TH3F.h>
#include <TEfficiency.h>
#include <TObjArray.h>
#include "DataFormatsGlobalTracking/RecoContainer.h"
Expand All @@ -28,6 +29,11 @@
#include "Steer/MCKinematicsReader.h"
#include "ReconstructionDataFormats/PID.h"
#include "DCAFitter/DCAFitterN.h"
#include "GPUO2InterfaceConfiguration.h"
// #include "GPUSettingsO2.h"
#include "GPUParam.h"
#include "GPUParam.inc"

#include <unordered_map>
#include <vector>
#include <array>
Expand Down Expand Up @@ -63,7 +69,7 @@ class MatchITSTPCQC
void setDataRequest(const std::shared_ptr<o2::globaltracking::DataRequest>& dr) { mDataRequest = dr; }
void finalize();
void reset();
bool processV0(int iv, o2::globaltracking::RecoContainer& recoData);
bool processV0(int iv, o2::globaltracking::RecoContainer& recoData, std::vector<float>& mTBinClOcc, float pvTime);
bool refitV0(const o2::dataformats::V0Index& id, o2::dataformats::V0& v0, o2::globaltracking::RecoContainer& recoData);

TH1D* getHistoPtNum(matchType m) const { return mPtNum[m]; }
Expand Down Expand Up @@ -130,7 +136,8 @@ class MatchITSTPCQC
TH1D* getHisto1OverPtPhysPrimDen(matchType m) const { return m1OverPtPhysPrimDen[m]; }
TEfficiency* getFractionITSTPCmatchPhysPrim1OverPt(matchType m) const { return mFractionITSTPCmatchPhysPrim1OverPt[m]; }

TH2F* getHistoK0MassVsPt() const { return mK0MassVsPt; }
TH3F* getHistoK0MassVsPtVsOccpp() const { return mK0MassVsPtVsOccpp; }
TH3F* getHistoK0MassVsPtVsOccPbPb() const { return mK0MassVsPtVsOccPbPb; }

void getHistos(TObjArray& objar);

Expand Down Expand Up @@ -228,7 +235,8 @@ class MatchITSTPCQC
publisher->startPublishing(mDCArVsPtDen);
publisher->startPublishing(mFractionITSTPCmatchDCArVsPt);
if (mDoK0QC) {
publisher->startPublishing(mK0MassVsPt);
publisher->startPublishing(mK0MassVsPtVsOccpp);
publisher->startPublishing(mK0MassVsPtVsOccPbPb);
}
}

Expand All @@ -241,6 +249,8 @@ class MatchITSTPCQC
void setBz(float bz) { mBz = bz; }
void setDoK0QC(bool v) { mDoK0QC = v; }
bool getDoK0QC() const { return mDoK0QC; }
void setK0Scaling(float v) { mK0Scaling = v; }
float getK0Scaling() const { return mK0Scaling; }

// ITS track
void setMinPtITSCut(float v) { mPtITSCut = v; };
Expand Down Expand Up @@ -408,12 +418,25 @@ class MatchITSTPCQC

// for V0s
o2::vertexing::DCAFitterN<2> mFitterV0;
TH2F* mK0MassVsPt = nullptr;
TH3F* mK0MassVsPtVsOccpp = nullptr;
TH3F* mK0MassVsPtVsOccPbPb = nullptr;
bool mDoK0QC = false; // whether to fill the K0 QC plot(s)
float mCutK0Mass = 0.05; // cut on the difference between the K0 mass and the PDG mass
bool mRefit = false; // whether to refit or not
float mMaxEtaK0 = 0.8; // cut on the K0 eta
long int mTimestamp = -1; // timestamp used to load the SVertexParam object: if differnt from -1, we don't load (it means we already did it)
std::unique_ptr<o2::gpu::GPUO2InterfaceConfiguration> mConfig;
std::unique_ptr<o2::gpu::GPUSettingsO2> mConfParam;
// std::unique_ptr<o2::gpu::GPUParam> mParam;
std::shared_ptr<o2::gpu::GPUParam> mParam = nullptr;
int mNHBPerTF = 0;
int mNTPCOccBinLength = 0; ///< TPC occ. histo bin length in TBs
float mNTPCOccBinLengthInv;
std::vector<float> mTBinClOcc; ///< TPC occupancy histo: i-th entry is the integrated occupancy for ~1 orbit starting from the TB = i*mNTPCOccBinLength
gsl::span<const unsigned int> mTPCRefitterOccMap; ///< externally set TPC clusters occupancy map
bool mIsHI = false;
float mK0Scaling = 1.f; // permill that we want to keep of K0S
uint64_t mNK0 = 0; // number of found V0s

ClassDefNV(MatchITSTPCQC, 3);
};
Expand Down
Loading
Loading