Skip to content
Open
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
2 changes: 1 addition & 1 deletion PWGCF/EbyEFluctuations/Tasks/meanptFluctuations.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;

#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, (DEFAULT), (HELP)};
#define O2_DEFINE_CONFIGURABLE(NAME, TYPE, DEFAULT, HELP) Configurable<TYPE> NAME{#NAME, DEFAULT, HELP};

struct MeanptFluctuations {

Expand Down
40 changes: 20 additions & 20 deletions PWGCF/Femto3D/Core/femto3dPairTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ class FemtoPair
void SetIdentical(const bool& isidentical) { _isidentical = isidentical; }
void SetMagField1(const float& magfield1) { _magfield1 = magfield1; }
void SetMagField2(const float& magfield2) { _magfield2 = magfield2; }
void SetPDG1(const int& PDG1) { _PDG1 = PDG1; }
void SetPDG2(const int& PDG2) { _PDG2 = PDG2; }
int GetPDG1() { return _PDG1; }
int GetPDG2() { return _PDG2; }
void SetPDG1(const int& pdg1) { _pdg1 = pdg1; }
void SetPDG2(const int& pdg2) { _pdg2 = pdg2; }
int GetPDG1() { return _pdg1; }
int GetPDG2() { return _pdg2; }
void ResetPair();
void ResetAll();

Expand Down Expand Up @@ -241,7 +241,7 @@ class FemtoPair
TrackType _first = NULL;
TrackType _second = NULL;
float _magfield1 = 0.0, _magfield2 = 0.0;
int _PDG1 = 0, _PDG2 = 0;
int _pdg1 = 0, _pdg2 = 0;
bool _isidentical = true;
std::array<float, 9> TPCradii = {0.85, 1.05, 1.25, 1.45, 1.65, 1.85, 2.05, 2.25, 2.45};
};
Expand All @@ -260,8 +260,8 @@ void FemtoPair<TrackType>::ResetAll()
_second = NULL;
_magfield1 = 0.0;
_magfield2 = 0.0;
_PDG1 = 0;
_PDG2 = 0;
_pdg1 = 0;
_pdg2 = 0;
_isidentical = true;
}

Expand Down Expand Up @@ -342,13 +342,13 @@ float FemtoPair<TrackType>::GetKstar() const
return -1000;
if (_magfield1 * _magfield2 == 0)
return -1000;
if (_PDG1 * _PDG2 == 0)
if (_pdg1 * _pdg2 == 0)
return -1000;

TLorentzVector first4momentum;
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_PDG1));
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_pdg1));
TLorentzVector second4momentum;
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_PDG2));
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_pdg2));

return GetKstarFrom4vectors(first4momentum, second4momentum, _isidentical);
}
Expand All @@ -360,13 +360,13 @@ TVector3 FemtoPair<TrackType>::GetQLCMS() const
return TVector3(-1000, -1000, -1000);
if (_magfield1 * _magfield2 == 0)
return TVector3(-1000, -1000, -1000);
if (_PDG1 * _PDG2 == 0)
if (_pdg1 * _pdg2 == 0)
return TVector3(-1000, -1000, -1000);

TLorentzVector first4momentum;
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_PDG1));
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_pdg1));
TLorentzVector second4momentum;
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_PDG2));
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_pdg2));

return GetQLCMSFrom4vectors(first4momentum, second4momentum);
}
Expand All @@ -378,7 +378,7 @@ float FemtoPair<TrackType>::GetKt() const
return -1000;
if (_magfield1 * _magfield2 == 0)
return -1000;
if (_PDG1 * _PDG2 == 0)
if (_pdg1 * _pdg2 == 0)
return -1000;
const float px = _first->px() + _second->px();
const float py = _first->py() + _second->py();
Expand All @@ -392,13 +392,13 @@ float FemtoPair<TrackType>::GetMt() const
return -1000;
if (_magfield1 * _magfield2 == 0)
return -1000;
if (_PDG1 * _PDG2 == 0)
if (_pdg1 * _pdg2 == 0)
return -1000;

TLorentzVector first4momentum;
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_PDG1));
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_pdg1));
TLorentzVector second4momentum;
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_PDG2));
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_pdg2));

TLorentzVector fourmomentasum = first4momentum + second4momentum;

Expand All @@ -412,7 +412,7 @@ float FemtoPair<TrackType>::GetGammaOut() const
return -1000;
if (_magfield1 * _magfield2 == 0)
return -1000;
if (_PDG1 * _PDG2 == 0)
if (_pdg1 * _pdg2 == 0)
return -1000;

// double Qinv = 2.0 * GetKstar();
Expand All @@ -421,9 +421,9 @@ float FemtoPair<TrackType>::GetGammaOut() const
// return std::fabs(QLCMS.X() / Qout_PRF);

TLorentzVector first4momentum;
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_PDG1));
first4momentum.SetPtEtaPhiM(_first->pt(), _first->eta(), _first->phi(), particle_mass(_pdg1));
TLorentzVector second4momentum;
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_PDG2));
second4momentum.SetPtEtaPhiM(_second->pt(), _second->eta(), _second->phi(), particle_mass(_pdg2));

TLorentzVector fourmomentasum = first4momentum + second4momentum;

Expand Down
10 changes: 5 additions & 5 deletions PWGCF/Femto3D/Tasks/PIDoptimization.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ struct PidOptimization {
Configurable<bool> _requestVertexITSTPC{"requestVertexITSTPC", false, ""};
Configurable<int> _requestVertexTOForTRDmatched{"requestVertexTOFmatched", 0, "0 -> no selectio; 1 -> vertex is matched to TOF or TRD; 2 -> matched to both;"};
Configurable<bool> _requestNoCollInTimeRangeStandard{"requestNoCollInTimeRangeStandard", false, ""};
Configurable<std::pair<float, float>> _IRcut{"IRcut", std::pair<float, float>{0.f, 100.f}, "[min., max.] IR range to keep events within"};
Configurable<std::pair<int, int>> _OccupancyCut{"OccupancyCut", std::pair<int, int>{0, 10000}, "[min., max.] occupancy range to keep events within"};
Configurable<std::pair<float, float>> IRcut{"IRcut", std::pair<float, float>{0.f, 100.f}, "[min., max.] IR range to keep events within"};
Configurable<std::pair<int, int>> OccupancyCut{"OccupancyCut", std::pair<int, int>{0, 10000}, "[min., max.] occupancy range to keep events within"};

Configurable<int> _sign{"sign", 1, "sign of a track"};
Configurable<float> _vertexZ{"VertexZ", 20.0, "abs vertexZ value limit"};
Expand All @@ -79,7 +79,7 @@ struct PidOptimization {
Configurable<int> _particlePDG{"particlePDG", 2212, "PDG code of a particle to perform PID for (only pion, kaon, proton and deurton are supported now)"};
Configurable<std::pair<float, float>> _tpcNSigma{"tpcNSigma", std::pair<float, float>{-100, 100}, "Nsigma range in TPC before the TOF is used"};
Configurable<std::pair<float, float>> _itsNSigma{"itsNSigma", std::pair<float, float>{-100, 100}, "Nsigma range in ITS to use along with TPC"};
Configurable<float> _PIDtrshld{"PIDtrshld", 10.0, "value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<float> PIDtrshld{"PIDtrshld", 10.0, "value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<std::pair<float, float>> _tofNSigma{"tofNSigma", std::pair<float, float>{-100, 100}, "Nsigma range in TOF"};
Configurable<std::pair<float, float>> _tpcNSigmaResidual{"tpcNSigmaResidual", std::pair<float, float>{-10, 10}, "residual TPC Nsigma cut to use with the TOF"};
Configurable<int> _particlePDGtoReject{"particlePDGtoReject", 211, "PDG codes of perticles that will be rejected with TOF (only pion, kaon, proton and deurton are supported now)"};
Expand Down Expand Up @@ -211,7 +211,7 @@ struct PidOptimization {
// continue;
// if (collision.hadronicRate() < _IRcut.value.first || collision.hadronicRate() >= _IRcut.value.second)
// continue;
if (collision.trackOccupancyInTimeRange() < _OccupancyCut.value.first || collision.trackOccupancyInTimeRange() >= _OccupancyCut.value.second)
if (collision.trackOccupancyInTimeRange() < OccupancyCut.value.first || collision.trackOccupancyInTimeRange() >= OccupancyCut.value.second)
continue;

histos.fill(HIST("vtz"), collision.posZ());
Expand All @@ -229,7 +229,7 @@ struct PidOptimization {
if (std::fabs(track.dcaXY()) > _dcaXY.value[0] + _dcaXY.value[1] * std::pow(track.pt(), _dcaXY.value[2]) || std::fabs(track.dcaZ()) > _dcaZ.value[0] + _dcaZ.value[1] * std::pow(track.pt(), _dcaZ.value[2]))
continue;

bool belowThreshold = track.p() < _PIDtrshld;
bool belowThreshold = track.p() < PIDtrshld;
float tpcSigma = getTPCNsigma(track, _particlePDG);
float itsSigma = getITSNsigma(track, _particlePDG);
float tofSigma = getTOFNsigma(track, _particlePDG);
Expand Down
30 changes: 15 additions & 15 deletions PWGCF/Femto3D/Tasks/femto3dPairTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ struct FemtoCorrelations {
Configurable<int> _requestVertexTOForTRDmatched{"requestVertexTOFmatched", 0, "0 -> no selectio; 1 -> vertex is matched to TOF or TRD; 2 -> matched to both;"};
Configurable<bool> _requestNoCollInTimeRangeStandard{"requestNoCollInTimeRangeStandard", false, ""};
Configurable<bool> _requestIsGoodITSLayersAll{"requestIsGoodITSLayersAll", false, "cut time intervals with dead ITS staves"};
Configurable<std::pair<float, float>> _IRcut{"IRcut", std::pair<float, float>{0.f, 100.f}, "[min., max.] IR range to keep events within"};
Configurable<std::pair<int, int>> _OccupancyCut{"OccupancyCut", std::pair<int, int>{0, 10000}, "[min., max.] occupancy range to keep events within"};
Configurable<std::pair<float, float>> IRcut{"IRcut", std::pair<float, float>{0.f, 100.f}, "[min., max.] IR range to keep events within"};
Configurable<std::pair<int, int>> OccupancyCut{"OccupancyCut", std::pair<int, int>{0, 10000}, "[min., max.] occupancy range to keep events within"};

Configurable<float> _min_P{"min_P", 0.0, "lower mometum limit"};
Configurable<float> _max_P{"max_P", 100.0, "upper mometum limit"};
Expand All @@ -82,15 +82,15 @@ struct FemtoCorrelations {
Configurable<int> _particlePDG_1{"particlePDG_1", 2212, "PDG code of the first particle in a pair to perform PID for (only pion, kaon, proton and deurton are supported now)"};
Configurable<std::vector<float>> _tpcNSigma_1{"tpcNSigma_1", std::vector<float>{-3.0f, 3.0f}, "first particle PID: Nsigma range in TPC before the TOF is used"};
Configurable<std::vector<float>> _itsNSigma_1{"itsNSigma_1", std::vector<float>{-10.0f, 10.0f}, "first particle PID: Nsigma range in ITS with TPC is used"};
Configurable<float> _PIDtrshld_1{"PIDtrshld_1", 10.0, "first particle PID: value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<float> PIDtrshld_1{"PIDtrshld_1", 10.0, "first particle PID: value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<std::vector<float>> _tofNSigma_1{"tofNSigma_1", std::vector<float>{-3.0f, 3.0f}, "first particle PID: Nsigma range in TOF"};
Configurable<std::vector<float>> _tpcNSigmaResidual_1{"tpcNSigmaResidual_1", std::vector<float>{-5.0f, 5.0f}, "first particle PID: residual TPC Nsigma cut to use with the TOF"};

Configurable<int> _sign_2{"sign_2", 1, "sign of the second particle in a pair"};
Configurable<int> _particlePDG_2{"particlePDG_2", 2212, "PDG code of the second particle in a pair to perform PID for (only pion, kaon, proton and deurton are supported now)"};
Configurable<std::vector<float>> _tpcNSigma_2{"tpcNSigma_2", std::vector<float>{-3.0f, 3.0f}, "second particle PID: Nsigma range in TPC before the TOF is used"};
Configurable<std::vector<float>> _itsNSigma_2{"itsNSigma_2", std::vector<float>{-10.0f, 10.0f}, "first particle PID: Nsigma range in ITS with TPC is used"};
Configurable<float> _PIDtrshld_2{"PIDtrshld_2", 10.0, "second particle PID: value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<float> PIDtrshld_2{"PIDtrshld_2", 10.0, "second particle PID: value of momentum from which the PID is done with TOF (before that only TPC is used)"};
Configurable<std::vector<float>> _tofNSigma_2{"tofNSigma_2", std::vector<float>{-3.0f, 3.0f}, "second particle PID: Nsigma range in TOF"};
Configurable<std::vector<float>> _tpcNSigmaResidual_2{"tpcNSigmaResidual_2", std::vector<float>{-5.0f, 5.0f}, "second particle PID: residual TPC Nsigma cut to use with the TOF"};

Expand Down Expand Up @@ -121,7 +121,7 @@ struct FemtoCorrelations {
// P.P.S. the chosen way of optimizing the mixing midgt not be the correct one -- feel free to propose the right one!
// P.P.P.S. choose wisely....
// P.P.P.P.S this way is still being testing i might be reconsidered; might change in the future, keep looking at the source code
Configurable<unsigned int> _MEreductionFactor{"MEreductionFactor", 1, "only one (pseudo)randomly choosen event out per pair $value events will be processed and contribute to the final mixing (if < 2 -> all the possible event pairs (per vertex&cent bin) will be processed); implemented for the sake of efficiency; look at the source code;"};
Configurable<unsigned int> MEreductionFactor{"MEreductionFactor", 1, "only one (pseudo)randomly choosen event out per pair $value events will be processed and contribute to the final mixing (if < 2 -> all the possible event pairs (per vertex&cent bin) will be processed); implemented for the sake of efficiency; look at the source code;"};

bool IsIdentical = true;

Expand Down Expand Up @@ -443,14 +443,14 @@ struct FemtoCorrelations {
continue;
if (track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().multPerc() < *_centBins.value.begin() || track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().multPerc() >= *(_centBins.value.end() - 1))
continue;
if (track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().hadronicRate() < _IRcut.value.first || track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().hadronicRate() >= _IRcut.value.second)
if (track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().hadronicRate() < IRcut.value.first || track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().hadronicRate() >= IRcut.value.second)
continue;
if (track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().occupancy() < _OccupancyCut.value.first || track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().occupancy() >= _OccupancyCut.value.second)
if (track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().occupancy() < OccupancyCut.value.first || track.template singleCollSel_as<soa::Filtered<FilteredCollisions>>().occupancy() >= OccupancyCut.value.second)
continue;
if (std::fabs(track.dcaXY()) > _dcaXY.value[0] + _dcaXY.value[1] * std::pow(track.pt(), _dcaXY.value[2]) || std::fabs(track.dcaZ()) > _dcaZ.value[0] + _dcaZ.value[1] * std::pow(track.pt(), _dcaZ.value[2]))
continue;

if (track.sign() == _sign_1 && (track.p() < _PIDtrshld_1 ? o2::aod::singletrackselector::TPCselection<true>(track, TPCcuts_1, _itsNSigma_1.value) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_1, _tpcNSigmaResidual_1.value))) { // filling the map: eventID <-> selected particles1
if (track.sign() == _sign_1 && (track.p() < PIDtrshld_1 ? o2::aod::singletrackselector::TPCselection<true>(track, TPCcuts_1, _itsNSigma_1.value) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_1, _tpcNSigmaResidual_1.value))) { // filling the map: eventID <-> selected particles1
if ((_rejectWithinNsigmaTPC != 0.0 && std::fabs(o2::aod::singletrackselector::getTPCNsigma(track, _particlePDGtoReject)) < _rejectWithinNsigmaTPC) || (_rejectWithinNsigmaTOF != 0.0 && std::fabs(o2::aod::singletrackselector::getTOFNsigma(track, _particlePDGtoReject)) < _rejectWithinNsigmaTOF))
continue;

Expand All @@ -464,7 +464,7 @@ struct FemtoCorrelations {

if (IsIdentical) {
continue;
} else if (track.sign() != _sign_2 && (track.p() < _PIDtrshld_2 ? o2::aod::singletrackselector::TPCselection<true>(track, TPCcuts_2, _itsNSigma_2.value) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_2, _tpcNSigmaResidual_2.value))) { // filling the map: eventID <-> selected particles2 if (see condition above ^)
} else if (track.sign() != _sign_2 && (track.p() < PIDtrshld_2 ? o2::aod::singletrackselector::TPCselection<true>(track, TPCcuts_2, _itsNSigma_2.value) : o2::aod::singletrackselector::TOFselection(track, TOFcuts_2, _tpcNSigmaResidual_2.value))) { // filling the map: eventID <-> selected particles2 if (see condition above ^)
selectedtracks_2[track.singleCollSelId()].push_back(std::make_shared<soa::Filtered<FilteredTracks>::iterator>(track));

pHisto_second->Fill(track.p());
Expand All @@ -477,9 +477,9 @@ struct FemtoCorrelations {
for (const auto& collision : collisions) {
if (collision.multPerc() < *_centBins.value.begin() || collision.multPerc() >= *(_centBins.value.end() - 1))
continue;
if (collision.hadronicRate() < _IRcut.value.first || collision.hadronicRate() >= _IRcut.value.second)
if (collision.hadronicRate() < IRcut.value.first || collision.hadronicRate() >= IRcut.value.second)
continue;
if (collision.occupancy() < _OccupancyCut.value.first || collision.occupancy() >= _OccupancyCut.value.second)
if (collision.occupancy() < OccupancyCut.value.first || collision.occupancy() >= OccupancyCut.value.second)
continue;

if (_removeSameBunchPileup && !collision.isNoSameBunchPileup())
Expand Down Expand Up @@ -530,9 +530,9 @@ struct FemtoCorrelations {
mixTracks(selectedtracks_1[col1->index()], centBin); // mixing SE identical

for (unsigned int indx2 = indx1 + 1; indx2 < EvPerBin; indx2++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin
if (_MEreductionFactor.value > 1) {
if (MEreductionFactor.value > 1) {
std::mt19937 mt(std::chrono::steady_clock::now().time_since_epoch().count());
if ((mt() % (_MEreductionFactor.value + 1)) < _MEreductionFactor.value)
if ((mt() % (MEreductionFactor.value + 1)) < MEreductionFactor.value)
continue;
}

Expand Down Expand Up @@ -562,9 +562,9 @@ struct FemtoCorrelations {
mixTracks<0>(selectedtracks_1[col1->index()], selectedtracks_2[col1->index()], centBin); // mixing SE non-identical, in <> brackets: 0 -- SE; 1 -- ME

for (unsigned int indx2 = indx1 + 1; indx2 < EvPerBin; indx2++) { // nested loop for all the combinations of collisions in a chosen mult/vertex bin
if (_MEreductionFactor.value > 1) {
if (MEreductionFactor.value > 1) {
std::mt19937 mt(std::chrono::steady_clock::now().time_since_epoch().count());
if (mt() % (_MEreductionFactor.value + 1) < _MEreductionFactor.value)
if (mt() % (MEreductionFactor.value + 1) < MEreductionFactor.value)
continue;
}

Expand Down
Loading
Loading