|
36 | 36 | #include "Framework/RunningWorkflowInfo.h" |
37 | 37 | #include "Framework/runDataProcessing.h" |
38 | 38 | #include <CCDB/BasicCCDBManager.h> |
| 39 | +#include <DataFormatsParameters/GRPMagField.h> |
39 | 40 |
|
40 | 41 | #include "TList.h" |
41 | 42 | #include <TF1.h> |
@@ -141,6 +142,13 @@ struct FlowTask { |
141 | 142 | TF1* fMultMultV0ACutHigh = nullptr; |
142 | 143 | TF1* fT0AV0AMean = nullptr; |
143 | 144 | TF1* fT0AV0ASigma = nullptr; |
| 145 | + // for TPC sector boundary |
| 146 | + O2_DEFINE_CONFIGURABLE(cfgShowTPCsectorOverlap, bool, true, "Draw TPC sector overlap") |
| 147 | + O2_DEFINE_CONFIGURABLE(cfgRejectionTPCsectorOverlap, bool, false, "rejection for TPC sector overlap") |
| 148 | + O2_DEFINE_CONFIGURABLE(cfgMagnetField, std::string, "GLO/Config/GRPMagField", "CCDB path to Magnet field object") |
| 149 | + ConfigurableAxis axisPhiMod{"axisPhiMod", {100, 0, constants::math::PI / 9}, "fmod(#varphi,#pi/9)"}; |
| 150 | + TF1* fPhiCutLow = nullptr; |
| 151 | + TF1* fPhiCutHigh = nullptr; |
144 | 152 | } cfgFuncParas; |
145 | 153 |
|
146 | 154 | ConfigurableAxis axisPtHist{"axisPtHist", {100, 0., 10.}, "pt axis for histograms"}; |
@@ -283,6 +291,8 @@ struct FlowTask { |
283 | 291 | registry.add("hEta", "#eta distribution", {HistType::kTH1D, {axisEta}}); |
284 | 292 | registry.add("hPt", "p_{T} distribution before cut", {HistType::kTH1D, {axisPtHist}}); |
285 | 293 | registry.add("hPtRef", "p_{T} distribution after cut", {HistType::kTH1D, {axisPtHist}}); |
| 294 | + registry.add("pt_phi_bef", "before cut;p_{T};#phi_{modn}", {HistType::kTH2D, {axisPt, cfgFuncParas.axisPhiMod}}); |
| 295 | + registry.add("pt_phi_aft", "after cut;p_{T};#phi_{modn}", {HistType::kTH2D, {axisPt, cfgFuncParas.axisPhiMod}}); |
286 | 296 | registry.add("hChi2prTPCcls", "#chi^{2}/cluster for the TPC track segment", {HistType::kTH1D, {{100, 0., 5.}}}); |
287 | 297 | registry.add("hChi2prITScls", "#chi^{2}/cluster for the ITS track", {HistType::kTH1D, {{100, 0., 50.}}}); |
288 | 298 | registry.add("hnTPCClu", "Number of found TPC clusters", {HistType::kTH1D, {{100, 40, 180}}}); |
@@ -501,6 +511,11 @@ struct FlowTask { |
501 | 511 | cfgFuncParas.fT0AV0ASigma->SetParameters(463.4144, 6.796509e-02, -9.097136e-07, 7.971088e-12, -2.600581e-17); |
502 | 512 | } |
503 | 513 |
|
| 514 | + if (cfgFuncParas.cfgShowTPCsectorOverlap) { |
| 515 | + cfgFuncParas.fPhiCutLow = new TF1("fPhiCutLow", "0.06/x+pi/18.0-0.06", 0, 100); |
| 516 | + cfgFuncParas.fPhiCutHigh = new TF1("fPhiCutHigh", "0.1/x+pi/18.0+0.06", 0, 100); |
| 517 | + } |
| 518 | + |
504 | 519 | if (cfgTrackDensityCorrUse) { |
505 | 520 | std::vector<double> pTEffBins = {0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0, 1.4, 1.8, 2.2, 2.6, 3.0}; |
506 | 521 | hFindPtBin = new TH1D("hFindPtBin", "hFindPtBin", pTEffBins.size() - 1, &pTEffBins[0]); |
@@ -730,12 +745,49 @@ struct FlowTask { |
730 | 745 | return 1; |
731 | 746 | } |
732 | 747 |
|
| 748 | + int getMagneticField(uint64_t timestamp) |
| 749 | + { |
| 750 | + static o2::parameters::GRPMagField* grpo = nullptr; |
| 751 | + if (grpo == nullptr) { |
| 752 | + grpo = ccdb->getForTimeStamp<o2::parameters::GRPMagField>(cfgFuncParas.cfgMagnetField, timestamp); |
| 753 | + if (grpo == nullptr) { |
| 754 | + LOGF(fatal, "GRP object not found in %s for timestamp %llu", cfgFuncParas.cfgMagnetField.value.c_str(), timestamp); |
| 755 | + return 0; |
| 756 | + } |
| 757 | + LOGF(info, "Retrieved GRP from %s for timestamp %llu with magnetic field of %d kG", cfgFuncParas.cfgMagnetField.value.c_str(), timestamp, grpo->getNominalL3Field()); |
| 758 | + } |
| 759 | + return grpo->getNominalL3Field(); |
| 760 | + } |
| 761 | + |
733 | 762 | template <typename TTrack> |
734 | 763 | bool trackSelected(TTrack track) |
735 | 764 | { |
736 | 765 | return ((track.tpcNClsFound() >= cfgCutTPCclu) && (track.tpcNClsCrossedRows() >= cfgCutTPCCrossedRows) && (track.itsNCls() >= cfgCutITSclu)); |
737 | 766 | } |
738 | 767 |
|
| 768 | + template <typename TTrack> |
| 769 | + bool rejectionTPCoverlap(TTrack track, const int field) |
| 770 | + { |
| 771 | + double phimodn = track.phi(); |
| 772 | + if (field < 0) // for negative polarity field |
| 773 | + phimodn = o2::constants::math::TwoPI - phimodn; |
| 774 | + if (track.sign() < 0) // for negative charge |
| 775 | + phimodn = o2::constants::math::TwoPI - phimodn; |
| 776 | + if (phimodn < 0) |
| 777 | + LOGF(warning, "phi < 0: %g", phimodn); |
| 778 | + |
| 779 | + float middle = o2::constants::math::TwoPI / 18.0; |
| 780 | + phimodn += middle; // to center gap in the middle |
| 781 | + phimodn = fmod(phimodn, o2::constants::math::TwoPI / 9.0); |
| 782 | + registry.fill(HIST("pt_phi_bef"), track.pt(), phimodn); |
| 783 | + if (cfgFuncParas.cfgRejectionTPCsectorOverlap) { |
| 784 | + if (phimodn < cfgFuncParas.fPhiCutHigh->Eval(track.pt()) && phimodn > cfgFuncParas.fPhiCutLow->Eval(track.pt())) |
| 785 | + return false; // reject track |
| 786 | + } |
| 787 | + registry.fill(HIST("pt_phi_aft"), track.pt(), phimodn); |
| 788 | + return true; |
| 789 | + } |
| 790 | + |
739 | 791 | void initHadronicRate(aod::BCsWithTimestamps::iterator const& bc) |
740 | 792 | { |
741 | 793 | if (mRunNumber == bc.runNumber()) { |
@@ -844,9 +896,14 @@ struct FlowTask { |
844 | 896 | // track weights |
845 | 897 | float weff = 1, wacc = 1; |
846 | 898 | double nTracksCorrected = 0; |
| 899 | + int magnetfield = 0; |
847 | 900 | float independent = cent; |
848 | 901 | if (cfgUseNch) |
849 | 902 | independent = static_cast<float>(tracks.size()); |
| 903 | + if (cfgFuncParas.cfgShowTPCsectorOverlap) { |
| 904 | + // magnet field dependence cut |
| 905 | + magnetfield = getMagneticField(bc.timestamp()); |
| 906 | + } |
850 | 907 |
|
851 | 908 | double psi2Est = 0, psi3Est = 0, psi4Est = 0; |
852 | 909 | float wEPeff = 1; |
@@ -879,6 +936,8 @@ struct FlowTask { |
879 | 936 | for (const auto& track : tracks) { |
880 | 937 | if (!trackSelected(track)) |
881 | 938 | continue; |
| 939 | + if (cfgFuncParas.cfgShowTPCsectorOverlap && !rejectionTPCoverlap(track, magnetfield)) |
| 940 | + continue; |
882 | 941 | bool withinPtPOI = (cfgCutPtPOIMin < track.pt()) && (track.pt() < cfgCutPtPOIMax); // within POI pT range |
883 | 942 | bool withinPtRef = (cfgCutPtRefMin < track.pt()) && (track.pt() < cfgCutPtRefMax); // within RF pT range |
884 | 943 | if (cfgOutputNUAWeights) { |
|
0 commit comments