HYDRA_development_version
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
hmdcgeomobj.cc
Go to the documentation of this file.
1 //*--- AUTHOR : Pechenov Vladimir
2 //*--- Modified: 12.02.08 V.Pechenov
3 //*--- Modified: 26.11.07 V.Pechenov
4 //*--- Modified: 16.08.05 V.Pechenov
5 //*--- Modified: 07.05.02 V.Pechenov
6 //*--- Modified: 25.02.99
7 
8 //_HADES_CLASS_DESCRIPTION
9 ///////////////////////////////////////////////////////////////////////////////
10 //
11 // HMdcPointPlane - poin on the plane
12 // HMdcTrap - trapeze in vol. is used for mdc cell sensitive volume
13 // HMdcTrapPlane - polygon on the plane is used for cell projection calculation
14 // HMdcPlane - param. of project planes
15 //
16 // HMdcPointOnPlane
17 //
18 // This class keep point on the plane HMdcPlane
19 //
20 // HMdcLineParam
21 //
22 // This class keep straight line parameters.
23 // Parameters are two point on the two planes
24 // (two HMdcPointOnPlane objects).
25 //
26 ///////////////////////////////////////////////////////////////////////////////
27 using namespace std;
28 #include "hmdcgeomobj.h"
29 //#include <iostream>
30 //#include <iomanip>
31 
38 
39 void HMdcPointPlane::print() const {
40  printf("x=%7f y=%7f\n",x,y);
41 }
42 
43 //-----------------------------------------------------
44 HMdcTrap::HMdcTrap(const HMdcTrap& otrap):TObject(otrap) {
45  // constructor creates the copy of obj. Trap
46  for(Int_t i=0; i<8; i++) points[i] = otrap.points[i];
47  dbPoint = otrap.dbPoint;
48 }
49 
51  if(i<0 || i>7) {
52  Error("operator[]","index=%i out of bounds! Set index=0", i);
53  return points[0];
54  }
55  return points[i];
56 }
57 
58 void HMdcTrap::copy(HMdcTrap& otrap) const {
59  // copy obj "this" to otarp
60  for(Int_t i=0; i<8; i++) otrap.points[i]=points[i];
61  otrap.dbPoint = dbPoint;
62 }
63 
64 void HMdcTrap::set(const HMdcTrap& otrap) {
65  // copy obj "this" to otrap
66  for(Int_t i=0; i<8; i++) points[i]=otrap.points[i];
67  dbPoint = otrap.dbPoint;
68 }
69 
71  // copy obj "this" to otrap
72  for(Int_t i=0; i<8; i++) points[i].clear();
73  dbPoint = -1;
74 }
75 
77  for(Int_t i=0; i<8; i++) points[i]=s.transFrom(points[i]);
78 }
79 
81  for(Int_t i=0; i<8; i++) points[i]=s.transTo(points[i]);
82 }
83 
84 Bool_t HMdcTrap::getRibInd(Int_t rib,Int_t& ind1,Int_t& ind2) {
85  if(rib<0 || rib>11) return kFALSE;
86  if(rib < 4) {
87  if(dbPoint>=0 && rib==dbPoint) return kFALSE;
88  ind1 = rib;
89  ind2 = nextPoint(ind1);
90  if(ind2 == dbPoint) ind2 = nextPoint(ind2);
91  } else if(rib < 8) {
92  if(dbPoint>=0 && rib==dbPoint+4) return kFALSE;
93  ind1 = rib;
94  ind2 = nextPoint(ind1);
95  if(ind2 == dbPoint+4) ind2 = nextPoint(ind2);
96  } else {
97  if(dbPoint>=0 && rib==dbPoint+8) return kFALSE;
98  ind1 = rib-8;
99  ind2 = ind1+4;
100  }
101  return kTRUE;
102 }
103 
104 Bool_t HMdcTrap::getRibInXYContour(Int_t rib,Int_t& i,Int_t& j) {
105  // For rib in X-Y contour all others points must be from one size of rib
106  if(!getRibInd(rib,i,j)) return kFALSE;
107  Double_t x2 = points[j].getX();
108  Double_t y2 = points[j].getY();
109  Double_t dX = points[i].getX()-x2;
110  Double_t dY = points[i].getY()-y2;
111  if(fabs(dX) > fabs(dY)) {
112  if(dX == 0.) return kFALSE;
113  Double_t coeff = dY/dX;
114  Short_t fl = 0;
115  for(Int_t k=0;k<8;k++) if(k!=i && k!=j) {
116  // For all k Yk-Yrib(Xk) must have the same sign
117  Double_t yt = (points[k].getX()-x2)*coeff + y2 - points[k].getY();
118  if(yt > 0.0) fl |= 1;
119  else if(yt < 0.0) fl |= 2;
120  if(fl==3) return kFALSE;
121  }
122  } else {
123  if(dY == 0.) return kFALSE;
124  Double_t coeff = dX/dY;
125  Short_t fl = 0;
126  for(Int_t k=0;k<8;k++) if(k!=i && k!=j) {
127  Double_t xt = (points[k].getY()-y2)*coeff + x2 - points[k].getX();
128  if(xt > 0.0) fl |= 1;
129  else if(xt < 0.0) fl |= 2;
130  if(fl==3) return kFALSE;
131  }
132  }
133  return kTRUE;
134 }
135 
137  // Return number of lines(corners) in contour on XY plane
138  // and fill "tr" object by contour points.
139  Int_t p1[12],p2[12];
140  Int_t nRibs = 0;
141  Int_t i,j;
142  for(Int_t rib=0;rib<12;rib++) if(getRibInXYContour(rib,i,j)) {
143  p1[nRibs] = i;
144  p2[nRibs] = j;
145  nRibs++;
146  }
147  tr.clearNPoints();
148  Int_t pnt0 = p1[0];
149  Int_t pnt = p2[0];
150  tr.addPoint(points[pnt0]);
151  tr.addPoint(points[pnt]);
152  Int_t nPOut = 2;
153  for(Int_t nr=1;nr<nRibs;nr++) if(p1[nr]>=0) {
154  if (p1[nr] == pnt) pnt = p2[nr];
155  else if(p2[nr] == pnt) pnt = p1[nr];
156  else continue;
157  if(pnt == pnt0) break;
158  tr.addPoint(points[pnt]);
159  nPOut++;
160  p1[nr] = -1;
161  nr = 0;
162  }
163  tr.calcDir();
164  return nPOut;
165 }
166 
168  // print Trap;
169  printf("\nTrap. from 8 points:\n");
170  for(Int_t i=0; i<8; i++) {
171  printf("%2i) ",i);
172  points[i].print();
173  }
174 }
175 
176 //------------------------------------------------------
177 HMdcTrapPlane::HMdcTrapPlane(const HMdcTrapPlane& otrap):TObject(otrap) {
178  // constructor creates the copy of obj. Trap
179  nPoints = otrap.nPoints;
180  xMinPoint = otrap.xMinPoint;
181  xMaxPoint = otrap.xMaxPoint;
182  yMinPoint = otrap.yMinPoint;
183  yMaxPoint = otrap.yMaxPoint;
184  dir = otrap.dir;
185  for(Int_t i=0; i<nPoints; i++) points[i].set(otrap.points[i]);
186 }
187 
189  if(i<0 || i>=nPoints) {
190  Error("operator[]","index=%i out of bounds! Set index=0", i);
191  return points[0];
192  }
193  return points[i];
194 }
195 
197  // copy obj "this" to otarp
198  otrap.nPoints = nPoints;
199  otrap.xMinPoint = xMinPoint;
200  otrap.xMaxPoint = xMaxPoint;
201  otrap.yMinPoint = yMinPoint;
202  otrap.yMaxPoint = yMaxPoint;
203  otrap.dir = dir;
204  for(Int_t i=0; i<nPoints; i++) points[i].copy(otrap.points[i]);
205 }
206 
207 void HMdcTrapPlane::set(const HMdcTrapPlane& otrap) {
208  // copy obj "this" to otrap
209  nPoints = otrap.nPoints;
210  xMinPoint = otrap.xMinPoint;
211  xMaxPoint = otrap.xMaxPoint;
212  yMinPoint = otrap.yMinPoint;
213  yMaxPoint = otrap.yMaxPoint;
214  dir = otrap.dir;
215  for(Int_t i=0; i<nPoints; i++) points[i].set(otrap.points[i]);
216 }
217 
219  xMinPoint = 0;
220  xMaxPoint = 0;
221  yMinPoint = 0;
222  yMaxPoint = 0;
223  dir = 0;
224  for(Int_t i=0; i<nPoints; i++) points[i].clear();
225 }
226 
228  nPoints = 0;
229  xMinPoint = 0;
230  xMaxPoint = 0;
231  yMinPoint = 0;
232  yMaxPoint = 0;
233  dir = 0;
234 }
235 
236 
237 void HMdcTrapPlane::print() const {
238  // print Trap;
239  printf("\nPolygon on the plane from %i points:\n",nPoints);
240  for(Int_t i=0; i<nPoints; i++) {
241  printf("%2i) ",i);
242  points[i].print();
243  }
244 }
245 
247  if(nPoints<16) {
248  points[nPoints].set(v.getX(),v.getY());
249  if(nPoints>0) {
250  if(points[yMinPoint].getY() > v.getY()) yMinPoint = nPoints;
251  if(points[yMaxPoint].getY() < v.getY()) yMaxPoint = nPoints;
252  if(points[xMinPoint].getX() > v.getX()) xMinPoint = nPoints;
253  if(points[xMaxPoint].getX() < v.getX()) xMaxPoint = nPoints;
254  }
255  nPoints++;
256  } else Error("addPoint","Too many points (>16).");
257 }
258 
260  if(nPoints<16) {
261  points[nPoints].set(p);
262  if(nPoints>0) {
263  if(points[yMinPoint].getY() > p.getY()) yMinPoint = nPoints;
264  if(points[yMaxPoint].getY() < p.getY()) yMaxPoint = nPoints;
265  if(points[xMinPoint].getX() > p.getX()) xMinPoint = nPoints;
266  if(points[xMaxPoint].getX() < p.getX()) xMaxPoint = nPoints;
267  }
268  nPoints++;
269  } else Error("addPoint","Too many points (>16).");
270 }
271 
273  if(nPoints<3) dir = 0;
274  else {
275  Int_t p1 = prevP(yMinPoint);
276  Int_t p2 = nextP(yMinPoint);
277  Double_t y1 = points[p1].getY();
278  Double_t y2 = points[p2].getY();
279  Double_t x1 = points[p1].getX();
280  Double_t x2 = points[p2].getX();
281  if(y1<y2) x2 = calcX(yMinPoint,p2,y1);
282  else if(y1>y2) x1 = calcX(yMinPoint,p1,y2);
283  dir = x1 < x2 ? 1 : -1;
284  }
285 }
286 
287 void HMdcTrapPlane::getXYMinMax(Int_t& xMin,Int_t& xMax,
288  Int_t& yMin,Int_t& yMax) const {
289  // Return points number of maximal and minimal value of X and Y.
290  xMin = yMin = 0;
291  xMax = yMax = 0;
292  for(Int_t p=1;p<nPoints;p++) {
293  if(points[yMin].getY() > points[p].getY()) yMin = p;
294  if(points[yMax].getY() < points[p].getY()) yMax = p;
295  if(points[xMin].getX() > points[p].getX()) xMin = p;
296  if(points[xMax].getX() < points[p].getX()) xMax = p;
297  }
298 }
299 
301  const HMdcTrapPlane& c2i) {
302  // Function combine two countours in one
303  clearNPoints();
304  Bool_t c1imin = c1i.getYMin() < c2i.getYMin();
305  const HMdcTrapPlane& c1 = c1imin ? c1i : c2i;
306  const HMdcTrapPlane& c2 = c1imin ? c2i : c1i;
307  for(Int_t p=c1.yMinPoint;p!=c1.xMaxPoint;p=c1.nextXMaxP(p)) addPoint(c1.points[p]);
308  addPoint(c1.points[c1.xMaxPoint]);
309  for(Int_t p=c2.xMaxPoint;p!=c2.xMinPoint;p=c2.nextXMaxP(p)) addPoint(c2.points[p]);
310  addPoint(c2.points[c2.xMinPoint]);
311  for(Int_t p=c1.xMinPoint;p!=c1.yMinPoint;p=c1.prevXMinP(p)) addPoint(c1.points[p]);
312  calcDir();
313  return nPoints;
314 }
315 
316 Bool_t HMdcTrapPlane::getLineInd(Int_t line, Int_t& p1,Int_t& p2) const {
317  // Return points indices for line number "line".
318  if(line>=nPoints) return kFALSE;
319  p1 = line;
320  p2 = p1+1;
321  if(p2 == nPoints) p2 = 0;
322  return kTRUE;
323 }
324 
325 Bool_t HMdcTrapPlane::getXCross(Int_t line,Double_t y, Double_t& x) const {
326  // Function calculate X for Y="y" on the piece of line number "line".
327  // Return kFALSE if it don't cross this line piece.
328  Int_t ip1,ip2;
329  if( !getLineInd(line,ip1,ip2) ) return kFALSE; // no line number "line"
330  const HMdcPointPlane& p1 = points[ip1];
331  const HMdcPointPlane& p2 = points[ip2];
332  Double_t y1 = p1.getY();
333  Double_t y2 = p2.getY();
334  if((y<y1 && y<y2) || (y>y1 && y>y2)) return kFALSE; // no cross point
335  x = (y-y1)/(y1-y2)*(p1.getX()-p2.getX()) + p1.getX();
336  return kTRUE;
337 }
338 
339 Double_t HMdcTrapPlane::calcX(Int_t ip1,Int_t ip2,Double_t y) const {
340  // Function calculate X for Y="y" on the piece of line p1-p2.
341  const HMdcPointPlane& p1 = points[ip1];
342  const HMdcPointPlane& p2 = points[ip2];
343  Double_t y1 = p1.getY();
344  Double_t y2 = p2.getY();
345  Double_t x1 = p1.getX();
346  Double_t x2 = p2.getX();
347  return (y-y1)/(y1-y2)*(x1-x2) + x1;
348 }
349 
350 Bool_t HMdcTrapPlane::getXminXmax(Double_t y, Double_t& x1,Double_t& x2) {
351  // Function calculate X for Y="y" on the piece of line number "line".
352  // Return kFALSE if it don't cross this line piece.
353  if(y>points[yMaxPoint].getY() || y<points[yMinPoint].getY()) return kFALSE;
354  if(dir == 0) calcDir();
355 
356  Int_t p1,p2;
357  for(p2 = nextXMinP(p1=yMinPoint); p2!=yMaxPoint; p2=nextXMinP(p1=p2))
358  if(y < points[p2].getY()) break;
359  x1 = calcX(p1,p2,y);
360  for(p2 = nextXMaxP(p1=yMinPoint); p2!=yMaxPoint; p2=nextXMaxP(p1=p2))
361  if(y < points[p2].getY()) break;
362  x2 = calcX(p1,p2,y);
363  return kTRUE;
364 }
365 
366 Bool_t HMdcTrapPlane::getXminXmax(Double_t y1i,Double_t y2i,
367  Double_t& x1,Double_t& x2) {
368  // Function calculate X minimal (x1) and X maximal (x2)
369  // in Y reagion from y1i to y2i.
370  // Return kFALSE if Y region outside of polygon.
371  if(dir == 0) calcDir();
372  Double_t& y1 = y1i < y2i ? y1i : y2i;
373  Double_t& y2 = y1i < y2i ? y2i : y1i;
374  if(y1>points[yMaxPoint].getY() || y2<points[yMinPoint].getY()) return kFALSE;
375  if(y1 <= points[yMinPoint].getY() && y2 >= points[yMaxPoint].getY()) {
376  // Full projection inside region y1 - y2
377  x1 = points[xMinPoint].getX();
378  x2 = points[xMaxPoint].getX();
379  return kTRUE;
380  }
381 
382  if(y2 > points[yMaxPoint].getY()) x1 = x2 = points[yMaxPoint].getX();
383  else {
384  x1 = +1.0e+20;
385  x2 = -1.0e+20;
386  }
387  // Finding of x1:
388  Int_t p1 = yMinPoint;
389  for(Int_t p2 = nextXMinP(p1); p1!=yMaxPoint; p2=nextXMinP(p1=p2)) {
390  Double_t yp2 = points[p2].getY();
391  if(y1 > yp2) continue;
392  Double_t yp1 = points[p1].getY();
393  if(y1 >= yp1) x1 = TMath::Min(x1,calcX(p1,p2,y1));
394  else if(yp1<=y2 && x1>points[p1].getX()) x1 = points[p1].getX();
395  if(y2 > yp2) continue;
396  if(y2 >= yp1) x1 = TMath::Min(x1,calcX(p1,p2,y2));
397  break;
398  }
399  // Finding of x2:
400  p1 = yMinPoint;
401  for(Int_t p2 = nextXMaxP(p1); p1!=yMaxPoint; p2=nextXMaxP(p1=p2)) {
402  Double_t yp2 = points[p2].getY();
403  if(y1 > yp2) continue;
404  Double_t yp1 = points[p1].getY();
405  if(y1 >= yp1) x2 = TMath::Max(x2,calcX(p1,p2,y1));
406  else if(yp1<=y2 && x2<points[p1].getX()) x2 = points[p1].getX();
407  if(y2 > yp2) continue;
408  if(y2 >= yp1) x2 = TMath::Max(x2,calcX(p1,p2,y2));
409  break;
410  }
411  return kTRUE;
412 }
413 
414 //-----------------------------------------------------
416  const HGeomRotation& rt = tr.getRotMatrix();
417  const HGeomVector& tv = tr.getTransVector();
418  Double_t c = rt(0)*rt(4)-rt(3)*rt(1);
419  if(c == 0.) return;
420  parA = (rt(3)*rt(7)-rt(6)*rt(4))/c;
421  parB = (rt(6)*rt(1)-rt(0)*rt(7))/c;
422  parD = parA*tv.getX()+parB*tv.getY()+tv.getZ();
423 }
424 
425 void HMdcPlane::print(void) const {
426  printf("Plane equation: %g*x%+g*y+z=%g\n",parA,parB,parD);
427 }
428 
429 void HMdcPlane::transTo(const HGeomTransform* trans) {
430  HGeomVector p1( 0., 0., parD); // x=0; y= 0; z=D;
431  HGeomVector p2(parD, parD, parD*(1.-parA-parB)); // x=D; y= D; z=D*(1-A-B);
432  HGeomVector p3(parD,-parD, parD*(1.-parA+parB)); // x=D; y=-D; z=D*(1-A+B);
433  p1 = trans->transTo(p1);
434  p2 = trans->transTo(p2);
435  p3 = trans->transTo(p3);
436  HGeomVector p12(p1-p2);
437  HGeomVector p13(p1-p3);
438  parB = (p12.Z()*p13.X()-p13.Z()*p12.X())/(p13.Y()*p12.X()-p12.Y()*p13.X());
439  if(p12.X() != 0.) parA = -(parB*p12.Y() + p12.Z())/p12.X();
440  else parA = -(parB*p13.Y() + p13.Z())/p13.X();
441  parD = parA*p1.X() + parB*p1.Y() + p1.Z();
442 }
443 
445  HGeomVector p1( 0., 0., parD); // x=0; y= 0; z=D;
446  HGeomVector p2(parD, parD, parD*(1.-parA-parB)); // x=D; y= D; z=D*(1-A-B);
447  HGeomVector p3(parD,-parD, parD*(1.-parA+parB)); // x=D; y=-D; z=D*(1-A+B);
448  p1 = trans->transFrom(p1);
449  p2 = trans->transFrom(p2);
450  p3 = trans->transFrom(p3);
451  HGeomVector p12(p1-p2);
452  HGeomVector p13(p1-p3);
453  parB = (p12.Z()*p13.X()-p13.Z()*p12.X())/(p13.Y()*p12.X()-p12.Y()*p13.X());
454  if(p12.X() != 0.) parA = -(parB*p12.Y() + p12.Z())/p12.X();
455  else parA = -(parB*p13.Y() + p13.Z())/p13.X();
456  parD = parA*p1.X() + parB*p1.Y() + p1.Z();
457 }
458 
459 Double_t HMdcPlane::calcMinDistance(Double_t x, Double_t y, Double_t z) const {
460  // Return minimal distance from x,y,z to the plane
461  return (parA*x+parB*y+z - parD) / TMath::Sqrt(parA*parA+parB*parB+1.);
462 }
463 
464 Double_t HMdcPlane::calcMinDistance(const HGeomVector& p) const {
465  // Return minimal distance from x,y,z to the plane
466  return calcMinDistance(p.getX(),p.getY(),p.getZ());
467 }
468 
470  Double_t& err) const {
471  // Return minimal distance from x,y,z to the plane with error
472  // HGeomVector dp = (errX,errY,errZ) of (x,y,z) in HGeomVector p
473  Double_t norm = TMath::Sqrt(parA*parA+parB*parB+1.);
474  HGeomVector errV(parA*dp.getX(),parB*dp.getY(),dp.getZ());
475  err = errV.length()/norm;
476  return (parA*p.getX()+parB*p.getY()+p.getZ()-parD) / norm;
477 }
478 
480  // Return normal vector to the plane
482  nv *= normalLength();
483  return nv;
484 }
485 
487  // Return unit vector of the perpendicular to the plane
488  HGeomVector nv(parA,parB,1.);
489  nv /= nv.length();
490  if(parD<0) nv *= -1;
491  return nv;
492 }
493 
494 //-----------------------------------------------------
496  pl = *p;
497 }
498 
500  HGeomVector(p.x,p.y,p.z) {
501  pl = p.pl;
502 }
503 
504 void HMdcPointOnPlane::print(void) const {
505  printf("Point x=%7f y=%7f z=%7f on the plane %g*x%+g*y+z=%g\n",
506  x,y,z,pl.A(),pl.B(),pl.D());
507 }
508 
510  pl.transTo(trans);
511  *((HGeomVector*)this) = trans->transTo(*((HGeomVector*)this));
512 }
513 
515  pl.transFrom(trans);
516  *((HGeomVector*)this) = trans->transFrom(*((HGeomVector*)this));
517 }
518 
519 //-----------------------------------------------------
520 void HMdcLineParam::setCoorSys(Int_t s,Int_t m) {
521  if(s<-1 || s>5) {
522  sec = -2;
523  mod = -2;
524  } else {
525  sec = s;
526  if(sec==-1 || m<0 || m>3) mod = -1;
527  else mod = m;
528  }
529 }
530 
531 void HMdcLineParam::setSegmentLine(Double_t r, Double_t z,
532  Double_t theta, Double_t phi) {
533  Double_t cosPhi = TMath::Cos(phi);
534  Double_t sinPhi = TMath::Sin(phi);
535  Double_t x1 = -r*sinPhi;
536  Double_t y1 = r*cosPhi;
537  Double_t dZ = TMath::Cos(theta);
538  Double_t dxy = TMath::Sqrt(1.-dZ*dZ)*100.;
539  Double_t x2 = dxy*cosPhi+x1;
540  Double_t y2 = dxy*sinPhi+y1;
541  Double_t z2 = dZ*100.+z;
542  point1.calcPoint(x1,y1,z,x2,y2,z2);
543  point2.calcPoint(x1,y1,z,x2,y2,z2);
544 }
545 
546 Double_t HMdcLineParam::getPhiRad(void) const {
547  Double_t ph = TMath::ATan2(dY(),dX());
548  if(ph >= 0.) return ph;
549  return TMath::TwoPi()+ph;
550 }
551 
552 void HMdcLineParam::transTo(const HGeomTransform* tr,Int_t s,Int_t m) {
553  // if s<-2 - don't change sec
554  // if m<-2 - don't change mod
555  point1.transTo(tr);
556  point2.transTo(tr);
557  calcDir();
558  if(sec>=-2) sec = s;
559  if(mod>=-2) mod = m;
560 }
561 
562 void HMdcLineParam::transFrom(const HGeomTransform* tr,Int_t s,Int_t m) {
563  // if s<-2 - don't change sec
564  // if m<-2 - don't change mod
565  point1.transFrom(tr);
566  point2.transFrom(tr);
567  calcDir();
568  if(sec>=-2) sec = s;
569  if(mod>=-2) mod = m;
570 }
Double_t z2(void) const
Definition: hmdcgeomobj.h:255
Int_t nextPoint(Int_t i)
Definition: hmdcgeomobj.h:106
Double_t B() const
Definition: hmdcgeomobj.h:125
Char_t dbPoint
Definition: hmdcgeomobj.h:88
void print(void) const
Definition: hmdcgeomobj.cc:425
Double_t y2(void) const
Definition: hmdcgeomobj.h:254
Double_t getYMin(void) const
Definition: hmdcgeomobj.h:68
HGeomVector & operator[](Int_t i)
Definition: hmdcgeomobj.cc:50
Int_t nextXMaxP(Int_t p) const
Definition: hmdcgeomobj.h:78
Int_t nextP(Int_t p) const
Definition: hmdcgeomobj.h:75
Double_t & Y()
Definition: hgeomvector.h:20
void print() const
Double_t getZ() const
Definition: hgeomvector.h:24
Int_t getXYContour(HMdcTrapPlane &tr)
Definition: hmdcgeomobj.cc:136
void getXYMinMax(Int_t &xMin, Int_t &xMax, Int_t &yMin, Int_t &yMax) const
Definition: hmdcgeomobj.cc:287
Int_t nextXMinP(Int_t p) const
Definition: hmdcgeomobj.h:79
void clear()
Definition: hmdcgeomobj.cc:70
Double_t & Z()
Definition: hgeomvector.h:21
Float_t dp
Definition: drawAccCuts.C:15
HGeomVector getNormalUnitVector(void) const
Definition: hmdcgeomobj.cc:486
UChar_t xMaxPoint
Definition: hmdcgeomobj.h:40
Double_t parD
Definition: hmdcgeomobj.h:115
const HGeomRotation & getRotMatrix() const
void transTo(const HGeomTransform *tr, Int_t sec=-3, Int_t mod=-3)
Definition: hmdcgeomobj.cc:552
TGraph p2(xdim, pgrid, respme)
void print() const
Definition: hmdcgeomobj.cc:237
void transTo(const HGeomTransform *trans)
Definition: hmdcgeomobj.cc:509
Double_t getX() const
Definition: hmdcgeomobj.h:25
ClassImp(HDbColumn) HDbColumn
Definition: hdbcolumn.cc:18
Int_t twoContoursSum(const HMdcTrapPlane &c1i, const HMdcTrapPlane &c2i)
Definition: hmdcgeomobj.cc:300
void print() const
Definition: hgeomvector.h:55
Double_t theta
Bool_t getLineInd(Int_t line, Int_t &p1, Int_t &p2) const
Definition: hmdcgeomobj.cc:316
UChar_t yMaxPoint
Definition: hmdcgeomobj.h:42
Double_t x2(void) const
Definition: hmdcgeomobj.h:253
void copy(HMdcTrapPlane &otrap)
Definition: hmdcgeomobj.cc:196
UChar_t xMinPoint
Definition: hmdcgeomobj.h:39
Double_t x1(void) const
Definition: hmdcgeomobj.h:250
HMdcPointPlane points[16]
Definition: hmdcgeomobj.h:37
Double_t D() const
Definition: hmdcgeomobj.h:127
HMdcPointOnPlane point2
Definition: hmdcgeomobj.h:209
Double_t parB
Definition: hmdcgeomobj.h:114
Bool_t getXminXmax(Double_t y, Double_t &x1, Double_t &x2)
Definition: hmdcgeomobj.cc:350
const HGeomVector & getTransVector() const
UChar_t yMinPoint
Definition: hmdcgeomobj.h:41
void transFrom(const HGeomTransform *trans)
Definition: hmdcgeomobj.cc:514
Double_t y1(void) const
Definition: hmdcgeomobj.h:251
void transTo(const HGeomTransform *trans)
Definition: hmdcgeomobj.cc:429
void copy(HMdcTrap &otrap) const
Definition: hmdcgeomobj.cc:58
Double_t dX(void) const
Definition: hmdcgeomobj.h:256
Double_t length() const
Definition: hgeomvector.h:53
void calcPoint(Double_t x1, Double_t y1, Double_t z1, Double_t x2, Double_t y2, Double_t z2)
Definition: hmdcgeomobj.h:177
Double_t A() const
Definition: hmdcgeomobj.h:124
Double_t getPhiRad(void) const
Definition: hmdcgeomobj.cc:546
Int_t prevXMinP(Int_t p) const
Definition: hmdcgeomobj.h:81
void setPlanePar(const HMdcPlane &p)
Definition: hmdcgeomobj.h:413
void transFrom(const HGeomTransform *tr, Int_t sec=-3, Int_t mod=-3)
Definition: hmdcgeomobj.cc:562
Double_t y
Definition: hgeomvector.h:13
HGeomVector transFrom(const HGeomVector &p) const
Double_t calcMinDistance(Double_t x, Double_t y, Double_t z) const
Definition: hmdcgeomobj.cc:459
void transFrom(const HGeomTransform &s)
Definition: hmdcgeomobj.cc:76
Double_t normalLength(void) const
Definition: hmdcgeomobj.h:136
void setSegmentLine(Double_t r, Double_t z, Double_t theta, Double_t phi)
Definition: hmdcgeomobj.cc:531
Double_t calcX(Int_t ip1, Int_t ip2, Double_t y) const
Definition: hmdcgeomobj.cc:339
void set(const HMdcPointPlane &point)
Definition: hmdcgeomobj.h:22
void clearNPoints(void)
Definition: hmdcgeomobj.cc:227
void transTo(const HGeomTransform &s)
Definition: hmdcgeomobj.cc:80
Bool_t getRibInXYContour(Int_t rib, Int_t &i, Int_t &j)
Definition: hmdcgeomobj.cc:104
TGraph p1(xdim, pgrid, resplo)
Double_t getY() const
Definition: hmdcgeomobj.h:26
void transFrom(const HGeomTransform *trans)
Definition: hmdcgeomobj.cc:444
HGeomVector points[8]
Definition: hmdcgeomobj.h:87
Double_t dY(void) const
Definition: hmdcgeomobj.h:257
Double_t parA
Definition: hmdcgeomobj.h:113
Double_t calcMinDistanceAndErr(const HGeomVector &p, const HGeomVector &dp, Double_t &err) const
Definition: hmdcgeomobj.cc:469
void print() const
Definition: hmdcgeomobj.cc:504
void setCoorSys(Int_t s, Int_t m=-1)
Definition: hmdcgeomobj.cc:520
void calcDir(void)
Definition: hmdcgeomobj.h:399
Double_t dZ(void) const
Definition: hmdcgeomobj.h:258
Float_t phi
Definition: drawAccCuts.C:15
void print()
Definition: hmdcgeomobj.cc:167
HMdcPointPlane & operator[](Int_t i)
Definition: hmdcgeomobj.cc:188
void set(const HMdcTrapPlane &otrap)
Definition: hmdcgeomobj.cc:207
Double_t x
Definition: hgeomvector.h:12
TCanvas c1("HAFT","HADES Acceptance Filter for Theorists", 100, 100, 700, 700)
Double_t getX() const
Definition: hgeomvector.h:22
Bool_t getRibInd(Int_t rib, Int_t &ind1, Int_t &ind2)
Definition: hmdcgeomobj.cc:84
Double_t z
Definition: hgeomvector.h:14
Int_t prevP(Int_t p) const
Definition: hmdcgeomobj.h:76
void set(const HMdcTrap &otrap)
Definition: hmdcgeomobj.cc:64
Double_t getY() const
Definition: hgeomvector.h:23
Bool_t getXCross(Int_t line, Double_t y, Double_t &x) const
Definition: hmdcgeomobj.cc:325
HGeomVector transTo(const HGeomVector &p) const
void calcDir(void)
Definition: hmdcgeomobj.cc:272
void addPoint(const HGeomVector &v)
Definition: hmdcgeomobj.cc:246
HGeomVector getNormalVector(void) const
Definition: hmdcgeomobj.cc:479
HMdcPointOnPlane point1
Definition: hmdcgeomobj.h:208
TGraph p3(xdim, pgrid, resphi)
Double_t & X()
Definition: hgeomvector.h:19