Skip to content

Commit da4909e

Browse files
committed
adding variables for DQ flow
1 parent e6d01d0 commit da4909e

File tree

7 files changed

+54
-5
lines changed

7 files changed

+54
-5
lines changed

PWGDQ/Core/HistogramsLibrary.cxx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,15 @@ void o2::aod::dqhistograms::DefineHistograms(HistogramManager* hm, const char* h
151151
hm->AddHistogram(histClass, "Q2Y0A_CentFT0C", "", true, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -1.0, 1.0, VarManager::kQ2Y0A);
152152
hm->AddHistogram(histClass, "Q3X0A_CentFT0C", "", true, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -1.0, 1.0, VarManager::kQ3X0A);
153153
hm->AddHistogram(histClass, "Q3Y0A_CentFT0C", "", true, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -1.0, 1.0, VarManager::kQ3Y0A);
154-
}
154+
155+
hm->AddHistogram(histClass, "Psi2A", "", false, 100, -2.0, 2.0, VarManager::kPsi2A);
156+
hm->AddHistogram(histClass, "Psi2B", "", false, 100, -2.0, 2.0, VarManager::kPsi2B);
157+
hm->AddHistogram(histClass, "Psi2C", "", false, 100, -2.0, 2.0, VarManager::kPsi2C);
158+
hm->AddHistogram(histClass, "Psi2A_CentFT0C", "", false, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -2.0, 2.0, VarManager::kPsi2A);
159+
hm->AddHistogram(histClass, "Psi2B_CentFT0C", "", false, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -2.0, 2.0, VarManager::kPsi2B);
160+
hm->AddHistogram(histClass, "Psi2C_CentFT0C", "", false, 90, 0.0, 90.0, VarManager::kCentFT0C, 100, -2.0, 2.0, VarManager::kPsi2C);
161+
}
162+
155163
if (subGroupStr.Contains("res")) {
156164
hm->AddHistogram(histClass, "R2SP_CentV0M", "", true, 9, 0.0, 90.0, VarManager::kCentVZERO, 100, -1.0, 1.0, VarManager::kR2SP);
157165
hm->AddHistogram(histClass, "R3SP_CentV0M", "", true, 9, 0.0, 90.0, VarManager::kCentVZERO, 100, -1.0, 1.0, VarManager::kR3SP);

PWGDQ/Core/VarManager.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,12 @@ void VarManager::SetDefaultVarNames()
596596
fgVariableUnits[kCos2DeltaPhi] = "";
597597
fgVariableNames[kCos3DeltaPhi] = "cos 3(#varphi-#Psi_{3}^{A}) ";
598598
fgVariableUnits[kCos3DeltaPhi] = "";
599+
fgVariableNames[kPsi2A] = "#Psi_{2}^{A} ";
600+
fgVariableUnits[kPsi2A] = "";
601+
fgVariableNames[kPsi2B] = "#Psi_{2}^{B} ";
602+
fgVariableUnits[kPsi2B] = "";
603+
fgVariableNames[kPsi2C] = "#Psi_{2}^{C} ";
604+
fgVariableUnits[kPsi2C] = "";
599605
fgVariableNames[kR2SP] = "R_{2}^{SP} ";
600606
fgVariableUnits[kR2SP] = "";
601607
fgVariableNames[kR3SP] = "R_{3}^{SP} ";

PWGDQ/Core/VarManager.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ class VarManager : public TObject
410410
kDCATrackVtxProd,
411411
kU2Q2,
412412
kU3Q3,
413+
kPsi2A,
414+
kPsi2B,
415+
kPsi2C,
413416
kCos2DeltaPhi,
414417
kCos3DeltaPhi,
415418
kNPairVariables,
@@ -645,6 +648,8 @@ class VarManager : public TObject
645648
static void FillDileptonCharmHadron(DQ const& dilepton, HF const& charmHadron, H hfHelper, T& bdtScoreCharmHad, float* values = nullptr);
646649
template <typename C, typename A>
647650
static void FillQVectorFromGFW(C const& collision, A const& compA2, A const& compB2, A const& compC2, A const& compA3, A const& compB3, A const& compC3, float normA = 1.0, float normB = 1.0, float normC = 1.0, float* values = nullptr);
651+
//static void FillEventPlaneABC(A const& EpA, A const& EpB, A const& EpC, float* values = nullptr);
652+
648653
template <int pairType, typename T1, typename T2>
649654
static void FillPairVn(T1 const& t1, T2 const& t2, float* values = nullptr);
650655

@@ -1050,6 +1055,11 @@ void VarManager::FillEvent(T const& event, float* values)
10501055
if (event.q3y0b() * event.q3y0c() != 0.0) {
10511056
values[kR3EP] = TMath::Cos(3 * (getEventPlane(3, event.q3x0b(), event.q3y0b()) - getEventPlane(3, event.q3x0c(), event.q3y0c())));
10521057
}
1058+
1059+
values[kPsi2A] = getEventPlane(2, event.q2x0a(), event.q2y0a());
1060+
values[kPsi2B] = getEventPlane(2, event.q2x0b(), event.q2y0b());
1061+
values[kPsi2C] = getEventPlane(2, event.q2x0c(), event.q2y0c());
1062+
10531063
}
10541064

10551065
if constexpr ((fillMap & CollisionMC) > 0) {
@@ -2393,10 +2403,12 @@ void VarManager::FillQVectorFromGFW(C const& collision, A const& compA2, A const
23932403

23942404
// TODO: provide different computations for R
23952405
// Compute the R factor using the 2 sub-events technique for second and third harmonic
2406+
//Compute event planes
23962407
auto Psi2B = getEventPlane(2, values[kQ2X0B], values[kQ2Y0B]);
23972408
auto Psi3B = getEventPlane(3, values[kQ3X0B], values[kQ3Y0B]);
23982409
auto Psi2C = getEventPlane(2, values[kQ2X0C], values[kQ2Y0C]);
23992410
auto Psi3C = getEventPlane(3, values[kQ3X0C], values[kQ3Y0C]);
2411+
24002412
values[kR2SP] = (values[kQ2X0B] * values[kQ2X0C] + values[kQ2Y0B] * values[kQ2Y0C]);
24012413
values[kR3SP] = (values[kQ3X0B] * values[kQ3X0C] + values[kQ3Y0B] * values[kQ3Y0C]);
24022414
if (values[kQ2Y0B] * values[kQ2Y0C] != 0.0) {
@@ -2405,6 +2417,10 @@ void VarManager::FillQVectorFromGFW(C const& collision, A const& compA2, A const
24052417
if (values[kQ3Y0B] * values[kQ3Y0C] != 0.0) {
24062418
values[kR3EP] = TMath::Cos(3 * (Psi3B - Psi3C));
24072419
}
2420+
2421+
values[kPsi2A] = getEventPlane(2, values[kQ2X0A], values[kQ2Y0A]);
2422+
values[kPsi2B] = getEventPlane(2, values[kQ2X0B], values[kQ2Y0B]);
2423+
values[kPsi2C] = getEventPlane(2, values[kQ2X0C], values[kQ2Y0C]);
24082424
}
24092425

24102426
template <int pairType, typename T1, typename T2>
@@ -2443,11 +2459,15 @@ void VarManager::FillPairVn(T1 const& t1, T2 const& t2, float* values)
24432459
values[kU3Q3] = values[kQ3X0A] * std::cos(3 * v12.Phi()) + values[kQ3Y0A] * std::sin(3 * v12.Phi());
24442460
values[kCos2DeltaPhi] = std::cos(2 * (v12.Phi() - getEventPlane(2, values[kQ2X0A], values[kQ2Y0A])));
24452461
values[kCos3DeltaPhi] = std::cos(3 * (v12.Phi() - getEventPlane(3, values[kQ3X0A], values[kQ3Y0A])));
2462+
24462463
if (isnan(VarManager::fgValues[VarManager::kU2Q2]) == true) {
24472464
values[kU2Q2] = -999.;
24482465
values[kU3Q3] = -999.;
24492466
values[kCos2DeltaPhi] = -999.;
24502467
values[kCos3DeltaPhi] = -999.;
2468+
values[kPsi2A] = -999.;
2469+
values[kPsi2B] = -999.;
2470+
values[kPsi2C] = -999.;
24512471
}
24522472
}
24532473

PWGDQ/DataModel/ReducedInfoTables.h

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,9 @@ DECLARE_SOA_COLUMN(U2Q2, u2q2, float); //! Scalar product betwee
458458
DECLARE_SOA_COLUMN(U3Q3, u3q3, float); //! Scalar product between unitary vector with event flow vector (harmonic 3)
459459
DECLARE_SOA_COLUMN(Cos2DeltaPhi, cos2deltaphi, float); //! Cosinus term using event plane angle (harmonic 2)
460460
DECLARE_SOA_COLUMN(Cos3DeltaPhi, cos3deltaphi, float); //! Cosinus term using event plane angle (harmonic 3)
461+
DECLARE_SOA_COLUMN(Psi2A, psi2a, float); //! Event plane for sub-sample A
462+
DECLARE_SOA_COLUMN(Psi2B, psi2b, float); //! Event plane for sub-sample B
463+
DECLARE_SOA_COLUMN(Psi2C, psi2c, float); //! Event plane for sub-sample C
461464
DECLARE_SOA_COLUMN(CollisionId, collisionId, int); //!
462465
// DECLARE_SOA_INDEX_COLUMN(ReducedMuon, reducedmuon2); //!
463466
DECLARE_SOA_DYNAMIC_COLUMN(Px, px, //!
@@ -494,7 +497,11 @@ DECLARE_SOA_TABLE(DileptonsFlow, "AOD", "RTDILEPTONFLOW", //!
494497
reducedpair::U2Q2,
495498
reducedpair::U3Q3,
496499
reducedpair::Cos2DeltaPhi,
497-
reducedpair::Cos3DeltaPhi);
500+
reducedpair::Cos3DeltaPhi,
501+
reducedpair::Psi2A,
502+
reducedpair::Psi2B,
503+
reducedpair::Psi2C
504+
);
498505

499506
// Dilepton collision information (joined with DileptonsExtra) allowing to connect different tables (cross PWGs)
500507
DECLARE_SOA_TABLE(DileptonsInfo, "AOD", "RTDILEPTONINFO",
@@ -524,7 +531,11 @@ DECLARE_SOA_TABLE(DimuonsAll, "AOD", "RTDIMUONALL", //!
524531
reducedpair::U2Q2,
525532
reducedpair::U3Q3,
526533
reducedpair::Cos2DeltaPhi,
527-
reducedpair::Cos3DeltaPhi);
534+
reducedpair::Cos3DeltaPhi,
535+
reducedpair::Psi2A,
536+
reducedpair::Psi2B,
537+
reducedpair::Psi2C
538+
);
528539

529540
using Dilepton = Dileptons::iterator;
530541
using DileptonExtra = DileptonsExtra::iterator;

PWGDQ/Tasks/dqEfficiency.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ struct AnalysisSameEventPairing {
797797
t2.reducedMCTrack().pt(), t2.reducedMCTrack().eta(), t2.reducedMCTrack().phi(), t2.reducedMCTrack().e(),
798798
t1.reducedMCTrack().vx(), t1.reducedMCTrack().vy(), t1.reducedMCTrack().vz(), t1.reducedMCTrack().vt(),
799799
t2.reducedMCTrack().vx(), t2.reducedMCTrack().vy(), t2.reducedMCTrack().vz(), t2.reducedMCTrack().vt(),
800-
t1.isAmbiguous(), t2.isAmbiguous(), -999., -999., -999., -999.);
800+
t1.isAmbiguous(), t2.isAmbiguous(), -999., -999., -999., -999.,-999., -999., -999.);
801801
}
802802
}
803803

PWGDQ/Tasks/dqFlow.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ struct DQEventQvector {
8585

8686
Configurable<std::string> fConfigEventCuts{"cfgEventCuts", "eventStandard", "Event selection"};
8787
Configurable<bool> fConfigQA{"cfgQA", true, "If true, fill QA histograms"};
88+
Configurable<bool> fConfigFlow{"cfgFlow", true, "If true, fill Flow histograms"};
8889
Configurable<float> fConfigCutPtMin{"cfgCutPtMin", 0.2f, "Minimal pT for tracks"};
8990
Configurable<float> fConfigCutPtMax{"cfgCutPtMax", 12.0f, "Maximal pT for tracks"};
9091
Configurable<float> fConfigCutEtaMin{"cfgCutEtaMin", -0.8f, "Eta min range for tracks"};
@@ -319,10 +320,12 @@ struct DQEventQvector {
319320
}
320321
}
321322

323+
322324
// Fill the tree for the reduced event table with Q vector quantities
323325
if (fEventCut->IsSelected(VarManager::fgValues)) {
324326
eventQvector(VarManager::fgValues[VarManager::kQ2X0A], VarManager::fgValues[VarManager::kQ2Y0A], VarManager::fgValues[VarManager::kQ2X0B], VarManager::fgValues[VarManager::kQ2Y0B], VarManager::fgValues[VarManager::kQ2X0C], VarManager::fgValues[VarManager::kQ2Y0C], VarManager::fgValues[VarManager::kMultA], VarManager::fgValues[VarManager::kMultC], VarManager::fgValues[VarManager::kMultC], VarManager::fgValues[VarManager::kQ3X0A], VarManager::fgValues[VarManager::kQ3Y0A], VarManager::fgValues[VarManager::kQ3X0B], VarManager::fgValues[VarManager::kQ3Y0B], VarManager::fgValues[VarManager::kQ3X0C], VarManager::fgValues[VarManager::kQ3Y0C]);
325327
}
328+
326329
}
327330

328331
// Process to fill Q vector using barrel tracks in a reduced event table for barrel/muon tracks flow related analyses Run 2

PWGDQ/Tasks/tableReader.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1051,12 +1051,13 @@ struct AnalysisSameEventPairing {
10511051
-999., -999., -999., -999.,
10521052
t1.isAmbiguous(), t2.isAmbiguous(),
10531053
VarManager::fgValues[VarManager::kU2Q2], VarManager::fgValues[VarManager::kU3Q3],
1054+
VarManager::fgValues[VarManager::kPsi2A], VarManager::fgValues[VarManager::kPsi2B], VarManager::fgValues[VarManager::kPsi2C],
10541055
VarManager::fgValues[VarManager::kCos2DeltaPhi], VarManager::fgValues[VarManager::kCos3DeltaPhi]);
10551056
}
10561057
}
10571058

10581059
if constexpr (eventHasQvector) {
1059-
dileptonFlowList(VarManager::fgValues[VarManager::kU2Q2], VarManager::fgValues[VarManager::kU3Q3], VarManager::fgValues[VarManager::kCos2DeltaPhi], VarManager::fgValues[VarManager::kCos3DeltaPhi]);
1060+
dileptonFlowList(VarManager::fgValues[VarManager::kU2Q2], VarManager::fgValues[VarManager::kU3Q3], VarManager::fgValues[VarManager::kCos2DeltaPhi], VarManager::fgValues[VarManager::kCos3DeltaPhi],VarManager::fgValues[VarManager::kPsi2A],VarManager::fgValues[VarManager::kPsi2B],VarManager::fgValues[VarManager::kPsi2C]);
10601061
}
10611062

10621063
int iCut = 0;

0 commit comments

Comments
 (0)