From 87c6507c11538ee39ea20470e8f3ef592e1c4fc3 Mon Sep 17 00:00:00 2001 From: Gerhard Raven <gerhard.raven@nikhef.nl> Date: Tue, 29 Nov 2016 20:10:18 +0100 Subject: [PATCH] Modernize DaVinciInterfaces * prefer inheritance from extend_interfaces over virtual inheritance * prefer struct over class when there are only public members * prefer implicit destructors * remove obsolete SVN/CVS keywords * replace BOOST_FOREACH with range-based for loops --- .../Kernel/GetIDVAlgorithm.h | 1 - Phys/DaVinciInterfaces/Kernel/IBTaggingTool.h | 16 +- Phys/DaVinciInterfaces/Kernel/IBremAdder.h | 10 +- .../Kernel/ICaloParticleMaker.h | 7 +- .../DaVinciInterfaces/Kernel/IChangePIDTool.h | 10 +- Phys/DaVinciInterfaces/Kernel/ICheckOverlap.h | 13 +- .../Kernel/ICheckSelResults.h | 38 +- Phys/DaVinciInterfaces/Kernel/IDVAlgorithm.h | 57 +- Phys/DaVinciInterfaces/Kernel/IDecayFinder.h | 7 +- Phys/DaVinciInterfaces/Kernel/IDecayTreeFit.h | 302 ++++---- .../Kernel/IDecodeSimpleDecayString.h | 45 +- Phys/DaVinciInterfaces/Kernel/IDirectionFit.h | 83 +-- .../Kernel/IDistanceCalculator.h | 695 +++++++++--------- .../DaVinciInterfaces/Kernel/IExtraInfoTool.h | 9 +- .../Kernel/IFilterParticles.h | 13 +- Phys/DaVinciInterfaces/Kernel/IJetMaker.h | 238 +++--- Phys/DaVinciInterfaces/Kernel/IJets2Jets.h | 23 +- .../Kernel/ILifetimeFitter.h | 17 +- Phys/DaVinciInterfaces/Kernel/IMassFit.h | 171 ++--- .../Kernel/IP2VVAngleCalculator.h | 7 +- .../Kernel/IP2VVPartAngleCalculator.h | 9 +- Phys/DaVinciInterfaces/Kernel/IPVReFitter.h | 16 +- .../Kernel/IParticle2State.h | 7 +- .../Kernel/IParticleCombiner.h | 124 ++-- .../Kernel/IParticleFilter.h | 16 +- .../Kernel/IParticleIsolation.h | 40 +- .../Kernel/IParticleReFitter.h | 98 ++- .../Kernel/IParticleTisTos.h | 28 +- .../Kernel/IParticleTupleTool.h | 16 +- .../DaVinciInterfaces/Kernel/IParticleValue.h | 16 +- Phys/DaVinciInterfaces/Kernel/IParticleVeto.h | 14 +- Phys/DaVinciInterfaces/Kernel/IPrintDecay.h | 12 +- .../Kernel/ISetInputParticles.h | 25 +- Phys/DaVinciInterfaces/Kernel/ITisTos.h | 92 +-- .../Kernel/ITrackIsolation.h | 33 +- .../Kernel/ITriggerSelectionTisTos.h | 26 +- .../DaVinciInterfaces/Kernel/ITriggerTisTos.h | 11 +- Phys/DaVinciInterfaces/Kernel/IVertexFit.h | 15 +- .../src/DaVinciInterfaces.cpp | 42 +- Phys/TisTosTobbing/src/TESSelectionTisTos.h | 3 +- Phys/TisTosTobbing/src/lib/ParticleTisTos.cpp | 16 +- 41 files changed, 1034 insertions(+), 1387 deletions(-) diff --git a/Phys/DaVinciInterfaces/Kernel/GetIDVAlgorithm.h b/Phys/DaVinciInterfaces/Kernel/GetIDVAlgorithm.h index b9a5c3a37..ae519b39a 100644 --- a/Phys/DaVinciInterfaces/Kernel/GetIDVAlgorithm.h +++ b/Phys/DaVinciInterfaces/Kernel/GetIDVAlgorithm.h @@ -1,4 +1,3 @@ -// $Id: GetIDVAlgorithm.h,v 1.1 2010-05-14 15:03:45 ibelyaev Exp $ // ============================================================================ #ifndef KERNEL_GETIDVALGORITHM_H #define KERNEL_GETIDVALGORITHM_H 1 diff --git a/Phys/DaVinciInterfaces/Kernel/IBTaggingTool.h b/Phys/DaVinciInterfaces/Kernel/IBTaggingTool.h index 02e70f8af..fad87e4c1 100644 --- a/Phys/DaVinciInterfaces/Kernel/IBTaggingTool.h +++ b/Phys/DaVinciInterfaces/Kernel/IBTaggingTool.h @@ -16,22 +16,18 @@ * @date 2004-12-14 */ -class GAUDI_API IBTaggingTool : virtual public IAlgTool +struct GAUDI_API IBTaggingTool : extend_interfaces<IAlgTool> { -public: - DeclareInterfaceID(IBTaggingTool, 2, 0); - public: - - virtual StatusCode tag( LHCb::FlavourTag&, + virtual StatusCode tag( LHCb::FlavourTag&, const LHCb::Particle* ) = 0; - virtual StatusCode tag( LHCb::FlavourTag&, - const LHCb::Particle*, + virtual StatusCode tag( LHCb::FlavourTag&, + const LHCb::Particle*, const LHCb::RecVertex* ) = 0; - virtual StatusCode tag( LHCb::FlavourTag&, - const LHCb::Particle*, + virtual StatusCode tag( LHCb::FlavourTag&, + const LHCb::Particle*, const LHCb::RecVertex*, LHCb::Particle::ConstVector& ) = 0; }; diff --git a/Phys/DaVinciInterfaces/Kernel/IBremAdder.h b/Phys/DaVinciInterfaces/Kernel/IBremAdder.h index 1bfd23ed6..5bf734b00 100644 --- a/Phys/DaVinciInterfaces/Kernel/IBremAdder.h +++ b/Phys/DaVinciInterfaces/Kernel/IBremAdder.h @@ -1,4 +1,3 @@ -// $Id: IBremAdder.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef KERNEL_IBREMADDER_H #define KERNEL_IBREMADDER_H 1 @@ -19,15 +18,12 @@ * @author Olivier Deschamps * @date 2006-10-25 */ -class GAUDI_API IBremAdder : virtual public IAlgTool +struct GAUDI_API IBremAdder : extend_interfaces<IAlgTool> { - public: DeclareInterfaceID(IBremAdder, 4, 0); - public: - // Add Brem virtual bool addBrem( LHCb::Particle* particle , bool force=false) = 0 ; // Remove Brem @@ -41,10 +37,6 @@ class GAUDI_API IBremAdder : virtual public IAlgTool virtual const std::pair<LHCb::CaloMomentum,LHCb::CaloMomentum> bremMomenta(const LHCb::Particle* p1, const LHCb::Particle*p2, std::string flag="")=0; - protected: - - virtual ~IBremAdder() ; // virtual and protected destructors - }; #endif // KERNEL_IBREMADDER_H diff --git a/Phys/DaVinciInterfaces/Kernel/ICaloParticleMaker.h b/Phys/DaVinciInterfaces/Kernel/ICaloParticleMaker.h index 31e82ebba..1e2a4d62e 100644 --- a/Phys/DaVinciInterfaces/Kernel/ICaloParticleMaker.h +++ b/Phys/DaVinciInterfaces/Kernel/ICaloParticleMaker.h @@ -1,4 +1,3 @@ -// $Id: ICaloParticleMaker.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef DAVINCIKERNEL_ICALOPARTICLEMAKER_H #define DAVINCIKERNEL_ICALOPARTICLEMAKER_H 1 @@ -26,15 +25,11 @@ namespace LHCb { * @date 22/04/2002 */ -class GAUDI_API ICaloParticleMaker : virtual public IAlgTool +struct GAUDI_API ICaloParticleMaker : extend_interfaces<IAlgTool> { -public: - DeclareInterfaceID(ICaloParticleMaker, 2, 0); - public: - /// Dispatch the making of particles virtual StatusCode makeParticles( LHCb::Particle::Vector & parts ) = 0; virtual void setPoint ( const Gaudi::XYZPoint cov ) = 0; diff --git a/Phys/DaVinciInterfaces/Kernel/IChangePIDTool.h b/Phys/DaVinciInterfaces/Kernel/IChangePIDTool.h index 131e4cb8c..dad1af0dd 100644 --- a/Phys/DaVinciInterfaces/Kernel/IChangePIDTool.h +++ b/Phys/DaVinciInterfaces/Kernel/IChangePIDTool.h @@ -1,4 +1,3 @@ -// $Id: IChangePIDTool.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef KERNEL_ICHANGEPIDTOOL_H #define KERNEL_ICHANGEPIDTOOL_H 1 @@ -19,15 +18,12 @@ * @author Patrick Spradlin * @date 2006-12-13 */ -class GAUDI_API IChangePIDTool : virtual public IAlgTool +struct GAUDI_API IChangePIDTool : extend_interfaces<IAlgTool> { - public: DeclareInterfaceID(IChangePIDTool, 2, 0); - public: - /// Change the PID of a single particle virtual LHCb::Particle changePID( const LHCb::Particle & ) = 0; @@ -39,8 +35,8 @@ class GAUDI_API IChangePIDTool : virtual public IAlgTool inline std::vector<LHCb::Particle> changePID( PARTICLE begin, PARTICLE end ) { - return changePID ( LHCb::Particle::ConstVector ( begin , end ) ); + return changePID( { begin , end } ); } - + }; #endif // KERNEL_ICHANGEPIDTOOL_H diff --git a/Phys/DaVinciInterfaces/Kernel/ICheckOverlap.h b/Phys/DaVinciInterfaces/Kernel/ICheckOverlap.h index aeb753ba2..6797fb559 100644 --- a/Phys/DaVinciInterfaces/Kernel/ICheckOverlap.h +++ b/Phys/DaVinciInterfaces/Kernel/ICheckOverlap.h @@ -1,4 +1,3 @@ -// $Id: ICheckOverlap.h,v 1.3 2010-06-20 15:49:19 ibelyaev Exp $ // ============================================================================ #ifndef DAVINCIKERNEL_ICHECKOVERLAP_H #define DAVINCIKERNEL_ICHECKOVERLAP_H 1 @@ -26,14 +25,11 @@ * & modified a bit by Vanya Belyaev * @date 28/06/2002 */ -class GAUDI_API ICheckOverlap : virtual public IAlgTool +struct GAUDI_API ICheckOverlap : extend_interfaces<IAlgTool> { - public: // ========================================================================== DeclareInterfaceID(ICheckOverlap, 4, 0); // ========================================================================== - public: - // ========================================================================== /** Check for duplicate use of a protoparticle to produce particles. * @param parts is a vector of pointers to particles. */ @@ -53,8 +49,6 @@ class GAUDI_API ICheckOverlap : virtual public IAlgTool const LHCb::Particle*, const LHCb::Particle*) = 0; // ========================================================================== - public: - // ========================================================================== /** Check for duplicate use of a protoparticle to produce decay tree of * any particle in vector. Removes found particles from vector. */ @@ -99,11 +93,6 @@ class GAUDI_API ICheckOverlap : virtual public IAlgTool return removeOverlap ( result ) ; } // ========================================================================== - protected: - // ========================================================================== - /// virtual and protected destructors - virtual ~ICheckOverlap() ; // virtual and protected destructors - // ========================================================================== }; // ============================================================================ // The END diff --git a/Phys/DaVinciInterfaces/Kernel/ICheckSelResults.h b/Phys/DaVinciInterfaces/Kernel/ICheckSelResults.h index 5ed4d77c1..bb643d4fc 100644 --- a/Phys/DaVinciInterfaces/Kernel/ICheckSelResults.h +++ b/Phys/DaVinciInterfaces/Kernel/ICheckSelResults.h @@ -1,6 +1,5 @@ -// $Id: ICheckSelResults.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ // ============================================================================ -#ifndef KERNEL_ICHECKSELRESULTS_H +#ifndef KERNEL_ICHECKSELRESULTS_H #define KERNEL_ICHECKSELRESULTS_H 1 // ============================================================================ // Include files @@ -16,53 +15,42 @@ // ============================================================================ /** @class ICheckSelResults Kernel/ICheckSelResults.h * - * Thw abstract interface for checking of selection result + * Thw abstract interface for checking of selection result * * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr * @date 2005-07-22 */ -class GAUDI_API ICheckSelResults : virtual public IAlgTool +struct GAUDI_API ICheckSelResults : extend_interfaces<IAlgTool> { // ========================================================================== -public: - // ========================================================================== /// interface machinery DeclareInterfaceID(ICheckSelResults, 2, 0); // ========================================================================== -public: - // ========================================================================== /// the actual type of "Selections" typedef std::string Selection ; /// the actual type of "Selections" typedef std::vector<Selection> Selections ; // ========================================================================== -public: - // ========================================================================== - /** check if the event has been (pre)selected - * @return true if the event has been (pre)selected + /** check if the event has been (pre)selected + * @return true if the event has been (pre)selected */ virtual bool isSelected () const = 0 ; - // ========================================================================== + // ========================================================================== /** check if the event has been (pre)selected by a certain selection - * @param selection selection name - * @return true if the event has been (pre)selected + * @param selection selection name + * @return true if the event has been (pre)selected */ virtual bool isSelected ( const Selection & selection ) const = 0 ; - // ========================================================================== + // ========================================================================== /** check if the event has been (pre)selected by certain selection(s) - * @param selections vector of selection names - * @param ANDMode flag to distinguish AND/OR modes - * @return true if the event has been (pre)selected by *ALL* + * @param selections vector of selection names + * @param ANDMode flag to distinguish AND/OR modes + * @return true if the event has been (pre)selected by *ALL* * selections (AND-mode) or by at least one preselection (OR-mode) */ - virtual bool isSelected ( const Selections & selections , + virtual bool isSelected ( const Selections & selections , const bool ANDMode = false ) const = 0 ; // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~ICheckSelResults() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ // The END diff --git a/Phys/DaVinciInterfaces/Kernel/IDVAlgorithm.h b/Phys/DaVinciInterfaces/Kernel/IDVAlgorithm.h index b39e9c7d6..96462b473 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDVAlgorithm.h +++ b/Phys/DaVinciInterfaces/Kernel/IDVAlgorithm.h @@ -1,6 +1,5 @@ -// $Id: IDVAlgorithm.h,v 1.11 2010-05-29 15:11:40 ibelyaev Exp $ // ============================================================================ -#ifndef KERNEL_IDVALGORITHM_H +#ifndef KERNEL_IDVALGORITHM_H #define KERNEL_IDVALGORITHM_H 1 // ============================================================================ // Include files @@ -34,83 +33,75 @@ class GaudiAlgorithm ; class IBTaggingTool ; // ============================================================================ /** @class IDVAlgorithm Kernel/IDVAlgorithm.h - * + * * Abstract interface containing some of the more useful methods currently * in DVAlgorithm. * * @author Juan PALACIOS * @date 2010-01-12 */ -class GAUDI_API IDVAlgorithm : virtual public INamedInterface +struct GAUDI_API IDVAlgorithm : extend_interfaces<INamedInterface> { -public: // ========================================================================== DeclareInterfaceID(IDVAlgorithm, 4, 0); // ========================================================================== -public: // tools - // ========================================================================== /// get the distance calculator tool - virtual const IDistanceCalculator* + virtual const IDistanceCalculator* distanceCalculator ( const std::string& nickname = "" ) const = 0 ; - /// get lifetime fitter tool - virtual const ILifetimeFitter* + /// get lifetime fitter tool + virtual const ILifetimeFitter* lifetimeFitter ( const std::string& nickname = "" ) const = 0 ; - /// get the vertex fitter tool - virtual const IVertexFit* + /// get the vertex fitter tool + virtual const IVertexFit* vertexFitter ( const std::string& nickname = "" ) const = 0 ; /// get particle re-fitter tool - virtual const IParticleReFitter* + virtual const IParticleReFitter* particleReFitter ( const std::string& nickname = "" ) const = 0 ; /// get particle filter tool - virtual const IParticleFilter* + virtual const IParticleFilter* particleFilter ( const std::string& nickname = "" ) const = 0 ; - /// Accessor for decay-tree fitter + /// Accessor for decay-tree fitter virtual IDecayTreeFit* decayTreeFitter ( const std::string& nickname = "" ) const = 0 ; /// Accessor for ParticleCombiner tool - virtual const IParticleCombiner* + virtual const IParticleCombiner* particleCombiner ( const std::string& nickname = "" ) const = 0 ; /// Accessor for mass-fitter tool - virtual const IMassFit* + virtual const IMassFit* massFitter ( const std::string& nickname = "" ) const = 0 ; /// Accessor for direction-fitter tool - virtual const IDirectionFit* + virtual const IDirectionFit* directionFitter ( const std::string& nickname = "" ) const = 0 ; /// Accessor for primary vertex re-fitter tool - virtual const IPVReFitter* + virtual const IPVReFitter* primaryVertexReFitter ( const std::string& nickname = "" ) const = 0 ; /// Access the Flavour tagging tool virtual IBTaggingTool* flavourTagging() const = 0; // ========================================================================== -public: // implementation + // implementation // ========================================================================== /** Handle to the concrete implementation, or to the parent if * implementation does not derive from GaudiAlgorithm - */ + */ virtual const GaudiAlgorithm* gaudiAlg() const = 0; // ========================================================================== -public: // data + // data // ========================================================================== /// Return a container of local LHCb::Particle* - virtual const LHCb::Particle::Range - particles () const = 0 ; + virtual const LHCb::Particle::Range + particles () const = 0 ; /// Return a container of LHCb::RecVertex*, containing primary vertices. - virtual const LHCb::RecVertex::Range + virtual const LHCb::RecVertex::Range primaryVertices () const = 0 ; /// Return the best primary vertex for a given LHCb::Particle. - virtual const LHCb::VertexBase* + virtual const LHCb::VertexBase* bestVertex ( const LHCb::Particle* ) const = 0 ; - /// unrelate related PV + /// unrelate related PV virtual void unRelatePV ( const LHCb::Particle* ) const = 0 ; // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IDVAlgorithm () ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // KERNEL_IDVALGORITHM_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IDecayFinder.h b/Phys/DaVinciInterfaces/Kernel/IDecayFinder.h index 14fc35060..b7edf7c43 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDecayFinder.h +++ b/Phys/DaVinciInterfaces/Kernel/IDecayFinder.h @@ -1,4 +1,3 @@ -// $Id: IDecayFinder.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef TOOLS_IDECAYFINDER_H #define TOOLS_IDECAYFINDER_H 1 @@ -20,11 +19,9 @@ * @author Olivier Dormond * @date 23/04/2002 */ -class GAUDI_API IDecayFinder : virtual public IAlgTool +struct GAUDI_API IDecayFinder : extend_interfaces<IAlgTool> { - public: - DeclareInterfaceID(IDecayFinder, 4, 0); /// Get the decay string to find @@ -76,7 +73,7 @@ class GAUDI_API IDecayFinder : virtual public IAlgTool template <class PARTICLE> inline StatusCode findDecay( PARTICLE begin, PARTICLE end, - const LHCb::Particle*& previous_result ) + const LHCb::Particle*& previous_result ) { return findDecay ( LHCb::Particle::ConstVector ( begin , end ), previous_result ); diff --git a/Phys/DaVinciInterfaces/Kernel/IDecayTreeFit.h b/Phys/DaVinciInterfaces/Kernel/IDecayTreeFit.h index 0d37f1b81..b3da271d7 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDecayTreeFit.h +++ b/Phys/DaVinciInterfaces/Kernel/IDecayTreeFit.h @@ -1,6 +1,5 @@ -// $Id: IDecayTreeFit.h,v 1.3 2010-06-08 17:54:45 ibelyaev Exp $ // ============================================================================ -#ifndef KERNEL_IDECAYTREEFIT_H +#ifndef KERNEL_IDECAYTREEFIT_H #define KERNEL_IDECAYTREEFIT_H 1 // ============================================================================ // Include files @@ -10,281 +9,262 @@ #include "GaudiKernel/IInterface.h" #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// DaVinciTypes +// DaVinciTypes // ============================================================================ #include "Kernel/DecayTree.h" // ============================================================================ -// forward declarations +// forward declarations // ============================================================================ namespace Gaudi { namespace Math { class ParticleParams ; } } // LHCbMath -namespace LHCb { class Particle ; } // Event/PhysEvent -namespace LHCb { class ParticleID ; } // Kernel/PartProp -namespace LHCb { class DecayTree ; } // Phys/DaVinciTypes +namespace LHCb { class Particle ; } // Event/PhysEvent +namespace LHCb { class ParticleID ; } // Kernel/PartProp +namespace LHCb { class DecayTree ; } // Phys/DaVinciTypes // ============================================================================ /** @class IDecayTreeFit Kernel/IDecayTreeFit.h - * - * The abstract interface for wrapping of "Decay-Tree-Fitter", - * the nice utility for globl fits of decay trees, + * + * The abstract interface for wrapping of "Decay-Tree-Fitter", + * the nice utility for globl fits of decay trees, * coded by Wouter Hulsbergen * * @see DecayTreeFitter::Fitter * @author Vanya Belyaev * @date 2010-05-24 - * - * $Revision$ - * Last modification $Date$ - * by $Author$ + * */ -class GAUDI_API IDecayTreeFit : public virtual IAlgTool +struct GAUDI_API IDecayTreeFit : extend_interfaces<IAlgTool> { -public: // ========================================================================== - /// interface machinery + /// interface machinery DeclareInterfaceID ( IDecayTreeFit , 3 , 0 ) ; // ========================================================================== -public: - // ========================================================================== - /// the actual type for the fit parameters + /// the actual type for the fit parameters typedef Gaudi::Math::ParticleParams Fitted ; // ========================================================================== -public: - // ========================================================================== - /** fit the decay tree + /** fit the decay tree * - * @code - * - * const IDecayTreeFitter* fitter = ...; // get the fitter + * @code * + * const IDecayTreeFitter* fitter = ...; // get the fitter + * + * + * const LHCb::Particle* p = ... ; // get the particle * - * const LHCb::Particle* p = ... ; // get the particle - * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * @endcode + * @endcode * * For the fit one can also use the primary vertex constraint: * - * @code - * - * const IDecayTreeFitter* fitter = ...; // get the fitter + * @code + * + * const IDecayTreeFitter* fitter = ...; // get the fitter + * * + * const LHCb::Particle* B = ... ; // get the particle + * const LHCb::VertexBase* pv = ... ; // get the primary vertex * - * const LHCb::Particle* B = ... ; // get the particle - * const LHCb::VertexBase* pv = ... ; // get the primary vertex - * * // fit it ! - * StatusCode sc = fitter -> fit ( B , pv ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( B , pv ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * @endcode + * @endcode * - * @param decay (INPUT) the decay tree to fit - * @param origin (INPUT) the origin vertex - * @return status code - */ - virtual StatusCode fit - ( const LHCb::Particle* decay , + * @param decay (INPUT) the decay tree to fit + * @param origin (INPUT) the origin vertex + * @return status code + */ + virtual StatusCode fit + ( const LHCb::Particle* decay , const LHCb::VertexBase* origin = 0 ) const = 0 ; // ========================================================================== - /** get the fitted parameters for the particle + /** get the fitted parameters for the particle + * + * @code + * + * const IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle * - * @code - * - * const IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle - * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * * // get the daughter particle: - * const LHCb::Particle* daughter = ... ; - * - * const IDecayTreeFitter::Fitted* fitted = + * const LHCb::Particle* daughter = ... ; + * + * const IDecayTreeFitter::Fitted* fitted = * fitter ->fitter ( daughter ) ; - * - * if ( 0 == fitted ) { ... } ; // error here - * else - * { - * info () << " Fitted 4-momentum of daughter " << fitted->momenum() - * << " Fitted decay-legth of daughter " << fitted->decayLength() - * << endmsg + * + * if ( 0 == fitted ) { ... } ; // error here + * else + * { + * info () << " Fitted 4-momentum of daughter " << fitted->momenum() + * << " Fitted decay-legth of daughter " << fitted->decayLength() + * << endmsg * } * - * @endcode + * @endcode * - * The fitted result for mother particle ("decay head") can be extracted + * The fitted result for mother particle ("decay head") can be extracted * using the defautl argument : * - * @code - * - * const IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* B = ... ; // get the particle - * const LHCb::VertexBase* pv = ... ; // get the primary vertex - * + * @code + * + * const IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* B = ... ; // get the particle + * const LHCb::VertexBase* pv = ... ; // get the primary vertex + * * // fit it ! - * StatusCode sc = fitter -> fit ( B , pv ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( B , pv ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * * // extract teh fitted results : * const IDecayTreeFitter::Fitted* fitted = fitter ->fitter () ; - * - * if ( 0 == fitted ) { ... } ; // error here - * else - * { - * info () << " Fitted 4-momentum " << fitted->momenum() - * << " Fitted decay-length " << fitted->decayLength() - * << endmsg + * + * if ( 0 == fitted ) { ... } ; // error here + * else + * { + * info () << " Fitted 4-momentum " << fitted->momenum() + * << " Fitted decay-length " << fitted->decayLength() + * << endmsg * } * - * @endcode + * @endcode * - * @see IDecayTreeFit::Fitted - * @see Gaudi::Math::ParticleParams + * @see IDecayTreeFit::Fitted + * @see Gaudi::Math::ParticleParams * @see Gaudi::Math::ParticleParams::momentum * @see Gaudi::Math::ParticleParams::decayLength - * - * @param particle (INPUT) the particle, NULL corresponds to the decay head - * @return the fitted parameters, NULL for invalid argument/fit failure + * + * @param particle (INPUT) the particle, NULL corresponds to the decay head + * @return the fitted parameters, NULL for invalid argument/fit failure */ virtual const Fitted* fitted ( const LHCb::Particle* p = 0 ) const = 0 ; - // ========================================================================== -public: // ========================================================================== - /** get the fit resuts in form of self-consistent decay tree - * - * @code - * - * const IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle - * + /** get the fit resuts in form of self-consistent decay tree + * + * @code + * + * const IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle + * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * * // get the daughter particle: - * const LHCb::Particle* daughter = ... ; - * + * const LHCb::Particle* daughter = ... ; + * * // get the fitted tree: * LHCb::DecayTree tree = fitter->fittedTree() ; * - * // get the fitted daughter form the tree + * // get the fitted daughter form the tree * const LHCb::Particle* fitted = tree.findClone ( *daughter ) ; * - * @endcode + * @endcode * * @see LHCb::DecayTree * - * @return the whole fitted tree + * @return the whole fitted tree */ virtual LHCb::DecayTree fittedTree () const = 0 ; - // ========================================================================== -public: // ========================================================================== - /** the chi2 of the global fit + /** the chi2 of the global fit + * + * @code * - * @code - * - * IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle + * IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * // get chi2 + * // get chi2 * const double chi2 = fitter->chi2() ; * - * @endcode + * @endcode * - * @return chi2 of global fit procedure + * @return chi2 of global fit procedure */ virtual double chi2 ( ) const = 0 ; // ========================================================================== - /** number degress of freeedom for the global fit + /** number degress of freeedom for the global fit * - * @code - * - * IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle + * @code + * + * IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * // get degrees-of-freedom + * // get degrees-of-freedom * const unsigned int ndoF = fitter->nDoF () ; * - * @endcode + * @endcode * - * @return number of degrees of freedom + * @return number of degrees of freedom */ virtual unsigned int nDoF ( ) const = 0 ; - // ========================================================================== -public: // ========================================================================== - /** add the constraint + /** add the constraint + * + * @code * - * @code - * - * IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle + * IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle * - * // apply mass-constrainst for charm for the next fit - * fitter -> addConstraint ( LHCb::ParticleID( 240 ) ) ; - * fitter -> addConstraint ( LHCb::ParticleID( 140 ) ) ; + * // apply mass-constrainst for charm for the next fit + * fitter -> addConstraint ( LHCb::ParticleID( 240 ) ) ; + * fitter -> addConstraint ( LHCb::ParticleID( 140 ) ) ; * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * @endcode + * @endcode * - * @attention Mass-constraints is active only for the next call + * @attention Mass-constraints is active only for the next call * of IDecayTreeFit::fit - * + * * @param pid (INPUT) particle-ID to be constrained */ virtual void addConstraint ( const LHCb::ParticleID& pid ) = 0 ; - // ========================================================================== - /** add the constraint + // ========================================================================== + /** add the constraint * - * @code - * - * IDecayTreeFitter* fitter = ...; // get the fitter - * const LHCb::Particle* p = ... ; // get the particle + * @code + * + * IDecayTreeFitter* fitter = ...; // get the fitter + * const LHCb::Particle* p = ... ; // get the particle * * const double mass1 = ... ; * const double mass2 = ... ; * - * // apply mass-constrainst for charm for the next fit - * fitter -> addConstraint ( LHCb::ParticleID( 240 ) , mass1 ) ; - * fitter -> addConstraint ( LHCb::ParticleID( 140 ) , mass2 ) ; + * // apply mass-constrainst for charm for the next fit + * fitter -> addConstraint ( LHCb::ParticleID( 240 ) , mass1 ) ; + * fitter -> addConstraint ( LHCb::ParticleID( 140 ) , mass2 ) ; * * // fit it ! - * StatusCode sc = fitter -> fit ( p ) ; // fit it!! - * if ( sc.isFailure() ) { ... } + * StatusCode sc = fitter -> fit ( p ) ; // fit it!! + * if ( sc.isFailure() ) { ... } * - * @endcode + * @endcode * - * @attention Mass-constraints is active only for the next call + * @attention Mass-constraints is active only for the next call * of IDecayTreeFit::fit - * + * * @param pid (INPUT) particle-ID to be constrained */ - virtual void addConstraint ( const LHCb::ParticleID& pid , + virtual void addConstraint ( const LHCb::ParticleID& pid , const double mass ) = 0 ; - // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected desctructor - virtual ~IDecayTreeFit() ; // virtual and protected desctructor // ========================================================================== } ; // ============================================================================ -// The END +// The END // ============================================================================ #endif // KERNEL_IDECAYTREEFIT_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IDecodeSimpleDecayString.h b/Phys/DaVinciInterfaces/Kernel/IDecodeSimpleDecayString.h index 1dcaf291b..6b098eb43 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDecodeSimpleDecayString.h +++ b/Phys/DaVinciInterfaces/Kernel/IDecodeSimpleDecayString.h @@ -1,6 +1,5 @@ -// $Id: IDecodeSimpleDecayString.h,v 1.5 2010-01-14 08:00:24 pkoppenb Exp $ // ============================================================================ -#ifndef KERNEL_IDECODESIMPLEDECAYSTRING_H +#ifndef KERNEL_IDECODESIMPLEDECAYSTRING_H #define KERNEL_IDECODESIMPLEDECAYSTRING_H 1 // ============================================================================ // Include files @@ -18,25 +17,22 @@ // ============================================================================ namespace Decays { class Decay ; } // ============================================================================ -/** @class IDecodeSimpleDecayString +/** @class IDecodeSimpleDecayString * IDecodeSimpleDecayString.h Kernel/IDecodeSimpleDecayString.h - * + * * * @author Patrick KOPPENBURG * @date 2004-06-30 */ -class GAUDI_API IDecodeSimpleDecayString : virtual public IAlgTool +struct GAUDI_API IDecodeSimpleDecayString : extend_interfaces<IAlgTool> { -public: // ========================================================================== /// interface machinery DeclareInterfaceID(IDecodeSimpleDecayString, 4, 0); // ========================================================================== -public: - // ========================================================================== virtual StatusCode setDescriptor ( const std::string& ) = 0; virtual std::string getDescriptor () const = 0; - virtual StatusCode getStrings + virtual StatusCode getStrings ( std::string& , std::vector<std::string>&) const = 0; virtual StatusCode getPIDs (int&, std::vector<int>&) const = 0; @@ -46,37 +42,30 @@ public: (int&, std::vector<int>&) const = 0; virtual bool is_cc() const = 0; // ========================================================================== -public: - // ========================================================================== - /** get the decay form the descriptor - * @param decay (output) the decay - * @return status code + /** get the decay form the descriptor + * @param decay (output) the decay + * @return status code */ - virtual StatusCode getDecay + virtual StatusCode getDecay ( Decays::Decay& decay ) const = 0 ; // ========================================================================== - /** get the charge conjugated decay form the descriptor - * @param decay (output) the decay - * @return status code + /** get the charge conjugated decay form the descriptor + * @param decay (output) the decay + * @return status code */ - virtual StatusCode getDecay_cc + virtual StatusCode getDecay_cc ( Decays::Decay& decay ) const = 0 ; // ========================================================================== - /** get all decays form the descriptor + /** get all decays form the descriptor * @param decays (output) the vector of decays - * @return status code + * @return status code */ - virtual StatusCode getDecays + virtual StatusCode getDecays ( std::vector<Decays::Decay>& decays ) const = 0 ; // ========================================================================== -protected: - // ========================================================================== - /// virtual & protected desctructor - virtual ~IDecodeSimpleDecayString() ; // virtual & protected desctructor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // KERNEL_IDECODESIMPLEDECAYSTRING_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IDirectionFit.h b/Phys/DaVinciInterfaces/Kernel/IDirectionFit.h index 05f1a0156..942f11294 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDirectionFit.h +++ b/Phys/DaVinciInterfaces/Kernel/IDirectionFit.h @@ -1,6 +1,5 @@ -// $Id: IDirectionFit.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ // ============================================================================ -#ifndef DAVINCIKERNEL_IDIRECTIONFIT_H +#ifndef DAVINCIKERNEL_IDIRECTIONFIT_H #define DAVINCIKERNEL_IDIRECTIONFIT_H 1 // ============================================================================ // Include files @@ -13,7 +12,7 @@ // ============================================================================ #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// VertexFitters +// VertexFitters // ============================================================================ #include "Kernel/IParticleReFitter.h" // ============================================================================ @@ -23,88 +22,80 @@ namespace LHCb { class VertexBase ; } * * The "concrete" interface for "direction fitter". * It inherits from "basic" abstract intterface IParticleReFitter. - * Since this type of constrains is not "primary" constrain + * Since this type of constrains is not "primary" constrain * I see no reason to inherit it from IParticleCombiner. * * The interface includes 2 series of methods - * - @c fit using the information from external Primary vertex + * - @c fit using the information from external Primary vertex * with *NO* change of the primary vertex. * - IParticleReFitter::reFit * - * It is assumed that IParticleReFitter::reFit method - * in implemented through @c fit - * - * @code + * It is assumed that IParticleReFitter::reFit method + * in implemented through @c fit * - * StatusCode reFit( LHCb::Particle& particle ) const + * @code + * + * StatusCode reFit( LHCb::Particle& particle ) const * { * // Get the primary vertex (implementation dependent) - * // e.g. it coudl be a vertex with minimal impact parameter, - * // or a vertex with minimal impact parameter significantce + * // e.g. it coudl be a vertex with minimal impact parameter, + * // or a vertex with minimal impact parameter significantce * // alfo additional constrains may be applyes, e.g. - * // "the vertex with minimal impact parameter choosed from all - * // downstream vertices". - * const LHCb::Vertex* primary = .... + * // "the vertex with minimal impact parameter choosed from all + * // downstream vertices". + * const LHCb::Vertex* primary = .... + * + * return fit( *primary , particle ) ; + * } ; * - * return fit( *primary , particle ) ; - * } ; - * - * @endcode + * @endcode * - * @author Vanya BELYAEV belyaev@lapp.in2p3.fr + * @author Vanya BELYAEV belyaev@lapp.in2p3.fr * @date 2004-12-19 */ -class GAUDI_API IDirectionFit : virtual public IParticleReFitter +struct GAUDI_API IDirectionFit : extend_interfaces< IParticleReFitter > { -public: // ========================================================================== /// interface machinery DeclareInterfaceID(IDirectionFit, 2, 0); // ========================================================================== -public: - // ========================================================================== /** perform a "direction" fit for the particle. - * The angle between the momentum of the particle - * and the vectro from primary vertex to the decay + * The angle between the momentum of the particle + * and the vectro from primary vertex to the decay * vertex of the particle is constrained to 0. - * - * @code - * + * + * @code + * * // locate the tool: * const IDirectionFit* fitter = tool<IDirectionFit>( ... ) ; - * + * * // primary vertex: * const LHCb::Vertex* primary = ... ; - * + * * // Bs-candidate: - * LHCb::Particle* Bs = ... ; + * LHCb::Particle* Bs = ... ; * * StatusCode sc = fitter->fit( primary , Bs ) ; - * if ( sc.isFailure() ) - * { Warning("Error in direction fit", sc ) ; } + * if ( sc.isFailure() ) + * { Warning("Error in direction fit", sc ) ; } * - * @endcode + * @endcode * * @see Particle - * @see Vertex + * @see Vertex * @see GaudiAlgorithm::tool - * + * * @param particle particle to be constrained (output) - * @param primary primary vertex (input) - * @return status code + * @param primary primary vertex (input) + * @return status code */ - virtual StatusCode fit + virtual StatusCode fit ( const LHCb::VertexBase& primary , LHCb::Particle& particle ) const = 0 ; // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IDirectionFit() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IDIRECTIONFIT_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IDistanceCalculator.h b/Phys/DaVinciInterfaces/Kernel/IDistanceCalculator.h index de263a8be..de2d74170 100644 --- a/Phys/DaVinciInterfaces/Kernel/IDistanceCalculator.h +++ b/Phys/DaVinciInterfaces/Kernel/IDistanceCalculator.h @@ -1,6 +1,5 @@ -// $Id: IDistanceCalculator.h,v 1.6 2010-06-02 10:57:04 jpalac Exp $ // ============================================================================ -#ifndef DAVINCIKERNEL_IDISTANCECALCULATOR_H +#ifndef DAVINCIKERNEL_IDISTANCECALCULATOR_H #define DAVINCIKERNEL_IDISTANCECALCULATOR_H 1 // ============================================================================ // Include files @@ -12,16 +11,16 @@ // ============================================================================ // Forward declarations // ============================================================================ -namespace LHCb +namespace LHCb { - class Particle ; // Event/PhysEvent - class VertexBase ; // Event/RecEvent + class Particle ; // Event/PhysEvent + class VertexBase ; // Event/RecEvent class Track ; // Event/TrackEvent -} +} // ============================================================================= /** @class IDistanceCalculator Kernel/IDistanceCalculator.h * - * The abstract Interface for "Distance Calculator", the tool which + * The abstract Interface for "Distance Calculator", the tool which * is able to perform calculation of the various "distances" * * Currenly it allows to evaluate "distances" for follwowing pairs of objects: @@ -34,120 +33,117 @@ namespace LHCb * - the vertex and the fixed point ("vertex separation" * - the track and the vertex ("impact parameter") * - the track and the track ("the distance of closest approach") - * - the "path-distance" form the production vertex to decay vertex - * - the "projected-distance" form the production vertex to decay vertex - * + * - the "path-distance" form the production vertex to decay vertex + * - the "projected-distance" form the production vertex to decay vertex + * * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl - * @date 2008-03-05 - * + * @date 2008-03-05 + * * $Revision$ * Last Modification $Date$ * by $Author$ - * + * */ -class GAUDI_API IDistanceCalculator : virtual public IAlgTool +struct GAUDI_API IDistanceCalculator : extend_interfaces< IAlgTool > { -public: // ========================================================================== /// interface machinery DeclareInterfaceID(IDistanceCalculator, 5, 0); // ========================================================================== -public: - // ========================================================================== - /** @defgroup ParticleVertex Methods to evaluate distances between + /** @defgroup ParticleVertex Methods to evaluate distances between * "particle" and "vertex" * * @{ */ // ========================================================================== /** The method for the evaluation of the impact parameter ("distance") - * vector of the particle with respect to some vertex. - * - * The impact parameter is dedined as the length of the + * vector of the particle with respect to some vertex. + * + * The impact parameter is dedined as the length of the * vector form the vertex to the nearest point on the particle trajectory: - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trakjectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the vertex * * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const LHCb::VertexBase* primary = ... ; - * - * double impact = -1 * Gaudi::Units::km ; - * - * // use the tool to evaluate the impact parameter vector + * + * double impact = -1 * Gaudi::Units::km ; + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , vertex , impact ) ; * - * @endcode + * @endcode * - * @param particle (input) pointer to the particle - * @param vertex (input) pointer to the vertex - * @param imppar (output) the value of impact parameter ("distance") + * @param particle (input) pointer to the particle + * @param vertex (input) pointer to the vertex + * @param imppar (output) the value of impact parameter ("distance") * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , - const LHCb::VertexBase* vertex , - double& imppar , + const LHCb::VertexBase* vertex , + double& imppar , const bool allow = false ) const = 0 ; // ========================================================================== /** The method for the evaluation of the impact parameter ("distance") * of the particle with respect to some vertex and its \f$\chi^2\f$-significance - * - * The impact parameter is dedined as the length of the + * + * The impact parameter is dedined as the length of the * vector form the vertex to the nearest point on the particle trajectory: - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trakjectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the vertex * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const LHCb::VertexBase* primary = ... ; - * - * double impact = -1 * Gaudi::Units::km ; + * + * double impact = -1 * Gaudi::Units::km ; * double chi2 = -1000 ; - * - * // use the tool to evaluate the impact parameter vector + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , vertex , impact , chi2 ) ; - * + * * // evaluate "pseudo-significance": * const double significance = sqrt ( chi2 ) ; // ATTENTION!!! * - * @endcode + * @endcode * - * @param particle (input) pointer to the particle - * @param vertex (input) pointer to the vertex - * @param imppar (output) the value of impact parameter ("distance") - * @param chi2 (output) the chi2-value for the impact parameter. - * It is defined as the increase of the chi2 of the PV - * vertex fit when one adds the track into the vertex. + * @param particle (input) pointer to the particle + * @param vertex (input) pointer to the vertex + * @param imppar (output) the value of impact parameter ("distance") + * @param chi2 (output) the chi2-value for the impact parameter. + * It is defined as the increase of the chi2 of the PV + * vertex fit when one adds the track into the vertex. * It behaves almost like (IP/IP_error)^2 * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , - const LHCb::VertexBase* vertex , - double& imppar , - double& chi2 , + const LHCb::VertexBase* vertex , + double& imppar , + double& chi2 , const bool allow = false ) const = 0 ; // ========================================================================== /// @} @@ -161,98 +157,98 @@ public: */ // ========================================================================== /** the basic method for the evaluation of the impact parameter ("distance") - * vector of the particle with respect to some vertex. - * - * The impact parameter is defined as the length of the - * vector form the fixed point + * vector of the particle with respect to some vertex. + * + * The impact parameter is defined as the length of the + * vector form the fixed point * to the nearest point on the particle trajectory: * - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trakjectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the fixed point. * * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const Gaudi::XYZPoint& point = ... ; - * - * double impact = -1 * Gaudi::Units::km ; - * - * // use the tool to evaluate the impact parameter vector + * + * double impact = -1 * Gaudi::Units::km ; + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , point , impact ) ; * - * @endcode + * @endcode * - * @param particle (input) pointer to the particle - * @param point (input) the fixed point - * @param imppar (output) the value of impact parameter ("distance") + * @param particle (input) pointer to the particle + * @param point (input) the fixed point + * @param imppar (output) the value of impact parameter ("distance") * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , - const Gaudi::XYZPoint& point , - double& imppar , + const Gaudi::XYZPoint& point , + double& imppar , const bool allow = false ) const = 0 ; // ========================================================================== /** the basic method for the evaluation of the impact parameter ("distance") - * of the particle with respect to some vertex and + * of the particle with respect to some vertex and * its \f$\chi^2\f$-significance - * - * The impact parameter is defined as the length of - * the vector from the fixed point + * + * The impact parameter is defined as the length of + * the vector from the fixed point * to the nearest point on the particle trajectory: * - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trajectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the fixed point. * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const Gaudi::XYZPoint& point = ... ; - * - * double impact = -1 * Gaudi::Units::km ; + * + * double impact = -1 * Gaudi::Units::km ; * double chi2 = -1000 ; - * - * // use the tool to evaluate the impact parameter vector + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , point , impact , chi2 ) ; - * + * * // evaluate "pseudo-significance": * const double significance = sqrt ( chi2 ) ; // ATTENTION!!! * - * @endcode + * @endcode * - * @param particle (input) pointer to the particle - * @param point (input) the fixed point - * @param imppar (output) the value of impact parameter ("distance") - * @param chi2 (output) the chi2-value for the impact parameter. - * It is defined as the increase of the chi2 of the PV + * @param particle (input) pointer to the particle + * @param point (input) the fixed point + * @param imppar (output) the value of impact parameter ("distance") + * @param chi2 (output) the chi2-value for the impact parameter. + * It is defined as the increase of the chi2 of the PV * vertex fit when one adds the track into the vertex. - * It behaves almost like (IP/IP_error)^2 + * It behaves almost like (IP/IP_error)^2 * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , - const Gaudi::XYZPoint& point , - double& imppar , - double& chi2 , + const Gaudi::XYZPoint& point , + double& imppar , + double& chi2 , const bool allow = false ) const = 0 ; // ========================================================================== /// @} @@ -265,88 +261,88 @@ public: * @{ */ // ========================================================================== - /** the basic method for the evaluation of the impact parameter vector + /** the basic method for the evaluation of the impact parameter vector * vector of the particle with respect to some fixed point - * - * The impact parameter is defined as the length of the - * vector form the fixed point + * + * The impact parameter is defined as the length of the + * vector form the fixed point * to the nearest point on the particle trajectory: * - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trakjectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the fixed point. * * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const Gaudi::XYZPoint& point = ... ; * Gaudi::XYZVector impvec ; - * - * // use the tool to evaluate the impact parameter vector + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , point , impvec ) ; * - * @endcode + * @endcode * - * @param particle (INPUT) pointer to the particle - * @param point (INPUT) the fixed point + * @param particle (INPUT) pointer to the particle + * @param point (INPUT) the fixed point * @param impvec (INPUT) the vector value of impact parameter * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , const Gaudi::XYZPoint& point , - Gaudi::XYZVector& impvec , + Gaudi::XYZVector& impvec , const bool allow = false ) const = 0 ; // ========================================================================== - /** the basic method for the evaluation of the impact parameter vector - * vector of the particle with respect to some vertex - * - * The impact parameter is defined as the length of the - * vector form the fixed point + /** the basic method for the evaluation of the impact parameter vector + * vector of the particle with respect to some vertex + * + * The impact parameter is defined as the length of the + * vector form the fixed point * to the nearest point on the particle trajectory: * - * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - + * \f[ \vec{i} = \vec{\mathbf{v}}_{p} - \vec{\mathbf{v}}_{0} - * \vec{\mathbf{p}}\frac{\left(\vec{\mathbf{v}}_{p}- * \vec{\mathbf{v}}_{0}\right)\vec{\mathbf{p}}} * {\vec{\mathbf{p}}^2}, \f] * where the particle trakjectory is parameterized as - * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, + * \f$\vec{\mathbf{v}}\left(t\right)=\vec{\mathbf{v}}_{p}+\vec{\mathbf{p}}t\f$, * and \f$\vec{\mathbf{v}}_{0}\f$ stands for the position of the fixed point. * * * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; * const LHCb::VertexBase* vertex = ... ; * Gaudi::XYZVector impvec ; - * - * // use the tool to evaluate the impact parameter vector + * + * // use the tool to evaluate the impact parameter vector * StatusCode sc = tool -> distance ( particle , point , impvec ) ; * - * @endcode + * @endcode * - * @param particle (INPUT) pointer to the particle - * @param vertex (INPUT) the vertex + * @param particle (INPUT) pointer to the particle + * @param vertex (INPUT) the vertex * @param impvec (INPUT) the vector value of impact parameter * @param allow (input) allow transition to VD category? - * @return status code + * @return status code */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Particle* particle , const LHCb::VertexBase* vertex , - Gaudi::XYZVector& impvec , + Gaudi::XYZVector& impvec , const bool allow = false ) const = 0 ; // ========================================================================== /// @} @@ -358,285 +354,285 @@ public: * @{ */ // ========================================================================== - /** The trivial method for evaluation of the distance between two vertices - * - * The distance is trivially defined as the length of the vector + /** The trivial method for evaluation of the distance between two vertices + * + * The distance is trivially defined as the length of the vector * \f$\vec{\mathbf{d}}\f$: * - * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}}_2 - \vec{\mathbf{v}}_1,\f] - * where \f$\vec{\mathbf{v}}_1\f$ + * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}}_2 - \vec{\mathbf{v}}_1,\f] + * where \f$\vec{\mathbf{v}}_1\f$ * and \f$\vec{\mathbf{v}}_1\f$ are positions - * of the first and the second vertices + * of the first and the second vertices * - * @code + * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::VertexBase* primary = ... ; - * const LHCb::VertexBase* secondary = ... ; + * const LHCb::VertexBase* secondary = ... ; * - * double dist = -1 * Gaudi::Units::km ; + * double dist = -1 * Gaudi::Units::km ; * * // use the tool to evaluate the distance * StatusCode sc = tool -> distance ( primary , secondary , dist ) ; * * @endcode * - * @param v1 (input) the pointr to the first vertex - * @param v2 (input) the pointer to the second vertex - * @param dist (output) the distance between two vertices - * @return status code + * @param v1 (input) the pointr to the first vertex + * @param v2 (input) the pointer to the second vertex + * @param dist (output) the distance between two vertices + * @return status code */ - virtual StatusCode distance - ( const LHCb::VertexBase* v1 , - const LHCb::VertexBase* v2 , + virtual StatusCode distance + ( const LHCb::VertexBase* v1 , + const LHCb::VertexBase* v2 , double& dist ) const = 0 ; - // ========================================================================== - /** The method for evaluation of the distance between two vertices and the + // ========================================================================== + /** The method for evaluation of the distance between two vertices and the * corresponding \f$\chi^2\f$ for the separation significance. * - * The distance is trivially defined as the length of the vector + * The distance is trivially defined as the length of the vector * \f$\vec{\mathbf{d}}\f$: * - * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}}_2 - \vec{\mathbf{v}}_1,\f] + * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}}_2 - \vec{\mathbf{v}}_1,\f] * where \f$\vec{\mathbf{v}}_1\f$ and \f$\vec{\mathbf{v}}_1\f$ are positions - * of the first and the second vertices + * of the first and the second vertices * - * @code + * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::VertexBase* primary = ... ; - * const LHCb::VertexBase* secondary = ... ; + * const LHCb::VertexBase* secondary = ... ; * - * double dist = -1 * Gaudi::Units::km ; - * double chi2 = -1000 ; + * double dist = -1 * Gaudi::Units::km ; + * double chi2 = -1000 ; * * // use the tool to evaluate the distance * StatusCode sc = tool -> distance ( primary , secondary , dist , chi2 ) ; * * @endcode * - * @param v1 (input) the pointr to the first vertex - * @param v2 (input) the pointer to the second vertex - * @param dist (output) the distance between two vertices + * @param v1 (input) the pointr to the first vertex + * @param v2 (input) the pointer to the second vertex + * @param dist (output) the distance between two vertices * @param chi2 (output) the chi2 of the separation significance - * @return status code + * @return status code */ - virtual StatusCode distance - ( const LHCb::VertexBase* v1 , - const LHCb::VertexBase* v2 , - double& dist , + virtual StatusCode distance + ( const LHCb::VertexBase* v1 , + const LHCb::VertexBase* v2 , + double& dist , double& chi2 ) const = 0 ; // ========================================================================== /// @} // ========================================================================== public: // ========================================================================== - /** @defgroup VertexPoint Methods to evaluate distances between - * a vertex and a fixed point + /** @defgroup VertexPoint Methods to evaluate distances between + * a vertex and a fixed point * * @{ */ // ========================================================================== - /** The trivial method for evaluation of the distance between the vertex + /** The trivial method for evaluation of the distance between the vertex * and some "fixed" point - * - * The distance is trivially defined as the length of the vector + * + * The distance is trivially defined as the length of the vector * \f$\vec{\mathbf{d}}\f$: * - * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}} - \vec{\mathbf{p}},\f] + * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}} - \vec{\mathbf{p}},\f] * where \f$\vec{\mathbf{v}}\f$ and \f$\vec{\mathbf{v}}\f$ are positions - * of the veretx and the fixed point + * of the veretx and the fixed point * - * @code + * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * - * const LHCb::VertexBase* secondary = ... ; + * const LHCb::VertexBase* secondary = ... ; * const Gaudi::XYZPoint& primary = ... ; * - * double dist = -1 * Gaudi::Units::km ; + * double dist = -1 * Gaudi::Units::km ; * * // use the tool to evaluate the distance * StatusCode sc = tool -> distance ( secondary , primary , dist ) ; * * @endcode * - * @param v (input) the pointr to the first vertex - * @param p (input) the fixed point - * @param dist (output) the distance between two vertices - * @return status code + * @param v (input) the pointr to the first vertex + * @param p (input) the fixed point + * @param dist (output) the distance between two vertices + * @return status code */ - virtual StatusCode distance - ( const LHCb::VertexBase* v , - const Gaudi::XYZPoint& p , + virtual StatusCode distance + ( const LHCb::VertexBase* v , + const Gaudi::XYZPoint& p , double& dist ) const = 0 ; - // ========================================================================== - /** The method for evaluation of the distance between the vertices - * and soem fixed point and the corresponding \f$\chi^2\f$ for + // ========================================================================== + /** The method for evaluation of the distance between the vertices + * and soem fixed point and the corresponding \f$\chi^2\f$ for * the separation significance. - * - * The distance is trivially defined as the length of the vector + * + * The distance is trivially defined as the length of the vector * \f$\vec{\mathbf{d}}\f$: * - * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}} - \vec{\mathbf{p}},\f] + * \f[ \vec{\mathbf{d}} = \vec{\mathbf{v}} - \vec{\mathbf{p}},\f] * where \f$\vec{\mathbf{v}}\f$ and \f$\vec{\mathbf{v}}\f$ are positions - * of the vertex and the fixed point + * of the vertex and the fixed point * - * @code + * @code * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * // get the tool + * const IDistanceCalculator* tool = ... ; * - * const LHCb::VertexBase* secondary = ... ; + * const LHCb::VertexBase* secondary = ... ; * const Gaudi::XYZPoint& primary = ... ; * - * double dist = -1 * Gaudi::Units::km ; - * double chi2 = -1000 ; + * double dist = -1 * Gaudi::Units::km ; + * double chi2 = -1000 ; * * // use the tool to evaluate the distance * StatusCode sc = tool -> distance ( secondary , primary , dist , chi2 ) ; * * @endcode * - * @param v (input) the pointer to the first vertex - * @param p (input) the fixed point - * @param dist (output) the distance between two vertices + * @param v (input) the pointer to the first vertex + * @param p (input) the fixed point + * @param dist (output) the distance between two vertices * @param chi2 (output) the chi2 of the separation significance - * @return status code + * @return status code */ - virtual StatusCode distance - ( const LHCb::VertexBase* v , - const Gaudi::XYZPoint& p , - double& dist , + virtual StatusCode distance + ( const LHCb::VertexBase* v , + const Gaudi::XYZPoint& p , + double& dist , double& chi2 ) const = 0 ; - // ========================================================================== + // ========================================================================== /// @} // ========================================================================== public: // ========================================================================== - /** @defgroup ParticleParticle Methods to evaluate distances - * between two particles + /** @defgroup ParticleParticle Methods to evaluate distances + * between two particles * * @{ */ // ========================================================================== - /** The method for evaluation of the scalar distance between two particles, - * aka "distance of the closest approach". + /** The method for evaluation of the scalar distance between two particles, + * aka "distance of the closest approach". * - * The distance is defined as the the shortest legth vector between - * the point on the first trajectory and the point on the second + * The distance is defined as the the shortest legth vector between + * the point on the first trajectory and the point on the second * trajectory - * + * * @code - * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* p1 = ... ; * const LHCb::Particle* p2 = ... ; - * - * double dist ; - * + * + * double dist ; + * * // use the tool: * StatusCode sc = tool -> distance ( p1 , p2 , dist ) ; - * - * @endcode * - * @param p1 (input) the pointer to the first particle - * @param p2 (input) the pointer to the second particle - * @param dist (output) the shortest distance between two trajectories + * @endcode + * + * @param p1 (input) the pointer to the first particle + * @param p2 (input) the pointer to the second particle + * @param dist (output) the shortest distance between two trajectories * @param allow (input) allow transition to IP category? - * @return status code + * @return status code */ - virtual StatusCode distance - ( const LHCb::Particle* p1 , - const LHCb::Particle* p2 , - double& dist , + virtual StatusCode distance + ( const LHCb::Particle* p1 , + const LHCb::Particle* p2 , + double& dist , const bool allow = false ) const = 0 ; // ========================================================================== - /** The method for evaluation of the scalar distance between two particles, - * aka "distance of the closest approach" and also its - * \f$\chi^2\f$ for separation significance + /** The method for evaluation of the scalar distance between two particles, + * aka "distance of the closest approach" and also its + * \f$\chi^2\f$ for separation significance * - * The distance is defined as the the shortest length vector between - * the point on the first trajectory and the point on the second + * The distance is defined as the the shortest length vector between + * the point on the first trajectory and the point on the second * trajectory - * + * * @code - * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* p1 = ... ; * const LHCb::Particle* p2 = ... ; - * - * double dist = -1 * Gaudi::Units::km ; + * + * double dist = -1 * Gaudi::Units::km ; * double chi2 = -1000 ; - * + * * // use the tool: * StatusCode sc = tool -> distance ( p1 , p2 , dist , chi2 ) ; - * - * @endcode * - * @param p1 (input) the pointer to the first particle - * @param p2 (input) the pointer to the second particle - * @param dist (output) the shortest diostance between trajectories + * @endcode + * + * @param p1 (input) the pointer to the first particle + * @param p2 (input) the pointer to the second particle + * @param dist (output) the shortest diostance between trajectories * @param chi2 (output) chi2-estimate for the separation significance * @param allow (input) allow transition to IP category? - * @return status code + * @return status code */ - virtual StatusCode distance - ( const LHCb::Particle* p1 , + virtual StatusCode distance + ( const LHCb::Particle* p1 , const LHCb::Particle* p2 , - double& dist , + double& dist , double& chi2 , const bool allow = false ) const = 0 ; // ========================================================================== - /// @} + /// @} // ========================================================================== public: // ======================================================================== - /** @defgroup TrackVertex - * Evaluation of the distance between the track and vertex + /** @defgroup TrackVertex + * Evaluation of the distance between the track and vertex * @{ */ - // ======================================================================== - /** evaluate the impact parameter of the track with respect to the vertex - * @param track (input) the track - * @param vertex (input) the vertex + // ======================================================================== + /** evaluate the impact parameter of the track with respect to the vertex + * @param track (input) the track + * @param vertex (input) the vertex * @param imppar (output) the value of impact parameter */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Track* track , - const LHCb::VertexBase* vertex , + const LHCb::VertexBase* vertex , double& imppar ) const = 0 ; - // ======================================================================== - /** evaluate the impact parameter of the track with respect to the vertex - * @param track (input) the track - * @param vertex (input) the vertex + // ======================================================================== + /** evaluate the impact parameter of the track with respect to the vertex + * @param track (input) the track + * @param vertex (input) the vertex * @param imppar (output) the value of impact parameter - * @param chi2 (output) chi2 of impact parameter + * @param chi2 (output) chi2 of impact parameter */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Track* track , - const LHCb::VertexBase* vertex , - double& imppar , + const LHCb::VertexBase* vertex , + double& imppar , double& chi2 ) const = 0 ; - /** evaluate the impact parameter of the track with respect to the vertex - * @param track (input) the track - * @param vertex (input) the vertex + /** evaluate the impact parameter of the track with respect to the vertex + * @param track (input) the track + * @param vertex (input) the vertex * @param imppar (output) the value of impact parameter */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Track* track , - const LHCb::VertexBase* vertex , + const LHCb::VertexBase* vertex , Gaudi::XYZVector& impact ) const = 0 ; - // ======================================================================== + // ======================================================================== /// @} // ======================================================================== public: @@ -645,29 +641,29 @@ public: * Evaluation of the distance between the tracks * @{ */ - // ======================================================================== + // ======================================================================== /** evaluate the distance between two tracks - * @param track1 (input) the first track - * @param track2 (input) the second track - * @param doca (output) the value of distance + * @param track1 (input) the first track + * @param track2 (input) the second track + * @param doca (output) the value of distance */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Track* track1 , const LHCb::Track* track2 , double& doca ) const = 0 ; - // ======================================================================== + // ======================================================================== /** evaluate the distance between two tracks - * @param track1 (input) the first track - * @param track2 (input) the second track - * @param doca (output) the value of distance - * @param chi2 (output) the chi2 of distance + * @param track1 (input) the first track + * @param track2 (input) the second track + * @param doca (output) the value of distance + * @param chi2 (output) the chi2 of distance */ - virtual StatusCode distance + virtual StatusCode distance ( const LHCb::Track* track1 , const LHCb::Track* track2 , - double& doca , + double& doca , double& chi2 ) const = 0 ; - // ======================================================================== + // ======================================================================== /// @} // ======================================================================== public: @@ -677,104 +673,99 @@ public: * @{ */ // ========================================================================== - /** The method for evaluation of the "path"-distance + /** The method for evaluation of the "path"-distance * between the decay vertex of the particle and the vertex. - * - * The path-distance, + * + * The path-distance, * is defined as the value of the scalar parameter \f$s\f$ - * from the vector equation: + * from the vector equation: * - * \f[ \vec{\mathbf{v}}_{decay} = \vec{\mathbf{v}}_{production} + + * \f[ \vec{\mathbf{v}}_{decay} = \vec{\mathbf{v}}_{production} + * \frac{\vec{\mathbf{p}}}{\left|\vec{\mathbf{p}}\right|}s \f] - * - * Clearly this vector-equation has the solution only in the - * sence of \f$\chi^2\f$ solution, and the parameter \f$s\f$ is + * + * Clearly this vector-equation has the solution only in the + * sence of \f$\chi^2\f$ solution, and the parameter \f$s\f$ is * closely related to the particle proper time \f$c\tau\f$. * * @code - * - * // get the tool - * const IDistanceCalculator* tool = ... ; + * + * // get the tool + * const IDistanceCalculator* tool = ... ; * * const LHCb::Particle* particle = ... ; - * const LHCb::VertexBase* primary = ... ; - * - * double dist = -1 * Gaudi::Units::km ; - * double err = -1 * Gaudi::Units::km ; + * const LHCb::VertexBase* primary = ... ; + * + * double dist = -1 * Gaudi::Units::km ; + * double err = -1 * Gaudi::Units::km ; * double chi2 = -1000 ; - * + * * // use the tool: - * StatusCode sc = tool -> pathDistance - * ( particle , + * StatusCode sc = tool -> pathDistance + * ( particle , * primary , dist , err , chi2 ) ; - * - * @endcode - * - * @param particle (input) the pointer to the particle + * + * @endcode + * + * @param particle (input) the pointer to the particle * @param vertex (input) the pointer to the production vertex * @param path (output) the "path-distance" - * @param errror (output) the estimate of the uncertanti in + * @param errror (output) the estimate of the uncertanti in * the projected distance - * @param chi2 (output) the overall chi2 the procedure, + * @param chi2 (output) the overall chi2 the procedure, * which is the measure of the consistency - * @return status code + * @return status code */ - virtual StatusCode pathDistance - ( const LHCb::Particle* particle , - const LHCb::VertexBase* vertex , + virtual StatusCode pathDistance + ( const LHCb::Particle* particle , + const LHCb::VertexBase* vertex , double& path , - double& errror , + double& errror , double& chi2 ) const = 0 ; // ========================================================================== - /** Calculate the projected distance + /** Calculate the projected distance * * \f$s=\frac{\left(\vec{\mathbf{v}}\vec{\mathbf{p}} * \right)}{\left|\vec{\mathbf{p}}\right|}\f$, - * where vector \f$\vec{\mathbf{v}}\f$ is a vector from - * the primary to the secondary vertex: + * where vector \f$\vec{\mathbf{v}}\f$ is a vector from + * the primary to the secondary vertex: * \f$\vec{\mathbf{v}}=\vec{\mathbf{x}}_{d}-\vec{\mathbf{x}}_{pv}\f$, * - * @param[in] particle the pointer to the particle - * @param[in] primary the pointer to the production vertex + * @param[in] particle the pointer to the particle + * @param[in] primary the pointer to the production vertex * @param[out] dist the projected distance - * @return status code + * @return status code */ - virtual StatusCode projectedDistance - ( const LHCb::Particle* particle , - const LHCb::VertexBase* primary , + virtual StatusCode projectedDistance + ( const LHCb::Particle* particle , + const LHCb::VertexBase* primary , double& dist ) const = 0 ; // ========================================================================== - /** Calculate the projected distance + /** Calculate the projected distance * * \f$s=\frac{\left(\vec{\mathbf{v}}\vec{\mathbf{p}} * \right)}{\left|\vec{\mathbf{p}}\right|}\f$, - * where vector \f$\vec{\mathbf{v}}\f$ is a vector from - * the primary to the secondary vertex: + * where vector \f$\vec{\mathbf{v}}\f$ is a vector from + * the primary to the secondary vertex: * \f$\vec{\mathbf{v}}=\vec{\mathbf{x}}_{d}-\vec{\mathbf{x}}_{pv}\f$, - * and its error + * and its error * - * @param particle (input) the pointer to the particle - * @param primary (input) the pointer to the production vertex + * @param particle (input) the pointer to the particle + * @param primary (input) the pointer to the production vertex * @param dist (output) the projected distance - * @param error (output) the estimate of the error in the distance - * @return status code + * @param error (output) the estimate of the error in the distance + * @return status code */ - virtual StatusCode projectedDistance - ( const LHCb::Particle* particle , - const LHCb::VertexBase* primary , - double& dist , + virtual StatusCode projectedDistance + ( const LHCb::Particle* particle , + const LHCb::VertexBase* primary , + double& dist , double& error ) const = 0 ; // ========================================================================== /// @} // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IDistanceCalculator() ; // virtual and protected destrustor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IDISTANCECALCULATOR_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IExtraInfoTool.h b/Phys/DaVinciInterfaces/Kernel/IExtraInfoTool.h index d5646c7e9..36b807fc9 100644 --- a/Phys/DaVinciInterfaces/Kernel/IExtraInfoTool.h +++ b/Phys/DaVinciInterfaces/Kernel/IExtraInfoTool.h @@ -1,4 +1,4 @@ -#ifndef KERNEL_IEXTRAINFOTOOL_H +#ifndef KERNEL_IEXTRAINFOTOOL_H #define KERNEL_IEXTRAINFOTOOL_H 1 // Include files @@ -17,13 +17,11 @@ * @date 2012-02-18 */ -class GAUDI_API IExtraInfoTool : virtual public IAlgTool { +struct GAUDI_API IExtraInfoTool : extend_interfaces< IAlgTool >{ - public: DeclareInterfaceID( IExtraInfoTool, 1, 0 ); - public: /// Method to calculate extra information virtual StatusCode calculateExtraInfo(const LHCb::Particle* top, @@ -38,9 +36,6 @@ class GAUDI_API IExtraInfoTool : virtual public IAlgTool { /// Get the value of calculated parameter and its name (e.g. for the tuple tool) for the given ID virtual int getInfo(int index, double& value, std::string& name) = 0; - protected: - - virtual ~IExtraInfoTool(); }; diff --git a/Phys/DaVinciInterfaces/Kernel/IFilterParticles.h b/Phys/DaVinciInterfaces/Kernel/IFilterParticles.h index e2c95ab02..3d2b0be73 100644 --- a/Phys/DaVinciInterfaces/Kernel/IFilterParticles.h +++ b/Phys/DaVinciInterfaces/Kernel/IFilterParticles.h @@ -1,5 +1,4 @@ -// $Id: IFilterParticles.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ -#ifndef KERNEL_IFILTERPARTICLES_H +#ifndef KERNEL_IFILTERPARTICLES_H #define KERNEL_IFILTERPARTICLES_H 1 // Include files @@ -14,23 +13,19 @@ #include "Event/Particle.h" /** @class IFilterParticles IFilterParticles.h Kernel/IFilterParticles.h - * + * * * @author Juan Palacios * @date 2007-07-20 */ -class GAUDI_API IFilterParticles : virtual public IAlgTool +struct GAUDI_API IFilterParticles : extend_interfaces< IAlgTool > { - public: - DeclareInterfaceID(IFilterParticles, 2, 0); - public: - /// Test if filter is satisfied on ensemble of particles virtual bool isSatisfied( const LHCb::Particle::ConstVector& parts ) const = 0; - + /// Test if filter is satisfied on ensemble of particles inline bool operator()( const LHCb::Particle::ConstVector& parts ) const { diff --git a/Phys/DaVinciInterfaces/Kernel/IJetMaker.h b/Phys/DaVinciInterfaces/Kernel/IJetMaker.h index b3dfcae55..a7b5b1d7f 100644 --- a/Phys/DaVinciInterfaces/Kernel/IJetMaker.h +++ b/Phys/DaVinciInterfaces/Kernel/IJetMaker.h @@ -1,13 +1,9 @@ -// $Id: IJetMaker.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ -// ============================================================================ -// CVS tag $Name: not supported by cvs2svn $ , version $Revision: 1.3 $ -// ============================================================================ -#ifndef DAVINCIKERNEL_IJETMAKER_H +#ifndef DAVINCIKERNEL_IJETMAKER_H #define DAVINCIKERNEL_IJETMAKER_H 1 // ============================================================================ // Include files // ============================================================================ -// STD & STL +// STD & STL // ============================================================================ #include <string> #include <vector> @@ -16,223 +12,211 @@ // ============================================================================ #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// forward decalrations +// forward decalrations // ============================================================================ #include "Event/Particle.h" #include "Event/RecVertex.h" // ============================================================================ /** @class IJetMaker IJetMaker.h Kernel/IJetMaker.h * - * The abstract interface to Jet Maker + * The abstract interface to Jet Maker * - * @attention It is a responsibility of users (e.g. the algorithm) - * to take care about the ownership of jets *AND* their - * vertices). The tool is not intended to do it! + * @attention It is a responsibility of users (e.g. the algorithm) + * to take care about the ownership of jets *AND* their + * vertices). The tool is not intended to do it! * - * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr + * @author Vanya BELYAEV Ivan.Belyaev@lapp.in2p3.fr * @date 2005-07-26 */ -class GAUDI_API IJetMaker : public virtual IAlgTool +struct GAUDI_API IJetMaker : extend_interfaces<IAlgTool> { -public: // ========================================================================== - /// interface machinery + /// interface machinery DeclareInterfaceID(IJetMaker, 2, 0); // ========================================================================== -public: - // ========================================================================== - /// the actual type of input data container - typedef LHCb::Particle::ConstVector Input ; - /// the actual type of output container of jets - typedef LHCb::Particle::Vector Jets ; + /// the actual type of input data container + typedef LHCb::Particle::ConstVector Input ; + /// the actual type of output container of jets + typedef LHCb::Particle::Vector Jets ; // ========================================================================== -public: - // ========================================================================== - /** The main method: jet-finding procedure - * - * @code + /** The main method: jet-finding procedure + * + * @code * * // get the tool * const IJetMaker* jetMaker = tool<IJetMaker> ( .... ) ; * - * // input particles - * IJetMaker::Inputs input = ... - * // 1) + * // input particles + * IJetMaker::Inputs input = ... + * // 1) * // const Particles* particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles->begin() , particles->end() ) ; - * // 2) + * // 2) * // LHCb::Particle::ConstVector particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles.begin() , particles.end() ) ; - * // 3) + * // 3) * // LoKi::Range particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles.begin() , particles.end() ) ; * - * // placeholder for "output" jets + * // placeholder for "output" jets * IJetMaker::Jets jets ; * - * // find the jets! + * // find the jets! * StatusCode sc = jetMaker -> makeJets ( input , jets ) ; * * // make a loop over jets: - * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; - * jets.end() != iJet ; ++iJet ) + * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; + * jets.end() != iJet ; ++iJet ) * { - * // get the jet + * // get the jet * LHCb::Particle* jet = *iJet ; * } * - * @endcode + * @endcode + * + * @attention It is a responsibility of users (e.g. the algorithm) + * to take care about the ownership of jets *AND* their + * vertices). The tool is not intended to do it! + * * - * @attention It is a responsibility of users (e.g. the algorithm) - * to take care about the ownership of jets *AND* their - * vertices). The tool is not intended to do it! - * - * - * @param input contaainer of input particles - * @param jets container of output jets - * @return status code + * @param input contaainer of input particles + * @param jets container of output jets + * @return status code */ - virtual StatusCode makeJets + virtual StatusCode makeJets ( const Input& input , Jets& jets ) const = 0 ; - // ========================================================================== + // ========================================================================== /** perform jet-finding procedute getting the input data from - * arbitrary sequence of data, convertible to "const LHCb::Particle*", - * e.g. LHCb::Particle::ConstVector, Particles, LoKi::Range, etc... + * arbitrary sequence of data, convertible to "const LHCb::Particle*", + * e.g. LHCb::Particle::ConstVector, Particles, LoKi::Range, etc... + * + * @code * - * @code - * * // get the tool * const IJetMaker* jetMaker = tool<IJetMaker> ( .... ) ; * - * // get input data + * // get input data * const Particles* ps = get<Particles> ( ... ) ; - * - * // output jets + * + * // output jets * IJetMaker::Jets jets ; * - * // find the jets! - * StatusCode sc = jetMaker -> makeJets ( ps -> begin () , + * // find the jets! + * StatusCode sc = jetMaker -> makeJets ( ps -> begin () , * ps -> end () , jets ) ; * - * + * * // make a loop over jets: - * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; - * jets.end() != iJet ; ++iJet ) + * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; + * jets.end() != iJet ; ++iJet ) * { - * // get the jet + * // get the jet * LHCb::Particle* jet = *iJet ; * } * - * @endcode + * @endcode + * + * One can use e.g. LoKi::Range + * + * @code * - * One can use e.g. LoKi::Range - * - * @code - * * // get the tool * const IJetMaker* jetMaker = tool<IJetMaker> ( .... ) ; * - * // get input data : get all basic particles - * Range basic = select( "basic" , HASORIGIN ) ; + * // get input data : get all basic particles + * Range basic = select( "basic" , HASORIGIN ) ; *` - * // output jets + * // output jets * IJetMaker::Jets jets ; - * - * // find the jets! - * StatusCode sc = jetMaker -> makeJets ( basic.begin () , + * + * // find the jets! + * StatusCode sc = jetMaker -> makeJets ( basic.begin () , * basic.end () , jets ) ; * - * + * * // make a loop over jets: - * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; - * jets.end() != iJet ; ++iJet ) + * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; + * jets.end() != iJet ; ++iJet ) * { - * // get the jet + * // get the jet * LHCb::Particle* jet = *iJet ; * } * - * @endcode - * - * @attention It is a responsibility of users (e.g. the algorithm) - * to take care about the ownership of jets *AND* their - * vertices). The tool is not intended to do it! - * - * - * @param first 'begin' iterator to the sequence of particles - * @param last 'end' iterator to the sequence of particles - * @param jets container of outptu jets - * @return status code + * @endcode + * + * @attention It is a responsibility of users (e.g. the algorithm) + * to take care about the ownership of jets *AND* their + * vertices). The tool is not intended to do it! + * + * + * @param first 'begin' iterator to the sequence of particles + * @param last 'end' iterator to the sequence of particles + * @param jets container of outptu jets + * @return status code */ template <class PARTICLE> - inline StatusCode makeJets + inline StatusCode makeJets ( PARTICLE first , - PARTICLE last , - Jets& jets ) const + PARTICLE last , + Jets& jets ) const { return makeJets ( Input( first , last ) , jets ) ; } - // ========================================================================== -public: - // ========================================================================== - /** The main method: jet-finding procedure - * - * @code + // ========================================================================== + /** The main method: jet-finding procedure + * + * @code * * // get the tool * const IJetMaker* jetMaker = tool<IJetMaker> ( .... ) ; * - * // input particles - * IJetMaker::Inputs input = ... - * // 1) + * // input particles + * IJetMaker::Inputs input = ... + * // 1) * // const Particles* particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles->begin() , particles->end() ) ; - * // 2) + * // 2) * // LHCb::Particle::ConstVector particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles.begin() , particles.end() ) ; - * // 3) + * // 3) * // LoKi::Range particles = .... ; - * // // create the input container + * // // create the input container * // IJetMaker::Inputs input( particles.begin() , particles.end() ) ; * - * // placeholder for "output" jets + * // placeholder for "output" jets * IJetMaker::Jets jets ; * - * // find the jets! + * // find the jets! * StatusCode sc = jetMaker -> makeJets ( input , jets ) ; * * // make a loop over jets: - * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; - * jets.end() != iJet ; ++iJet ) + * for ( IJetMaker::Jets::const_iterator iJet = jets.begin() ; + * jets.end() != iJet ; ++iJet ) * { - * // get the jet + * // get the jet * LHCb::Particle* jet = *iJet ; * } * - * @endcode + * @endcode + * + * @attention It is a responsibility of users (e.g. the algorithm) + * to take care about the ownership of jets *AND* their + * vertices). The tool is not intended to do it! * - * @attention It is a responsibility of users (e.g. the algorithm) - * to take care about the ownership of jets *AND* their - * vertices). The tool is not intended to do it! - * - * - * @param input contaainer of input particles - * @param jets container of output jets - * @return status code + * + * @param input contaainer of input particles + * @param jets container of output jets + * @return status code */ - virtual StatusCode makeJets + virtual StatusCode makeJets ( const Input& input , const LHCb::RecVertex& vtx ,Jets& jets ) const = 0 ; - // ========================================================================== - protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IJetMaker(); // virtual and protected destructor // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IJETMAKER_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IJets2Jets.h b/Phys/DaVinciInterfaces/Kernel/IJets2Jets.h index c4f171f97..5851f6dd0 100644 --- a/Phys/DaVinciInterfaces/Kernel/IJets2Jets.h +++ b/Phys/DaVinciInterfaces/Kernel/IJets2Jets.h @@ -1,14 +1,10 @@ -// $Id: IJets2Jets.h,v 1.1 2009-11-10 12:54:14 cocov Exp $ -// ============================================================================ -// CVS tag $Name: not supported by cvs2svn $ , version $Revision: 1.1 $ -// ============================================================================ -#ifndef DAVINCIKERNEL_IJETS2JETS_H +#ifndef DAVINCIKERNEL_IJETS2JETS_H #define DAVINCIKERNEL_IJETS2JETS_H 1 // ============================================================================ // Include files // ============================================================================ -// STD & STL +// STD & STL // ============================================================================ #include <string> #include <vector> @@ -17,7 +13,7 @@ // ============================================================================ #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// forward decalrations +// forward decalrations // ============================================================================ #include "Event/Particle.h" #include "Relations/RelationWeighted1D.h" @@ -33,17 +29,14 @@ * @date 2009-10-30 */ -class GAUDI_API IJets2Jets : public virtual IAlgTool +struct GAUDI_API IJets2Jets : extend_interfaces< IAlgTool > { -public: // ========================================================================== - /// interface machinery + /// interface machinery DeclareInterfaceID(IJets2Jets, 1, 0); // ========================================================================== -public: - // ========================================================================== - /// the actual type of container of jets - typedef LHCb::Particle::ConstVector Jets ; + /// the actual type of container of jets + typedef LHCb::Particle::ConstVector Jets ; // ========================================================================== /// the actual type of relation table between jets typedef LHCb::RelationWeighted1D< LHCb::Particle , LHCb::Particle , double > Table ; @@ -52,7 +45,7 @@ public: virtual void makeRelation( const Jets & jets1 , const Jets & jets2 , Table& table ) const = 0; }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IJETMAKER_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/ILifetimeFitter.h b/Phys/DaVinciInterfaces/Kernel/ILifetimeFitter.h index 609860698..5b1e9946e 100644 --- a/Phys/DaVinciInterfaces/Kernel/ILifetimeFitter.h +++ b/Phys/DaVinciInterfaces/Kernel/ILifetimeFitter.h @@ -1,5 +1,4 @@ -// $Id: ILifetimeFitter.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ -#ifndef DAVINCIKERNEL_ILIFETIMEFITTER_H +#ifndef DAVINCIKERNEL_ILIFETIMEFITTER_H #define DAVINCIKERNEL_ILIFETIMEFITTER_H 1 // Include files @@ -15,25 +14,21 @@ * @date 05/07/2002 */ -class GAUDI_API ILifetimeFitter : virtual public IAlgTool +struct GAUDI_API ILifetimeFitter : extend_interfaces< IAlgTool > { - - public: DeclareInterfaceID(ILifetimeFitter, 2, 0); - public: - /// Get lifetime /// inputs: Vertex corresponding to the assumed production point /// LHCb::Particle itself /// output: resulting lifetime and error, chisq. /// The lifetime is returned in nanoseconds. - virtual StatusCode fit( const LHCb::VertexBase&, - const LHCb::Particle&, - double& lifetime, + virtual StatusCode fit( const LHCb::VertexBase&, + const LHCb::Particle&, + double& lifetime, double& error, - double& chisq) const = 0; + double& chisq) const = 0; }; diff --git a/Phys/DaVinciInterfaces/Kernel/IMassFit.h b/Phys/DaVinciInterfaces/Kernel/IMassFit.h index 4d45a401a..4911f33f7 100644 --- a/Phys/DaVinciInterfaces/Kernel/IMassFit.h +++ b/Phys/DaVinciInterfaces/Kernel/IMassFit.h @@ -1,6 +1,5 @@ -// $Id: IMassFit.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ // ============================================================================ -#ifndef KERNEL_IMASSCONSTRAINEDFIT_H +#ifndef KERNEL_IMASSCONSTRAINEDFIT_H #define KERNEL_IMASSCONSTRAINEDFIT_H 1 // ============================================================================ // Include files @@ -11,18 +10,18 @@ // ============================================================================ /** @class IMassFit Kernel/IMassFit.h * - * The simple abstract interface to apply mass-constrained fit for the + * The simple abstract interface to apply mass-constrained fit for the * particles. It inherits from the basic abstarct interface IParticleReFitter * and contains twho basic methods: * - (re)fit the particle with explicit mass constraint * - (re)fit the particle into the nominal mass * - * It is expected that the method IParticleReFitter::reFit is reimplemented + * It is expected that the method IParticleReFitter::reFit is reimplemented * through @c fit: * * @code * - * StatusCode reFit ( LHCb::Particle& particle ) const + * StatusCode reFit ( LHCb::Particle& particle ) const * { * return fit ( particle ) ; * } @@ -32,15 +31,12 @@ * @author Vanya BELYAEV Ivan.Belyaev@itep.ru * @date 2008-01-09 */ -class GAUDI_API IMassFit : public virtual IParticleReFitter +struct GAUDI_API IMassFit : extend_interfaces<IParticleReFitter > { -public: // ========================================================================== - /// interface machinery + /// interface machinery DeclareInterfaceID(IMassFit, 2, 0); // ========================================================================== -public: - // ========================================================================== /** perform the mass-constrained fit of the particle into the specified mass * * @code @@ -50,16 +46,16 @@ public: * IMassFit* fitter = ... ; * * StatusCode sc = fitter -> fit ( B , 5.279 * GeV ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * * - * @param particle (in/out) pointer to the particle - * @param mass (in) mass to be constrained - * @return status code + * + * @param particle (in/out) pointer to the particle + * @param mass (in) mass to be constrained + * @return status code */ - virtual StatusCode fit + virtual StatusCode fit ( LHCb::Particle* particle , const double mass ) const = 0 ; // ========================================================================== /** perform the mass-constrained fit of the particle into the nominal mass @@ -71,18 +67,16 @@ public: * IMassFit* fitter = ... ; * * StatusCode sc = fitter -> fit ( B ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * * - * @param particle (in/out) pointer to the particle - * @return status code + * + * @param particle (in/out) pointer to the particle + * @return status code */ virtual StatusCode fit ( LHCb::Particle* particle ) const = 0 ; // ========================================================================== -public: - // ========================================================================== /** perform the mass-constrained fit of the particle into the specified mass * * @code @@ -92,15 +86,15 @@ public: * IMassFit* fitter = ... ; * * StatusCode sc = fitter -> fit ( B , 5.279 * GeV ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * - * @param particle (in/out) reference to the particle - * @param mass (in) mass to be constrained - * @return status code + * + * @param particle (in/out) reference to the particle + * @param mass (in) mass to be constrained + * @return status code */ - inline StatusCode fit + inline StatusCode fit ( LHCb::Particle& particle , const double mass ) const { return fit ( &particle , mass ) ; } // ========================================================================== @@ -113,19 +107,19 @@ public: * IMassFit* fitter = ... ; * * StatusCode sc = fitter -> fit ( B ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * - * @param particle (in/out) reference to the particle - * @return status code + * + * @param particle (in/out) reference to the particle + * @return status code */ - inline StatusCode fit ( LHCb::Particle& particle ) const + inline StatusCode fit ( LHCb::Particle& particle ) const { return fit ( &particle ) ; } // ========================================================================== -public: + // ========================================================================== - /** perform the mass-constrained fit of the particle into + /** perform the mass-constrained fit of the particle into * the specified mass and explicitly return chi2 * * @code @@ -136,19 +130,19 @@ public: * * double chi2 = 0.0 ; * StatusCode sc = fitter -> fit ( B , 5.279 * GeV , chi2 ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * - * @param particle (in.out) pointer to the particle - * @param mass (in) mass to be constrained - * @param chi2 (in/out) chi2 of the mass constrained fit - * @return status code + * + * @param particle (in.out) pointer to the particle + * @param mass (in) mass to be constrained + * @param chi2 (in/out) chi2 of the mass constrained fit + * @return status code */ - virtual StatusCode fit + virtual StatusCode fit ( LHCb::Particle* particle , const double mass , double& chi2 ) const = 0 ; // ========================================================================== - /** perform the mass-constrained fit of the particle into + /** perform the mass-constrained fit of the particle into * the specified mass and explicitly return chi2 * * @code @@ -159,93 +153,88 @@ public: * * double chi2 = 0.0 ; * StatusCode sc = fitter -> fit ( B , 5.279 * GeV , chi2 ) ; - * if ( sc.isFailure() ) { .. error here ... } + * if ( sc.isFailure() ) { .. error here ... } * * @endcode - * - * @param particle (in.out) reference to the particle - * @param mass (in) mass to be constrained - * @param chi2 (in/out) chi2 of the mass constrained fit - * @return status code + * + * @param particle (in.out) reference to the particle + * @param mass (in) mass to be constrained + * @param chi2 (in/out) chi2 of the mass constrained fit + * @return status code */ - inline StatusCode fit - ( LHCb::Particle& particle , const double mass , double& chi2 ) const + inline StatusCode fit + ( LHCb::Particle& particle , const double mass , double& chi2 ) const { return fit ( &particle, mass, chi2 ) ; } // ========================================================================== -public: + // ========================================================================== - /** The method which allows to fit a sequence of particles. - * - * @code - * - * // locate the tool + /** The method which allows to fit a sequence of particles. + * + * @code + * + * // locate the tool * const IMassFit* fitter = ... ; - * - * // refit *ALL* Bs + * + * // refit *ALL* Bs * LHCb::Particle:Container* allB = get<Particle>( "/Event/Phys/B" ) ; - * + * * StatusCode sc = fitter->fit( allB->begin() , allB->end() , 5.279 * GeV ) ; * - * @endcode - * + * @endcode + * * @param begin begin-iterator for sequence of particles * @param end end-iterator for sequence of particles - * @param mass mass to be constrained - * @return status code + * @param mass mass to be constrained + * @return status code */ template <class PARTICLE> - inline StatusCode fit - ( PARTICLE begin , - PARTICLE end , - const double mass ) const + inline StatusCode fit + ( PARTICLE begin , + PARTICLE end , + const double mass ) const { StatusCode code = StatusCode::SUCCESS ; - for ( ; begin != end ; ++begin ) + for ( ; begin != end ; ++begin ) { code = fit ( *begin , mass ) && code; } return code ; - } + } // ========================================================================== /** The method which allows to fit a sequence of particles to the nominal mass - * - * @code - * - * // locate the tool + * + * @code + * + * // locate the tool * const IMassFit* fitter = ... ; - * - * // refit *ALL* Bs + * + * // refit *ALL* Bs * LHCb::Particle:Container* allB = get<Particle>( "/Event/Phys/B" ) ; - * + * * StatusCode sc = fitter->fit( allB->begin() , allB->end() ) ; * - * @endcode - * + * @endcode + * * @param begin begin-iterator for sequence of particles * @param end end-iterator for sequence of particles - * @return status code + * @return status code */ template <class PARTICLE> - inline StatusCode fit - ( PARTICLE begin , - PARTICLE end ) const + inline StatusCode fit + ( PARTICLE begin , + PARTICLE end ) const { StatusCode code = StatusCode::SUCCESS ; - for( ; begin != end ; ++begin ) + for( ; begin != end ; ++begin ) { code = fit ( *begin ) && code; } return code ; - } - // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IMassFit( ); // Destructor + } // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // KERNEL_IMASSCONSTRAINEDFIT_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IP2VVAngleCalculator.h b/Phys/DaVinciInterfaces/Kernel/IP2VVAngleCalculator.h index 474a4625c..b6e099bb3 100644 --- a/Phys/DaVinciInterfaces/Kernel/IP2VVAngleCalculator.h +++ b/Phys/DaVinciInterfaces/Kernel/IP2VVAngleCalculator.h @@ -1,4 +1,3 @@ -// $Id: IP2VVAngleCalculator.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef IP2VVANGLETOOL_H #define IP2VVANGLETOOL_H 1 @@ -19,14 +18,10 @@ * @date 2007-08-22 * @modified 2008-06-02 */ -class GAUDI_API IP2VVAngleCalculator : virtual public IAlgTool { - - public: +struct GAUDI_API IP2VVAngleCalculator : extend_interfaces< IAlgTool > { DeclareInterfaceID(IP2VVAngleCalculator, 2, 0); - public: - /// calculate the angle between two planes in the rest frame of the mother particle virtual double calculatePlaneAngle( const Gaudi::LorentzVector&, const Gaudi::LorentzVector&, diff --git a/Phys/DaVinciInterfaces/Kernel/IP2VVPartAngleCalculator.h b/Phys/DaVinciInterfaces/Kernel/IP2VVPartAngleCalculator.h index 1b0b9738d..ce305b5a2 100644 --- a/Phys/DaVinciInterfaces/Kernel/IP2VVPartAngleCalculator.h +++ b/Phys/DaVinciInterfaces/Kernel/IP2VVPartAngleCalculator.h @@ -1,4 +1,3 @@ -// $Id: IP2VVPartAngleCalculator.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef IP2VVPARTANGLECALCULATOR_H #define IP2VVPARTANGLECALCULATOR_H 1 @@ -27,14 +26,10 @@ namespace LHCb * @date 2007-08-02 * @modified 2008-06-02 */ -class GAUDI_API IP2VVPartAngleCalculator : virtual public IAlgTool +struct GAUDI_API IP2VVPartAngleCalculator : extend_interfaces< IAlgTool > { - - public: - + DeclareInterfaceID(IP2VVPartAngleCalculator, 2, 0); - - public: /// get theta_L (angle of the L+ wrt B in dilepton frame) virtual double calculateThetaL( const LHCb::Particle* mother) = 0 ; diff --git a/Phys/DaVinciInterfaces/Kernel/IPVReFitter.h b/Phys/DaVinciInterfaces/Kernel/IPVReFitter.h index 2a80bd03b..a0c9d0718 100644 --- a/Phys/DaVinciInterfaces/Kernel/IPVReFitter.h +++ b/Phys/DaVinciInterfaces/Kernel/IPVReFitter.h @@ -7,7 +7,7 @@ // Forward declarations class StatusCode; -namespace LHCb +namespace LHCb { class Particle; class VertexBase; @@ -18,22 +18,18 @@ namespace LHCb * @author Yuehong Xie * @date 17/08/2005 */ -class GAUDI_API IPVReFitter : virtual public IAlgTool +struct GAUDI_API IPVReFitter : extend_interfaces< IAlgTool > { - public: - DeclareInterfaceID(IPVReFitter, 2, 0); - - public: - + /// refit PV virtual StatusCode reFit(LHCb::VertexBase*) const = 0; - + /// remove track used for a (B) LHCb::Particle and refit PV - virtual StatusCode remove(const LHCb::Particle*, + virtual StatusCode remove(const LHCb::Particle*, LHCb::VertexBase*) const = 0; - + }; #endif // KERNEL_IPVREFITTER_H diff --git a/Phys/DaVinciInterfaces/Kernel/IParticle2State.h b/Phys/DaVinciInterfaces/Kernel/IParticle2State.h index cfbcb0915..a0a644311 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticle2State.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticle2State.h @@ -1,4 +1,3 @@ -// $Id: IParticle2State.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef DAVINCIKERNEL_IPARTICLE2STATE_H #define DAVINCIKERNEL_IPARTICLE2STATE_H 1 @@ -16,14 +15,10 @@ * @date 2006-05-16 */ -class GAUDI_API IParticle2State : virtual public IAlgTool { - - public: +struct GAUDI_API IParticle2State : extend_interfaces< IAlgTool > { DeclareInterfaceID(IParticle2State, 2, 0); - public: - /// Fill a Particle from a State virtual StatusCode state2Particle( const LHCb::State& state, LHCb::Particle& particle ) const = 0 ; diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleCombiner.h b/Phys/DaVinciInterfaces/Kernel/IParticleCombiner.h index 0b91fbeee..ed2d9833a 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleCombiner.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleCombiner.h @@ -1,13 +1,9 @@ -// $Id: IParticleCombiner.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ -// ============================================================================ -// CVS tag $Name: not supported by cvs2svn $; version $Revision: 1.3 $ -// ============================================================================ -#ifndef VERTEXFITTER_IPARTICLECOMBINER_H +#ifndef VERTEXFITTER_IPARTICLECOMBINER_H #define VERTEXFITTER_IPARTICLECOMBINER_H 1 // ============================================================================ // Include files // ============================================================================ -// STD & STL +// STD & STL // ============================================================================ #include <vector> // ============================================================================ @@ -16,127 +12,119 @@ #include "GaudiKernel/IInterface.h" #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// Event +// Event // ============================================================================ #include "Event/Particle.h" // ============================================================================ -/** @class IParticleCombiner IParticleCombiner.h - * - * The first "basic" abstract interface interface - * for fitting/combiner tools +/** @class IParticleCombiner IParticleCombiner.h + * + * The first "basic" abstract interface interface + * for fitting/combiner tools * * @author Vanya BELYAEV belyaev@lapp.lin2p3.fr * @date 2004-12-19 */ -class GAUDI_API IParticleCombiner : virtual public IAlgTool +struct GAUDI_API IParticleCombiner : extend_interfaces<IAlgTool> { -public: // ========================================================================== /// interafce machinery DeclareInterfaceID(IParticleCombiner, 2, 0); - // ========================================================================== -public: - // ========================================================================== - /** The major method for "combining" the daughter particles + // ========================================================================== + /** The major method for "combining" the daughter particles * into "mother" particle. * * The container of input particles is "combined" into * "mother" particle and its decay vertex. * * The intermediate constrains (mass, vertex, mass-vertex, - * etc.. could be applied in the process of "combining", + * etc.. could be applied in the process of "combining", * dependent on the used implementation) - * - * @code - * - * // locate the tool - * const IParticleCombiner* combiner = get<IParticleCombiner>( ... ) - * - * // loop over the first daughter particle - * for( ... ipi1 = ... ; ... ; ++ipi1 ) + * + * @code + * + * // locate the tool + * const IParticleCombiner* combiner = get<IParticleCombiner>( ... ) + * + * // loop over the first daughter particle + * for( ... ipi1 = ... ; ... ; ++ipi1 ) * { - * for( ... ipi2 = ... ; ... ; ++ipi2 ) + * for( ... ipi2 = ... ; ... ; ++ipi2 ) * { * const LHCb::Particle* pi1 = *ipi1 ; * const LHCb::Particle* pi2 = *ipi2 ; - * + * * IParticleCombiner::LHCb::Particle::ConstVector daughters ; * daughters.push_back( pi1 ) ; * daughters.push_back( pi2 ) ; - * - * LHCb::Particle K0S ; - * Vertex Vrtx ; - * + * + * LHCb::Particle K0S ; + * Vertex Vrtx ; + * * StatusCode sc = combiner->combine( daughters , K0S , Vrtx ) ; - * if( sc.isFailure() ) - * { Warning("Error in K0S fit, skip the pair", sc ); continue ; } - * - * .... + * if( sc.isFailure() ) + * { Warning("Error in K0S fit, skip the pair", sc ); continue ; } + * + * .... * } * } * - * @endcode - * + * @endcode + * * @param daughters the vector of daughter particles (input) * @param mother the "mother" particle (output) * @param vertex the decay vertex of mother particle (output) - * @return status code + * @return status code */ virtual StatusCode combine - ( const LHCb::Particle::ConstVector& daughters , - LHCb::Particle& mother , + ( const LHCb::Particle::ConstVector& daughters , + LHCb::Particle& mother , LHCb::Vertex& vertex ) const = 0 ; - // ========================================================================== - /** The method which allows to use almost an arbitrary - * sequence of daughter particles, e.g. - * LHCb::Particle::ConstVector, Particles, SmartRefVector<Particle>, etc.. + // ========================================================================== + /** The method which allows to use almost an arbitrary + * sequence of daughter particles, e.g. + * LHCb::Particle::ConstVector, Particles, SmartRefVector<Particle>, etc.. * * Also this signature allow to make an easy "refit"/"recombine" * of the mother particle, e.g. * * @code * - * // locate the tool - * const IParticleCombiner* combiner = get<IParticleCombiner>( ... ) + * // locate the tool + * const IParticleCombiner* combiner = get<IParticleCombiner>( ... ) + * + * LHCb::Particle* mother = ... ; * - * LHCb::Particle* mother = ... ; - * * StatusCode sc = combiner->combine - * ( mother->vertex->products().begin() , - * ( mother->vertex->products().end() , + * ( mother->vertex->products().begin() , + * ( mother->vertex->products().end() , * *mother , * *(mother->endVertex()) ) ; * - * if( sc.isFailure() ) - * { Warning("Error in fitter", sc ); continue ; } + * if( sc.isFailure() ) + * { Warning("Error in fitter", sc ); continue ; } * - * @endcode - * - * @param begin begin-iterator for sequence of daughter parricles - * @param end end-iterator for sequence of daughter parricles + * @endcode + * + * @param begin begin-iterator for sequence of daughter parricles + * @param end end-iterator for sequence of daughter parricles * @param mother the "mother" particle (output) * @param vertex the decay vertex of mother particle (output) - * @return status code - */ + * @return status code + */ template <class DAUGHTER> - inline StatusCode combine + inline StatusCode combine ( DAUGHTER begin , DAUGHTER end , - LHCb::Particle& mother , - LHCb::Vertex& vertex ) const + LHCb::Particle& mother , + LHCb::Vertex& vertex ) const { const LHCb::Particle::ConstVector children = Daughters( begin , end ) ; return combine( children , mother , vertex ) ; } - // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IParticleCombiner(); // virtual and protected destructor // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // VERTEXFITTER_IPARTICLECOMBINER_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleFilter.h b/Phys/DaVinciInterfaces/Kernel/IParticleFilter.h index 3cc3bb088..9c0de0c9f 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleFilter.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleFilter.h @@ -1,6 +1,4 @@ -// $Id: IParticleFilter.h,v 1.6 2010-05-14 15:03:45 ibelyaev Exp $ -// ============================================================================ -#ifndef DAVINCIKERNEL_IPARTICLEFILTER_H +#ifndef DAVINCIKERNEL_IPARTICLEFILTER_H #define DAVINCIKERNEL_IPARTICLEFILTER_H 1 // ============================================================================ // Include files @@ -12,29 +10,23 @@ namespace LHCb { class Particle ; } // ============================================================================ /** @class IParticleFilter IParticleFilter.h Kernel/IParticleFilter.h - * Interface Class for Particle Filters. + * Interface Class for Particle Filters. * Given an LHCb::Particle, return true if it passes the filter. * * @author Juan Palacios * @date 12/05/2010 * */ -class GAUDI_API IParticleFilter : virtual public IAlgTool +struct GAUDI_API IParticleFilter : extend_interfaces< IAlgTool > { -public: // ========================================================================== DeclareInterfaceID ( IParticleFilter , 4 , 0 ) ; /// Filter: Return false if particle does not pass filter. virtual bool operator()( const LHCb::Particle* ) const = 0; // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IParticleFilter() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IPARTICLEFILTER_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleIsolation.h b/Phys/DaVinciInterfaces/Kernel/IParticleIsolation.h index c9dfd6ae4..e7fae27a5 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleIsolation.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleIsolation.h @@ -1,5 +1,4 @@ -// $Id: IParticleIsolation.h,v 1.1 2010/03/10 13:14:27 giampi Exp $ -#ifndef DAVINCIKERNEL_IPARTICLEISOLATION_H +#ifndef DAVINCIKERNEL_IPARTICLEISOLATION_H #define DAVINCIKERNEL_IPARTICLEISOLATION_H 1 // Include files @@ -7,7 +6,7 @@ // from Gaudi #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// forward declarations +// forward declarations // ============================================================================ #include "Event/Particle.h" #include "Event/RecVertex.h" @@ -16,26 +15,24 @@ /** @class IParticleIsolation IParticleIsolation.h * The Abstract Interface for "Particle Isolation", the tools which * return the degree of isolation of a set of particles (optionally - * from a given decay/mother), under some criteria - * + * from a given decay/mother), under some criteria + * * Currently it returns the numbers of non-isolating particles associated * with each of the input particles. * * @author Giampiero Mancinelli giampi@cppm.in2p3.fr * @date 2010-02-12 */ -class GAUDI_API IParticleIsolation : virtual public IAlgTool { - -public: - +struct GAUDI_API IParticleIsolation : extend_interfaces< IAlgTool > { + + /// interface machinery DeclareInterfaceID(IParticleIsolation, 1, 0); - public: - /** The method for the evaluation of the degree of isolation ("number + /** The method for the evaluation of the degree of isolation ("number * of non-isolating tracks") of the input set of particles. - * + * * @code * * // get the tool @@ -53,24 +50,19 @@ public: * * @endcode * - * @param vdaugh (input) pointer to the input set particles + * @param vdaugh (input) pointer to the input set particles * @param iso (output) number(s) of non-isolating particles * @param massiso (output) invariant mass of non-isolating particles - * @param chi2iso (output) chi2 of particle made with non-isolating particles - * @param PV (input) (optional) primary vertex + * @param chi2iso (output) chi2 of particle made with non-isolating particles + * @param PV (input) (optional) primary vertex * @param SV (input) (optional) secondary vertex (of mother) - * + * * @return status code - */ - virtual StatusCode getIso(LHCb::Particle::ConstVector& parts, + */ + virtual StatusCode getIso(LHCb::Particle::ConstVector& parts, int* iso, float* massiso=0, float* chi2iso=0, - const LHCb::VertexBase* PV=0, + const LHCb::VertexBase* PV=0, const LHCb::VertexBase* SV=0) const = 0 ; - -protected: - - // ========================================================================== - virtual ~IParticleIsolation() ; ///< virtual and protected destructor }; diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleReFitter.h b/Phys/DaVinciInterfaces/Kernel/IParticleReFitter.h index 2adc1409a..5e036e925 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleReFitter.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleReFitter.h @@ -1,6 +1,4 @@ -// $Id: IParticleReFitter.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ -// ============================================================================ -#ifndef VERTEXFITTER_IPARTICLEREFITTER_H +#ifndef VERTEXFITTER_IPARTICLEREFITTER_H #define VERTEXFITTER_IPARTICLEREFITTER_H 1 // ============================================================================ // Include files @@ -13,109 +11,99 @@ // ============================================================================ #include "GaudiKernel/IAlgTool.h" // ============================================================================ -// forward declarations +// forward declarations // ============================================================================ namespace LHCb { class Particle ; } // ============================================================================ -/** @class IParticleReFitter IParticleReFitter.h - * +/** @class IParticleReFitter IParticleReFitter.h + * * The second "basic" abstract interface for (re)fitter tools. * - * According to my (biased) vision, *ALL* concrete - * tools could(should?) implement this interface. - * E.g. the typical implementation for any concrete tool + * According to my (biased) vision, *ALL* concrete + * tools could(should?) implement this interface. + * E.g. the typical implementation for any concrete tool * could be : - * - an extraction of all information from the particle - * - invoke the basic appropriate methdod for concrete tool + * - an extraction of all information from the particle + * - invoke the basic appropriate methdod for concrete tool * (e.g. vertex fit, or mass-vertex fit, or lifetiem fit...) * * @author Vanya BELYAEV belyaev@lapp.in2p3.fr * @date 2004-12-19 */ -class GAUDI_API IParticleReFitter : virtual public IAlgTool +struct GAUDI_API IParticleReFitter : extend_interfaces< IAlgTool > { -public: // ========================================================================== - /// interface machinery - DeclareInterfaceID(IParticleReFitter, 2, 0); - // ========================================================================== -public: - // ========================================================================== + /// interface machinery + DeclareInterfaceID(IParticleReFitter, 2, 0); + // ========================================================================== /** The basic method for "refit" of the particle * - * @code + * @code * - * // locate the tool + * // locate the tool * const IParticleReFitter* refitter = tool<IParticleRefitter>( ... ) ; - * - * // particle to be refit + * + * // particle to be refit * LHCb::Particle* p = ... ; * * StatusCode sc = refitter->reFit ( *p ) ; * if ( sc.isFailure() ) { Warning("Error in reFit" , sc ) ; } * - * @endcode + * @endcode * * @see Particle * @see GaudiAlgorithm::tool * @see GaudiAlgorithm::Warning * - * @param particle reference to the particle - * @return status code + * @param particle reference to the particle + * @return status code */ virtual StatusCode reFit ( LHCb::Particle& particle ) const = 0 ; // ========================================================================== -public: - // ========================================================================== - /** The method which allows to + /** The method which allows to * refit a sequence of particles. The actual tyep of sequence - * is irrelevant, e.g. it could be - * KeyedContainer<Particle>, std::vetctor<Particle> , + * is irrelevant, e.g. it could be + * KeyedContainer<Particle>, std::vetctor<Particle> , * SmartRef<Particle>, std::vector<LHCb::Particle*>, etc.. - * Elements of the vector shoudl be convertible - * either to Parrticle& or LHCb::Particle* - * - * @code - * - * // locate the tool + * Elements of the vector shoudl be convertible + * either to Parrticle& or LHCb::Particle* + * + * @code + * + * // locate the tool * const IParticleReFitter* refitter = tool<IParticleRefitter>( ... ) ; - * - * // refit *ALL* K0S + * + * // refit *ALL* K0S * Particles* allK0S = get<Particle>( "/Event/Phys/K0S" ) ; - * + * * StatusCode sc = refitter->reFit( allK0S->begin() , allK0S.end() ) ; * - * @endcode - * - * @see LHCb::Particle + * @endcode + * + * @see LHCb::Particle * @see GaudiAlgorithm::get * @see GaudiAlgorithm::tool - * + * * @param begin begin-iterator for sequence of particles * @param end end-iterator for sequence of particles - * @return status code + * @return status code */ template <class PARTICLE> - inline StatusCode reFit - ( PARTICLE begin , - PARTICLE end ) const + inline StatusCode reFit + ( PARTICLE begin , + PARTICLE end ) const { StatusCode code = StatusCode::SUCCESS ; - for ( ; begin != end ; ++begin ) + for ( ; begin != end ; ++begin ) { code = reFit(*begin) && code; } return code ; - } - // ========================================================================== -protected: - // ========================================================================== - // virtual and protected destructor - virtual ~IParticleReFitter() ; ///< virtual and protected destructor + } // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // VERTEXFITTER_IPARTICLEREFITTER_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleTisTos.h b/Phys/DaVinciInterfaces/Kernel/IParticleTisTos.h index 856213f6e..ca211cdf8 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleTisTos.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleTisTos.h @@ -1,4 +1,3 @@ -// $Id: IParticleTisTos.h,v 1.1 2010-07-21 21:19:26 tskwarni Exp $ #ifndef IPARTICLETISTOS_H #define IPARTICLETISTOS_H 1 @@ -6,7 +5,6 @@ // from STL #include <vector> #include <string> -#include "boost/foreach.hpp" #include "Kernel/ITisTos.h" @@ -33,19 +31,11 @@ namespace LHCb * This tool extends TisTos operations described in @c ITisTos (for LHCbID hit lists) * to reconstruction objects: Particle, RecVertex, Track and their vectors */ -class GAUDI_API IParticleTisTos : virtual public ITisTos +struct GAUDI_API IParticleTisTos : extend_interfaces< ITisTos > { - -public: - /// Interface ID DeclareInterfaceID(IParticleTisTos, 1, 0); - /// Destructor - virtual ~IParticleTisTos() { } - -public: - // ------------------------------------------------- // ------------ inputs // ------------------------------------------------- @@ -81,9 +71,9 @@ public: template<class T> unsigned int tisTos( const std::vector<T*> & list ) - { + { unsigned int result(0); - BOOST_FOREACH( const T* obj, list ) + for( const T* obj: list ) { result |= tisTos( *obj ); if ( (result&kTPS) && (result&kTOS) && (result&kTIS) ) break; @@ -99,7 +89,7 @@ public: unsigned int tisTosTob( const std::vector<T*> & list ) { unsigned int result(0); - BOOST_FOREACH( const T* obj, list ) + for( const T* obj: list ) { result |= tisTos( *obj ); if( (result&kTPS) && (result&kTOS) && (result&kTIS) )break; @@ -119,7 +109,7 @@ public: bool tos( const std::vector<T*> & list ) { bool OK = false; - BOOST_FOREACH( const T* obj, list ) + for( const T* obj: list ) { if ( tos(*obj) ) { OK = true; break; } } @@ -138,9 +128,9 @@ public: bool tis( const std::vector<T*> & list ) { bool OK = false; - BOOST_FOREACH( const T* obj, list ) + for( const T* obj: list ) { - if ( tis(*obj) ) { OK = true; break; } + if ( tis(*obj) ) { OK = true; break; } } return OK; } @@ -158,8 +148,8 @@ public: bool tus( const std::vector<T*> & list ) { bool OK = false; - BOOST_FOREACH( const T* obj, list ) - { + for( const T* obj: list ) + { if ( tus(*obj) ) { OK = true; break; } } return OK; diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleTupleTool.h b/Phys/DaVinciInterfaces/Kernel/IParticleTupleTool.h index 5bcf25cb5..02e555fae 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleTupleTool.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleTupleTool.h @@ -1,4 +1,3 @@ -// $Id: IParticleTupleTool.h,v 1.2 2009-08-04 09:45:31 jpalac Exp $ #ifndef DECAYTUPLE_IPARTICLETUPLETOOL_H #define DECAYTUPLE_IPARTICLETUPLETOOL_H 1 @@ -17,26 +16,21 @@ namespace LHCb { } /** @class IParticleTupleTool - * + * * Fill some particle related variables into a tuple. - * + * * \sa IEventTupleTool - * + * * @author Jeremie Borel * @date November 2007 */ -class GAUDI_API IParticleTupleTool : virtual public IAlgTool +struct GAUDI_API IParticleTupleTool : extend_interfaces< IAlgTool > { - public: DeclareInterfaceID(IParticleTupleTool, 2, 0); - - virtual ~IParticleTupleTool(){}; - public: - - //! Fill the tuple. + //! Fill the tuple. //! - \b top : may be used to provide additional information about \b part, like the top particle of the decay. //! - \b part : the particle about which some info are filled. //! - \b head : prefix for the tuple column name. diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleValue.h b/Phys/DaVinciInterfaces/Kernel/IParticleValue.h index 903c7a581..2269ec60a 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleValue.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleValue.h @@ -1,6 +1,4 @@ -// $Id: IParticleValue.h,v 1.6 2010-05-14 15:03:45 ibelyaev Exp $ -// ============================================================================ -#ifndef DAVINCIKERNEL_IPARTICLEVALUE_H +#ifndef DAVINCIKERNEL_IPARTICLEVALUE_H #define DAVINCIKERNEL_IPARTICLEVALUE_H 1 // ============================================================================ // Include files @@ -12,29 +10,23 @@ namespace LHCb { class Particle ; } // ============================================================================ /** @class IParticleValue IParticleValue.h Kernel/IParticleValue.h - * Interface Class for Particle Values. + * Interface Class for Particle Values. * Given an LHCb::Particle, return the value of a variable calculated from its properties * * @author Sebastian Neubert * @date 05/08/2013 * */ -class GAUDI_API IParticleValue : virtual public IAlgTool +struct GAUDI_API IParticleValue : extend_interfaces< IAlgTool > { -public: // ========================================================================== DeclareInterfaceID ( IParticleValue , 4 , 0 ) ; /// Value: Return false if particle does not pass filter. virtual double operator()( const LHCb::Particle* ) const = 0; // ========================================================================== -protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IParticleValue() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // DAVINCIKERNEL_IPARTICLEVALUE_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/IParticleVeto.h b/Phys/DaVinciInterfaces/Kernel/IParticleVeto.h index 06e667bc0..d6e3a6392 100644 --- a/Phys/DaVinciInterfaces/Kernel/IParticleVeto.h +++ b/Phys/DaVinciInterfaces/Kernel/IParticleVeto.h @@ -1,4 +1,3 @@ -// $Id: $ #ifndef IPARTICLEVETO_H #define IPARTICLEVETO_H 1 @@ -18,25 +17,14 @@ static const InterfaceID IID_IParticleVeto ( "IParticleVeto", 1, 0 ); * @author Olivier Deschamps * @date 2012-04-25 */ -class IParticleVeto : virtual public IAlgTool +struct IParticleVeto : extend_interfaces< IAlgTool > { - -public: - // Return the interface ID static const InterfaceID& interfaceID() { return IID_IParticleVeto; } -public: - virtual bool foundOverlap(const LHCb::Particle* particle, std::vector<std::string> containers,int mode=0)=0; virtual bool foundOverlap(const LHCb::Particle* particle, std::string container,int mode=0)=0; virtual bool foundOverlap(const LHCb::Particle* particle, const LHCb::Particle* p2,int mode=0)=0; -protected: - - virtual ~IParticleVeto() ; // virtual and protected destructors - -private: - }; #endif // IPARTICLEVETO_H diff --git a/Phys/DaVinciInterfaces/Kernel/IPrintDecay.h b/Phys/DaVinciInterfaces/Kernel/IPrintDecay.h index fdfebd421..3f3f3d3b2 100644 --- a/Phys/DaVinciInterfaces/Kernel/IPrintDecay.h +++ b/Phys/DaVinciInterfaces/Kernel/IPrintDecay.h @@ -1,5 +1,3 @@ -// $Id: IPrintDecay.h,v 1.3 2009-08-17 08:04:22 jpalac Exp $ -// ============================================================================ #ifndef DAVINCIKERNEL_IPRINTDECAY_H #define DAVINCIKERNEL_IPRINTDECAY_H 1 // ============================================================================ @@ -21,15 +19,12 @@ namespace LHCb { class Particle ; } * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl * @date 2008-03-30 */ -class GAUDI_API IPrintDecay : virtual public IAlgTool +struct GAUDI_API IPrintDecay : extend_interfaces< IAlgTool > { - public: // ========================================================================== /// interface machinery DeclareInterfaceID(IPrintDecay, 2, 0); // ========================================================================== - public: - // ========================================================================== /** Print the decay tree for a given particle * * @code @@ -72,11 +67,6 @@ class GAUDI_API IPrintDecay : virtual public IAlgTool for ( ; begin != end ; ++begin ) { this->printTree ( *begin , maxDepth ) ; } } // ========================================================================== - protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IPrintDecay() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ // The END diff --git a/Phys/DaVinciInterfaces/Kernel/ISetInputParticles.h b/Phys/DaVinciInterfaces/Kernel/ISetInputParticles.h index 6afbd7ad4..44422d733 100644 --- a/Phys/DaVinciInterfaces/Kernel/ISetInputParticles.h +++ b/Phys/DaVinciInterfaces/Kernel/ISetInputParticles.h @@ -1,6 +1,4 @@ -// $Id: ISetInputParticles.h,v 1.4 2009-08-17 08:04:22 jpalac Exp $ -// ============================================================================ -#ifndef KERNEL_ISETINPUTPARTICLES_H +#ifndef KERNEL_ISETINPUTPARTICLES_H #define KERNEL_ISETINPUTPARTICLES_H 1 // ============================================================================ // Include files @@ -15,37 +13,28 @@ // ============================================================================ /** @class ISetInputParticles ISetInputParticles.h Kernel/ISetInputParticles.h * - * A bit technical interface to allow some interactive manipulations + * A bit technical interface to allow some interactive manipulations * with CombineParticlesa algorithm form python. * * @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl * @date 2008-07-11 */ -class GAUDI_API ISetInputParticles : virtual public IInterface +struct GAUDI_API ISetInputParticles : extend_interfaces< IInterface > { -public: // ========================================================================== /// interface machinery DeclareInterfaceID(ISetInputParticles, 2, 0); // ========================================================================== -public: - // ========================================================================== /** the only one essential method: * it sets the input particles - * @param input the vector of input particles - * @return status code + * @param input the vector of input particles + * @return status code */ - virtual StatusCode setInput - ( const LHCb::Particle::ConstVector& input ) = 0 ; - // ========================================================================== -protected: - // ========================================================================== - /// the destructor is virtual and protected - virtual ~ISetInputParticles() ; // the destructor is virtual and protected + virtual StatusCode setInput( const LHCb::Particle::ConstVector& input ) = 0 ; // ========================================================================== }; // ============================================================================ -// The END +// The END // ============================================================================ #endif // KERNEL_ISETINPUTPARTICLES_H // ============================================================================ diff --git a/Phys/DaVinciInterfaces/Kernel/ITisTos.h b/Phys/DaVinciInterfaces/Kernel/ITisTos.h index 1f33aa053..aea4c25ba 100644 --- a/Phys/DaVinciInterfaces/Kernel/ITisTos.h +++ b/Phys/DaVinciInterfaces/Kernel/ITisTos.h @@ -1,5 +1,4 @@ -// $Id: ITisTos.h,v 1.2 2010-07-22 14:58:26 tskwarni Exp $ -#ifndef KERNEL_ITISTOS_H +#ifndef KERNEL_ITISTOS_H #define KERNEL_ITISTOS_H 1 // Include files @@ -13,12 +12,12 @@ #include "Kernel/LHCbID.h" /** @class ITisTos ITisTos.h Kernel/ITisTos.h - * + * * * @author Tomasz Skwarnicki * @date 2010-07-07 * - * @par + * @par * Lowest level TIS/TOS tool to classify LHCbID hit sequence on Trigger object * with respect to Signal also passed as LHCbID hit sequence. * @par @@ -27,37 +26,28 @@ * reversing their roles can change the results. * E.g. the tool may normalize overlap fraction to the hits encountered on the "Trigger" sequence. */ -class GAUDI_API ITisTos : virtual public IAlgTool +struct GAUDI_API ITisTos : extend_interfaces< IAlgTool > { -public: - /// Interface ID DeclareInterfaceID ( ITisTos, 1 , 0 ) ; - /// Destructor - virtual ~ITisTos() { } - -public: - /** @par Meaning of TisTosTob result: * TPS = Trigger Partially on Signal - * TOS = Trigger On Signal - * TUS = TPS || TOS (Trigger Used Signal) + * TOS = Trigger On Signal + * TUS = TPS || TOS (Trigger Used Signal) * TIS = Trigger Independent of Signal * * Decision = Trigger line decision (not used in Trigger object classification) * - * when encoded in an unsigned int TPS,TOS,TIS,Decision are indicated by subsequent bits + * when encoded in an unsigned int TPS,TOS,TIS,Decision are indicated by subsequent bits */ /// values of TisTosTob result (info encoded in bits) enum {kUnknown=0,kTPS=1,kTOS=2,kTUS=3,kTIS=4,kTOSandTIS=6,kDecision=8}; -public: - /// to help encode/decode TisTosTob result in/from unsigned int - class TisTosTob + class TisTosTob final { public: @@ -66,8 +56,6 @@ public: TisTosTob(bool tps, bool tos, bool tis){ set_value(tps,tos,tis); } TisTosTob(bool tps, bool tos, bool tis, bool dec){ set_value(tps,tos,tis,dec); } - ~TisTosTob() { } - /// check for TIS bool tis() const {return ((m_tistostob&kTIS)!=0);} /// check for TOS @@ -98,29 +86,27 @@ public: void set_value(){m_tistostob=kUnknown;} /// set TisTosTob value (erases previous value) void set_value(bool tps, bool tos, bool tis) - { + { set_value(); if(tps)set_tps(); if(tos)set_tos(); if(tis)set_tis(); } void set_value(bool tps, bool tos, bool tis,bool dec) - { + { set_value(); if(tps)set_tps(); if(tos)set_tos(); if(tis)set_tis(); if(dec)set_decision(); } - + private: unsigned int m_tistostob; }; -public: - /// erase signal definition (returns true if erased non-empty signal) virtual bool setSignal() = 0; @@ -132,88 +118,88 @@ public: /// set signal to given hits bool setSignal(const std::vector<LHCb::LHCbID> & hits) - { - bool changed=setSignal(); + { + bool changed=setSignal(); if(addHitsToSignal(hits))changed=true; return changed; } - + /// set signal to given sorted hits bool setSortedSignal(const std::vector<LHCb::LHCbID> & hits) - { - bool changed=setSignal(); + { + bool changed=setSignal(); if(addSortedHitsToSignal(hits))changed=true; return changed; } - + /// retrieve signal definition virtual std::vector<LHCb::LHCbID> signal() const = 0; - + /// completely classify the Trigger hit sequence with respect to the Signal hit sequence virtual unsigned int tisTosSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const =0; - + /// completely classify the Trigger hit sequence with respect to the Signal, return helper class - TisTosTob tisTosTobSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const + TisTosTob tisTosTobSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const { return TisTosTob(tisTosSortedHits(triggerHits)); } - + /// check for TOS - may be faster than using tisTosSortedHits() virtual bool tosSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const =0; - + /// check for TIS - may be faster than using tisTosSortedHits() virtual bool tisSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const =0; - + /// check for TUS (TPS or TOS) - may be faster than using tisTosSortedHits() virtual bool tusSortedHits(const std::vector<LHCb::LHCbID> & triggerHits) const =0; // extras for diagnostics ------------- - /// hit analysis: number of trigger hits and fraction found in the signal for each hit type + /// hit analysis: number of trigger hits and fraction found in the signal for each hit type virtual unsigned int analyzeSortedHits(const std::vector<LHCb::LHCbID> & triggerHits, std::vector<unsigned int> & nTrigger , std::vector<double> & fractionInSignal ) const =0; - - /// analysis report - virtual std::string analysisReportSortedHits(const std::vector<LHCb::LHCbID> & triggerSortedHits) const =0; + + /// analysis report + virtual std::string analysisReportSortedHits(const std::vector<LHCb::LHCbID> & triggerSortedHits) const =0; // Control calls ------------------------------ /// set using hit types on or off (returns true if call resulted in a change of the value of this switch) virtual bool setNoHitTypes(bool onOff) =0; - + /// set minimal fraction of trigger hits to be found on signal for TOS - hit types implementation dependent (<=0 don't use) virtual bool setTOSFrac(unsigned int hitType,double tosFrac) =0; - + /// set maximal fraction of trigger hits to be found on signal for TIS - (should be below TOSFrac except when TOSFrac<=0) virtual bool setTISFrac(unsigned int hitType,double tisFrac) =0; /// set minimal fractions of trigger hits to be found on signal for TOS - (<=0 don't use this type neither in TOS nor TIS) virtual bool setTOSFrac(std::vector<double> tosFrac) =0; - + /// set maximal fractions of trigger hits to be found on signal for TIS - (should be below TOSFrac except when TOSFrac<=0) virtual bool setTISFrac(std::vector<double> tisFrac) =0; - + // access to internal values used -------------------------- - /// Number of hit types used + /// Number of hit types used virtual unsigned int numberOfHitTypes() const =0; - + /// Names if the hit types virtual std::string hitTypeName(unsigned int hitType) const =0; /// get minimal fraction of trigger hits to be found on signal for TOS - returns 0.0 if illegal hitType virtual double getTOSFrac(unsigned int hitType) const =0; - - /// get maximal fraction of trigger hits to be found on signal for TIS + + /// get maximal fraction of trigger hits to be found on signal for TIS virtual double getTISFrac(unsigned int hitType) const =0; - /// get minimal fractions of trigger hits to be found on signal for TOS + /// get minimal fractions of trigger hits to be found on signal for TOS virtual std::vector<double> getTOSFrac() const =0; - - /// get maximal fraction of trigger hits to be found on signal for TIS + + /// get maximal fraction of trigger hits to be found on signal for TIS virtual std::vector<double> getTISFrac() const =0; /// utility to sort hits (can be used by user to convert unsorted hits in calls to various methods) - virtual std::vector<LHCb::LHCbID> sortedHits(const std::vector<LHCb::LHCbID> & hits) const =0; + virtual std::vector<LHCb::LHCbID> sortedHits(const std::vector<LHCb::LHCbID> & hits) const =0; }; diff --git a/Phys/DaVinciInterfaces/Kernel/ITrackIsolation.h b/Phys/DaVinciInterfaces/Kernel/ITrackIsolation.h index 864d7aa3e..59161e087 100644 --- a/Phys/DaVinciInterfaces/Kernel/ITrackIsolation.h +++ b/Phys/DaVinciInterfaces/Kernel/ITrackIsolation.h @@ -1,5 +1,4 @@ -// $Id: ITrackIsolation.h,v 1.1 2010-03-18 18:50:43 simone Exp $ -#ifndef KERNEL_ITRACKISOLATION_H +#ifndef KERNEL_ITRACKISOLATION_H #define KERNEL_ITRACKISOLATION_H 1 // Include files @@ -12,16 +11,14 @@ /** * @class ITrackIsolation ITrackIsolation.h Kernel/ITrackIsolation.h - * + * * Abstract Interface of the Track Isolation tools - * + * * @author Simone Bifani simone.bifani@cern.ch * @date 2010-03-17 */ -class GAUDI_API ITrackIsolation : virtual public IAlgTool { - -public: +struct GAUDI_API ITrackIsolation : extend_interfaces< IAlgTool > { DeclareInterfaceID( ITrackIsolation, 1, 0 ); @@ -30,42 +27,36 @@ public: * the number of tracks/particles in a given range * within a cone of given radius with respect to the * seed track/protoparticle/particle - * + * * The cone radius is defined as the difference in Eta * and Phi between the seed track and a track in the * range (same definition as in TupleToolTrackIsolation): - * + * * R = sqrt (delta_Eta^2 + delta_Phi^2) - * + * * The method returns the track multiplicity */ virtual unsigned int trackConeMultiplicity( const LHCb::Track* seedTrack, - const LHCb::Track::Range& eventTracks, + const LHCb::Track::Range& eventTracks, double coneRadius ) const = 0; virtual unsigned int trackConeMultiplicity( const LHCb::ProtoParticle* seedProtoParticle, - const LHCb::Track::Range& eventTracks, + const LHCb::Track::Range& eventTracks, double coneRadius ) const = 0; virtual unsigned int trackConeMultiplicity( const LHCb::Particle* seedParticle, - const LHCb::Track::Range& eventTracks, + const LHCb::Track::Range& eventTracks, double coneRadius ) const = 0; virtual unsigned int trackConeMultiplicity( const LHCb::ProtoParticle* seedProtoParticle, - const LHCb::Particle::Range& eventParticles, + const LHCb::Particle::Range& eventParticles, double coneRadius ) const = 0; virtual unsigned int trackConeMultiplicity( const LHCb::Particle* seedParticle, - const LHCb::Particle::Range& eventParticles, + const LHCb::Particle::Range& eventParticles, double coneRadius ) const = 0; -protected: - - virtual ~ITrackIsolation(); - -private: - }; #endif // KERNEL_ITRACKISOLATION_H diff --git a/Phys/DaVinciInterfaces/Kernel/ITriggerSelectionTisTos.h b/Phys/DaVinciInterfaces/Kernel/ITriggerSelectionTisTos.h index 42fca0b98..4a83f77fe 100644 --- a/Phys/DaVinciInterfaces/Kernel/ITriggerSelectionTisTos.h +++ b/Phys/DaVinciInterfaces/Kernel/ITriggerSelectionTisTos.h @@ -1,4 +1,3 @@ -// $Id: ITriggerSelectionTisTos.h,v 1.4 2010-07-22 14:58:26 tskwarni Exp $ #ifndef ITRIGGERSELECTIONTISTOS_H #define ITRIGGERSELECTIONTISTOS_H 1 @@ -6,7 +5,6 @@ // from STL #include <string> #include <vector> -#include "boost/foreach.hpp" // from Gaudi //#include "GaudiKernel/IAlgTool.h" @@ -123,19 +121,12 @@ namespace LHCb { * bool tob = decision && (!tis) && (!tos); * @endcode */ -class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos +struct GAUDI_API ITriggerSelectionTisTos : extend_interfaces< IParticleTisTos > { - public: - /// Interface ID DeclareInterfaceID(ITriggerSelectionTisTos, 4, 0); - /// Destructor - virtual ~ITriggerSelectionTisTos() { } - - public: - /// meaning of optional unsigned int input parameters for Tis/Tos requirements enum TisTosRequirement { kFalseRequired, kTrueRequired, kAnything }; @@ -148,14 +139,13 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos * @author Tomasz Skwarnicki * @date 2007-08-06 */ - class TisTosDecision + class TisTosDecision final { public: TisTosDecision():m_decision(false),m_tis(false),m_tos(false){} TisTosDecision(bool dec,bool tis,bool tos):m_decision(dec),m_tis(tis),m_tos(tos){} - virtual ~TisTosDecision(){}; bool decision() const {return m_decision;} bool tis() const {return m_tis;} @@ -223,7 +213,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos unsigned int tisTosSelection( const std::vector< std::string > & selectionNames ) { unsigned int result =0; - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { result |= tisTosSelection(selName); if( (result&kTPS) && (result&kTOS) && (result&kTIS) && (result&kDecision) ) break; @@ -238,7 +228,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos bool tosSelection(const std::vector< std::string > & selectionNames ) { bool result = false; - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { if ( tosSelection(selName) ) { result = true; break; } } @@ -248,7 +238,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos bool tisSelection(const std::vector< std::string > & selectionNames ) { bool result = false; - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { if( tisSelection(selName) ) { result = true; break; } } @@ -258,7 +248,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos bool tusSelection(const std::vector< std::string > & selectionNames ) { bool result = false; - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { if ( tusSelection(selName) ) { result = true; break; } } @@ -342,7 +332,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos if ( selectionOR ) { unsigned int result =0; - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { result |= tisTosSelection(selName); if( (result&kTOS) && (result&kTIS) && (result&kDecision) )break; @@ -354,7 +344,7 @@ class GAUDI_API ITriggerSelectionTisTos : virtual public IParticleTisTos else { unsigned int result =(kTOSandTIS|kDecision); - BOOST_FOREACH( std::string selName, selectionNames ) + for( const std::string& selName: selectionNames ) { result &= tisTosSelection(selName); if( !(result&kTOS) && !(result&kTIS) && !(result&kDecision) )break; diff --git a/Phys/DaVinciInterfaces/Kernel/ITriggerTisTos.h b/Phys/DaVinciInterfaces/Kernel/ITriggerTisTos.h index 7ebca4d72..15205983c 100644 --- a/Phys/DaVinciInterfaces/Kernel/ITriggerTisTos.h +++ b/Phys/DaVinciInterfaces/Kernel/ITriggerTisTos.h @@ -1,4 +1,3 @@ -// $Id: ITriggerTisTos.h,v 1.4 2010-07-22 14:58:26 tskwarni Exp $ #ifndef ITRIGGERTISTOS_H #define ITRIGGERTISTOS_H 1 @@ -134,20 +133,12 @@ namespace LHCb * bool tob = decision && (!tis) && (!tos); * @endcode */ -class GAUDI_API ITriggerTisTos : virtual public ITriggerSelectionTisTos +struct GAUDI_API ITriggerTisTos : extend_interfaces< ITriggerSelectionTisTos > { - public: - /// Interface ID DeclareInterfaceID(ITriggerTisTos, 4, 0); - /// Destructor - virtual ~ITriggerTisTos() { } - - public: - - // ------------------------------------------------- // ------------ Trigger input // ------------------------------------------------- diff --git a/Phys/DaVinciInterfaces/Kernel/IVertexFit.h b/Phys/DaVinciInterfaces/Kernel/IVertexFit.h index 2fa83d2af..1b5b77890 100644 --- a/Phys/DaVinciInterfaces/Kernel/IVertexFit.h +++ b/Phys/DaVinciInterfaces/Kernel/IVertexFit.h @@ -1,5 +1,3 @@ -// $Id: IVertexFit.h,v 1.5 2009-11-05 18:42:44 pkoppenb Exp $ -// ============================================================================ #ifndef DAVINCIKERNEL_IVERTEXFIT_H #define DAVINCIKERNEL_IVERTEXFIT_H 1 // ============================================================================ @@ -63,17 +61,13 @@ * @author Vanya BELYAEV belyaev@lapp.in2p3.fr * @date 2004-12-19 */ -class GAUDI_API IVertexFit : - virtual public extend_interfaces2<IParticleCombiner , - IParticleReFitter> +struct GAUDI_API IVertexFit : extend_interfaces< IParticleCombiner , + IParticleReFitter > { - public: // ========================================================================== /// interface machinery DeclareInterfaceID(IVertexFit, 3, 0); // ========================================================================== - public: - // ========================================================================== /** The vertex fitting method without creation of a Particle * * @code @@ -418,11 +412,6 @@ class GAUDI_API IVertexFit : ( const LHCb::Particle* particle , LHCb::Vertex& vertex ) const = 0 ; // ========================================================================== - protected: - // ========================================================================== - /// virtual and protected destructor - virtual ~IVertexFit() ; // virtual and protected destructor - // ========================================================================== }; // ============================================================================ // The END diff --git a/Phys/DaVinciInterfaces/src/DaVinciInterfaces.cpp b/Phys/DaVinciInterfaces/src/DaVinciInterfaces.cpp index 8006728ea..95ce15966 100644 --- a/Phys/DaVinciInterfaces/src/DaVinciInterfaces.cpp +++ b/Phys/DaVinciInterfaces/src/DaVinciInterfaces.cpp @@ -1,6 +1,5 @@ -// $Id: DaVinciInterfaces.cpp,v 1.11 2010-06-20 15:49:19 ibelyaev Exp $ // ============================================================================ -// Include files +// Include files // ============================================================================ // GaudiKernel // ============================================================================ @@ -11,16 +10,12 @@ #include "Kernel/IParticleReFitter.h" #include "Kernel/IParticleCombiner.h" #include "Kernel/IDecodeSimpleDecayString.h" -#include "Kernel/IDirectionFit.h" #include "Kernel/IVertexFit.h" -#include "Kernel/IMassFit.h" #include "Kernel/IJetMaker.h" -#include "Kernel/IDistanceCalculator.h" #include "Kernel/ISetInputParticles.h" #include "Kernel/IPrintDecay.h" #include "Kernel/ICheckSelResults.h" #include "Kernel/ITrackIsolation.h" -#include "Kernel/IExtraInfoTool.h" #include "Kernel/IDVAlgorithm.h" #include "Kernel/IParticleFilter.h" #include "Kernel/IParticleValue.h" @@ -30,37 +25,14 @@ #include "Kernel/IParticleVeto.h" #include "Kernel/IBremAdder.h" // ============================================================================ -/** @file - * Implementation file for class some interfaces from - * Phys/DaVinciInterfaces package - * @date 2009-08-15 +/** @file + * Implementation file for class some interfaces from + * Phys/DaVinciInterfaces package + * @date 2009-08-15 * @author Vanya BELYAEV Ivan.Belyaev - */ + */ // ============================================================================ -// virtual & protected desctructor -// ============================================================================ -IParticleReFitter :: ~IParticleReFitter () {} -IParticleCombiner :: ~IParticleCombiner () {} -IDirectionFit :: ~IDirectionFit () {} -IVertexFit :: ~IVertexFit () {} -IMassFit :: ~IMassFit () {} -IJetMaker :: ~IJetMaker () {} -IDistanceCalculator :: ~IDistanceCalculator () {} -ISetInputParticles :: ~ISetInputParticles () {} -IPrintDecay :: ~IPrintDecay () {} -ICheckSelResults :: ~ICheckSelResults () {} -IDecodeSimpleDecayString :: ~IDecodeSimpleDecayString () {} -ITrackIsolation :: ~ITrackIsolation () {} -IExtraInfoTool :: ~IExtraInfoTool () {} -IDVAlgorithm :: ~IDVAlgorithm () {} -IParticleFilter :: ~IParticleFilter () {} -IParticleValue :: ~IParticleValue () {} -IDecayTreeFit :: ~IDecayTreeFit () {} -ICheckOverlap :: ~ICheckOverlap () {} -IParticleIsolation :: ~IParticleIsolation () {} -IParticleVeto :: ~IParticleVeto () {} -IBremAdder :: ~IBremAdder () {} // ============================================================================ -// The END +// The END // ============================================================================ diff --git a/Phys/TisTosTobbing/src/TESSelectionTisTos.h b/Phys/TisTosTobbing/src/TESSelectionTisTos.h index 048d3f08e..f80ee691a 100644 --- a/Phys/TisTosTobbing/src/TESSelectionTisTos.h +++ b/Phys/TisTosTobbing/src/TESSelectionTisTos.h @@ -1,4 +1,3 @@ -// $Id: TESSelectionTisTos.h,v 1.2 2010-07-21 21:22:16 tskwarni Exp $ #ifndef TESSELECTIONTISTOS_H #define TESSELECTIONTISTOS_H 1 @@ -89,7 +88,7 @@ public: ++m_reportDepth; unsigned int result(0); - BOOST_FOREACH( const T* obj, list ) + for( const T* obj: list ) { result |= tisTos( *obj ); report << ParticleTisTos::analysisReport( *obj ); diff --git a/Phys/TisTosTobbing/src/lib/ParticleTisTos.cpp b/Phys/TisTosTobbing/src/lib/ParticleTisTos.cpp index 84f34b964..c1498e7ca 100644 --- a/Phys/TisTosTobbing/src/lib/ParticleTisTos.cpp +++ b/Phys/TisTosTobbing/src/lib/ParticleTisTos.cpp @@ -82,7 +82,7 @@ std::vector<LHCb::LHCbID> ParticleTisTos::projectTrack(const Track& track ) if( m_track2calo->isValid() ){ // is matched cellid valid const LHCb::CaloCellID centerCell = m_track2calo->caloCellID(); cells3x3.push_back(centerCell); - BOOST_FOREACH( LHCb::CaloCellID cell, m_hcalDeCal->neighborCells( centerCell ) ) + for( LHCb::CaloCellID cell: m_hcalDeCal->neighborCells( centerCell ) ) { cells3x3.push_back(cell); }; @@ -107,7 +107,7 @@ std::vector<LHCb::LHCbID> ParticleTisTos::projectTrack(const Track& track ) if( m_track2calo->isValid() ){ // is matched cellid valid const LHCb::CaloCellID centerCell = m_track2calo->caloCellID(); cells3x3.push_back(centerCell); - BOOST_FOREACH( LHCb::CaloCellID cell, m_ecalDeCal->neighborCells( centerCell ) ) + for( LHCb::CaloCellID cell: m_ecalDeCal->neighborCells( centerCell ) ) { cells3x3.push_back(cell); }; @@ -170,7 +170,7 @@ std::vector<LHCb::LHCbID> ParticleTisTos::protoParticleHits(const ProtoParticle if( m_ecalDeCal==0 ){ m_ecalDeCal = getDet<DeCalorimeter>( DeCalorimeterLocation::Ecal ); } - BOOST_FOREACH( LHCb::CaloCellID cell,m_ecalDeCal->neighborCells(caloCell)) + for( LHCb::CaloCellID cell:m_ecalDeCal->neighborCells(caloCell)) { hits.push_back(cell); } @@ -237,7 +237,7 @@ std::vector<LHCb::LHCbID> ParticleTisTos::protoParticleHits(const ProtoParticle hits.push_back(centerCell); if( extend ){ if( m_ecalDeCal==0 ){ m_ecalDeCal = getDet<DeCalorimeter>( DeCalorimeterLocation::Ecal ); } - BOOST_FOREACH( LHCb::CaloCellID cell,m_ecalDeCal->neighborCells(centerCell)) + for( LHCb::CaloCellID cell:m_ecalDeCal->neighborCells(centerCell)) { hits.push_back(cell); } @@ -246,7 +246,7 @@ std::vector<LHCb::LHCbID> ParticleTisTos::protoParticleHits(const ProtoParticle hits.push_back(centerCell1); if( extend ){ if( m_ecalDeCal==0 ){ m_ecalDeCal = getDet<DeCalorimeter>( DeCalorimeterLocation::Ecal ); } - BOOST_FOREACH( LHCb::CaloCellID cell,m_ecalDeCal->neighborCells(centerCell)) + for( LHCb::CaloCellID cell:m_ecalDeCal->neighborCells(centerCell)) { hits.push_back(cell); } @@ -749,7 +749,7 @@ unsigned int ParticleTisTos::tisTos(const LHCb::HltObjectSummary & hos, unsigned if( hos.summarizedObjectCLID() == 1 ){ // this is Selection summary: take OR between candidates unsigned int result=0; - valid = 0; + valid = 0; for( SmartRefVector< LHCb::HltObjectSummary >::const_iterator ihos=sub.begin();ihos!=sub.end();++ihos){ if(!(ihos->target()))continue; const LHCb::HltObjectSummary & daug = *(ihos->target()); @@ -797,7 +797,7 @@ unsigned int ParticleTisTos::tisTos(const LHCb::HltObjectSummary & hos, unsigned } else { // no info? skip if( !result )continue; - //***done already*** + //***done already*** //empty=false; // every daughter of the Parent must be TOS (TIS) for Parent to be TOS (TIS) resultTISTOS &= result; @@ -925,7 +925,7 @@ std::string ParticleTisTos::analysisReport(const LHCb::HltObjectSummary & hos) bool ParticleTisTos::tos(const LHCb::HltObjectSummary & hos, unsigned int & valid) { - valid = 1; + valid = 1; unsigned int dvalid; const SmartRefVector< LHCb::HltObjectSummary > & sub = hos.substructure(); if ( msgLevel(MSG::VERBOSE) ) verbose() << " tos HltObjectSummary substr size " << sub.size() << endmsg; -- GitLab