Ignore:
Timestamp:
11/13/02 17:03:19 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mgeom
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgeom/GeomLinkDef.h

    r1436 r1600  
    55#pragma link off all functions;
    66
     7#pragma link C++ class MGeomPMT+;
     8#pragma link C++ class MGeomMirror+;
    79#pragma link C++ class MGeomPix+;
    810#pragma link C++ class MGeomCam+;
  • trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc

    r1458 r1600  
    237237        //
    238238        for (int i=0; i<ring; i++)
    239             (*this)[pixnum++].Set((-ring+i*0.5)*diameter,
     239            (*this)[pixnum++].Set((ring-i*0.5)*diameter,
    240240                                  i*kS32*diameter,
    241241                                  diameter);
    242242
    243243        for (int i=0; i<ring; i++)
    244             (*this)[pixnum++].Set((-ring*0.5+i)*diameter,
     244            (*this)[pixnum++].Set((ring*0.5-i)*diameter,
    245245                                  ring*kS32 * diameter,
    246246                                  diameter);
    247247
    248248        for (int i=0; i<ring; i++)
     249            (*this)[pixnum++].Set(-(ring+i)*0.5*diameter,
     250                                  (ring-i)*kS32*diameter,
     251                                  diameter);
     252
     253        for (int i=0; i<ring; i++)
     254            (*this)[pixnum++].Set((0.5*i-ring)*diameter,
     255                                  -i*kS32*diameter,
     256                                  diameter);
     257
     258        for (int i=0; i<ring; i++)
     259            (*this)[pixnum++].Set((i-ring*0.5)*diameter,
     260                                  -ring*kS32 * diameter,
     261                                  diameter);
     262
     263        for (int i=0; i<ring; i++)
    249264            (*this)[pixnum++].Set((ring+i)*0.5*diameter,
    250                                   (ring-i)*kS32*diameter,
    251                                   diameter);
    252 
    253         for (int i=0; i<ring; i++)
    254             (*this)[pixnum++].Set((ring-0.5*i)*diameter,
    255                                   -i*kS32*diameter,
    256                                   diameter);
    257 
    258         for (int i=0; i<ring; i++)
    259             (*this)[pixnum++].Set((ring*0.5-i)*diameter,
    260                                   -ring*kS32 * diameter,
    261                                   diameter);
    262 
    263         for (int i=0; i<ring; i++)
    264             (*this)[pixnum++].Set((-ring-i)*0.5*diameter,
    265265                                  (-ring+i)*kS32*diameter,
    266266                                  diameter);
  • trunk/MagicSoft/Mars/mgeom/MGeomMirror.cc

    r1596 r1600  
    6969}
    7070
     71// --------------------------------------------------------------------------
     72//
     73// DESCRIPTION MISSING
     74//
    7175void MGeomMirror::SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
    7276                                   Float_t curv_y, Float_t lin_x, Float_t lin_y,
  • trunk/MagicSoft/Mars/mgeom/MGeomMirror.h

    r1596 r1600  
    99{
    1010private:
    11 
    12     Int_t   fMirrorId;       // the Mirror Id
     11    Int_t   fMirrorId;    // the Mirror Id
    1312
    1413    Float_t fFocalDist;   //  focal distance of that mirror [cm]
     
    3332                          // of the spot of a single mirror on the camera plane
    3433public:
    35 
    3634    MGeomMirror(Int_t mir=-1, const char *name=NULL, const char *title=NULL);
    3735
    38     Int_t   GetMirrorId() const         { return fMirrorId;   }
     36    Int_t GetMirrorId() const         { return fMirrorId;   }
    3937
    40     void    SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
    41                           Float_t curv_y, Float_t lin_x, Float_t lin_y,
    42                           Float_t lin_z, Float_t theta, Float_t phi,
    43                           Float_t x_n, Float_t y_n, Float_t z_n,
    44                           Float_t dev_x, Float_t dev_y);
     38    void  SetMirrorContent(Int_t mir, Float_t focal, Float_t curv_x,
     39                           Float_t curv_y, Float_t lin_x, Float_t lin_y,
     40                           Float_t lin_z, Float_t theta, Float_t phi,
     41                           Float_t x_n, Float_t y_n, Float_t z_n,
     42                           Float_t dev_x, Float_t dev_y);
    4543
    4644    ClassDef(MGeomMirror, 1)  // class containing information about the Cerenkov Photons in a pixel
  • trunk/MagicSoft/Mars/mgeom/MGeomPMT.cc

    r1596 r1600  
    3030//
    3131///////////////////////////////////////////////////////////////////////
     32#include "MGeomPMT.h"
    3233
    3334#include "MLog.h"
    3435#include "MLogManip.h"
    35 
    36 #include "MGeomPMT.h"
    3736
    3837ClassImp(MGeomPMT);
     
    4342//
    4443MGeomPMT::MGeomPMT(Int_t pmt, const char *name=NULL, const char *title=NULL)
     44    : fPMTId(pmt), fWavelength(0), fQE(0)
    4545{
    4646    fName  = name  ? name  : "MGeomPMT";
    4747    fTitle = title ? title : "Storage container for  a PMT characteristics";
     48}
     49
     50// --------------------------------------------------------------------------
     51//
     52// DESCRIPTION MISSING
     53//
     54void MGeomPMT::SetPMTContent(Int_t pmt, const TArrayF &wav, const TArrayF &qe)
     55{
     56    if (fWavelength.GetSize()!=wav.GetSize() ||
     57        fQE.GetSize()!=qe.GetSize())
     58    {
     59        *fLog << err << dbginf << " fWavelength or fQE do not have ";
     60        *fLog << "size of setting arrays" << endl;
     61        return;
     62    }
    4863
    4964    fPMTId = pmt;
    50     fWavelength->Set(0);
    51     fQE->Set(0);
    5265
    53 }
    54 
    55 void MGeomPMT::SetPMTContent(Int_t pmt, TArrayF *wav, TArrayF *qe)
    56 {
    57     fPMTId = pmt;
    58 
    59   if(fWavelength->GetSize()==wav->GetSize() &&
    60      fQE->GetSize()==qe->GetSize()){
    61     wav->Copy(*fWavelength);
    62     qe->Copy(*fQE);
    63   }
    64   else
    65      *fLog<<err << "MGeomPMT::SetPMTContent fWavelength "
    66           <<"and fQE do not have "
    67           <<"size of setting arrays"<<endl;
    68 
     66    fWavelength = wav;
     67    fQE = qe;
    6968}
    7069
  • trunk/MagicSoft/Mars/mgeom/MGeomPMT.h

    r1596 r1600  
    1212{
    1313private:
     14    Int_t   fPMTId;        // the PMT Id
    1415
    15     Int_t   fPMTId;       // the PMT Id
    16 
    17     TArrayF *fWavelength;  // List of wavelength
    18     TArrayF *fQE;          // QE values
     16    TArrayF fWavelength;  // List of wavelength
     17    TArrayF fQE;          // QE values
    1918
    2019public:
     
    2423    Int_t   GetPMTId() const         { return fPMTId;   }
    2524
    26     void    SetArrays(Int_t dim) {fWavelength->Set(dim);fQE->Set(dim);}
     25    void    SetArraySize(Int_t dim) { fWavelength.Set(dim); fQE.Set(dim); }
    2726
    28     void    SetPMTContent(Int_t pmt, TArrayF *wav, TArrayF *qe);
     27    void    SetPMTContent(Int_t pmt, const TArrayF &wav, const TArrayF &qe);
    2928
    3029    ClassDef(MGeomPMT, 1)  // class containing information about PMTs
Note: See TracChangeset for help on using the changeset viewer.