Changeset 9369 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 03/01/09 21:54:27 (16 years ago)
- Location:
- trunk/MagicSoft/Mars/mhist
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamEventRot.cc
r9153 r9369 226 226 if (fUseThreshold!=kNoBound) 227 227 { 228 if ( val>fThreshold && fUseThreshold==kIsLowerBound||229 val<fThreshold && fUseThreshold==kIsUpperBound)228 if ((val>fThreshold && fUseThreshold==kIsLowerBound) || 229 (val<fThreshold && fUseThreshold==kIsUpperBound)) 230 230 fHist.Fill(cx[ix], cy[iy]); 231 231 } -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r9367 r9369 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.11 8 2009-03-01 12:51:03tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.119 2009-03-01 21:48:14 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 79 79 #include "MString.h" 80 80 #include "MBinning.h" 81 #include "MHexagon.h"82 81 83 82 #include "MGeomPix.h" … … 109 108 gROOT->GetListOfCleanups()->Add(fNotify); 110 109 110 /* 111 111 TVirtualPad *save = gPad; 112 112 gPad = 0; 113 /*114 113 #if ROOT_VERSION_CODE < ROOT_VERSION(3,01,06) 115 114 SetPalette(1, 0); … … 123 122 SetInvDeepBlueSeaPalette(); 124 123 #endif 124 gPad = save; 125 125 */ 126 gPad = save;127 126 } 128 127 … … 218 217 Bool_t MHCamera::MatchSector(Int_t idx, const TArrayI §or, const TArrayI &aidx) const 219 218 { 220 const MGeom Pix&pix = (*fGeomCam)[idx];219 const MGeom &pix = (*fGeomCam)[idx]; 221 220 return FindVal(sector, pix.GetSector()) && FindVal(aidx, pix.GetAidx()); 222 221 } … … 980 979 gPad->GetX2()> maxr || gPad->GetY2()>maxr ? 1 : fGeomCam->GetConvMm2Deg(); 981 980 982 MHexagon hex; 981 TAttLine line; 982 TAttFill fill; 983 line.SetLineStyle(kSolid); 984 line.SetLineColor(kBlack); 983 985 for (Int_t i=0; i<fNcells-2; i++) 984 986 { 985 hex.SetFillStyle(issame || (IsTransparent() && !IsUsed(i)) ? 0 : 1001);987 fill.SetFillStyle(issame || (IsTransparent() && !IsUsed(i)) ? 0 : 1001); 986 988 987 989 if (!issame) … … 990 992 if (!IsUsed(i) || !iscol || isnan) 991 993 { 992 hex.SetFillColor(10);994 fill.SetFillColor(10); 993 995 994 996 if (isnan) … … 996 998 } 997 999 else 998 hex.SetFillColor(GetColor(GetBinContent(i+1), min, max, islog));1000 fill.SetFillColor(GetColor(GetBinContent(i+1), min, max, islog)); 999 1001 } 1000 1002 1001 const MGeomPix &pix = (*fGeomCam)[i]; 1002 1003 Float_t x = pix.GetX()*conv/(fAbberation+1); 1004 Float_t y = pix.GetY()*conv/(fAbberation+1); 1005 Float_t d = pix.GetD()*conv; 1006 1007 if (!isbox) 1008 if (IsUsed(i) || !TestBit(kNoUnused)) 1009 hex.PaintHexagon(x, y, d); 1010 else 1011 if (IsUsed(i) && TMath::Finite(fArray[i+1])) 1012 { 1013 Float_t size = d*(GetBinContent(i+1)-min)/(max-min); 1014 if (size>d) 1015 size=d; 1016 hex.PaintHexagon(x, y, size); 1017 } 1003 const MGeom &pix = (*fGeomCam)[i]; 1004 1005 Double_t scale = 1;//conv/(fAbberation+1); 1006 1007 if (!isbox && !IsUsed(i) && TestBit(kNoUnused)) 1008 continue; 1009 1010 if (isbox && (!IsUsed(i) || !TMath::Finite(fArray[i+1]))) 1011 continue; 1012 1013 if (isbox) 1014 { 1015 scale = (GetBinContent(i+1)-min)/(max-min); 1016 if (scale>1) 1017 scale=1; 1018 } 1019 1020 pix.PaintPrimitive(line, fill, conv, scale/(fAbberation+1)); 1018 1021 } 1019 1022 } … … 1319 1322 for (Int_t i=0; i<fNcells-2; i++) 1320 1323 { 1321 const MGeom Pix&h = (*fGeomCam)[i];1324 const MGeom &h = (*fGeomCam)[i]; 1322 1325 1323 1326 TString num; … … 1335 1338 //(GetColor(GetBinContent(i+1), min, max, 0)); 1336 1339 txt.SetTextColor(kRed); 1337 txt.SetTextSize(0.3*h.Get D()/fGeomCam->GetMaxRadius()/1.05);1340 txt.SetTextSize(0.3*h.GetT()/fGeomCam->GetMaxRadius()/1.05); 1338 1341 txt.PaintText(h.GetX(), h.GetY(), num); 1339 1342 } … … 2024 2027 return -1; 2025 2028 2026 Int_t i; 2027 for (i=0; i<fNcells-2; i++) 2028 { 2029 MHexagon hex((*fGeomCam)[i]); 2030 if (hex.DistancetoPrimitive(px, py, conv)>0) 2031 continue; 2032 2033 return i; 2034 } 2029 for (Int_t i=0; i<fNcells-2; i++) 2030 if ((*fGeomCam)[i].DistancetoPrimitive(px*conv, py*conv)<=0) 2031 return i; 2032 2035 2033 return -1; 2036 2034 }
Note:
See TracChangeset
for help on using the changeset viewer.