Skip to content
Snippets Groups Projects
Commit e1303ec5 authored by Tobias Bockh's avatar Tobias Bockh
Browse files

set negative charge to -1 not 0

parent 99d96ebf
No related branches found
No related tags found
No related merge requests found
...@@ -421,7 +421,8 @@ CKF2::ConvertActsTrackParameterToATLAS(const Acts::BoundTrackParameters &actsPar ...@@ -421,7 +421,8 @@ CKF2::ConvertActsTrackParameterToATLAS(const Acts::BoundTrackParameters &actsPar
double tqOverP=actsParameter.get<Acts::eBoundQOverP>()*1_MeV; double tqOverP=actsParameter.get<Acts::eBoundQOverP>()*1_MeV;
double p = std::abs(1. / tqOverP); double p = std::abs(1. / tqOverP);
Amg::Vector3D tmom(p * std::cos(tphi) * std::sin(ttheta), p * std::sin(tphi) * std::sin(ttheta), p * std::cos(ttheta)); Amg::Vector3D tmom(p * std::cos(tphi) * std::sin(ttheta), p * std::sin(tphi) * std::sin(ttheta), p * std::cos(ttheta));
const Trk::CurvilinearParameters * curv = new Trk::CurvilinearParameters(pos,tmom,tqOverP>0, cov); double charge = tqOverP > 0. ? 1. : -1.;
const Trk::CurvilinearParameters * curv = new Trk::CurvilinearParameters(pos,tmom,charge, cov);
return curv; return curv;
} }
......
...@@ -221,9 +221,7 @@ KalmanFitterTool::getParametersFromTrack(const Trk::TrackParameters *inputParame ...@@ -221,9 +221,7 @@ KalmanFitterTool::getParametersFromTrack(const Trk::TrackParameters *inputParame
params(1.0) = center[Trk::locX]; params(1.0) = center[Trk::locX];
params(2.0) = atlasParam[Trk::phi0]; params(2.0) = atlasParam[Trk::phi0];
params(3.0) = atlasParam[Trk::theta]; params(3.0) = atlasParam[Trk::theta];
// input charge is 1 for positively charged particles and 0 for negatively charged particles! params(4.0) = inputParameters->charge() / (inputParameters->momentum().norm() * 1_MeV);
double charge = 2 * inputParameters->charge() - 1;
params(4.0) = charge / (inputParameters->momentum().norm() * 1_MeV);
params(5.0) = 0.; params(5.0) = 0.;
} else { } else {
params = inputVector; params = inputVector;
...@@ -348,7 +346,8 @@ KalmanFitterTool::ConvertActsTrackParameterToATLAS(const Acts::BoundTrackParamet ...@@ -348,7 +346,8 @@ KalmanFitterTool::ConvertActsTrackParameterToATLAS(const Acts::BoundTrackParamet
double tqOverP=actsParameter.get<Acts::eBoundQOverP>()*1_MeV; double tqOverP=actsParameter.get<Acts::eBoundQOverP>()*1_MeV;
double p = std::abs(1. / tqOverP); double p = std::abs(1. / tqOverP);
Amg::Vector3D tmom(p * std::cos(tphi) * std::sin(ttheta), p * std::sin(tphi) * std::sin(ttheta), p * std::cos(ttheta)); Amg::Vector3D tmom(p * std::cos(tphi) * std::sin(ttheta), p * std::sin(tphi) * std::sin(ttheta), p * std::cos(ttheta));
const Trk::CurvilinearParameters * curv = new Trk::CurvilinearParameters(pos,tmom,tqOverP>0, cov); double charge = tqOverP > 0. ? 1. : -1.;
const Trk::CurvilinearParameters * curv = new Trk::CurvilinearParameters(pos,tmom,charge, cov);
return curv; return curv;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment