Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:26

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 
0020 /**
0021  *  @author Johannes Rauch (Technische Universit&auml;t M&uuml;nchen, original author)
0022  *
0023  */
0024 
0025 /** @addtogroup GFRave
0026  * @{
0027  */
0028 
0029 #ifndef GFRAVEVERTEX_H
0030 #define GFRAVEVERTEX_H
0031 
0032 #include "AbsTrackRep.h"
0033 #include "Track.h"
0034 #include "GFRaveTrackParameters.h"
0035 
0036 
0037 namespace genfit {
0038 
0039 /**
0040  * @brief GFRaveVertex class
0041  *
0042  * A Vertex contains information about its position and covariance.
0043  * The tracks the vertex is consisting of are stored in smoothedTracks_.
0044  * These GFRaveTrackParameters contain the weight of the corresponding track
0045  * in the vertex, smoothed track parameters and a pointer to the original
0046  * unaltered genfit::Track.
0047  */
0048 class GFRaveVertex : public TObject {
0049 
0050   public:
0051     // constructors, destructors
0052     GFRaveVertex();
0053     GFRaveVertex(const TVector3 & pos, const TMatrixDSym & cov,
0054                  const std::vector < genfit::GFRaveTrackParameters* > & smoothedTracks,
0055                  double ndf, double chi2, int id = -1);
0056 
0057     GFRaveVertex(const GFRaveVertex &);
0058 
0059     GFRaveVertex& operator=(GFRaveVertex);
0060     void swap(GFRaveVertex&);
0061 
0062     ~GFRaveVertex();
0063 
0064 
0065     // Accessors
0066     //! get Position
0067     TVector3 getPos() const {return pos_;}
0068 
0069     //!get 3x3 covariance (error) of position.
0070     TMatrixDSym getCov() const {return cov_;}
0071 
0072     double getNdf() const {return ndf_;}
0073     double getChi2() const {return chi2_;}
0074 
0075     //! Number of tracks the vertex is made of
0076     unsigned int getNTracks() const {return smoothedTracks_.size();}
0077     GFRaveTrackParameters* getParameters(unsigned int i) const {return smoothedTracks_[i];}
0078 
0079     int getId() const {return id_;}
0080 
0081     void Print(const Option_t* = "") const;
0082 
0083 
0084   private:
0085 
0086     TVector3 pos_; // position of the vertex
0087     TMatrixDSym cov_; // error of the vertex position
0088     double ndf_;
0089     double chi2_;
0090     int id_; // id of the rave::vertex the GFVertex is created from
0091 
0092     std::vector < genfit::GFRaveTrackParameters* > smoothedTracks_; //-> track parameters of smoothed (with the vertex information) tracks, weights and original tracks; Vertex has ownership!
0093 
0094   public:
0095     ClassDef(GFRaveVertex, 1)
0096 
0097 };
0098 
0099 } /* End of namespace genfit */
0100 /** @} */
0101 
0102 #endif // GFRAVEVERTEX_H