Making the directory structure of AliFemtoUser flat. All files go into one common...
[u/mrichter/AliRoot.git] / PWG2 / FEMTOSCOPY / AliFemtoUser / AliFemtoModelCorrFctnSource.cxx
CommitLineData
ac830a3d 1////////////////////////////////////////////////////////////////////////////////
2/// ///
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 ///
7/// ///
8////////////////////////////////////////////////////////////////////////////////
9#ifdef __ROOT__
10 ClassImp(AliFemtoModelCorrFctnSource, 1)
11#endif
12
65423af9 13#include "AliFemtoModelGausLCMSFreezeOutGenerator.h"
14#include "AliFemtoModelHiddenInfo.h"
15#include "AliFemtoModelCorrFctnSource.h"
ac830a3d 16
17//_______________________
18AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource():
19 AliFemtoModelCorrFctn(),
20 fHistROut(0),
21 fHistRSide(0),
22 fHistRLong(0),
23 fHistRStar(0),
24 fHistdNdR(0)
25{
26}
27//_______________________
28AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const char *title, Int_t aNbins, Double_t aQinvLo, Double_t aQinvHi):
29 AliFemtoModelCorrFctn(title, aNbins, aQinvLo, aQinvHi),
30 fHistROut(0),
31 fHistRSide(0),
32 fHistRLong(0),
33 fHistRStar(0),
34 fHistdNdR(0)
35{
36 char buf[100];
37 sprintf(buf, "%sOut", title);
38 fHistROut = new TH1D(buf,buf,100,-50.0,50.0);
39 sprintf(buf, "%sSide", title);
40 fHistRSide = new TH1D(buf,buf,100,-50.0,50.0);
41 sprintf(buf, "%sLong", title);
42 fHistRLong = new TH1D(buf,buf,100,-50.0,50.0);
43 sprintf(buf, "%sInv", title);
44 fHistRStar = new TH1D(buf,buf,100,-50.0,50.0);
45 sprintf(buf, "%sdNdR", title);
46 fHistdNdR = new TH1D(buf,buf,100,-50.0,50.0);
47
48 fHistROut->Sumw2();
49 fHistRSide->Sumw2();
50 fHistRLong->Sumw2();
51 fHistRStar->Sumw2();
52 fHistdNdR->Sumw2();
53}
54//_______________________
55AliFemtoModelCorrFctnSource::AliFemtoModelCorrFctnSource(const AliFemtoModelCorrFctnSource& aCorrFctn):
56 AliFemtoModelCorrFctn(aCorrFctn),
57 fHistROut(0),
58 fHistRSide(0),
59 fHistRLong(0),
60 fHistRStar(0),
61 fHistdNdR(0)
62{
63 fHistROut = new TH1D (*aCorrFctn.fHistROut);
64 fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
65 fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
66 fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
67 fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
68}
69//_______________________
70AliFemtoModelCorrFctnSource::~AliFemtoModelCorrFctnSource()
71{
72 if (fHistROut) delete fHistROut;
73 if (fHistRSide) delete fHistRSide;
74 if (fHistRLong) delete fHistRLong;
75 if (fHistRStar) delete fHistRStar;
76 if (fHistdNdR) delete fHistdNdR;
77 if (fNumeratorTrue) delete fNumeratorTrue;
78 if (fNumeratorFake) delete fNumeratorFake;
79 if (fDenominator) delete fDenominator;
80}
81
82//_______________________
83AliFemtoModelCorrFctnSource& AliFemtoModelCorrFctnSource::operator=(const AliFemtoModelCorrFctnSource& aCorrFctn)
84{
85 if (this == &aCorrFctn)
86 return *this;
87 if (aCorrFctn.fHistROut)
88 fHistROut = new TH1D (*aCorrFctn.fHistROut);
89 else fHistROut = 0;
90 if (aCorrFctn.fHistRSide)
91 fHistRSide = new TH1D(*aCorrFctn.fHistRSide);
92 else fHistRSide = 0;
93 if (aCorrFctn.fHistRLong)
94 fHistRLong = new TH1D(*aCorrFctn.fHistRLong);
95 else fHistRLong = 0;
96 if (aCorrFctn.fHistRStar)
97 fHistRStar = new TH1D(*aCorrFctn.fHistRStar);
98 fHistRStar = 0;
99 if (aCorrFctn.fHistdNdR)
100 fHistdNdR = new TH1D(*aCorrFctn.fHistdNdR);
101 else fHistdNdR = 0;
102
103 return *this;
104}
105//_______________________
106AliFemtoString AliFemtoModelCorrFctnSource::Report()
107{
108 AliFemtoString tStr = "AliFemtoModelCorrFctnSource report";
109
110 return tStr;
111}
112
113//_______________________
114void AliFemtoModelCorrFctnSource::AddRealPair(AliFemtoPair* aPair)
115{
116 AliFemtoModelCorrFctn::AddRealPair(aPair);
117}
118//_______________________
119void AliFemtoModelCorrFctnSource::AddMixedPair(AliFemtoPair* aPair)
120{
121 AliFemtoModelCorrFctn::AddMixedPair(aPair);
122 fHistROut->Fill (fManager->GetWeightGenerator()->GetRStarOut());
123 fHistRSide->Fill(fManager->GetWeightGenerator()->GetRStarSide());
124 fHistRLong->Fill(fManager->GetWeightGenerator()->GetRStarLong());
125 fHistRStar->Fill(fManager->GetWeightGenerator()->GetRStar());
126 fHistdNdR->Fill (fManager->GetWeightGenerator()->GetRStar(),1.0/(fManager->GetWeightGenerator()->GetRStar()*fManager->GetWeightGenerator()->GetRStar()));
127}
128//_______________________
129void AliFemtoModelCorrFctnSource::Write()
130{
131 fHistROut->Write();
132 fHistRSide->Write();
133 fHistRLong->Write();
134 fHistRStar->Write();
135 fHistdNdR->Write();
136
137 AliFemtoModelCorrFctn::Write();
138}
139//_______________________
65423af9 140AliFemtoModelCorrFctn* AliFemtoModelCorrFctnSource::Clone()
ac830a3d 141{
142 AliFemtoModelCorrFctnSource *tCopy = new AliFemtoModelCorrFctnSource(*this);
143
144 return tCopy;
145}
146