EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFRaveTrackParameters.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFRaveTrackParameters.h
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
29 #ifndef GFRAVETRACKPARAMETERS_H
30 #define GFRAVETRACKPARAMETERS_H
31 
32 #include "Track.h"
33 #include "AbsTrackRep.h"
34 
35 #include <TObject.h>
36 #include <TVector3.h>
37 #include <TVectorD.h>
38 #include <TMatrixDSym.h>
39 #include <TRef.h>
40 
41 #include <iostream>
42 
43 
44 namespace genfit {
45 
52 {
53  public:
54  // constructors, destructors
56  GFRaveTrackParameters(const Track* track, MeasuredStateOnPlane* originalState, double weight, const TVectorD & state6, const TMatrixDSym & cov6x6, bool isSmoothed);
57  GFRaveTrackParameters(const Track* track, MeasuredStateOnPlane* originalState, double weight);
58 
59  // Accessors
60  double getWeight() const {return weight_;}
61 
62  bool hasTrack() const {return originalTrack_.GetObject() != nullptr;}
63  const Track* getTrack() const {return static_cast<Track*>(originalTrack_.GetObject());}
64 
65  UInt_t GetUniqueID() const {return originalTrack_.GetUniqueID();}
66 
67  bool hasSmoothedData() const {return hasSmoothedData_;}
68  TVectorD getState() const {return state_;}
69  TVector3 getPos() const;
70  TVector3 getMom() const;
71  const TMatrixDSym & getCov() const {return cov_;}
72 
73  double getCharge() const;
74  double getPdg() const;
75 
76  void Print(const Option_t* = "") const;
77 
78  private:
79 
80  const TRef originalTrack_; // NO ownership. We use TRef, since the Tracks could be stored in another file or tree.
81 
82  double weight_; // weight of the track in the vertex
83  TVectorD state_; // x, y, z, px, py, pz
84  TMatrixDSym cov_; // 6x6 covariance matrix
85  bool hasSmoothedData_; // true if state_ is forced to go through the vertex
86 
87  private:
88  ClassDef(GFRaveTrackParameters, 1)
89 };
90 
91 } /* End of namespace genfit */
94 #endif // GFRAVETRACKPARAMETERS_H