Changeset 9312 for trunk/MagicSoft/Mars/msimreflector
- Timestamp:
- 02/10/09 20:00:10 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msimreflector
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msimreflector/MMirror.cc
r9243 r9312 78 78 #include <TRandom.h> 79 79 80 #include "MLog.h" 81 80 82 #include "MQuaternion.h" 81 83 … … 133 135 return dn; // Return the vector to be added to the normal vector 134 136 } 137 138 void MMirror::Print(Option_t *o) const 139 { 140 gLog << fPos.X() << " " << fPos.Y() << " " << fPos.Z() << " "; 141 gLog << fNorm.X() << " " << fNorm.Y() << " " << fNorm.Z() << " "; 142 gLog << fFocalLength << " "; 143 144 const TString n = ClassName(); 145 146 gLog << n(7, n.Length()); 147 } -
trunk/MagicSoft/Mars/msimreflector/MMirror.h
r9236 r9312 70 70 // ----- Mirror specialized functions ----- 71 71 72 // This should fit with Paint()73 72 virtual Bool_t HasHit(const MQuaternion &p) const=0; 74 // This should fit with HasHit()75 //void Paint(Option_t *)=0;76 73 virtual Bool_t CanHit(const MQuaternion &p) const=0; 77 74 78 75 virtual Int_t ReadM(const TObjArray &tok)=0; 76 77 // TObject 78 void Print(Option_t *o) const; 79 79 80 80 /* … … 86 86 } 87 87 */ 88 ClassDef(MMirror, 0) // Base class to describe a mirror88 ClassDef(MMirror, 1) // Base class to describe a mirror 89 89 }; 90 90 -
trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc
r9252 r9312 38 38 #include <TEllipse.h> 39 39 #include <TVirtualPad.h> 40 41 #include "MLog.h" 40 42 41 43 #include "MQuaternion.h" … … 99 101 // ------------------------------------------------------------------------ 100 102 // 103 // Print the contents of the mirror 104 // 105 void MMirrorDisk::Print(Option_t *o) const 106 { 107 MMirror::Print(o); 108 gLog << " " << fR << endl; 109 } 110 111 // ------------------------------------------------------------------------ 112 // 101 113 // Paint the mirror in x/y. 102 114 // -
trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.h
r9236 r9312 9 9 { 10 10 private: 11 Double_t fR; 11 Double_t fR; // Radius of the disk 12 12 13 13 public: 14 14 MMirrorDisk() : fR(24.75) { } 15 15 16 // MMirror 16 17 Double_t GetMaxR() const { return fR; } 17 18 18 // This should fit with Paint()19 Bool_t CanHit(const MQuaternion &p) const; 19 20 Bool_t HasHit(const MQuaternion &p) const; 20 // This should fit with HasHit() 21 void Paint(Option_t *); 22 Bool_t CanHit(const MQuaternion &p) const; 21 23 22 Int_t ReadM(const TObjArray &tok); 24 23 25 ClassDef(MMirrorDisk, 0) // A spherical disk type mirror 24 //TObject 25 void Paint(Option_t *); 26 void Print(Option_t *) const; 27 28 ClassDef(MMirrorDisk, 1) // A spherical disk type mirror 26 29 }; 27 30 -
trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc
r9252 r9312 39 39 #include <TEllipse.h> 40 40 #include <TVirtualPad.h> 41 42 #include "MLog.h" 41 43 42 44 #include "MHexagon.h" … … 142 144 // ------------------------------------------------------------------------ 143 145 // 146 // Print the contents of the mirror 147 // 148 void MMirrorHex::Print(Option_t *o) const 149 { 150 MMirror::Print(o); 151 gLog << " " << fD*2 << endl; 152 } 153 154 // ------------------------------------------------------------------------ 155 // 144 156 // Read the mirror's setup from a file. The first eight tokens should be 145 157 // ignored. (This could be fixed!) -
trunk/MagicSoft/Mars/msimreflector/MMirrorHex.h
r9236 r9312 21 21 MMirrorHex() { SetD(24.75); } 22 22 23 // MMirror 23 24 Double_t GetMaxR() const { return fMaxR; } 24 25 25 // This should fit with Paint()26 Bool_t CanHit(const MQuaternion &p) const; 26 27 Bool_t HasHit(const MQuaternion &p) const; 27 // This should fit with HasHit() 28 void Paint(Option_t *); 29 Bool_t CanHit(const MQuaternion &p) const; 28 30 29 Int_t ReadM(const TObjArray &tok); 31 30 32 ClassDef(MMirrorHex, 0) // A spherical hexagon type mirror 31 // TObject 32 void Paint(Option_t *); 33 void Print(Option_t *) const; 34 35 ClassDef(MMirrorHex, 1) // A spherical hexagon type mirror 33 36 }; 34 37 -
trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc
r9252 r9312 40 40 #include <TEllipse.h> 41 41 #include <TVirtualPad.h> 42 43 #include "MLog.h" 42 44 43 45 #include "MQuaternion.h" … … 139 141 // ------------------------------------------------------------------------ 140 142 // 143 // Print the contents of the mirror 144 // 145 void MMirrorSquare::Print(Option_t *o) const 146 { 147 MMirror::Print(o); 148 gLog << " " << fSideLength << endl; 149 } 150 151 // ------------------------------------------------------------------------ 152 // 141 153 // Read the mirror's setup from a file. The first eight tokens should be 142 154 // ignored. (This could be fixed!) -
trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h
r9252 r9312 10 10 private: 11 11 Double_t fSideLength; // HALF of the side length! 12 12 13 public: 13 14 MMirrorSquare() : fSideLength(24.75) { } 14 15 16 // MMirror 15 17 Double_t GetMaxR() const; 16 18 17 // This should fit with Paint()18 19 Bool_t HasHit(const MQuaternion &p) const; 19 // This should fit with HasHit()20 void Paint(Option_t *);21 20 Bool_t CanHit(const MQuaternion &p) const; 21 22 22 Int_t ReadM(const TObjArray &tok); 23 23 24 ClassDef(MMirrorSquare, 0) // A spherical square type mirror 24 // TObject 25 void Paint(Option_t *); 26 void Print(Option_t *) const; 27 28 ClassDef(MMirrorSquare, 1) // A spherical square type mirror 25 29 }; 26 30 -
trunk/MagicSoft/Mars/msimreflector/MReflector.h
r9262 r9312 28 28 void InitMaxR(); 29 29 30 // MParContainer 30 31 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 31 32 … … 46 47 Int_t ExecuteReflector(MQuaternion &p, MQuaternion &u) const; 47 48 49 // TObject 48 50 void Paint(Option_t *o); 51 void Print(Option_t *o) const; 49 52 50 ClassDef(MReflector, 0) // Parameter container storing a collection of several mirrors (reflector)53 ClassDef(MReflector, 1) // Parameter container storing a collection of several mirrors (reflector) 51 54 }; 52 55 -
trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc
r9307 r9312 559 559 fEvt->Sort(kTRUE); 560 560 561 // FIXME FIXME FIXME: Set maxindex, first and last time. 562 // SetMaxIndex(fReflector->GetNumMirrors()-1) 563 // if (fEvt->GetNumPhotons()) 564 // { 565 // SetTime(fEvt->GetFirst()->GetTime(), fEvt->GetLast()->GetTime()); 566 // } 567 561 568 return kTRUE; 562 569 }
Note:
See TracChangeset
for help on using the changeset viewer.