Skip to content
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
13 changes: 10 additions & 3 deletions PWGEM/Dilepton/Core/DielectronCut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
// Class for dielectron Cut
//

#include <utility>
#include <set>
#include "PWGEM/Dilepton/Core/DielectronCut.h"

#include "Framework/Logger.h"
#include "PWGEM/Dilepton/Core/DielectronCut.h"

#include <set>
#include <utility>

ClassImp(DielectronCut);

Expand Down Expand Up @@ -341,3 +342,9 @@ void DielectronCut::RequireITSib1st(bool flag)
mRequireITSib1st = flag;
LOG(info) << "Dielectron Cut, require ITS ib 1st: " << mRequireITSib1st;
}
void DielectronCut::IncludeITSsa(bool flag, float max)
{
mIncludeITSsa = flag;
mMaxPtITSsa = max;
LOG(info) << "Dielectron Cut, include ITSsa tracks: " << mIncludeITSsa << ", mMaxPtITSsa = " << mMaxPtITSsa;
}
68 changes: 41 additions & 27 deletions PWGEM/Dilepton/Core/DielectronCut.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,22 @@
#ifndef PWGEM_DILEPTON_CORE_DIELECTRONCUT_H_
#define PWGEM_DILEPTON_CORE_DIELECTRONCUT_H_

#include <algorithm>
#include <set>
#include <vector>
#include <utility>
#include <string>
#include "TNamed.h"
#include "Math/Vector4D.h"

#include "PWGEM/Dilepton/Utils/EMTrackUtilities.h"
#include "PWGEM/Dilepton/Utils/MlResponseDielectronSingleTrack.h"
#include "PWGEM/Dilepton/Utils/PairUtilities.h"

#include "Framework/Logger.h"
#include "Framework/DataTypes.h"
#include "CommonConstants/PhysicsConstants.h"
#include "PWGEM/Dilepton/Utils/PairUtilities.h"
#include "PWGEM/Dilepton/Utils/EMTrackUtilities.h"
#include "Framework/DataTypes.h"
#include "Framework/Logger.h"

#include "Math/Vector4D.h"
#include "TNamed.h"

#include <algorithm>
#include <set>
#include <string>
#include <utility>
#include <vector>

using namespace o2::aod::pwgem::dilepton::utils::emtrackutil;
using namespace o2::aod::pwgem::dilepton::utils::pairutil;
Expand Down Expand Up @@ -149,7 +150,7 @@ class DielectronCut : public TNamed
template <bool dont_require_pteta = false, bool isML = false, typename TTrack, typename TCollision = int>
bool IsSelectedTrack(TTrack const& track, TCollision const& collision = 0) const
{
if (!track.hasITS() || !track.hasTPC()) { // track has to be ITS-TPC matched track
if (!track.hasITS()) {
return false;
}

Expand Down Expand Up @@ -200,24 +201,34 @@ class DielectronCut : public TNamed
}
}

// TPC cuts
if (!IsSelectedTrack(track, DielectronCuts::kTPCNCls)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCCrossedRows)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCCrossedRowsOverNCls)) {
if (!mIncludeITSsa && (!track.hasITS() || !track.hasTPC())) { // track has to be ITS-TPC matched track
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCFracSharedClusters)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kRelDiffPin)) {

if ((track.hasITS() && !track.hasTPC() && !track.hasTRD() && !track.hasTOF()) && track.pt() > mMaxPtITSsa) { // ITSsa
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCChi2NDF)) {
return false;

// TPC cuts
if (track.hasTPC()) {
if (!IsSelectedTrack(track, DielectronCuts::kTPCNCls)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCCrossedRows)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCCrossedRowsOverNCls)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCFracSharedClusters)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kRelDiffPin)) {
return false;
}
if (!IsSelectedTrack(track, DielectronCuts::kTPCChi2NDF)) {
return false;
}
}

if (mApplyPF && !IsSelectedTrack(track, DielectronCuts::kPrefilter)) {
Expand Down Expand Up @@ -470,6 +481,7 @@ class DielectronCut : public TNamed
void SetTrackMaxDcaXYPtDep(std::function<float(float)> ptDepCut);
void ApplyPrefilter(bool flag);
void ApplyPhiV(bool flag);
void IncludeITSsa(bool flag, float maxpt);

void SetPIDMlResponse(o2::analysis::MlResponseDielectronSingleTrack<float>* mlResponse)
{
Expand Down Expand Up @@ -525,6 +537,8 @@ class DielectronCut : public TNamed
bool mApplyPF{false};
float mMinMeanClusterSizeITS{-1e10f}, mMaxMeanClusterSizeITS{1e10f}; // max <its cluster size> x cos(Lmabda)
float mMinP_ITSClusterSize{0.0}, mMaxP_ITSClusterSize{0.0};
bool mIncludeITSsa{false};
float mMaxPtITSsa{0.15};

// pid cuts
int mPIDScheme{-1};
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ struct Dilepton {
Configurable<float> cfg_min_p_ITSNsigmaPr{"cfg_min_p_ITSNsigmaPr", 0.0, "min p for proton exclusion in ITS"};
Configurable<float> cfg_max_p_ITSNsigmaPr{"cfg_max_p_ITSNsigmaPr", 0.0, "max p for proton exclusion in ITS"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -690,6 +692,7 @@ struct Dilepton {
fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st);
fDielectronCut.SetChi2TOF(0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/DileptonMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ struct DileptonMC {
Configurable<float> cfg_min_p_ITSNsigmaPr{"cfg_min_p_ITSNsigmaPr", 0.0, "min p for proton exclusion in ITS"};
Configurable<float> cfg_max_p_ITSNsigmaPr{"cfg_max_p_ITSNsigmaPr", 0.0, "max p for proton exclusion in ITS"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -655,6 +657,7 @@ struct DileptonMC {
fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st);
fDielectronCut.SetChi2TOF(0.0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/PhotonHBT.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ struct PhotonHBT {
Configurable<float> cfg_min_p_ITSNsigmaPr{"cfg_min_p_ITSNsigmaPr", 0.0, "min p for proton exclusion in ITS"};
Configurable<float> cfg_max_p_ITSNsigmaPr{"cfg_max_p_ITSNsigmaPr", 0.0, "max p for proton exclusion in ITS"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -573,6 +575,7 @@ struct PhotonHBT {
fDielectronCut.SetTrackMaxDcaZ(dielectroncuts.cfg_max_dcaz);
fDielectronCut.SetChi2TOF(0.0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/SingleTrackQC.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ struct SingleTrackQC {
Configurable<float> cfg_min_p_ITSNsigmaPr{"cfg_min_p_ITSNsigmaPr", 0.0, "min p for proton exclusion in ITS"};
Configurable<float> cfg_max_p_ITSNsigmaPr{"cfg_max_p_ITSNsigmaPr", 0.0, "max p for proton exclusion in ITS"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -398,6 +400,7 @@ struct SingleTrackQC {
fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st);
fDielectronCut.SetChi2TOF(0.0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Core/SingleTrackQCMC.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ struct SingleTrackQCMC {
Configurable<float> cfg_min_p_ITSNsigmaPr{"cfg_min_p_ITSNsigmaPr", 0.0, "min p for proton exclusion in ITS"};
Configurable<float> cfg_max_p_ITSNsigmaPr{"cfg_max_p_ITSNsigmaPr", 0.0, "max p for proton exclusion in ITS"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -457,6 +459,7 @@ struct SingleTrackQCMC {
fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st);
fDielectronCut.SetChi2TOF(0.0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
18 changes: 8 additions & 10 deletions PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ struct skimmerPrimaryElectron {
Configurable<int> min_ncluster_itsib{"min_ncluster_itsib", 1, "min ncluster itsib"};
Configurable<float> maxchi2tpc{"maxchi2tpc", 5.0, "max. chi2/NclsTPC"};
Configurable<float> maxchi2its{"maxchi2its", 6.0, "max. chi2/NclsITS"};
Configurable<float> minpt_itstpc{"minpt_itstpc", 0.1, "min pt for ITS-TPC track"};
Configurable<float> minpt_itssa{"minpt_itssa", 0.05, "min pt for ITSsa track"};
Configurable<float> minpt{"minpt", 0.15, "min pt for ITS-TPC track"};
Configurable<float> maxeta{"maxeta", 0.9, "eta acceptance"};
Configurable<float> dca_xy_max{"dca_xy_max", 1.0, "max DCAxy in cm"};
Configurable<float> dca_z_max{"dca_z_max", 1.0, "max DCAz in cm"};
Expand Down Expand Up @@ -348,11 +347,11 @@ struct skimmerPrimaryElectron {
return false;
}

if ((track.hasITS() && track.hasTPC()) && track_par_cov_recalc.getPt() < minpt_itstpc) {
if ((track.hasITS() && track.hasTPC()) && track_par_cov_recalc.getPt() < minpt) {
return false;
}

if ((track.hasITS() && !track.hasTPC() && !track.hasTOF() && !track.hasTRD()) && (track_par_cov_recalc.getPt() < minpt_itssa || maxpt_itssa < track_par_cov_recalc.getPt())) {
if ((track.hasITS() && !track.hasTPC() && !track.hasTOF() && !track.hasTRD()) && maxpt_itssa < track_par_cov_recalc.getPt()) {
return false;
}

Expand Down Expand Up @@ -558,7 +557,7 @@ struct skimmerPrimaryElectron {

Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
std::vector<std::pair<int, int>> stored_trackIds;
Filter trackFilter = o2::aod::track::pt > minpt_itssa&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) == true;
Filter trackFilter = o2::aod::track::pt > minpt&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) == true;
using MyFilteredTracks = soa::Filtered<MyTracks>;

Partition<MyFilteredTracks> posTracks = o2::aod::track::signed1Pt > 0.f;
Expand Down Expand Up @@ -779,8 +778,7 @@ struct prefilterPrimaryElectron {
Configurable<bool> fillQAHistogram{"fillQAHistogram", false, "flag to fill QA histograms"};
Configurable<float> max_dcaxy{"max_dcaxy", 0.3, "DCAxy To PV for loose track sample"};
Configurable<float> max_dcaz{"max_dcaz", 0.3, "DCAz To PV for loose track sample"};
Configurable<float> minpt_itstpc{"minpt_itstpc", 0.1, "min pt for ITS-TPC track"};
Configurable<float> minpt_itssa{"minpt_itssa", 0.05, "min pt for ITSsa track"};
Configurable<float> minpt{"minpt", 0.1, "min pt for ITS-TPC track"};
Configurable<float> maxeta{"maxeta", 1.2, "eta acceptance for loose track sample"};
Configurable<int> min_ncluster_tpc{"min_ncluster_tpc", 0, "min ncluster tpc"};
Configurable<int> mincrossedrows{"mincrossedrows", 70, "min crossed rows"};
Expand Down Expand Up @@ -954,11 +952,11 @@ struct prefilterPrimaryElectron {
return false;
}

if ((track.hasITS() && track.hasTPC()) && track_par_cov_recalc.getPt() < minpt_itstpc) {
if ((track.hasITS() && track.hasTPC()) && track_par_cov_recalc.getPt() < minpt) {
return false;
}

if ((track.hasITS() && !track.hasTPC() && !track.hasTOF() && !track.hasTRD()) && (track_par_cov_recalc.getPt() < minpt_itssa || maxpt_itssa < track_par_cov_recalc.getPt())) {
if ((track.hasITS() && !track.hasTPC() && !track.hasTOF() && !track.hasTRD()) && maxpt_itssa < track_par_cov_recalc.getPt()) {
return false;
}

Expand Down Expand Up @@ -1021,7 +1019,7 @@ struct prefilterPrimaryElectron {

Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;

Filter trackFilter = o2::aod::track::pt > minpt_itssa&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) == true;
Filter trackFilter = o2::aod::track::pt > minpt&& nabs(o2::aod::track::eta) < maxeta&& o2::aod::track::itsChi2NCl < maxchi2its&& ncheckbit(aod::track::v001::detectorMap, (uint8_t)o2::aod::track::ITS) == true;
using MyFilteredTracks = soa::Filtered<MyTracks>;
Partition<MyFilteredTracks> posTracks = o2::aod::track::signed1Pt > 0.f;
Partition<MyFilteredTracks> negTracks = o2::aod::track::signed1Pt < 0.f;
Expand Down
3 changes: 3 additions & 0 deletions PWGEM/Dilepton/Tasks/prefilterDielectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ struct prefilterDielectron {
Configurable<float> cfg_min_TOFNsigmaEl{"cfg_min_TOFNsigmaEl", -3.0, "min. TOF n sigma for electron inclusion"};
Configurable<float> cfg_max_TOFNsigmaEl{"cfg_max_TOFNsigmaEl", +3.0, "max. TOF n sigma for electron inclusion"};
Configurable<bool> enableTTCA{"enableTTCA", true, "Flag to enable or disable TTCA"};
Configurable<bool> includeITSsa{"includeITSsa", false, "Flag to enable ITSsa tracks"};
Configurable<float> cfg_max_pt_track_ITSsa{"cfg_max_pt_track_ITSsa", 0.15, "max pt for ITSsa tracks"};

// configuration for PID ML
Configurable<std::vector<std::string>> onnxFileNames{"onnxFileNames", std::vector<std::string>{"filename"}, "ONNX file names for each bin (if not from CCDB full path)"};
Expand Down Expand Up @@ -287,6 +289,7 @@ struct prefilterDielectron {
fDielectronCut.RequireITSib1st(dielectroncuts.cfg_require_itsib_1st);
fDielectronCut.SetChi2TOF(0, dielectroncuts.cfg_max_chi2tof);
fDielectronCut.SetRelDiffPin(dielectroncuts.cfg_min_rel_diff_pin, dielectroncuts.cfg_max_rel_diff_pin);
fDielectronCut.IncludeITSsa(dielectroncuts.includeITSsa, dielectroncuts.cfg_max_pt_track_ITSsa);

// for eID
fDielectronCut.SetPIDScheme(dielectroncuts.cfg_pid_scheme);
Expand Down
5 changes: 4 additions & 1 deletion PWGEM/Dilepton/Utils/MCUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
#ifndef PWGEM_DILEPTON_UTILS_MCUTILITIES_H_
#define PWGEM_DILEPTON_UTILS_MCUTILITIES_H_

#include "Framework/AnalysisDataModel.h"
#include "Framework/Logger.h"

#include <algorithm>
#include <string>
#include <vector>
#include <algorithm>

//_______________________________________________________________________
namespace o2::aod::pwgem::dilepton::utils::mcutil
Expand Down Expand Up @@ -238,14 +241,14 @@

int motherid = p.mothersIds()[0]; // first mother index
auto mp_tmp = mcparticles.iteratorAt(motherid);
if (abs(mp_tmp.pdgCode()) < 1e+9 && (std::to_string(abs(mp_tmp.pdgCode()))[std::to_string(abs(mp_tmp.pdgCode())).length() - 2] == '5' && std::to_string(abs(mp_tmp.pdgCode()))[std::to_string(abs(mp_tmp.pdgCode())).length() - 3] == '5') && abs(mp_tmp.pdgCode()) % 2 == 1) {

Check failure on line 244 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return -999; // reject bottomonia
}

while (motherid > -1) {
if (motherid < mcparticles.size()) { // protect against bad mother indices. why is this needed?
auto mp = mcparticles.iteratorAt(motherid);
if (abs(mp.pdgCode()) < 1e+9 && (std::to_string(abs(mp.pdgCode()))[std::to_string(abs(mp.pdgCode())).length() - 3] == '5' || std::to_string(abs(mp.pdgCode()))[std::to_string(abs(mp.pdgCode())).length() - 4] == '5')) {

Check failure on line 251 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return motherid;
}
if (mp.has_mothers()) {
Expand All @@ -271,13 +274,13 @@

int motherid = p.mothersIds()[0]; // first mother index
auto mp_tmp = mcparticles.iteratorAt(motherid);
if (abs(mp_tmp.pdgCode()) < 1e+9 && (std::to_string(abs(mp_tmp.pdgCode()))[std::to_string(abs(mp_tmp.pdgCode())).length() - 2] == '4' && std::to_string(abs(mp_tmp.pdgCode()))[std::to_string(abs(mp_tmp.pdgCode())).length() - 3] == '4') && abs(mp_tmp.pdgCode()) % 2 == 1) {

Check failure on line 277 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return -999; // reject bottomonia
}
while (motherid > -1) {
if (motherid < mcparticles.size()) { // protect against bad mother indices. why is this needed?
auto mp = mcparticles.iteratorAt(motherid);
if (abs(mp.pdgCode()) < 1e+9 && (std::to_string(abs(mp.pdgCode()))[std::to_string(abs(mp.pdgCode())).length() - 3] == '4' || std::to_string(abs(mp.pdgCode()))[std::to_string(abs(mp.pdgCode())).length() - 4] == '4')) {

Check failure on line 283 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return motherid;
}
if (mp.has_mothers()) {
Expand Down Expand Up @@ -392,8 +395,8 @@
if (mid1 == mid2) {
auto common_mp = mcparticles.iteratorAt(mid1);
int mp_pdg = common_mp.pdgCode();
bool is_mp_diquark = (1100 < abs(mp_pdg) && abs(mp_pdg) < 5600) && std::to_string(mp_pdg)[std::to_string(mp_pdg).length() - 2] == '0';

Check failure on line 398 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (!is_mp_diquark && abs(mp_pdg) < 1e+9 && (std::to_string(abs(mp_pdg))[std::to_string(abs(mp_pdg)).length() - 3] == '5' || std::to_string(abs(mp_pdg))[std::to_string(abs(mp_pdg)).length() - 4] == '5')) {

Check failure on line 399 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
mothers_id1.clear();
mothers_pdg1.clear();
mothers_id2.clear();
Expand All @@ -414,8 +417,8 @@
if (mid1 == mid2) {
auto common_mp = mcparticles.iteratorAt(mid1);
int mp_pdg = common_mp.pdgCode();
bool is_mp_diquark = (1100 < abs(mp_pdg) && abs(mp_pdg) < 5600) && std::to_string(mp_pdg)[std::to_string(mp_pdg).length() - 2] == '0';

Check failure on line 420 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (!is_mp_diquark && abs(mp_pdg) < 1e+9 && (std::to_string(abs(mp_pdg))[std::to_string(abs(mp_pdg)).length() - 3] == '5' || std::to_string(abs(mp_pdg))[std::to_string(abs(mp_pdg)).length() - 4] == '5')) {

Check failure on line 421 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
is_same_mother_found = true;
}
}
Expand Down Expand Up @@ -463,7 +466,7 @@
} else if (mothersids[1] < mothersids[0]) {
allmothersids.push_back(mothersids[0]);
allmothersids.push_back(mothersids[1]);
} else if ((80 < abs(o2::mcgenstatus::getGenStatusCode(p.statusCode())) && abs(o2::mcgenstatus::getGenStatusCode(p.statusCode())) < 90) || (100 < abs(o2::mcgenstatus::getGenStatusCode(p.statusCode())) && abs(o2::mcgenstatus::getGenStatusCode(p.statusCode())) < 110)) { // NOTE: THIS IS GENERATOR DEPENDENT AND WORKS ONLY FOR PYTHIA!

Check failure on line 469 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
for (int i = mothersids[0]; i <= mothersids[1]; i++) {
allmothersids.push_back(i);
}
Expand All @@ -482,7 +485,7 @@
auto mother = mcParticles.iteratorAt(i);
int mpdg = mother.pdgCode();
// if (abs(mpdg) == pdg && mpdg * p.pdgCode() > 0) { // check for quark
if (abs(mpdg) == pdg) { // check for quark to allow for beauty and charm + oscillation

Check failure on line 488 in PWGEM/Dilepton/Utils/MCUtilities.h

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
if (quark_id > -1 || next_mother_id > -1) { // we already found a possible candidate in the list of mothers, so now we have (at least) two
// LOG(warning) << "Flavour tracking is ambiguous. Stopping here.";
return -1;
Expand Down
13 changes: 10 additions & 3 deletions PWGEM/PhotonMeson/Core/DalitzEECut.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
// Class for dilepton Cut
//

#include <utility>
#include <set>
#include "PWGEM/PhotonMeson/Core/DalitzEECut.h"

#include "Framework/Logger.h"
#include "PWGEM/PhotonMeson/Core/DalitzEECut.h"

#include <set>
#include <utility>

ClassImp(DalitzEECut);

Expand Down Expand Up @@ -179,3 +180,9 @@ void DalitzEECut::SetPIDScheme(int scheme)
mPIDScheme = scheme;
LOG(info) << "DalitzEE Cut, PID scheme: " << static_cast<int>(mPIDScheme);
}
void DalitzEECut::IncludeITSsa(bool flag, float max)
{
mIncludeITSsa = flag;
mMaxPtITSsa = max;
LOG(info) << "DalitzEE Cut, include ITSsa tracks: " << mIncludeITSsa << ", mMaxPtITSsa = " << mMaxPtITSsa;
}
Loading
Loading