Skip to content

Commit

Permalink
Identified analysis preparing the weights and eff correction (#3091)
Browse files Browse the repository at this point in the history
* trigger github actions

* Identified analysis preparing the weights and eff correction

---------

Co-authored-by: Victor <[email protected]>
  • Loading branch information
victor-gonzalez and Victor authored Jul 17, 2023
1 parent f7cd594 commit bf0dab8
Showing 1 changed file with 33 additions and 44 deletions.
77 changes: 33 additions & 44 deletions PWGCF/Tasks/dptdptcorrelations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ bool ptorder = false;
PairCuts fPairCuts; // pair suppression engine
bool fUseConversionCuts = false; // suppress resonances and conversions
bool fUseTwoTrackCut = false; // suppress too close tracks

std::vector<std::string> tname = {"O", "T"}; ///< the track names
} // namespace correlationstask

// Task for building <dpt,dpt> correlations
Expand Down Expand Up @@ -108,17 +110,6 @@ struct DptDptCorrelationsTask {
std::vector<std::vector<TProfile*>> fhSum2PtPtnw_vsC{nch, {nch, nullptr}}; //!<! un-weighted accumulated \f${p_T}_1 {p_T}_2\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations
std::vector<std::vector<TProfile*>> fhSum2DptDptnw_vsC{nch, {nch, nullptr}}; //!<! un-weighted accumulated \f$\sum ({p_T}_1- <{p_T}_1>) ({p_T}_2 - <{p_T}_2>) \f$ distribution vs \f$\Delta\eta,\;\Delta\phi\f$ distribution vs event centrality/multiplicity 1-1,1-2,2-1,2-2, combinations

/// \enum TrackPairs
/// \brief The track combinations hadled by the class
typedef enum {
kOO = 0, ///< one-one pairs
kOT, ///< one-two pairs
kTO, ///< two-one pairs
kTT, ///< two-two pairs
nTrackPairs ///< the number of track pairs
} trackpairs;

std::vector<std::string> tname = {"O", "T"}; ///< the external track names, one and two, for histogram creation
std::vector<std::vector<std::string>> trackPairsNames = {{"OO", "OT"}, {"TO", "TT"}};
bool ccdbstored = false;

Expand Down Expand Up @@ -916,40 +907,38 @@ struct DptDptCorrelationsTask {
if (!(ixDCE < 0)) {
if (ccdblst != nullptr && !(dataCEME[ixDCE]->isCCDBstored())) {
if constexpr (gen) {
dataCEME[ixDCE]->storePtAverages(
std::vector<TH2*>{reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("trueptavgetaphi_%02d-%02d_p",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data())),
reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("trueptavgetaphi_%02d-%02d_m",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data()))});
std::vector<TH2*> ptavgs{tname.size(), nullptr};
for (auto sp : tname) {
ptavgs.push_back(reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("trueptavgetaphi_%02d-%02d_%s",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]),
sp.c_str())
.Data())));
}
dataCEME[ixDCE]->storePtAverages(ptavgs);
} else {
dataCEME[ixDCE]->storeTrackCorrections(
std::vector<TH3*>{reinterpret_cast<TH3*>(ccdblst->FindObject(
TString::Format("correction_%02d-%02d_p1",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data())),
reinterpret_cast<TH3*>(ccdblst->FindObject(
TString::Format("correction_%02d-%02d_m1",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data()))});
dataCEME[ixDCE]->storePtAverages(
std::vector<TH2*>{reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("ptavgetaphi_%02d-%02d_p",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data())),
reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("ptavgetaphi_%02d-%02d_m",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]))
.Data()))});
std::vector<TH3*> corrs{tname.size(), nullptr};
for (auto sp : tname) {
corrs.push_back(reinterpret_cast<TH3*>(ccdblst->FindObject(
TString::Format("correction_%02d-%02d_%s",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]),
sp.c_str())
.Data())));
}
dataCEME[ixDCE]->storeTrackCorrections(corrs);

std::vector<TH2*> ptavgs{tname.size(), nullptr};
for (auto sp : tname) {
ptavgs.push_back(reinterpret_cast<TH2*>(ccdblst->FindObject(
TString::Format("ptavgetaphi_%02d-%02d_%s",
static_cast<int>(fCentMultMin[ixDCE]),
static_cast<int>(fCentMultMax[ixDCE]),
sp.c_str())
.Data())));
}
dataCEME[ixDCE]->storePtAverages(ptavgs);
}
}

Expand Down

0 comments on commit bf0dab8

Please sign in to comment.