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)
75 fUseLCMS = aCorrFctn.fUseLCMS;
77 if (aCorrFctn.fCYlmTrue)
78 fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone());
81 if (aCorrFctn.fCYlmFake)
82 fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone());
85 if (aCorrFctn.fNumeratorTrue)
86 fNumeratorTrue = new TH1D(*aCorrFctn.fNumeratorTrue);
90 if (aCorrFctn.fNumeratorFake)
91 fNumeratorFake = new TH1D(*aCorrFctn.fNumeratorFake);
95 if (aCorrFctn.fDenominator)
96 fDenominator = new TH1D(*aCorrFctn.fDenominator);
102 //_______________________
103 AliFemtoString AliFemtoModelCorrFctnDirectYlm::Report()
106 AliFemtoString tStr = "AliFemtoModelCorrFctnDirectYlm report";
111 //_______________________
112 void AliFemtoModelCorrFctnDirectYlm::AddRealPair(AliFemtoPair* aPair)
114 // add real (effect) pair
116 if (!(fPairCut->Pass(aPair))) return;
118 Double_t weight = fManager->GetWeight(aPair);
121 fCYlmTrue->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight);
123 fCYlmTrue->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight);
125 //_______________________
126 void AliFemtoModelCorrFctnDirectYlm::AddMixedPair(AliFemtoPair* aPair)
128 // add mixed (background) pair
130 if (!(fPairCut->Pass(aPair))) return;
132 Double_t weight = fManager->GetWeight(aPair);
135 fCYlmTrue->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0);
136 fCYlmFake->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight);
137 fCYlmFake->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0);
140 fCYlmTrue->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0);
141 fCYlmFake->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight);
142 fCYlmFake->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0);
145 //_______________________
146 void AliFemtoModelCorrFctnDirectYlm::Write()
148 // write out all the histograms
153 //_______________________
154 TList* AliFemtoModelCorrFctnDirectYlm::GetOutputList()
156 // Prepare the list of objects to be written to the output
157 TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
158 tOutputList->Clear();
160 TList *tListCfTrue = fCYlmTrue->GetOutputList();
162 TIter nextListCfTrue(tListCfTrue);
163 while (TObject *obj = nextListCfTrue()) {
164 tOutputList->Add(obj);
167 TList *tListCfFake = fCYlmFake->GetOutputList();
169 TIter nextListCfFake(tListCfFake);
170 while (TObject *obj = nextListCfFake()) {
171 tOutputList->Add(obj);
173 // tOutputList->Add(fCYlmTrue->GetOutputList());
174 // tOutputList->Add(fCYlmFake->GetOutputList());
178 //_______________________
179 AliFemtoModelCorrFctn* AliFemtoModelCorrFctnDirectYlm::Clone()
181 // Clone the correlation function
182 AliFemtoModelCorrFctnDirectYlm *tCopy = new AliFemtoModelCorrFctnDirectYlm(*this);
186 //_______________________
187 void AliFemtoModelCorrFctnDirectYlm::Finish()
192 //_______________________
193 void AliFemtoModelCorrFctnDirectYlm::SetUseLCMS(int aUseLCMS)
196 fCYlmTrue->SetUseLCMS(fUseLCMS);
197 fCYlmFake->SetUseLCMS(fUseLCMS);
199 //_______________________
200 int AliFemtoModelCorrFctnDirectYlm::GetUseLCMS()