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
2 changes: 1 addition & 1 deletion Common/Tools/handleParamTPCResponse.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ int main(int argc, char* argv[])
// Request interactive confirmation to upload
LOG(info) << "Continue with object upload anyway? (Y/n)";
std::string confirm;
cin >> confirm;
std::cin >> confirm;
if (boost::iequals(confirm.substr(0, 1), "y")) {
LOG(info) << "Continuing with object upload";
} else {
Expand Down
1 change: 1 addition & 0 deletions DPG/Tasks/AOTTrack/qaMatchEff.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
//
// base namespaces
using namespace o2;
using namespace o2::constants::math;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Vit, thanks a lot! Just for me to understand, is this now needed because of a change in the includes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @njacazio , yes, this one in particular is a fix of pollution from Framework/AnalysisDataModel.h (see https://github.com/AliceO2Group/AliceO2/pull/11851/files#diff-6410cfe670c62cda55ab26854e52f05a3b75d325cb663e7852d79df3d4bad58e).

using namespace o2::framework;
using namespace o2::framework::expressions;
using std::array;
Expand Down
2 changes: 1 addition & 1 deletion EventFiltering/PWGHF/HFFilterHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static const o2::framework::AxisSpec nSigmaAxis{100, -10.f, 10.f};
static const o2::framework::AxisSpec alphaAxis{100, -1.f, 1.f};
static const o2::framework::AxisSpec qtAxis{100, 0.f, 0.25f};
static const o2::framework::AxisSpec bdtAxis{100, 0.f, 1.f};
static const o2::framework::AxisSpec phiAxis{36, 0., TwoPI};
static const o2::framework::AxisSpec phiAxis{36, 0., o2::constants::math::TwoPI};
static const std::array<o2::framework::AxisSpec, kNCharmParticles + 8> massAxisC = {o2::framework::AxisSpec{100, 1.65f, 2.05f}, o2::framework::AxisSpec{100, 1.65f, 2.05f}, o2::framework::AxisSpec{100, 1.75f, 2.15f}, o2::framework::AxisSpec{100, 2.05f, 2.45f}, o2::framework::AxisSpec{100, 2.25f, 2.65f}, o2::framework::AxisSpec{100, 0.139f, 0.159f}, o2::framework::AxisSpec{100, 0.f, 0.25f}, o2::framework::AxisSpec{100, 0.f, 0.25f}, o2::framework::AxisSpec{100, 0.48f, 0.88f}, o2::framework::AxisSpec{100, 0.48f, 0.88f}, o2::framework::AxisSpec{100, 1.1f, 1.4f}, o2::framework::AxisSpec{100, 2.3f, 2.9f}, o2::framework::AxisSpec{100, 2.3f, 2.9f}};
static const std::array<o2::framework::AxisSpec, kNBeautyParticles> massAxisB = {o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 4.8f, 6.0f}, o2::framework::AxisSpec{240, 5.0f, 6.2f}, o2::framework::AxisSpec{240, 5.0f, 6.2f}};

Expand Down
8 changes: 4 additions & 4 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseAngularContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ class FemtoUniverseAngularContainer
framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"};

// angular correlations
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};

Expand Down Expand Up @@ -159,10 +159,10 @@ class FemtoUniverseAngularContainer
delta_phi = part1.phi() - part2.phi();

while (delta_phi < mPhiLow) {
delta_phi += TwoPI;
delta_phi += o2::constants::math::TwoPI;
}
while (delta_phi > mPhiHigh) {
delta_phi -= TwoPI;
delta_phi -= o2::constants::math::TwoPI;
}

mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), delta_phi, delta_eta);
Expand Down
8 changes: 4 additions & 4 deletions PWGCF/FemtoUniverse/Core/FemtoUniverseContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class FemtoUniverseContainer
framework::AxisSpec mTAxis3D = {mTBins3D, "#it{m}_{T} (GeV/#it{c})"};

// angular correlations
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};

Expand Down Expand Up @@ -175,10 +175,10 @@ class FemtoUniverseContainer
delta_phi = part1.phi() - part2.phi();

while (delta_phi < mPhiLow) {
delta_phi += TwoPI;
delta_phi += o2::constants::math::TwoPI;
}
while (delta_phi > mPhiHigh) {
delta_phi -= TwoPI;
delta_phi -= o2::constants::math::TwoPI;
}

mHistogramRegistry->fill(HIST(mFolderSuffix[mEventType]) + HIST(o2::aod::femtouniverseMCparticle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs);
Expand Down
9 changes: 4 additions & 5 deletions PWGCF/FemtoWorld/Core/FemtoWorldContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "TRandom.h"

using namespace o2::framework;
using namespace o2::constants::math;

namespace o2::analysis::femtoWorld
{
Expand Down Expand Up @@ -87,8 +86,8 @@ class FemtoWorldContainer
framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"};
framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"};

mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;

framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
Expand Down Expand Up @@ -154,10 +153,10 @@ class FemtoWorldContainer
double delta_phi = part1.phi() - part2.phi();

while (delta_phi < mPhiLow) {
delta_phi += TwoPI;
delta_phi += o2::constants::math::TwoPI;
}
while (delta_phi > mPhiHigh) {
delta_phi -= TwoPI;
delta_phi -= o2::constants::math::TwoPI;
}
TLorentzVector part1Vec;
part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne);
Expand Down
9 changes: 4 additions & 5 deletions PWGCF/FemtoWorld/Core/FemtoWorldPionContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "TRandom.h"

using namespace o2::framework;
using namespace o2::constants::math;

namespace o2::analysis::femtoWorld
{
Expand Down Expand Up @@ -91,8 +90,8 @@ class FemtoWorldPionContainer
framework::AxisSpec kTAxis = {kTBins, "#it{k}_{T} (GeV/#it{c})"};
framework::AxisSpec mTAxis = {mTBins, "#it{m}_{T} (GeV/#it{c}^{2})"};

mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiHigh = 2 * PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * PI / phiBins;
mPhiLow = (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;
mPhiHigh = 2 * o2::constants::math::PI + (-static_cast<int>(phiBins / 4) + 0.5) * 2. * o2::constants::math::PI / phiBins;

framework::AxisSpec phiAxis = {phiBins, mPhiLow, mPhiHigh};
framework::AxisSpec etaAxis = {etaBins, -2.0, 2.0};
Expand Down Expand Up @@ -141,10 +140,10 @@ class FemtoWorldPionContainer
double delta_phi = part1.phi() - part2.phi();

while (delta_phi < mPhiLow) {
delta_phi += TwoPI;
delta_phi += o2::constants::math::TwoPI;
}
while (delta_phi > mPhiHigh) {
delta_phi -= TwoPI;
delta_phi -= o2::constants::math::TwoPI;
}
TLorentzVector part1Vec;
part1Vec.SetPtEtaPhiM(part1.pt(), part1.eta(), part1.phi(), mMassOne);
Expand Down
6 changes: 6 additions & 0 deletions PWGCF/GenericFramework/GFW.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ If used, modified, or distributed, please aknowledge the author of this code.
*/

#include "GFW.h"

using std::complex;
using std::pair;
using std::string;
using std::vector;

GFW::GFW() : fInitialized(false) {}

GFW::~GFW()
Expand Down
61 changes: 30 additions & 31 deletions PWGCF/GenericFramework/GFW.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,25 @@ If used, modified, or distributed, please aknowledge the author of this code.
*/
#ifndef PWGCF_GENERICFRAMEWORK_GFW_H_
#define PWGCF_GENERICFRAMEWORK_GFW_H_

#include "GFWCumulant.h"
#include "GFWPowerArray.h"
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <complex>
using std::complex;
using std::string;
using std::vector;

class GFW
{
public:
struct Region {
int Nhar, NpT;
vector<int> NparVec{};
std::vector<int> NparVec{};
double EtaMin = -999;
double EtaMax = -999;
int BitMask = 1;
string rName = "";
std::string rName = "";
bool powsDefined = false;
bool operator<(const Region& a) const
{
Expand All @@ -46,47 +45,47 @@ class GFW
void PrintStructure() { printf("%s: eta [%f.. %f].", rName.c_str(), EtaMin, EtaMax); }
};
struct CorrConfig {
vector<vector<int>> Regs{};
vector<vector<int>> Hars{};
vector<int> Overlap;
vector<int> ptInd;
std::vector<std::vector<int>> Regs{};
std::vector<std::vector<int>> Hars{};
std::vector<int> Overlap;
std::vector<int> ptInd;
bool pTDif = false;
string Head = "";
std::string Head = "";
};
GFW();
~GFW();
vector<Region> fRegions;
vector<GFWCumulant> fCumulants;
void AddRegion(string refName, double lEtaMin, double lEtaMax, int lNpT, int BitMask);
void AddRegion(string refName, vector<int> lNparVec, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy
void AddRegion(string refName, int lNhar, int lNpar, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy support, all powers are the same
void AddRegion(string refName, int lNhar, int* lNparVec, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy support, array instead of a vector
std::vector<Region> fRegions;
std::vector<GFWCumulant> fCumulants;
void AddRegion(std::string refName, double lEtaMin, double lEtaMax, int lNpT, int BitMask);
void AddRegion(std::string refName, std::vector<int> lNparVec, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy
void AddRegion(std::string refName, int lNhar, int lNpar, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy support, all powers are the same
void AddRegion(std::string refName, int lNhar, int* lNparVec, double lEtaMin, double lEtaMax, int lNpT, int BitMask); // Legacy support, array instead of a vector
int CreateRegions();
void Fill(double eta, int ptin, double phi, double weight, int mask, double secondWeight = -1);
void Clear();
GFWCumulant GetCumulant(int index) { return fCumulants.at(index); }
CorrConfig GetCorrelatorConfig(string config, string head = "", bool ptdif = false);
complex<double> Calculate(CorrConfig corconf, int ptbin, bool SetHarmsToZero);
CorrConfig GetCorrelatorConfig(std::string config, std::string head = "", bool ptdif = false);
std::complex<double> Calculate(CorrConfig corconf, int ptbin, bool SetHarmsToZero);
void InitializePowerArrays();

protected:
bool fInitialized;
vector<CorrConfig> fListOfCFGs;
complex<double> TwoRec(int n1, int n2, int p1, int p2, int ptbin, GFWCumulant*, GFWCumulant*, GFWCumulant*);
complex<double> RecursiveCorr(GFWCumulant* qpoi, GFWCumulant* qref, GFWCumulant* qol, int ptbin, vector<int>& hars, vector<int>& pows); // POI, Ref. flow, overlapping region
complex<double> RecursiveCorr(GFWCumulant* qpoi, GFWCumulant* qref, GFWCumulant* qol, int ptbin, vector<int>& hars); // POI, Ref. flow, overlapping region
std::vector<CorrConfig> fListOfCFGs;
std::complex<double> TwoRec(int n1, int n2, int p1, int p2, int ptbin, GFWCumulant*, GFWCumulant*, GFWCumulant*);
std::complex<double> RecursiveCorr(GFWCumulant* qpoi, GFWCumulant* qref, GFWCumulant* qol, int ptbin, std::vector<int>& hars, std::vector<int>& pows); // POI, Ref. flow, overlapping region
std::complex<double> RecursiveCorr(GFWCumulant* qpoi, GFWCumulant* qref, GFWCumulant* qol, int ptbin, std::vector<int>& hars); // POI, Ref. flow, overlapping region
void AddRegion(Region inreg) { fRegions.push_back(inreg); }
Region GetRegion(int index) { return fRegions.at(index); }
int FindRegionByName(string refName);
vector<pair<int, vector<int>>> GetHarmonicsSingleConfig(const CorrConfig&);
int FindRegionByName(std::string refName);
std::vector<std::pair<int, std::vector<int>>> GetHarmonicsSingleConfig(const CorrConfig&);
// Calculating functions:
complex<double> Calculate(int poi, int ref, vector<int> hars, int ptbin = 0); // For differential, need POI and reference
complex<double> Calculate(int poi, vector<int> hars); // For integrated case
std::complex<double> Calculate(int poi, int ref, std::vector<int> hars, int ptbin = 0); // For differential, need POI and reference
std::complex<double> Calculate(int poi, std::vector<int> hars); // For integrated case
// Operations on strings. Equivalent to TString operations, but one to rid of root dependence
int s_index(string& instr, const string& pattern, const int& spos = 0);
bool s_contains(string& instr, const string& pattern);
void s_replace(string& instr, const string& pattern1, const string& pattern2, const int& spos = 0);
void s_replace_all(string& instr, const string& pattern1, const string& pattern2);
bool s_tokenize(string& instr, string& substr, int& spos, const string& delim);
int s_index(std::string& instr, const std::string& pattern, const int& spos = 0);
bool s_contains(std::string& instr, const std::string& pattern);
void s_replace(std::string& instr, const std::string& pattern1, const std::string& pattern2, const int& spos = 0);
void s_replace_all(std::string& instr, const std::string& pattern1, const std::string& pattern2);
bool s_tokenize(std::string& instr, std::string& substr, int& spos, const std::string& delim);
};
#endif // PWGCF_GENERICFRAMEWORK_GFW_H_
5 changes: 5 additions & 0 deletions PWGCF/GenericFramework/GFWCumulant.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,12 @@ A part of <GFW.cxx/h>
A container to store Q vectors for one subevent with an extra layer to recursively calculate particle correlations.
If used, modified, or distributed, please aknowledge the author of this code.
*/

#include "GFWCumulant.h"

using std::complex;
using std::vector;

GFWCumulant::GFWCumulant() : fQvector(0),
fUsed(kBlank),
fNEntries(-1),
Expand Down
14 changes: 7 additions & 7 deletions PWGCF/GenericFramework/GFWCumulant.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ If used, modified, or distributed, please aknowledge the author of this code.
*/
#ifndef PWGCF_GENERICFRAMEWORK_GFWCUMULANT_H_
#define PWGCF_GENERICFRAMEWORK_GFWCUMULANT_H_

#include <cmath>
#include <complex>
#include <vector>
using std::complex;
using std::vector;

class GFWCumulant
{
public:
Expand All @@ -42,22 +42,22 @@ class GFWCumulant
int GetN() { return fNEntries; }
bool IsPtBinFilled(int ptb);
void CreateComplexVectorArray(int N = 1, int P = 1, int Pt = 1);
void CreateComplexVectorArrayVarPower(int N = 1, vector<int> Pvec = {1}, int Pt = 1);
void CreateComplexVectorArrayVarPower(int N = 1, std::vector<int> Pvec = {1}, int Pt = 1);
int PW(int ind) { return fPowVec.at(ind); }; // No checks to speed up, be carefull!!!
void DestroyComplexVectorArray();
complex<double> Vec(int, int, int ptbin = 0); // envelope class to summarize pt-dif. Q-vec getter
std::complex<double> Vec(int, int, int ptbin = 0); // envelope class to summarize pt-dif. Q-vec getter
protected:
complex<double>*** fQvector;
std::complex<double>*** fQvector;
uint fUsed;
int fNEntries;
// Q-vectors. Could be done recursively, but maybe defining each one of them explicitly is easier to read
int fN; //! Harmonics
int fPow; //! Power
vector<int> fPowVec; //! Powers array
std::vector<int> fPowVec; //! Powers array
int fPt; //! fPt bins
bool* fFilledPts;
bool fInitialized; // Arrays are initialized
complex<double> fNullQ = 0;
std::complex<double> fNullQ = 0;
};

#endif // PWGCF_GENERICFRAMEWORK_GFWCUMULANT_H_
4 changes: 4 additions & 0 deletions PWGCF/GenericFramework/GFWPowerArray.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
// or submit itself to any jurisdiction.

#include "GFWPowerArray.h"

using std::string;
using std::vector;

int GFWPowerArray::getHighestHarmonic(const HarSet& inhar)
{
// Highest possible harmonic: sum of same-sign harmonics
Expand Down
9 changes: 4 additions & 5 deletions PWGCF/GenericFramework/GFWPowerArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

#ifndef PWGCF_GENERICFRAMEWORK_GFWPOWERARRAY_H_
#define PWGCF_GENERICFRAMEWORK_GFWPOWERARRAY_H_

#include <vector>
#include <cmath>
#include <string>
using namespace std;
using std::string;
using std::vector;
typedef vector<int> HarSet;

typedef std::vector<int> HarSet;
class GFWPowerArray
{
public:
static HarSet GetPowerArray(vector<HarSet> inHarmonics);
static HarSet GetPowerArray(std::vector<HarSet> inHarmonics);
static void PowerArrayTest();

private:
Expand Down
3 changes: 3 additions & 0 deletions PWGDQ/Core/MCSignal.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#include "PWGDQ/Core/MCSignal.h"

using std::cout;
using std::endl;

ClassImp(MCSignal);

//________________________________________________________________________________________________
Expand Down
2 changes: 0 additions & 2 deletions PWGDQ/Core/MCSignal.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ process(aod::McParticles const& mcTracks) {

#include <vector>
#include <iostream>
using std::cout;
using std::endl;

class MCSignal : public TNamed
{
Expand Down
4 changes: 4 additions & 0 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

#include <cmath>

using std::cout;
using std::endl;
using namespace o2::constants::physics;

ClassImp(VarManager);

TString VarManager::fgVariableNames[VarManager::kNVars] = {""};
Expand Down
Loading