47 if(fhLegendre == NULL) fhLegendre =
new TH2F(
"fhCombiLegendre",
"", fThetaNofBin,
fThetaMin,
fThetaMax, fRNofBin, fRMin, fRMax);
52 fThetaNofBin = thetaNofBin;
63 fhLegendre->SetStats(kFALSE);
70 ComputeThetaR(x1, y1, r1, x2, y2, r2, theta, r);
71 histo->Fill(theta * TMath::RadToDeg(), r);
80 if(r1 == 0 && r2 == 0) {
85 else if(r1 > 0 && r2 > 0) {
86 double dr[4] = {r1 -
r2, r1 +
r2, -r1 -
r2, -r1 + r2};
87 for(
int ir = 0;
ir < 4;
ir++) {
93 theta = alpha + TMath::ACos(-dr[
ir]/distance);
106 if(
fabs(rA[0] - rB[0]) < 1e-10 ||
fabs(rA[0] - rB[1]) < 1e-10) r = rA[0];
107 else if(
fabs(rA[1] - rB[0]) < 1e-10 ||
fabs(rA[1] - rB[1]) < 1e-10) r = rA[1];
118 double dr[2] = {-rj, rj};
119 for(
int ir = 0;
ir < 2;
ir++) {
125 theta = alpha + TMath::ACos(dr[
ir]/distance);
141 FillHisto(fhLegendre, x1, y1, radius1, x2, y2, radius2);
145 fhLegendre->Draw(
"colz");
149 ExtractMaximumFromHisto(fhLegendre, theta_max, r_max);
153 int bin = histo->GetMaximumBin();
154 int binx, biny, binz;
155 histo->GetBinXYZ(bin, binx, biny, binz);
156 theta_max = histo->GetXaxis()->GetBinCenter(binx);
157 r_max = histo->GetYaxis()->GetBinCenter(biny);
158 return histo->GetMaximum();
164 ExtractLegendreMaximum(theta, r);
165 ExtractLineParameters(theta, r, slope, intercept);
171 if(theta == 0.) theta = 1.e-6;
173 slope = - 1./
TMath::Tan(TMath::DegToRad() * theta);
174 intercept = r/
TMath::Sin(TMath::DegToRad() * theta);
static T Sqrt(const T &x)
static T ATan2(const T &y, const T &x)
friend F32vec4 fabs(const F32vec4 &a)