Skip to content

Commit

Permalink
Adding K0s Qc to GLO matching QC, and move to a different location
Browse files Browse the repository at this point in the history
  • Loading branch information
chiarazampolli committed May 23, 2024
1 parent 0635b95 commit d983327
Show file tree
Hide file tree
Showing 14 changed files with 264 additions and 32 deletions.
1 change: 1 addition & 0 deletions Detectors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ add_subdirectory(FOCAL)
add_subdirectory(GlobalTracking)
add_subdirectory(GlobalTrackingWorkflow)
add_subdirectory(Vertexing)
add_subdirectory(GLOQC)

if(BUILD_ANALYSIS)
add_subdirectory(AOD)
Expand Down
37 changes: 37 additions & 0 deletions Detectors/GLOQC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
# This software is distributed under the terms of the GNU General Public
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.
# add_compile_options(-O0 -g -fPIC)

o2_add_library(GLOQC
TARGETVARNAME targetName
SOURCES src/MatchITSTPCQC.cxx
src/ITSTPCMatchingQCParams.cxx

PUBLIC_LINK_LIBRARIES O2::Framework
O2::DataFormatsTPC
O2::DataFormatsITS
O2::SimConfig
O2::DataFormatsGlobalTracking
O2::MathUtils
O2::SimulationDataFormat
O2::ReconstructionDataFormats
O2::Steer
O2::GlobalTracking
O2::DCAFitter
O2::DetectorsVertexing)

o2_target_root_dictionary(GLOQC
HEADERS include/GLOQC/MatchITSTPCQC.h
include/GLOQC/ITSTPCMatchingQCParams.h

)


Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace o2
{
namespace globaltracking
namespace gloqc
{

// There are configurable params for TPC-ITS matching
Expand All @@ -30,11 +30,13 @@ struct ITSTPCMatchingQCParams : public o2::conf::ConfigurableParamHelper<ITSTPCM
int32_t minNTPCClustersCut = 60;
float minDCACut = 100.f;
float minDCACutY = 10.f;
float cutK0Mass = 0.05f;
float maxEtaK0 = 0.8f;

O2ParamDef(ITSTPCMatchingQCParams, "ITSTPCMatchingQC");
};

} // namespace globaltracking
} // namespace gloqc
} // end namespace o2

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

/// \file MatchTPCITS.h
/// \brief Class to perform TPC ITS matching
/// \author ruben.shahoyan@cern.ch
/// \file MatchITSTPCQC.h
/// \brief Class to perform QC for ITSTPC matching
/// \author chiara.zampolli@cern.ch

#ifndef ALICEO2_GLOBTRACKING_MATCHTPCITS_QC_
#define ALICEO2_GLOBTRACKING_MATCHTPCITS_QC_
#ifndef ALICEO2_GLOQC_MATCHITSTPC_QC_
#define ALICEO2_GLOQC_MATCHITSTPC_QC_

#include <TH1D.h>
#include <TH1F.h>
Expand All @@ -27,6 +27,7 @@
#include "SimulationDataFormat/MCTrack.h"
#include "Steer/MCKinematicsReader.h"
#include "ReconstructionDataFormats/PID.h"
#include "DCAFitter/DCAFitterN.h"
#include <unordered_map>
#include <vector>
#include <array>
Expand All @@ -35,7 +36,7 @@
namespace o2
{

namespace globaltracking
namespace gloqc
{

using GID = o2::dataformats::GlobalTrackID;
Expand All @@ -62,6 +63,8 @@ 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 refitV0(const o2::dataformats::V0Index& id, o2::dataformats::V0& v0, o2::globaltracking::RecoContainer& recoData);

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

TH1F* getHistoK0Mass() const { return mK0Mass; }

void getHistos(TObjArray& objar);

/// \brief Publishes the histograms to the publisher e.g. the one provided by the QC task
Expand Down Expand Up @@ -222,6 +227,7 @@ class MatchITSTPCQC
publisher->startPublishing(mDCArVsPtNum);
publisher->startPublishing(mDCArVsPtDen);
publisher->startPublishing(mFractionITSTPCmatchDCArVsPt);
publisher->startPublishing(mK0Mass);
}

void setSources(GID::mask_t src) { mSrc = src; }
Expand All @@ -231,6 +237,8 @@ class MatchITSTPCQC
bool getUseMC() const { return mUseMC; }
void deleteHistograms();
void setBz(float bz) { mBz = bz; }
void setDoK0QC(bool v) { mDoK0QC = v; }
bool getDoK0QC() const { return mDoK0QC; }

// ITS track
void setMinPtITSCut(float v) { mPtITSCut = v; };
Expand All @@ -255,11 +263,16 @@ class MatchITSTPCQC
void setMaxPtCut(float v) { mPtMaxCut = v; }
void setEtaCut(float v) { mEtaCut = v; } // TODO: define 2 different values for min and max (*)

// K0
void setMaxK0Eta(float v) { mMaxEtaK0 = v; }
void setRefitK0(bool v) { mRefit = v; }
void setCutK0Mass(bool v) { mCutK0Mass = v; }

private:
std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest;
o2::globaltracking::RecoContainer mRecoCont;
GID::mask_t mSrc = GID::getSourcesMask("ITS,TPC,ITS-TPC");
GID::mask_t mAllowedSources = GID::getSourcesMask("ITS,TPC,ITS-TPC");
GID::mask_t mAllowedSources = GID::getSourcesMask("ITS,TPC,ITS-TPC,ITS-TPC-TOF,TPC-TOF,TPC-TRD,ITS-TPC-TRD,TPC-TRD-TOF,ITS-TPC-TOF,ITS-TPC-TRD-TOF");
// TPC
gsl::span<const o2::tpc::TrackTPC> mTPCTracks;
// ITS
Expand Down Expand Up @@ -372,9 +385,18 @@ class MatchITSTPCQC
float mEtaCut = 1e10f; // 1e10f as defaults of Detectors/GlobalTracking/include/GlobalTracking/TrackCuts.h
// TODO: define 2 different values for min and max (*)

ClassDefNV(MatchITSTPCQC, 2);
// for V0s
o2::vertexing::DCAFitterN<2> mFitterV0;
TH1F* mK0Mass = 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)

ClassDefNV(MatchITSTPCQC, 3);
};
} // namespace globaltracking
} // namespace gloqc
} // namespace o2

#endif
20 changes: 20 additions & 0 deletions Detectors/GLOQC/src/GLOQCLinkDef.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
// This software is distributed under the terms of the GNU General Public
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
//
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.

#ifdef __CLING__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class o2::conf::ConfigurableParamHelper < o2::gloqc::ITSTPCMatchingQCParams> + ;

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
/// \file ITSTPCMatchingQCParams.h
/// \brief Configurable params for ITSTPC matching QC

#include "GlobalTracking/ITSTPCMatchingQCParams.h"
O2ParamImpl(o2::globaltracking::ITSTPCMatchingQCParams);
#include "GLOQC/ITSTPCMatchingQCParams.h"
O2ParamImpl(o2::gloqc::ITSTPCMatchingQCParams);
Loading

0 comments on commit d983327

Please sign in to comment.