17 const TVector3& PVertex,
18 const TMatrixTSym<double>& VertexCov)
20 TLorentzVector
Tau(0, 0, 0, 0);
30 TVectorT<double> inpar(
size);
31 TMatrixTSym<double> incov(
size);
41 incov(
i,
j) = VertexCov(
i,
j);
47 inpar(
i + Nuoffset) =
Nu.parameter(
i) + 1.0;
50 incov(
i + Nuoffset,
j + Nuoffset) =
Nu.covariance(
i,
j);
59 TVectorT<double> PAR_0(
npar);
67 for (
int i = 0;
i <
npar;
i++) {
68 for (
int j = 0;
j <
npar;
j++) {
86 TVector3 TauDir =
sv -
pv;
104 TVectorT<double> outpar(
npar);
105 for (
int i = 0;
i <
npar;
i++) {
106 outpar(
i) = inpar(
i);
141 outpar(
i) = a1par(
i);
143 outpar(
i) = nupar(
i) + a1par(
i);
159 double P2 = outpar_px * outpar_px + outpar_py * outpar_py + outpar_pz * outpar_pz;
168 for (
int i = 0;
i <
npar;
i++) {
170 for (
int j = 0;
j <
npar;
j++) {
177 std::vector<LorentzVectorParticle> refitParticles;
185 TMatrixTSym<double> a1cov =
189 TMatrixTSym<double> nucov =
192 return refitParticles;
203 TMatrixTSym<double> mcov =
210 const TVectorD&
v, TLorentzVector& a1, TLorentzVector& nu,
double& phi,
double&
theta, TVector3& TauDir) {
211 a1 = TLorentzVector(
v(
a1_px),
219 TauDir.SetMagThetaPhi(1.0,
theta, phi);
231 TLorentzVector Tau_plus, Tau_minus, nu_plus, nu_minus;
234 solveByRotation(TauDir, a1, Tau_plus, Tau_minus, nu_plus, nu_minus, isReal);
237 if (TauDir.Dot(a1.Vect()) < 0) {
267 TVectorT<double> outpar(inpar.GetNrows());
268 TLorentzVector a1, nu;
269 double phi(0),
theta(0);
272 TLorentzVector a1_d = a1;
273 TLorentzVector nu_d = nu;
274 TLorentzVector Tau_plus, Tau_minus, nu_plus, nu_minus;
276 solveByRotation(TauDir, a1_d, Tau_plus, Tau_minus, nu_plus, nu_minus, isReal,
true);
281 for (
int i = 0;
i < outpar.GetNrows();
i++) {
282 outpar(
i) = inpar(
i);
284 outpar(
nu_px) = nu.Px();
285 outpar(
nu_py) = nu.Py();
286 outpar(
nu_pz) = nu.Pz();
291 unsigned int ambiguity) {
293 TVectorT<double> outpar(inpar.GetNrows());
294 TLorentzVector a1, nu;
295 double phi(0),
theta(0);
298 double theta_a1(a1.Theta()), phi_a1(a1.Phi()), theta_GJMax(
thetaGJMax(a1));
299 TauDir.RotateZ(-phi_a1);
300 TauDir.RotateY(-theta_a1);
301 double phiprime(TauDir.Phi());
302 TauDir = TVector3(
sin(theta_GJMax) *
cos(phiprime),
sin(theta_GJMax) *
sin(phiprime),
cos(theta_GJMax));
303 TauDir.RotateY(theta_a1);
304 TauDir.RotateZ(phi_a1);
305 for (
int i = 0;
i < outpar.GetNrows();
i++)
306 outpar(
i) = inpar(
i);
307 outpar(
tau_phi) = TauDir.Phi();
316 if (!(cov_tmp(0, 0) > 0))
319 return par_tmp(0) /
sqrt(cov_tmp(0, 0));
324 TVectorT<double> outpar(1);
325 TLorentzVector a1, nu;
326 double phi(0),
theta(0);
329 double theta_a1(a1.Theta()), phi_a1(a1.Phi()), theta_GJMax(
thetaGJMax(a1));
330 TauDir.RotateZ(-phi_a1);
331 TauDir.RotateY(-theta_a1);
332 outpar(0) = (TauDir.Theta() - theta_GJMax);