LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
GeaneTrackRep2.h
Go to the documentation of this file.
1 //-----------------------------------------------------------
2 // File and Version Information:
3 //
4 // Description:
5 // a GEANE (sd-system) track representation
6 // (q/p, v',w',v,w,spu)
7 // (v,w) refers to GFDetPlane system
8 //
9 // Environment:
10 // Software developed for the PANDA Detector at FAIR.
11 //
12 // Author List:
13 // Sebastian Neubert TUM (original author)
14 // Andrea Fontana INFN
15 //
16 //
17 //-----------------------------------------------------------
18 
19 #ifndef GeaneTRACKREP2_HH
20 #define GeaneTRACKREP2_HH
21 
22 // Base Class Headers ----------------
24 //#include "FairTrackParP.h"
25 
26 // Collaborating Class Headers -------
27 #include <ostream> // remove if you do not need streaming op
28 #include "TVectorT.h"
29 
30 
31 // Collaborating Class Declarations --
32 //class FairGeaneProNew;
33 
34 namespace genf {
35 
36 class GeaneTrackRep2 : public GFAbsTrackRep {
37 public:
38 
39  // Constructors/Destructors ---------
41  GeaneTrackRep2(const GFDetPlane& plane, // will be defined at origin of plane
42  const TVector3& mom,
43  const TVector3& poserr,
44  const TVector3& momerr,
45  int PDGCode);
46 
47 
48  virtual ~GeaneTrackRep2();
49 
50 
51  virtual GFAbsTrackRep* clone() const {return new GeaneTrackRep2(*this);}
52  virtual GFAbsTrackRep* prototype()const{return new GeaneTrackRep2();}
53 
54  // Operators
55  friend std::ostream& operator<< (std::ostream& s, const GeaneTrackRep2& me);
56 
57  // Accessors -----------------------
58 
59  // Modifiers
60 
61  // Operations ----------------------
62 
63  virtual double extrapolate(const GFDetPlane&, TMatrixT<Double_t>& statePred);
64  //virtual void extrapolate(const GFDetPlane&,
65  // const TMatrixT<Double_t>& stateFrom
66  // TMatrixT<Double_t>& stateResult);
67 
68  virtual double extrapolate(const GFDetPlane&,
69  TMatrixT<Double_t>& statePred,
70  TMatrixT<Double_t>& covPred);
71 
72  //these two are overriding GFAbsTrackRep methods
73  void extrapolateToPoint(const TVector3& pos,
74  TVector3& poca,
75  TVector3& normVec);
76 
77  void extrapolateToLine(const TVector3& point1,
78  const TVector3& point2,
79  TVector3& poca,
80  TVector3& normVec,
81  TVector3& poca_onwire);
82 
83 
84  // TVector3 getPocaOnLine(const TVector3& p1,
85  // const TVector3& p2,
86  // bool back=false);
87 
88  virtual TVector3 getPos(const GFDetPlane&) ;
89  virtual TVector3 getMom(const GFDetPlane&) ;
90  virtual void getPosMom(const GFDetPlane&,TVector3& pos,TVector3& mom) ;
91  virtual void getPosMomCov(const GFDetPlane& pl,TVector3& pos,TVector3& mom,TMatrixT<Double_t>& cov);
92  virtual double getCharge()const {return fCharge;}
93  //FairGeaneProNew* getPropagator() {return _geane;}
94  int getPDG() {return fPdg;};
95 
96  // void setPropagator(FairGeaneProNew* g){_geane=g;}
97  void switchDirection(){;}
98 
99  // (-1,0,1) -> (backward prop,decide myself,forward)
100 
101 private:
102 
103  // Private Data Members ------------
104  // FairGeaneProNew* _geane; //!
105  // double _spu; // sign of z-component of momentum
106 
107  int fPdg; // pdg code of the particle to be tracked
108  int fG3ParticleID; // pdg code of the particle to be tracked
109  double fCharge;
110 
111  // Private Methods -----------------
112  void poca2Line(const TVector3&,const TVector3&,const TVector3&,TVector3&);
113  void pocaLine2Line(const TVector3& point1,const TVector3& line1,const TVector3& point2, const TVector3& line2,TVector3& result1,TVector3& result2);
114 
115  // public:
116  //ClassDef(GeaneTrackRep2,2)
117 
118 };
119 
120 } // namespace genf
121 
122 #endif
123 
124 //--------------------------------------------------------------
125 // $Log$
126 //--------------------------------------------------------------
Float_t s
Definition: plot.C:23
Generic Interface to magnetic fields in GENFIT.
virtual GFAbsTrackRep * clone() const
virtual GFAbsTrackRep * prototype() const
Base Class for genfit track representations. Defines interface for track parameterizations.
Definition: GFAbsTrackRep.h:85
virtual double getCharge() const
virtual double extrapolate(const GFDetPlane &, TMatrixT< Double_t > &statePred)
returns the tracklength spanned in this extrapolation
void poca2Line(const TVector3 &, const TVector3 &, const TVector3 &, TVector3 &)
void extrapolateToLine(const TVector3 &point1, const TVector3 &point2, TVector3 &poca, TVector3 &normVec, TVector3 &poca_onwire)
This method extrapolates to the point of closest approach to a line.
void extrapolateToPoint(const TVector3 &pos, TVector3 &poca, TVector3 &normVec)
This method is to extrapolate the track to point of closest approach to a point in space...
virtual void getPosMomCov(const GFDetPlane &pl, TVector3 &pos, TVector3 &mom, TMatrixT< Double_t > &cov)
method which gets position, momentum and 6x6 covariance matrix
void pocaLine2Line(const TVector3 &point1, const TVector3 &line1, const TVector3 &point2, const TVector3 &line2, TVector3 &result1, TVector3 &result2)
friend std::ostream & operator<<(std::ostream &s, const GeaneTrackRep2 &me)
virtual void getPosMom(const GFDetPlane &, TVector3 &pos, TVector3 &mom)