Changeset 9367 for trunk/MagicSoft/Mars/msim
- Timestamp:
- 03/01/09 12:51:04 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/msim
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9348 r9367 266 266 MH::FindGoodLimits(num, num, xmin, xmax, kTRUE); 267 267 268 MBinning( abs(num), xmin-.5, xmax-.5).Apply(fHistWL);268 MBinning(TMath::Abs(num), xmin-.5, xmax-.5).Apply(fHistWL); 269 269 270 270 return kTRUE; -
trunk/MagicSoft/Mars/msim/MSimPointingPos.cc
r9362 r9367 92 92 } 93 93 94 // -------------------------------------------------------------------------- 95 // 96 // Get the distance from the real source to the poitning position. 97 // 98 Double_t MSimPointingPos::GetOffTargetDistance() const 99 { 100 return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); 101 } 102 103 // -------------------------------------------------------------------------- 104 // 105 // Get the phi angle counted from the upward direction the source position 106 // is rotated. distance from the real source to the pointing position. 107 // A negative value refers to a random distribution. 108 // 109 Double_t MSimPointingPos::GetOffTargetPhi() const 110 { 111 return fOffTargetPhi<0 ? -1 : fOffTargetPhi*TMath::RadToDeg(); 112 } 113 114 // -------------------------------------------------------------------------- 115 // 116 // Set fOffTargetDistance, see also GetOffTargetDistance 117 // 118 void MSimPointingPos::SetOffTargetDistance(Double_t d) 119 { 120 fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); 121 } 122 123 // -------------------------------------------------------------------------- 124 // 125 // Set fOffTargetPhi, see also GetOffTargetPhi 126 // 127 void MSimPointingPos::SetOffTargetPhi(Double_t p) 128 { 129 fOffTargetPhi = p<0 ? -1 : p*TMath::DegToRad(); 130 } 131 132 94 133 95 134 // -------------------------------------------------------------------------- … … 153 192 { 154 193 dtheta = fOffTargetDistance; 155 dphi = fOffTargetPhi> 0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());194 dphi = fOffTargetPhi>=0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi()); 156 195 } 157 196 else -
trunk/MagicSoft/Mars/msim/MSimPointingPos.h
r9362 r9367 36 36 37 37 // Getter 38 Double_t GetOffTargetDistance() const { return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); }39 Double_t GetOffTargetPhi() const { return fOffTargetPhi*TMath::RadToDeg(); }38 Double_t GetOffTargetDistance() const; 39 Double_t GetOffTargetPhi() const; 40 40 41 41 // Setter 42 void SetOffTargetDistance(Double_t d=0) { fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); }43 void SetOffTargetPhi(Double_t p= 0) { fOffTargetPhi = p*TMath::DegToRad(); }42 void SetOffTargetDistance(Double_t d=0); 43 void SetOffTargetPhi(Double_t p=-1); 44 44 45 45 // MSimPointingPos
Note:
See TracChangeset
for help on using the changeset viewer.