CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

Constructor & Destructor Documentation

tauImpactParameter::ParticleBuilder::ParticleBuilder ( )
inline

Definition at line 29 of file ParticleBuilder.h.

29 {};
tauImpactParameter::ParticleBuilder::~ParticleBuilder ( )
inline

Definition at line 30 of file ParticleBuilder.h.

30 {};

Member Function Documentation

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

Definition at line 123 of file ParticleBuilder.cc.

References funct::cos(), tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, reco::TrackBase::i_dsz, reco::TrackBase::i_dxy, reco::TrackBase::i_lambda, reco::TrackBase::i_phi, reco::TrackBase::i_qoverp, tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackParticle::NHelixPar, and tauImpactParameter::TrackParticle::phi.

Referenced by createTrackParticle().

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

Definition at line 133 of file ParticleBuilder.cc.

References aCurv, aLip, aPhi, aTheta, aTip, tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackParticle::NHelixPar, tauImpactParameter::TrackParticle::phi, and Pi.

Referenced by createTrackParticle().

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

Definition at line 18 of file ParticleBuilder.cc.

References tauImpactParameter::TrackHelixVertexFitter::BField0, tauImpactParameter::TrackHelixVertexFitter::computeLorentzVectorPar(), reco::Vertex::covariance(), createTrackParticle(), i, 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, reco::Vertex::position(), tauImpactParameter::ErrorMatrixPropagator::propagateError(), tauImpactParameter::TrackHelixVertexFitter::x0, tauImpactParameter::TrackHelixVertexFitter::y0, and tauImpactParameter::TrackHelixVertexFitter::z0.

19  {
20  GlobalPoint p(V.position().x(),V.position().y(),V.position().z());
21  TrackParticle tp=createTrackParticle(transTrk,p,fromPerigee,useTrackHelixPropagation);
22 
24  TVectorT<double> par(N);
31  par(TrackHelixVertexFitter::NFreeTrackPar+TrackHelixVertexFitter::MassOffSet)=tp.mass();
33 
34  TMatrixTSym<double> parcov(N);
37  parcov(i,j)=V.covariance(i,j);
38  }
39  }
43 
44  TVectorT<double> LVPar=TrackHelixVertexFitter::computeLorentzVectorPar(par);
46  return LorentzVectorParticle(LVPar,LVCov,tp.pdgId(),tp.charge(),tp.bField());
47 }
int i
Definition: DBlmapReader.cc:9
double covariance(int i, int j) const
(i, j)-th element of error matrix, i, j = 0, ... 2
Definition: Vertex.h:109
const Point & position() const
position
Definition: Vertex.h:92
static TVectorT< double > computeLorentzVectorPar(const TVectorT< double > &inpar)
int j
Definition: DBlmapReader.cc:9
static TMatrixTSym< double > propagateError(TVectorT< double >(*f)(const TVectorT< double > &par), const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)
#define N
Definition: blowfish.cc:9
static TrackParticle createTrackParticle(const reco::TransientTrack &transTrk, const GlobalPoint &p, bool fromPerigee=true, bool useTrackHelixPropogation=true)
TrackParticle ParticleBuilder::createTrackParticle ( const reco::TransientTrack transTrk,
const GlobalPoint p,
bool  fromPerigee = true,
bool  useTrackHelixPropogation = true 
)
static

Definition at line 49 of file ParticleBuilder.cc.

References funct::abs(), trackerHits::c, reco::TransientTrack::charge(), tauImpactParameter::TrackHelixVertexFitter::computedxydz(), convertCMSSWTrackParToSFTrackPar(), convertCMSSWTrackPerigeeToSFTrackPar(), reco::TrackBase::covariance(), PerigeeTrajectoryError::covarianceMatrix(), tauImpactParameter::TrackParticle::dxy, tauImpactParameter::TrackParticle::dz, reco::TransientTrack::field(), i, reco::TransientTrack::impactPointTSCP(), MagneticField::inInverseGeV(), j, tauImpactParameter::TrackParticle::kappa, tauImpactParameter::TrackHelixVertexFitter::kappa0, tauImpactParameter::TrackParticle::lambda, tauImpactParameter::TrackHelixVertexFitter::lambda0, tauImpactParameter::TrackHelixVertexFitter::NFreeTrackPar, tauImpactParameter::TrackParticle::NHelixPar, reco::TrackBase::parameter(), TrajectoryStateClosestToPoint::perigeeError(), TrajectoryStateClosestToPoint::perigeeParameters(), phi, 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(), x, PV3DBase< T, PVType, FrameType >::x(), tauImpactParameter::TrackHelixVertexFitter::x0, detailsBasic3DVector::y, PV3DBase< T, PVType, FrameType >::y(), tauImpactParameter::TrackHelixVertexFitter::y0, detailsBasic3DVector::z, PV3DBase< T, PVType, FrameType >::z(), and tauImpactParameter::TrackHelixVertexFitter::z0.

Referenced by createLorentzVectorParticle().

50  {
51  // Configured for CMSSW Tracks only
52  TVectorT<double> par(TrackParticle::NHelixPar+1);
53  TMatrixTSym<double> cov(TrackParticle::NHelixPar+1);
54  TVectorT<double> SFpar(TrackParticle::NHelixPar);
55  TMatrixTSym<double> SFcov(TrackParticle::NHelixPar);
56  if(!fromPerigee){
57  for(int i=0;i<TrackParticle::NHelixPar;i++){
58  par(i)=transTrk.track().parameter(i);
59  for(int j=0;j<TrackParticle::NHelixPar;j++){
60  cov(i,j)=transTrk.track().covariance(i,j);
61  }
62  }
63  par(TrackParticle::NHelixPar)=transTrk.field()->inInverseGeV(p).z();
66  }
67  else{
68  GlobalPoint TrackIPPos=transTrk.impactPointTSCP().position();
69  //GlobalPoint TrackIPOrigin=transTrk.impactPointTSCP().referencePoint();
70  GlobalPoint origin(0.0,0.0,0.0);
71  for(int i=0;i<TrackParticle::NHelixPar;i++){
72  par(i)=transTrk.trajectoryStateClosestToPoint(origin).perigeeParameters().vector()(i);
73  for(int j=0;j<TrackParticle::NHelixPar;j++){
75  }
76  }
77  par(TrackParticle::NHelixPar)=transTrk.field()->inInverseGeV(p).z();
80  if(useTrackHelixPropagation){
82  // correct dxy dz neglecting material and radiative corrections
83  /*
84  std::cout << "Offical CMS dxy - " << par(TrackParticle::dxy) << " dz " << par(TrackParticle::dz)
85  << " kappa " << track->qoverp() << " " << par(reco::TrackBase::i_qoverp) << std::endl;
86  std::cout << "Offical CMS dxy - SimpleFits Format" << SFpar(TrackParticle::dxy) << " dz " << SFpar(TrackParticle::dz)
87  << " kappa " << track->qoverp() << " " << SFpar(reco::TrackBase::i_qoverp) << std::endl;
88  std::cout << "x " << TrackIPOrigin.x() << " y " << TrackIPOrigin.y() << " z " << TrackIPOrigin.z() << std::endl;
89  */
90  double x,y,z,dxy,dz,s,kappa,lambda,phi;
91  TVectorT<double> freehelix(TrackHelixVertexFitter::NFreeTrackPar);
92  freehelix(TrackHelixVertexFitter::x0)=TrackIPPos.x();
93  freehelix(TrackHelixVertexFitter::y0)=TrackIPPos.y();
94  freehelix(TrackHelixVertexFitter::z0)=TrackIPPos.z();
98  TrackHelixVertexFitter::computedxydz(freehelix,0,kappa,lambda,phi,x,y,z,s,dxy,dz);
99  SFpar(TrackParticle::dxy) = dxy;
100  SFpar(TrackParticle::dz) = dz;
101  //std::cout << "Found values dxy " << dxy << " dz " << dz << std::endl;
102  //exit(0);
104  }
105  }
106 
107  PDGInfo pdgInfo;
108  double c=transTrk.charge();
109  return TrackParticle(SFpar,SFcov,abs(PdtPdgMini::pi_plus)*c,pdgInfo.pi_mass(),c,transTrk.field()->inInverseGeV(p).z());
110 }
const AlgebraicVector5 & vector() const
int i
Definition: DBlmapReader.cc:9
const PerigeeTrajectoryError & perigeeError() const
TrajectoryStateClosestToPoint impactPointTSCP() const
T y() const
Definition: PV3DBase.h:63
const MagneticField * field() const
static TVectorT< double > convertCMSSWTrackPerigeeToSFTrackPar(const TVectorT< double > &inpar)
float float float z
CovarianceMatrix covariance() const
return track covariance matrix
Definition: TrackBase.h:180
GlobalVector inInverseGeV(const GlobalPoint &gp) const
Field value ad specified global point, in 1/Gev.
Definition: MagneticField.h:39
TrackCharge charge() const
const PerigeeTrajectoryParameters & perigeeParameters() const
T z() const
Definition: PV3DBase.h:64
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
static TMatrixTSym< double > propagateError(TVectorT< double >(*f)(const TVectorT< double > &par), const TVectorT< double > &inPar, TMatrixTSym< double > &inCov, double epsilon=0.001, double errorEpsilonRatio=1000)
static double pi_mass()
Definition: PDGInfo.h:13
const AlgebraicSymMatrix55 & covarianceMatrix() const
double parameter(int i) const
i-th parameter ( i = 0, ... 4 )
Definition: TrackBase.h:183
const Track & track() const
TrajectoryStateClosestToPoint trajectoryStateClosestToPoint(const GlobalPoint &point) const
static TVectorT< double > convertCMSSWTrackParToSFTrackPar(const TVectorT< double > &inpar)
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: DDAxes.h:10
T x() const
Definition: PV3DBase.h:62
Definition: DDAxes.h:10
reco::Vertex ParticleBuilder::getVertex ( const LorentzVectorParticle p)
static

Definition at line 112 of file ParticleBuilder.cc.

References i, j, findQualityFiles::v, tauImpactParameter::LorentzVectorParticle::vertex(), and tauImpactParameter::LorentzVectorParticle::vertexCov().

112  {
113  TVector3 v=p.vertex();
114  TMatrixTSym<double> vcov=p.vertexCov();
115  reco::Vertex::Point vp(v.X(),v.Y(),v.Z());
117  for(int i=0;i<vcov.GetNrows();i++){
118  for(int j=0;j<vcov.GetNrows();j++){ve(i,j)=vcov(i,j);}
119  }
120  return reco::Vertex(vp,ve);
121 }
TMatrixTSym< double > vertexCov() const
int i
Definition: DBlmapReader.cc:9
math::Error< dimension >::type Error
covariance error matrix (3x3)
Definition: Vertex.h:43
int j
Definition: DBlmapReader.cc:9
math::XYZPoint Point
point in the space
Definition: Vertex.h:39