Skip to content
Merged
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
26 changes: 21 additions & 5 deletions PWGEM/PhotonMeson/Core/HistogramsLibrary.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char*
list->Add(new TH1F("hCentFT0M", "hCentFT0M;centrality FT0M (%)", 110, 0, 110));
list->Add(new TH2F("hCentFT0MvsMultNTracksPV", "hCentFT0MvsMultNTracksPV;centrality FT0M (%);N_{track} to PV", 110, 0, 110, 1001, -0.5, 1000.5));
}
if (TString(histClass) == "Track") {
if (TString(histClass) == "V0Leg") {
list->Add(new TH1F("hPt", "pT;p_{T} (GeV/c)", 1000, 0.0f, 10));
list->Add(new TH1F("hQoverPt", "q/pT;q/p_{T} (GeV/c)^{-1}", 1000, -50, 50));
list->Add(new TH2F("hEtaPhi", "#eta vs. #varphi;#varphi (rad.);#eta", 180, 0, TMath::TwoPi(), 40, -2.0f, 2.0f));
Expand Down Expand Up @@ -78,11 +78,27 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char*
list->Add(new TH2F("hMassGamma_recalc", "recalc. hMassGamma;R_{xy} (cm);m_{ee} (GeV/c^{2})", 200, 0.0f, 100.0f, 100, 0.0f, 0.1f));
list->Add(new TH2F("hGammaRxy", "conversion point in XY;V_{x} (cm);V_{y} (cm)", 400, -100.0f, 100.0f, 400, -100.0f, 100.0f));
list->Add(new TH2F("hGammaRxy_recalc", "recalc. conversion point in XY;V_{x} (cm);V_{y} (cm)", 400, -100.0f, 100.0f, 400, -100.0f, 100.0f));
list->Add(new TH2F("hKFChi2vsR_recalc", "KF chi2 vs. recalc. conversion point in XY;R_{xy} (cm);KF chi2/NDF", 250, 0.0f, 250.0f, 100, 0.f, 100.0f));
list->Add(new TH2F("hKFChi2vsZ_recalc", "KF chi2 vs. recalc. conversion point in Z;Z (cm);KF chi2/NDF", 500, -250.0f, 250.0f, 100, 0.f, 100.0f));
list->Add(new TH2F("hKFChi2vsR", "KF chi2 vs. recalc. conversion point in XY;R_{xy} (cm);KF chi2/NDF", 200, 0.0f, 200.0f, 100, 0.f, 100.0f));
list->Add(new TH2F("hKFChi2vsZ", "KF chi2 vs. recalc. conversion point in Z;Z (cm);KF chi2/NDF", 500, -250.0f, 250.0f, 100, 0.f, 100.0f));
list->Add(new TH1F("hNgamma", "Number of #gamma candidates per collision", 101, -0.5f, 100.5f));
list->Add(new TH2F("hGammaRPhi", "conversion point of #varphi vs. R_{xy} MC;#varphi (rad.);R_{xy} (cm);N_{e}", 360, 0.0f, TMath::TwoPi(), 200, 0, 200));
list->Add(new TH2F("hGammaRPhi_recalc", "conversion point of #varphi vs. R_{xy} MC;#varphi (rad.);R_{xy} (cm);N_{e}", 360, 0.0f, TMath::TwoPi(), 200, 0, 200));

const int nrxy = 102;
double rxy[nrxy] = {0.f};
for (int i = 0; i < 90; i++) {
rxy[i] = 1.0 * i;
}
for (int i = 90; i < nrxy; i++) {
rxy[i] = 10.0 * (i - 90) + 90.0;
}

const int ndim = 3; // r, phi, eta
const int nbins[ndim] = {nrxy - 1, 72, 40};
const double xmin[ndim] = {0.0, 0.0, -2.0};
const double xmax[ndim] = {200.0, TMath::TwoPi(), +2.0};

THnSparseF* hs_conv_point = new THnSparseF("hs_conv_point", "hs_conv_point;R_{xy} (cm);#varphi (rad.);#eta;", ndim, nbins, xmin, xmax);
hs_conv_point->SetBinEdges(0, rxy);
list->Add(hs_conv_point);

if (TString(subGroup) == "mc") {
list->Add(new TH1F("hPt_Photon_Primary", "pT;p_{T} (GeV/c)", 1000, 0.0f, 10)); // for MC efficiency
Expand Down
45 changes: 43 additions & 2 deletions PWGEM/PhotonMeson/Core/HistogramsLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define PWGEM_PHOTONMESON_CORE_HISTOGRAMSLIBRARY_H_

#include <iostream>
#include <array>
using namespace std;
#include <TString.h>
#include <THashList.h>
Expand All @@ -37,7 +38,7 @@ using namespace std;
enum EMHistType {
kEvent = 0,
kV0 = 1,
kTrack = 2,
kV0Leg = 2,
kPHOSCluster = 3,
kEMCCluster = 4,
kPhoton = 5, // photon candidates
Expand All @@ -59,13 +60,53 @@ void FillHistClass(THashList* list, const char* subGroup, T const& obj)
reinterpret_cast<TH2F*>(list->FindObject("hMultFT0"))->Fill(obj.multFT0A(), obj.multFT0C());
reinterpret_cast<TH1F*>(list->FindObject("hCentFT0M"))->Fill(obj.centFT0M());
reinterpret_cast<TH2F*>(list->FindObject("hCentFT0MvsMultNTracksPV"))->Fill(obj.centFT0M(), obj.multNTracksPV());

} else if constexpr (htype == EMHistType::kPhoton) { // ROOT::Math::PtEtaPhiMVector
reinterpret_cast<TH1F*>(list->FindObject("hPt"))->Fill(obj.Pt());
reinterpret_cast<TH1F*>(list->FindObject("hY"))->Fill(obj.Rapidity());
reinterpret_cast<TH1F*>(list->FindObject("hPhi"))->Fill(obj.Phi() < 0.f ? obj.Phi() + TMath::TwoPi() : obj.Phi());
} else if constexpr (htype == EMHistType::kV0) {
reinterpret_cast<TH1F*>(list->FindObject("hPt"))->Fill(obj.pt());
reinterpret_cast<TH2F*>(list->FindObject("hEtaPhi"))->Fill(obj.phi(), obj.eta());
reinterpret_cast<TH2F*>(list->FindObject("hRadius"))->Fill(obj.vz(), obj.v0radius());
reinterpret_cast<TH2F*>(list->FindObject("hRadius_recalc"))->Fill(obj.recalculatedVtxZ(), obj.recalculatedVtxR());
reinterpret_cast<TH1F*>(list->FindObject("hCosPA"))->Fill(abs(obj.cospa()));
reinterpret_cast<TH1F*>(list->FindObject("hPCA"))->Fill(obj.pca());
reinterpret_cast<TH2F*>(list->FindObject("hAPplot"))->Fill(obj.alpha(), obj.qtarm());
reinterpret_cast<TH2F*>(list->FindObject("hMassGamma"))->Fill(obj.v0radius(), obj.mGamma());
reinterpret_cast<TH2F*>(list->FindObject("hMassGamma_recalc"))->Fill(obj.recalculatedVtxR(), obj.mGamma());
reinterpret_cast<TH2F*>(list->FindObject("hGammaPsiPair"))->Fill(obj.psipair(), obj.mGamma());
reinterpret_cast<TH2F*>(list->FindObject("hGammaRxy"))->Fill(obj.vx(), obj.vy());
reinterpret_cast<TH2F*>(list->FindObject("hGammaRxy_recalc"))->Fill(obj.recalculatedVtxX(), obj.recalculatedVtxY());
reinterpret_cast<TH2F*>(list->FindObject("hKFChi2vsR"))->Fill(obj.recalculatedVtxR(), obj.chiSquareNDF());
reinterpret_cast<TH2F*>(list->FindObject("hKFChi2vsZ"))->Fill(obj.recalculatedVtxZ(), obj.chiSquareNDF());

float phi_recalc = atan2(obj.recalculatedVtxY(), obj.recalculatedVtxX());
float r3d = sqrt(pow(obj.recalculatedVtxX(), 2) + pow(obj.recalculatedVtxY(), 2) + pow(obj.recalculatedVtxZ(), 2));
float eta_cp = std::atanh(obj.recalculatedVtxZ() / r3d);
double value_cp[3] = {obj.recalculatedVtxR(), phi_recalc < 0 ? phi_recalc + TMath::TwoPi() : phi_recalc, eta_cp}; // r, phi, eta
reinterpret_cast<THnSparseF*>(list->FindObject("hs_conv_point"))->Fill(value_cp);
} else if constexpr (htype == EMHistType::kV0Leg) {

reinterpret_cast<TH1F*>(list->FindObject("hPt"))->Fill(obj.pt());
reinterpret_cast<TH1F*>(list->FindObject("hQoverPt"))->Fill(obj.sign() / obj.pt());
reinterpret_cast<TH2F*>(list->FindObject("hEtaPhi"))->Fill(obj.phi(), obj.eta());
reinterpret_cast<TH2F*>(list->FindObject("hDCAxyz"))->Fill(obj.dcaXY(), obj.dcaZ());
reinterpret_cast<TH1F*>(list->FindObject("hNclsTPC"))->Fill(obj.tpcNClsFound());
reinterpret_cast<TH1F*>(list->FindObject("hNclsITS"))->Fill(obj.itsNCls());
reinterpret_cast<TH1F*>(list->FindObject("hNcrTPC"))->Fill(obj.tpcNClsCrossedRows());
reinterpret_cast<TH1F*>(list->FindObject("hTPCNcr2Nf"))->Fill(obj.tpcCrossedRowsOverFindableCls());
reinterpret_cast<TH1F*>(list->FindObject("hTPCNcls2Nf"))->Fill(obj.tpcFoundOverFindableCls());
reinterpret_cast<TH1F*>(list->FindObject("hChi2TPC"))->Fill(obj.tpcChi2NCl());
reinterpret_cast<TH1F*>(list->FindObject("hChi2ITS"))->Fill(obj.itsChi2NCl());
reinterpret_cast<TH2F*>(list->FindObject("hTPCdEdx"))->Fill(obj.tpcInnerParam(), obj.tpcSignal());
reinterpret_cast<TH2F*>(list->FindObject("hTPCNsigmaEl"))->Fill(obj.tpcInnerParam(), obj.tpcNSigmaEl());
reinterpret_cast<TH2F*>(list->FindObject("hTPCNsigmaPi"))->Fill(obj.tpcInnerParam(), obj.tpcNSigmaPi());
reinterpret_cast<TH2F*>(list->FindObject("hXY"))->Fill(obj.x(), obj.y());
reinterpret_cast<TH2F*>(list->FindObject("hZX"))->Fill(obj.z(), obj.x());
reinterpret_cast<TH2F*>(list->FindObject("hZY"))->Fill(obj.z(), obj.y());
reinterpret_cast<TH2F*>(list->FindObject("hDCAxyEta"))->Fill(obj.eta(), obj.dcaXY());
reinterpret_cast<TH2F*>(list->FindObject("hDCAxyZ"))->Fill(obj.z(), obj.dcaXY());

} else if constexpr (htype == EMHistType::kPHOSCluster) {
reinterpret_cast<TH1F*>(list->FindObject("hPt"))->Fill(obj.pt());
reinterpret_cast<TH2F*>(list->FindObject("hEtaPhi"))->Fill(obj.phi(), obj.eta());
Expand Down
5 changes: 5 additions & 0 deletions PWGEM/PhotonMeson/Core/V0PhotonCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ void V0PhotonCut::SetMaxPCA(float max)
mMaxPCA = max;
LOG(info) << "V0 Photon Cut, set max distance between 2 legs: " << mMaxPCA;
}
void V0PhotonCut::SetMaxMarginZ(float max)
{
mMaxMarginZ = max;
LOG(info) << "V0 Photon Cut, set max margin z: " << mMaxMarginZ;
}
void V0PhotonCut::SetOnWwireIB(bool flag)
{
mIsOnWwireIB = flag;
Expand Down
5 changes: 3 additions & 2 deletions PWGEM/PhotonMeson/Core/V0PhotonCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ class V0PhotonCut : public TNamed
return v0.pca() <= mMaxPCA;

case V0PhotonCuts::kRZLine:
// return v0.recalculatedVtxR() > abs(v0.vz()) * TMath::Tan(2 * TMath::ATan(TMath::Exp(-mMaxV0Eta))) - 12.0; // as long as z recalculation is not fixed use this
return v0.recalculatedVtxR() > abs(v0.recalculatedVtxZ()) * TMath::Tan(2 * TMath::ATan(TMath::Exp(-mMaxV0Eta))) - 12.0; // as long as z recalculation is not fixed use this
return v0.recalculatedVtxR() > abs(v0.recalculatedVtxZ()) * TMath::Tan(2 * TMath::ATan(TMath::Exp(-mMaxV0Eta))) - mMaxMarginZ; // as long as z recalculation is not fixed use this

case V0PhotonCuts::kOnWwireIB: {
const float rxy_min = 5.506; // cm
Expand Down Expand Up @@ -320,6 +319,7 @@ class V0PhotonCut : public TNamed
void SetRxyRange(float min = 0.f, float max = 180.f);
void SetMinCosPA(float min = 0.95);
void SetMaxPCA(float max = 2.f);
void SetMaxMarginZ(float max = 7.f);
void SetMaxMeePsiPairDep(std::function<float(float)> psiDepCut);
void SetOnWwireIB(bool flag = false);
void SetOnWwireOB(bool flag = false);
Expand Down Expand Up @@ -354,6 +354,7 @@ class V0PhotonCut : public TNamed
float mMinRxy{0.f}, mMaxRxy{180.f};
float mMinCosPA{0.95};
float mMaxPCA{2.f};
float mMaxMarginZ{7.f};
std::function<float(float)> mMaxMeePsiPairDep{}; // max mee as a function of psipair
bool mIsOnWwireIB{false};
bool mIsOnWwireOB{false};
Expand Down
84 changes: 21 additions & 63 deletions PWGEM/PhotonMeson/Tasks/pcmQC.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct PCMQC {
std::vector<V0PhotonCut> fPCMCuts;

OutputObj<THashList> fOutputEvent{"Event"};
OutputObj<THashList> fOutputTrack{"Track"};
OutputObj<THashList> fOutputV0Leg{"V0Leg"};
OutputObj<THashList> fOutputV0{"V0"};
THashList* fMainList = new THashList();

Expand All @@ -73,23 +73,23 @@ struct PCMQC {
THashList* list_ev = reinterpret_cast<THashList*>(fMainList->FindObject("Event"));
o2::aod::emphotonhistograms::DefineHistograms(list_ev, "Event");

o2::aod::emphotonhistograms::AddHistClass(fMainList, "Track");
THashList* list_tr = reinterpret_cast<THashList*>(fMainList->FindObject("Track"));
o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0Leg");
THashList* list_v0leg = reinterpret_cast<THashList*>(fMainList->FindObject("V0Leg"));

o2::aod::emphotonhistograms::AddHistClass(fMainList, "V0");
THashList* list_v0 = reinterpret_cast<THashList*>(fMainList->FindObject("V0"));

for (const auto& cut : fPCMCuts) {
const char* cutname = cut.GetName();
o2::aod::emphotonhistograms::AddHistClass(list_tr, cutname);
o2::aod::emphotonhistograms::AddHistClass(list_v0leg, cutname);
o2::aod::emphotonhistograms::AddHistClass(list_v0, cutname);
}

// for single tracks
for (auto& cut : fPCMCuts) {
std::string_view cutname = cut.GetName();
THashList* list = reinterpret_cast<THashList*>(fMainList->FindObject("Track")->FindObject(cutname.data()));
o2::aod::emphotonhistograms::DefineHistograms(list, "Track");
THashList* list = reinterpret_cast<THashList*>(fMainList->FindObject("V0Leg")->FindObject(cutname.data()));
o2::aod::emphotonhistograms::DefineHistograms(list, "V0Leg");
}

// for V0s
Expand Down Expand Up @@ -120,61 +120,16 @@ struct PCMQC {
addhistograms(); // please call this after DefinCuts();

fOutputEvent.setObject(reinterpret_cast<THashList*>(fMainList->FindObject("Event")));
fOutputTrack.setObject(reinterpret_cast<THashList*>(fMainList->FindObject("Track")));
fOutputV0Leg.setObject(reinterpret_cast<THashList*>(fMainList->FindObject("V0Leg")));
fOutputV0.setObject(reinterpret_cast<THashList*>(fMainList->FindObject("V0")));
}

template <typename T>
void fillHistosLeg(const T& leg, const char* cutname)
{
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hPt"))->Fill(leg.pt());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hQoverPt"))->Fill(leg.sign() / leg.pt());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hEtaPhi"))->Fill(leg.phi(), leg.eta());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hDCAxyz"))->Fill(leg.dcaXY(), leg.dcaZ());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hNclsTPC"))->Fill(leg.tpcNClsFound());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hNclsITS"))->Fill(leg.itsNCls());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hNcrTPC"))->Fill(leg.tpcNClsCrossedRows());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hTPCNcr2Nf"))->Fill(leg.tpcCrossedRowsOverFindableCls());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hTPCNcls2Nf"))->Fill(leg.tpcFoundOverFindableCls());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hChi2TPC"))->Fill(leg.tpcChi2NCl());
reinterpret_cast<TH1F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hChi2ITS"))->Fill(leg.itsChi2NCl());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hTPCdEdx"))->Fill(leg.tpcInnerParam(), leg.tpcSignal());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hTPCNsigmaEl"))->Fill(leg.tpcInnerParam(), leg.tpcNSigmaEl());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hTPCNsigmaPi"))->Fill(leg.tpcInnerParam(), leg.tpcNSigmaPi());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hXY"))->Fill(leg.x(), leg.y());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hZX"))->Fill(leg.z(), leg.x());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hZY"))->Fill(leg.z(), leg.y());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hDCAxyEta"))->Fill(leg.eta(), leg.dcaXY());
reinterpret_cast<TH2F*>(fMainList->FindObject("Track")->FindObject(cutname)->FindObject("hDCAxyZ"))->Fill(leg.z(), leg.dcaXY());
}

template <typename T>
void fillHistosV0(const T& v0, const char* cutname)
{
reinterpret_cast<TH1F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hPt"))->Fill(v0.pt());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hEtaPhi"))->Fill(v0.phi(), v0.eta());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hRadius"))->Fill(v0.vz(), v0.v0radius());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hRadius_recalc"))->Fill(v0.recalculatedVtxZ(), v0.recalculatedVtxR());
reinterpret_cast<TH1F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hCosPA"))->Fill(abs(v0.cospa()));
reinterpret_cast<TH1F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hPCA"))->Fill(v0.pca());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hAPplot"))->Fill(v0.alpha(), v0.qtarm());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hMassGamma"))->Fill(v0.v0radius(), v0.mGamma());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hMassGamma_recalc"))->Fill(v0.recalculatedVtxR(), v0.mGamma());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hGammaPsiPair"))->Fill(v0.psipair(), v0.mGamma());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hGammaRxy"))->Fill(v0.vx(), v0.vy());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hGammaRxy_recalc"))->Fill(v0.recalculatedVtxX(), v0.recalculatedVtxY());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hKFChi2vsR_recalc"))->Fill(v0.recalculatedVtxR(), v0.chiSquareNDF());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hKFChi2vsZ_recalc"))->Fill(v0.recalculatedVtxZ(), v0.chiSquareNDF());

float phi_recalc = atan2(v0.recalculatedVtxY(), v0.recalculatedVtxX());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hGammaRPhi"))->Fill(v0.phi(), v0.v0radius());
reinterpret_cast<TH2F*>(fMainList->FindObject("V0")->FindObject(cutname)->FindObject("hGammaRPhi_recalc"))->Fill(phi_recalc < 0 ? phi_recalc + TMath::TwoPi() : phi_recalc, v0.recalculatedVtxR());
}

Preslice<MyV0Photons> perCollision = aod::v0photon::collisionId;
void processQC(aod::EMReducedEvents const& collisions, MyV0Photons const& v0photons, aod::V0Legs const& v0legs)
{
THashList* list_ev = static_cast<THashList*>(fMainList->FindObject("Event"));
THashList* list_v0 = static_cast<THashList*>(fMainList->FindObject("V0"));
THashList* list_v0leg = static_cast<THashList*>(fMainList->FindObject("V0Leg"));

for (auto& collision : collisions) {
reinterpret_cast<TH1F*>(fMainList->FindObject("Event")->FindObject("hZvtx_before"))->Fill(collision.posZ());
Expand All @@ -198,19 +153,22 @@ struct PCMQC {

auto V0Photons_coll = v0photons.sliceBy(perCollision, collision.collisionId());
for (const auto& cut : fPCMCuts) {
int ng = 0;
for (auto& g : V0Photons_coll) {
auto pos = g.posTrack_as<aod::V0Legs>();
auto ele = g.negTrack_as<aod::V0Legs>();
if (cut.IsSelected<aod::V0Legs>(g)) {
fillHistosV0(g, cut.GetName());
ng++;
THashList* list_v0_cut = static_cast<THashList*>(list_v0->FindObject(cut.GetName()));
THashList* list_v0leg_cut = static_cast<THashList*>(list_v0leg->FindObject(cut.GetName()));

int nv0 = 0;
for (auto& v0 : V0Photons_coll) {
auto pos = v0.posTrack_as<aod::V0Legs>();
auto ele = v0.negTrack_as<aod::V0Legs>();
if (cut.IsSelected<aod::V0Legs>(v0)) {
o2::aod::emphotonhistograms::FillHistClass<EMHistType::kV0>(list_v0_cut, "", v0);
nv0++;
for (auto& leg : {pos, ele}) {
fillHistosLeg(leg, cut.GetName());
o2::aod::emphotonhistograms::FillHistClass<EMHistType::kV0Leg>(list_v0leg_cut, "", leg);
}
}
} // end of v0 loop
reinterpret_cast<TH1F*>(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hNgamma"))->Fill(ng);
reinterpret_cast<TH1F*>(fMainList->FindObject("V0")->FindObject(cut.GetName())->FindObject("hNgamma"))->Fill(nv0);
} // end of cut loop
} // end of collision loop
} // end of process
Expand Down
Loading