diff --git a/GBL/include/GblTrackSegmentController.h b/GBL/include/GblTrackSegmentController.h index 5e57fcd4120dcc97c4f40fb0c54695d981a46eb0..4277c207c9ab1744b26aac0b6552a13a3964d3ff 100644 --- a/GBL/include/GblTrackSegmentController.h +++ b/GBL/include/GblTrackSegmentController.h @@ -45,9 +45,15 @@ namespace genfit { virtual ~GblTrackSegmentController() {}; - virtual GblTrackSegmentController* clone() const {return new GblTrackSegmentController(*this);} - - virtual void controlTrackSegment(TVector3, TVector3, GblFitter *) {;} + /** + * @brief Function called for each segment of trajectory. User can decide on MS options. + * This function must be implemented by the actual class deriving from this abstract class + * @param entry Position of segment starting point + * @param exit Position of segment ending point + * @param scatTheta Total MS variance accumulated in this segment + * @param fitter Pointer to the fitter - so you can set the MS options + */ + virtual void controlTrackSegment(TVector3 entry, TVector3 exit, double scatTheta, GblFitter * fitter) = 0; virtual void Print(const Option_t* = "") const {;} diff --git a/GBL/src/GblFitter.cc b/GBL/src/GblFitter.cc index e85cae76cad0ef070c72b33c76968c4c30d2acb0..b5002ab2b2ea4abe70ad621f74c497d5e2e62620 100644 --- a/GBL/src/GblFitter.cc +++ b/GBL/src/GblFitter.cc @@ -458,7 +458,7 @@ double GblFitter::constructGblInfo(Track* trk, const AbsTrackRep* rep) // Call segment controller to set MS options: if (m_segmentController) - m_segmentController->controlTrackSegment(segmentEntry, segmentExit, this); + m_segmentController->controlTrackSegment(segmentEntry, segmentExit, scatTheta, this); // Scattering options: OFF / THIN / THICK if (m_enableScatterers && !m_enableIntermediateScatterer) { diff --git a/GBL/src/GblTrajectory.cc b/GBL/src/GblTrajectory.cc index 70be46f29ccdfac4e449ff0935a0bb4bf43846e3..d073377364d41dc020807bdf1e19b21e36925b2c 100644 --- a/GBL/src/GblTrajectory.cc +++ b/GBL/src/GblTrajectory.cc @@ -994,7 +994,7 @@ void GblTrajectory::prepare() { std::vector<double> derivatives(numCurvature); for (unsigned int iExt = 0; iExt < nExt; ++iExt) { for (unsigned int iCol = 0; iCol < numCurvature; ++iCol) { - index[iCol] = iCol + 1; + index[iCol] = numLocals + iCol + 1; derivatives[iCol] = externalDerivatives(iExt, iCol); } GblData aData(1U, externalMeasurements(iExt),