Changeset 9234 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 01/21/09 14:26:15 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.h
r8921 r9234 13 13 #ifndef ROOT_TArrayS 14 14 #include <TArrayS.h> 15 #endif 16 #ifndef MARS_MQuaternion 17 #include "MQuaternion.h" 15 18 #endif 16 19 … … 109 112 Int_t GetNeighbor(UInt_t idx, Int_t dir) const; 110 113 114 virtual Bool_t HitFrame(MQuaternion p, const MQuaternion &u) const { return kFALSE; } 115 virtual Bool_t HitDetector(const MQuaternion &p) const { return kFALSE; } 116 111 117 void Print(Option_t *opt=NULL) const; 112 118 -
trunk/MagicSoft/Mars/mgeom/MGeomCamDwarf.cc
r8910 r9234 112 112 // -------------------------------------------------------------------------- 113 113 // 114 // Check if the photon which is flying along the trajectory u has passed 115 // (or will pass) the frame of the camera (and consequently get 116 // absorbed). The position p and direction u must be in the 117 // telescope coordinate frame, which is z parallel to the focal plane, 118 // x to the right and y upwards, looking from the mirror towards the camera. 119 // 120 // The units are cm. 121 // 122 Bool_t MGeomCamDwarf::HitFrame(MQuaternion p, const MQuaternion &u) const 123 { 124 // z is defined from the mirror (0) to the camera (z>0). 125 // Thus we just propagate to the focal plane (z=fDist) 126 //p -= 1700./u.Z()*u; 127 p.PropagateZ(u, GetCameraDist()*100); // m->cm 128 129 // Add 10% to the max radius and convert from mm to cm 130 return p.R()<GetMaxRadius()*0.11;//TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65; 131 } 132 133 // -------------------------------------------------------------------------- 134 // 135 // Check if the position given in the focal plane (so z can be ignored) 136 // is a position which might hit the detector. It is meant to be a rough 137 // and fast estimate not a precise calculation. All positions dicarded 138 // must not hit the detector. All positions accepted might still miss 139 // the detector. 140 // 141 // The units are cm. 142 // 143 Bool_t MGeomCamDwarf::HitDetector(const MQuaternion &v) const 144 { 145 // Add 10% to the max radius and convert from mm to cm 146 return v.R()<GetMaxRadius()*0.11;//60.2; 147 } 148 149 // -------------------------------------------------------------------------- 150 // 114 151 // Calculate in the direction 0-5 (kind of sector) in the ring-th ring 115 152 // the x and y coordinate of the i-th pixel. The unitx are unity, -
trunk/MagicSoft/Mars/mgeom/MGeomCamDwarf.h
r9219 r9234 28 28 TObject *Clone(const char *newname) const; 29 29 30 ClassDef(MGeomCamDwarf, 1) // Geometry class for the Dwarf camera 30 Bool_t HitFrame(MQuaternion p, const MQuaternion &u) const; 31 Bool_t HitDetector(const MQuaternion &p) const; 32 33 ClassDef(MGeomCamDwarf, 1) // Geometry class for the Dwarf camera 31 34 }; 32 35 33 36 #endif 34 -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
r3392 r9234 49 49 CreateNN(); 50 50 InitGeometry(); 51 } 52 53 // -------------------------------------------------------------------------- 54 // 55 // Check if the photon which is flying along the trajectory u has passed 56 // (or will pass) the frame of the camera (and consequently get 57 // absorbed). The position p and direction u must be in the 58 // telescope coordinate frame, which is z parallel to the focal plane, 59 // x to the right and y upwards, looking from the mirror towards the camera. 60 // 61 Bool_t MGeomCamMagic::HitFrame(MQuaternion p, const MQuaternion &u) const 62 { 63 // z is defined from the mirror (0) to the camera (z>0). 64 // Thus we just propagate to the focal plane (z=fDist) 65 //p -= 1700./u.Z()*u; 66 p.PropagateZ(u, GetCameraDist()*100); 67 68 return TMath::Abs(p.X())<65 && TMath::Abs(p.Y())<65; 69 } 70 71 // -------------------------------------------------------------------------- 72 // 73 // Check if the position given in the focal plane (so z can be ignored) 74 // is a position which might hit the detector. It is meant to be a rough 75 // and fast estimate not a precise calculation. All positions dicarded 76 // must not hit the detector. All positions accepted might still miss 77 // the detector. 78 // 79 Bool_t MGeomCamMagic::HitDetector(const MQuaternion &v) const 80 { 81 return v.R()<60.2; 51 82 } 52 83 -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.h
r1458 r9234 15 15 MGeomCamMagic(const char *name=NULL); 16 16 17 Bool_t HitFrame(MQuaternion p, const MQuaternion &u) const; 18 Bool_t HitDetector(const MQuaternion &p) const; 19 17 20 ClassDef(MGeomCamMagic, 1) // Geometry class for the Magic camera 18 21 };
Note:
See TracChangeset
for help on using the changeset viewer.