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(),
23 // default constructor
25 fCYlmTrue = new AliFemtoCorrFctnDirectYlm();
26 fCYlmFake = new AliFemtoCorrFctnDirectYlm();
28 //_______________________
29 AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const char *title, Int_t aMaxL, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
30 AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
36 sprintf(fname, "%s%s", title, "True");
37 fCYlmTrue = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi);
38 sprintf(fname, "%s%s", title, "Fake");
39 fCYlmFake = new AliFemtoCorrFctnDirectYlm(fname, aMaxL, aNbins, aQinvLo, aQinvHi);
41 //_______________________
42 AliFemtoModelCorrFctnDirectYlm::AliFemtoModelCorrFctnDirectYlm(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn):
43 AliFemtoModelCorrFctn(aCorrFctn),
48 fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone());
49 fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone());
51 //_______________________
52 AliFemtoModelCorrFctnDirectYlm::~AliFemtoModelCorrFctnDirectYlm()
55 if (fCYlmTrue) delete fCYlmTrue;
56 if (fCYlmFake) delete fCYlmFake;
57 if (fNumeratorTrue) delete fNumeratorTrue;
58 if (fNumeratorFake) delete fNumeratorFake;
59 if (fDenominator) delete fDenominator;
62 //_______________________
63 AliFemtoModelCorrFctnDirectYlm& AliFemtoModelCorrFctnDirectYlm::operator=(const AliFemtoModelCorrFctnDirectYlm& aCorrFctn)
65 // assignment operator
66 if (this == &aCorrFctn)
69 if (aCorrFctn.fCYlmTrue)
70 fCYlmTrue = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmTrue->Clone());
73 if (aCorrFctn.fCYlmFake)
74 fCYlmFake = dynamic_cast<AliFemtoCorrFctnDirectYlm*>(aCorrFctn.fCYlmFake->Clone());
79 //_______________________
80 AliFemtoString AliFemtoModelCorrFctnDirectYlm::Report()
83 AliFemtoString tStr = "AliFemtoModelCorrFctnDirectYlm report";
88 //_______________________
89 void AliFemtoModelCorrFctnDirectYlm::AddRealPair(AliFemtoPair* aPair)
91 // add real (effect) pair
92 Double_t weight = fManager->GetWeight(aPair);
94 fCYlmTrue->AddRealPair(aPair->QOutPf(), aPair->QSidePf(), aPair->QLongPf(), weight);
96 //_______________________
97 void AliFemtoModelCorrFctnDirectYlm::AddMixedPair(AliFemtoPair* aPair)
99 // add mixed (background) pair
100 Double_t weight = fManager->GetWeight(aPair);
102 fCYlmTrue->AddMixedPair(aPair->QOutPf(), aPair->QSidePf(), aPair->QLongPf(), 1.0);
103 fCYlmFake->AddRealPair(aPair->QOutPf(), aPair->QSidePf(), aPair->QLongPf(), weight);
104 fCYlmFake->AddMixedPair(aPair->QOutPf(), aPair->QSidePf(), aPair->QLongPf(), 1.0);
106 //_______________________
107 void AliFemtoModelCorrFctnDirectYlm::Write()
109 // write out all the histograms
114 //_______________________
115 TList* AliFemtoModelCorrFctnDirectYlm::GetOutputList()
117 // Prepare the list of objects to be written to the output
118 TList *tOutputList = AliFemtoModelCorrFctn::GetOutputList();
119 tOutputList->Clear();
121 tOutputList->Add(fCYlmTrue->GetOutputList());
122 tOutputList->Add(fCYlmFake->GetOutputList());
126 //_______________________
127 AliFemtoModelCorrFctn* AliFemtoModelCorrFctnDirectYlm::Clone()
129 // Clone the correlation function
130 AliFemtoModelCorrFctnDirectYlm *tCopy = new AliFemtoModelCorrFctnDirectYlm(*this);
135 void AliFemtoModelCorrFctnDirectYlm::Finish()