26 #include "StEStructOneBuffer.h"
27 #include "StEStructPool/EventMaker/StEStructEvent.h"
28 #include "StEStructMaxB.h"
32 StEStructOneBuffer::StEStructOneBuffer(
int nMix,
int deltaMultMax,
float deltaZMax,
float deltaRateMax) {
35 mDeltaMultMax = deltaMultMax;
36 mDeltaZMax = deltaZMax;
37 mDeltaRateMax = deltaRateMax;
39 for (
int i=0;i<=mNumMixed;i++) {
45 StEStructOneBuffer::~StEStructOneBuffer() {
46 for (
int i=0;i<=mNumMixed;i++) {
58 if (mEvent[mNumMixed-1]) {
59 delete mEvent[mNumMixed-1];
61 for (
int i=mNumMixed-1;i>0;i--) {
62 mEvent[i] = mEvent[i-1];
67 StEStructEvent* StEStructOneBuffer::nextEvent(
int mult,
float vz,
float coinc) {
70 while(mEvent[mcurEvent]) {
71 if(abs(mult - mEvent[mcurEvent]->Ntrack()) <= mDeltaMultMax &&
72 fabs(vz-mEvent[mcurEvent]->VertexZ()) <= mDeltaZMax &&
73 fabs(coinc-mEvent[mcurEvent]->ZDCCoincidence()) <= mDeltaRateMax) {
77 if(mcurEvent > mNumMixed) {
82 return mEvent[mcurEvent];