Skip to content

Commit 1ca94df

Browse files
sadekrshahor02
authored andcommitted
Secondary vertexing for forward rapidities:
- Added FwdDCAFitter tool for fwd tracks secondary vertexing. - Helix Helper adapted for both Fwd and central tracks. - Some functions added on TrackFwd to accomodate changes.
1 parent c8ed784 commit 1ca94df

File tree

6 files changed

+1366
-12
lines changed

6 files changed

+1366
-12
lines changed

DataFormats/Reconstruction/include/ReconstructionDataFormats/TrackFwd.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
#include <TMath.h>
2222
#include "Math/SMatrix.h"
2323
#include "MathUtils/Utils.h"
24+
#include "ReconstructionDataFormats/TrackUtils.h"
25+
#include "MathUtils/Primitive2D.h"
2426

2527
namespace o2
2628
{
@@ -55,9 +57,24 @@ class TrackParFwd
5557
void setPhi(Double_t phi) { mParameters(2) = phi; }
5658
Double_t getPhi() const { return mParameters(2); }
5759

60+
Double_t getSnp() const
61+
{
62+
return o2::math_utils::sin(mParameters(2));
63+
}
64+
65+
Double_t getCsp2() const
66+
{
67+
auto snp = o2::math_utils::sin(mParameters(2));
68+
Double_t csp;
69+
csp = std::sqrt((1. - snp) * (1. + snp));
70+
return csp * csp;
71+
}
72+
5873
void setTanl(Double_t tanl) { mParameters(3) = tanl; }
5974
Double_t getTanl() const { return mParameters(3); }
6075

76+
Double_t getTgl() const { return mParameters(3); } // for the sake of helixhelper
77+
6178
void setInvQPt(Double_t invqpt) { mParameters(4) = invqpt; }
6279
Double_t getInvQPt() const { return mParameters(4); } // return Inverse charged pt
6380
Double_t getPt() const { return TMath::Abs(1.f / mParameters(4)); }
@@ -70,6 +87,12 @@ class TrackParFwd
7087

7188
Double_t getEta() const { return -TMath::Log(TMath::Tan((TMath::PiOver2() - TMath::ATan(getTanl())) / 2)); } // return total momentum
7289

90+
Double_t getCurvature(double b) const
91+
{
92+
auto invqpt = getInvQPt();
93+
return o2::constants::math::B2C * b * invqpt;
94+
}
95+
7396
/// return the charge (assumed forward motion)
7497
Double_t getCharge() const { return TMath::Sign(1., mParameters(4)); }
7598
/// set the charge (assumed forward motion)
@@ -96,6 +119,7 @@ class TrackParFwd
96119
void propagateParamToZlinear(double zEnd);
97120
void propagateParamToZquadratic(double zEnd, double zField);
98121
void propagateParamToZhelix(double zEnd, double zField);
122+
void getCircleParams(float bz, o2::math_utils::CircleXY<float>& c, float& sna, float& csa) const;
99123

100124
protected:
101125
Double_t mZ = 0.; ///< Z coordinate (cm)
@@ -128,6 +152,7 @@ class TrackParCovFwd : public TrackParFwd
128152

129153
Double_t getSigma2X() const { return mCovariances(0, 0); }
130154
Double_t getSigma2Y() const { return mCovariances(1, 1); }
155+
Double_t getSigmaXY() const { return mCovariances(0, 1); }
131156
Double_t getSigma2Phi() const { return mCovariances(2, 2); }
132157
Double_t getSigma2Tanl() const { return mCovariances(3, 3); }
133158
Double_t getSigma2InvQPt() const { return mCovariances(4, 4); }

DataFormats/Reconstruction/src/TrackFwd.cxx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,5 +416,23 @@ void TrackParCovFwd::addMCSEffect(double x_over_X0)
416416
setCovariances(newParamCov);
417417
}
418418

419+
//_______________________________________________________
420+
void TrackParFwd::getCircleParams(float bz, o2::math_utils::CircleXY<float>& c, float& sna, float& csa) const
421+
{
422+
c.rC = getCurvature(bz);
423+
constexpr double MinCurv = 1e-6;
424+
if (std::abs(c.rC) > MinCurv) {
425+
c.rC = 1.f / getCurvature(bz);
426+
double sn = getSnp(), cs = std::sqrt((1.f - sn) * (1.f + sn));
427+
c.xC = getX() - sn * c.rC; // center in tracking
428+
c.yC = getY() + cs * c.rC; // frame. Note: r is signed!!!
429+
c.rC = std::abs(c.rC);
430+
} else {
431+
c.rC = 0.f; // signal straight line
432+
c.xC = getX();
433+
c.yC = getY();
434+
}
435+
}
436+
419437
} // namespace track
420438
} // namespace o2

Detectors/Vertexing/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ o2_add_library(DetectorsVertexing
1919
src/SVertexer.cxx
2020
src/SVertexerParams.cxx
2121
src/SVertexHypothesis.cxx
22+
src/FwdDCAFitterN.cxx
2223
PUBLIC_LINK_LIBRARIES ROOT::Core
2324
O2::CommonUtils
2425
O2::ReconstructionDataFormats
@@ -37,6 +38,7 @@ o2_target_root_dictionary(DetectorsVertexing
3738
include/DetectorsVertexing/PVertexerHelpers.h
3839
include/DetectorsVertexing/PVertexerParams.h
3940
include/DetectorsVertexing/DCAFitterN.h
41+
include/DetectorsVertexing/FwdDCAFitterN.h
4042
include/DetectorsVertexing/SVertexerParams.h
4143
include/DetectorsVertexing/SVertexHypothesis.h)
4244

@@ -53,4 +55,4 @@ o2_add_test(
5355
PUBLIC_LINK_LIBRARIES O2::DetectorsVertexing ROOT::Core ROOT::Physics
5456
LABELS vertexing
5557
ENVIRONMENT O2_ROOT=${CMAKE_BINARY_DIR}/stage
56-
VMCWORKDIR=${CMAKE_BINARY_DIR}/stage/${CMAKE_INSTALL_DATADIR})
58+
VMCWORKDIR=${CMAKE_BINARY_DIR}/stage/${CMAKE_INSTALL_DATADIR})

0 commit comments

Comments
 (0)