16 #include "StHbtMaker/ThCorrFctn/StHbtThCFGaussSize.h"
17 #include "StHbtMaker/ThCorrFctn/StHbtThCorrFctnCollection.hh"
18 #include "StHbtMaker/Base/StHbtThCorrFctn.hh"
19 #include "StHbtMaker/Base/StHbtThPair.hh"
20 #include "StHbtMaker/Base/StHbtRoot1DCF.hh"
25 StHbtThCFGaussSize::StHbtThCFGaussSize()
26 {cout <<
"default constructor - must not be called "<<endl ; exit(0);}
28 StHbtThCFGaussSize::StHbtThCFGaussSize(
const char* aName,
double aX,
double aY,
double aZ,
double aT) : mSizeX(aX), mSizeY(aY), mSizeZ(aZ), mTime(aT) {
29 mName=
new char[strlen(aName)+1];
33 StHbtThCFGaussSize::~StHbtThCFGaussSize()
36 StHbtThCFGaussSize* StHbtThCFGaussSize::Copy(
const char* aName,
double aX,
double aY,
double aZ,
double aT) {
38 if (mThCorrFctnColl.size()>0) {
39 StHbtThCorrFctnIterator iter;
40 for (iter=mThCorrFctnColl.begin(); iter!=mThCorrFctnColl.end();iter++){
41 int tBaseNameLen=strlen((*iter)->GetName())-strlen(mName);
42 char* tCFName=
new char[tBaseNameLen+strlen(aName)+1];
43 memcpy(tCFName,(*iter)->GetName(),tBaseNameLen);
44 strcpy(tCFName+tBaseNameLen,aName);
46 NewCF->SetName(tCFName);
48 NewSize->mThCorrFctnColl.push_back(NewCF);
57 char* tName=
new char[strlen(aCF->GetName())+strlen(mName)+1];
58 strcpy(tName, aCF->GetName());
60 NewCF->SetName(tName);
62 mThCorrFctnColl.push_back(NewCF);
65 void StHbtThCFGaussSize::FillPair(
StHbtThPair* aThPair ){
66 StHbtThCorrFctnIterator iter;
67 for (iter=mThCorrFctnColl.begin(); iter!=mThCorrFctnColl.end();iter++){
68 (*iter)->AddNum(aThPair);
69 (*iter)->AddDen(aThPair);
73 void StHbtThCFGaussSize::Finish() {
74 if (mThCorrFctnColl.size()>0) {
75 StHbtThCorrFctnIterator iter;
76 for (iter=mThCorrFctnColl.begin(); iter!=mThCorrFctnColl.end();iter++){
82 StHbtString StHbtThCFGaussSize::Report() {
83 std::ostringstream tStr;
84 tStr <<
"Gaussian Size Report - Size=(X="<< mSizeX <<
"Y="<< mSizeY
85 <<
"Z="<< mSizeZ<<
"T="<< mTime <<
")" << endl;
86 tStr << mThCorrFctnColl.size() <<
" Correlation Function Plugged " << endl;
87 if (mThCorrFctnColl.size()>0) {
88 StHbtThCorrFctnIterator iter;
89 for (iter=mThCorrFctnColl.begin(); iter!=mThCorrFctnColl.end();iter++){
90 tStr << (*iter)->Report() << endl;
93 StHbtString returnThis = tStr.str();
97 inline double StHbtThCFGaussSize::GetSizeX()
const {
return mSizeX;};
98 inline double StHbtThCFGaussSize::GetSizeY()
const {
return mSizeY;};
99 inline double StHbtThCFGaussSize::GetSizeZ()
const {
return mSizeZ;};
100 inline double StHbtThCFGaussSize::GetTime()
const {
return mTime;};