CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions
tauImpactParameter::LorentzVectorParticle Class Reference

#include <LorentzVectorParticle.h>

Inheritance diagram for tauImpactParameter::LorentzVectorParticle:
tauImpactParameter::Particle

Public Types

enum  LorentzandVectorPar {
  vx = 0, vy, vz, px,
  py, pz, m, NLorentzandVertexPar,
  E = -1, p = -2, pt = -3
}
 
enum  VertexInfo { NVertex = 3 }
 

Public Member Functions

 LorentzVectorParticle ()
 
 LorentzVectorParticle (const TVectorT< double > &par, const TMatrixTSym< double > &cov, int pdgid, double charge, double b)
 
double mass () const override
 
int nParameters () const override
 
TLorentzVector p4 () const
 
double parameter (int i) const override
 
TVector3 vertex () const
 
TMatrixTSym< double > vertexCov () const
 
 ~LorentzVectorParticle () override
 
- Public Member Functions inherited from tauImpactParameter::Particle
virtual double bField () const
 
virtual double charge () const
 
virtual const TMatrixTSym< double > & covariance () const
 
virtual double covariance (int i, int j) const
 
virtual const TVectorT< double > & parameter () const
 
 Particle (const TVectorT< double > &par, const TMatrixTSym< double > &cov, int pdgid, double charge, double b)
 
virtual int pdgId () const
 
virtual double qB () const
 
virtual ~Particle ()
 

Static Public Member Functions

static TString name (int i)
 

Detailed Description

Definition at line 17 of file LorentzVectorParticle.h.

Member Enumeration Documentation

◆ LorentzandVectorPar

Enumerator
vx 
vy 
vz 
px 
py 
pz 
NLorentzandVertexPar 
pt 

Definition at line 19 of file LorentzVectorParticle.h.

19  {
20  vx = 0,
21  vy,
22  vz,
23  px,
24  py,
25  pz,
26  m,
28  E = -1,
29  p = -2,
30  pt = -3
31  }; // Lorentez+vertex parameters

◆ VertexInfo

Enumerator
NVertex 

Definition at line 32 of file LorentzVectorParticle.h.

32 { NVertex = 3 };

Constructor & Destructor Documentation

◆ LorentzVectorParticle() [1/2]

LorentzVectorParticle::LorentzVectorParticle ( )

Definition at line 5 of file LorentzVectorParticle.cc.

6  : Particle(TVectorT<double>(NLorentzandVertexPar), TMatrixTSym<double>(NLorentzandVertexPar), 0, 0, 0) {}

◆ LorentzVectorParticle() [2/2]

LorentzVectorParticle::LorentzVectorParticle ( const TVectorT< double > &  par,
const TMatrixTSym< double > &  cov,
int  pdgid,
double  charge,
double  b 
)

Definition at line 8 of file LorentzVectorParticle.cc.

10  : Particle(par, cov, pdgid, charge, b) {}

◆ ~LorentzVectorParticle()

tauImpactParameter::LorentzVectorParticle::~LorentzVectorParticle ( )
inlineoverride

Definition at line 36 of file LorentzVectorParticle.h.

36 {};

Member Function Documentation

◆ mass()

double tauImpactParameter::LorentzVectorParticle::mass ( ) const
inlineoverridevirtual

◆ name()

TString LorentzVectorParticle::name ( int  i)
static

Definition at line 12 of file LorentzVectorParticle.cc.

12  {
13  if (i == px)
14  return "px";
15  if (i == py)
16  return "py";
17  if (i == pz)
18  return "pz";
19  if (i == m)
20  return "m";
21  if (i == vx)
22  return "vx";
23  if (i == vy)
24  return "vy";
25  if (i == vz)
26  return "vz";
27  return "invalid";
28 }

References mps_fire::i, m, px, py, pz, vx, vy, and vz.

Referenced by config.CFG::__str__(), and validation.Sample::digest().

◆ nParameters()

int tauImpactParameter::LorentzVectorParticle::nParameters ( ) const
inlineoverridevirtual

Implements tauImpactParameter::Particle.

Definition at line 39 of file LorentzVectorParticle.h.

39 { return NLorentzandVertexPar; }

References NLorentzandVertexPar.

◆ p4()

TLorentzVector tauImpactParameter::LorentzVectorParticle::p4 ( ) const
inline

◆ parameter()

double tauImpactParameter::LorentzVectorParticle::parameter ( int  i) const
inlineoverridevirtual

Reimplemented from tauImpactParameter::Particle.

Definition at line 40 of file LorentzVectorParticle.h.

40  {
41  double particle_px = Particle::parameter(px);
42  double particle_py = Particle::parameter(py);
43  double particle_pz = Particle::parameter(pz);
44  double particle_m = Particle::parameter(m);
45  if (i == E)
46  return sqrt(particle_px * particle_px + particle_py * particle_py + particle_pz * particle_pz +
47  particle_m * particle_m);
48  if (i == p)
49  return sqrt(particle_px * particle_px + particle_py * particle_py + particle_pz * particle_pz);
50  if (i == pt)
51  return sqrt(particle_px * particle_px + particle_py * particle_py);
52  return Particle::parameter(i);
53  }

References E, mps_fire::i, m, p, tauImpactParameter::Particle::parameter(), pt, px, py, pz, and mathSSE::sqrt().

Referenced by tauImpactParameter::MultiProngTauSolver::estimateNu(), and tauImpactParameter::TauA1NuConstrainedFitter::TauA1NuConstrainedFitter().

◆ vertex()

TVector3 tauImpactParameter::LorentzVectorParticle::vertex ( ) const
inline

◆ vertexCov()

TMatrixTSym<double> tauImpactParameter::LorentzVectorParticle::vertexCov ( ) const
inline

Definition at line 57 of file LorentzVectorParticle.h.

57  {
58  TMatrixTSym<double> vcov(NVertex);
59  for (int i = 0; i < NVertex; i++) {
60  for (int j = 0; j < NVertex; j++) {
61  vcov(i, j) = covariance(i, j);
62  }
63  }
64  return vcov;
65  }

References tauImpactParameter::Particle::covariance(), mps_fire::i, dqmiolumiharvest::j, and NVertex.

Referenced by tauImpactParameter::MultiProngTauSolver::estimateNu().

mps_fire.i
i
Definition: mps_fire.py:428
tauImpactParameter::LorentzVectorParticle::py
Definition: LorentzVectorParticle.h:24
tauImpactParameter::Particle::parameter
virtual const TVectorT< double > & parameter() const
Definition: Particle.h:35
tauImpactParameter::LorentzVectorParticle::p
Definition: LorentzVectorParticle.h:29
tauImpactParameter::Particle::covariance
virtual const TMatrixTSym< double > & covariance() const
Definition: Particle.h:36
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
b
double b
Definition: hdecay.h:118
tauImpactParameter::LorentzVectorParticle::pt
Definition: LorentzVectorParticle.h:30
tauImpactParameter::LorentzVectorParticle::m
Definition: LorentzVectorParticle.h:26
tauImpactParameter::LorentzVectorParticle::NLorentzandVertexPar
Definition: LorentzVectorParticle.h:27
tauImpactParameter::LorentzVectorParticle::pz
Definition: LorentzVectorParticle.h:25
tauImpactParameter::Particle::charge
virtual double charge() const
Definition: Particle.h:32
tauImpactParameter::LorentzVectorParticle::NVertex
Definition: LorentzVectorParticle.h:32
tauImpactParameter::LorentzVectorParticle::px
Definition: LorentzVectorParticle.h:23
tauImpactParameter::Particle::Particle
Particle(const TVectorT< double > &par, const TMatrixTSym< double > &cov, int pdgid, double charge, double b)
Definition: Particle.h:15
tauImpactParameter::LorentzVectorParticle::vx
Definition: LorentzVectorParticle.h:20
tauImpactParameter::LorentzVectorParticle::E
Definition: LorentzVectorParticle.h:28
tauImpactParameter::LorentzVectorParticle::vy
Definition: LorentzVectorParticle.h:21
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:29
tauImpactParameter::LorentzVectorParticle::vz
Definition: LorentzVectorParticle.h:22