@@ -68,7 +68,7 @@ using namespace o2::aod::pwgem::dilepton::utils;
6868using namespace o2 ::aod::pwgem::dilepton::utils::emtrackutil;
6969using namespace o2 ::aod::pwgem::dilepton::utils::pairutil;
7070
71- using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent>;
71+ using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent, aod::EMEventsQvec2 >;
7272using MyCollision = MyCollisions::iterator;
7373
7474using MyElectrons = soa::Join<aod::EMPrimaryElectrons, aod::EMPrimaryElectronEMEventIds, aod::EMAmbiguousElectronSelfIds, aod::EMPrimaryElectronsPrefilterBit, aod::EMPrimaryElectronsPrefilterBitDerived>;
@@ -96,6 +96,7 @@ struct DileptonHadronMPC {
9696 Configurable<float > d_bz_input{" d_bz_input" , -999 , " bz field in kG, -999 is automatic" };
9797
9898 Configurable<int > cfgAnalysisType{" cfgAnalysisType" , static_cast <int >(o2::aod::pwgem::dilepton::utils::pairutil::DileptonHadronAnalysisType::kAzimuthalCorrelation ), " kAzimuthalCorrelation:0, kCumulant:1" };
99+ Configurable<int > cfgEP2Estimator_for_Mix{" cfgEP2Estimator_for_Mix" , 3 , " FT0M:0, FT0A:1, FT0C:2, BTot:3, BPos:4, BNeg:5, FV0A:6" };
99100 Configurable<int > cfgCentEstimator{" cfgCentEstimator" , 2 , " FT0M:0, FT0A:1, FT0C:2" };
100101 Configurable<int > cfgOccupancyEstimator{" cfgOccupancyEstimator" , 0 , " FT0C:0, Track:1" };
101102 Configurable<bool > cfgDoMix{" cfgDoMix" , true , " flag for event mixing" };
@@ -104,6 +105,7 @@ struct DileptonHadronMPC {
104105 Configurable<uint64_t > ndiff_bc_mix{" ndiff_bc_mix" , 594 , " difference in global BC required in mixed events" };
105106 ConfigurableAxis ConfVtxBins{" ConfVtxBins" , {VARIABLE_WIDTH, -10 .0f , -8 .f , -6 .f , -4 .f , -2 .f , 0 .f , 2 .f , 4 .f , 6 .f , 8 .f , 10 .f }, " Mixing bins - z-vertex" };
106107 ConfigurableAxis ConfCentBins{" ConfCentBins" , {VARIABLE_WIDTH, 0 .0f , 5 .0f , 10 .0f , 20 .0f , 30 .0f , 40 .0f , 50 .0f , 60 .0f , 70 .0f , 80 .0f , 90 .0f , 100 .f , 999 .f }, " Mixing bins - centrality" };
108+ ConfigurableAxis ConfEPBins{" ConfEPBins" , {16 , -M_PI / 2 , +M_PI / 2 }, " Mixing bins - event plane angle" };
107109 ConfigurableAxis ConfOccupancyBins{" ConfOccupancyBins" , {VARIABLE_WIDTH, -1 , 1e+10 }, " Mixing bins - occupancy" };
108110 Configurable<std::string> cfg_swt_name{" cfg_swt_name" , " fHighTrackMult" , " desired software trigger name" }; // 1 trigger name per 1 task. fHighTrackMult, fHighFt0Mult
109111 // Configurable<int> cfgNtracksPV08Min{"cfgNtracksPV08Min", -1, "min. multNTracksPV"};
@@ -115,9 +117,7 @@ struct DileptonHadronMPC {
115117 ConfigurableAxis ConfPtllBins{" ConfPtllBins" , {VARIABLE_WIDTH, 0.00 , 0.15 , 0.50 , 1.00 , 1.50 , 2.00 , 2.50 , 3.00 , 3.50 , 4.00 , 4.50 , 5.00 , 6.00 , 7.00 , 8.00 , 9.00 , 10.00 }, " pTll bins for output histograms" };
116118 ConfigurableAxis ConfDCAllBins{" ConfDCAllBins" , {VARIABLE_WIDTH, 0.0 , 0.5 , 1.0 , 1.5 , 2.0 , 2.5 , 3.0 , 3.5 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 , 9.0 , 10.0 }, " DCAll bins for output histograms" };
117119
118- // ConfigurableAxis ConfMmumuBins{"ConfMmumuBins", {VARIABLE_WIDTH, 0.20, 0.21, 0.22, 0.23, 0.24, 0.25, 0.26, 0.27, 0.28, 0.29, 0.30, 0.31, 0.32, 0.33, 0.34, 0.35, 0.36, 0.37, 0.38, 0.39, 0.40, 0.41, 0.42, 0.43, 0.44, 0.45, 0.46, 0.47, 0.48, 0.49, 0.50, 0.51, 0.52, 0.53, 0.54, 0.55, 0.56, 0.57, 0.58, 0.59, 0.60, 0.61, 0.62, 0.63, 0.64, 0.65, 0.66, 0.67, 0.68, 0.69, 0.70, 0.71, 0.72, 0.73, 0.74, 0.75, 0.76, 0.77, 0.78, 0.79, 0.80, 0.81, 0.82, 0.83, 0.84, 0.85, 0.86, 0.87, 0.88, 0.89, 0.90, 0.91, 0.92, 0.93, 0.94, 0.95, 0.96, 0.97, 0.98, 0.99, 1.00, 1.01, 1.02, 1.03, 1.04, 1.05, 1.06, 1.07, 1.08, 1.09, 1.10, 1.11,1.12,1.13,1.14,1.15,1.16,1.17,1.18,1.19, 1.20, 1.30, 1.40, 1.50, 1.60, 1.70, 1.80, 1.90, 2.00, 2.10, 2.20, 2.30, 2.40, 2.50, 2.60, 2.70, 2.75, 2.80, 2.85, 2.90, 2.95, 3.00, 3.05, 3.10, 3.15, 3.20, 3.25, 3.30, 3.35, 3.40, 3.45, 3.50, 3.55, 3.60, 3.65, 3.70, 3.75, 3.80, 3.85, 3.90, 3.95, 4.00, 4.10, 4.20, 4.30, 4.40, 4.50, 4.60, 4.70, 4.80, 4.90, 5.00, 5.10, 5.20, 5.30, 5.40, 5.50, 5.60, 5.70, 5.80, 5.90, 6.00, 6.10, 6.20, 6.30, 6.40, 6.50, 6.60, 6.70, 6.80, 6.90, 7.00, 7.10, 7.20, 7.30, 7.40, 7.50, 7.60, 7.70, 7.80, 7.90, 8.00, 8.10, 8.20, 8.30, 8.40, 8.50, 8.60, 8.70, 8.80, 8.90, 9.00, 9.10, 9.20, 9.30, 9.40, 9.50, 9.60, 9.70, 9.80, 9.90, 10.00, 10.10, 10.20, 10.30, 10.40, 10.50, 10.60, 10.70, 10.80, 10.90, 11.00, 11.50, 12.00}, "mmumu bins for output histograms"}; // for dimuon. one can copy bins here to hyperloop page.
119-
120- ConfigurableAxis ConfPtHadronBins{" ConfPtHadronBins" , {VARIABLE_WIDTH, 0.00 , 0.15 , 0.2 , 0.3 , 0.4 , 0.50 , 1.00 , 2.00 , 3.00 , 4.00 , 5.00 }, " pT,h bins for output histograms" };
120+ ConfigurableAxis ConfPtHadronBins{" ConfPtHadronBins" , {50 , 0 , 5 }, " pT,h bins for output histograms" };
121121 ConfigurableAxis ConfYllBins{" ConfYllBins" , {1 , -1 .f , 1 .f }, " yll bins for output histograms" }; // pair rapidity
122122 ConfigurableAxis ConfDEtaBins{" ConfDEtaBins" , {120 , -6 , 6 }, " deta bins for output histograms" };
123123 Configurable<int > cfgNbinsDPhi{" cfgNbinsDPhi" , 36 , " nbins in dphi for output histograms" };
@@ -314,10 +314,8 @@ struct DileptonHadronMPC {
314314
315315 std::vector<float > cent_bin_edges;
316316 std::vector<float > zvtx_bin_edges;
317+ std::vector<float > ep_bin_edges;
317318 std::vector<float > occ_bin_edges;
318- int nmod = -1 ; // this is for flow analysis
319- int subdet2 = -1 ; // this is for flow analysis
320- int subdet3 = -1 ; // this is for flow analysis
321319 float leptonM1 = 0 .f;
322320 float leptonM2 = 0 .f;
323321
@@ -366,6 +364,23 @@ struct DileptonHadronMPC {
366364 }
367365 }
368366
367+ if (ConfEPBins.value [0 ] == VARIABLE_WIDTH) {
368+ ep_bin_edges = std::vector<float >(ConfEPBins.value .begin (), ConfEPBins.value .end ());
369+ ep_bin_edges.erase (ep_bin_edges.begin ());
370+ for (const auto & edge : ep_bin_edges) {
371+ LOGF (info, " VARIABLE_WIDTH: ep_bin_edges = %f" , edge);
372+ }
373+ } else {
374+ int nbins = static_cast <int >(ConfEPBins.value [0 ]);
375+ float xmin = static_cast <float >(ConfEPBins.value [1 ]);
376+ float xmax = static_cast <float >(ConfEPBins.value [2 ]);
377+ ep_bin_edges.resize (nbins + 1 );
378+ for (int i = 0 ; i < nbins + 1 ; i++) {
379+ ep_bin_edges[i] = (xmax - xmin) / (nbins)*i + xmin;
380+ LOGF (info, " FIXED_WIDTH: ep_bin_edges[%d] = %f" , i, ep_bin_edges[i]);
381+ }
382+ }
383+
369384 LOGF (info, " cfgOccupancyEstimator = %d" , cfgOccupancyEstimator.value );
370385 if (ConfOccupancyBins.value [0 ] == VARIABLE_WIDTH) {
371386 occ_bin_edges = std::vector<float >(ConfOccupancyBins.value .begin (), ConfOccupancyBins.value .end ());
@@ -478,6 +493,7 @@ struct DileptonHadronMPC {
478493
479494 void addhistograms ()
480495 {
496+ static constexpr std::string_view qvec_det_names[7 ] = {" FT0M" , " FT0A" , " FT0C" , " BTot" , " BPos" , " BNeg" , " FV0A" };
481497 // event info
482498 o2::aod::pwgem::dilepton::utils::eventhistogram::addEventHistograms<-1 >(&fRegistry );
483499
@@ -522,7 +538,7 @@ struct DileptonHadronMPC {
522538 const AxisSpec axis_deta{ConfDEtaBins, deta_axis_title};
523539
524540 // hadron-hadron info
525- const AxisSpec axis_deta_hh{60 , -3 , +3 , " #Delta#eta = #eta_{h}^{ref1} - #eta_{h}^{ref2}" };
541+ const AxisSpec axis_deta_hh{40 , -2 , +2 , " #Delta#eta = #eta_{h}^{ref1} - #eta_{h}^{ref2}" };
526542
527543 const AxisSpec axis_pt_trg{ConfPtHadronBins, " p_{T,h} (GeV/c)" };
528544 const AxisSpec axis_eta_trg{40 , -2 , +2 , " #eta_{h}" };
@@ -562,6 +578,9 @@ struct DileptonHadronMPC {
562578 fRegistry .add (" HadronHadron/same/hDEtaCosNDPhi" , " hadron-hadron 2PC" , kTH2D , {axis_cosndphi_hh, axis_deta_hh}, true );
563579 }
564580 fRegistry .add (" Dilepton/mix/hDiffBC" , " diff. global BC in mixed event;|BC_{current} - BC_{mixed}|" , kTH1D , {{10001 , -0.5 , 10000.5 }}, true );
581+
582+ fRegistry .add (" Event/before/hEP2_CentFT0C_forMix" , Form (" 2nd harmonics event plane for mix;centrality FT0C (%%);#Psi_{2}^{%s} (rad.)" , qvec_det_names[cfgEP2Estimator_for_Mix].data ()), kTH2F , {{110 , 0 , 110 }, {180 , -M_PI_2, +M_PI_2}}, false );
583+ fRegistry .add (" Event/after/hEP2_CentFT0C_forMix" , Form (" 2nd harmonics event plane for mix;centrality FT0C (%%);#Psi_{2}^{%s} (rad.)" , qvec_det_names[cfgEP2Estimator_for_Mix].data ()), kTH2F , {{110 , 0 , 110 }, {180 , -M_PI_2, +M_PI_2}}, false );
565584 }
566585
567586 void DefineEMEventCut ()
@@ -1032,8 +1051,13 @@ struct DileptonHadronMPC {
10321051 continue ;
10331052 }
10341053
1054+ const float eventplanes_2_for_mix[7 ] = {collision.ep2ft0m (), collision.ep2ft0a (), collision.ep2ft0c (), collision.ep2btot (), collision.ep2bpos (), collision.ep2bneg (), collision.ep2fv0a ()};
1055+ float ep2 = eventplanes_2_for_mix[cfgEP2Estimator_for_Mix];
1056+
10351057 o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<0 , -1 >(&fRegistry , collision);
10361058
1059+ fRegistry .fill (HIST (" Event/before/hEP2_CentFT0C_forMix" ), collision.centFT0C (), ep2);
1060+
10371061 if (!fEMEventCut .IsSelected (collision)) {
10381062 continue ;
10391063 }
@@ -1050,6 +1074,7 @@ struct DileptonHadronMPC {
10501074 o2::aod::pwgem::dilepton::utils::eventhistogram::fillEventInfo<1 , -1 >(&fRegistry , collision);
10511075 fRegistry .fill (HIST (" Event/before/hCollisionCounter" ), o2::aod::pwgem::dilepton::utils::eventhistogram::nbin_ev); // accepted
10521076 fRegistry .fill (HIST (" Event/after/hCollisionCounter" ), o2::aod::pwgem::dilepton::utils::eventhistogram::nbin_ev); // accepted
1077+ fRegistry .fill (HIST (" Event/after/hEP2_CentFT0C_forMix" ), collision.centFT0C (), ep2);
10531078
10541079 auto refTracks_per_coll = refTracks.sliceBy (perCollision_track, collision.globalIndex ());
10551080
@@ -1127,7 +1152,12 @@ struct DileptonHadronMPC {
11271152 centbin = static_cast <int >(cent_bin_edges.size ()) - 2 ;
11281153 }
11291154
1130- int epbin = 0 ;
1155+ int epbin = lower_bound (ep_bin_edges.begin (), ep_bin_edges.end (), ep2) - ep_bin_edges.begin () - 1 ;
1156+ if (epbin < 0 ) {
1157+ epbin = 0 ;
1158+ } else if (static_cast <int >(ep_bin_edges.size ()) - 2 < epbin) {
1159+ epbin = static_cast <int >(ep_bin_edges.size ()) - 2 ;
1160+ }
11311161
11321162 int occbin = -1 ;
11331163 if (cfgOccupancyEstimator == 0 ) {
0 commit comments