Changeset 9252 for trunk/MagicSoft/Mars/msim
- Timestamp:
- 01/24/09 01:49:53 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msim
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msim/MPhotonData.cc
r9243 r9252 40 40 #include <iostream> 41 41 42 #include <TMath.h> 43 42 44 #include "MLog.h" 43 45 #include "MLogManip.h" … … 95 97 // -------------------------------------------------------------------------- 96 98 // 99 // return the cosine of the Theta-angle == sqrt(1-CosU^2-CosV^2) 100 // 101 Double_t MPhotonData::GetCosW() const 102 { 103 return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV); 104 } 105 106 // -------------------------------------------------------------------------- 107 // 108 // Return the theta angle in radians 109 // 110 Double_t MPhotonData::GetTheta() const 111 { 112 return TMath::ACos(GetCosW()); 113 } 114 115 // -------------------------------------------------------------------------- 116 // 117 // Return a TQuaternion with the first three components x, y, and z 118 // and the fourth component the time. 119 // 120 TQuaternion MPhotonData::GetPosQ() const 121 { 122 return TQuaternion(GetPos3(), fTime); 123 } 124 125 // -------------------------------------------------------------------------- 126 // 127 // return a TQuaternion with the first three components the direction 128 // moving in space (GetDir3()) and the fourth component is the 129 // one devided by the speed of light (converted to cm/ns) 130 // 131 // FIXME: v in air! 132 // 133 TQuaternion MPhotonData::GetDirQ() const 134 { 135 return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9)); 136 } 137 138 // -------------------------------------------------------------------------- 139 // 97 140 // Set the data member according to the 8 floats read from a reflector-file. 98 141 // This function MUST reset all data-members, no matter whether these are -
trunk/MagicSoft/Mars/msim/MPhotonData.h
r9232 r9252 21 21 //class ifstream; 22 22 #include <iosfwd> 23 /* 24 class TH1; 25 class TH2; 26 class TH3; 27 */ 23 28 24 class MCorsikaRunHeader; 29 25 … … 67 63 Float_t GetCosU() const { return fCosU; } 68 64 Float_t GetCosV() const { return fCosV; } 69 Double_t GetCosW() const { return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV); } // cos(Theta)70 Double_t GetTheta() const { return TMath::ACos(GetCosW()); }65 Double_t GetCosW() const; 66 Double_t GetTheta() const; 71 67 72 68 Double_t GetTime() const { return fTime; } … … 81 77 TVector3 GetDir3() const { return TVector3(fCosU, fCosV, -GetCosW()); } 82 78 83 // Getter 4D // cm // ns 84 TQuaternion GetPosQ() const { return TQuaternion(GetPos3(), fTime); } 85 // FIXME: v in air! // m/s cm? / ns 86 TQuaternion GetDirQ() const { return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9)); } 79 // Getter 4D 80 TQuaternion GetPosQ() const; 81 TQuaternion GetDirQ() const; 87 82 88 83 // Getter Others
Note:
See TracChangeset
for help on using the changeset viewer.