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
10 changes: 5 additions & 5 deletions PWGDQ/Core/VarManager.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Provide mandatory file documentation.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand All @@ -8,8 +8,8 @@
// In applying this license CERN does not waive the privileges and immunities
// granted to it by virtue of its status as an Intergovernmental Organization
// or submit itself to any jurisdiction.
#include <cmath>

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \author is missing, incorrect or misplaced.

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \brief is missing, incorrect or misplaced.

Check failure on line 11 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[doc/file]

Documentation for \file is missing, incorrect or misplaced.
#include <iostream>

Check failure on line 12 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <vector>
#include <map>
#include "PWGDQ/Core/VarManager.h"
Expand All @@ -35,7 +35,7 @@
int VarManager::fgITSROFBorderMarginHigh = 0;
uint64_t VarManager::fgSOR = 0;
uint64_t VarManager::fgEOR = 0;
ROOT::Math::PxPyPzEVector VarManager::fgBeamA(0, 0, 6799.99, 6800); // GeV, beam from A-side 4-momentum vector
ROOT::Math::PxPyPzEVector VarManager::fgBeamA(0, 0, 6799.99, 6800); // GeV, beam from A-side 4-momentum vector
ROOT::Math::PxPyPzEVector VarManager::fgBeamC(0, 0, -6799.99, 6800); // GeV, beam from C-side 4-momentum vector
o2::vertexing::DCAFitterN<2> VarManager::fgFitterTwoProngBarrel;
o2::vertexing::DCAFitterN<3> VarManager::fgFitterThreeProngBarrel;
Expand All @@ -59,7 +59,7 @@
VarManager::~VarManager() = default;

//__________________________________________________________________
void VarManager::SetVariableDependencies()

Check failure on line 62 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/function-variable]

Use lowerCamelCase for names of functions and variables.
{
//
// Set as used variables on which other variables calculation depends
Expand Down Expand Up @@ -103,7 +103,7 @@
if (!values) {
values = fgValues;
}
for (Int_t i = startValue; i < endValue; ++i) {

Check failure on line 106 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
values[i] = -9999.;
}
}
Expand All @@ -116,8 +116,8 @@
//
int NumberOfNucleonsA = 1; // default value for pp collisions
int NumberOfNucleonsC = 1; // default value for pp collisions
int NumberOfProtonsA = 1; // default value for pp collisions
int NumberOfProtonsC = 1; // default value for pp collisions
int NumberOfProtonsA = 1; // default value for pp collisions
int NumberOfProtonsC = 1; // default value for pp collisions
if (system.EqualTo("PbPb")) {
NumberOfNucleonsA = 208;
NumberOfNucleonsC = 208;
Expand All @@ -136,13 +136,13 @@
} else if (system.EqualTo("pPb")) {
NumberOfNucleonsA = 1;
NumberOfNucleonsC = 208;
NumberOfProtonsA = 1; // proton has 1 proton
NumberOfProtonsA = 1; // proton has 1 proton
NumberOfProtonsC = 82; // Pb has 82 protons
} else if (system.EqualTo("Pbp")) {
NumberOfNucleonsA = 208;
NumberOfNucleonsC = 1;
NumberOfProtonsA = 82; // Pb has 82 protons
NumberOfProtonsC = 1; // proton has 1 proton
NumberOfProtonsC = 1; // proton has 1 proton
} else if (system.EqualTo("OO")) {
NumberOfNucleonsA = 16;
NumberOfNucleonsC = 16;
Expand All @@ -164,8 +164,8 @@
// TO Do: add more systems

// set the beam 4-momentum vectors
float beamAEnergy = energy / 2.0 * sqrt(NumberOfProtonsA * NumberOfProtonsC / NumberOfProtonsC / NumberOfProtonsA); // GeV

Check failure on line 167 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float beamCEnergy = energy / 2.0 * sqrt(NumberOfProtonsC * NumberOfProtonsA / NumberOfProtonsA / NumberOfProtonsC); // GeV

Check failure on line 168 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
float beamAMomentum = std::sqrt(beamAEnergy * beamAEnergy - NumberOfNucleonsA * NumberOfNucleonsA * MassProton * MassProton);
float beamCMomentum = std::sqrt(beamCEnergy * beamCEnergy - NumberOfNucleonsC * NumberOfNucleonsC * MassProton * MassProton);
fgBeamA.SetPxPyPzE(0, 0, beamAMomentum, beamAEnergy);
Expand Down Expand Up @@ -219,7 +219,7 @@
//
// Set default variable names
//
for (Int_t ivar = 0; ivar < kNVars; ++ivar) {

Check failure on line 222 in PWGDQ/Core/VarManager.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[root/entity]

Replace ROOT entities with equivalents from standard C++ or from O2.
fgVariableNames[ivar] = "DEFAULT NOT DEFINED";
fgVariableUnits[ivar] = "n/a";
}
Expand Down
67 changes: 33 additions & 34 deletions PWGDQ/Core/VarManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,50 +24,49 @@
#define HomogeneousField
#endif

#include <vector>
#include <map>
#include <cmath>
#include <iostream>
#include <utility>
#include <complex>
#include <algorithm>

#include <TObject.h>
#include <TString.h>
#include "TRandom.h"
#include "TH3F.h"
#include "Math/Vector4D.h"
#include "Math/Vector3D.h"
#include "Math/GenVector/Boost.h"
#include "Math/VectorUtil.h"

#include "Framework/DataTypes.h"
#include "TGeoGlobalMagField.h"
#include "Field/MagneticField.h"
#include "ReconstructionDataFormats/Track.h"
#include "ReconstructionDataFormats/Vertex.h"
#include "DCAFitter/DCAFitterN.h"
#include "Common/CCDB/EventSelectionParams.h"
#include "Common/CCDB/TriggerAliases.h"
#include "ReconstructionDataFormats/DCA.h"
#include "DetectorsBase/Propagator.h"
#include "Common/Core/CollisionTypeHelper.h"
#include "Common/Core/EventPlaneHelper.h"
#include "Common/Core/trackUtilities.h"

#include "Math/SMatrix.h"
#include "ReconstructionDataFormats/TrackFwd.h"
#include "CommonConstants/LHCConstants.h"
#include "CommonConstants/PhysicsConstants.h"
#include "DCAFitter/DCAFitterN.h"
#include "DCAFitter/FwdDCAFitterN.h"
#include "DetectorsBase/Propagator.h"
#include "Field/MagneticField.h"
#include "Framework/DataTypes.h"
#include "GlobalTracking/MatchGlobalFwd.h"
#include "CommonConstants/PhysicsConstants.h"
#include "CommonConstants/LHCConstants.h"
#include "ReconstructionDataFormats/DCA.h"
#include "ReconstructionDataFormats/Track.h"
#include "ReconstructionDataFormats/TrackFwd.h"
#include "ReconstructionDataFormats/Vertex.h"

#include "Math/GenVector/Boost.h"
#include "Math/SMatrix.h"
#include "Math/Vector3D.h"
#include "Math/Vector4D.h"
#include "Math/VectorUtil.h"
#include "TGeoGlobalMagField.h"
#include "TH3F.h"
#include "TRandom.h"
#include <TObject.h>
#include <TString.h>

#include "KFParticle.h"
#include "KFPTrack.h"
#include "KFPVertex.h"
#include "KFParticle.h"
#include "KFParticleBase.h"
#include "KFVertex.h"

#include "Common/Core/EventPlaneHelper.h"
#include "Common/Core/CollisionTypeHelper.h"
#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <utility>
#include <vector>

using std::complex;
using std::cout;
Expand Down Expand Up @@ -1199,8 +1198,8 @@ class VarManager : public TObject
static int fgITSROFBorderMarginHigh; // ITS ROF border high margin
static uint64_t fgSOR; // Timestamp for start of run
static uint64_t fgEOR; // Timestamp for end of run
static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector
static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector
static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector
static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector

// static void FillEventDerived(float* values = nullptr);
static void FillTrackDerived(float* values = nullptr);
Expand Down
26 changes: 13 additions & 13 deletions PWGDQ/DataModel/ReducedInfoTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -739,19 +739,19 @@ DECLARE_SOA_COLUMN(PairDCAxy, pairDCAxy, float);
DECLARE_SOA_COLUMN(DeviationPairKF, deviationPairKF, float); //! Pair chi2 deviation to PV from KFParticle
DECLARE_SOA_COLUMN(DeviationxyPairKF, deviationxyPairKF, float); //! Pair chi2 deviation to PV in XY from KFParticle
// DECLARE_SOA_INDEX_COLUMN(ReducedMuon, reducedmuon2); //!
DECLARE_SOA_COLUMN(CosThetaHE, costhetaHE, float); //! Cosine in the helicity frame
DECLARE_SOA_COLUMN(PhiHE, phiHe, float); //! Phi in the helicity frame
DECLARE_SOA_COLUMN(PhiTildeHE, phiTildeHe, float); //! Tilde Phi in the helicity frame
DECLARE_SOA_COLUMN(CosThetaCS, costhetaCS, float); //! Cosine in the Collins-Soper frame
DECLARE_SOA_COLUMN(PhiCS, phiCS, float); //! Phi in the Collins-Soper frame
DECLARE_SOA_COLUMN(PhiTildeCS, phiTildeCS, float); //! Tilde Phi in the Collins-Soper frame
DECLARE_SOA_COLUMN(CosThetaPP, costhetaPP, float); //! Cosine in the Production Plane frame
DECLARE_SOA_COLUMN(PhiPP, phiPP, float); //! Phi in the Production Plane frame
DECLARE_SOA_COLUMN(PhiTildePP, phiTildePP, float); //! Tilde Phi in the Production Plane frame
DECLARE_SOA_COLUMN(CosThetaRM, costhetaRM, float); //! Cosine in the Random frame
DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polarization, event plane reconstructed from TPC tracks
DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks
DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks
DECLARE_SOA_COLUMN(CosThetaHE, costhetaHE, float); //! Cosine in the helicity frame
DECLARE_SOA_COLUMN(PhiHE, phiHe, float); //! Phi in the helicity frame
DECLARE_SOA_COLUMN(PhiTildeHE, phiTildeHe, float); //! Tilde Phi in the helicity frame
DECLARE_SOA_COLUMN(CosThetaCS, costhetaCS, float); //! Cosine in the Collins-Soper frame
DECLARE_SOA_COLUMN(PhiCS, phiCS, float); //! Phi in the Collins-Soper frame
DECLARE_SOA_COLUMN(PhiTildeCS, phiTildeCS, float); //! Tilde Phi in the Collins-Soper frame
DECLARE_SOA_COLUMN(CosThetaPP, costhetaPP, float); //! Cosine in the Production Plane frame
DECLARE_SOA_COLUMN(PhiPP, phiPP, float); //! Phi in the Production Plane frame
DECLARE_SOA_COLUMN(PhiTildePP, phiTildePP, float); //! Tilde Phi in the Production Plane frame
DECLARE_SOA_COLUMN(CosThetaRM, costhetaRM, float); //! Cosine in the Random frame
DECLARE_SOA_COLUMN(CosThetaStarTPC, costhetaStarTPC, float); //! global polarization, event plane reconstructed from TPC tracks
DECLARE_SOA_COLUMN(CosThetaStarFT0A, costhetaStarFT0A, float); //! global polarization, event plane reconstructed from FT0A tracks
DECLARE_SOA_COLUMN(CosThetaStarFT0C, costhetaStarFT0C, float); //! global polarization, event plane reconstructed from FT0C tracks
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
[](float pt, float phi) -> float { return pt * std::cos(phi); });
DECLARE_SOA_DYNAMIC_COLUMN(Py, py, //!
Expand Down
Loading