@@ -98,6 +98,7 @@ struct FlowCorrelationsUpc {
9898 O2_DEFINE_CONFIGURABLE (cfgMinMixEventNum, int , 5 , " Minimum number of events to mix" )
9999 O2_DEFINE_CONFIGURABLE (cfgMinMult, int , 0 , " Minimum multiplicity for collision" )
100100 O2_DEFINE_CONFIGURABLE (cfgMaxMult, int , 10 , " Maximum multiplicity for collision" )
101+ O2_DEFINE_CONFIGURABLE (cfgSampleSize, double , 10 , " Sample size for mixed event" )
101102
102103 ConfigurableAxis axisVertex{" axisVertex" , {10 , -10 , 10 }, " vertex axis for histograms" };
103104 ConfigurableAxis axisEta{" axisEta" , {40 , -1 ., 1 .}, " eta axis for histograms" };
@@ -114,6 +115,7 @@ struct FlowCorrelationsUpc {
114115 ConfigurableAxis axisVertexEfficiency{" axisVertexEfficiency" , {10 , -10 , 10 }, " vertex axis for efficiency histograms" };
115116 ConfigurableAxis axisEtaEfficiency{" axisEtaEfficiency" , {20 , -1.0 , 1.0 }, " eta axis for efficiency histograms" };
116117 ConfigurableAxis axisPtEfficiency{" axisPtEfficiency" , {VARIABLE_WIDTH, 0.5 , 0.6 , 0.7 , 0.8 , 0.9 , 1.0 , 1.25 , 1.5 , 1.75 , 2.0 , 2.25 , 2.5 , 2.75 , 3.0 , 3.25 , 3.5 , 3.75 , 4.0 , 4.5 , 5.0 , 6.0 , 7.0 , 8.0 }, " pt axis for efficiency histograms" };
118+ ConfigurableAxis axisSample{" axisSample" , {cfgSampleSize, 0 , cfgSampleSize}, " sample axis for histograms" };
117119
118120 // Added UPC Cuts
119121 SGSelector sgSelector;
@@ -149,11 +151,11 @@ struct FlowCorrelationsUpc {
149151 registry.add (" Nch" , " N_{ch}" , {HistType::kTH1D , {axisMultiplicity}});
150152 registry.add (" zVtx" , " zVtx" , {HistType::kTH1D , {axisVertex}});
151153
152- registry.add (" Trig_hist" , " " , {HistType::kTHnSparseF , {{axisMultiplicity , axisVertex, axisPtTrigger}}});
154+ registry.add (" Trig_hist" , " " , {HistType::kTHnSparseF , {{axisSample , axisVertex, axisPtTrigger}}});
153155
154156 registry.add (" eventcount" , " bin" , {HistType::kTH1F , {{3 , 0 , 3 , " bin" }}}); // histogram to see how many events are in the same and mixed event
155157
156- std::vector<AxisSpec> corrAxis = {{axisMultiplicity , " Nch " },
158+ std::vector<AxisSpec> corrAxis = {{axisSample , " Sample " },
157159 {axisVertex, " z-vtx (cm)" },
158160 {axisPtTrigger, " p_{T} (GeV/c)" },
159161 {axisPtAssoc, " p_{T} (GeV/c)" },
@@ -192,11 +194,14 @@ struct FlowCorrelationsUpc {
192194 template <CorrelationContainer::CFStep step, typename TTracks>
193195 void fillCorrelations (TTracks tracks1, TTracks tracks2, float posZ, int system, float Nch) // function to fill the Output functions (sparse) and the delta eta and delta phi histograms
194196 {
197+
198+ int fSampleIndex = gRandom ->Uniform (0 , cfgSampleSize);
199+
195200 // loop over all tracks
196201 for (auto const & track1 : tracks1) {
197202
198203 if (system == SameEvent) {
199- registry.fill (HIST (" Trig_hist" ), Nch , posZ, track1.pt ());
204+ registry.fill (HIST (" Trig_hist" ), fSampleIndex , posZ, track1.pt ());
200205 }
201206
202207 for (auto const & track2 : tracks2) {
@@ -213,10 +218,10 @@ struct FlowCorrelationsUpc {
213218
214219 // fill the right sparse and histograms
215220 if (system == SameEvent) {
216- same->getPairHist ()->Fill (step, Nch , posZ, track1.pt (), track2.pt (), deltaPhi, deltaEta);
221+ same->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track2.pt (), deltaPhi, deltaEta);
217222 registry.fill (HIST (" deltaEta_deltaPhi_same" ), deltaPhi, deltaEta);
218223 } else if (system == MixedEvent) {
219- mixed->getPairHist ()->Fill (step, Nch , posZ, track1.pt (), track2.pt (), deltaPhi, deltaEta);
224+ mixed->getPairHist ()->Fill (step, fSampleIndex , posZ, track1.pt (), track2.pt (), deltaPhi, deltaEta);
220225 registry.fill (HIST (" deltaEta_deltaPhi_mixed" ), deltaPhi, deltaEta);
221226 }
222227 }
0 commit comments