Changeset 19786 for trunk/Mars
- Timestamp:
- 10/24/19 15:15:03 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/hawc/fresnellens_psf.C
r19648 r19786 33 33 double psf = 0; // Do not change! It might have unpredicted side effectes 34 34 35 double angle = 6; // [cm] angle of incidence of simulates rays 35 double angle = 0; // [cm] angle of incidence of simulates rays 36 37 //TVector3 point_source(0, -F*atan(angle*TMath::DegToRad()), F); // Point source at x=0, y=0, z=F 38 TVector3 point_source; // No point source 36 39 37 40 MFresnelLens lens; … … 71 74 72 75 TVector3 dir; 73 dir.SetMagThetaPhi(1, (180-angle)*TMath::DegToRad(), TMath::Pi()/2); 76 if (point_source.Mag()<1e-10) 77 dir.SetMagThetaPhi(1, (180-angle)*TMath::DegToRad(), TMath::Pi()/2); 78 else 79 { 80 // Note that this is not a perfect point source as the 81 // flux is homogeneous over the surface of the lens 82 TVector3 ps = pos - point_source; 83 dir.SetMagThetaPhi(1, ps.Theta(), ps.Phi()); 84 } 74 85 75 86 double v = 1./(TMath::C()*100/1e9); // cm/ns
Note:
See TracChangeset
for help on using the changeset viewer.