source: trunk/Mars/hawc/fresnellens_image.C@ 19630

Last change on this file since 19630 was 19617, checked in by tbretz, 5 years ago
Moved
File size: 2.8 KB
Line 
1void fresnellens_image()
2{
3 Double_t telzd = 0; // [deg] Telescope orientation Zenith Distance
4 Double_t telaz = 0; // [deg] Telescope orientation Azimuth
5
6 Double_t dzd = 8; // [deg] Relative angle of light ray Zd
7 Double_t daz = 0; // [deg] Relative angle of light ray Az
8
9 Double_t F = 0.5021; // [m] Distance of camera to lens
10 // // This is different from F in MFresnelLens!
11
12 // ----------------------------------------------
13
14 MFresnelLens lens("Reflector");
15
16 MPointingPos pointpos;
17 pointpos.SetLocalPosition(telzd, telaz);
18
19 MPointingPos srcpos("Source");
20 srcpos.SetLocalPosition(dzd, daz);
21
22 MGeomCamFAMOUS geom(F);
23
24 MSimRays simrays;
25 simrays.SetNameReflector("Reflector");
26 simrays.SetWavelengthRange(700, 700);
27 //simrays.SetNumPhotons(100000);
28
29 // ----------------------------------------------
30
31 MParList plist;
32 MTaskList tlist;
33 plist.AddToList(&tlist);
34
35 plist.AddToList(&lens);
36 plist.AddToList(&pointpos);
37 plist.AddToList(&srcpos);
38 plist.AddToList(&geom);
39
40 tlist.AddToList(&simrays);
41
42 MHPhotonEvent planeG(1, "HPhotonEventGround");
43 MHPhotonEvent plane0(2, "HMirrorPlane0");
44 MHPhotonEvent plane2(2, "HMirrorPlane2");
45 MHPhotonEvent plane3(2, "HMirrorPlane3");
46 MHPhotonEvent plane4(2, "HMirrorPlane4");
47 MHPhotonEvent planeC(9, "HPhotonEventCamera");
48
49 planeG.SetMaxImpact(60);
50
51 MFillH fillG(&planeG, "MPhotonEvent", "FillGround");
52 MFillH fill0(&plane0, "MirrorPlane0", "FillReflector");
53 MFillH fill2(&plane2, "MirrorPlane2", "FillCandidates");
54 MFillH fill3(&plane3, "MirrorPlane3", "FillReflected");
55 MFillH fill4(&plane4, "MirrorPlane4", "FillCameraPlane");
56 MFillH fillC(&planeC, "MPhotonEvent", "FillCamera");
57
58 fillG.SetNameTab("Ground", "Photon distribution at ground");
59 fill0.SetNameTab("LensIn", "Photon distribution at plane of lens hit surface");
60 fill2.SetNameTab("Candidates", "*Can hit* photon distribution at reflector plane w/ camera shadow");
61 fill3.SetNameTab("LensOut", "Photon distribution at plane output surface");
62 fill4.SetNameTab("CameraPlane", "Photon distribution at camera plane");
63 fillC.SetNameTab("Camera", "Photon distribution which hit a sensor in the focal plane");
64
65 tlist.AddToList(&fillG);
66
67 MSimReflector simref;
68 simref.SetNameReflector("Reflector");
69 simref.SetDetectorMargin(-1);
70 tlist.AddToList(&simref);
71
72 tlist.AddToList(&fill0);
73 tlist.AddToList(&fill2);
74 tlist.AddToList(&fill3);
75 tlist.AddToList(&fill4);
76 tlist.AddToList(&fillC);
77
78 //tlist.SetAccelerator(MTask::kAccDontReset|MTask::kAccDontTime);
79
80 MStatusDisplay *disp = new MStatusDisplay;
81
82 MEvtLoop loop;
83 loop.SetDisplay(disp);
84 loop.SetParList(&plist);
85
86 if (!loop.Eventloop(100))
87 return;
88}
89
Note: See TracBrowser for help on using the repository browser.