CMS 3D CMS Logo

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

#include <ParticleBuilder.h>

Public Types

enum  CMSSWPerigee {
  aCurv = 0, aTheta, aPhi, aTip,
  aLip
}
 

Public Member Functions

 ParticleBuilder ()
 
 ~ParticleBuilder ()
 

Static Public Member Functions

static LorentzVectorParticle createLorentzVectorParticle (const reco::TransientTrack &transTrk, const reco::Vertex &V, bool fromPerigee, bool useTrackHelixPropagation)
 
static TrackParticle createTrackParticle (const reco::TransientTrack &transTrk, const GlobalPoint &p, bool fromPerigee=true, bool useTrackHelixPropogation=true)
 
static reco::Vertex getVertex (const LorentzVectorParticle &p)
 

Static Private Member Functions

static TVectorT< double > convertCMSSWTrackParToSFTrackPar (const TVectorT< double > &inpar)
 
static TVectorT< double > convertCMSSWTrackPerigeeToSFTrackPar (const TVectorT< double > &inpar)
 

Detailed Description

Definition at line 25 of file ParticleBuilder.h.

Member Enumeration Documentation

◆ CMSSWPerigee

Enumerator
aCurv 
aTheta 
aPhi 
aTip 
aLip 

Definition at line 27 of file ParticleBuilder.h.

27 { aCurv = 0, aTheta, aPhi, aTip, aLip };

Constructor & Destructor Documentation

◆ ParticleBuilder()

tauImpactParameter::ParticleBuilder::ParticleBuilder ( )
inline

Definition at line 29 of file ParticleBuilder.h.

29 {};

◆ ~ParticleBuilder()

tauImpactParameter::ParticleBuilder::~ParticleBuilder ( )
inline

Definition at line 30 of file ParticleBuilder.h.

30 {};

Member Function Documentation

◆ convertCMSSWTrackParToSFTrackPar()

TVectorT< double > ParticleBuilder::convertCMSSWTrackParToSFTrackPar ( const TVectorT< double > &  inpar)
staticprivate

◆ convertCMSSWTrackPerigeeToSFTrackPar()

TVectorT< double > ParticleBuilder::convertCMSSWTrackPerigeeToSFTrackPar ( const TVectorT< double > &  inpar)
staticprivate

◆ createLorentzVectorParticle()

LorentzVectorParticle ParticleBuilder::createLorentzVectorParticle ( const reco::TransientTrack transTrk,
const reco::Vertex V,
bool  fromPerigee,
bool  useTrackHelixPropagation 
)
static

Definition at line 19 of file ParticleBuilder.cc.

22  {
23  GlobalPoint p(V.position().x(), V.position().y(), V.position().z());
24  TrackParticle tp = createTrackParticle(transTrk, p, fromPerigee, useTrackHelixPropagation);
25 
26  int N =
28  TVectorT<double> par(N);
29  par(TrackHelixVertexFitter::x0) = V.position().x();
30  par(TrackHelixVertexFitter::y0) = V.position().y();
31  par(TrackHelixVertexFitter::z0) = V.position().z();
37 
38  TMatrixTSym<double> parcov(N);
39  for (int i = 0; i < TrackHelixVertexFitter::NFreeVertexPar; i++) {
40  for (int j = 0; j < TrackHelixVertexFitter::NFreeVertexPar; j++) {
41  parcov(i, j) = V.covariance(i, j);
42  }
43  }
50 
51  TVectorT<double> LVPar = TrackHelixVertexFitter::computeLorentzVectorPar(par);
52  TMatrixTSym<double> LVCov =
54  return LorentzVectorParticle(LVPar, LVCov, tp.pdgId(), tp.charge(), tp.bField());
55 }

References tauImpactParameter::TrackHelixVertexFitter::BField0, tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar(), createTrackParticle(), mps_fire::i, dqmiolumiharvest::j, tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackHelixVertexFitter::kappa0, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackHelixVertexFitter::lambda0, tauImpactParameter::TrackHelixVertexFitter::MassOffSet, N, tauImpactParameter::TrackHelixVertexFitter::NExtraPar, tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar, tauImpactParameter::TrackHelixVertexFitter::NFreeVertexPar, AlCaHLTBitMon_ParallelJobs::p, tauImpactParameter::TrackParticle::phi, tauImpactParameter::TrackHelixVertexFitter::phi0, tauImpactParameter::ErrorMatrixPropagator::propagateError(), cmsswSequenceInfo::tp, cms::cuda::V, tauImpactParameter::TrackHelixVertexFitter::x0, tauImpactParameter::TrackHelixVertexFitter::y0, and tauImpactParameter::TrackHelixVertexFitter::z0.

◆ createTrackParticle()

TrackParticle ParticleBuilder::createTrackParticle ( const reco::TransientTrack transTrk,
const GlobalPoint p,
bool  fromPerigee = true,
bool  useTrackHelixPropogation = true 
)
static

Definition at line 57 of file ParticleBuilder.cc.

60  {
61  // Configured for CMSSW Tracks only
62  TVectorT<double> par(TrackParticle::NHelixPar + 1);
63  TMatrixTSym<double> cov(TrackParticle::NHelixPar + 1);
64  TVectorT<double> SFpar(TrackParticle::NHelixPar);
65  TMatrixTSym<double> SFcov(TrackParticle::NHelixPar);
66  if (!fromPerigee) {
67  for (int i = 0; i < TrackParticle::NHelixPar; i++) {
68  par(i) = transTrk.track().parameter(i);
69  for (int j = 0; j < TrackParticle::NHelixPar; j++) {
70  cov(i, j) = transTrk.track().covariance(i, j);
71  }
72  }
73  par(TrackParticle::NHelixPar) = transTrk.field()->inInverseGeV(p).z();
76  } else {
77  GlobalPoint TrackIPPos = transTrk.impactPointTSCP().position();
78  //GlobalPoint TrackIPOrigin=transTrk.impactPointTSCP().referencePoint();
79  GlobalPoint origin(0.0, 0.0, 0.0);
80  for (int i = 0; i < TrackParticle::NHelixPar; i++) {
81  par(i) = transTrk.trajectoryStateClosestToPoint(origin).perigeeParameters().vector()(i);
82  for (int j = 0; j < TrackParticle::NHelixPar; j++) {
83  cov(i, j) = transTrk.trajectoryStateClosestToPoint(origin).perigeeError().covarianceMatrix()(i, j);
84  }
85  }
86  par(TrackParticle::NHelixPar) = transTrk.field()->inInverseGeV(p).z();
89  if (useTrackHelixPropagation) {
91  // correct dxy dz neglecting material and radiative corrections
92 
93  LogDebug("RecoTauImpactParameterParticleBuilder")
94  << "Offical CMS dxy - " << par(TrackParticle::dxy) << " dz " << par(TrackParticle::dz) << " kappa "
96  LogDebug("RecoTauImpactParameterParticleBuilder")
97  << "Offical CMS dxy - SimpleFits Format" << SFpar(TrackParticle::dxy) << " dz " << SFpar(TrackParticle::dz)
98  << " kappa " << SFpar(reco::TrackBase::i_qoverp);
99 
100  double x, y, z, dxy, dz, s, kappa, lambda, phi;
101  TVectorT<double> freehelix(TrackHelixVertexFitter::NFreeTrackPar);
102  freehelix(TrackHelixVertexFitter::x0) = TrackIPPos.x();
103  freehelix(TrackHelixVertexFitter::y0) = TrackIPPos.y();
104  freehelix(TrackHelixVertexFitter::z0) = TrackIPPos.z();
108  TrackHelixVertexFitter::computedxydz(freehelix, 0, kappa, lambda, phi, x, y, z, s, dxy, dz);
109  SFpar(TrackParticle::dxy) = dxy;
110  SFpar(TrackParticle::dz) = dz;
111  LogDebug("RecoTauImpactParameterParticleBuilder") << "Found values dxy " << dxy << " dz " << dz;
112  //exit(0);
114  }
115  }
116 
117  PDGInfo pdgInfo;
118  double c = transTrk.charge();
119  return TrackParticle(
120  SFpar, SFcov, abs(PdtPdgMini::pi_plus) * c, pdgInfo.pi_mass(), c, transTrk.field()->inInverseGeV(p).z());
121 }

References funct::abs(), c, reco::TransientTrack::charge(), tauImpactParameter::TrackHelixVertexFitter::computedxydz(), convertCMSSWTrackParToSFTrackPar(), convertCMSSWTrackPerigeeToSFTrackPar(), reco::TrackBase::covariance(), PerigeeTrajectoryError::covarianceMatrix(), tauImpactParameter::TrackParticle::dxy, PVValHelper::dxy, tauImpactParameter::TrackParticle::dz, PVValHelper::dz, reco::TransientTrack::field(), mps_fire::i, reco::TrackBase::i_qoverp, reco::TransientTrack::impactPointTSCP(), MagneticField::inInverseGeV(), dqmiolumiharvest::j, tauImpactParameter::TrackParticle::kappa, kappa, tauImpactParameter::TrackHelixVertexFitter::kappa0, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackHelixVertexFitter::lambda0, LogDebug, tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar, tauImpactParameter::TrackParticle::NHelixPar, AlCaHLTBitMon_ParallelJobs::p, reco::TrackBase::parameter(), TrajectoryStateClosestToPoint::perigeeError(), TrajectoryStateClosestToPoint::perigeeParameters(), tauImpactParameter::TrackParticle::phi, tauImpactParameter::TrackHelixVertexFitter::phi0, tauImpactParameter::PDGInfo::pi_mass(), PdtPdgMini::pi_plus, TrajectoryStateClosestToPoint::position(), tauImpactParameter::ErrorMatrixPropagator::propagateError(), alignCSCRings::s, reco::TransientTrack::track(), reco::TransientTrack::trajectoryStateClosestToPoint(), PerigeeTrajectoryParameters::vector(), PV3DBase< T, PVType, FrameType >::x(), tauImpactParameter::TrackHelixVertexFitter::x0, PV3DBase< T, PVType, FrameType >::y(), tauImpactParameter::TrackHelixVertexFitter::y0, PV3DBase< T, PVType, FrameType >::z(), and tauImpactParameter::TrackHelixVertexFitter::z0.

Referenced by createLorentzVectorParticle().

◆ getVertex()

reco::Vertex ParticleBuilder::getVertex ( const LorentzVectorParticle p)
static

Definition at line 123 of file ParticleBuilder.cc.

123  {
124  TVector3 v = p.vertex();
125  TMatrixTSym<double> vcov = p.vertexCov();
126  reco::Vertex::Point vp(v.X(), v.Y(), v.Z());
128  for (int i = 0; i < vcov.GetNrows(); i++) {
129  for (int j = 0; j < vcov.GetNrows(); j++) {
130  ve(i, j) = vcov(i, j);
131  }
132  }
133  return reco::Vertex(vp, ve);
134 }

References mps_fire::i, dqmiolumiharvest::j, AlCaHLTBitMon_ParallelJobs::p, findQualityFiles::v, and HltBtagValidation_cff::Vertex.

cms::cuda::V
cudaStream_t T uint32_t const T *__restrict__ const uint32_t *__restrict__ uint32_t int cudaStream_t V
Definition: HistoContainer.h:99
mps_fire.i
i
Definition: mps_fire.py:428
tauImpactParameter::TrackHelixVertexFitter::kappa0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::LorentzVectorParticle
Definition: LorentzVectorParticle.h:17
tauImpactParameter::ParticleBuilder::aTip
Definition: ParticleBuilder.h:27
detailsBasic3DVector::z
float float float z
Definition: extBasic3DVector.h:14
PV3DBase::x
T x() const
Definition: PV3DBase.h:59
tauImpactParameter::TrackParticle::phi
Definition: TrackParticle.h:17
PdtPdgMini::pi_plus
Definition: PdtPdgMini.h:56
reco::TrackBase::i_phi
Definition: TrackBase.h:83
reco::Vertex::Error
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:44
reco::TransientTrack::charge
TrackCharge charge() const
Definition: TransientTrack.h:102
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
reco::TrackBase::i_dxy
Definition: TrackBase.h:83
tauImpactParameter::TrackHelixVertexFitter::NFreeVertexPar
Definition: TrackHelixVertexFitter.h:26
tauImpactParameter::TrackHelixVertexFitter::x0
Definition: TrackHelixVertexFitter.h:26
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
findQualityFiles.v
v
Definition: findQualityFiles.py:179
tauImpactParameter::TrackParticle::dxy
Definition: TrackParticle.h:17
tauImpactParameter::TrackHelixVertexFitter::phi0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::TrackHelixVertexFitter::NExtraPar
Definition: TrackHelixVertexFitter.h:28
reco::TrackBase::i_dsz
Definition: TrackBase.h:83
tauImpactParameter::TrackParticle::kappa
Definition: TrackParticle.h:17
PV3DBase::z
T z() const
Definition: PV3DBase.h:61
reco::TrackBase::parameter
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
Definition: TrackBase.h:723
alignCSCRings.s
s
Definition: alignCSCRings.py:92
reco::TrackBase::i_qoverp
Definition: TrackBase.h:83
tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
Definition: TrackHelixVertexFitter.cc:213
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
tauImpactParameter::TrackParticle::NHelixPar
Definition: TrackParticle.h:17
tauImpactParameter::ParticleBuilder::aLip
Definition: ParticleBuilder.h:27
tauImpactParameter::TrackHelixVertexFitter::BField0
Definition: TrackHelixVertexFitter.h:28
TrajectoryStateClosestToPoint::position
GlobalPoint position() const
Definition: TrajectoryStateClosestToPoint.h:90
tauImpactParameter::PDGInfo
Definition: PDGInfo.h:11
N
#define N
Definition: blowfish.cc:9
tauImpactParameter::TrackHelixVertexFitter::lambda0
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::ParticleBuilder::aTheta
Definition: ParticleBuilder.h:27
TrajectoryStateClosestToPoint::perigeeError
const PerigeeTrajectoryError & perigeeError() const
Definition: TrajectoryStateClosestToPoint.h:84
reco::TrackBase::covariance
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:716
Point3DBase< float, GlobalTag >
TrajectoryStateClosestToPoint::perigeeParameters
const PerigeeTrajectoryParameters & perigeeParameters() const
Definition: TrajectoryStateClosestToPoint.h:73
cmsswSequenceInfo.tp
tp
Definition: cmsswSequenceInfo.py:17
MagneticField::inInverseGeV
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:36
reco::TrackBase::i_lambda
Definition: TrackBase.h:83
reco::TransientTrack::impactPointTSCP
TrajectoryStateClosestToPoint impactPointTSCP() const
Definition: TransientTrack.h:96
reco::TransientTrack::trajectoryStateClosestToPoint
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
Definition: TransientTrack.h:90
tauImpactParameter::TrackParticle::dz
Definition: TrackParticle.h:17
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
PVValHelper::phi
Definition: PVValidationHelpers.h:69
tauImpactParameter::TrackParticle::lambda
Definition: TrackParticle.h:17
tauImpactParameter::ParticleBuilder::convertCMSSWTrackPerigeeToSFTrackPar
static TVectorT< double > convertCMSSWTrackPerigeeToSFTrackPar(const TVectorT< double > &inpar)
Definition: ParticleBuilder.cc:147
tauImpactParameter::PDGInfo::pi_mass
static double pi_mass()
Definition: PDGInfo.h:13
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
PerigeeTrajectoryParameters::vector
const AlgebraicVector5 & vector() const
Definition: PerigeeTrajectoryParameters.h:82
tauImpactParameter::TrackParticle
Definition: TrackParticle.h:15
tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar
Definition: TrackHelixVertexFitter.h:27
tauImpactParameter::ParticleBuilder::createTrackParticle
static TrackParticle createTrackParticle(const reco::TransientTrack &transTrk, const GlobalPoint &p, bool fromPerigee=true, bool useTrackHelixPropogation=true)
Definition: ParticleBuilder.cc:57
reco::TransientTrack::field
const MagneticField * field() const
Definition: TransientTrack.h:110
PerigeeTrajectoryError::covarianceMatrix
const AlgebraicSymMatrix55 & covarianceMatrix() const
Definition: PerigeeTrajectoryError.h:29
tauImpactParameter::TrackHelixVertexFitter::MassOffSet
Definition: TrackHelixVertexFitter.h:28
reco::Vertex::Point
math::XYZPoint Point
point in the space
Definition: Vertex.h:40
tauImpactParameter::TrackHelixVertexFitter::computedxydz
static void computedxydz(const TVectorT< double > &inpar, int particle, double &kappa, double &lam, double &phi, double &x, double &y, double &z, double &s, double &dxy, double &dz)
Definition: TrackHelixVertexFitter.cc:157
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
reco::TransientTrack::track
const Track & track() const
Definition: TransientTrack.h:117
PVValHelper::dxy
Definition: PVValidationHelpers.h:48
PVValHelper::dz
Definition: PVValidationHelpers.h:51
tauImpactParameter::ParticleBuilder::aCurv
Definition: ParticleBuilder.h:27
genVertex_cff.x
x
Definition: genVertex_cff.py:12
detailsBasic3DVector::y
float float y
Definition: extBasic3DVector.h:14
tauImpactParameter::ParticleBuilder::aPhi
Definition: ParticleBuilder.h:27
tauImpactParameter::ParticleBuilder::convertCMSSWTrackParToSFTrackPar
static TVectorT< double > convertCMSSWTrackParToSFTrackPar(const TVectorT< double > &inpar)
Definition: ParticleBuilder.cc:136
tauImpactParameter::TrackHelixVertexFitter::y0
Definition: TrackHelixVertexFitter.h:26
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
tauImpactParameter::TrackHelixVertexFitter::z0
Definition: TrackHelixVertexFitter.h:26
kappa
static const G4double kappa
Definition: UrbanMscModel93.cc:35
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66