Changeset 3392 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
03/04/04 09:59:10 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3390 r3392  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6 2004/03/04: Thomas Bretz
     7
     8   * mgeom/MGeomCam.[h,cc]:
     9     - added new data member fNumAreas
     10     - added new function CalcNumAreas
     11     - increased class version to 3
     12
     13   * mgeom/MGeomCamMagic.cc:
     14     - added setting of area index
     15
     16   * mgeom/MGeomPix.[h,cc]:
     17     - added fAidx data member
     18     - added getter function fAidx
     19     - increased class version to 3
     20
     21
     22
    623 2004/03/03: Thomas Bretz
    724
     
    3956     - The calculation of the arrival times is made only when needed
    4057       (when the HalfMax is over the pedestal)
     58
    4159   * mtools/MCubicSpline.cc
    4260     - Commented out an annoying warn
     61
     62
    4363
    4464 2004/03/03: Abelardo Moralejo
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.cc

    r3387 r3392  
    4545//  - added fPixRatioSqrt
    4646//
     47// Version 3:
     48// ----------
     49//  - added fNumAreas
     50//
    4751/////////////////////////////////////////////////////////////////////////////
    4852#include "MGeomCam.h"
     
    166170// --------------------------------------------------------------------------
    167171//
     172// Calculate the highest area index+1 of all pixels, please make sure
     173// the the area indices are continous.
     174//
     175void MGeomCam::CalcNumAreas()
     176{
     177    fNumAreas = 0;
     178
     179    for (UInt_t i=0; i<fNumPixels; i++)
     180    {
     181        const UInt_t s = (*this)[i].GetAidx();
     182
     183        if (s>fNumAreas)
     184            fNumAreas = s;
     185    }
     186
     187    fNumAreas++;
     188}
     189
     190// --------------------------------------------------------------------------
     191//
    168192// Calculate the maximum radius of the camera. This is ment for GUI layout.
    169193//
     
    235259    return (TObject*)IsA()->New();
    236260}
     261/*
     262void MGeomCam::Streamer(TBuffer &R__b)
     263{
     264   // Stream an object of class MGeomCam.
     265
     266    if (R__b.IsReading())
     267    {
     268        MGeomCam::Class()->ReadBuffer(R__b, this);
     269
     270        UInt_t R__s, R__c;
     271        Version_t R__v = b.ReadVersion(&R__s, &R__c);
     272        if (R__v > 2) {
     273            MGeomCam::Class()->ReadBuffer(b, this, R__v, R__s, R__c);
     274
     275        Version_t v = MGeomCam::Class()->GetClassVersion();
     276   }
     277   else
     278   {
     279       MGeomCam::Class()->WriteBuffer(R__b, this);
     280   }
     281}
     282*/
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.h

    r3064 r3392  
    2929
    3030    UInt_t    fNumSectors;   // Number of sectors
     31    UInt_t    fNumAreas;     // Number of different pixel sizes
    3132
    3233protected:
    3334    void CalcMaxRadius();
    3435    void CalcNumSectors();
     36    void CalcNumAreas();
    3537    void InitOuterRing();
    3638    void InitGeometry()
    3739    {
    3840        CalcNumSectors();
     41        CalcNumAreas();
    3942        CalcMaxRadius();
    4043        CalcPixRatio();
     
    6063    Float_t GetMaxRadius() const  { return fMaxRadius; }
    6164    UInt_t  GetNumSectors() const { return fNumSectors; }
     65    UInt_t  GetNumAreas() const   { return fNumAreas; }
    6266    Float_t GetPixRatio(UInt_t i) const;
    6367    Float_t GetPixRatioSqrt(UInt_t i) const;
     
    6872    virtual void Print(Option_t *opt=NULL) const;
    6973
    70     ClassDef(MGeomCam, 2)  // Geometry base class for the camera
     74    ClassDef(MGeomCam, 3)  // Geometry base class for the camera
    7175};
    7276
  • trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc

    r2521 r3392  
    329329    //
    330330    for (UInt_t i=0; i<GetNumPixels(); i++)
    331         (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, sector[i]);
     331        (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, sector[i], i>396?1:0);
     332    // (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, i>396?sector[i]+6:sector[i]);
    332333}
    333334
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.cc

    r2470 r3392  
    4444//  - added fA
    4545//
     46// Version 3:
     47// ----------
     48//  - added fAidx
     49//
    4650//
    4751// FIXME: According to an agreement we have to change the name 'Id' to 'idx'
     
    6771// Initializes one pixel
    6872//
    69 MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r, UInt_t s)
     73MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r, UInt_t s, UInt_t a)
    7074{
    7175    //  default constructor
    72     Set(x, y, r, s);
     76    Set(x, y, r, s, a);
    7377}
    7478
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.h

    r3112 r3392  
    2828
    2929    UInt_t fSector;        // Number of sector the pixels corresponds to
     30    UInt_t fAidx;          // Area index of the pixel
    3031
    3132public:
    32     MGeomPix(Float_t x=0, Float_t y=0, Float_t d=0, UInt_t s=0);
     33    MGeomPix(Float_t x=0, Float_t y=0, Float_t d=0, UInt_t s=0, UInt_t aidx=0);
    3334
    3435    void Print(Option_t *opt=NULL) const;
    3536
    36     void Set(Float_t x, Float_t y, Float_t d, UInt_t s=0) { fX=x; fY=y; fD=d; fA=d*d*gsTan60/2; fSector=s; }
     37    void Set(Float_t x, Float_t y, Float_t d, UInt_t s=0, UInt_t aidx=0) { fX=x; fY=y; fD=d; fA=d*d*gsTan60/2; fSector=s; fAidx=aidx; }
    3738
    3839    void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1,
     
    4647    UInt_t  GetSector() const { return fSector; }
    4748
    48     Float_t GetA() const { return fA; /*fD*fD*gsTan60/2;*/ }
     49    Float_t GetA() const    { return fA; /*fD*fD*gsTan60/2;*/ }
     50    Int_t   GetAidx() const { return fAidx; }
    4951
    5052    Byte_t  GetNumNeighbors() const { return fNumNeighbors; }
     
    6567     */
    6668
    67     ClassDef(MGeomPix, 1) // Geometry class describing the geometry of one pixel
     69    ClassDef(MGeomPix, 3) // Geometry class describing the geometry of one pixel
    6870};
    6971
    7072#endif
    71 
Note: See TracChangeset for help on using the changeset viewer.