Skip to content
Merged
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
50 changes: 46 additions & 4 deletions PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,18 @@
Configurable<std::string> cfgShiftPath{"cfgShiftPath", "Users/j/junlee/Qvector/QvecCalib/Shift", "Path for Shift"};
Configurable<float> cfgVertexZ{"cfgVertexZ", 10.0, "Maximum vertex Z selection"};

Configurable<bool> cfgq2analysis{"cfgq2analysis", false, "ese analysis flag"};
Configurable<int> cfgq2analysis{"cfgq2analysis", 0, "ese analysis selection mode"};
Configurable<std::vector<float>> cfgMultq2SelBin{"cfgMultq2SelBin", {0, 5, 10, 20, 30, 40, 50, 60, 70, 80, 100}, ""};
Configurable<std::vector<float>> cfgMultq2high{"cfgMultq2high", {}, ""};
Configurable<std::vector<float>> cfgMultq2low{"cfgMultq2low", {}, ""};
Configurable<float> cfgQ2SelFrac{"cfgQ2SelFrac", 0.5, "ese analysis q2 selection with cfgq2analysis=2"};

Configurable<int> cfgJetSubEvtSel{"cfgJetSubEvtSel", 0, "0: none, 1: Ratio, 2: relative ratio"};
Configurable<std::vector<float>> cfgJetSubEvlSelVar{"cfgJetSubEvlSelVar", {}, ""};

Configurable<std::string> cfgQselHistPath{"cfgQselHistPath", "", "CCDB path for q2 histogram"};
Configurable<bool> cfgEventQAonly{"cfgEventQAonly", false, "event loop only"};

Configurable<std::string> cfgDetName{"cfgDetName", "FT0C", "The name of detector to be analyzed"};
Configurable<std::string> cfgRefAName{"cfgRefAName", "TPCPos", "The name of detector for reference A"};
Configurable<std::string> cfgRefBName{"cfgRefBName", "TPCNeg", "The name of detector for reference B"};
Expand Down Expand Up @@ -187,6 +191,9 @@
std::string fullCCDBShiftCorrPath;

THn* effMap = nullptr;
TH3F* q2Map = nullptr;
float q2selHigh = 100.;
float q2selLow = 0.;

std::vector<float> ft0RelGainConst{};
std::vector<float> fv0RelGainConst{};
Expand Down Expand Up @@ -399,6 +406,11 @@

q2Mag = std::sqrt(std::pow(qx_shifted[0], 2) + std::pow(qy_shifted[0], 2));

if (cfgq2analysis == 2) {

Check failure on line 409 in PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

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.
q2selHigh = q2Map->GetBinContent(q2Map->GetXaxis()->FindBin(i + 2), q2Map->GetYaxis()->FindBin(cent), q2Map->GetZaxis()->FindBin(cfgQ2SelFrac));
q2selLow = q2Map->GetBinContent(q2Map->GetXaxis()->FindBin(i + 2), q2Map->GetYaxis()->FindBin(cent), q2Map->GetZaxis()->FindBin(1. - cfgQ2SelFrac));
}

epFlowHistograms.fill(HIST("EpDet"), i + 2, cent, eps[0]);
epFlowHistograms.fill(HIST("EpRefA"), i + 2, cent, eps[1]);
epFlowHistograms.fill(HIST("EpRefB"), i + 2, cent, eps[2]);
Expand All @@ -419,10 +431,10 @@
if (cfgJetSubEvtSel) {
epFlowHistograms.fill(HIST("EpResQvecEvslDetRefAxx"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
epFlowHistograms.fill(HIST("EpResQvecEvslDetRefBxx"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
epFlowHistograms.fill(HIST("EpResQvecEvslRefARefBxy"), i + 2, cent, qx_shifted[2] * qy_shifted[1] - qx_shifted[1] * qy_shifted[2]);
epFlowHistograms.fill(HIST("EpResQvecEvslRefARefBxx"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
}

if (cfgq2analysis) {
if (cfgq2analysis == 1) {
if (q2sel(q2Mag, true)) {
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
Expand All @@ -432,6 +444,20 @@
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2low"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
}
} else if (cfgq2analysis == 2) {

Check failure on line 447 in PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

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.
if (q2Mag > q2selHigh) {
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2high"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2high"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
} else if (q2Mag < q2selLow) {
epFlowHistograms.fill(HIST("EpResQvecDetRefAxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[1] + qy_shifted[0] * qy_shifted[1]);
epFlowHistograms.fill(HIST("EpResQvecDetRefBxx_q2low"), i + 2, cent, qx_shifted[0] * qx_shifted[2] + qy_shifted[0] * qy_shifted[2]);
epFlowHistograms.fill(HIST("EpResQvecRefARefBxx_q2low"), i + 2, cent, qx_shifted[1] * qx_shifted[2] + qy_shifted[1] * qy_shifted[2]);
}
}

if (cfgEventQAonly) {
continue;
}

highestPt = 0.0;
Expand All @@ -458,12 +484,18 @@
epFlowHistograms.fill(HIST("SPvnxx"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
epFlowHistograms.fill(HIST("SPvnxy"), i + 2, cent, track.pt(), track.eta(), (std::sin(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] - std::cos(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);

if (cfgq2analysis) {
if (cfgq2analysis == 1) {
if (q2sel(q2Mag, true)) {
epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
} else if (q2sel(q2Mag, false)) {
epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
}
} else if (cfgq2analysis == 2) {

Check failure on line 493 in PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

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.
if (q2Mag > q2selHigh) {
epFlowHistograms.fill(HIST("SPvnxx_q2high"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
} else if (q2Mag < q2selLow) {
epFlowHistograms.fill(HIST("SPvnxx_q2low"), i + 2, cent, track.pt(), track.eta(), (std::cos(track.phi() * static_cast<float>(i + 2)) * qx_shifted[0] + std::sin(track.phi() * static_cast<float>(i + 2)) * qy_shifted[0]), weight);
}
}
}
if (i == 0) { // second harmonic only
Expand Down Expand Up @@ -642,6 +674,16 @@
}
}

if (cfgq2analysis == 2) {

Check failure on line 677 in PWGCF/JCorran/Tasks/jEPFlowAnalysis.cxx

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.
auto bc = coll.bc_as<aod::BCsWithTimestamps>();
currentRunNumber = bc.runNumber();
if (currentRunNumber != lastRunNumber) {
std::string fullPath;
fullPath = cfgQselHistPath;
q2Map = ccdb->getForTimeStamp<TH3F>(cfgQselHistPath, bc.timestamp());
}
}

cent = coll.cent();
epFlowHistograms.fill(HIST("hCentrality"), cent);
epFlowHistograms.fill(HIST("hVertex"), coll.posZ());
Expand Down
Loading