|
14 | 14 | /// |
15 | 15 | /// \author Fabrizio Grosa <fabrizio.grosa@cern.ch>, CERN |
16 | 16 |
|
17 | | -#include "CCDB/BasicCCDBManager.h" |
18 | | -#include "CommonConstants/PhysicsConstants.h" |
| 17 | +#include "PWGHF/Utils/utilsAnalysis.h" |
| 18 | + |
19 | 19 | #include "Common/Core/RecoDecay.h" |
20 | 20 | #include "Common/Core/TrackSelection.h" |
21 | 21 | #include "Common/Core/trackUtilities.h" |
22 | 22 | #include "Common/DataModel/CollisionAssociationTables.h" |
23 | 23 | #include "Common/DataModel/EventSelection.h" |
24 | 24 | #include "Common/DataModel/PIDResponse.h" |
25 | 25 | #include "Common/DataModel/TrackSelectionTables.h" |
| 26 | +#include "Tools/ML/MlResponse.h" |
| 27 | + |
| 28 | +#include "CCDB/BasicCCDBManager.h" |
| 29 | +#include "CommonConstants/PhysicsConstants.h" |
| 30 | +#include "DCAFitter/DCAFitterN.h" |
26 | 31 | #include "DataFormatsParameters/GRPMagField.h" |
27 | 32 | #include "DataFormatsParameters/GRPObject.h" |
28 | | -#include "DCAFitter/DCAFitterN.h" |
29 | 33 | #include "Framework/AnalysisTask.h" |
30 | 34 | #include "Framework/runDataProcessing.h" |
31 | | -#include "PWGHF/Utils/utilsAnalysis.h" |
32 | | -#include "Tools/ML/MlResponse.h" |
| 35 | + |
33 | 36 | #include <TPDGCode.h> |
34 | 37 |
|
| 38 | +#include <algorithm> |
| 39 | +#include <string> |
| 40 | +#include <vector> |
| 41 | + |
35 | 42 | using namespace o2; |
36 | 43 | using namespace o2::framework; |
37 | 44 | using namespace o2::framework::expressions; |
@@ -734,7 +741,7 @@ struct TagTwoProngDisplacedVertices { |
734 | 741 | } else if (fillTopoVarsTable == 3 && !TESTBIT(isSignal, aod::tagandprobe::SignalFlags::BkgFromNoHf)) { // only background excluding tracks from other HF decays |
735 | 742 | fillTable = false; |
736 | 743 | } |
737 | | - float pseudoRndm = trackFirst.pt() * 1000. - (int64_t)(trackFirst.pt() * 1000); |
| 744 | + float pseudoRndm = trackFirst.pt() * 1000. - static_cast<int64_t>(trackFirst.pt() * 1000); |
738 | 745 | if (ptTag < ptTagMaxForDownsampling && pseudoRndm >= downsamplingForTopoVarTable) { |
739 | 746 | fillTable = false; |
740 | 747 | } |
@@ -899,7 +906,7 @@ struct TagTwoProngDisplacedVertices { |
899 | 906 | } else if (fillTopoVarsTable == 3 && !TESTBIT(isSignal, aod::tagandprobe::SignalFlags::BkgFromNoHf)) { // only background excluding tracks from other HF decays |
900 | 907 | fillTable = false; |
901 | 908 | } |
902 | | - float pseudoRndm = trackPos.pt() * 1000. - (int64_t)(trackPos.pt() * 1000); |
| 909 | + float pseudoRndm = trackPos.pt() * 1000. - static_cast<int64_t>(trackPos.pt() * 1000); |
903 | 910 | if (ptTag < ptTagMaxForDownsampling && pseudoRndm >= downsamplingForTopoVarTable) { |
904 | 911 | fillTable = false; |
905 | 912 | } |
@@ -1150,6 +1157,7 @@ struct ProbeThirdTrack { |
1150 | 1157 | Configurable<LabeledArray<double>> mlCutsDzeroFromDstar{"mlCutsDzeroFromDstar", {aod::tagandprobe::mlCuts[0], aod::tagandprobe::nBinsPt, 3, aod::tagandprobe::labelsEmpty, aod::tagandprobe::labelsMlScores}, "ML Selections for Kpi pairs from D0 <- D*+ decays"}; |
1151 | 1158 | } mlConfig; |
1152 | 1159 | Configurable<float> ptCandMin{"ptCandMin", 0.f, "Minimum candidate pt for THnSparse filling"}; |
| 1160 | + Configurable<bool> fillTpcOnlyCase{"fillTpcOnlyCase", true, "Fill output for TPC only case (not needed for thinned data or Pb-Pb)"}; |
1153 | 1161 |
|
1154 | 1162 | ConfigurableAxis axisPtProbe{"axisPtProbe", {VARIABLE_WIDTH, 0.05f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.2f, 1.5f, 2.0f, 2.5f, 3.0f, 3.5f, 4.0f, 4.5f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.f, 12.f, 15.f, 20.f, 25.f, 30.f}, "Axis for pt Probe"}; |
1155 | 1163 | ConfigurableAxis axisPtTag{"axisPtTag", {VARIABLE_WIDTH, 0.05f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f, 0.6f, 0.7f, 0.8f, 0.9f, 1.0f, 1.2f, 1.5f, 2.0f, 2.5f, 3.0f, 3.5f, 4.0f, 4.5f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.f, 12.f, 15.f, 20.f, 25.f, 30.f}, "Axis for pt Tag"}; |
@@ -1250,6 +1258,9 @@ struct ProbeThirdTrack { |
1250 | 1258 |
|
1251 | 1259 | for (int iChannel{0}; iChannel < aod::tagandprobe::TagChannels::NTagChannels; ++iChannel) { |
1252 | 1260 | for (int iTrackType{0}; iTrackType < aod::tagandprobe::TrackTypes::NTrackTypes; ++iTrackType) { |
| 1261 | + if (!fillTpcOnlyCase && iTrackType == aod::tagandprobe::TrackTypes::GlobalWoDcaWoIts) { |
| 1262 | + continue; |
| 1263 | + } |
1253 | 1264 | histos[iChannel][iTrackType] = registry.add<THnSparse>(Form("h%sVsPtProbeTag_%s", tagChannels[iChannel].data(), trackTypes[iTrackType].data()), |
1254 | 1265 | "; #it{p}_{T}(D) (GeV/#it{c}); #it{p}_{T}(tag) (GeV/#it{c}); #it{p}_{T}(probe) (GeV/#it{c}); #it{p}_{T}^{TPC in}(probe) (GeV/#it{c}); #it{M}(D) (GeV/#it{c}^{2}); #it{M}(tag) (GeV/#it{c}^{2}); #it{#eta}(probe); #it{N}_{cross rows}^{TPC}(probe); #chi^{2}/#it{N}_{clusters}^{TPC}(probe); #it{N}_{clusters}^{ITS}(probe);", |
1255 | 1266 | HistType::kTHnSparseF, {axisPtD, axisPtTag, axisPtProbe, axisPtProbe, axisMass[iChannel], axisMassTag[iChannel], axisEtaProbe, axisNumCrossRowTpc, axisTpcChi2PerClus, axisNumCluIts}); |
@@ -1346,6 +1357,9 @@ struct ProbeThirdTrack { |
1346 | 1357 | continue; |
1347 | 1358 | } |
1348 | 1359 | for (int iTrackType{0}; iTrackType < aod::tagandprobe::TrackTypes::NTrackTypes; ++iTrackType) { |
| 1360 | + if (!fillTpcOnlyCase && iTrackType == aod::tagandprobe::TrackTypes::GlobalWoDcaWoIts) { |
| 1361 | + continue; |
| 1362 | + } |
1349 | 1363 | if (trackSelector[iTrackType].IsSelected(trackThird)) { |
1350 | 1364 | histos[channel][iTrackType]->Fill(ptD, ptTag, ptTrackThird, ptTpcInnerTrackThird, invMass, invMassTag, etaTrackThird, numTpcCrossRowTrackThird, numTpcChi2NumCluTrackThird, numItsCluTrackThird); |
1351 | 1365 | } |
|
0 commit comments