Go to the documentation of this file.00001 #ifndef TR_FastHelix_H_
00002 #define TR_FastHelix_H_
00003
00004 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00005 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00006 #include "RecoTracker/TkSeedGenerator/interface/FastCircle.h"
00007 #include "FWCore/Framework/interface/EventSetup.h"
00008 #include "FWCore/Framework/interface/ESHandle.h"
00009 #include "MagneticField/Engine/interface/MagneticField.h"
00010 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00011
00027 class FastHelix {
00028
00029 private:
00030
00031 typedef FreeTrajectoryState FTS;
00032
00033 public:
00034
00035
00036
00037 FastHelix(const GlobalPoint& outerHit,
00038 const GlobalPoint& middleHit,
00039 const GlobalPoint& aVertex,
00040 const edm::EventSetup& iSetup) : theOuterHit(outerHit),
00041 theMiddleHit(middleHit),
00042 theVertex(aVertex),
00043 theCircle(outerHit,
00044 middleHit,
00045 aVertex) {
00046 iSetup.get<IdealMagneticFieldRecord>().get(pSetup);
00047 tesla0=pSetup->inTesla(GlobalPoint(0,0,0));
00048 useBasisVertex = false;
00049 }
00050
00051
00052 FastHelix(const GlobalPoint& outerHit,
00053 const GlobalPoint& middleHit,
00054 const GlobalPoint& aVertex,
00055 const edm::EventSetup& iSetup,
00056 const GlobalPoint& bVertex) : theOuterHit(outerHit),
00057 theMiddleHit(middleHit),
00058 theVertex(aVertex),
00059 basisVertex(bVertex),
00060 theCircle(outerHit,
00061 middleHit,
00062 aVertex) {
00063 iSetup.get<IdealMagneticFieldRecord>().get(pSetup);
00064 tesla0=pSetup->inTesla(GlobalPoint(0,0,0));
00065 useBasisVertex = true;
00066 }
00067
00068 ~FastHelix() {}
00069
00070 bool isValid() const {return theCircle.isValid();}
00071
00072 FTS stateAtVertex() const;
00073
00074 FTS helixStateAtVertex() const;
00075
00076 FTS straightLineStateAtVertex() const;
00077
00078 private:
00079
00080 GlobalPoint theOuterHit;
00081 GlobalPoint theMiddleHit;
00082 GlobalPoint theVertex;
00083 GlobalPoint basisVertex;
00084 FastCircle theCircle;
00085 edm::ESHandle<MagneticField> pSetup;
00086 GlobalVector tesla0;
00087 bool useBasisVertex;
00088 };
00089
00090 #endif //TR_FastHelix_H_
00091