--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelCorrFctnSource - the class for correlation function which ///
+/// uses the model framework and weight generation and saves the generated ///
+/// emission source ///
+/// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifdef __ROOT__
+ ClassImp(AliFemtoModelCorrFctnSource, 1)
+#endif
+
+#include "Model/AliFemtoModelGausLCMSFreezeOutGenerator.h"
+#include "Model/AliFemtoModelHiddenInfo.h"
+#include "Model/AliFemtoModelCorrFctnSource.h"
+
+//_______________________
+AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource():
+ AliFemtoModelCorrFctn(),
+ fHistROut(0),
+ fHistRSide(0),
+ fHistRLong(0),
+ fHistRStar(0),
+ fHistdNdR(0)
+{
+}
+//_______________________
+AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
+ AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
+ fHistROut(0),
+ fHistRSide(0),
+ fHistRLong(0),
+ fHistRStar(0),
+ fHistdNdR(0)
+{
+ char buf[100];
+ sprintf(buf, "%sOut", title);
+ fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
+ sprintf(buf, "%sSide", title);
+ fHistRSide = new TH1D(buf,buf,100,-50.0,50.0);
+ sprintf(buf, "%sLong", title);
+ fHistRLong = new TH1D(buf,buf,100,-50.0,50.0);
+ sprintf(buf, "%sInv", title);
+ fHistRStar = new TH1D(buf,buf,100,-50.0,50.0);
+ sprintf(buf, "%sdNdR", title);
+ fHistdNdR = new TH1D(buf,buf,100,-50.0,50.0);
+
+ fHistROut->Sumw2();
+ fHistRSide->Sumw2();
+ fHistRLong->Sumw2();
+ fHistRStar->Sumw2();
+ fHistdNdR->Sumw2();
+}
+//_______________________
+AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const AliFemtoModelCorrFctnSource& aCorrFctn):
+ AliFemtoModelCorrFctn(aCorrFctn),
+ fHistROut(0),
+ fHistRSide(0),
+ fHistRLong(0),
+ fHistRStar(0),
+ fHistdNdR(0)
+{
+ fHistROut = new TH1D (*aCorrFctn.fHistROut);
+ fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
+ fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
+ fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
+ fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
+}
+//_______________________
+AliFemtoModelCorrFctnSource::~AliFemtoModelCorrFctnSource()
+{
+ if (fHistROut) delete fHistROut;
+ if (fHistRSide) delete fHistRSide;
+ if (fHistRLong) delete fHistRLong;
+ if (fHistRStar) delete fHistRStar;
+ if (fHistdNdR) delete fHistdNdR;
+ if (fNumeratorTrue) delete fNumeratorTrue;
+ if (fNumeratorFake) delete fNumeratorFake;
+ if (fDenominator) delete fDenominator;
+}
+
+//_______________________
+AliFemtoModelCorrFctnSource& AliFemtoModelCorrFctnSource::operator=(const AliFemtoModelCorrFctnSource& aCorrFctn)
+{
+ if (this == &aCorrFctn)
+ return *this;
+ if (aCorrFctn.fHistROut)
+ fHistROut = new TH1D (*aCorrFctn.fHistROut);
+ else fHistROut = 0;
+ if (aCorrFctn.fHistRSide)
+ fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
+ else fHistRSide = 0;
+ if (aCorrFctn.fHistRLong)
+ fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
+ else fHistRLong = 0;
+ if (aCorrFctn.fHistRStar)
+ fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
+ fHistRStar = 0;
+ if (aCorrFctn.fHistdNdR)
+ fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
+ else fHistdNdR = 0;
+
+ return *this;
+}
+//_______________________
+AliFemtoString AliFemtoModelCorrFctnSource::Report()
+{
+ AliFemtoString tStr = "AliFemtoModelCorrFctnSource report";
+
+ return tStr;
+}
+
+//_______________________
+void AliFemtoModelCorrFctnSource::AddRealPair(AliFemtoPair* aPair)
+{
+ AliFemtoModelCorrFctn::AddRealPair(aPair);
+}
+//_______________________
+void AliFemtoModelCorrFctnSource::AddMixedPair(AliFemtoPair* aPair)
+{
+ AliFemtoModelCorrFctn::AddMixedPair(aPair);
+ fHistROut->Fill (fManager->GetWeightGenerator()->GetRStarOut());
+ fHistRSide->Fill(fManager->GetWeightGenerator()->GetRStarSide());
+ fHistRLong->Fill(fManager->GetWeightGenerator()->GetRStarLong());
+ fHistRStar->Fill(fManager->GetWeightGenerator()->GetRStar());
+ fHistdNdR->Fill (fManager->GetWeightGenerator()->GetRStar(),1.0/(fManager->GetWeightGenerator()->GetRStar()*fManager->GetWeightGenerator()->GetRStar()));
+}
+//_______________________
+void AliFemtoModelCorrFctnSource::Write()
+{
+ fHistROut->Write();
+ fHistRSide->Write();
+ fHistRLong->Write();
+ fHistRStar->Write();
+ fHistdNdR->Write();
+
+ AliFemtoModelCorrFctn::Write();
+}
+//_______________________
+AliFemtoModelCorrFctnSource* AliFemtoModelCorrFctnSource::Clone()
+{
+ AliFemtoModelCorrFctnSource *tCopy = new AliFemtoModelCorrFctnSource(*this);
+
+ return tCopy;
+}
+
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelCorrFctnSource - the class for correlation function which ///
+/// uses the model framework and weight generation and saves the generated ///
+/// emission source ///
+/// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoModelCorrFctnSource_hh
+#define AliFemtoModelCorrFctnSource_hh
+
+#include "Base/AliFemtoCorrFctn.h"
+#include "Infrastructure/AliFemtoPair.h"
+#include "Model/AliFemtoModelManager.h"
+#include "Model/AliFemtoModelCorrFctn.h"
+
+class AliFemtoModelCorrFctnSource: public AliFemtoModelCorrFctn {
+
+public:
+ AliFemtoModelCorrFctnSource();
+ AliFemtoModelCorrFctnSource(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi);
+ AliFemtoModelCorrFctnSource(const AliFemtoModelCorrFctnSource& aCorrFctn);
+ virtual ~AliFemtoModelCorrFctnSource();
+
+ AliFemtoModelCorrFctnSource& operator=(const AliFemtoModelCorrFctnSource& aCorrFctn);
+
+ virtual AliFemtoString Report();
+
+ virtual void AddRealPair(AliFemtoPair* aPair);
+ virtual void AddMixedPair(AliFemtoPair* aPir);
+
+ virtual void Write();
+
+ virtual AliFemtoModelCorrFctnSource* Clone();
+
+protected:
+
+ TH1D *fHistROut;
+ TH1D *fHistRSide;
+ TH1D *fHistRLong;
+ TH1D *fHistRStar;
+ TH1D *fHistdNdR;
+
+private:
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoModelCorrFctnSource, 1)
+#endif
+};
+
+#endif
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelGausRinvFreezeOutGenerator - freeze-out ///
+/// coordinates generator, generating a 3D gaussian ellipsoid in LCMS ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifdef __ROOT__
+ ClassImp(AliFemtoModelGausRinvFreezeOutGenerator, 1)
+#endif
+
+#include "math.h"
+#include "AliFemtoModelGausRinvFreezeOutGenerator.h"
+#include "Model/AliFemtoModelHiddenInfo.h"
+#include "AliFemtoLorentzVector.h"
+
+//_______________________
+AliFemtoModelGausRinvFreezeOutGenerator::AliFemtoModelGausRinvFreezeOutGenerator() :
+ fSizeInv(0)
+{
+ // Default constructor
+ fRandom = new TRandom2();
+}
+
+//_______________________
+AliFemtoModelGausRinvFreezeOutGenerator::AliFemtoModelGausRinvFreezeOutGenerator(const AliFemtoModelGausRinvFreezeOutGenerator &aModel):
+ fSizeInv(0)
+{
+ // Copy constructor
+ fRandom = new TRandom2();
+ SetSizeInv(aModel.GetSizeInv());
+}
+//_______________________
+AliFemtoModelGausRinvFreezeOutGenerator::~AliFemtoModelGausRinvFreezeOutGenerator()
+{
+ if (fRandom) delete fRandom;
+}
+//_______________________
+void AliFemtoModelGausRinvFreezeOutGenerator::GenerateFreezeOut(AliFemtoPair *aPair)
+{
+ // Generate two particle emission points with respect
+ // to their pair momentum
+ // The source is the 3D Gaussian ellipsoid in the LCMS frame
+ AliFemtoModelHiddenInfo *inf1 = (AliFemtoModelHiddenInfo *) aPair->track1()->HiddenInfo();
+ AliFemtoModelHiddenInfo *inf2 = (AliFemtoModelHiddenInfo *) aPair->track2()->HiddenInfo();
+
+ if ((!inf1) || (!inf2)) { cout << "Hidden info not created! " << endl; exit(kFALSE); }
+
+ // Calculate sum momenta
+ Double_t tPx = inf1->GetTrueMomentum()->x() + inf2->GetTrueMomentum()->x();
+ Double_t tPy = inf1->GetTrueMomentum()->y() + inf2->GetTrueMomentum()->y();
+ Double_t tPz = inf1->GetTrueMomentum()->z() + inf2->GetTrueMomentum()->z();
+ Double_t tM1 = inf1->GetMass();
+ Double_t tM2 = inf2->GetMass();
+ Double_t tE1 = sqrt(tM1*tM1 + inf1->GetTrueMomentum()->mag2());
+ Double_t tE2 = sqrt(tM2*tM2 + inf2->GetTrueMomentum()->mag2());
+ Double_t tEs = tE1 + tE2;
+
+ Double_t tPt = sqrt(tPx*tPx + tPy*tPy);
+ Double_t tMt = sqrt(tEs*tEs - tPz*tPz);
+
+ // Generate positions in PRF from a Gaussian
+ Double_t tROutS = fRandom->Gaus(0,fSizeInv); // reuse of long
+ Double_t tRSideS = fRandom->Gaus(0,fSizeInv);
+ Double_t tRLongS = fRandom->Gaus(0,fSizeInv);
+ Double_t tRTimeS = 0;
+
+ Double_t tBetat = tPt/tMt;
+ Double_t tGammat = 1.0/sqrt(1.0-tBetat*tBetat);
+
+ Double_t tBetaz = tPz/tEs;
+ Double_t tGammaz = 1.0/sqrt(1.0-tBetaz*tBetaz);
+
+ Double_t tROut = tGammat * (tROutS + tBetat * tRTimeS);
+ Double_t tDtL = tGammat * (tRTimeS + tBetat * tROutS);
+ Double_t tRSide = tRSideS;
+
+ Double_t tRLong = tGammaz * (tRLongS + tBetaz * tDtL);
+ Double_t tDt = tGammaz * (tDtL + tBetaz * tRLongS);
+
+ tPx /= tPt;
+ tPy /= tPt;
+
+ Double_t tXout = tROut*tPx-tRSide*tPy;
+ Double_t tXside = tROut*tPy+tRSide*tPx;
+ Double_t tXlong = tRLong;
+ Double_t tXtime = tDt;
+
+ if (!(inf1->GetEmissionPoint())) {
+ AliFemtoLorentzVector tPos(0,0,0,0);
+ inf1->SetEmissionPoint(&tPos);
+ }
+ else
+ inf1->SetEmissionPoint(0,0,0,0);
+ if (!(inf2->GetEmissionPoint())) {
+ AliFemtoLorentzVector tPos(tXout,tXside,tXlong,tXtime);
+ inf2->SetEmissionPoint(&tPos);
+ }
+ else
+ inf2->SetEmissionPoint(tXout, tXside, tXlong, tXtime);
+}
+
+//_______________________
+void AliFemtoModelGausRinvFreezeOutGenerator::SetSizeInv(Double_t aSizeInv)
+{
+ fSizeInv = aSizeInv;
+}
+//_______________________
+Double_t AliFemtoModelGausRinvFreezeOutGenerator::GetSizeInv() const
+{
+ return fSizeInv;
+}
+//_______________________
+AliFemtoModelFreezeOutGenerator* AliFemtoModelGausRinvFreezeOutGenerator::Clone() const
+{
+ return GetGenerator();
+}
+//_______________________
+inline AliFemtoModelFreezeOutGenerator* AliFemtoModelGausRinvFreezeOutGenerator::GetGenerator() const
+{
+ AliFemtoModelFreezeOutGenerator* tModel = new AliFemtoModelGausRinvFreezeOutGenerator(*this);
+ return tModel;
+}
--- /dev/null
+////////////////////////////////////////////////////////////////////////////////
+/// ///
+/// AliFemtoModelGausRinvFreezeOutGenerator - freeze-out ///
+/// coordinates generator, generating a 3D gaussian spheroid in PRF ///
+/// Authors: Adam Kisiel kisiel@mps.ohio-state.edu ///
+/// ///
+////////////////////////////////////////////////////////////////////////////////
+#ifndef AliFemtoModelGausRinvFreezeOutGenerator_hh
+#define AliFemtoModelGausRinvFreezeOutGenerator_hh
+
+#include "Model/AliFemtoModelFreezeOutGenerator.h"
+
+#include "TRandom.h"
+
+class AliFemtoModelGausRinvFreezeOutGenerator : public AliFemtoModelFreezeOutGenerator
+{
+ public:
+ AliFemtoModelGausRinvFreezeOutGenerator();
+ AliFemtoModelGausRinvFreezeOutGenerator(const AliFemtoModelGausRinvFreezeOutGenerator &aModel);
+ virtual ~AliFemtoModelGausRinvFreezeOutGenerator();
+ virtual void GenerateFreezeOut(AliFemtoPair *aPair);;
+
+ void SetSizeInv(Double_t aSizeInv);
+
+ Double_t GetSizeInv() const;
+
+ virtual AliFemtoModelFreezeOutGenerator* Clone() const;
+
+ protected:
+ Double_t fSizeInv;
+
+ private:
+ AliFemtoModelFreezeOutGenerator* GetGenerator() const;
+
+#ifdef __ROOT__
+ ClassDef(AliFemtoModelGausRinvFreezeOutGenerator, 1)
+#endif
+
+ };
+
+#endif
+
+