25 #include "StHbtMaker/Infrastructure/StHbtSectoredPicoEvent.hh"
28 StHbtSectoredPicoEvent::StHbtSectoredPicoEvent(
int numbins){
34 StHbtParticleCollection **sectoredCollection1 =
new StHbtParticleCollection*[mNumBins+1];
35 mFirstSectoredCollection = sectoredCollection1;
37 for (i=0; i<=mNumBins; i++)
38 mFirstSectoredCollection[i] =
new StHbtParticleCollection;
40 StHbtParticleCollection **sectoredCollection2 =
new StHbtParticleCollection*[mNumBins+1];
41 mSecondSectoredCollection = sectoredCollection2;
43 for (i=0; i<=mNumBins; i++)
44 mSecondSectoredCollection[i] =
new StHbtParticleCollection;
46 StHbtParticleCollection **sectoredCollection3 =
new StHbtParticleCollection*[mNumBins+1];
47 mThirdSectoredCollection = sectoredCollection3;
49 for (i=0; i<=mNumBins; i++)
50 mThirdSectoredCollection[i] =
new StHbtParticleCollection;
54 StHbtSectoredPicoEvent::StHbtSectoredPicoEvent(
int numbinsx,
int numbinsy,
int numbinsz){
58 mNumBins = numbinsx*numbinsy*numbinsz;
60 StHbtParticleCollection **sectoredCollection1 =
new StHbtParticleCollection*[mNumBins+1];
61 mFirstSectoredCollection = sectoredCollection1;
63 for (i=0; i<=mNumBins; i++)
64 mFirstSectoredCollection[i] =
new StHbtParticleCollection;
66 StHbtParticleCollection **sectoredCollection2 =
new StHbtParticleCollection*[mNumBins+1];
67 mSecondSectoredCollection = sectoredCollection2;
69 for (i=0; i<=mNumBins; i++)
70 mSecondSectoredCollection[i] =
new StHbtParticleCollection;
72 StHbtParticleCollection **sectoredCollection3 =
new StHbtParticleCollection*[mNumBins+1];
73 mThirdSectoredCollection = sectoredCollection3;
75 for (i=0; i<=mNumBins; i++)
76 mThirdSectoredCollection[i] =
new StHbtParticleCollection;
80 StHbtSectoredPicoEvent::~StHbtSectoredPicoEvent(){
84 StHbtParticleIterator iter;
86 for (i=0; i<=mNumBins; i++) {
87 for (iter=mFirstSectoredCollection[i]->begin();iter!=mFirstSectoredCollection[i]->end();iter++){
90 delete mFirstSectoredCollection[i];
92 delete [] mFirstSectoredCollection;
94 for (i=0; i<=mNumBins; i++) {
95 for (iter=mSecondSectoredCollection[i]->begin();iter!=mSecondSectoredCollection[i]->end();iter++){
98 delete mSecondSectoredCollection[i];
100 delete [] mSecondSectoredCollection;
102 for (i=0; i<=mNumBins; i++) {
103 for (iter=mThirdSectoredCollection[i]->begin();iter!=mThirdSectoredCollection[i]->end();iter++){
106 delete mThirdSectoredCollection[i];
108 delete [] mThirdSectoredCollection;