88// In applying this license CERN does not waive the privileges and immunities
99// granted to it by virtue of its status as an Intergovernmental Organization
1010// or submit itself to any jurisdiction.
11- //
12- // ========================
13- //
11+
1412// / \file DiphotonHadronMPC.h
1513// / \brief This code is to analyze diphoton-hadron correlation. Keep in mind that cumulant method does not require event mixing.
16- // /
1714// / \author D. Sekihata, daiki.sekihata@cern.ch
1815
1916#ifndef PWGEM_PHOTONMESON_CORE_DIPHOTONHADRONMPC_H_
2017#define PWGEM_PHOTONMESON_CORE_DIPHOTONHADRONMPC_H_
2118
2219#include " PWGEM/Dilepton/Core/EMTrackCut.h"
2320#include " PWGEM/Dilepton/Utils/EMTrack.h"
24- #include " PWGEM/Dilepton/Utils/EMTrackUtilities.h"
2521#include " PWGEM/Dilepton/Utils/EventMixingHandler.h"
2622#include " PWGEM/PhotonMeson/Core/DalitzEECut.h"
2723#include " PWGEM/PhotonMeson/Core/EMPhotonEventCut.h"
2824#include " PWGEM/PhotonMeson/Core/V0PhotonCut.h"
2925#include " PWGEM/PhotonMeson/DataModel/gammaTables.h"
3026#include " PWGEM/PhotonMeson/Utils/EventHistograms.h"
31- #include " PWGEM/PhotonMeson/Utils/NMHistograms.h"
3227#include " PWGEM/PhotonMeson/Utils/PairUtilities.h"
3328
34- #include " Common/CCDB/RCTSelectionFlags.h"
35- #include " Common/Core/RecoDecay.h"
36-
37- #include " CCDB/BasicCCDBManager.h"
38- #include " DataFormatsParameters/GRPMagField.h"
39- #include " DataFormatsParameters/GRPObject.h"
40- #include " DetectorsBase/GeometryManager.h"
41- #include " Framework/ASoAHelpers.h"
42- #include " Framework/AnalysisDataModel.h"
43- #include " Framework/AnalysisTask.h"
44- #include " Framework/runDataProcessing.h"
45-
46- #include " Math/Vector4D.h"
47- #include " TString.h"
29+ #include < Common/CCDB/RCTSelectionFlags.h>
30+ #include < Common/Core/RecoDecay.h>
31+ #include < Common/DataModel/Centrality.h>
32+ #include < Common/DataModel/EventSelection.h>
33+ #include < Common/DataModel/PIDResponseTPC.h>
34+
35+ #include < CCDB/BasicCCDBManager.h>
36+ #include < CCDB/CcdbApi.h>
37+ #include < CommonConstants/MathConstants.h>
38+ #include < CommonConstants/PhysicsConstants.h>
39+ #include < DataFormatsParameters/GRPMagField.h>
40+ #include < DataFormatsParameters/GRPObject.h>
41+ #include < Framework/ASoAHelpers.h>
42+ #include < Framework/AnalysisDataModel.h>
43+ #include < Framework/AnalysisHelpers.h>
44+ #include < Framework/AnalysisTask.h>
45+ #include < Framework/Configurable.h>
46+ #include < Framework/HistogramRegistry.h>
47+ #include < Framework/HistogramSpec.h>
48+ #include < Framework/InitContext.h>
49+ #include < Framework/OutputObjHeader.h>
50+ #include < Framework/runDataProcessing.h>
51+
52+ #include < Math/Vector4D.h> // IWYU pragma: keep
53+ #include < Math/Vector4Dfwd.h>
4854
4955#include < algorithm>
50- #include < array>
51- #include < cstring>
52- #include < iterator>
56+ #include < cmath>
57+ #include < cstdint>
5358#include < map>
5459#include < string>
60+ #include < string_view>
5561#include < tuple>
5662#include < utility>
5763#include < vector>
@@ -353,11 +359,11 @@ struct DiphotonHadronMPC {
353359
354360 // diphoton-hadron info
355361 const AxisSpec axis_deta{ConfDEtaBins, deta_axis_title};
356- const AxisSpec axis_dphi{cfgNbinsDPhi, -M_PI / 2 , +3 * M_PI / 2 , dphi_axis_title};
362+ const AxisSpec axis_dphi{cfgNbinsDPhi, -o2::constants::math::PIHalf , +3 * o2::constants::math::PIHalf , dphi_axis_title};
357363
358364 const AxisSpec axis_pt_hadron{ConfPtHadronBins, " p_{T,h} (GeV/c)" };
359365 const AxisSpec axis_eta_hadron{40 , -2 , +2 , " #eta_{h}" };
360- const AxisSpec axis_phi_hadron{36 , 0 , 2 * M_PI , " #varphi_{h} (rad.)" };
366+ const AxisSpec axis_phi_hadron{36 , 0 , o2::constants::math::TwoPI , " #varphi_{h} (rad.)" };
361367
362368 fRegistry .add (" Hadron/hs" , " hadron" , kTHnSparseD , {axis_pt_hadron, axis_eta_hadron, axis_phi_hadron}, false );
363369 fRegistry .add (" Hadron/hTrackBit" , " track bit" , kTH1D , {{65536 , -0.5 , 65535.5 }}, false );
@@ -370,7 +376,7 @@ struct DiphotonHadronMPC {
370376
371377 // hadron-hadron
372378 const AxisSpec axis_deta_hh{60 , -3 , +3 , " #Delta#eta = #eta_{h}^{ref1} - #eta_{h}^{ref2}" };
373- const AxisSpec axis_dphi_hh{90 , -M_PI / 2 , +3 * M_PI / 2 , " #Delta#varphi = #varphi_{h}^{ref1} - #varphi_{h}^{ref2} (rad.)" };
379+ const AxisSpec axis_dphi_hh{90 , -o2::constants::math::PIHalf , +3 * o2::constants::math::PIHalf , " #Delta#varphi = #varphi_{h}^{ref1} - #varphi_{h}^{ref2} (rad.)" };
374380 // const AxisSpec axis_cosndphi_hh{cfgNbinsCosNDPhi, -1, +1, std::format("cos({0:d}(#varphi_{{h}}^{{ref1}} - #varphi_{{h}}^{{ref2}}))", cfgNmod.value)};
375381 fRegistry .add (" HadronHadron/same/hDEtaDPhi" , " hadron-hadron 2PC" , kTH2D , {axis_dphi_hh, axis_deta_hh}, true );
376382 fRegistry .addClone (" HadronHadron/same/" , " HadronHadron/mix/" );
@@ -564,7 +570,7 @@ struct DiphotonHadronMPC {
564570 auto photons2_per_collision = photons2.sliceBy (perCollision2, collision.globalIndex ());
565571
566572 for (const auto & [g1, g2] : combinations (CombinationsStrictlyUpperIndexPolicy (photons1_per_collision, photons2_per_collision))) {
567- if (!cut1.template IsSelected <TSubInfos1>(g1) || !cut2.template IsSelected <TSubInfos2>(g2)) {
573+ if (!cut1.template IsSelected <decltype (g1), TSubInfos1>(g1) || !cut2.template IsSelected <decltype (g2), TSubInfos2>(g2)) {
568574 continue ;
569575 }
570576
@@ -594,7 +600,7 @@ struct DiphotonHadronMPC {
594600 float deta = v12.Eta () - v3.Eta ();
595601 float dphi = v12.Phi () - v3.Phi ();
596602 // o2::math_utils::bringTo02Pi(dphi);
597- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
603+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
598604 fRegistry .fill (HIST (" DiphotonHadron/same/hs" ), v12.M (), v12.Pt (), deta, dphi);
599605 npair++;
600606 }
@@ -624,7 +630,7 @@ struct DiphotonHadronMPC {
624630 auto electrons_per_collision = electrons->sliceByCached (o2::aod::emprimaryelectron::emeventId, collision.globalIndex (), cache);
625631
626632 for (const auto & g1 : photons1_per_collision) {
627- if (!cut1.template IsSelected <TSubInfos1>(g1)) {
633+ if (!cut1.template IsSelected <decltype (g1), TSubInfos1>(g1)) {
628634 continue ;
629635 }
630636 auto pos1 = g1.template posTrack_as <TSubInfos1>();
@@ -670,7 +676,7 @@ struct DiphotonHadronMPC {
670676 float deta = veeg.Eta () - v3.Eta ();
671677 float dphi = veeg.Phi () - v3.Phi ();
672678 // o2::math_utils::bringTo02Pi(dphi);
673- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
679+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
674680 fRegistry .fill (HIST (" DiphotonHadron/same/hs" ), veeg.M (), veeg.Pt (), deta, dphi);
675681 npair++;
676682
@@ -720,7 +726,7 @@ struct DiphotonHadronMPC {
720726 float deta = ref1.eta () - ref2.eta ();
721727 float dphi = ref1.phi () - ref2.phi ();
722728 // o2::math_utils::bringTo02Pi(dphi);
723- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
729+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
724730 fRegistry .fill (HIST (" HadronHadron/same/hDEtaDPhi" ), dphi, deta);
725731 }
726732 }
@@ -794,7 +800,7 @@ struct DiphotonHadronMPC {
794800 float deta = trg.eta () - ref.eta ();
795801 float dphi = trg.phi () - ref.phi ();
796802 // o2::math_utils::bringTo02Pi(dphi);
797- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
803+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
798804 fRegistry .fill (HIST (" DiphotonHadron/mix/hs" ), trg.mass (), trg.pt (), deta, dphi);
799805 }
800806 }
@@ -889,7 +895,7 @@ struct DiphotonHadronMPC {
889895 float deta = trg.eta () - ref.eta ();
890896 float dphi = trg.phi () - ref.phi ();
891897 // o2::math_utils::bringTo02Pi(dphi);
892- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
898+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
893899 fRegistry .fill (HIST (" DiphotonHadron/mix/hs" ), trg.mass (), trg.pt (), deta, dphi);
894900 }
895901 }
@@ -917,7 +923,7 @@ struct DiphotonHadronMPC {
917923 float deta = ref1.eta () - ref2.eta ();
918924 float dphi = ref1.phi () - ref2.phi ();
919925 // o2::math_utils::bringTo02Pi(dphi);
920- dphi = RecoDecay::constrainAngle (dphi, -M_PI / 2 , 1U );
926+ dphi = RecoDecay::constrainAngle (dphi, -o2::constants::math::PIHalf , 1U );
921927 fRegistry .fill (HIST (" HadronHadron/mix/hDEtaDPhi" ), dphi, deta);
922928 }
923929 }
0 commit comments