CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
tauImpactParameter::TauA1NuConstrainedFitter Class Reference

#include <TauA1NuConstrainedFitter.h>

Inheritance diagram for tauImpactParameter::TauA1NuConstrainedFitter:
tauImpactParameter::MultiProngTauSolver

Public Types

enum  ExpandedPars { a1_vx = 9, a1_vy, a1_vz, nexpandedpar }
 
enum  OrignialPars { norigpar = 13 }
 
enum  Pars {
  tau_phi = 0, tau_theta, a1_px, a1_py,
  a1_pz, a1_m, nu_px, nu_py,
  nu_pz, npar
}
 
- Public Types inherited from tauImpactParameter::MultiProngTauSolver
enum  Ambiguity { zero, minus, plus, NAmbiguity }
 

Public Member Functions

bool fit ()
 
LorentzVectorParticle getMother ()
 
std::vector< LorentzVectorParticlegetRefitDaughters ()
 
double getTauRotationSignificance ()
 
 TauA1NuConstrainedFitter (unsigned int ambiguity, const LorentzVectorParticle &A1, const TVector3 &PVertex, const TMatrixTSym< double > &VertexCov)
 
 ~TauA1NuConstrainedFitter () override
 
- Public Member Functions inherited from tauImpactParameter::MultiProngTauSolver
 MultiProngTauSolver ()
 
virtual ~MultiProngTauSolver ()
 

Private Member Functions

void UpdateExpandedPar ()
 

Static Private Member Functions

static TVectorT< double > ComputeA1LorentzVectorPar (const TVectorT< double > &inpar)
 
static TVectorT< double > ComputeExpParToPar (const TVectorT< double > &inpar)
 
static TVectorT< double > ComputeInitalExpPar (const TVectorT< double > &inpar)
 
static TVectorT< double > ComputeMotherLorentzVectorPar (const TVectorT< double > &inpar)
 
static TVectorT< double > ComputeNuLorentzVectorPar (const TVectorT< double > &inpar)
 
static void CovertParToObjects (const TVectorD &v, TLorentzVector &a1, TLorentzVector &nu, double &phi, double &theta, TVector3 &TauDir)
 
static TVectorT< double > SolveAmbiguityAnalytically (const TVectorT< double > &inpar, unsigned int ambiguity)
 
static TVectorT< double > SolveAmbiguityAnalyticallywithRot (const TVectorT< double > &inpar, unsigned int ambiguity)
 
static TVectorT< double > TauRot (const TVectorT< double > &inpar)
 

Private Attributes

unsigned int ambiguity_
 
TMatrixTSym< double > cov
 
TMatrixTSym< double > cov_0
 
TMatrixTSym< double > expcov
 
TVectorT< double > exppar
 
TVectorT< double > par
 
TVectorT< double > par_0
 
std::vector< LorentzVectorParticleparticles_
 

Additional Inherited Members

- Static Public Member Functions inherited from tauImpactParameter::MultiProngTauSolver
static void analyticESolver (TLorentzVector &nu_plus, TLorentzVector &nu_minus, const TLorentzVector &A1, bool &isReal)
 
static LorentzVectorParticle estimateNu (const LorentzVectorParticle &a1, const TVector3 &pv, int ambiguity, TLorentzVector &tau)
 
static void numericalESolver (TLorentzVector &nu_plus, TLorentzVector &nu_minus, const TLorentzVector &A1, bool &isReal)
 
static void quadratic (double &x_plus, double &x_minus, double a, double b, double c, bool &isReal)
 
static TVectorT< double > rotateToTauFrame (const TVectorT< double > &inpar)
 
static bool setTauDirectionatThetaGJMax (const TLorentzVector &a1, double &theta, double &phi, double scale=1.0)
 
static void solveByRotation (const TVector3 &TauDir, const TLorentzVector &A1, TLorentzVector &Tau_plus, TLorentzVector &Tau_minus, TLorentzVector &nu_plus, TLorentzVector &nu_minus, bool &isReal, bool rotateback=true)
 
static double thetaGJMax (const TLorentzVector &a1)
 

Detailed Description

Definition at line 21 of file TauA1NuConstrainedFitter.h.

Member Enumeration Documentation

◆ ExpandedPars

Enumerator
a1_vx 
a1_vy 
a1_vz 
nexpandedpar 

Definition at line 30 of file TauA1NuConstrainedFitter.h.

30 { a1_vx = 9, a1_vy, a1_vz, nexpandedpar };

◆ OrignialPars

Enumerator
norigpar 

Definition at line 31 of file TauA1NuConstrainedFitter.h.

31 { norigpar = 13 };

◆ Pars

Enumerator
tau_phi 
tau_theta 
a1_px 
a1_py 
a1_pz 
a1_m 
nu_px 
nu_py 
nu_pz 
npar 

Definition at line 29 of file TauA1NuConstrainedFitter.h.

Constructor & Destructor Documentation

◆ TauA1NuConstrainedFitter()

TauA1NuConstrainedFitter::TauA1NuConstrainedFitter ( unsigned int  ambiguity,
const LorentzVectorParticle A1,
const TVector3 &  PVertex,
const TMatrixTSym< double > &  VertexCov 
)

Definition at line 15 of file TauA1NuConstrainedFitter.cc.

19  : MultiProngTauSolver(), ambiguity_(ambiguity) {
20  TLorentzVector Tau(0, 0, 0, 0);
21  //dummy substitution not used later
22  TVectorT<double> nu_par(LorentzVectorParticle::NLorentzandVertexPar, 1);
23  TMatrixTSym<double> nu_cov(LorentzVectorParticle::NLorentzandVertexPar);
24  LorentzVectorParticle Nu(nu_par, nu_cov, PDGInfo::nu_tau, 0.0, A1.bField());
25  particles_.push_back(A1);
26  particles_.push_back(Nu);
27 
28  // setup 13 by 13 matrix
30  TVectorT<double> inpar(size);
31  TMatrixTSym<double> incov(size);
32 
33  // Get primary vertex information
34  if (VertexCov.GetNrows() != LorentzVectorParticle::NVertex)
35  return;
36  inpar(LorentzVectorParticle::vx) = PVertex.X();
37  inpar(LorentzVectorParticle::vy) = PVertex.Y();
38  inpar(LorentzVectorParticle::vz) = PVertex.Z();
39  for (int i = 0; i < LorentzVectorParticle::NVertex; i++) {
40  for (int j = 0; j < LorentzVectorParticle::NVertex; j++)
41  incov(i, j) = VertexCov(i, j);
42  }
43  int A1offset = LorentzVectorParticle::NVertex;
45  for (int i = 0; i < LorentzVectorParticle::NLorentzandVertexPar; i++) {
46  inpar(i + A1offset) = A1.parameter(i);
47  inpar(i + Nuoffset) = Nu.parameter(i) + 1.0; // offset by 1 GeV to prevent convergence on first iteration
48  for (int j = 0; j < LorentzVectorParticle::NLorentzandVertexPar; j++) {
49  incov(i + A1offset, j + A1offset) = A1.covariance(i, j);
50  incov(i + Nuoffset, j + Nuoffset) = Nu.covariance(i, j);
51  }
52  }
53 
54  exppar.ResizeTo(nexpandedpar, 1);
55  exppar = ComputeInitalExpPar(inpar);
56  expcov.ResizeTo(nexpandedpar, nexpandedpar);
58 
59  TVectorT<double> PAR_0(npar);
60  par_0.ResizeTo(npar);
61  cov_0.ResizeTo(npar, npar);
62  PAR_0 = ComputeExpParToPar(exppar);
63  for (int i = 0; i < npar; i++)
64  par_0(i) = PAR_0(i);
66 
67  for (int i = 0; i < npar; i++) {
68  for (int j = 0; j < npar; j++) {
69  cov_0(i, j) = expcov(i, j);
70  }
71  }
72 
73  par.ResizeTo(npar);
74  par = par_0;
75  cov.ResizeTo(npar, npar);
76  cov = cov_0;
77 }

References tauImpactParameter::Particle::bField(), ComputeExpParToPar(), ComputeInitalExpPar(), cov, cov_0, tauImpactParameter::Particle::covariance(), expcov, exppar, mps_fire::i, dqmiolumiharvest::j, nexpandedpar, tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar, npar, TtFullLepDaughter::Nu, tauImpactParameter::PDGInfo::nu_tau, tauImpactParameter::LorentzVectorParticle::NVertex, par, par_0, tauImpactParameter::LorentzVectorParticle::parameter(), particles_, tauImpactParameter::ErrorMatrixPropagator::propagateError(), findQualityFiles::size, L1TRate_Offline_cfi::Tau, tauImpactParameter::LorentzVectorParticle::vx, tauImpactParameter::LorentzVectorParticle::vy, and tauImpactParameter::LorentzVectorParticle::vz.

◆ ~TauA1NuConstrainedFitter()

tauImpactParameter::TauA1NuConstrainedFitter::~TauA1NuConstrainedFitter ( )
inlineoverride

Definition at line 27 of file TauA1NuConstrainedFitter.h.

27 {};

Member Function Documentation

◆ ComputeA1LorentzVectorPar()

TVectorT< double > TauA1NuConstrainedFitter::ComputeA1LorentzVectorPar ( const TVectorT< double > &  inpar)
staticprivate

◆ ComputeExpParToPar()

TVectorT< double > TauA1NuConstrainedFitter::ComputeExpParToPar ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 103 of file TauA1NuConstrainedFitter.cc.

103  {
104  TVectorT<double> outpar(npar);
105  for (int i = 0; i < npar; i++) {
106  outpar(i) = inpar(i);
107  }
108  return outpar;
109 }

References mps_fire::i, and npar.

Referenced by TauA1NuConstrainedFitter().

◆ ComputeInitalExpPar()

TVectorT< double > TauA1NuConstrainedFitter::ComputeInitalExpPar ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 79 of file TauA1NuConstrainedFitter.cc.

79  {
80  TVectorT<double> outpar(nexpandedpar);
81  int offset = LorentzVectorParticle::NVertex; // for A1
83  TVector3 sv(inpar(LorentzVectorParticle::vx + offset),
86  TVector3 TauDir = sv - pv;
87  outpar(tau_phi) = TauDir.Phi();
88  outpar(tau_theta) = TauDir.Theta();
89  outpar(a1_px) = inpar(LorentzVectorParticle::px + offset);
90  outpar(a1_py) = inpar(LorentzVectorParticle::py + offset);
91  outpar(a1_pz) = inpar(LorentzVectorParticle::pz + offset);
92  outpar(a1_m) = inpar(LorentzVectorParticle::m + offset);
93  outpar(a1_vx) = inpar(LorentzVectorParticle::vx + offset);
94  outpar(a1_vy) = inpar(LorentzVectorParticle::vy + offset);
95  outpar(a1_vz) = inpar(LorentzVectorParticle::vz + offset);
97  outpar(nu_px) = inpar(LorentzVectorParticle::px + offset);
98  outpar(nu_py) = inpar(LorentzVectorParticle::py + offset);
99  outpar(nu_pz) = inpar(LorentzVectorParticle::pz + offset);
100  return outpar;
101 }

References a1_m, a1_px, a1_py, a1_pz, a1_vx, a1_vy, a1_vz, tauImpactParameter::LorentzVectorParticle::m, nexpandedpar, tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar, nu_px, nu_py, nu_pz, tauImpactParameter::LorentzVectorParticle::NVertex, hltrates_dqm_sourceclient-live_cfg::offset, MetAnalyzer::pv(), tauImpactParameter::LorentzVectorParticle::px, tauImpactParameter::LorentzVectorParticle::py, tauImpactParameter::LorentzVectorParticle::pz, pfDeepBoostedJetPreprocessParams_cfi::sv, tau_phi, tau_theta, tauImpactParameter::LorentzVectorParticle::vx, tauImpactParameter::LorentzVectorParticle::vy, and tauImpactParameter::LorentzVectorParticle::vz.

Referenced by TauA1NuConstrainedFitter().

◆ ComputeMotherLorentzVectorPar()

TVectorT< double > TauA1NuConstrainedFitter::ComputeMotherLorentzVectorPar ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 135 of file TauA1NuConstrainedFitter.cc.

135  {
136  TVectorT<double> outpar(LorentzVectorParticle::NLorentzandVertexPar);
137  TVectorT<double> nupar = ComputeNuLorentzVectorPar(inpar);
138  TVectorT<double> a1par = ComputeA1LorentzVectorPar(inpar);
139  for (int i = 0; i < LorentzVectorParticle::NLorentzandVertexPar; i++) {
141  outpar(i) = a1par(i);
142  } else {
143  outpar(i) = nupar(i) + a1par(i);
144  }
145  //if(i==LorentzVectorParticle::m) outpar(i,0)=PDGInfo::tau_mass();
146  }
147  double nu_px = nupar(LorentzVectorParticle::px);
148  double nu_py = nupar(LorentzVectorParticle::py);
149  double nu_pz = nupar(LorentzVectorParticle::pz);
150  double Enu2 = nu_px * nu_px + nu_py * nu_py + nu_pz * nu_pz;
151  double a1_px = a1par(LorentzVectorParticle::px);
152  double a1_py = a1par(LorentzVectorParticle::py);
153  double a1_pz = a1par(LorentzVectorParticle::pz);
154  double a1_m = a1par(LorentzVectorParticle::m);
155  double Ea12 = a1_px * a1_px + a1_py * a1_py + a1_pz * a1_pz + a1_m * a1_m;
156  double outpar_px = outpar(LorentzVectorParticle::px);
157  double outpar_py = outpar(LorentzVectorParticle::py);
158  double outpar_pz = outpar(LorentzVectorParticle::pz);
159  double P2 = outpar_px * outpar_px + outpar_py * outpar_py + outpar_pz * outpar_pz;
160  outpar(LorentzVectorParticle::m) = sqrt(std::fabs(Enu2 + Ea12 + 2 * sqrt(Enu2 * Ea12) - P2));
161  return outpar;
162 }

References a1_m, a1_px, a1_py, a1_pz, ComputeA1LorentzVectorPar(), ComputeNuLorentzVectorPar(), mps_fire::i, tauImpactParameter::LorentzVectorParticle::m, tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar, nu_px, nu_py, nu_pz, tauImpactParameter::LorentzVectorParticle::NVertex, tauImpactParameter::LorentzVectorParticle::px, tauImpactParameter::LorentzVectorParticle::py, tauImpactParameter::LorentzVectorParticle::pz, and mathSSE::sqrt().

Referenced by getMother().

◆ ComputeNuLorentzVectorPar()

TVectorT< double > TauA1NuConstrainedFitter::ComputeNuLorentzVectorPar ( const TVectorT< double > &  inpar)
staticprivate

◆ CovertParToObjects()

void TauA1NuConstrainedFitter::CovertParToObjects ( const TVectorD &  v,
TLorentzVector &  a1,
TLorentzVector &  nu,
double &  phi,
double &  theta,
TVector3 &  TauDir 
)
staticprivate

Definition at line 209 of file TauA1NuConstrainedFitter.cc.

210  {
211  a1 = TLorentzVector(v(a1_px),
212  v(a1_py),
213  v(a1_pz),
214  sqrt(v(a1_m) * v(a1_m) + v(a1_px) * v(a1_px) + v(a1_py) * v(a1_py) + v(a1_pz) * v(a1_pz)));
215  nu = TLorentzVector(
216  v(nu_px), v(nu_py), v(nu_pz), sqrt(v(nu_px) * v(nu_px) + v(nu_py) * v(nu_py) + v(nu_pz) * v(nu_pz)));
217  phi = v(tau_phi);
218  theta = v(tau_theta);
219  TauDir.SetMagThetaPhi(1.0, theta, phi);
220 }

References a1_m, a1_px, a1_py, a1_pz, nu_px, nu_py, nu_pz, mathSSE::sqrt(), tau_phi, tau_theta, theta(), and findQualityFiles::v.

Referenced by SolveAmbiguityAnalytically(), SolveAmbiguityAnalyticallywithRot(), and TauRot().

◆ fit()

bool TauA1NuConstrainedFitter::fit ( void  )

Definition at line 222 of file TauA1NuConstrainedFitter.cc.

222  {
224  // Check if Tau Direction is unphysical and if nessicary set the starting point to Theta_{GJ-Max}
225  TLorentzVector a1(
226  par(a1_px),
227  par(a1_py),
228  par(a1_pz),
229  sqrt(par(a1_m) * par(a1_m) + par(a1_px) * par(a1_px) + par(a1_py) * par(a1_py) + par(a1_pz) * par(a1_pz)));
230  double phi(par(tau_phi)), theta(par(tau_theta));
231  TLorentzVector Tau_plus, Tau_minus, nu_plus, nu_minus;
232  TVector3 TauDir(cos(phi) * sin(theta), sin(phi) * sin(theta), cos(theta));
233  bool isReal;
234  solveByRotation(TauDir, a1, Tau_plus, Tau_minus, nu_plus, nu_minus, isReal);
235 
236  //check that the do product of the a1 and tau is positive, otherwise there is no information for tau direction -> use zero solution
237  if (TauDir.Dot(a1.Vect()) < 0) {
238  isReal = false;
239  }
240 
241  //case 1: is real then solve analytically
242  if (isReal && (ambiguity_ == plus || ambiguity_ == minus)) {
243  // popogate errors
246  std::bind(TauA1NuConstrainedFitter::SolveAmbiguityAnalytically, std::placeholders::_1, ambiguity_), par, cov_0);
247  for (int i = 0; i < npar; i++)
248  par(i) = par_tmp(i);
249  return true;
250  }
251  // case 2 is in unphsyical region - rotate and substitue \theta_{GJ} with \theta_{GJ}^{Max} and then solve analytically
252  else if (!isReal && ambiguity_ == zero) {
256  par,
257  cov_0);
258  for (int i = 0; i < npar; i++)
259  par(i) = par_tmp(i);
260  return true;
261  }
262  return false;
263 }

References a1_m, a1_px, a1_py, a1_pz, ambiguity_, funct::cos(), cov, cov_0, mps_fire::i, tauImpactParameter::MultiProngTauSolver::minus, npar, par, tauImpactParameter::MultiProngTauSolver::plus, tauImpactParameter::ErrorMatrixPropagator::propagateError(), funct::sin(), SolveAmbiguityAnalytically(), SolveAmbiguityAnalyticallywithRot(), tauImpactParameter::MultiProngTauSolver::solveByRotation(), mathSSE::sqrt(), tau_phi, tau_theta, theta(), and tauImpactParameter::MultiProngTauSolver::zero.

Referenced by trackingPlots.Iteration::modules(), and PFTau3ProngReco::produce().

◆ getMother()

LorentzVectorParticle TauA1NuConstrainedFitter::getMother ( )

◆ getRefitDaughters()

std::vector< LorentzVectorParticle > TauA1NuConstrainedFitter::getRefitDaughters ( )

Definition at line 176 of file TauA1NuConstrainedFitter.cc.

176  {
177  std::vector<LorentzVectorParticle> refitParticles;
179  double c(0), b(0);
180  for (unsigned int i = 0; i < particles_.size(); i++) {
181  c += particles_[i].charge();
182  b = particles_[i].bField();
183  }
184  TVectorT<double> a1 = ComputeA1LorentzVectorPar(exppar);
185  TMatrixTSym<double> a1cov =
187  refitParticles.push_back(LorentzVectorParticle(a1, a1cov, particles_[0].pdgId(), c, b));
188  TVectorT<double> nu = ComputeNuLorentzVectorPar(exppar);
189  TMatrixTSym<double> nucov =
191  refitParticles.push_back(LorentzVectorParticle(nu, nucov, PDGInfo::nu_tau, 0.0, b));
192  return refitParticles;
193 }

References b, HltBtagPostValidation_cff::c, ComputeA1LorentzVectorPar(), ComputeNuLorentzVectorPar(), expcov, exppar, mps_fire::i, tauImpactParameter::PDGInfo::nu_tau, particles_, EgammaValidation_cff::pdgId, tauImpactParameter::ErrorMatrixPropagator::propagateError(), and UpdateExpandedPar().

Referenced by PFTau3ProngReco::produce().

◆ getTauRotationSignificance()

double TauA1NuConstrainedFitter::getTauRotationSignificance ( )

Definition at line 313 of file TauA1NuConstrainedFitter.cc.

313  {
314  TVectorT<double> par_tmp = TauA1NuConstrainedFitter::TauRot(par);
316  if (!(cov_tmp(0, 0) > 0))
317  return -999; // return invalid value if the covariance is unphysical (safety flag)
318  if (par_tmp(0) > 0)
319  return par_tmp(0) / sqrt(cov_tmp(0, 0)); // return the significance if the value is in the unphysical region
320  return 0; // reutrn 0 for the rotation significance if the tau is in the physical region
321 }

References cov_0, par, tauImpactParameter::ErrorMatrixPropagator::propagateError(), mathSSE::sqrt(), and TauRot().

◆ SolveAmbiguityAnalytically()

TVectorT< double > TauA1NuConstrainedFitter::SolveAmbiguityAnalytically ( const TVectorT< double > &  inpar,
unsigned int  ambiguity 
)
staticprivate

Definition at line 265 of file TauA1NuConstrainedFitter.cc.

265  {
266  // Solve equation quadratic equation
267  TVectorT<double> outpar(inpar.GetNrows());
268  TLorentzVector a1, nu;
269  double phi(0), theta(0);
270  TVector3 TauDir;
271  CovertParToObjects(inpar, a1, nu, phi, theta, TauDir);
272  TLorentzVector a1_d = a1;
273  TLorentzVector nu_d = nu;
274  TLorentzVector Tau_plus, Tau_minus, nu_plus, nu_minus;
275  bool isReal;
276  solveByRotation(TauDir, a1_d, Tau_plus, Tau_minus, nu_plus, nu_minus, isReal, true);
277  if (amb == plus)
278  nu = nu_plus;
279  else
280  nu = nu_minus;
281  for (int i = 0; i < outpar.GetNrows(); i++) {
282  outpar(i) = inpar(i);
283  }
284  outpar(nu_px) = nu.Px();
285  outpar(nu_py) = nu.Py();
286  outpar(nu_pz) = nu.Pz();
287  return outpar;
288 }

References amb, CovertParToObjects(), mps_fire::i, nu_px, nu_py, nu_pz, tauImpactParameter::MultiProngTauSolver::plus, tauImpactParameter::MultiProngTauSolver::solveByRotation(), and theta().

Referenced by fit(), and SolveAmbiguityAnalyticallywithRot().

◆ SolveAmbiguityAnalyticallywithRot()

TVectorT< double > TauA1NuConstrainedFitter::SolveAmbiguityAnalyticallywithRot ( const TVectorT< double > &  inpar,
unsigned int  ambiguity 
)
staticprivate

Definition at line 290 of file TauA1NuConstrainedFitter.cc.

291  {
292  // Rotate and subsitute \theta_{GJ} with \theta_{GJ}^{Max} - assumes uncertianty on thata and phi of the a1 or small compared to the tau direction.
293  TVectorT<double> outpar(inpar.GetNrows());
294  TLorentzVector a1, nu;
295  double phi(0), theta(0);
296  TVector3 TauDir;
297  CovertParToObjects(inpar, a1, nu, phi, theta, TauDir);
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();
308  outpar(tau_theta) = TauDir.Theta();
309  return SolveAmbiguityAnalytically(outpar, ambiguity);
310 }

References funct::cos(), CovertParToObjects(), mps_fire::i, funct::sin(), SolveAmbiguityAnalytically(), tau_phi, tau_theta, theta(), and tauImpactParameter::MultiProngTauSolver::thetaGJMax().

Referenced by fit().

◆ TauRot()

TVectorT< double > TauA1NuConstrainedFitter::TauRot ( const TVectorT< double > &  inpar)
staticprivate

Definition at line 323 of file TauA1NuConstrainedFitter.cc.

323  {
324  TVectorT<double> outpar(1);
325  TLorentzVector a1, nu;
326  double phi(0), theta(0);
327  TVector3 TauDir;
328  CovertParToObjects(inpar, a1, nu, phi, theta, TauDir);
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);
333  return outpar;
334 }

References CovertParToObjects(), theta(), and tauImpactParameter::MultiProngTauSolver::thetaGJMax().

Referenced by getTauRotationSignificance().

◆ UpdateExpandedPar()

void TauA1NuConstrainedFitter::UpdateExpandedPar ( )
private

Definition at line 164 of file TauA1NuConstrainedFitter.cc.

164  {
165  // assumes changes to a1 correlation to vertex is small
166  if (par.GetNrows() == npar && cov.GetNrows() == npar && exppar.GetNrows() == npar && expcov.GetNrows() == npar)
167  return;
168  for (int i = 0; i < npar; i++) {
169  exppar(i) = par(i);
170  for (int j = 0; j < npar; j++) {
171  expcov(i, j) = cov(i, j);
172  }
173  }
174 }

References cov, expcov, exppar, mps_fire::i, dqmiolumiharvest::j, npar, and par.

Referenced by getMother(), and getRefitDaughters().

Member Data Documentation

◆ ambiguity_

unsigned int tauImpactParameter::TauA1NuConstrainedFitter::ambiguity_
private

Definition at line 61 of file TauA1NuConstrainedFitter.h.

Referenced by fit().

◆ cov

TMatrixTSym<double> tauImpactParameter::TauA1NuConstrainedFitter::cov
private

Definition at line 56 of file TauA1NuConstrainedFitter.h.

Referenced by fit(), TauA1NuConstrainedFitter(), and UpdateExpandedPar().

◆ cov_0

TMatrixTSym<double> tauImpactParameter::TauA1NuConstrainedFitter::cov_0
private

◆ expcov

TMatrixTSym<double> tauImpactParameter::TauA1NuConstrainedFitter::expcov
private

◆ exppar

TVectorT<double> tauImpactParameter::TauA1NuConstrainedFitter::exppar
private

◆ par

TVectorT<double> tauImpactParameter::TauA1NuConstrainedFitter::par
private

◆ par_0

TVectorT<double> tauImpactParameter::TauA1NuConstrainedFitter::par_0
private

Definition at line 53 of file TauA1NuConstrainedFitter.h.

Referenced by TauA1NuConstrainedFitter().

◆ particles_

std::vector<LorentzVectorParticle> tauImpactParameter::TauA1NuConstrainedFitter::particles_
private
tauImpactParameter::TauA1NuConstrainedFitter::SolveAmbiguityAnalyticallywithRot
static TVectorT< double > SolveAmbiguityAnalyticallywithRot(const TVectorT< double > &inpar, unsigned int ambiguity)
Definition: TauA1NuConstrainedFitter.cc:290
tauImpactParameter::TauA1NuConstrainedFitter::tau_phi
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::nu_px
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::exppar
TVectorT< double > exppar
Definition: TauA1NuConstrainedFitter.h:58
tauImpactParameter::TauA1NuConstrainedFitter::a1_vx
Definition: TauA1NuConstrainedFitter.h:30
tauImpactParameter::TauA1NuConstrainedFitter::nexpandedpar
Definition: TauA1NuConstrainedFitter.h:30
mps_fire.i
i
Definition: mps_fire.py:428
tauImpactParameter::MultiProngTauSolver::thetaGJMax
static double thetaGJMax(const TLorentzVector &a1)
Definition: MultiProngTauSolver.cc:126
tauImpactParameter::LorentzVectorParticle
Definition: LorentzVectorParticle.h:17
amb
double amb
Definition: hdecay.h:21
tauImpactParameter::MultiProngTauSolver::solveByRotation
static void solveByRotation(const TVector3 &TauDir, const TLorentzVector &A1, TLorentzVector &Tau_plus, TLorentzVector &Tau_minus, TLorentzVector &nu_plus, TLorentzVector &nu_minus, bool &isReal, bool rotateback=true)
Definition: MultiProngTauSolver.cc:64
tauImpactParameter::TauA1NuConstrainedFitter::cov
TMatrixTSym< double > cov
Definition: TauA1NuConstrainedFitter.h:56
tauImpactParameter::TauA1NuConstrainedFitter::TauRot
static TVectorT< double > TauRot(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:323
L1TRate_Offline_cfi.Tau
Tau
Definition: L1TRate_Offline_cfi.py:43
tauImpactParameter::LorentzVectorParticle::py
Definition: LorentzVectorParticle.h:24
tauImpactParameter::TauA1NuConstrainedFitter::a1_py
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::a1_px
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::par
TVectorT< double > par
Definition: TauA1NuConstrainedFitter.h:54
tauImpactParameter::TauA1NuConstrainedFitter::CovertParToObjects
static void CovertParToObjects(const TVectorD &v, TLorentzVector &a1, TLorentzVector &nu, double &phi, double &theta, TVector3 &TauDir)
Definition: TauA1NuConstrainedFitter.cc:209
tauImpactParameter::PDGInfo::tau_minus
Definition: PDGInfo.h:22
tauImpactParameter::ErrorMatrixPropagator::propagateError
static TMatrixTSym< double > propagateError(std::function< TVectorT< double >(const TVectorT< double > &)> f, const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)
Definition: ErrorMatrixPropagator.cc:12
tauImpactParameter::TauA1NuConstrainedFitter::npar
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::ComputeNuLorentzVectorPar
static TVectorT< double > ComputeNuLorentzVectorPar(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:111
findQualityFiles.v
v
Definition: findQualityFiles.py:179
tauImpactParameter::TauA1NuConstrainedFitter::nu_pz
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::particles_
std::vector< LorentzVectorParticle > particles_
Definition: TauA1NuConstrainedFitter.h:60
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
tauImpactParameter::MultiProngTauSolver::minus
Definition: MultiProngTauSolver.h:19
tauImpactParameter::TauA1NuConstrainedFitter::SolveAmbiguityAnalytically
static TVectorT< double > SolveAmbiguityAnalytically(const TVectorT< double > &inpar, unsigned int ambiguity)
Definition: TauA1NuConstrainedFitter.cc:265
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
tauImpactParameter::TauA1NuConstrainedFitter::a1_m
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::TauA1NuConstrainedFitter::ComputeExpParToPar
static TVectorT< double > ComputeExpParToPar(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:103
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
pfDeepBoostedJetPreprocessParams_cfi.sv
sv
Definition: pfDeepBoostedJetPreprocessParams_cfi.py:352
tauImpactParameter::TauA1NuConstrainedFitter::par_0
TVectorT< double > par_0
Definition: TauA1NuConstrainedFitter.h:53
theta
Geom::Theta< T > theta() const
Definition: Basic3DVectorLD.h:150
b
double b
Definition: hdecay.h:118
tauImpactParameter::TauA1NuConstrainedFitter::UpdateExpandedPar
void UpdateExpandedPar()
Definition: TauA1NuConstrainedFitter.cc:164
tauImpactParameter::TauA1NuConstrainedFitter::tau_theta
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::LorentzVectorParticle::m
Definition: LorentzVectorParticle.h:26
tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar
Definition: LorentzVectorParticle.h:27
PVValHelper::phi
Definition: PVValidationHelpers.h:68
tauImpactParameter::LorentzVectorParticle::pz
Definition: LorentzVectorParticle.h:25
tauImpactParameter::LorentzVectorParticle::NVertex
Definition: LorentzVectorParticle.h:32
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
tauImpactParameter::LorentzVectorParticle::px
Definition: LorentzVectorParticle.h:23
tauImpactParameter::MultiProngTauSolver::MultiProngTauSolver
MultiProngTauSolver()
Definition: MultiProngTauSolver.h:22
EgammaValidation_cff.pdgId
pdgId
Definition: EgammaValidation_cff.py:118
tauImpactParameter::TauA1NuConstrainedFitter::a1_vy
Definition: TauA1NuConstrainedFitter.h:30
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
tauImpactParameter::TauA1NuConstrainedFitter::ambiguity_
unsigned int ambiguity_
Definition: TauA1NuConstrainedFitter.h:61
tauImpactParameter::LorentzVectorParticle::parameter
double parameter(int i) const override
Definition: LorentzVectorParticle.h:40
tauImpactParameter::TauA1NuConstrainedFitter::norigpar
Definition: TauA1NuConstrainedFitter.h:31
tauImpactParameter::Particle::covariance
virtual double covariance(int i, int j) const
Definition: Particle.h:24
tauImpactParameter::TauA1NuConstrainedFitter::ComputeInitalExpPar
static TVectorT< double > ComputeInitalExpPar(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:79
tauImpactParameter::LorentzVectorParticle::vx
Definition: LorentzVectorParticle.h:20
tauImpactParameter::TauA1NuConstrainedFitter::nu_py
Definition: TauA1NuConstrainedFitter.h:29
tauImpactParameter::LorentzVectorParticle::vy
Definition: LorentzVectorParticle.h:21
tauImpactParameter::TauA1NuConstrainedFitter::ComputeMotherLorentzVectorPar
static TVectorT< double > ComputeMotherLorentzVectorPar(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:135
TtFullLepDaughter::Nu
static const std::string Nu
Definition: TtFullLeptonicEvent.h:9
tauImpactParameter::Particle::bField
virtual double bField() const
Definition: Particle.h:29
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
tauImpactParameter::TauA1NuConstrainedFitter::cov_0
TMatrixTSym< double > cov_0
Definition: TauA1NuConstrainedFitter.h:55
tauImpactParameter::TauA1NuConstrainedFitter::ComputeA1LorentzVectorPar
static TVectorT< double > ComputeA1LorentzVectorPar(const TVectorT< double > &inpar)
Definition: TauA1NuConstrainedFitter.cc:123
tauImpactParameter::TauA1NuConstrainedFitter::a1_pz
Definition: TauA1NuConstrainedFitter.h:29
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
tauImpactParameter::MultiProngTauSolver::zero
Definition: MultiProngTauSolver.h:19
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
tauImpactParameter::TauA1NuConstrainedFitter::expcov
TMatrixTSym< double > expcov
Definition: TauA1NuConstrainedFitter.h:59
tauImpactParameter::LorentzVectorParticle::vz
Definition: LorentzVectorParticle.h:22
tauImpactParameter::PDGInfo::nu_tau
Definition: PDGInfo.h:24
tauImpactParameter::TauA1NuConstrainedFitter::a1_vz
Definition: TauA1NuConstrainedFitter.h:30
tauImpactParameter::MultiProngTauSolver::plus
Definition: MultiProngTauSolver.h:19
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443