00001 // Represents the position and orientation of a detector in STAR. 00002 // 00003 // Ben Norman, Kent State 00004 // 26 July 01 00005 // 00006 // The "center" of a planar detector is its center of gravity (the mindpoint 00007 // in local x, y, and z). For curved 00008 // (cylindrical or conical sections) detectors, the "center" is the midpoint 00009 // in z, opening angle, and radial thickness. 00010 // 00011 // The "normal" coordinates give the magnitude and azimuthal angle of a 00012 // normal vector from the global origin to the plane of the detector. The 00013 // plane of a planar detector is simply the one in which it lies. For a 00014 // curved detector, the plane is the one which contains the tangent to the 00015 // curved section at its center and is normal to the transverse projection of 00016 // the radial vector from the 00017 // origin to its center. Note that these definitions all assume that the 00018 // plane of the detector is parallel to global z. The third "normal" 00019 // cooridnate gives the location of the detector center along the detector 00020 // plane in the aximuthal direction (i.e., local y). This representation is 00021 // best for the Kalman local track model. 00022 // 00023 // The "center" coordinates are a little more natural and are best used for 00024 // rendering and radial ordering. Here, the magnitude and azimuthal angle 00025 // of a vector from the global origin to the center of the detector are 00026 // given, as well as an orientation angle. The orientation angle is the 00027 // angle from the vector above to the detector plane's outward normal. 00028 // It is 0 for detectors which have xOffset==0. 00029 // 00030 // when setting the values, one must set all 3 for a representation at once. 00031 // the other representation is then recalculated and both are available 00032 // for quick access 00033 // 00034 // The layerRadius is independent and is used for ordering detectors in R. 00035 00036 #ifndef STI_PLACEMENT_H 00037 #define STI_PLACEMENT_H 00038 00039 class StiPlacement{ 00040 00041 public: 00042 00043 enum StiRegion {kBackwardRapidity, kMidRapidity, kForwardRapidity, kUndefined}; 00044 00045 // constructors 00046 StiPlacement(); 00047 00048 // accessors 00049 float getNormalRefAngle() const { return normalRefAngle; } 00050 float getNormalRadius() const { return normalRadius; } 00051 float getNormalYoffset() const { return normalYoffset; } 00052 float getCenterRefAngle() const { return centerRefAngle; } 00053 float getCenterRadius() const { return centerRadius; } 00054 float getCenterOrientation()const { return centerOrientation;} 00055 float getLayerRadius() const { return layerRadius; } 00056 float getLayerAngle() const { return _layerAngle; } 00057 float getZcenter() const { return zCenter; } 00058 StiRegion getRegion() const { return mRegion; } 00059 00060 // mutators 00061 void setNormalRep(float refAngle_, float radius_, float xOffset_); 00062 // void setCenterRep(float refAngle_, float radius_, float orientation_); 00063 void setLayerRadius(float radius_){ if(radius_>=0) layerRadius = radius_; } 00064 void setLayerAngle(float angle); 00065 void setZcenter(float val) { zCenter = val; } 00066 void setRegion(StiRegion r) { mRegion = r;} 00067 00068 protected: 00069 00070 // store both representations 00071 float normalRefAngle; // in [-pi, pi) 00072 float normalRadius; // >= 0 00073 float normalYoffset; 00074 float centerRefAngle; // in [-pi, pi) 00075 float centerRadius; // >= 0 00076 float centerOrientation; // in [-pi/2, pi/2) 00077 00078 // independent radius for ordering 00079 float layerRadius; 00080 float _layerAngle; 00081 00082 float zCenter; 00083 StiRegion mRegion; // backward, midrapidity, forwrad, default to kUndefined 00084 00085 }; 00086 00087 #endif
1.5.9