10#include "FemtoWielanekMapGenerator.h"
12#include "DividedHisto.h"
13#include "Femto1DMapGenerator.h"
16#include <TDatabasePDG.h>
20#include <TLorentzVector.h>
22#include <TParticlePDG.h>
27#include "FemtoPairKinematics.h"
35 fPairsNo = pairs_per_bin;
37 fWeightArray =
new Double_t[fPairsNo];
38 fAngleArray =
new Double_t[fPairsNo];
39 Double_t step = TMath::Pi() / ((Double_t) fPairsNo);
43 for (Double_t i = 0; i < TMath::Pi(); i += step) {
44 fWeightArray[count] = TMath::Cos(i - 0.5 * step) - TMath::Cos(i + 0.5 * step);
45 fAngleArray[count] = i + 0.5 * step;
46 sum += fWeightArray[count];
50 for (
int i = 0; i < fPairsNo; i++) {
51 fWeightArray[i] = fWeightArray[i] / sum;
53 for (
int i = 1; i <= fMap->
GetNum()->GetNbinsX(); i++) {
54 Double_t k = fMap->
GetNum()->GetXaxis()->GetBinCenter(i);
55 for (
int j = 1; j <= fMap->
GetNum()->GetNbinsY(); j++) {
56 Double_t r = fMap->
GetNum()->GetYaxis()->GetBinCenter(j);
57 fMap->
GetNum()->SetBinContent(i, j, GeneratePairs(pair, r, k));
61 delete[] fWeightArray;
67 fMap->
GetNum()->GetXaxis()->SetTitle(
"K*[GeV/c]");
68 fMap->
GetNum()->GetYaxis()->SetTitle(
"R*[fm]");
72 Double_t FemtoWielanekMapGenerator::GeneratePairs(
FemtoPair* pair, Double_t R, Double_t K) {
75 Double_t e1 = TMath::Sqrt(px1 * px1 + 0.02 + fMass12);
76 Double_t e2 = TMath::Sqrt(px1 * px1 + 0.02 + fMass22);
78 p.SetPxPyPzE(0.2, 0, 0.2, e1 + e2);
79 TVector3 boost = p.BoostVector();
80 pair->SetTrueMomenta1(0.1, px1, 0.1, e1);
81 pair->SetTrueMomenta2(0.1, -px1, 0.1, e2);
82 for (
int i = 0; i < fPairsNo; i++) {
83 x.SetXYZT(R * TMath::Sin(fAngleArray[i]), R * TMath::Cos(fAngleArray[i]), 0, 0);
88 sum += fWeightArray[i] * v;
93 FemtoWielanekMapGenerator::~FemtoWielanekMapGenerator() {}
virtual Double_t GenerateWeight(FemtoPair *pair)
void Exec(Int_t pairs_per_bin)
FemtoWielanekMapGenerator()