21 #include "StEEmcSmdGeom.h"
22 #include "PhysicalConstants.h"
33 StEEmcSmdGeom::~StEEmcSmdGeom() {
63 Int_t StEEmcSmdGeom::getEEmcISec(
const Int_t iPlane,
66 const TVector3 myPoint ( point[0], point[1], point[2] );
78 StEEmcSmdGeom::getDcaStripPtr(
const Int_t iPlane,
83 const TVector3 myPoint( point[0], point[1], point[2] );
89 StEEmcSmdGeom::getDcaStripPtr(
const Int_t iPlane,
93 TVector3 myPoint( point[0], point[1], point[2] );
109 Int_t iVStrip )
const {
129 const Int_t endId )
const {
141 pairD StEEmcSmdGeom::getEEmcSmdPhiMinMax(
const Int_t iPlane,
const Int_t iSec)
const
144 float phiMin, phiMax;
146 int iUV, antiClockIUV, clockIUV;
147 int antiClockISec, clockISec;
149 iUV = kEEmcSmdMapUV[iPlane][iSec];
157 if(iSec != 0) antiClockISec = iSec - 1;
158 else antiClockISec = 11;
159 antiClockIUV = kEEmcSmdMapUV[iPlane][antiClockISec];
163 if(iSec != 11) clockISec = iSec + 1;
165 clockIUV = kEEmcSmdMapUV[iPlane][clockISec];
168 phiMinMax.first = (double) phiMin;
169 phiMinMax.second = (double) phiMax;
177 float StEEmcSmdGeom::getEEmcSmdDelPhi(
const Int_t iPlane,
const Int_t iSec)
const
180 pairD phiMinMax = getEEmcSmdPhiMinMax(iPlane, iSec);
181 delPhi = (float) phiMinMax.second - (
float)phiMinMax.first;
182 if(iSec == kEEmcSmdSectorIdPhiCrossPi - 1) delPhi = 2*pi + delPhi;
190 float StEEmcSmdGeom::getEEmcSmdCenterPhi(
const Int_t iPlane,
191 const Int_t iSec)
const
194 pairD phiMinMax = getEEmcSmdPhiMinMax(iPlane, iSec);
195 centerPhi = 0.5*((float) phiMinMax.second + (
float)phiMinMax.first);
196 if(iSec == kEEmcSmdSectorIdPhiCrossPi - 1) {
197 if(centerPhi <= 0) centerPhi= M_PI + centerPhi;
198 else centerPhi = M_PI - centerPhi;
206 void StEEmcSmdGeom::printSectorPhis(
const Int_t iPlane,
const Int_t iSec,
207 ostream& os )
const {
209 iUV = kEEmcSmdMapUV[iPlane][iSec];
211 os <<
"------EEmcSmdGeom::printPhis()------" << endl;
212 os <<
" planeId = " << iPlane + 1 <<
" sectorId = " << iSec + 1 << endl;
214 os <<
" " << kEEmcSmdUVChar[iUV] <<
" Sector" << endl;
216 os <<
" Empty" << endl;
217 os <<
" delPhi = " << getEEmcSmdDelPhi(iPlane, iSec)/degree <<
218 " " <<
"centerPhi = " << getEEmcSmdCenterPhi(iPlane, iSec)/degree
Int_t getEEmcISec(const Int_t iPlane, const TVector3 &point) const
return index of a sector from a point in a plane
StructEEmcSmdSector & getEEmcSector(const Int_t iUV, const Int_t iSec)
return structure-sector from iUV and iSec
const StructEEmcStrip * getDcaStripPtr(const Int_t iPlane, const TVector3 &point, Float_t *dca) const
TVector3 getstripEnd(const StructEEmcStrip &strip, const Int_t endId) const
return strip-end of 3D-vector
void init()
Initialize geometry class.
TVector3 getIntersection(Int_t iSec, Int_t iUStrip, Int_t iVStrip, const TVector3 &vertex) const
void setSectors(const intVec sectorIdVec)
set sectors for partial EEMC