]>
Commit | Line | Data |
---|---|---|
17b6dded | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | /// /// | |
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 /// | |
7 | /// /// | |
8 | //////////////////////////////////////////////////////////////////////////////// | |
9 | #ifdef __ROOT__ | |
10 | ClassImp(AliFemtoModelCorrFctnDirectYlm, 1) | |
11 | #endif | |
12 | ||
13 | #include "AliFemtoModelGausLCMSFreezeOutGenerator.h" | |
14 | #include "AliFemtoModelHiddenInfo.h" | |
15 | #include "AliFemtoModelCorrFctnDirectYlm.h" | |
16 | ||
17 | //_______________________ | |
18 | AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(): | |
19 | AliFemtoModelCorrFctn(), | |
20 | fCYlmTrue(0), | |
963893bf | 21 | fCYlmFake(0), |
22 | fUseLCMS(0) | |
17b6dded | 23 | { |
24 | // default constructor | |
25 | ||
26 | fCYlmTrue = new AliFemtoCorrFctnDirectYlm(); | |
27 | fCYlmFake = new AliFemtoCorrFctnDirectYlm(); | |
963893bf | 28 | fCYlmTrue->SetUseLCMS(fUseLCMS); |
29 | fCYlmFake->SetUseLCMS(fUseLCMS); | |
17b6dded | 30 | } |
31 | //_______________________ | |
963893bf | 32 | AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const char *title, Int_t aMaxL, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi, int aUseLCMS=0): |
17b6dded | 33 | AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi), |
34 | fCYlmTrue(0), | |
963893bf | 35 | fCYlmFake(0), |
36 | fUseLCMS(aUseLCMS) | |
17b6dded | 37 | { |
38 | // basic constructor | |
39 | char fname[1000]; | |
40 | sprintf(fname, "%s%s", title, "True"); | |
963893bf | 41 | fCYlmTrue = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi, fUseLCMS); |
17b6dded | 42 | sprintf(fname, "%s%s", title, "Fake"); |
963893bf | 43 | fCYlmFake = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi, fUseLCMS); |
17b6dded | 44 | } |
45 | //_______________________ | |
46 | AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn): | |
47 | AliFemtoModelCorrFctn(aCorrFctn), | |
48 | fCYlmTrue(0), | |
963893bf | 49 | fCYlmFake(0), |
50 | fUseLCMS(0) | |
17b6dded | 51 | { |
52 | // copy constructor | |
963893bf | 53 | fUseLCMS = aCorrFctn.fUseLCMS; |
17b6dded | 54 | fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone()); |
55 | fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone()); | |
56 | } | |
57 | //_______________________ | |
58 | AliFemtoModelCorrFctnDirectYlm::~AliFemtoModelCorrFctnDirectYlm() | |
59 | { | |
60 | // destructor | |
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; | |
66 | } | |
67 | ||
68 | //_______________________ | |
69 | AliFemtoModelCorrFctnDirectYlm& AliFemtoModelCorrFctnDirectYlm::operator=(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn) | |
70 | { | |
71 | // assignment operator | |
72 | if (this == &aCorrFctn) | |
73 | return *this; | |
74 | ||
963893bf | 75 | fUseLCMS = aCorrFctn.fUseLCMS; |
76 | ||
17b6dded | 77 | if (aCorrFctn.fCYlmTrue) |
78 | fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone()); | |
79 | else fCYlmTrue = 0; | |
80 | ||
81 | if (aCorrFctn.fCYlmFake) | |
82 | fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone()); | |
83 | else fCYlmFake = 0; | |
84 | ||
85 | return *this; | |
86 | } | |
87 | //_______________________ | |
88 | AliFemtoString AliFemtoModelCorrFctnDirectYlm::Report() | |
89 | { | |
90 | // construct report | |
91 | AliFemtoString tStr = "AliFemtoModelCorrFctnDirectYlm report"; | |
92 | ||
93 | return tStr; | |
94 | } | |
95 | ||
96 | //_______________________ | |
97 | void AliFemtoModelCorrFctnDirectYlm::AddRealPair(AliFemtoPair* aPair) | |
98 | { | |
99 | // add real (effect) pair | |
44c6b6dc | 100 | if (fPairCut) |
101 | if (!(fPairCut->Pass(aPair))) return; | |
102 | ||
17b6dded | 103 | Double_t weight = fManager->GetWeight(aPair); |
104 | ||
963893bf | 105 | if (fUseLCMS) |
106 | fCYlmTrue->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight); | |
107 | else | |
108 | fCYlmTrue->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight); | |
17b6dded | 109 | } |
110 | //_______________________ | |
111 | void AliFemtoModelCorrFctnDirectYlm::AddMixedPair(AliFemtoPair* aPair) | |
112 | { | |
113 | // add mixed (background) pair | |
44c6b6dc | 114 | if (fPairCut) |
115 | if (!(fPairCut->Pass(aPair))) return; | |
116 | ||
17b6dded | 117 | Double_t weight = fManager->GetWeight(aPair); |
118 | ||
963893bf | 119 | if (fUseLCMS) { |
120 | fCYlmTrue->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0); | |
121 | fCYlmFake->AddRealPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), weight); | |
122 | fCYlmFake->AddMixedPair(aPair->QOutCMS(), aPair->QSideCMS(), aPair->QLongCMS(), 1.0); | |
123 | } | |
124 | else { | |
125 | fCYlmTrue->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0); | |
126 | fCYlmFake->AddRealPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), weight); | |
127 | fCYlmFake->AddMixedPair(aPair->KOut(), aPair->KSide(), aPair->KLong(), 1.0); | |
128 | } | |
17b6dded | 129 | } |
130 | //_______________________ | |
131 | void AliFemtoModelCorrFctnDirectYlm::Write() | |
132 | { | |
133 | // write out all the histograms | |
134 | ||
135 | fCYlmTrue->Write(); | |
136 | fCYlmFake->Write(); | |
137 | } | |
138 | //_______________________ | |
139 | TList* AliFemtoModelCorrFctnDirectYlm::GetOutputList() | |
140 | { | |
141 | // Prepare the list of objects to be written to the output | |
142 | TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList(); | |
143 | tOutputList->Clear(); | |
144 | ||
1fb889b2 | 145 | TList *tListCfTrue = fCYlmTrue->GetOutputList(); |
146 | ||
147 | TIter nextListCfTrue(tListCfTrue); | |
148 | while (TObject *obj = nextListCfTrue()) { | |
149 | tOutputList->Add(obj); | |
150 | } | |
151 | ||
152 | TList *tListCfFake = fCYlmFake->GetOutputList(); | |
153 | ||
154 | TIter nextListCfFake(tListCfFake); | |
155 | while (TObject *obj = nextListCfFake()) { | |
156 | tOutputList->Add(obj); | |
157 | } | |
158 | // tOutputList->Add(fCYlmTrue->GetOutputList()); | |
159 | // tOutputList->Add(fCYlmFake->GetOutputList()); | |
17b6dded | 160 | |
161 | return tOutputList; | |
162 | } | |
163 | //_______________________ | |
164 | AliFemtoModelCorrFctn* AliFemtoModelCorrFctnDirectYlm::Clone() | |
165 | { | |
166 | // Clone the correlation function | |
167 | AliFemtoModelCorrFctnDirectYlm *tCopy = new AliFemtoModelCorrFctnDirectYlm(*this); | |
168 | ||
169 | return tCopy; | |
170 | } | |
963893bf | 171 | //_______________________ |
17b6dded | 172 | void AliFemtoModelCorrFctnDirectYlm::Finish() |
173 | { | |
174 | fCYlmTrue->Finish(); | |
175 | fCYlmFake->Finish(); | |
176 | } | |
963893bf | 177 | //_______________________ |
178 | void AliFemtoModelCorrFctnDirectYlm::SetUseLCMS(int aUseLCMS) | |
179 | { | |
180 | fUseLCMS = aUseLCMS; | |
181 | fCYlmTrue->SetUseLCMS(fUseLCMS); | |
182 | fCYlmFake->SetUseLCMS(fUseLCMS); | |
183 | } | |
184 | //_______________________ | |
185 | int AliFemtoModelCorrFctnDirectYlm::GetUseLCMS() | |
186 | { | |
187 | return fUseLCMS; | |
188 | } | |
189 |