diff --git a/Phys/DecayTreeFitter/DecayTreeFitter/Fitter.h b/Phys/DecayTreeFitter/DecayTreeFitter/Fitter.h index 7a331cdda8c9cc9b92a357505076209fac5c3a90..9c1090bc0eda6b7a810c09b4d4d4aaea4221c5d4 100644 --- a/Phys/DecayTreeFitter/DecayTreeFitter/Fitter.h +++ b/Phys/DecayTreeFitter/DecayTreeFitter/Fitter.h @@ -59,15 +59,17 @@ namespace DecayTreeFitter { public: // ======================================================================== /// constructor from the particle (decay head) - Fitter( const LHCb::Particle& bc, const bool forceFitAll = true, const ITrackStateProvider* extrapolator = 0 ); + Fitter( const LHCb::Particle& bc, const bool forceFitAll = true, const ITrackStateProvider* extrapolator = 0, + const bool useTrackTraj = true ); /// constructor from the particle (decay head) - Fitter( const LHCb::Particle& bc, const ITrackStateProvider* extrapolator, const bool forceFitAll = true ); + Fitter( const LHCb::Particle& bc, const ITrackStateProvider* extrapolator, const bool forceFitAll = true, + const bool useTrackTraj = true ); /// constructor from the particle (decay head) and primary vertex Fitter( const LHCb::Particle& bc, const LHCb::VertexBase& pv, const bool forceFitAll = true, - const ITrackStateProvider* extrapolator = 0 ); + const ITrackStateProvider* extrapolator = 0, const bool useTrackTraj = true ); /// constructor from the particle (decay head) and primary vertex Fitter( const LHCb::Particle& bc, const LHCb::VertexBase& pv, const ITrackStateProvider* extrapolator, - const bool forceFitAll = true ); + const bool forceFitAll = true, const bool useTrackTraj = true ); /// destructor ~Fitter(); // destructor // ======================================================================== diff --git a/Phys/DecayTreeFitter/src/Configuration.h b/Phys/DecayTreeFitter/src/Configuration.h index 8e8a1e4ae03fb72dfd7ba1890ce44c87ed6199c9..c0c8ded070ed25af02694a143f1c68042c206ee4 100644 --- a/Phys/DecayTreeFitter/src/Configuration.h +++ b/Phys/DecayTreeFitter/src/Configuration.h @@ -16,8 +16,8 @@ struct ITrackStateProvider; namespace DecayTreeFitter { class Configuration { public: - Configuration( bool forceFitAll = true, const ITrackStateProvider* stateprovider = 0 ) - : m_forceFitAll( forceFitAll ), m_stateprovider( stateprovider ), m_useTrackTraj( true ) {} + Configuration( bool forceFitAll = true, const ITrackStateProvider* stateprovider = 0, bool useTrackTraj = true ) + : m_forceFitAll( forceFitAll ), m_stateprovider( stateprovider ), m_useTrackTraj( useTrackTraj ) {} const ITrackStateProvider* stateProvider() const { return m_stateprovider; } diff --git a/Phys/DecayTreeFitter/src/Fitter.cpp b/Phys/DecayTreeFitter/src/Fitter.cpp index bc43d416bb87cd330b85b0c0366c6efc79d7e07a..4c3b5b7fe86f42bf2c0a6811de9b2ff06d9a3992 100644 --- a/Phys/DecayTreeFitter/src/Fitter.cpp +++ b/Phys/DecayTreeFitter/src/Fitter.cpp @@ -44,7 +44,8 @@ namespace DecayTreeFitter { // ========================================================================== // constructor from the particle (decay head) // ========================================================================== - Fitter::Fitter( const LHCb::Particle& bc, const bool forceFitAll, const ITrackStateProvider* extrapolator ) + Fitter::Fitter( const LHCb::Particle& bc, const bool forceFitAll, const ITrackStateProvider* extrapolator, + const bool useTrackTraj ) : m_particle( &bc ) , m_decaychain( 0 ) , m_fitparams( 0 ) @@ -53,7 +54,7 @@ namespace DecayTreeFitter { , m_niter( -1 ) , m_errCode( 0 ) , m_extrapolator( const_cast( extrapolator ) ) { - Configuration config( forceFitAll, extrapolator ); + Configuration config( forceFitAll, extrapolator, useTrackTraj ); // build the tree m_decaychain = new DecayChain( bc, config ); // allocate the fit parameters @@ -62,7 +63,8 @@ namespace DecayTreeFitter { // ========================================================================== // constructor from the particle (decay head) // ========================================================================== - Fitter::Fitter( const LHCb::Particle& bc, const ITrackStateProvider* extrapolator, const bool forceFitAll ) + Fitter::Fitter( const LHCb::Particle& bc, const ITrackStateProvider* extrapolator, const bool forceFitAll, + const bool useTrackTraj ) : m_particle( &bc ) , m_decaychain( 0 ) , m_fitparams( 0 ) @@ -71,7 +73,7 @@ namespace DecayTreeFitter { , m_niter( -1 ) , m_errCode( 0 ) , m_extrapolator( const_cast( extrapolator ) ) { - Configuration config( forceFitAll, extrapolator ); + Configuration config( forceFitAll, extrapolator, useTrackTraj ); // build the tree m_decaychain = new DecayChain( bc, config ); // allocate the fit parameters @@ -81,7 +83,7 @@ namespace DecayTreeFitter { // constructor from the particle (decay head) and primary vertex // ========================================================================== Fitter::Fitter( const LHCb::Particle& bc, const LHCb::VertexBase& pv, const bool forceFitAll, - const ITrackStateProvider* extrapolator ) + const ITrackStateProvider* extrapolator, const bool useTrackTraj ) : m_particle( &bc ) , m_decaychain( 0 ) , m_fitparams( 0 ) @@ -93,7 +95,7 @@ namespace DecayTreeFitter { , m_extrapolator( const_cast( extrapolator ) ) // { - Configuration config( forceFitAll, extrapolator ); + Configuration config( forceFitAll, extrapolator, useTrackTraj ); m_decaychain = new DecayChain( bc, pv, config ); m_fitparams = new FitParams( m_decaychain->dim() ); } @@ -101,7 +103,7 @@ namespace DecayTreeFitter { // constructor from the particle (decay head) and primary vertex // ========================================================================== Fitter::Fitter( const LHCb::Particle& bc, const LHCb::VertexBase& pv, const ITrackStateProvider* extrapolator, - const bool forceFitAll ) + const bool forceFitAll, const bool useTrackTraj ) : m_particle( &bc ) , m_decaychain( 0 ) , m_fitparams( 0 ) @@ -113,7 +115,7 @@ namespace DecayTreeFitter { , m_extrapolator( const_cast( extrapolator ) ) // { - Configuration config( forceFitAll, extrapolator ); + Configuration config( forceFitAll, extrapolator, useTrackTraj ); m_decaychain = new DecayChain( bc, pv, config ); m_fitparams = new FitParams( m_decaychain->dim() ); }