| 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 | ClassImp(MGeomMirror);
|
|---|
| 36 |
|
|---|
| 37 | // --------------------------------------------------------------------------
|
|---|
| 38 | //
|
|---|
| 39 | // Initializes a Mirror geometry with 0 values, except for fMirrorID.
|
|---|
| 40 | //
|
|---|
| 41 | MGeomMirror::MGeomMirror(Int_t mir, const char *name, const char *title)
|
|---|
| 42 | {
|
|---|
| 43 | fName = name ? name : "MGeomMirror";
|
|---|
| 44 | fTitle = title ? title : "Storage container for a mirror geometry";
|
|---|
| 45 |
|
|---|
| 46 | fMirrorId=mir; // the Mirror Id
|
|---|
| 47 |
|
|---|
| 48 | fFocalDist=0.; // focal distance of that mirror [cm]
|
|---|
| 49 | fSX=0.; // curvilinear coordinate of mirror's center in X[cm]
|
|---|
| 50 | fSY=0.; // curvilinear coordinate of mirror's center in X[cm]
|
|---|
| 51 | fX=0.; // x coordinate of the center of the mirror [cm]
|
|---|
| 52 | fY=0.; // y coordinate of the center of the mirror [cm]
|
|---|
| 53 | fZ=0.; // z coordinate of the center of the mirror [cm]
|
|---|
| 54 | fThetaN=0.; // polar theta angle of the direction
|
|---|
| 55 | // where the mirror points to
|
|---|
| 56 | fPhiN=0.; // polar phi angle of the direction
|
|---|
| 57 | // where the mirror points to
|
|---|
| 58 | fXN=0.; // xn coordinate of the normal vector
|
|---|
| 59 | // in the center
|
|---|
| 60 | fYN=0.; // yn coordinate of the normal vector
|
|---|
| 61 | // in the center
|
|---|
| 62 | fZN=0.; // zn coordinate of the normal vector
|
|---|
| 63 | // in the center
|
|---|
| 64 | // Note: fXN^2*fYN^2*fZN^2 = 1
|
|---|
| 65 | fDeviationX=0.; // deviation in x [cm]
|
|---|
| 66 | fDeviationY=0.; // deviation in y [cm]
|
|---|
| 67 | // of the spot of a single mirror on the camera plane
|
|---|
| 68 |
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|
| 71 | // --------------------------------------------------------------------------
|
|---|
| 72 | //
|
|---|
| 73 | // DESCRIPTION MISSING: Please contact Oscar
|
|---|
| 74 | //
|
|---|
| 75 | void MGeomMirror::SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
|
|---|
| 76 | Float_t curv_y, Float_t lin_x, Float_t lin_y,
|
|---|
| 77 | Float_t lin_z, Float_t theta, Float_t phi,
|
|---|
| 78 | Float_t x_n, Float_t y_n, Float_t z_n,
|
|---|
| 79 | Float_t dev_x, Float_t dev_y){
|
|---|
| 80 | fMirrorId=mir; // the Mirror Id
|
|---|
| 81 |
|
|---|
| 82 | fFocalDist=focal; // focal distance of that mirror [cm]
|
|---|
| 83 | fSX=curv_x; // curvilinear coordinate of mirror's center in X[cm]
|
|---|
| 84 | fSY=curv_y; // curvilinear coordinate of mirror's center in X[cm]
|
|---|
| 85 | fX=lin_x; // x coordinate of the center of the mirror [cm]
|
|---|
| 86 | fY=lin_y; // y coordinate of the center of the mirror [cm]
|
|---|
| 87 | fZ=lin_z; // z coordinate of the center of the mirror [cm]
|
|---|
| 88 | fThetaN=theta; // polar theta angle of the direction
|
|---|
| 89 | // where the mirror points to
|
|---|
| 90 | fPhiN=phi; // polar phi angle of the direction
|
|---|
| 91 | // where the mirror points to
|
|---|
| 92 | fXN=x_n; // xn coordinate of the normal vector
|
|---|
| 93 | // in the center
|
|---|
| 94 | fYN=y_n; // yn coordinate of the normal vector
|
|---|
| 95 | // in the center
|
|---|
| 96 | fZN=z_n; // zn coordinate of the normal vector
|
|---|
| 97 | // in the center
|
|---|
| 98 | // Note: fXN^2*fYN^2*fZN^2 = 1
|
|---|
| 99 | fDeviationX=dev_x; // deviation in x [cm]
|
|---|
| 100 | fDeviationY=dev_x; // deviation in y [cm]
|
|---|
| 101 | // of the spot of a single mirror on the camera plane
|
|---|
| 102 | }
|
|---|
| 103 |
|
|---|
| 104 |
|
|---|
| 105 |
|
|---|
| 106 |
|
|---|
| 107 |
|
|---|