]>
Commit | Line | Data |
---|---|---|
75c432a7 | 1 | //////////////////////////////////////////////////////////////////////////////// |
2 | /// /// | |
3 | /// AliFemtoModelManager - main helper class for femtoscopy calculations /// | |
4 | /// Manages weight generation, freeze-out coordinates generation /// | |
5 | /// Authors: Adam Kisiel kisiel@mps.ohio-state.edu /// | |
6 | /// /// | |
7 | //////////////////////////////////////////////////////////////////////////////// | |
8 | #ifdef __ROOT__ | |
9 | ClassImp(AliFemtoModelManager, 1) | |
10 | #endif | |
11 | ||
12 | #include "AliFemtoModelManager.h" | |
13 | #include "AliFemtoModelHiddenInfo.h" | |
14 | ||
15 | //_____________________________________________ | |
16 | AliFemtoModelManager::AliFemtoModelManager(): | |
17 | fFreezeOutGenerator(0), | |
18 | fWeightGenerator(0), | |
19 | fCreateCopyHiddenInfo(kFALSE) | |
20 | { | |
21 | } | |
22 | //_____________________________________________ | |
23 | AliFemtoModelManager::AliFemtoModelManager(const AliFemtoModelManager& aManager): | |
24 | fFreezeOutGenerator(0), | |
25 | fWeightGenerator(0), | |
26 | fCreateCopyHiddenInfo(aManager.fCreateCopyHiddenInfo) | |
27 | { | |
28 | if (aManager.fFreezeOutGenerator) { | |
29 | fFreezeOutGenerator = aManager.fFreezeOutGenerator->Clone(); | |
30 | } | |
31 | if (aManager.fWeightGenerator) { | |
32 | fWeightGenerator = aManager.fWeightGenerator->Clone(); | |
33 | } | |
34 | } | |
35 | //_____________________________________________ | |
36 | AliFemtoModelManager::~AliFemtoModelManager() | |
37 | { | |
38 | if (fFreezeOutGenerator) delete fFreezeOutGenerator; | |
39 | if (fWeightGenerator) delete fWeightGenerator; | |
40 | } | |
41 | //_____________________________________________ | |
42 | AliFemtoModelManager& AliFemtoModelManager::operator=(const AliFemtoModelManager& aManager) | |
43 | { | |
44 | if (this == &aManager) | |
45 | return *this; | |
46 | if (aManager.fFreezeOutGenerator) { | |
47 | fFreezeOutGenerator = aManager.fFreezeOutGenerator->Clone(); | |
48 | } | |
49 | else fFreezeOutGenerator = 0; | |
50 | if (aManager.fWeightGenerator) { | |
51 | fWeightGenerator = aManager.fWeightGenerator->Clone(); | |
52 | } | |
53 | else fWeightGenerator = 0; | |
54 | fCreateCopyHiddenInfo = aManager.fCreateCopyHiddenInfo; | |
55 | ||
56 | return *this; | |
57 | } | |
58 | //_____________________________________________ | |
59 | void AliFemtoModelManager::AcceptFreezeOutGenerator(AliFemtoModelFreezeOutGenerator *aFreeze) | |
60 | { | |
61 | fFreezeOutGenerator = aFreeze; | |
62 | } | |
63 | //_____________________________________________ | |
64 | void AliFemtoModelManager::AcceptWeightGenerator(AliFemtoModelWeightGenerator *aWeight) | |
65 | { | |
66 | fWeightGenerator = aWeight; | |
67 | } | |
68 | //_____________________________________________ | |
69 | Double_t AliFemtoModelManager::GetWeight(AliFemtoPair *aPair) | |
70 | { | |
d92ed900 | 71 | if (!fWeightGenerator) { |
72 | cout << "No weight generator set! Cannot calculate weight" << endl; | |
73 | exit(0); | |
74 | } | |
75c432a7 | 75 | // Return femtoscopic weight for a fiven pair |
76 | if (fCreateCopyHiddenInfo) { | |
d92ed900 | 77 | // Try to gess particle masses and pid from the weight generator |
b976850d | 78 | Double_t tMass1=0.0001, tMass2=0.0001; |
79 | Int_t tPid1=0, tPid2=0; | |
2371ba23 | 80 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusPionPlus()) { |
d92ed900 | 81 | tMass1 = 0.13957; |
82 | tMass2 = 0.13957; | |
83 | tPid1 = 211; | |
84 | tPid2 = 211; | |
85 | } | |
2371ba23 | 86 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusPionMinus()) { |
d92ed900 | 87 | tMass1 = 0.13957; |
88 | tMass2 = 0.13957; | |
89 | tPid1 = 211; | |
90 | tPid2 = -211; | |
91 | } | |
2371ba23 | 92 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::KaonPlusKaonPlus()) { |
d92ed900 | 93 | tMass1 = 0.493677; |
94 | tMass2 = 0.493677; | |
95 | tPid1 = 321; | |
96 | tPid2 = 321; | |
97 | } | |
2371ba23 | 98 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::KaonPlusKaonMinus()) { |
d92ed900 | 99 | tMass1 = 0.493677; |
100 | tMass2 = 0.493677; | |
101 | tPid1 = 321; | |
102 | tPid2 = -321; | |
103 | } | |
2371ba23 | 104 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::ProtonProton()) { |
d92ed900 | 105 | tMass1 = 0.938272; |
106 | tMass2 = 0.938272; | |
107 | tPid1 = 2212; | |
108 | tPid2 = 2212; | |
109 | } | |
2371ba23 | 110 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::ProtonAntiproton()) { |
d92ed900 | 111 | tMass1 = 0.938272; |
112 | tMass2 = 0.938272; | |
113 | tPid1 = 2212; | |
114 | tPid2 = -2212; | |
115 | } | |
2371ba23 | 116 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusKaonPlus()) { |
d92ed900 | 117 | tMass1 = 0.13957; |
118 | tMass2 = 0.493677; | |
119 | tPid1 = 211; | |
120 | tPid2 = 321; | |
121 | } | |
2371ba23 | 122 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusKaonMinus()) { |
d92ed900 | 123 | tMass1 = 0.13957; |
124 | tMass2 = 0.493677; | |
125 | tPid1 = 211; | |
126 | tPid2 = -321; | |
127 | } | |
2371ba23 | 128 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusProton()) { |
d92ed900 | 129 | tMass1 = 0.13957; |
130 | tMass2 = 0.938272; | |
131 | tPid1 = 211; | |
132 | tPid2 = 2212; | |
133 | } | |
2371ba23 | 134 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::PionPlusAntiproton()) { |
d92ed900 | 135 | tMass1 = 0.13957; |
136 | tMass2 = 0.938272; | |
137 | tPid1 = 211; | |
138 | tPid2 = -2212; | |
139 | } | |
2371ba23 | 140 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::KaonPlusProton()) { |
d92ed900 | 141 | tMass1 = 0.493677; |
142 | tMass2 = 0.938272; | |
143 | tPid1 = 321; | |
144 | tPid2 = 2212; | |
145 | } | |
2371ba23 | 146 | if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::KaonPlusAntiproton()) { |
d92ed900 | 147 | tMass1 = 0.493677; |
148 | tMass2 = 0.938272; | |
149 | tPid1 = 321; | |
150 | tPid2 = -2212; | |
151 | } | |
152 | ||
d0e92d9a | 153 | if (!(aPair->Track1()->HiddenInfo())) { |
75c432a7 | 154 | AliFemtoModelHiddenInfo *inf1 = new AliFemtoModelHiddenInfo(); |
d0e92d9a | 155 | inf1->SetTrueMomentum(aPair->Track1()->Track()->P()); |
d92ed900 | 156 | inf1->SetMass(tMass1); |
157 | inf1->SetPDGPid(tPid1); | |
d0e92d9a | 158 | aPair->Track1()->SetHiddenInfo(inf1); |
75c432a7 | 159 | delete inf1; |
160 | } | |
d0e92d9a | 161 | if (!(aPair->Track2()->HiddenInfo())) { |
75c432a7 | 162 | AliFemtoModelHiddenInfo *inf2 = new AliFemtoModelHiddenInfo(); |
d0e92d9a | 163 | inf2->SetTrueMomentum(aPair->Track2()->Track()->P()); |
d92ed900 | 164 | inf2->SetMass(tMass2); |
165 | inf2->SetPDGPid(tPid2); | |
d0e92d9a | 166 | aPair->Track2()->SetHiddenInfo(inf2); |
75c432a7 | 167 | delete inf2; |
168 | } | |
169 | } | |
170 | ||
171 | if (fFreezeOutGenerator) { | |
172 | fFreezeOutGenerator->GenerateFreezeOut(aPair); | |
173 | } | |
174 | return fWeightGenerator->GenerateWeight(aPair); | |
175 | } | |
176 | //_____________________________________________ | |
fd27c54f | 177 | void AliFemtoModelManager::CreateCopyHiddenInfo(Bool_t aCopy) |
75c432a7 | 178 | { |
fd27c54f | 179 | fCreateCopyHiddenInfo = aCopy; |
75c432a7 | 180 | } |
181 | //_____________________________________________ | |
182 | AliFemtoModelFreezeOutGenerator* AliFemtoModelManager::GetFreezeOutGenerator() | |
183 | { | |
184 | return fFreezeOutGenerator; | |
185 | } | |
186 | //_____________________________________________ | |
187 | AliFemtoModelWeightGenerator* AliFemtoModelManager::GetWeightGenerator() | |
188 | { | |
189 | return fWeightGenerator; | |
190 | } |