EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GFRaveConverters.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file GFRaveConverters.h
1 /* Copyright 2008-2009, Technische Universitaet Muenchen,
2  Authors: 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 
30 #ifndef GFRAVECONVERTERS_H
31 #define GFRAVECONVERTERS_H
32 
33 #include "AbsTrackRep.h"
34 #include "DetPlane.h"
35 #include "Track.h"
36 #include "GFRaveVertex.h"
37 #include "GFRaveVertexFactory.h"
38 
39 #include <rave/Track.h>
40 #include <rave/Plane.h>
41 #include <rave/Vertex.h>
42 
43 #include <TVector3.h>
44 #include <TVectorD.h>
45 #include <TMatrixDSym.h>
46 
47 #include <iostream>
48 
49 
53 namespace genfit {
54 
55  // GENFIT to RAVE
56 
64  std::vector < rave::Track > GFTracksToTracks(const std::vector < genfit::Track* > & GFTracks,
65  std::vector < genfit::MeasuredStateOnPlane* > * GFStates, // = nullptr
66  std::map<int, genfit::trackAndState>& IdGFTrackStateMap,
67  int startID = 0);
68 
69  rave::Track GFTrackToTrack(trackAndState, int id = -1, std::string tag="");
70  //rave::Track MeasuredStateOnPlaneToTrack(const MeasuredStateOnPlane* state, const rave::Track& orig);
71  //rave::Track MeasuredStateOnPlaneToTrack(const MeasuredStateOnPlane* state, int id = -1, Track* originaltrack = nullptr, std::string tag="");
72 
73  // RAVE to GENFIT
76  void setData(const rave::Track & orig, MeasuredStateOnPlane* state);
77 
78  GFRaveVertex* RaveToGFVertex(const rave::Vertex &, const std::map<int, genfit::trackAndState>& IdGFTrackStateMap);
79  void RaveToGFVertices(std::vector<GFRaveVertex*> *, const std::vector<rave::Vertex> &, const std::map<int, genfit::trackAndState>& IdGFTrackStateMap);
80 
81  SharedPlanePtr PlaneToGFDetPlane(const ravesurf::Plane& rplane);
82 
83  // RAVE to ROOT
84  TVector3 Point3DToTVector3(const rave::Point3D&);
85  TVector3 Vector3DToTVector3(const rave::Vector3D&);
86 
87  TMatrixDSym Covariance3DToTMatrixDSym(const rave::Covariance3D&);
88  TVectorD Vector6DToTVectorD(const rave::Vector6D&);
89  TMatrixDSym Covariance6DToTMatrixDSym(const rave::Covariance6D&);
90 
91  // ROOT to RAVE
92  rave::Point3D TVector3ToPoint3D(const TVector3 &);
93  rave::Covariance3D TMatrixDSymToCovariance3D(const TMatrixDSym&);
94 
95 
96 } /* End of namespace genfit */
99 #endif // GFRAVECONVERTERS_H
100