hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
Loading...
Searching...
No Matches
TrackTools.h
Go to the documentation of this file.
1#ifndef _TRACKTOOLS_
2#define _TRACKTOOLS_
3
4
5#include <EVENT/LCCollection.h>
6#include <EVENT/Track.h>
7#include <EVENT/ReconstructedParticle.h>
8#include <EVENT/Vertex.h>
9#include <EVENT/TrackerHit.h>
10#include <EVENT/TrackState.h>
11#include <EVENT/TrackerRawData.h>
12#include <EVENT/CalorimeterHit.h>
13#include <EVENT/Cluster.h>
14#include <IMPL/CalorimeterHitImpl.h>
15#include <IMPL/LCGenericObjectImpl.h>
16#include <IMPL/TrackerHitImpl.h>
17#include <IMPL/ClusterImpl.h>
18#include <UTIL/LCRelationNavigator.h>
19#include <UTIL/BitField64.h>
20
21
22#include <vector>
23#include <cmath>
24#include <array>
25#include <iostream>
26#include <fstream>
27
28//-----------//
29// hpstr //
30//-----------//
31#include "Collections.h"
32#include "Processor.h"
33#include "Particle.h"
34#include "Track.h"
35#include "Event.h"
36#include "Vertex.h"
37#include "TrackerHit.h"
38
39
40//-----------//
41// ROOT //
42//-----------//
43#include "TRefArray.h"
44#include "TMatrixD.h"
45
46namespace TrackTools {
47
48
55 float normalizeAngle(float angle);
56
63 TMatrixD getTrackCovariance(Track* track);
64
71 TMatrixD getVertexCovariance(Vertex* vtx);
72
89 double px, double py, double pz,
90 double phi0, double omega, double tanLambda,
91 const TMatrixD& covTrack);
92
99 TMatrixD momentumCovarianceFromTrack(Track* track);
100
101
120 std::vector<float> calculateTrackParameters(
121 float x_vtx, float y_vtx, float z_vtx,
122 float px, float py, float pz, float Q,
123 float cB, float targetPos);
124
140 float x_vtx, float y_vtx, float z_vtx,
141 float px, float py, float pz, float Q,
142 float cB, float targetPos);
143
144
161 float x_vtx, float y_vtx, float z_vtx,
162 float px, float py, float pz,
163 const TMatrixD& covVertex,
164 const TMatrixD& covMomentum,
165 float Q, float cB, float targetPos);
166
167
177 const TMatrixD& covVertex,
178 const TMatrixD& covMomentum,
179 const TMatrixD* covCross = nullptr);
180
181 TMatrixD numericalJacobian(
182 float x_vtx, float y_vtx, float z_vtx,
183 float px, float py, float pz,
184 float Q, float cB, float targetPos);
185
186}
187
188#endif //TRACKTOOLS
Class defining methods used to access event information and data collections.
Class used to encapsulate information about a particle.
Base classes for all user event processing components to extend.
Class used to encapsulate track information.
Class used to encapsulate tracker hit information.
Class used to encapsulate Vertex information.
Definition Track.h:32
TMatrixD numericalJacobian(float x_vtx, float y_vtx, float z_vtx, float px, float py, float pz, float Q, float cB, float targetPos)
float normalizeAngle(float angle)
Normalize angle to [-π, π].
Definition TrackTools.cxx:6
std::vector< float > calculateTrackParameters(float x_vtx, float y_vtx, float z_vtx, float px, float py, float pz, float Q, float cB, float targetPos)
Calculate track parameters at target from position and momentum.
TMatrixD getVertexCovariance(Vertex *vtx)
Extract vertex position covariance from Vertex object.
TMatrixD calculateTrackCovariance(float x_vtx, float y_vtx, float z_vtx, float px, float py, float pz, const TMatrixD &covVertex, const TMatrixD &covMomentum, float Q, float cB, float targetPos)
Calculate track parameter covariance from momentum, position.
TMatrixD getTrackCovariance(Track *track)
Extract track parameter covariance matrix from Track object.
TMatrixD momentumCovarianceFromTrack(double px, double py, double pz, double phi0, double omega, double tanLambda, const TMatrixD &covTrack)
Calculate momentum covariance from track parameter covariance.
TMatrixD buildCombinedCovariance(const TMatrixD &covVertex, const TMatrixD &covMomentum, const TMatrixD *covCross=nullptr)
Build combined 6x6 covariance matrix [x,y,z,px,py,pz].
TMatrixD trackParametersJacobian(float x_vtx, float y_vtx, float z_vtx, float px, float py, float pz, float Q, float cB, float targetPos)
Analytical Jacobian: d[d0,phi0,omega,z0,tanLambda]/d[x,y,z,px,py,pz].