EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFPointPath.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFPointPath.h
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert
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 
20 /*
21  */
22 
28 #ifndef GFPOINTPATH_H
29 #define GFPOINTPATH_H
30 
31 #include "math.h"
32 #include "TVector3.h"
33 #include "TGeoMaterial.h"
34 
35 
36 class GFPointPath {
37 
38  public:
39  // Constructors/Destructors
40  GFPointPath();
41  GFPointPath(const TVector3& pos, double path){fPos = pos; fPath = path;}
42 
43  // Accessors
44  const TVector3& getPos() const {return fPos;}
45  double X() const {return fPos.X();}
46  double Y() const {return fPos.Y();}
47  double Z() const {return fPos.Z();}
48  double getPath() const {return fPath;}
49  double getAbsPath() const {return fabs(fPath);}
50 
51  // Modifiers
52  void setPos(TVector3& pos){fPos = pos;}
53  void setPath(double path){fPath = path;}
54 
55  // Functions
56  void addToPath(double dpath){fPath += dpath;}
57  void Print() const;
58 
59  private:
60  TVector3 fPos; // position
61  double fPath; // pathlength to next position (signed)
62 };
63 
64 #endif
65