263 template<
typename ParticleInfoStruct,
int NumBins = 1>
275 void add(
const ParticleInfoStruct& p)
296 KVEventMixer(
typename std::deque<event>::size_type number_of_events_to_mix = 10)
378 template<
typename TreatCorPairFunc,
typename TreatNCorPairFunc,
typename partA_iterator,
typename partB_iterator>
379 void ProcessEvent(
int bin_number, partA_iterator iter_A, partB_iterator iter_B, TreatCorPairFunc TreatCorPair, TreatNCorPairFunc TreatNCorPair)
381 int n_partA(0), n_partB(0);
383 for (
auto& partA : iter_A) {
386 if (n_partA == 1)
bins[bin_number].
partA_events.push_back(ParticleInfoStruct(partA));
389 for (
auto& partB : iter_B) {
393 if (n_partB == 1)
bins[bin_number].
partB_events.push_back(ParticleInfoStruct(partB));
396 TreatCorPair(bin_number, partA, partB);
402 for (
auto& partB : iter_B) {
405 if (n_partB == 1)
bins[bin_number].
partB_events.push_back(ParticleInfoStruct(partB));
423 for (
auto& partA : iter_A) {
424 for (
auto&
e :
bins[bin_number].partB_events) {
425 for (
auto& partB :
e.particles) {
426 TreatNCorPair(bin_number, partA, partB);
433 for (
auto& partB : iter_B) {
434 for (
auto&
e :
bins[bin_number].partA_events) {
435 for (
auto& partA :
e.particles) {
436 TreatNCorPair(bin_number, partB, partA);
Generic event mixing algorithm for two-particle correlation studies.
KVEventMixer(typename std::deque< event >::size_type number_of_events_to_mix=10)
void ProcessEvent(int bin_number, partA_iterator iter_A, partB_iterator iter_B, TreatCorPairFunc TreatCorPair, TreatNCorPairFunc TreatNCorPair)
Event-by-event processing function.
std::deque< event >::size_type decor_events
std::deque< event > partB_events
std::deque< event > partA_events
std::vector< ParticleInfoStruct > particles
void add(const ParticleInfoStruct &p)
event(const event &)=default
event(const ParticleInfoStruct &p)