16 #include "StHbtMaker/ThCorrFctn/StHbtThCFGaussFit.h"
18 #include "StHbtMaker/ThCorrFctn/StHbtThCFGaussSizeCollection.hh"
19 #include "StHbtMaker/ThCorrFctn/StHbtThCFGaussSize.h"
20 #include "StHbtMaker/Base/StHbtThCorrFctn.hh"
21 #include "StHbtMaker/Infrastructure/StHbtPair.hh"
22 #include "StHbtMaker/Infrastructure/StHbtTypes.hh"
31 StHbtThCFGaussFit::StHbtThCFGaussFit():
32 mMaxX(0), mMaxY(0), mMaxZ(0), mMaxT(0)
35 StHbtThCFGaussFit::~StHbtThCFGaussFit()
39 if (mSizeColl.size()<=0) {
40 cout <<
"StHbtThCFGaussFit - At Least One Gaussian Size must be plugged before " << endl;
41 cout <<
" StHbtThCFGaussFit - Warning - " << aCF->GetName() <<
" has NOT been added " << endl;
43 StHbtThCFGaussSizeIterator iter;
44 for (iter=mSizeColl.begin(); iter!=mSizeColl.end();iter++){
45 (*iter)->AddCorrFctn(aCF);
49 void StHbtThCFGaussFit::AddSize(
const char* aName,
double aX,
double aY,
double aZ,
double aT){
50 if (aX>mMaxX) { mMaxX=aX;mPair.SetSize(mMaxX,mMaxY,mMaxZ,mMaxT);};
51 if (aY>mMaxY) { mMaxY=aY;mPair.SetSize(mMaxX,mMaxY,mMaxZ,mMaxT);};
52 if (aZ>mMaxZ) { mMaxZ=aZ;mPair.SetSize(mMaxX,mMaxY,mMaxZ,mMaxT);};
53 if (aT>mMaxT) { mMaxT=aT;mPair.SetSize(mMaxX,mMaxY,mMaxZ,mMaxT);};
54 if (mSizeColl.size()>0) {
56 mSizeColl.push_back(tFirstSize->Copy(aName,aX,aY,aZ,aT));
62 void StHbtThCFGaussFit::AddRealPair(
const StHbtPair* aPair) {};
64 void StHbtThCFGaussFit::AddMixedPair(
const StHbtPair* aPair) {
65 if (mSizeColl.size()>0) {
67 double tProb=mRand.Rndm();
if(tProb){};
68 StHbtThCFGaussSizeIterator iter;
69 for (iter=mSizeColl.begin(); iter!=mSizeColl.end();iter++){
72 (*iter)->FillPair(&mPair);
78 void StHbtThCFGaussFit::Finish() {
79 if (mSizeColl.size()>0) {
80 StHbtThCFGaussSizeIterator iter;
81 for (iter=mSizeColl.begin(); iter!=mSizeColl.end();iter++){
87 StHbtString StHbtThCFGaussFit::Report() {
88 std::ostringstream tStr;
89 tStr <<
"Correlation - Gaussian Fit Manager Report" << endl;
90 tStr << mPair.Report() ;
92 tStr << mSizeColl.size() <<
" Sizes defined " << endl;
94 if (mSizeColl.size()>0) {
95 StHbtThCFGaussSizeIterator iter;
96 for (iter=mSizeColl.begin(); iter!=mSizeColl.end();iter++){
97 tStr << (*iter)->Report() << endl;
100 StHbtString returnThis = tStr.str();
104 inline void StHbtThCFGaussFit::SetWeight(
StHbtFsiWeight* aWeight) {mPair.SetWeight(aWeight);};
105 inline void StHbtThCFGaussFit::UseHiddenMomentum() {mPair.UseHiddenMomentum();};
106 inline void StHbtThCFGaussFit::UseParticleMomentum() {mPair.UseParticleMomentum();};
108 inline void StHbtThCFGaussFit::UseHiddenPid() {mPair.UseHiddenPid();};
109 inline void StHbtThCFGaussFit::UseFixedPid(
int const tPid1,
double const tMass1)
110 {mPair.UseFixedPid( tPid1, tMass1) ;};
111 inline void StHbtThCFGaussFit::UseFixedPid(
int const tPid1,
double const tMass1,
int const tPid2,
double const tMass2 )
112 {mPair.UseFixedPid(tPid1, tMass1, tPid2, tMass2 );};
114 inline void StHbtThCFGaussFit::SetBoostRCMS(
double aPlab,
double aMBeam,
double aMTarget)
115 {mPair.SetBoostRCMS(aPlab,aMBeam, aMTarget);};
116 inline void StHbtThCFGaussFit::SetRCMS() {mPair.SetRCMS();};
117 inline void StHbtThCFGaussFit::SetLCMS() {mPair.SetLCMS();};
118 inline void StHbtThCFGaussFit::SetPRF() {mPair.SetPRF();};
120 inline void StHbtThCFGaussFit::AddSize(
const char* aName,
double aXYZ,
double aT){
121 AddSize(aName,aXYZ,aXYZ,aXYZ,aT);};
123 inline StHbtThCFGaussSizeCollection *StHbtThCFGaussFit::getCollection() {
return &mSizeColl; }