source: trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc@ 1972

Last change on this file since 1972 was 1696, checked in by blanch, 22 years ago
*** empty log message ***
File size: 4.9 KB
Line 
1/* ======================================================================== *\
2!
3! *
4! * This file is part of MARS, the MAGIC Analysis and Reconstruction
5! * Software. It is distributed to you in the hope that it can be a useful
6! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
7! * It is distributed WITHOUT ANY WARRANTY.
8! *
9! * Permission to use, copy, modify and distribute this software and its
10! * documentation for any purpose is hereby granted without fee,
11! * provided that the above copyright notice appear in all copies and
12! * that both that copyright notice and this permission notice appear
13! * in supporting documentation. It is provided "as is" without express
14! * or implied warranty.
15! *
16!
17!
18! Author(s): Oscar Blanch 11/2002 <mailto:blanch@ifae.es>
19!
20! Copyright: MAGIC Software Development, 2000-2002
21!
22!
23\* ======================================================================== */
24
25/////////////////////////////////////////////////////////////////////////////
26//
27// MGeomMirror
28//
29// This is the base class of the Mirror geometry.
30//
31/////////////////////////////////////////////////////////////////////////////
32
33#include "MGeomMirror.h"
34
35#include "MLog.h"
36#include "MLogManip.h"
37
38ClassImp(MGeomMirror);
39
40// --------------------------------------------------------------------------
41//
42// Initializes a Mirror geometry with 0 values, except for fMirrorID.
43//
44MGeomMirror::MGeomMirror(Int_t mir, const char *name, const char *title)
45{
46 fName = name ? name : "MGeomMirror";
47 fTitle = title ? title : "Storage container for a mirror geometry";
48
49 fMirrorId=mir; // the Mirror Id
50
51 fFocalDist=0.; // focal distance of that mirror [cm]
52 fSX=0.; // curvilinear coordinate of mirror's center in X[cm]
53 fSY=0.; // curvilinear coordinate of mirror's center in X[cm]
54 fX=0.; // x coordinate of the center of the mirror [cm]
55 fY=0.; // y coordinate of the center of the mirror [cm]
56 fZ=0.; // z coordinate of the center of the mirror [cm]
57 fThetaN=0.; // polar theta angle of the direction
58 // where the mirror points to
59 fPhiN=0.; // polar phi angle of the direction
60 // where the mirror points to
61 fXN=0.; // xn coordinate of the normal vector
62 // in the center
63 fYN=0.; // yn coordinate of the normal vector
64 // in the center
65 fZN=0.; // zn coordinate of the normal vector
66 // in the center
67 // Note: fXN^2*fYN^2*fZN^2 = 1
68 fDeviationX=0.; // deviation in x [cm]
69 fDeviationY=0.; // deviation in y [cm]
70 // of the spot of a single mirror on the camera plane
71
72}
73
74// --------------------------------------------------------------------------
75//
76// DESCRIPTION MISSING: Please contact Oscar
77//
78void MGeomMirror::SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
79 Float_t curv_y, Float_t lin_x, Float_t lin_y,
80 Float_t lin_z, Float_t theta, Float_t phi,
81 Float_t x_n, Float_t y_n, Float_t z_n){
82 fMirrorId=mir; // the Mirror Id
83
84 fFocalDist=focal; // focal distance of that mirror [cm]
85 fSX=curv_x; // curvilinear coordinate of mirror's center in X[cm]
86 fSY=curv_y; // curvilinear coordinate of mirror's center in X[cm]
87 fX=lin_x; // x coordinate of the center of the mirror [cm]
88 fY=lin_y; // y coordinate of the center of the mirror [cm]
89 fZ=lin_z; // z coordinate of the center of the mirror [cm]
90 fThetaN=theta; // polar theta angle of the direction
91 // where the mirror points to
92 fPhiN=phi; // polar phi angle of the direction
93 // where the mirror points to
94 fXN=x_n; // xn coordinate of the normal vector
95 // in the center
96 fYN=y_n; // yn coordinate of the normal vector
97 // in the center
98 fZN=z_n; // zn coordinate of the normal vector
99 // in the center
100 // Note: fXN^2*fYN^2*fZN^2 = 1
101}
102
103void MGeomMirror::SetMirrorDeviations(Float_t dev_x, Float_t dev_y){
104 fDeviationX=dev_x; // deviation in x [cm]
105 fDeviationY=dev_x; // deviation in y [cm]
106 // of the spot of a single mirror on the camera plane
107}
108
109// --------------------------------------------------------------------------
110//
111// Setting function to store the mirror reflectivity (ref) at different
112// wavelength (wav).
113//
114void MGeomMirror::SetReflectivity(const TArrayF &wav, const TArrayF &ref)
115{
116 if (fWavelength.GetSize()!=wav.GetSize() ||
117 fReflectivity.GetSize()!=ref.GetSize())
118 {
119 *fLog << err << dbginf << " fWavelength or fQE do not have ";
120 *fLog << "size of setting arrays" << endl;
121 return;
122 }
123
124 fWavelength = wav;
125 fReflectivity = ref;
126}
127
128
129
130
131
132
133
134
Note: See TracBrowser for help on using the repository browser.