5454#include < utility>
5555#include < vector>
5656
57- #include < math.h>
58-
5957struct dimuonV1 {
6058
6159 // // Configurables
@@ -76,6 +74,7 @@ struct dimuonV1 {
7674 o2::framework::ConfigurableAxis ConfPtllBins{" ConfPtllBins" , {10 , 0 , 10 }, " pTll bins for output histograms" };
7775 o2::framework::ConfigurableAxis ConfYllBins{" ConfYllBins" , {3 , -4.0 , -2.5 }, " yll bins for output histograms" };
7876 o2::framework::ConfigurableAxis ConfUQBins{" ConfUQBins" , {400 , -1 , 1 }, " uQ bins for output histograms" };
77+ o2::framework::ConfigurableAxis ConfCentBins{" ConfCentBins" , {20 , 10 , 30 }, " centrality bins for output histograms" };
7978 o2::framework::Configurable<int > cfgNrotation{" cfgNrotation" , 1 , " number of rotation bkg" };
8079 o2::framework::Configurable<int > cfgRandomSeed{" cfgRandomSeed" , 1 , " randam seed for rotation bkg" };
8180 o2::framework::Configurable<float > cfgRotationMin{" cfgRotationMin" , -M_PI / 4 , " min. rotation angle for rotation bkg" };
@@ -228,8 +227,9 @@ struct dimuonV1 {
228227 const o2::framework::AxisSpec axis_uxQxp{ConfUQBins, " u_{x}Q_{x}^{p}" };
229228 const o2::framework::AxisSpec axis_uyQyt{ConfUQBins, " u_{y}Q_{y}^{t}" };
230229 const o2::framework::AxisSpec axis_uyQyp{ConfUQBins, " u_{y}Q_{y}^{p}" };
230+ const o2::framework::AxisSpec axis_centrality{ConfCentBins, " centrality (%)" };
231231
232- fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::HistType::kTHnSparseD , {axis_mass, axis_pt, axis_y, axis_uxQxt, axis_uxQxp, axis_uyQyt, axis_uyQyp}, true );
232+ fRegistry .add (" Pair/same/uls/hs" , " dilepton" , o2::framework::HistType::kTHnSparseD , {axis_mass, axis_pt, axis_y, axis_uxQxt, axis_uxQxp, axis_uyQyt, axis_uyQyp, axis_centrality }, true );
233233 fRegistry .add (" Pair/same/uls/hsRotBkg" , " dilepton" , o2::framework::HistType::kTHnSparseD , {axis_mass, axis_pt, axis_y}, true );
234234
235235 // fRegistry.addClone("Pair/same/uls/", "Pair/same/lspp/");
@@ -292,7 +292,7 @@ struct dimuonV1 {
292292 }
293293
294294 template <int ev_id, typename TCollision, typename TTrack1, typename TTrack2, typename TCut>
295- bool fillPairInfo (TCollision const & collision, TTrack1 const & t1, TTrack2 const & t2, TCut const & cut)
295+ bool fillPairInfo (TCollision const & collision, TTrack1 const & t1, TTrack2 const & t2, TCut const & cut, const float centrality )
296296 {
297297 if (!cut.template IsSelectedTrack <false >(t1) || !cut.template IsSelectedTrack <false >(t2)) {
298298 return false ;
@@ -321,7 +321,7 @@ struct dimuonV1 {
321321 float uyQyp = std::sin (1 .f * phi) * collision.qyZDCA ();
322322
323323 if (t1.sign () * t2.sign () < 0 ) { // ULS
324- fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), v12.Rapidity (), uxQxt, uxQxp, uyQyt, uyQyp, weight);
324+ fRegistry .fill (HIST (" Pair/" ) + HIST (event_pair_types[ev_id]) + HIST (" uls/hs" ), v12.M (), v12.Pt (), v12.Rapidity (), uxQxt, uxQxp, uyQyt, uyQyp, centrality, weight);
325325
326326 for (int i = 0 ; i < cfgNrotation; i++) {
327327 float dphi = distDPhi (engine);
@@ -391,14 +391,14 @@ struct dimuonV1 {
391391 auto negTracks_per_coll = negTracks.sliceByCached (perCollision, collision.globalIndex (), cache);
392392
393393 for (const auto & [pos, neg] : combinations (o2::soa::CombinationsFullIndexPolicy (posTracks_per_coll, negTracks_per_coll))) { // ULS
394- fillPairInfo<0 >(collision, pos, neg, cut);
394+ fillPairInfo<0 >(collision, pos, neg, cut, centrality );
395395 }
396396
397397 // for (const auto& [pos1, pos2] : combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(posTracks_per_coll, posTracks_per_coll))) { // LS++
398- // fillPairInfo<0>(collision, pos1, pos2, cut);
398+ // fillPairInfo<0>(collision, pos1, pos2, cut, centrality );
399399 // }
400400 // for (const auto& [neg1, neg2] : combinations(o2::soa::CombinationsStrictlyUpperIndexPolicy(negTracks_per_coll, negTracks_per_coll))) { // LS--
401- // fillPairInfo<0>(collision, neg1, neg2, cut);
401+ // fillPairInfo<0>(collision, neg1, neg2, cut, centrality );
402402 // }
403403
404404 } // end of collision loop
0 commit comments