Ignore:
Timestamp:
11/18/04 15:35:43 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mgeom
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.cc

    r5144 r5429  
    285285    //
    286286    *fLog << all << " Number of Pixels (" << GetTitle() << "): " << fNumPixels << endl;
     287    *fLog << " Number of Sectors: " << GetNumSectors() << "  Area-Indices: " << GetNumAreas() << endl;
     288    *fLog << " Min.Radius: " << GetMinRadius() << "  Max.Radius: " << GetMaxRadius() << endl;
    287289
    288290    fPixels.Print();
     
    296298TObject *MGeomCam::Clone(const char *newname) const
    297299{
     300    if (IsA()==MGeomCam::Class())
     301    {
     302        MGeomCam *cam = new MGeomCam(fNumPixels, fCamDist);
     303        for (UInt_t i=0; i<fNumPixels; i++)
     304            (*this)[i].Copy((*cam)[i]);
     305        cam->InitGeometry();
     306        return cam;
     307    }
     308
    298309    return (TObject*)IsA()->New();
    299310}
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.h

    r3777 r5429  
    3939    void CalcNumAreas();
    4040    void InitOuterRing();
    41     void InitGeometry()
    42     {
    43         CalcNumSectors();
    44         CalcNumAreas();
    45         CalcMaxRadius();
    46         CalcPixRatio();
    47         InitOuterRing();
    48     }
    4941
    5042
     
    5951    // the use of some camera files from the 0.7 beta version in which the
    6052    // array containing pixel ratios is not initialized.
     53    void InitGeometry()
     54    {
     55        CalcNumSectors();
     56        CalcNumAreas();
     57        CalcMaxRadius();
     58        CalcPixRatio();
     59        InitOuterRing();
     60    }
    6161
    6262    Float_t GetCameraDist() const { return fCamDist; }
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.h

    r4826 r5429  
    3333public:
    3434    MGeomPix(Float_t x=0, Float_t y=0, Float_t d=0, UInt_t s=0, UInt_t aidx=0);
     35
     36    void Copy(TObject &obj) const
     37    {
     38        MGeomPix &pix = (MGeomPix&)obj;
     39        pix.fX = fX;
     40        pix.fY = fY;
     41        pix.fD = fD;
     42        pix.fA = fA;
     43        pix.fNumNeighbors = fNumNeighbors;
     44        pix.fSector = fSector;
     45        pix.fAidx = fAidx;
     46        for (int i=0; i<6; i++)
     47            pix.fNeighbors[i] = fNeighbors[i];
     48    }
    3549
    3650    void Print(Option_t *opt=NULL) const;
Note: See TracChangeset for help on using the changeset viewer.