00001 // 00002 // EmcRecBarrelGeo 00003 // 00004 // Dec 18, 2003, Created by Wang.Zhe 00005 // 00006 // unit: mm, radian 00007 // 00008 #ifndef EMC_REC_BARREL_GEO_H 00009 #define EMC_REC_BARREL_GEO_H 00010 00011 #include <vector> 00012 #include <iostream> 00013 00014 #include "CLHEP/Geometry/Point3D.h" 00015 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00016 typedef HepGeom::Point3D<double> HepPoint3D; 00017 #endif 00018 00019 #include "Identifier/Identifier.h" 00020 #include "Identifier/EmcID.h" 00021 #include "EmcRecGeoSvc/EmcRecCrystal.h" 00022 00023 using namespace CLHEP; 00024 00025 class EmcRecBarrelGeo 00026 { 00027 public: 00028 // Constructors and destructors 00029 EmcRecBarrelGeo(); 00030 ~EmcRecBarrelGeo(); 00031 00032 // private method 00033 private: 00034 //====for barrel EMC 00035 void ParameterInitialize(); 00036 // Evaluate one volumn along y-axis, then transform them to others by rotation. 00037 void CalculateStandardCrystal(); 00038 // Figure out the volumn with minimum phi 00039 void Transform2Column1(); 00040 // Fill crystals' center vector 00041 void FillCCenterVector(); 00042 00043 public: 00044 // Access by others (refer to Identifier for ID arrangement) 00045 // 00046 // Index range: theta phi 00047 // barrel==> 0-43 0-119 00048 // (value of angel from min to max) 00049 // 00050 EmcRecCrystal GetCrystal(const Identifier& id) const; 00051 HepPoint3D GetCCenter(const Identifier& id) const; 00052 HepPoint3D GetCFrontCenter(const Identifier& id) const; 00053 00054 inline double GetBarrelR() const { return fBarrelR; } 00055 inline double GetBarrelOffset1() const { return fBarrelOffset1; } 00056 inline double GetBarrelOffset2() const { return fBarrelOffset2; } 00057 inline double GetBarrelh1() const { return fBarrelh1; } 00058 inline double GetBarrelh2() const { return fBarrelh2; } 00059 inline double GetBarrelh3() const { return fBarrelh3; } 00060 inline double GetBarrelL() const { return fBarrelL; } 00061 inline int GetBarrelNPhiMax() const { return fBarrelNPhiMax; } 00062 inline int GetBarrelNThetaMax() const { return fBarrelNThetaMax; } 00063 00064 // private data members 00065 private: 00066 // for Barrel EMC 00067 double fBarrelR; 00068 double fBarrelOffset1; 00069 double fBarrelOffset2; 00070 double fBarrelh1; 00071 double fBarrelh2; 00072 double fBarrelh3; 00073 double fBarrelL; 00074 double fBarrelL2; 00075 double fBarrelAlpha; 00076 int fBarrelNPhiMax; 00077 int fBarrelNThetaMax; 00078 00079 // standard crystals 00080 vector <EmcRecCrystal> fStandard; 00081 // vector of each crystal's center 00082 vector <HepPoint3D> fCCenter; 00083 vector <HepPoint3D> fCFrontCenter; 00084 }; 00085 #endif /* EMC_REC_BARREL_GEO_H */