/home/cern/BDSIM_new/include/BDSElement.hh

00001 /* BDSIM code.    Version 1.0
00002    Author: John C. Carter, Royal Holloway, Univ. of London.
00003    Last modified 02.12.2004
00004    Copyright (c) 2004 by J.C.Carter.  ALL RIGHTS RESERVED. 
00005 */
00006 
00007 #ifndef BDSElement_h
00008 #define BDSElement_h 
00009 
00010 #include "globals.hh"
00011 #include "BDSAcceleratorComponent.hh"
00012 #include "BDSMaterials.hh"
00013 #include "G4LogicalVolume.hh"
00014 
00015 #include "G4FieldManager.hh"
00016 #include "G4ChordFinder.hh"
00017 #include "G4Mag_UsualEqRhs.hh"
00018 #include "G4UserLimits.hh"
00019 #include "G4VisAttributes.hh"
00020 
00021 #include "BDSField.hh"
00022 #include "BDSXYMagField.hh"
00023 
00024 #include "G4EqMagElectricField.hh"
00025 #include "G4ClassicalRK4.hh"
00026 #include "BDSRK4Stepper.hh"
00027 
00028 
00029 class BDSElement :public BDSAcceleratorComponent
00030 {
00031 public:
00032   BDSElement(G4String aName, G4String geometry, G4String bmap, G4double aLength, 
00033                                                 G4double bpRad, G4double outR);
00034   ~BDSElement();
00035 
00036   void BuildGeometry();
00037   void PlaceComponents(G4String geometry, G4String bmap);
00038   void BuildMagField(G4int nvar=8, G4bool foreToAllDaughters=false);
00039 
00040   // creates a field mesh in global coordinates in case it is given by map
00041   void PrepareField(G4VPhysicalVolume *referenceVolume);
00042 
00043   void AlignComponent(G4ThreeVector& TargetPos, 
00044                       G4RotationMatrix *TargetRot,
00045                       G4RotationMatrix& globalRotation,
00046                       G4ThreeVector& rtot,
00047                       G4ThreeVector& rlast,
00048                       G4ThreeVector& localX,
00049                       G4ThreeVector& localY,
00050                       G4ThreeVector& localZ); 
00051    
00052 protected:
00053   
00054   G4VisAttributes* SetVisAttributes();  
00055 
00056 private:
00057 
00058   BDSField *itsField;
00059   G4double itsOuterR;
00060   // Volume to align incoming beamline on inside the marker volume
00061   // (set during Geometery construction)
00062   G4VPhysicalVolume* align_in_volume;
00063   // Volume to align outgoing beamline on inside the marker volume
00064   // (set during Geometery construction)
00065   G4VPhysicalVolume* align_out_volume;
00066 
00067 
00068 };
00069 
00070 
00071 #endif

Generated on Wed Mar 5 17:25:21 2008 for BDSIM by  doxygen 1.5.3