- Timestamp:
- 03/15/04 19:51:13 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3511 r3514 20 20 21 21 2004/03/15: Markus Gaug 22 * mcalib/MCalibrationChargePix.[h,cc] 23 * mcalib/MCalibrationCharge Cam.[h,cc]24 * mcalib/MCalibrationChargeCalc.cc25 22 23 * mcalib/MCalibrationChargePix.[h,cc], 24 mcalib/MCalibrationChargeCam.[h,cc], 25 mcalib/MCalibrationChargeCalc.cc: 26 26 - conversion from hi- to logain now not applied until the value is 27 27 exported outside the class. This is necessary for the error … … 29 29 number of Phe, the conversion factors cancel out and do not 30 30 enlarge the errors 31 32 31 - pixels with number of phe's outside the range defined by 33 32 fPheFFactorRelErrLimit are not any more declared as: … … 38 37 no reasonable results in the calibration without bothering that 39 38 too many pixels fall out. Enjoy! 40 41 39 - In that procedure, the classes passed _internally_ from calculation 42 40 of sigmas to calculation of variances which saves all the useless 43 41 square rooting. 44 45 42 - took out pointers to MCalibraitonChargeBlindPix and 46 43 MCalibrationChargePINDiode in MCalibrationChargeCam. 44 47 45 48 46 … … 119 117 * mbase/Makefile, mbase/BaseLinkDef.h: 120 118 - added MStatusArray 119 120 * mraw/MRawEvtPixelIter.cc: 121 - GetIdxMaxLoGainSample(const Byte_t lofirst) const 122 accelerated and fixed (the first slice was compared to itself 123 and the last slice was not taken into account) 124 125 * mhits/MHCamera.[h,cc], mgui/MHexagon.[h,cc]: 126 - improved drawing MHCamera with 'same' option 121 127 122 128 -
trunk/MagicSoft/Mars/mgui/MHexagon.cc
r3230 r3514 112 112 // All calcutations are running in pixel coordinates 113 113 // 114 Int_t MHexagon::DistancetoPrimitive(Int_t px, Int_t py )114 Int_t MHexagon::DistancetoPrimitive(Int_t px, Int_t py, Float_t conv) 115 115 { 116 116 // 117 117 // compute the distance of the Point to the center of the Hexagon 118 118 // 119 const Int_t pxhex = gPad->XtoAbsPixel(fX );120 const Int_t pyhex = gPad->YtoAbsPixel(fY );119 const Int_t pxhex = gPad->XtoAbsPixel(fX*conv); 120 const Int_t pyhex = gPad->YtoAbsPixel(fY*conv); 121 121 122 122 const Double_t x = TMath::Abs(px-pxhex); … … 137 137 const Double_t dy = fD/2 * sina; 138 138 139 const Int_t pxborder = gPad->XtoAbsPixel( fX + dx);140 const Int_t pyborder = gPad->YtoAbsPixel( fY + dy);139 const Int_t pxborder = gPad->XtoAbsPixel((fX + dx)*conv); 140 const Int_t pyborder = gPad->YtoAbsPixel((fY + dy)*conv); 141 141 142 142 const Double_t bx = pxhex-pxborder; … … 149 149 // here in the first implementation is just circle inside 150 150 // 151 return distborder < disthex ? (int)( disthex-distborder+1) : 0;151 return distborder < disthex ? (int)((disthex-distborder)/conv+1) : 0; 152 152 } 153 153 -
trunk/MagicSoft/Mars/mgui/MHexagon.h
r2231 r3514 49 49 ; 50 50 51 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py); 51 Int_t DistancetoPrimitive(Int_t px, Int_t py, Float_t conv); 52 virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) 53 { 54 return DistancetoPrimitive(px, py, 1); 55 } 52 56 virtual Float_t DistanceToPrimitive(Float_t px, Float_t py); 53 57 virtual void DrawHexagon(Float_t x, Float_t y, Float_t d); -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r3513 r3514 1262 1262 return TH1D::DistancetoPrimitive(px, py); 1263 1263 1264 if (GetPixelIndex(px, py)>=0) 1264 const Bool_t issame = TString(GetDrawOption()).Contains("same", TString::kIgnoreCase); 1265 1266 const Float_t maxr = (1-fGeomCam->GetConvMm2Deg())*fGeomCam->GetMaxRadius()/2; 1267 const Float_t conv = !issame || 1268 gPad->GetX1()<-maxr || gPad->GetY1()<-maxr || 1269 gPad->GetX2()> maxr || gPad->GetY2()>maxr ? 1 : fGeomCam->GetConvMm2Deg(); 1270 1271 cout << conv << endl; 1272 1273 if (GetPixelIndex(px, py, conv)>=0) 1265 1274 return 0; 1266 1275 … … 1279 1288 // 1280 1289 // 1281 Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py ) const1290 Int_t MHCamera::GetPixelIndex(Int_t px, Int_t py, Float_t conv) const 1282 1291 { 1283 1292 if (fNcells<=1) … … 1288 1297 { 1289 1298 MHexagon hex((*fGeomCam)[i]); 1290 if (hex.DistancetoPrimitive(px, py )>0)1299 if (hex.DistancetoPrimitive(px, py, conv)>0) 1291 1300 continue; 1292 1301 -
trunk/MagicSoft/Mars/mhist/MHCamera.h
r3487 r3514 66 66 TPaveStats *GetStatisticBox(); 67 67 68 Int_t GetPixelIndex(Int_t px, Int_t py ) const;68 Int_t GetPixelIndex(Int_t px, Int_t py, Float_t conv=1) const; 69 69 70 70 void PaintAxisTitle();
Note:
See TracChangeset
for help on using the changeset viewer.