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
17 changes: 10 additions & 7 deletions PWGCF/Femto/Core/FemtoFlowAngularContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,22 @@
#ifndef PWGCF_FEMTOFLOW_CORE_FEMTOFLOWANGULARCONTAINER_H_
#define PWGCF_FEMTOFLOW_CORE_FEMTOFLOWANGULARCONTAINER_H_

#include <fairlogger/Logger.h>
#include <vector>
#include <string>
#include "PWGCF/Femto/Core/FemtoFlowMath.h"

#include "Framework/HistogramRegistry.h"
#include "Common/Core/RecoDecay.h"
#include "PWGCF/Femto/Core/FemtoFlowMath.h"

#include "Framework/HistogramRegistry.h"

#include "Math/Vector4D.h"
#include "TMath.h"
#include "TDatabasePDG.h"

Check failure on line 30 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
#include "TMath.h"

#include <fairlogger/Logger.h>

#include <string>
#include <vector>

using namespace o2::framework;

Check failure on line 38 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femto_flow
{
Expand Down Expand Up @@ -141,8 +144,8 @@
/// \param pdg2 PDG code of particle two
void setPDGCodes(const int pdg1, const int pdg2)
{
mMassOne = TDatabasePDG::Instance()->GetParticle(pdg1)->Mass();

Check failure on line 147 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
mMassTwo = TDatabasePDG::Instance()->GetParticle(pdg2)->Mass();

Check failure on line 148 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/database]

Do not use TDatabasePDG directly. Use o2::constants::physics::Mass... or Service<o2::framework::O2DatabasePDG> instead.
mPDGOne = pdg1;
mPDGTwo = pdg2;
}
Expand All @@ -161,10 +164,10 @@
deltaPhi = part1.phi() - part2.phi();

while (deltaPhi < mPhiLow) {
deltaPhi += o2::constants::math::TwoPI;

Check failure on line 167 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}
while (deltaPhi > mPhiHigh) {
deltaPhi -= o2::constants::math::TwoPI;

Check failure on line 170 in PWGCF/Femto/Core/FemtoFlowAngularContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[two-pi-add-subtract]

Use RecoDecay::constrainAngle to restrict angle to a given range.
}

mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtoflow_mc_particle::MCTypeName[mc]) + HIST("/DeltaEtaDeltaPhi"), deltaPhi, deltaEta, weight);
Expand Down Expand Up @@ -231,7 +234,7 @@
protected:
HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output
static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to EventType
static constexpr femto_flow_angular_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_angular_container::Observable)
static constexpr femto_flow_angular_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_angular_container::Observable)
static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to femto_flow_angular_container::EventType)
float mMassOne = 0.f; ///< PDG mass of particle 1
float mMassTwo = 0.f; ///< PDG mass of particle 2
Expand Down
48 changes: 25 additions & 23 deletions PWGCF/Femto/Core/FemtoFlowCollisionSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,17 @@
#ifndef PWGCF_FEMTOFLOW_CORE_FEMTOFLOWCOLLISIONSELECTION_H_
#define PWGCF_FEMTOFLOW_CORE_FEMTOFLOWCOLLISIONSELECTION_H_

#include <string>
#include "Common/CCDB/TriggerAliases.h"
#include "Common/Core/EventPlaneHelper.h"
#include "Common/DataModel/Qvectors.h"

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

#include "Common/Core/EventPlaneHelper.h"
#include "Common/DataModel/Qvectors.h"
#include <string>

using namespace o2;

Check failure on line 29 in PWGCF/Femto/Core/FemtoFlowCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 30 in PWGCF/Femto/Core/FemtoFlowCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femto_flow
{
Expand Down Expand Up @@ -143,7 +144,7 @@
/// \param col Collision
template <typename T>
void fillQA(T const& col)
{
{

if (mHistogramRegistry) {
mHistogramRegistry->fill(HIST("Event/zvtxhist"), col.posZ());
Expand Down Expand Up @@ -196,7 +197,7 @@
double lambda1 = (kS00 + kS11 + std::sqrt((kS00 + kS11) * (kS00 + kS11) - 4.0 * (kS00 * kS11 - kS10 * kS10))) / 2.0;
double lambda2 = (kS00 + kS11 - std::sqrt((kS00 + kS11) * (kS00 + kS11) - 4.0 * (kS00 * kS11 - kS10 * kS10))) / 2.0;

if ((lambda1 + lambda2) != 0 && partNumber > 2) {

Check failure on line 200 in PWGCF/Femto/Core/FemtoFlowCollisionSelection.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
spher = 2 * lambda2 / (lambda1 + lambda2);
} else {
spher = 2;
Expand All @@ -212,32 +213,34 @@
return spher;
}

//Qn-vector calculation
// Qn-vector calculation
template <typename T>
float computeqnVec(T const& col)
{
double qn = std::sqrt(col.qvecFT0CReVec()[0] * col.qvecFT0CReVec()[0] + col.qvecFT0CImVec()[0] * col.qvecFT0CImVec()[0]) * std::sqrt(col.sumAmplFT0C());
if (mHistogramRegistry){
mHistogramRegistry->fill(HIST("Event/qnvector"), col.centFT0C(), qn);
mHistogramRegistry->fill(HIST("Event/SphrVsqn"), qn, mSphericity);
if (mHistogramRegistry) {
mHistogramRegistry->fill(HIST("Event/qnvector"), col.centFT0C(), qn);
mHistogramRegistry->fill(HIST("Event/SphrVsqn"), qn, mSphericity);
}
return qn;
}

//Qn-vector calculation
// Qn-vector calculation
template <typename T>
int myqnBin(T const& col, float centBinLength=10.f)
{
int myqnBin(T const& col, float centBinLength = 10.f)
{
int qnBin = -999;
float qn = computeqnVec(col);
int mycentBin = (int)(col.centFT0C() / centBinLength);
if (mycentBin >= (int)(mCentMax / centBinLength)) return qnBin;
if (mycentBin >= (int)(mCentMax / centBinLength))
return qnBin;

for (int iqn(0); iqn < static_cast<int>(std::size(mqnBinSeparator[mycentBin]))-1; ++iqn){
if (qn>mqnBinSeparator[mycentBin][iqn] && qn<=mqnBinSeparator[mycentBin][iqn+1]){
for (int iqn(0); iqn < static_cast<int>(std::size(mqnBinSeparator[mycentBin])) - 1; ++iqn) {
if (qn > mqnBinSeparator[mycentBin][iqn] && qn <= mqnBinSeparator[mycentBin][iqn + 1]) {
qnBin = iqn;
break;
}else continue;
} else
continue;
}

return qnBin;
Expand All @@ -254,14 +257,13 @@
float mCentMin = 0.0; ///< Minimum centrality value
float mCentMax = 100.0; ///< Maximum centrality value
float mSphericity = 2.;
float mqnBinSeparator [7][11] = {{ 0.0, 63.50, 92.50, 116.50, 139.50, 162.50, 185.50, 212.50, 245.50, 292.50, 877.50},
{ 0.0, 57.50, 82.50, 102.50, 121.50, 139.50, 158.50, 178.50, 203.50, 238.50, 616.50},
{ 0.0, 49.50, 70.50, 86.50, 102.50, 116.50, 131.50, 148.50, 168.50, 195.50, 483.50},
{ 0.0, 38.50, 55.50, 69.50, 82.50, 94.50, 106.50, 120.50, 137.50, 160.50, 375.50},
{ 0.0, 29.50, 42.50, 53.50, 63.50, 73.50, 83.50, 95.50, 109.50, 128.50, 322.50},
{ 0.0, 21.50, 31.50, 39.50, 47.50, 55.50, 63.50, 72.50, 83.50, 99.50, 266.50},
{ 0.0, 15.50, 22.50, 28.50, 33.50, 39.50, 45.50, 52.50, 60.50, 72.50, 232.50}
}; ///< qn bin edge from qn vector distributions, for per 10% centrality, 0-70%
float mqnBinSeparator[7][11] = {{0.0, 63.50, 92.50, 116.50, 139.50, 162.50, 185.50, 212.50, 245.50, 292.50, 877.50},
{0.0, 57.50, 82.50, 102.50, 121.50, 139.50, 158.50, 178.50, 203.50, 238.50, 616.50},
{0.0, 49.50, 70.50, 86.50, 102.50, 116.50, 131.50, 148.50, 168.50, 195.50, 483.50},
{0.0, 38.50, 55.50, 69.50, 82.50, 94.50, 106.50, 120.50, 137.50, 160.50, 375.50},
{0.0, 29.50, 42.50, 53.50, 63.50, 73.50, 83.50, 95.50, 109.50, 128.50, 322.50},
{0.0, 21.50, 31.50, 39.50, 47.50, 55.50, 63.50, 72.50, 83.50, 99.50, 266.50},
{0.0, 15.50, 22.50, 28.50, 33.50, 39.50, 45.50, 52.50, 60.50, 72.50, 232.50}}; ///< qn bin edge from qn vector distributions, for per 10% centrality, 0-70%
};
} // namespace o2::analysis::femto_flow

Expand Down
10 changes: 5 additions & 5 deletions PWGCF/Femto/Core/FemtoFlowContainer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <string>
#include <vector>

using namespace o2::framework;

Check failure on line 39 in PWGCF/Femto/Core/FemtoFlowContainer.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

namespace o2::analysis::femto_flow
{
Expand Down Expand Up @@ -93,8 +93,8 @@
mHistogramRegistry->add((folderName + "/relPairkstarmTMult").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2}); Multiplicity").c_str(), kTH3F, {femtoObsAxis, mTAxis3D, multAxis3D});
}

if (useqnDivide){
for (int iqn(0); iqn<numqnBins; ++iqn){
if (useqnDivide) {
for (int iqn(0); iqn < numqnBins; ++iqn) {
mHistogramRegistry->add((folderName + std::to_string(iqn) + "/relPairDist").c_str(), ("; " + femtoObs + "; Entries").c_str(), kTH1F, {femtoObsAxis});
mHistogramRegistry->add((folderName + std::to_string(iqn) + "/relPairkstarmT").c_str(), ("; " + femtoObs + "; #it{m}_{T} (GeV/#it{c}^{2})").c_str(), kTH2F, {femtoObsAxis, mTAxis});
}
Expand Down Expand Up @@ -208,9 +208,9 @@
mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + HIST(o2::aod::femtoflow_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmTMult"), femtoObs, mT, mult, weight);
}

if (useqnDivide && mybinNum < numqnBins && mybinNum>=0) {
if (useqnDivide && mybinNum < numqnBins && mybinNum >= 0) {
mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + std::to_string(mybinNum) + HIST(o2::aod::femtoflow_mc_particle::MCTypeName[mc]) + HIST("/relPairDist"), femtoObs, weight);
mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + std::to_string(mybinNum) + HIST(o2::aod::femtoflow_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT, weight);
mHistogramRegistry->fill(HIST(FolderSuffix[EventType]) + std::to_string(mybinNum) + HIST(o2::aod::femtoflow_mc_particle::MCTypeName[mc]) + HIST("/relPairkstarmT"), femtoObs, mT, weight);
}
}

Expand Down Expand Up @@ -287,7 +287,7 @@
protected:
HistogramRegistry* mHistogramRegistry = nullptr; ///< For QA output
static constexpr std::string_view FolderSuffix[2] = {"SameEvent", "MixedEvent"}; ///< Folder naming for the output according to EventType
static constexpr femto_flow_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_container::Observable)
static constexpr femto_flow_container::Observable FemtoObs = obs; ///< Femtoscopic observable to be computed (according to femto_flow_container::Observable)
static constexpr int EventType = eventType; ///< Type of the event (same/mixed, according to femto_flow_container::EventType)
float mMassOne = 0.f; ///< PDG mass of particle 1
float mMassTwo = 0.f; ///< PDG mass of particle 2
Expand Down
19 changes: 10 additions & 9 deletions PWGCF/Femto/Core/FemtoFlowCutculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,19 @@
#ifndef PWGCF_FEMTOFLOW_CORE_FEMTOFLOWCUTCULATOR_H_
#define PWGCF_FEMTOFLOW_CORE_FEMTOFLOWCUTCULATOR_H_

#include "PWGCF/Femto/Core/FemtoFlowSelection.h"
#include "PWGCF/Femto/Core/FemtoFlowTrackSelection.h"

#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>

#include <algorithm>
#include <bitset>
#include <iostream>
#include <iterator>
#include <random>
#include <string>
#include <vector>
#include <algorithm>
#include <iterator>
#include <boost/property_tree/json_parser.hpp>
#include <boost/property_tree/ptree.hpp>

#include "PWGCF/Femto/Core/FemtoFlowSelection.h"
#include "PWGCF/Femto/Core/FemtoFlowTrackSelection.h"
// #include "PWGCF/Femto/Core/FemtoFlowV0Selection.h"

namespace o2::analysis::femto_flow
Expand Down Expand Up @@ -311,7 +312,7 @@ class FemtoFlowCutculator
{
aod::femtoflowparticle::CutContainerType output = -1;
// if (choice == std::string("T")) {
output = iterateSelection(mTrackSel, SysChecks, sign);
output = iterateSelection(mTrackSel, SysChecks, sign);
// } else if (choice == std::string("V")) {
// output = iterateSelection(mV0Sel, SysChecks, sign);
// } else {
Expand Down Expand Up @@ -353,7 +354,7 @@ class FemtoFlowCutculator
FemtoFlowTrackSelection
mTrackSel; ///< for setting up the bit-wise selection container for tracks
// FemtoFlowV0Selection
// mV0Sel; ///< for setting up the bit-wise selection container for V0s
// mV0Sel; ///< for setting up the bit-wise selection container for V0s
std::vector<o2::track::PID::ID>
mPIDspecies; ///< list of particle species for which PID is stored
std::vector<float>
Expand Down
13 changes: 8 additions & 5 deletions PWGCF/Femto/Core/FemtoFlowDetaDphiStar.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@
#ifndef PWGCF_FEMTOFLOW_CORE_FEMTOFLOWDETADPHISTAR_H_
#define PWGCF_FEMTOFLOW_CORE_FEMTOFLOWDETADPHISTAR_H_

#include "PWGCF/Femto/Core/FemtoFlowAngularContainer.h"
#include "PWGCF/Femto/Core/FemtoFlowFemtoContainer.h"
#include "PWGCF/Femto/DataModel/FemtoDerived.h"

#include "TMath.h"

#include <memory>
#include <string>
#include <vector>
#include "TMath.h"
#include "PWGCF/Femto/DataModel/FemtoDerived.h"
#include "PWGCF/Femto/Core/FemtoFlowFemtoContainer.h"
#include "PWGCF/Femto/Core/FemtoFlowAngularContainer.h"
// #include "PWGCF/Femto/Core/FemtoFlowContainer.h"
#include "Framework/HistogramRegistry.h"
#include "PWGCF/Femto/Core/FemtoFlowTrackSelection.h"

#include "Framework/HistogramRegistry.h"

namespace o2::analysis
{
namespace femto_flow
Expand Down
1 change: 1 addition & 0 deletions PWGCF/Femto/Core/FemtoFlowEventHisto.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define PWGCF_FEMTOUFLOW_CORE_FEMTOUFLOWEVENTHISTO_H_

#include "PWGCF/Femto/DataModel/FemtoDerived.h"

#include "Framework/HistogramRegistry.h"

using namespace o2::framework;
Expand Down
Loading
Loading