X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=PWG2%2FFEMTOSCOPY%2FAliFemto%2FAliFemtoModelManager.cxx;h=c5c81eb3a2b29f0c84498539e24836bde2f944bb;hb=d92ed9003bd409e52f88150db996e3b9382015de;hp=4ec080572b3b8d65c3162ccc826800f926c81dd6;hpb=3d7a6ebd443b711e5f8fe10b1d4f3261b1cc216a;p=u%2Fmrichter%2FAliRoot.git diff --git a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx index 4ec080572b3..c5c81eb3a2b 100644 --- a/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx +++ b/PWG2/FEMTOSCOPY/AliFemto/AliFemtoModelManager.cxx @@ -68,19 +68,101 @@ void AliFemtoModelManager::AcceptWeightGenerator(AliFemtoModelWeightGenerator *a //_____________________________________________ Double_t AliFemtoModelManager::GetWeight(AliFemtoPair *aPair) { + if (!fWeightGenerator) { + cout << "No weight generator set! Cannot calculate weight" << endl; + exit(0); + } // Return femtoscopic weight for a fiven pair if (fCreateCopyHiddenInfo) { + // Try to gess particle masses and pid from the weight generator + Double_t tMass1, tMass2; + Int_t tPid1, tPid2; + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusPionPlus) { + tMass1 = 0.13957; + tMass2 = 0.13957; + tPid1 = 211; + tPid2 = 211; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusPionMinus) { + tMass1 = 0.13957; + tMass2 = 0.13957; + tPid1 = 211; + tPid2 = -211; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusKaonPlus) { + tMass1 = 0.493677; + tMass2 = 0.493677; + tPid1 = 321; + tPid2 = 321; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusKaonMinus) { + tMass1 = 0.493677; + tMass2 = 0.493677; + tPid1 = 321; + tPid2 = -321; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkProtonProton) { + tMass1 = 0.938272; + tMass2 = 0.938272; + tPid1 = 2212; + tPid2 = 2212; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkProtonAntiproton) { + tMass1 = 0.938272; + tMass2 = 0.938272; + tPid1 = 2212; + tPid2 = -2212; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusKaonPlus) { + tMass1 = 0.13957; + tMass2 = 0.493677; + tPid1 = 211; + tPid2 = 321; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusKaonMinus) { + tMass1 = 0.13957; + tMass2 = 0.493677; + tPid1 = 211; + tPid2 = -321; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusProton) { + tMass1 = 0.13957; + tMass2 = 0.938272; + tPid1 = 211; + tPid2 = 2212; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkPionPlusAntiproton) { + tMass1 = 0.13957; + tMass2 = 0.938272; + tPid1 = 211; + tPid2 = -2212; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusProton) { + tMass1 = 0.493677; + tMass2 = 0.938272; + tPid1 = 321; + tPid2 = 2212; + } + if (fWeightGenerator->GetPairType() == AliFemtoModelWeightGenerator::fgkKaonPlusAntiproton) { + tMass1 = 0.493677; + tMass2 = 0.938272; + tPid1 = 321; + tPid2 = -2212; + } + if (!(aPair->Track1()->HiddenInfo())) { AliFemtoModelHiddenInfo *inf1 = new AliFemtoModelHiddenInfo(); inf1->SetTrueMomentum(aPair->Track1()->Track()->P()); - inf1->SetMass(0.13957); + inf1->SetMass(tMass1); + inf1->SetPDGPid(tPid1); aPair->Track1()->SetHiddenInfo(inf1); delete inf1; } if (!(aPair->Track2()->HiddenInfo())) { AliFemtoModelHiddenInfo *inf2 = new AliFemtoModelHiddenInfo(); inf2->SetTrueMomentum(aPair->Track2()->Track()->P()); - inf2->SetMass(0.13957); + inf2->SetMass(tMass2); + inf2->SetPDGPid(tPid2); aPair->Track2()->SetHiddenInfo(inf2); delete inf2; }