Changeset 2236 for trunk/MagicSoft/Mars/mgeom
- Timestamp:
- 06/26/03 16:21:57 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/mgeom
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mgeom/MGeomCam.cc
r2234 r2236 97 97 // -------------------------------------------------------------------------- 98 98 // 99 // Calculate the highest sector index+1 of all pixels, please make sure 100 // the the sector numbers are continous. 101 // 102 void MGeomCam::CalcNumSectors() 103 { 104 fNumSectors = 0; 105 106 for (UInt_t i=0; i<fNumPixels; i++) 107 { 108 const MGeomPix &pix = (*this)[i]; 109 const UInt_t s = pix.GetSector(); 110 111 if (s>fNumSectors) 112 fNumSectors = s; 113 } 114 115 fNumSectors++; 116 } 117 118 // -------------------------------------------------------------------------- 119 // 99 120 // Calculate the maximum radius of the camera. This is ment for GUI layout. 100 121 // -
trunk/MagicSoft/Mars/mgeom/MGeomCam.h
r2209 r2236 22 22 TObjArray fPixels; // Array of singel pixels storing the geometry 23 23 24 UInt_t fNumSectors; // Number of sectors 25 24 26 protected: 25 27 void CalcMaxRadius(); 28 void CalcNumSectors(); 26 29 void InitOuterRing(); 27 30 … … 32 35 virtual TObject *Clone(const char *newname=NULL) const; 33 36 34 Float_t GetCameraDist() const 35 Float_t GetConvMm2Deg() const 37 Float_t GetCameraDist() const { return fCamDist; } 38 Float_t GetConvMm2Deg() const { return fConvMm2Deg; } 36 39 37 UInt_t GetNumPixels() const { return fNumPixels; } 38 Float_t GetMaxRadius() const { return fMaxRadius; } 40 UInt_t GetNumPixels() const { return fNumPixels; } 41 Float_t GetMaxRadius() const { return fMaxRadius; } 42 UInt_t GetNumSectors() const { return fNumSectors; } 39 43 Float_t GetPixRatio(UInt_t i) const; 40 44 -
trunk/MagicSoft/Mars/mgeom/MGeomCamCT1.cc
r2037 r2236 56 56 CreateCam(); 57 57 CreateNN(); 58 CalcNumSectors(); 58 59 CalcMaxRadius(); 59 60 } -
trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000.cc
r2195 r2236 52 52 CreateCam(); 53 53 CreateNN(); 54 CalcNumSectors(); 54 55 CalcMaxRadius(); 55 56 } -
trunk/MagicSoft/Mars/mgeom/MGeomCamECO1000HG.cc
r2195 r2236 56 56 CreateCam(); 57 57 CreateNN(); 58 CalcNumSectors(); 58 59 CalcMaxRadius(); 59 60 } -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc
r2135 r2236 53 53 CreateCam(); 54 54 CreateNN(); 55 CalcNumSectors(); 55 56 CalcMaxRadius(); 56 57 } … … 221 222 -034.641 // 576 222 223 }; 223 224 /* 224 225 const Float_t dtemp[577] = { 225 226 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, 30.00, // 0 … … 296 297 60.00, 60.00, 60.00, 60.00, 60.00, 60.00, 60.00, 60.00, // 568 297 298 60.00 }; // 576 299 */ 300 const Byte_t sector[577] = { 301 0, 1, 2, 3, 4, 5, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 302 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 1, 303 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 304 6, 6, 6, 6, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 305 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 1, 1, 1, 1, 306 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 307 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 308 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 309 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 1, 1, 310 1, 1, 1, 1, 1, 1, 2,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 5, 5, 5, 5, 5, 328 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 329 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 330 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 331 6, 6, 6, 6, 6, 6, 6 }; 298 332 299 333 // 300 334 // fill the pixels list with this data 301 335 // 302 303 336 for (UInt_t i=0; i<GetNumPixels(); i++) 304 (*this)[i].Set(xtemp[i], ytemp[i], dtemp[i]);337 (*this)[i].Set(xtemp[i], ytemp[i], i>396?60:30, sector[i]); 305 338 } 306 339 -
trunk/MagicSoft/Mars/mgeom/MGeomCamMagicHG.cc
r2187 r2236 53 53 CreateCam(); 54 54 CreateNN(); 55 CalcNumSectors(); 55 56 CalcMaxRadius(); 56 57 } … … 983 984 984 985 for (UInt_t i=0; i<GetNumPixels(); i++) 985 (*this)[i].Set(xtemp[i], ytemp[i], dtemp[i]) 986 (*this)[i].Set(xtemp[i], ytemp[i], dtemp[i]); 986 987 } 987 988 -
trunk/MagicSoft/Mars/mgeom/MGeomPix.cc
r2178 r2236 56 56 // Initializes one pixel 57 57 // 58 MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r ) : fX(x), fY(y), fD(r)58 MGeomPix::MGeomPix(Float_t x, Float_t y, Float_t r, UInt_t s) : fX(x), fY(y), fD(r), fSector(s) 59 59 { 60 60 // default constructor -
trunk/MagicSoft/Mars/mgeom/MGeomPix.h
r2135 r2236 25 25 Short_t fNeighbors[6]; // the IDs of the pixel next to it (we are assuming an hexagonal geometry) 26 26 27 UInt_t fSector; // Number of sector the pixels corresponds to 28 27 29 public: 28 MGeomPix(Float_t x=0, Float_t y=0, Float_t d=0 );30 MGeomPix(Float_t x=0, Float_t y=0, Float_t d=0, UInt_t s=0); 29 31 30 32 void Print(Option_t *opt=NULL) const; 31 33 32 void Set(Float_t x, Float_t y, Float_t d ) { fX=x; fY=y; fD=d; }34 void Set(Float_t x, Float_t y, Float_t d, UInt_t s=0) { fX=x; fY=y; fD=d; fSector=s; } 33 35 34 36 void SetNeighbors(Short_t i0=-1, Short_t i1=-1, Short_t i2=-1, … … 36 38 37 39 void CheckOuterRing(const MGeomCam &cam); 38 39 void SetX(Float_t x) { fX = x; } 40 void SetY(Float_t y) { fY = y; } 41 void SetD(Float_t d) { fD = d; } 40 /* 41 void SetX(Float_t x) { fX = x; } 42 void SetY(Float_t y) { fY = y; } 43 void SetD(Float_t d) { fD = d; } 44 void SetSector(UInt_t s) { fSector = s; } 45 */ 42 46 43 47 Float_t GetX() const { return fX; } 44 48 Float_t GetY() const { return fY; } 45 49 Float_t GetD() const { return fD; } 50 UInt_t GetSector() const { return fSector; } 46 51 47 52 Float_t GetA() const;
Note:
See TracChangeset
for help on using the changeset viewer.