1 ////////////////////////////////////////////////////////////////////////////////
3 /// AliFemtoModelCorrFctnSource - the class for correlation function which ///
4 /// uses the model framework and weight generation and saves the generated ///
5 /// emission source ///
6 /// Authors: Adam Kisiel, kisiel@mps.ohio-state.edu ///
8 ////////////////////////////////////////////////////////////////////////////////
10 ClassImp(AliFemtoModelCorrFctnSource, 1)
13 #include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
14 #include "AliFemtoModelHiddenInfo.h"
15 #include "AliFemtoModelCorrFctnSource.h"
17 //_______________________
18 AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource():
19 AliFemtoModelCorrFctn(),
26 // default constructor
28 char title[100] = "CFSource";
29 sprintf(buf, "%sOut", title);
30 fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
31 sprintf(buf, "%sSide", title);
32 fHistRSide = new TH1D(buf,buf,100,-50.0,50.0);
33 sprintf(buf, "%sLong", title);
34 fHistRLong = new TH1D(buf,buf,100,-50.0,50.0);
35 sprintf(buf, "%sInv", title);
36 fHistRStar = new TH1D(buf,buf,100,-50.0,50.0);
37 sprintf(buf, "%sdNdR", title);
38 fHistdNdR = new TH1D(buf,buf,100,-50.0,50.0);
46 //_______________________
47 AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
48 AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
57 sprintf(buf, "%sOut", title);
58 fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
59 sprintf(buf, "%sSide", title);
60 fHistRSide = new TH1D(buf,buf,100,-50.0,50.0);
61 sprintf(buf, "%sLong", title);
62 fHistRLong = new TH1D(buf,buf,100,-50.0,50.0);
63 sprintf(buf, "%sInv", title);
64 fHistRStar = new TH1D(buf,buf,100,-50.0,50.0);
65 sprintf(buf, "%sdNdR", title);
66 fHistdNdR = new TH1D(buf,buf,100,-50.0,50.0);
74 //_______________________
75 AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const AliFemtoModelCorrFctnSource& aCorrFctn):
76 AliFemtoModelCorrFctn(aCorrFctn),
84 fHistROut = new TH1D (*aCorrFctn.fHistROut);
85 fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
86 fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
87 fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
88 fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
90 //_______________________
91 AliFemtoModelCorrFctnSource::~AliFemtoModelCorrFctnSource()
94 if (fHistROut) delete fHistROut;
95 if (fHistRSide) delete fHistRSide;
96 if (fHistRLong) delete fHistRLong;
97 if (fHistRStar) delete fHistRStar;
98 if (fHistdNdR) delete fHistdNdR;
99 if (fNumeratorTrue) delete fNumeratorTrue;
100 if (fNumeratorFake) delete fNumeratorFake;
101 if (fDenominator) delete fDenominator;
104 //_______________________
105 AliFemtoModelCorrFctnSource& AliFemtoModelCorrFctnSource::operator=(const AliFemtoModelCorrFctnSource& aCorrFctn)
107 // assignment operator
108 if (this == &aCorrFctn)
110 if (aCorrFctn.fHistROut)
111 fHistROut = new TH1D (*aCorrFctn.fHistROut);
113 if (aCorrFctn.fHistRSide)
114 fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
116 if (aCorrFctn.fHistRLong)
117 fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
119 if (aCorrFctn.fHistRStar)
120 fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
122 if (aCorrFctn.fHistdNdR)
123 fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
128 //_______________________
129 AliFemtoString AliFemtoModelCorrFctnSource::Report()
132 AliFemtoString tStr = "AliFemtoModelCorrFctnSource report";
137 //_______________________
138 void AliFemtoModelCorrFctnSource::AddRealPair(AliFemtoPair* aPair)
140 // add real (effect) pair
141 AliFemtoModelCorrFctn::AddRealPair(aPair);
143 //_______________________
144 void AliFemtoModelCorrFctnSource::AddMixedPair(AliFemtoPair* aPair)
146 // add mixed (background) pair
147 AliFemtoModelCorrFctn::AddMixedPair(aPair);
148 // save the generated positions
149 fHistROut->Fill (fManager->GetWeightGenerator()->GetRStarOut());
150 fHistRSide->Fill(fManager->GetWeightGenerator()->GetRStarSide());
151 fHistRLong->Fill(fManager->GetWeightGenerator()->GetRStarLong());
152 fHistRStar->Fill(fManager->GetWeightGenerator()->GetRStar());
153 fHistdNdR->Fill (fManager->GetWeightGenerator()->GetRStar(),1.0/(fManager->GetWeightGenerator()->GetRStar()*fManager->GetWeightGenerator()->GetRStar()));
155 //_______________________
156 void AliFemtoModelCorrFctnSource::Write()
158 // write out all the histograms
165 AliFemtoModelCorrFctn::Write();
167 //_______________________
168 AliFemtoModelCorrFctn* AliFemtoModelCorrFctnSource::Clone()
170 // Clone the correlation function
171 AliFemtoModelCorrFctnSource *tCopy = new AliFemtoModelCorrFctnSource(*this);