Changeset 9371 for trunk/MagicSoft
- Timestamp:
- 03/02/09 09:05:19 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9370 r9371 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/03/02 Thomas Bretz 21 22 * mgeom/MGeomCam.[h,cc], msimreflector/MMirror.h, 23 msimreflector/MMirrorDisk.[h,cc], msimreflector/MMirrorHex.[h,cc], 24 msimreflector/MMirrorSquare.[h,cc], msimreflector/MReflector.[h,cc]: 25 - added GetA member function 26 27 28 20 29 2009/03/01 Thomas Bretz 21 30 -
trunk/MagicSoft/Mars/msimreflector/MMirror.cc
r9332 r9371 57 57 // 58 58 // The action should coincide with what is painted in Paint() 59 // 60 // ------------------------------------------------------------------------ 61 // 62 // Double_t GetA() const 63 // 64 // Return the reflective area of the mirror 65 // 66 // ------------------------------------------------------------------------ 67 // 68 // Double_t GetMaxR() const 69 // 70 // Return the maximum distance of a reflective point from the 71 // mirror center 59 72 // 60 73 // ------------------------------------------------------------------------ -
trunk/MagicSoft/Mars/msimreflector/MMirror.h
r9332 r9371 62 62 63 63 virtual Double_t GetMaxR() const=0;// { return TMath::Max(fMaxRX, fMaxRY); } 64 virtual Double_t GetA() const=0;// { return TMath::Max(fMaxRX, fMaxRY); } 64 65 65 66 TVector3 SimPSF(const TVector3 &n, Double_t F, Double_t psf) const; -
trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc
r9332 r9371 34 34 #include <stdlib.h> // atof (Ubuntu 8.10) 35 35 36 #include <TMath.h> 36 37 #include <TObjArray.h> 37 38 … … 46 47 47 48 using namespace std; 49 50 // -------------------------------------------------------------------------- 51 // 52 // Return the aread of the disk: Pi*r^2 53 // 54 Double_t MMirrorDisk::GetA() const 55 { 56 return TMath::Pi()*fR*fR; 57 } 48 58 49 59 // ------------------------------------------------------------------------ -
trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.h
r9312 r9371 16 16 // MMirror 17 17 Double_t GetMaxR() const { return fR; } 18 Double_t GetA() const; 18 19 19 20 Bool_t CanHit(const MQuaternion &p) const; -
trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc
r9332 r9371 52 52 const Double_t MMirrorHex::fgCos60 = TMath::Cos(60*TMath::DegToRad()); 53 53 const Double_t MMirrorHex::fgSin60 = TMath::Sin(60*TMath::DegToRad()); 54 55 // -------------------------------------------------------------------------- 56 // 57 // Return the aread of the hexagon: d^2*sin(60) 58 // 59 Double_t MMirrorHex::GetA() const 60 { 61 return fD*fD*fgSin60*4; 62 } 54 63 55 64 // ------------------------------------------------------------------------ -
trunk/MagicSoft/Mars/msimreflector/MMirrorHex.h
r9312 r9371 23 23 // MMirror 24 24 Double_t GetMaxR() const { return fMaxR; } 25 Double_t GetA() const; 25 26 26 27 Bool_t CanHit(const MQuaternion &p) const; -
trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc
r9332 r9371 49 49 using namespace std; 50 50 51 // -------------------------------------------------------------------------- 52 // 53 // Return the max radius, i.e. the distance of the edges to zje center 54 // 51 55 Double_t MMirrorSquare::GetMaxR() const 52 56 { 53 57 return TMath::Sqrt(2.)*fSideLength; 58 } 59 60 // -------------------------------------------------------------------------- 61 // 62 // Return the aread of the square: l^2 63 // 64 Double_t MMirrorSquare::GetA() const 65 { 66 return fSideLength*fSideLength*4; 54 67 } 55 68 -
trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h
r9312 r9371 16 16 // MMirror 17 17 Double_t GetMaxR() const; 18 Double_t GetA() const; 18 19 19 20 Bool_t HasHit(const MQuaternion &p) const; -
trunk/MagicSoft/Mars/msimreflector/MReflector.cc
r9332 r9371 95 95 // -------------------------------------------------------------------------- 96 96 // 97 // Return the total Area of all mirrors. Note, that it is recalculated 98 // with any call. 99 // 100 Double_t MReflector::GetA() const 101 { 102 Double_t A = 0; 103 104 TIter Next(&fMirrors); 105 MMirror *m = 0; 106 while ((m=static_cast<MMirror*>(Next()))) 107 A += m->GetA(); 108 109 return A; 110 } 111 112 // -------------------------------------------------------------------------- 113 // 97 114 // Get the pointer to the first mirror. This is a very dangerous way of 98 115 // access, but the fastest possible. because it is the most often called -
trunk/MagicSoft/Mars/msimreflector/MReflector.h
r9332 r9371 45 45 46 46 Double_t GetMaxR() const { return fMaxR; } 47 Double_t GetA() const; 47 48 48 49 virtual Bool_t CanHit(const MQuaternion &p) const;
Note:
See TracChangeset
for help on using the changeset viewer.