1 ////////////////////////////////////////////////////////////////////////////////
3 /// AliFemtoModelCorrFctnDirectYlm - 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(AliFemtoModelCorrFctnDirectYlm, 1)
13 #include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
14 #include "AliFemtoModelHiddenInfo.h"
15 #include "AliFemtoModelCorrFctnDirectYlm.h"
17 //_______________________
18 AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm():
19 AliFemtoModelCorrFctn(),
24 // default constructor
26 fCYlmTrue = new AliFemtoCorrFctnDirectYlm();
27 fCYlmFake = new AliFemtoCorrFctnDirectYlm();
28 fCYlmTrue->SetUseLCMS(fUseLCMS);
29 fCYlmFake->SetUseLCMS(fUseLCMS);
31 //_______________________
32 AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const char *title, Int_t aMaxL, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi, int aUseLCMS=0):
33 AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
40 snprintf(fname, 1000, "%s%s", title, "True");
41 fCYlmTrue = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi, fUseLCMS);
42 snprintf(fname, 1000, "%s%s", title, "Fake");
43 fCYlmFake = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi, fUseLCMS);
45 //_______________________
46 AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn):
47 AliFemtoModelCorrFctn(aCorrFctn),
48 fCYlmTrue(new AliFemtoCorrFctnDirectYlm(*(aCorrFctn.fCYlmTrue))),
49 fCYlmFake(new AliFemtoCorrFctnDirectYlm(*(aCorrFctn.fCYlmFake))),
53 fUseLCMS = aCorrFctn.fUseLCMS;
54 // fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone());
55 // fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone());
57 //_______________________
58 AliFemtoModelCorrFctnDirectYlm::~AliFemtoModelCorrFctnDirectYlm()
61 if (fCYlmTrue) delete fCYlmTrue;
62 if (fCYlmFake) delete fCYlmFake;
63 if (fNumeratorTrue) delete fNumeratorTrue;
64 if (fNumeratorFake) delete fNumeratorFake;
65 if (fDenominator) delete fDenominator;
68 //_______________________
69 AliFemtoModelCorrFctnDirectYlm& AliFemtoModelCorrFctnDirectYlm::operator=(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn)
71 // assignment operator
72 if (this != &aCorrFctn) {
74 fUseLCMS = aCorrFctn.fUseLCMS;
76 if (fCYlmTrue) delete fCYlmTrue;
77 if (aCorrFctn.fCYlmTrue)
78 fCYlmTrue = new AliFemtoCorrFctnDirectYlm(*aCorrFctn.fCYlmTrue);
81 if (fCYlmFake) delete fCYlmFake;
82 if (aCorrFctn.fCYlmFake)
83 fCYlmFake = new AliFemtoCorrFctnDirectYlm(*aCorrFctn.fCYlmFake);
86 if (fNumeratorTrue) delete fNumeratorTrue;
87 if (aCorrFctn.fNumeratorTrue)
88 fNumeratorTrue = new TH1D(*aCorrFctn.fNumeratorTrue);
92 if (fNumeratorFake) delete fNumeratorFake;
93 if (aCorrFctn.fNumeratorFake)
94 fNumeratorFake = new TH1D(*aCorrFctn.fNumeratorFake);
98 if (fDenominator) delete fDenominator;
99 if (aCorrFctn.fDenominator)
100 fDenominator = new TH1D(*aCorrFctn.fDenominator);
107 //_______________________
108 AliFemtoString AliFemtoModelCorrFctnDirectYlm::Report()
111 AliFemtoString tStr = "AliFemtoModelCorrFctnDirectYlm report";
116 //_______________________
117 void AliFemtoModelCorrFctnDirectYlm::AddRealPair(AliFemtoPair* aPair)
119 // add real (effect) pair
121 if (!(fPairCut->Pass(aPair))) return;
123 Double_t weight = fManager->GetWeight(aPair);
126 fCYlmTrue->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight);
128 fCYlmTrue->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight);
130 //_______________________
131 void AliFemtoModelCorrFctnDirectYlm::AddMixedPair(AliFemtoPair* aPair)
133 // add mixed (background) pair
135 if (!(fPairCut->Pass(aPair))) return;
137 Double_t weight = fManager->GetWeight(aPair);
140 fCYlmTrue->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0);
141 fCYlmFake->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight);
142 fCYlmFake->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0);
145 fCYlmTrue->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0);
146 fCYlmFake->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight);
147 fCYlmFake->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0);
150 //_______________________
151 void AliFemtoModelCorrFctnDirectYlm::Write()
153 // write out all the histograms
158 //_______________________
159 TList* AliFemtoModelCorrFctnDirectYlm::GetOutputList()
161 // Prepare the list of objects to be written to the output
162 TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
163 tOutputList->Clear();
165 TList *tListCfTrue = fCYlmTrue->GetOutputList();
167 TIter nextListCfTrue(tListCfTrue);
168 while (TObject *obj = nextListCfTrue()) {
169 tOutputList->Add(obj);
172 TList *tListCfFake = fCYlmFake->GetOutputList();
174 TIter nextListCfFake(tListCfFake);
175 while (TObject *obj = nextListCfFake()) {
176 tOutputList->Add(obj);
178 // tOutputList->Add(fCYlmTrue->GetOutputList());
179 // tOutputList->Add(fCYlmFake->GetOutputList());
183 //_______________________
184 AliFemtoModelCorrFctn* AliFemtoModelCorrFctnDirectYlm::Clone()
186 // Clone the correlation function
187 AliFemtoModelCorrFctnDirectYlm *tCopy = new AliFemtoModelCorrFctnDirectYlm(*this);
191 //_______________________
192 void AliFemtoModelCorrFctnDirectYlm::Finish()
197 //_______________________
198 void AliFemtoModelCorrFctnDirectYlm::SetUseLCMS(int aUseLCMS)
201 fCYlmTrue->SetUseLCMS(fUseLCMS);
202 fCYlmFake->SetUseLCMS(fUseLCMS);
204 //_______________________
205 int AliFemtoModelCorrFctnDirectYlm::GetUseLCMS()