00001 #ifndef __BDSBEAMLINENAVIGATOR_H 00002 #define __BDSBEAMLINENAVIGATOR_H 00003 00004 #include "G4ThreeVector.hh" 00005 #include "G4RotationMatrix.hh" 00006 00007 #include "BDSAcceleratorComponent.hh" 00008 00009 class BDSBeamlineNavigator : public std::vector<G4Transform3D*> { 00010 public: 00011 BDSBeamlineNavigator(); 00012 ~BDSBeamlineNavigator(); 00013 00014 void addComponent(BDSAcceleratorComponent* var); 00015 void print(); 00016 00017 G4RotationMatrix* rotation(); 00018 G4RotationMatrix* rotationGlobal(); 00019 G4ThreeVector* position(); 00020 G4ThreeVector* positionStart(); 00021 G4ThreeVector* positionEnd(); 00022 G4ThreeVector* positionFromCurrentCenter(); 00023 00024 G4double s_total(); 00025 00026 void first(); 00027 bool isDone(); 00028 void next(); 00029 00030 private: 00031 G4ThreeVector* _localX; 00032 G4ThreeVector* _localY; 00033 G4ThreeVector* _localZ; 00034 G4ThreeVector* _position; 00035 G4ThreeVector* _positionStart; 00036 G4ThreeVector* _positionEnd; 00037 G4ThreeVector* _positionFromCurrentCenter; 00038 G4ThreeVector* _zHalfAngle; 00039 G4RotationMatrix* _rotationLocal; 00040 G4RotationMatrix* _rotationGlobal; 00041 G4RotationMatrix* _rotation; 00042 00043 std::list<G4RotationMatrix*> _rotationList; 00044 std::list<G4RotationMatrix*> _rotationGlobalList; 00045 std::list<G4ThreeVector*> _positionList; 00046 std::list<G4ThreeVector*> _positionStartList; 00047 std::list<G4ThreeVector*> _positionEndList; 00048 std::list<G4ThreeVector*> _positionFromCurrentCenterList; 00049 00050 std::list<G4RotationMatrix*>::const_iterator _iterRotation; 00051 std::list<G4RotationMatrix*>::const_iterator _iterRotationGlobal; 00052 std::list<G4ThreeVector*>::const_iterator _iterPosition; 00053 std::list<G4ThreeVector*>::const_iterator _iterPositionStart; 00054 std::list<G4ThreeVector*>::const_iterator _iterPositionEnd; 00055 std::list<G4ThreeVector*>::const_iterator _iterPositionFromCurrentCenter; 00056 00057 G4double _s_local, _s_total; 00058 }; 00059 00060 #endif