From e60aa2d4aeb1b8fd5617e714dbd496f45870d3be Mon Sep 17 00:00:00 2001 From: Perez Date: Mon, 9 Oct 2023 10:48:47 +0200 Subject: [PATCH] Update of convertTrack in DelphesEDM4HepConverter.cc: take the track's omega directly from the curvature of the delphes track, instead of recomputing it from its pT. --- converter/src/DelphesEDM4HepConverter.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/converter/src/DelphesEDM4HepConverter.cc b/converter/src/DelphesEDM4HepConverter.cc index 3955ef1..3d91b2d 100644 --- a/converter/src/DelphesEDM4HepConverter.cc +++ b/converter/src/DelphesEDM4HepConverter.cc @@ -556,6 +556,11 @@ namespace k4SimDelphes { trackState.phi = cand->Phi; // Same thing under different name in Delphes trackState.tanLambda = cand->CtgTheta; + +/* + // Instead of recomputing the track's omega from its pT, better take it directly + // from the curvature of the delphes track - see below. + // Only do omega when there is actually a magnetic field. double varOmega = 0; if (magFieldBz) { @@ -567,6 +572,7 @@ namespace k4SimDelphes { // constant B-field -> relative error on pT is relative error on omega varOmega = cand->ErrorPT * cand->ErrorPT / cand->PT / cand->PT * trackState.omega * trackState.omega; } +*/ // fill the covariance matrix. There is a conversion of units // because the covariance matrix in delphes is with the original units @@ -579,6 +585,8 @@ namespace k4SimDelphes { // relating to curvature (index 2) double scale2 = -2.; // CAREFUL: DELPHES USES THE HALF-CURVATURE + trackState.omega = cand->C * scale2 ; + covMatrix[0] = covaFB(0, 0); covMatrix[1] = covaFB(1, 0);