- Timestamp:
- 01/21/09 14:37:07 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9233 r9235 19 19 -*-*- END OF LINE -*-*- 20 20 21 2009/01/21 Thomas Bretz 22 23 * mbase/BaseLinkDef.h, mbase/Makefile: 24 - added MQuaternion 25 26 * mbase/MQuaternion.[h,cc]: 27 - added 28 29 * mbase/MArrayI.[h,cc]: 30 - added a few new functions (ReSort, Add, Find and AddUniq) 31 32 * mbase/MMath.cc: 33 - replaced delete by delete[] where appropriate 34 35 * mgeom/MGeomCam.h: 36 - added new virtual functions HitFrame and HitDetector 37 - included MQuaternion 38 39 * mgeom/MGeomCamDwarf.[h,cc], mgeom/MGeomCamMagic.[h,cc]: 40 - added new functions HitFrame and HitDetector: 41 42 * msim/MHPhotonEvent.cc: 43 - removed the reference to MCamera 44 45 * mgeom/MGeomPix.[h,cc], mgui/MHexagon.[h,cc]: 46 - moved DistanceToPrimitive from MHexagon to MGeomPix 47 - moved the funtions to calculate overlapping areas 48 also, but they are still in a comment 49 50 * mgui/MHexagon.[h,cc]: 51 - started implementing a rotation angle 52 - added data meber fPhi 53 - increased class version number 54 55 * mhist/MHCamera.cc, mtools/MagicJam.cc: 56 - we don't have to use a MHexagon anymore caluclating 57 DistanceToPrimitive 58 59 60 21 61 2009/01/21 Stefan Ruegamer 22 62 … … 31 71 - added Esc member function 32 72 73 * msim/MPhotonData.[h,cc], msim/MPhotonEvent.[h,cc], 74 msim/MSimAbsorption.[h,cc], msim/MSimPointingPos.[h,cc], 75 MHPhotonEvent.[h,cc], msim/Makefile, msim/SimIncl.h 76 msim/SimLinkDef.h: 77 - added 33 78 34 79 … … 95 140 * readcorsika.cc: 96 141 - added 142 97 143 98 144 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.cc
r9219 r9235 240 240 return -1; 241 241 } 242 243 // ------------------------------------------------------------------------ 244 // 245 // compute the distance of a point (px,py) to the Hexagon center in world 246 // coordinates. Return -1 if inside. 247 // 248 Float_t MGeomPix::DistanceToPrimitive(Float_t px, Float_t py) const 249 { 250 //FIXME: Rotation phi missing! 251 252 static Double_t fgCos60 = 0.5; //TMath::Cos(TMath::DegToRad()*60); 253 static Double_t fgSin60 = TMath::Sqrt(3.)/2; //TMath::Sin(TMath::DegToRad()*60); 254 255 // 256 // compute the distance of the Point to the center of the Hexagon 257 // 258 //const Double_t dx = px-fX; 259 //const Double_t dy = py-fY; 260 261 TVector2 v(px-fX, py-fY); 262 // FIXME: fPhi or -fPhi? 263 // v = v.Rotate(-fPhi); // FIXME: Replace with a precalculates sin/cos vector 264 265 const Double_t dx = v.X(); 266 const Double_t dy = v.Y(); 267 268 const Double_t disthex = TMath::Sqrt(dx*dx + dy*dy); 269 270 // 271 // Now check if point is outside of hexagon; just check x coordinate 272 // in three coordinate systems: the default one, in which two sides of 273 // the hexagon are paralel to the y axis (see camera displays) and two 274 // more, rotated with respect to that one by +- 60 degrees. 275 // 276 277 if (TMath::Abs(dx) > fD/2.) 278 return disthex; 279 280 const Double_t dx2 = dx*fgCos60 + dy*fgSin60; 281 282 if (TMath::Abs(dx2) > fD/2.) 283 return disthex; 284 285 const Double_t dx3 = dx*fgCos60 - dy*fgSin60; 286 287 if (TMath::Abs(dx3) > fD/2.) 288 return disthex; 289 290 return -1; 291 } 292 293 // ============================================================================== 294 /* 295 #include <TOrdCollection.h> 296 #include "MMath.h" 297 #include "../mgui/MHexagon.h" // MHexagon::fgDx 298 299 // ------------------------------------------------------------------------ 300 // 301 // Small helper class to allow fast sorting of TVector2 by angle 302 // 303 class HVector2 : public TVector2 304 { 305 Double_t fAngle; 306 public: 307 HVector2() : TVector2() { } 308 HVector2(const TVector2 &v) : TVector2(v) { } 309 HVector2(Double_t x, Double_t y) : TVector2 (x, y) { } 310 void CalcAngle() { fAngle = Phi(); } 311 Bool_t IsSortable() const { return kTRUE; } 312 Int_t Compare(const TObject *obj) const { return ((HVector2*)obj)->fAngle>fAngle ? 1 : -1; } 313 Double_t GetAngle() const { return fAngle; } 314 }; 315 316 // ------------------------------------------------------------------------ 317 // 318 // Calculate the edge points of the intersection area of two hexagons. 319 // The points are added as TVector2 to the TOrdCollection. 320 // The user is responsible of delete the objects. 321 // 322 void MGeomPix::GetIntersectionBorder(TOrdCollection &col, const MGeomPix &hex) const 323 { 324 // if (fPhi!=0) 325 // { 326 // gLog << warn << "MGeomPix::GetIntersectionBorder: Only phi=0 supported yet." << endl; 327 // return; 328 // } 329 330 Bool_t inside0[6], inside1[6]; 331 332 HVector2 v0[6]; 333 HVector2 v1[6]; 334 335 Int_t cnt0=0; 336 Int_t cnt1=0; 337 338 // Calculate teh edges of each hexagon and whether this edge 339 // is inside the other hexgon or not 340 for (int i=0; i<6; i++) 341 { 342 const Double_t x0 = fX+MHexagon::fgDx[i]*fD; 343 const Double_t y0 = fY+MHexagon::fgDy[i]*fD; 344 345 const Double_t x1 = hex.fX+MHexagon::fgDx[i]*hex.fD; 346 const Double_t y1 = hex.fY+MHexagon::fgDy[i]*hex.fD; 347 348 v0[i].Set(x0, y0); 349 v1[i].Set(x1, y1); 350 351 inside0[i] = hex.DistanceToPrimitive(x0, y0) < 0; 352 inside1[i] = DistanceToPrimitive(x1, y1) < 0; 353 354 if (inside0[i]) 355 { 356 col.Add(new HVector2(v0[i])); 357 cnt0++; 358 } 359 if (inside1[i]) 360 { 361 col.Add(new HVector2(v1[i])); 362 cnt1++; 363 } 364 } 365 366 if (cnt0==0 || cnt1==0) 367 return; 368 369 // No calculate which vorder lines intersect 370 Bool_t iscross0[6], iscross1[6]; 371 for (int i=0; i<6; i++) 372 { 373 iscross0[i] = (inside0[i] && !inside0[(i+1)%6]) || (!inside0[i] && inside0[(i+1)%6]); 374 iscross1[i] = (inside1[i] && !inside1[(i+1)%6]) || (!inside1[i] && inside1[(i+1)%6]); 375 } 376 377 // Calculate the border points of our intersection area 378 for (int i=0; i<6; i++) 379 { 380 // Skip non intersecting lines 381 if (!iscross0[i]) 382 continue; 383 384 for (int j=0; j<6; j++) 385 { 386 // Skip non intersecting lines 387 if (!iscross1[j]) 388 continue; 389 390 const TVector2 p = MMath::GetIntersectionPoint(v0[i], v0[(i+1)%6], v1[j], v1[(j+1)%6]); 391 if (hex.DistanceToPrimitive(p.X(), p.Y())<1e-9) 392 col.Add(new HVector2(p)); 393 } 394 } 395 } 396 397 // ------------------------------------------------------------------------ 398 // 399 // Calculate the overlapping area of the two hexagons. 400 // 401 Double_t MGeomPix::CalcOverlapArea(const MGeomPix &cam) const 402 { 403 // if (fPhi!=0) 404 // { 405 // gLog << warn << "MGeomPix::CalcOverlapArea: Only phi=0 supported yet." << endl; 406 // return -1; 407 // } 408 409 TOrdCollection col; 410 col.SetOwner(); 411 412 GetIntersectionBorder(col, cam); 413 414 // Check if there is an intersection to proceed with 415 const Int_t n = col.GetEntries(); 416 if (n==0) 417 return 0; 418 419 // Calculate the center of gravity 420 TVector2 cog; 421 422 TIter Next(&col); 423 HVector2 *v=0; 424 while ((v=(HVector2*)Next())) 425 cog += *v; 426 cog /= n; 427 428 // Shift the figure to its center-og-gravity and 429 // calculate the angle of the connection line between the 430 // border points of our intersesction area and its cog 431 Next.Reset(); 432 while ((v=(HVector2*)Next())) 433 { 434 *v -= cog; 435 v->CalcAngle(); 436 } 437 438 // Sort these points by this angle 439 col.Sort(); 440 441 // Now sum up the area of all the triangles between two 442 // following points and the cog. 443 Double_t A = 0; 444 for (int i=0; i<n; i++) 445 { 446 // Vectors from cog to two nearby border points 447 const HVector2 *v1 = (HVector2*)col.At(i); 448 const HVector2 *v2 = (HVector2*)col.At((i+1)%n); 449 450 // Angle between both vectors 451 const Double_t a = fmod(v1->GetAngle()-v2->GetAngle()+TMath::TwoPi(), TMath::TwoPi()); 452 453 // Length of both vectors 454 const Double_t d1 = v1->Mod(); 455 const Double_t d2 = v2->Mod(); 456 457 A += d1*d2/2*sin(a); 458 } 459 return A; 460 } 461 */ 462 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r9219 r9235 8 8 class MGeomCam; 9 9 class TVector2; 10 class TOrdCollection; 10 11 11 12 class MGeomPix : public MParContainer … … 96 97 Int_t GetDirection(const MGeomPix &pix) const; 97 98 99 virtual Float_t DistanceToPrimitive(Float_t px, Float_t py) const; 100 //void GetIntersectionBorder(TOrdCollection &col, const MGeomPix &hex) const; 101 //Double_t CalcOverlapArea(const MGeomPix &cam) const; 102 98 103 ClassDef(MGeomPix, 4) // Geometry class describing the geometry of one pixel 99 104 }; -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r8178 r9235 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHexagon.cc,v 1.3 0 2006-10-30 12:46:13tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHexagon.cc,v 1.31 2009-01-21 14:34:48 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 21 21 ! Author(s): Harald Kornmayer 1/2001 22 22 ! 23 ! Copyright: MAGIC Software Development, 2000-200623 ! Copyright: Software Development, 2000-2009 24 24 ! 25 25 ! … … 29 29 // 30 30 // MHexagon 31 // 32 // Class Version 2: 33 // - added fPhi 31 34 // 32 35 ////////////////////////////////////////////////////////////////////////////// … … 41 44 #include <TOrdCollection.h> // TOrdCollection 42 45 46 #include "MLog.h" 47 #include "MLogManip.h" 48 43 49 #include "MMath.h" 44 50 #include "MGeomPix.h" // GetX … … 66 72 // normal constructor for MHexagon 67 73 // 68 MHexagon::MHexagon(Float_t x, Float_t y, Float_t d )69 : TAttLine(1, 1, 1), TAttFill(0, 1001), fX(x), fY(y), fD(d) 74 MHexagon::MHexagon(Float_t x, Float_t y, Float_t d, Float_t phi) 75 : TAttLine(1, 1, 1), TAttFill(0, 1001), fX(x), fY(y), fD(d), fPhi(phi) 70 76 { 71 77 } … … 76 82 // 77 83 MHexagon::MHexagon(const MGeomPix &pix) 78 : TAttLine(1, 1, 1), TAttFill(0, 1001) 84 : TAttLine(1, 1, 1), TAttFill(0, 1001), fPhi(0) 79 85 { 80 86 fX = pix.GetX(); 81 87 fY = pix.GetY(); 82 88 fD = pix.GetD(); 89 90 // fPhi = pix.GetPhi(); 83 91 } 84 92 … … 89 97 MHexagon::MHexagon(const MHexagon &hexagon) : TObject(hexagon), TAttLine(hexagon), TAttFill(hexagon) 90 98 { 91 fX = hexagon.fX; 92 fY = hexagon.fY; 93 fD = hexagon.fD; 99 fX = hexagon.fX; 100 fY = hexagon.fY; 101 fD = hexagon.fD; 102 fPhi = hexagon.fPhi; 94 103 } 95 104 … … 109 118 TAttFill::Copy(hex); 110 119 111 hex.fX = fX; 112 hex.fY = fY; 113 hex.fD = fD; 120 hex.fX = fX; 121 hex.fY = fY; 122 hex.fD = fD; 123 hex.fPhi = fPhi; 114 124 } 115 125 … … 125 135 Int_t MHexagon::DistancetoPrimitive(Int_t px, Int_t py, Float_t conv) 126 136 { 137 //FIXME: Rotation phi missing! 138 127 139 // 128 140 // compute the distance of the Point to the center of the Hexagon … … 131 143 const Int_t pyhex = gPad->YtoAbsPixel(fY*conv); 132 144 133 const Double_t x = TMath::Abs(px-pxhex); 134 const Double_t y = TMath::Abs(py-pyhex); 145 //const Double_t x = TMath::Abs(px-pxhex); 146 //const Double_t y = TMath::Abs(py-pyhex); 147 148 TVector2 v(TMath::Abs(px-pxhex), TMath::Abs(py-pyhex)); 149 // FIXME: fPhi or -fPhi? 150 v = v.Rotate(-fPhi); // FIXME: Replace with a precalculates sin/cos vector 151 152 const Double_t x = TMath::Abs(v.X()); 153 const Double_t y = TMath::Abs(v.Y()); 135 154 136 155 const Double_t disthex = TMath::Sqrt(x*x + y*y); … … 162 181 return distborder < disthex ? (int)((disthex-distborder)/conv+1) : 0; 163 182 } 164 183 /* 165 184 // ------------------------------------------------------------------------ 166 185 // … … 170 189 Float_t MHexagon::DistanceToPrimitive(Float_t px, Float_t py) const 171 190 { 191 //FIXME: Rotation phi missing! 192 172 193 // 173 194 // compute the distance of the Point to the center of the Hexagon 174 195 // 175 const Double_t dx = px-fX; 176 const Double_t dy = py-fY; 196 //const Double_t dx = px-fX; 197 //const Double_t dy = py-fY; 198 199 TVector2 v(px-fX, py-fY); 200 // FIXME: fPhi or -fPhi? 201 v = v.Rotate(-fPhi); // FIXME: Replace with a precalculates sin/cos vector 202 203 const Double_t dx = v.X(); 204 const Double_t dy = v.Y(); 205 177 206 const Double_t disthex = TMath::Sqrt(dx*dx + dy*dy); 178 207 … … 199 228 return -1; 200 229 } 201 230 */ 202 231 /* 203 232 Float_t MHexagon::DistanceToPrimitive(Float_t px, Float_t py) … … 227 256 // Draw this ellipse with new coordinate 228 257 // 229 void MHexagon::DrawHexagon(Float_t x, Float_t y, Float_t d )258 void MHexagon::DrawHexagon(Float_t x, Float_t y, Float_t d, Float_t phi) 230 259 { 231 MHexagon *newhexagon = new MHexagon(x, y, d );260 MHexagon *newhexagon = new MHexagon(x, y, d, phi); 232 261 233 262 TAttLine::Copy(*newhexagon); … … 281 310 void MHexagon::Paint(Option_t *) 282 311 { 283 PaintHexagon(fX, fY, fD );312 PaintHexagon(fX, fY, fD, fPhi); 284 313 } 285 314 … … 288 317 // draw this hexagon with the coordinates 289 318 // 290 void MHexagon::PaintHexagon(Float_t inX, Float_t inY, Float_t inD )319 void MHexagon::PaintHexagon(Float_t inX, Float_t inY, Float_t inD, Float_t phi) 291 320 { 292 321 // … … 296 325 for (Int_t i=0; i<7; i++) 297 326 { 298 x[i] = inX + fgDx[i%6]*inD; 299 y[i] = inY + fgDy[i%6]*inD; 327 TVector2 v(fgDx[i%6], fgDy[i%6]); 328 329 v = v.Rotate(phi); // FIXME: Replace with a precalculates sin/cos vector 330 331 x[i] = inX + v.X()*inD; 332 y[i] = inY + v.Y()*inD; 300 333 } 301 334 … … 320 353 { 321 354 cout << "MHexagon: "; 322 cout << "x=" << fX << "mm y=" << fY << "mm r=" << fD << "mm " << endl;355 cout << "x=" << fX << "mm y=" << fY << "mm r=" << fD << "mm phi=" << TMath::RadToDeg() << "deg" << endl; 323 356 324 357 cout << " Line:"; … … 343 376 out << " MHexagon *"; 344 377 345 out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << " );" << endl;378 out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << "," << fPhi << ");" << endl; 346 379 347 380 SaveFillAttributes(out, "hexagon"); … … 360 393 out << " MHexagon *"; 361 394 362 out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << " );" << endl;395 out << "hexagon = new MHexagon(" << fX << "," << fY << "," << fD << "," << fPhi << ");" << endl; 363 396 364 397 SaveFillAttributes(out, "hexagon"); … … 370 403 #endif 371 404 } 372 373 // ------------------------------------------------------------------------374 //375 // Small helper class to allow fast sorting of TVector2 by angle376 //377 class HVector2 : public TVector2378 {379 Double_t fAngle;380 public:381 HVector2() : TVector2() { }382 HVector2(const TVector2 &v) : TVector2(v) { }383 HVector2(Double_t x, Double_t y) : TVector2 (x, y) { }384 void CalcAngle() { fAngle = Phi(); }385 Bool_t IsSortable() const { return kTRUE; }386 Int_t Compare(const TObject *obj) const { return ((HVector2*)obj)->fAngle>fAngle ? 1 : -1; }387 Double_t GetAngle() const { return fAngle; }388 };389 390 // ------------------------------------------------------------------------391 //392 // Calculate the edge points of the intersection area of two hexagons.393 // The points are added as TVector2 to the TOrdCollection.394 // The user is responsible of delete the objects.395 //396 void MHexagon::GetIntersectionBorder(TOrdCollection &col, const MHexagon &hex) const397 {398 Bool_t inside0[6], inside1[6];399 400 HVector2 v0[6];401 HVector2 v1[6];402 403 Int_t cnt0=0;404 Int_t cnt1=0;405 406 // Calculate teh edges of each hexagon and whether this edge407 // is inside the other hexgon or not408 for (int i=0; i<6; i++)409 {410 const Double_t x0 = fX+fgDx[i]*fD;411 const Double_t y0 = fY+fgDy[i]*fD;412 413 const Double_t x1 = hex.fX+fgDx[i]*hex.fD;414 const Double_t y1 = hex.fY+fgDy[i]*hex.fD;415 416 v0[i].Set(x0, y0);417 v1[i].Set(x1, y1);418 419 inside0[i] = hex.DistanceToPrimitive(x0, y0) < 0;420 inside1[i] = DistanceToPrimitive(x1, y1) < 0;421 422 if (inside0[i])423 {424 col.Add(new HVector2(v0[i]));425 cnt0++;426 }427 if (inside1[i])428 {429 col.Add(new HVector2(v1[i]));430 cnt1++;431 }432 }433 434 if (cnt0==0 || cnt1==0)435 return;436 437 // No calculate which vorder lines intersect438 Bool_t iscross0[6], iscross1[6];439 for (int i=0; i<6; i++)440 {441 iscross0[i] = (inside0[i] && !inside0[(i+1)%6]) || (!inside0[i] && inside0[(i+1)%6]);442 iscross1[i] = (inside1[i] && !inside1[(i+1)%6]) || (!inside1[i] && inside1[(i+1)%6]);443 }444 445 // Calculate the border points of our intersection area446 for (int i=0; i<6; i++)447 {448 // Skip non intersecting lines449 if (!iscross0[i])450 continue;451 452 for (int j=0; j<6; j++)453 {454 // Skip non intersecting lines455 if (!iscross1[j])456 continue;457 458 const TVector2 p = MMath::GetIntersectionPoint(v0[i], v0[(i+1)%6], v1[j], v1[(j+1)%6]);459 if (hex.DistanceToPrimitive(p.X(), p.Y())<1e-9)460 col.Add(new HVector2(p));461 }462 }463 }464 465 // ------------------------------------------------------------------------466 //467 // Calculate the overlapping area of the two hexagons.468 //469 Double_t MHexagon::CalcOverlapArea(const MHexagon &cam) const470 {471 TOrdCollection col;472 col.SetOwner();473 474 GetIntersectionBorder(col, cam);475 476 // Check if there is an intersection to proceed with477 const Int_t n = col.GetEntries();478 if (n==0)479 return 0;480 481 // Calculate the center of gravity482 TVector2 cog;483 484 TIter Next(&col);485 HVector2 *v=0;486 while ((v=(HVector2*)Next()))487 cog += *v;488 cog /= n;489 490 // Shift the figure to its center-og-gravity and491 // calculate the angle of the connection line between the492 // border points of our intersesction area and its cog493 Next.Reset();494 while ((v=(HVector2*)Next()))495 {496 *v -= cog;497 v->CalcAngle();498 }499 500 // Sort these points by this angle501 col.Sort();502 503 // Now sum up the area of all the triangles between two504 // following points and the cog.505 Double_t A = 0;506 for (int i=0; i<n; i++)507 {508 // Vectors from cog to two nearby border points509 const HVector2 *v1 = (HVector2*)col.At(i);510 const HVector2 *v2 = (HVector2*)col.At((i+1)%n);511 512 // Angle between both vectors513 const Double_t a = fmod(v1->GetAngle()-v2->GetAngle()+TMath::TwoPi(), TMath::TwoPi());514 515 // Length of both vectors516 const Double_t d1 = v1->Mod();517 const Double_t d2 = v2->Mod();518 519 A += d1*d2/2*sin(a);520 }521 return A;522 } -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r8178 r9235 35 35 static const Double_t fgSin60; 36 36 37 public: 37 38 static const Double_t fgDx[6]; // X coordinate of the six edges 38 39 static const Double_t fgDy[6]; // Y coordinate of the six edges … … 44 45 Float_t fD; // diameter D or better distance between opposite sides 45 46 47 Float_t fPhi; // Rotation angle 48 46 49 public: 47 50 48 51 MHexagon(); 49 MHexagon(Float_t x, Float_t y, Float_t d );52 MHexagon(Float_t x, Float_t y, Float_t d, Float_t phi=0); 50 53 MHexagon(const MGeomPix &pix); 51 54 MHexagon(const MHexagon &hexagon); … … 62 65 return DistancetoPrimitive(px, py, 1); 63 66 } 64 virtual Float_t DistanceToPrimitive(Float_t px, Float_t py) const; 65 virtual void DrawHexagon(Float_t x, Float_t y, Float_t d );67 68 virtual void DrawHexagon(Float_t x, Float_t y, Float_t d, Float_t phi=0); 66 69 67 70 //virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py); … … 69 72 virtual void ls(const Option_t *Option="") const; 70 73 virtual void Paint(Option_t *Option=""); 71 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d );74 virtual void PaintHexagon(Float_t x, Float_t y, Float_t d, Float_t phi=0); 72 75 virtual void Print(Option_t *Option="") const; // *MENU* 73 76 virtual void SavePrimitive(ostream &out, Option_t *); … … 77 80 Float_t GetY() const { return fY; } 78 81 Float_t GetD() const { return fD; } 82 Float_t GetPhi() const { return fPhi; } 79 83 80 void GetIntersectionBorder(TOrdCollection &col, const MHexagon &hex) const; 81 Double_t CalcOverlapArea(const MHexagon &cam) const; 82 83 ClassDef(MHexagon, 1) // A hexagon for MAGIC 84 ClassDef(MHexagon, 2) // A hexagon for MAGIC 84 85 }; 85 86 -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r9195 r9235 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.11 1 2008-12-21 18:09:49tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.112 2009-01-21 14:37:07 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 307 307 for (Int_t idx=0; idx<fNcells-2; idx++) 308 308 { 309 MHexagon hex((*fGeomCam)[idx]); 310 if (hex.DistanceToPrimitive(x, y)>0) 309 if ((*fGeomCam)[idx].DistanceToPrimitive(x, y)>0) 311 310 continue; 312 311 -
trunk/MagicSoft/Mars/mtools/MagicJam.cc
r9195 r9235 158 158 for (i=0; i<fNcells-2; i++) 159 159 { 160 MHexagon hex((*fGeomCam)[i]); 161 if (hex.DistanceToPrimitive(px, py)>0) 160 if ((*fGeomCam)[i].DistanceToPrimitive(px, py)>0) 162 161 continue; 163 162
Note:
See TracChangeset
for help on using the changeset viewer.