/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Mdc/MdcGeomSvc/MdcGeomSvc-00-01-37/MdcGeomSvc/MdcGeoGeneral.h

Go to the documentation of this file.
00001 // $Id: MdcGeoGeneral.h,v 1.7 2010/03/26 00:45:11 zhangy Exp $ // -*-c++-*-
00002 // a template header file for a class called "MdcGeoGeneral"
00003 #ifndef MDC_GEO_GENERAL_H
00004 #define MDC_GEO_GENERAL_H
00005 
00006 #include <CLHEP/Geometry/Point3D.h>
00007 #include <iostream>
00008 #include <string>
00009 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00010 typedef HepGeom::Point3D<double> HepPoint3D;
00011 #endif
00012 
00013 using namespace CLHEP;
00014 using namespace std;
00015 class MdcGeoGeneral {
00016 
00017     public:
00018         // Constructor.
00019         MdcGeoGeneral():fId(0),fRadius(0),fLength(0),fNCell(0),fOffset(0),fnomOffset(0),fShift(0),fnomShift(0),fTwistF(0),fTwistB(0),fPhi(0),fnomPhi(0),fFirst(0),
00020                         fSxEast(0.),fSyEast(0.),fSzEast(0.),fRxEast(0.),fRyEast(0.),fRzEast(0.),fSxWest(0.),fSyWest(0.),fSzWest(0.),fRxWest(0.),fRyWest(0.),fRzWest(0.)
00021         {
00022             HepPoint3D O(0,0,0);
00023             fOffF=O;
00024             fOffB=O;
00025         };
00026         // Copy and Assignment
00027         MdcGeoGeneral(const MdcGeoGeneral& e){
00028             fId=e.Id();
00029             fLayerName=e.LayerName(); 
00030             fRadius=e.Radius();
00031             fLength=e.Length();
00032             fNCell=e.NCell();
00033             fOffset=e.Offset();
00034             fShift=e.Shift();
00035             fnomOffset=e.nomOffset();
00036             fnomShift=e.nomShift();
00037             fTwistF=e.TwistF();
00038             fTwistB=e.TwistB();
00039             fOffF=e.OffF();
00040             fOffB=e.OffB();
00041             fPhi=e.Phi();    
00042             fnomPhi=e.nomPhi();
00043             fFirst=e.First(); 
00044             fSxEast=e.SxEast();
00045             fSyEast=e.SyEast();
00046             fSzEast=e.SzEast();
00047             fRxEast=e.RxEast();
00048             fRyEast=e.RyEast();
00049             fRzEast=e.RzEast();
00050 
00051             fSxWest=e.SxWest();
00052             fSyWest=e.SyWest();
00053             fSzWest=e.SzWest();
00054             fRxWest=e.RxWest();
00055             fRyWest=e.RyWest();
00056             fRzWest=e.RzWest();
00057         };
00058         MdcGeoGeneral& operator=(const MdcGeoGeneral& e) {
00059             if(this!=&e)
00060             {
00061                 fId=e.Id();
00062                 fLayerName=e.LayerName();  
00063                 fLength=e.Length();
00064                 fRadius=e.Radius();
00065                 fNCell=e.NCell();
00066                 fOffset=e.Offset();
00067                 fShift=e.Shift();
00068                 fnomOffset=e.nomOffset();
00069                 fnomShift=e.nomShift();
00070                 fTwistF=e.TwistF();
00071                 fTwistB=e.TwistB();
00072                 fOffF=e.OffF();
00073                 fOffB=e.OffB();
00074                 fPhi=e.Phi();  
00075                 fnomPhi=e.nomPhi();
00076                 fFirst=e.First(); 
00077                 fSxEast=e.SxEast();
00078                 fSyEast=e.SyEast();
00079                 fSzEast=e.SzEast();
00080                 fRxEast=e.RxEast();
00081                 fRyEast=e.RyEast();
00082                 fRzEast=e.RzEast();
00083 
00084                 fSxWest=e.SxWest();
00085                 fSyWest=e.SyWest();
00086                 fSzWest=e.SzWest();
00087                 fRxWest=e.RxWest();
00088                 fRyWest=e.RyWest();
00089                 fRzWest=e.RzWest();
00090             }
00091             return *this;
00092         }
00093 
00094         // Destructor
00095         ~MdcGeoGeneral(){};
00096 
00097     public: // Extractors
00098         int Id(void) const;
00099         string LayerName(void) const;  
00100         double Radius(void) const;
00101         double Length(void) const;
00102         int    NCell(void) const;
00103         double  Offset(void) const;
00104         double  Shift(void) const;
00105         double  nomOffset(void) const;
00106         double  nomShift(void) const;
00107         double TwistF(void) const;
00108         double TwistB(void) const;
00109         double Phi(void) const;   
00110         double nomPhi(void) const;
00111         int    First(void) const; 
00112         HepPoint3D OffF(void) const;
00113         HepPoint3D OffB(void) const;
00114         double SxEast(void) const;
00115         double SyEast(void) const;
00116         double SzEast(void) const;
00117         double RxEast(void) const;
00118         double RyEast(void) const;
00119         double RzEast(void) const;
00120 
00121         double SxWest(void) const;
00122         double SyWest(void) const;
00123         double SzWest(void) const;
00124         double RxWest(void) const;
00125         double RyWest(void) const;
00126         double RzWest(void) const;
00127 
00128     public: // Modifiers
00129         int Id(int);
00130         string LayerName(string i);  
00131         double Radius(double);
00132         double Length(double);
00133         int    NCell(int);
00134         double  Offset(double);
00135         double  Shift(double);
00136         double  nomOffset(double);
00137         double  nomShift(double);
00138 
00139         double TwistF(double);
00140         double TwistB(double);
00141         double Phi(double);   
00142         double nomPhi(double); 
00143         int    First(int);   
00144         HepPoint3D OffF(HepPoint3D);
00145         HepPoint3D OffB(HepPoint3D);
00146         double SxEast(double); 
00147         double SyEast(double); 
00148         double SzEast(double); 
00149         double RxEast(double); 
00150         double RyEast(double); 
00151         double RzEast(double); 
00152 
00153         double SxWest(double); 
00154         double SyWest(double); 
00155         double SzWest(double); 
00156         double RxWest(double); 
00157         double RyWest(double); 
00158         double RzWest(double); 
00159 
00160 
00161     private:
00162         int fId;
00163         string  fLayerName;   //name of layer
00164         double fRadius; //radius of layer(mm)
00165         double fLength; //wire length of the layer(mm)
00166         int    fNCell;     //# of cells of that layer
00167         double  fOffset;  // offset at endplate (unit in cell)
00168         double  fnomOffset;  // nominal offset at endplate (unit in cell)
00169         double  fShift;   //# of cells to be shifte at forward w.r.t. backward endplate
00170         double  fnomShift;   //nominal # of cells to be shifte at forward w.r.t. backward endplate
00171         double fTwistF; //twist angle for fwrd (rad) 
00172         double fTwistB; //twist angle for bckwrd (rad)
00173         double fPhi;    //Phi on East Endplate
00174         double fnomPhi;    //nominal Phi on East Endplate
00175         int    fFirst;    //0: first is field wire; 1: signal wire.
00176         double fSxEast;
00177         double fSyEast;
00178         double fSzEast;
00179         double fRxEast;
00180         double fRyEast;
00181         double fRzEast;
00182 
00183         double fSxWest;
00184         double fSyWest;
00185         double fSzWest;
00186         double fRxWest;
00187         double fRyWest;
00188         double fRzWest;
00189         HepPoint3D fOffF; //Offset of fwrd wire  
00190         HepPoint3D fOffB; //Offset of bckwrd wire
00191 };  
00192 
00193 //-----------------------------------------------------
00194 // Extractors
00195 inline int    MdcGeoGeneral::Id(void) const { return fId; }
00196 inline string  MdcGeoGeneral::LayerName(void) const { return fLayerName; }
00197 inline double MdcGeoGeneral::Radius(void) const { return fRadius; }
00198 inline double MdcGeoGeneral::Length(void) const { return fLength; }
00199 inline int    MdcGeoGeneral::NCell(void) const { return fNCell; }
00200 inline double  MdcGeoGeneral::Offset(void) const { return fOffset; }
00201 inline double  MdcGeoGeneral::Shift(void) const { return fShift; }
00202 inline double  MdcGeoGeneral::nomOffset(void) const { return fnomOffset; }
00203 inline double  MdcGeoGeneral::nomShift(void) const { return fnomShift; }
00204 inline double MdcGeoGeneral::TwistF(void) const { return fTwistF; }
00205 inline double MdcGeoGeneral::TwistB(void) const { return fTwistB; }
00206 inline double MdcGeoGeneral::Phi(void) const { return fPhi; } 
00207 inline double MdcGeoGeneral::nomPhi(void) const { return fnomPhi; }
00208 inline int    MdcGeoGeneral::First(void) const { return fFirst; } 
00209 inline HepPoint3D MdcGeoGeneral::OffF(void) const { return fOffF;}
00210 inline HepPoint3D MdcGeoGeneral::OffB(void) const { return fOffB;}
00211 inline double MdcGeoGeneral::SxEast(void) const { return fSxEast; }
00212 inline double MdcGeoGeneral::SyEast(void) const { return fSyEast; }
00213 inline double MdcGeoGeneral::SzEast(void) const { return fSzEast; }
00214 inline double MdcGeoGeneral::RxEast(void) const { return fRxEast; }
00215 inline double MdcGeoGeneral::RyEast(void) const { return fRyEast; }
00216 inline double MdcGeoGeneral::RzEast(void) const { return fRzEast; }
00217 
00218 inline double MdcGeoGeneral::SxWest(void) const { return fSxWest; }
00219 inline double MdcGeoGeneral::SyWest(void) const { return fSyWest; }
00220 inline double MdcGeoGeneral::SzWest(void) const { return fSzWest; }
00221 inline double MdcGeoGeneral::RxWest(void) const { return fRxWest; }
00222 inline double MdcGeoGeneral::RyWest(void) const { return fRyWest; }
00223 inline double MdcGeoGeneral::RzWest(void) const { return fRzWest; }
00224 
00225 // Modifiers
00226 inline int    MdcGeoGeneral::Id(int i) { return fId=i; }
00227 inline string MdcGeoGeneral::LayerName(string i) { return fLayerName = i; } 
00228 inline double MdcGeoGeneral::Radius(double i) { return fRadius=i; }
00229 inline double MdcGeoGeneral::Length(double i) { return fLength=i; }
00230 inline int    MdcGeoGeneral::NCell(int i) { return fNCell=i; }
00231 inline double  MdcGeoGeneral::Offset(double i) { return fOffset=i; }
00232 inline double  MdcGeoGeneral::Shift(double i) { return fShift=i; }
00233 inline double  MdcGeoGeneral::nomOffset(double i) { return fnomOffset=i; }
00234 inline double  MdcGeoGeneral::nomShift(double i) { return fnomShift=i; }
00235 
00236 inline double MdcGeoGeneral::TwistF(double i) { return fTwistF=i; }
00237 inline double MdcGeoGeneral::TwistB(double i) { return fTwistB=i; }
00238 inline double MdcGeoGeneral::Phi(double i) { return fPhi=i; } 
00239 inline double MdcGeoGeneral::nomPhi(double i) { return fnomPhi=i; }
00240 
00241 inline int    MdcGeoGeneral::First(int i) { return fFirst=i; }
00242 inline HepPoint3D MdcGeoGeneral::OffF(HepPoint3D i) { return fOffF=i;}
00243 inline HepPoint3D MdcGeoGeneral::OffB(HepPoint3D i) { return fOffB=i;}
00244 
00245 inline double MdcGeoGeneral::SxEast(double i) { return fSxEast=i; }
00246 inline double MdcGeoGeneral::SyEast(double i) { return fSyEast=i; }
00247 inline double MdcGeoGeneral::SzEast(double i) { return fSzEast=i; }
00248 inline double MdcGeoGeneral::RxEast(double i) { return fRxEast=i; }
00249 inline double MdcGeoGeneral::RyEast(double i) { return fRyEast=i; }
00250 inline double MdcGeoGeneral::RzEast(double i) { return fRzEast=i; }
00251 
00252 inline double MdcGeoGeneral::SxWest(double i) { return fSxWest=i; }
00253 inline double MdcGeoGeneral::SyWest(double i) { return fSyWest=i; }
00254 inline double MdcGeoGeneral::SzWest(double i) { return fSzWest=i; }
00255 inline double MdcGeoGeneral::RxWest(double i) { return fRxWest=i; }
00256 inline double MdcGeoGeneral::RyWest(double i) { return fRyWest=i; }
00257 inline double MdcGeoGeneral::RzWest(double i) { return fRzWest=i; }
00258 
00259 
00260 //-----------------------------------------------------
00261 
00262 #endif /* MdcGeoGeneral_CLASS */
00263 

Generated on Tue Nov 29 23:12:53 2016 for BOSS_7.0.2 by  doxygen 1.4.7