1414// / \author Andi Mathis, TU München, andreas.mathis@ph.tum.de
1515// / \author Valentina Mantovani Sarti, valentina.mantovani-sarti@tum.de
1616
17- #ifndef ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_
18- #define ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_
17+ #ifndef FEMTOWORDLCONTAINER_H_
18+ #define FEMTOWORDLCONTAINER_H_
1919
2020#include " Framework/HistogramRegistry.h"
2121#include " FemtoWorldMath.h"
@@ -61,8 +61,10 @@ class FemtoWorldContainer
6161 // / \param multBins multiplicity binning for the histograms
6262 // / \param kTBins kT binning for the histograms
6363 // / \param mTBins mT binning for the histograms
64- template <typename T>
65- void init (HistogramRegistry* registry, T& kstarBins, T& multBins, T& kTBins , T& mTBins )
64+ // / \param etaBins mT binning for the histograms
65+ // / \param phiBins mT binning for the histograms
66+ template <typename T1 , typename T2 >
67+ void init (HistogramRegistry* registry, T1 & kstarBins, T1 & multBins, T1 & kTBins , T1 & mTBins , T2 & phiBins, T2 & etaBins)
6668 {
6769 mHistogramRegistry = registry;
6870 std::string femtoObs;
@@ -75,8 +77,14 @@ class FemtoWorldContainer
7577 framework::AxisSpec kTAxis = {kTBins , " #it{k}_{T} (GeV/#it{c})" };
7678 framework::AxisSpec mTAxis = {mTBins , " #it{m}_{T} (GeV/#it{c}^{2})" };
7779
80+ mPhiLow = (-(int )(phiBins / 4 ) + 0.5 ) * 2 . * TMath::Pi () / phiBins;
81+ mPhiHigh = 2 * TMath::Pi () + (-(int )(phiBins / 4 ) + 0.5 ) * 2 . * TMath::Pi () / phiBins;
82+
83+ framework::AxisSpec phiAxis = {phiBins, mPhiLow , mPhiHigh };
84+ framework::AxisSpec etaAxis = {etaBins, -2.0 , 2.0 };
85+
7886 std::string folderName = static_cast <std::string>(mFolderSuffix [mEventType ]);
79- mHistogramRegistry ->add ((folderName + " relPairDist" ).c_str (), (" ; " + femtoObs + " ; Entries" ).c_str (), kTH1F , {femtoObsAxis});
87+ mHistogramRegistry ->add ((folderName + " relPairDist" ).c_str (), (" Name ; " + femtoObs + " ; Entries" ).c_str (), kTH1F , {femtoObsAxis});
8088 mHistogramRegistry ->add ((folderName + " relPairkT" ).c_str (), " ; #it{k}_{T} (GeV/#it{c}); Entries" , kTH1F , {kTAxis });
8189 mHistogramRegistry ->add ((folderName + " relPairkstarkT" ).c_str (), (" ; " + femtoObs + " ; #it{k}_{T} (GeV/#it{c})" ).c_str (), kTH2F , {femtoObsAxis, kTAxis });
8290 mHistogramRegistry ->add ((folderName + " relPairkstarmT" ).c_str (), (" ; " + femtoObs + " ; #it{m}_{T} (GeV/#it{c}^{2})" ).c_str (), kTH2F , {femtoObsAxis, mTAxis });
@@ -86,6 +94,7 @@ class FemtoWorldContainer
8694 mHistogramRegistry ->add ((folderName + " MultPtPart1" ).c_str (), " ; #it{p} _{T} Particle 1 (GeV/#it{c}); Multiplicity" , kTH2F , {{375 , 0 ., 7.5 }, multAxis});
8795 mHistogramRegistry ->add ((folderName + " MultPtPart2" ).c_str (), " ; #it{p} _{T} Particle 2 (GeV/#it{c}); Multiplicity" , kTH2F , {{375 , 0 ., 7.5 }, multAxis});
8896 mHistogramRegistry ->add ((folderName + " PtPart1PtPart2" ).c_str (), " ; #it{p} _{T} Particle 1 (GeV/#it{c}); #it{p} _{T} Particle 2 (GeV/#it{c})" , kTH2F , {{375 , 0 ., 7.5 }, {375 , 0 ., 7.5 }});
97+ mHistogramRegistry ->add ((folderName + " relPairDetaDphi" ).c_str (), " ; #Delta#varphi (rad); #Delta#eta" , kTH2D , {phiAxis, etaAxis});
8998 }
9099
91100 // / Set the PDG codes of the two particles involved
@@ -112,6 +121,16 @@ class FemtoWorldContainer
112121 const float kT = FemtoWorldMath::getkT (part1, mMassOne , part2, mMassTwo );
113122 const float mT = FemtoWorldMath::getmT (part1, mMassOne , part2, mMassTwo );
114123
124+ double delta_eta = part1.eta () - part2.eta ();
125+
126+ double delta_phi = part1.phi () - part2.phi ();
127+ while (delta_phi < mPhiLow ) {
128+ delta_phi += PIT ;
129+ }
130+ while (delta_phi > mPhiHigh ) {
131+ delta_phi -= PIT ;
132+ }
133+
115134 if (mHistogramRegistry ) {
116135 mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" relPairDist" ), femtoObs);
117136 mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" relPairkT" ), kT );
@@ -123,6 +142,7 @@ class FemtoWorldContainer
123142 mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" MultPtPart1" ), part1.pt (), mult);
124143 mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" MultPtPart2" ), part2.pt (), mult);
125144 mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" PtPart1PtPart2" ), part1.pt (), part2.pt ());
145+ mHistogramRegistry ->fill (HIST (mFolderSuffix [mEventType ]) + HIST (" relPairDetaDphi" ), delta_phi, delta_eta);
126146 }
127147 }
128148
@@ -133,8 +153,11 @@ class FemtoWorldContainer
133153 static constexpr int mEventType = eventType; // /< Type of the event (same/mixed, according to femtoWorldContainer::EventType)
134154 float mMassOne = 0 .f; // /< PDG mass of particle 1
135155 float mMassTwo = 0 .f; // /< PDG mass of particle 2
156+ double mPhiLow ;
157+ double mPhiHigh ;
158+ static constexpr double PIT = 6.28318530717958623 ;
136159};
137160
138161} // namespace o2::analysis::femtoWorld
139162
140- #endif /* ANALYSIS_TASKS_PWGCF_FEMTOWORLD_FEMTOWORDLCONTAINER_H_ */
163+ #endif /* FEMTOWORDLCONTAINER_H_ */
0 commit comments