|
24 | 24 | #define HomogeneousField |
25 | 25 | #endif |
26 | 26 |
|
27 | | -#include <vector> |
28 | | -#include <map> |
29 | | -#include <cmath> |
30 | | -#include <iostream> |
31 | | -#include <utility> |
32 | | -#include <complex> |
33 | | -#include <algorithm> |
34 | | - |
35 | | -#include <TObject.h> |
36 | | -#include <TString.h> |
37 | | -#include "TRandom.h" |
38 | | -#include "TH3F.h" |
39 | | -#include "Math/Vector4D.h" |
40 | | -#include "Math/Vector3D.h" |
41 | | -#include "Math/GenVector/Boost.h" |
42 | | -#include "Math/VectorUtil.h" |
43 | | - |
44 | | -#include "Framework/DataTypes.h" |
45 | | -#include "TGeoGlobalMagField.h" |
46 | | -#include "Field/MagneticField.h" |
47 | | -#include "ReconstructionDataFormats/Track.h" |
48 | | -#include "ReconstructionDataFormats/Vertex.h" |
49 | | -#include "DCAFitter/DCAFitterN.h" |
50 | 27 | #include "Common/CCDB/EventSelectionParams.h" |
51 | 28 | #include "Common/CCDB/TriggerAliases.h" |
52 | | -#include "ReconstructionDataFormats/DCA.h" |
53 | | -#include "DetectorsBase/Propagator.h" |
| 29 | +#include "Common/Core/CollisionTypeHelper.h" |
| 30 | +#include "Common/Core/EventPlaneHelper.h" |
54 | 31 | #include "Common/Core/trackUtilities.h" |
55 | 32 |
|
56 | | -#include "Math/SMatrix.h" |
57 | | -#include "ReconstructionDataFormats/TrackFwd.h" |
| 33 | +#include "CommonConstants/LHCConstants.h" |
| 34 | +#include "CommonConstants/PhysicsConstants.h" |
| 35 | +#include "DCAFitter/DCAFitterN.h" |
58 | 36 | #include "DCAFitter/FwdDCAFitterN.h" |
| 37 | +#include "DetectorsBase/Propagator.h" |
| 38 | +#include "Field/MagneticField.h" |
| 39 | +#include "Framework/DataTypes.h" |
59 | 40 | #include "GlobalTracking/MatchGlobalFwd.h" |
60 | | -#include "CommonConstants/PhysicsConstants.h" |
61 | | -#include "CommonConstants/LHCConstants.h" |
| 41 | +#include "ReconstructionDataFormats/DCA.h" |
| 42 | +#include "ReconstructionDataFormats/Track.h" |
| 43 | +#include "ReconstructionDataFormats/TrackFwd.h" |
| 44 | +#include "ReconstructionDataFormats/Vertex.h" |
| 45 | + |
| 46 | +#include "Math/GenVector/Boost.h" |
| 47 | +#include "Math/SMatrix.h" |
| 48 | +#include "Math/Vector3D.h" |
| 49 | +#include "Math/Vector4D.h" |
| 50 | +#include "Math/VectorUtil.h" |
| 51 | +#include "TGeoGlobalMagField.h" |
| 52 | +#include "TH3F.h" |
| 53 | +#include "TRandom.h" |
| 54 | +#include <TObject.h> |
| 55 | +#include <TString.h> |
62 | 56 |
|
63 | | -#include "KFParticle.h" |
64 | 57 | #include "KFPTrack.h" |
65 | 58 | #include "KFPVertex.h" |
| 59 | +#include "KFParticle.h" |
66 | 60 | #include "KFParticleBase.h" |
67 | 61 | #include "KFVertex.h" |
68 | 62 |
|
69 | | -#include "Common/Core/EventPlaneHelper.h" |
| 63 | +#include <algorithm> |
| 64 | +#include <cmath> |
| 65 | +#include <complex> |
| 66 | +#include <iostream> |
| 67 | +#include <map> |
| 68 | +#include <utility> |
| 69 | +#include <vector> |
70 | 70 |
|
71 | 71 | using std::complex; |
72 | 72 | using std::cout; |
@@ -927,6 +927,7 @@ class VarManager : public TObject |
927 | 927 |
|
928 | 928 | // Setup the collision system |
929 | 929 | static void SetCollisionSystem(TString system, float energy); |
| 930 | + static void SetCollisionSystem(o2::parameters::GRPLHCIFData* grplhcif); |
930 | 931 |
|
931 | 932 | static void SetMagneticField(float magField) |
932 | 933 | { |
@@ -1197,6 +1198,8 @@ class VarManager : public TObject |
1197 | 1198 | static int fgITSROFBorderMarginHigh; // ITS ROF border high margin |
1198 | 1199 | static uint64_t fgSOR; // Timestamp for start of run |
1199 | 1200 | static uint64_t fgEOR; // Timestamp for end of run |
| 1201 | + static ROOT::Math::PxPyPzEVector fgBeamA; // beam from A-side 4-momentum vector |
| 1202 | + static ROOT::Math::PxPyPzEVector fgBeamC; // beam from C-side 4-momentum vector |
1200 | 1203 |
|
1201 | 1204 | // static void FillEventDerived(float* values = nullptr); |
1202 | 1205 | static void FillTrackDerived(float* values = nullptr); |
@@ -2866,16 +2869,11 @@ void VarManager::FillPair(T1 const& t1, T2 const& t2, float* values) |
2866 | 2869 | bool useRM = fgUsedVars[kCosThetaRM]; // Random frame |
2867 | 2870 |
|
2868 | 2871 | if (useHE || useCS || usePP || useRM) { |
2869 | | - // TO DO: get the correct values from CCDB |
2870 | | - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV |
2871 | | - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); |
2872 | | - ROOT::Math::PxPyPzEVector Beam2(0., 0., BeamMomentum, fgCenterOfMassEnergy / 2); |
2873 | | - |
2874 | 2872 | ROOT::Math::Boost boostv12{v12.BoostToCM()}; |
2875 | 2873 | ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; |
2876 | 2874 | ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; |
2877 | | - ROOT::Math::XYZVectorF Beam1_CM{(boostv12(Beam1).Vect()).Unit()}; |
2878 | | - ROOT::Math::XYZVectorF Beam2_CM{(boostv12(Beam2).Vect()).Unit()}; |
| 2875 | + ROOT::Math::XYZVectorF Beam1_CM{(boostv12(fgBeamA).Vect()).Unit()}; |
| 2876 | + ROOT::Math::XYZVectorF Beam2_CM{(boostv12(fgBeamC).Vect()).Unit()}; |
2879 | 2877 |
|
2880 | 2878 | // using positive sign convention for the first track |
2881 | 2879 | ROOT::Math::XYZVectorF v_CM = (t1.sign() > 0 ? v1_CM : v2_CM); |
@@ -3381,16 +3379,11 @@ void VarManager::FillPairMC(T1 const& t1, T2 const& t2, float* values) |
3381 | 3379 | bool useRM = fgUsedVars[kMCCosThetaRM]; // Random frame |
3382 | 3380 |
|
3383 | 3381 | if (useHE || useCS || usePP || useRM) { |
3384 | | - // TO DO: get the correct values from CCDB |
3385 | | - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV |
3386 | | - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); |
3387 | | - ROOT::Math::PxPyPzEVector Beam2(0., 0., BeamMomentum, fgCenterOfMassEnergy / 2); |
3388 | | - |
3389 | 3382 | ROOT::Math::Boost boostv12{v12.BoostToCM()}; |
3390 | 3383 | ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; |
3391 | 3384 | ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; |
3392 | | - ROOT::Math::XYZVectorF Beam1_CM{(boostv12(Beam1).Vect()).Unit()}; |
3393 | | - ROOT::Math::XYZVectorF Beam2_CM{(boostv12(Beam2).Vect()).Unit()}; |
| 3385 | + ROOT::Math::XYZVectorF Beam1_CM{(boostv12(fgBeamA).Vect()).Unit()}; |
| 3386 | + ROOT::Math::XYZVectorF Beam2_CM{(boostv12(fgBeamC).Vect()).Unit()}; |
3394 | 3387 |
|
3395 | 3388 | // using positive sign convention for the first track |
3396 | 3389 | ROOT::Math::XYZVectorF v_CM = (t1.pdgCode() > 0 ? v1_CM : v2_CM); |
@@ -4848,9 +4841,6 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values) |
4848 | 4841 | // global polarization parameters |
4849 | 4842 | bool useGlobalPolarizatiobSpinOne = fgUsedVars[kCosThetaStarTPC] || fgUsedVars[kCosThetaStarFT0A] || fgUsedVars[kCosThetaStarFT0C]; |
4850 | 4843 | if (useGlobalPolarizatiobSpinOne) { |
4851 | | - double BeamMomentum = TMath::Sqrt(fgCenterOfMassEnergy * fgCenterOfMassEnergy / 4 - fgMassofCollidingParticle * fgMassofCollidingParticle); // GeV |
4852 | | - ROOT::Math::PxPyPzEVector Beam1(0., 0., -BeamMomentum, fgCenterOfMassEnergy / 2); |
4853 | | - |
4854 | 4844 | ROOT::Math::Boost boostv12{v12.BoostToCM()}; |
4855 | 4845 | ROOT::Math::XYZVectorF v1_CM{(boostv12(v1).Vect()).Unit()}; |
4856 | 4846 | ROOT::Math::XYZVectorF v2_CM{(boostv12(v2).Vect()).Unit()}; |
|
0 commit comments