Changeset 717 for trunk/MagicSoft/Mars
- Timestamp:
- 04/03/01 13:28:36 (24 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r716 r717 1 1 -*-*- END -*-*- 2 3 2000/04/03: Thomas Bretz 4 5 * manalysis/MCT1ReadAscii.cc: 6 - the pedestal values read from the file are now stored in MeanRms 7 instead of Sigma 8 9 * manalysis/MCerPhotCalc.cc: 10 - The pedestal mean Rms is used as the pixel error 11 12 * MImgCleanStd.cc: 13 - CleanStep1: the '<' was replaced by a '<=' to clean also pixels 14 with value=noise=0 15 16 * MMcPedestalCopy.cc: 17 - All the pedestal values are now filled in (are they calculated correctly?) 18 19 * mgui/MGeomCamMagic.cc: 20 - Forgot to initialize the Nextneighbors of the Magic Camera 21 (thanks to Oscar) 22 23 * mhist/MHStarMap.cc: 24 - I changed the model of the display (colors and bin width) to 25 get a 'better' result 26 2 27 3 28 2000/04/02: Thomas Bretz -
trunk/MagicSoft/Mars/manalysis/MCT1ReadAscii.cc
r716 r717 156 156 157 157 if (val > 0.0) 158 (*fPedest)[i].Set Sigma(val);158 (*fPedest)[i].SetMeanRms(val); 159 159 } 160 160 } … … 188 188 189 189 if (nphot > 0.0) 190 fNphot->AddPixel(i, nphot, (*fPedest)[i].Get Sigma());190 fNphot->AddPixel(i, nphot, (*fPedest)[i].GetMeanRms()); 191 191 } 192 192 -
trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc
r698 r717 65 65 66 66 const Float_t nphot = (Float_t)pixel.GetSumHiGainFadcSamples() - ped.GetMean(); 67 fCerPhotEvt->AddPixel(pixid, nphot, 0); 67 68 fCerPhotEvt->AddPixel(pixid, nphot, ped.GetMeanRms()); 68 69 69 70 // FIXME! Handling of Lo Gains is missing! -
trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc
r716 r717 18 18 // the default constructor 19 19 // 20 21 20 *fName = name ? name : "MImgCleanStd"; 22 21 *fTitle = title ? title : "Task which does a standard image cleaning"; 22 23 *fLog << "Cleaning initialized. Using noise level " << lvl1 << " and " << lvl2 << endl; 23 24 } 24 25 … … 44 45 const Float_t noise = pix.GetErrorPhot(); 45 46 46 if (entry < fCleanLvl1 * noise ) 47 // COBB: '<=' to skip entry=noise=0 48 if (entry <= fCleanLvl1 * noise ) 47 49 pix.SetPixelUnused(); 48 50 } … … 113 115 pix.SetCorePixel(); 114 116 } 115 116 117 } 117 118 … … 124 125 // 125 126 const Int_t entries = fEvt->GetNumPixels(); 126 127 127 for (Int_t i=0; i<entries; i++) 128 128 { … … 174 174 } 175 175 } 176 176 177 } 177 178 -
trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc
r698 r717 41 41 Bool_t MMcPedestalCopy::Process() 42 42 { 43 fPedestals->InitSize(fMcPedestals->GetNumPixel());43 const int num = fMcPedestals->GetNumPixel(); 44 44 45 for (int i=0; i<MFADC_CHANNELS; i++) 45 fPedestals->InitSize(num); 46 47 for (int i=0; i<num; i++) 46 48 { 47 49 MPedestalPix &pix = (*fPedestals)[i]; 48 50 49 pix.SetPedestal(fMcPedestals->GetPedestal(i), 0); 50 pix.SetPedestalRms(fMcPedestals->GetPedestalRms(i), 0); 51 const Float_t pedest = fMcPedestals->GetPedestal(i); 52 const Float_t pedrms = fMcPedestals->GetPedestalRms(i); 53 54 const Float_t sigma = pedest*sqrt(num); 55 const Float_t sigrms = sigma/sqrt(2*num); 56 57 pix.SetPedestal(pedest, sigma); 58 pix.SetPedestalRms(pedrms, sigrms); 59 60 *fLog << pedest << " " << sigma << " " << pedrms << " " << sigrms << endl; 51 61 } 52 62 -
trunk/MagicSoft/Mars/mgui/MGeomCamMagic.cc
r715 r717 10 10 { 11 11 CreateCam(); 12 CreateNN(); 12 13 } 13 14 … … 263 264 264 265 for (UInt_t i=0; i<GetNumPixels(); i++) 265 {266 266 (*this)[i].Set(xtemp[i], ytemp[i], rtemp[i]) ; 267 //fPixels->Add( new MGeomPix() ;268 }269 267 } 270 268 -
trunk/MagicSoft/Mars/mhist/MHStarMap.cc
r712 r717 11 11 #include "MHStarMap.h" 12 12 13 #include <TH2.h> 14 #include <TStyle.h> 15 #include <TCanvas.h> 13 #include <TH2.h> // TH2F 14 #include <TStyle.h> // gStyle 15 #include <TColor.h> // SetRGB 16 #include <TCanvas.h> // TCanvas 16 17 17 18 #include "MHillas.h" … … 39 40 // 40 41 fStarMap = new TH2F("Star Map", "Counts", 41 50, -300, 300,42 50, -300, 300);42 150, -300, 300, 43 150, -300, 300); 43 44 } 44 45 … … 50 51 void MHStarMap::Draw(Option_t *) 51 52 { 53 // 54 // Creates a new canvas, creates a useful palette and 55 // draws the histogram in the new created canvas 56 // 57 52 58 TCanvas *c = new TCanvas("Star Map", "Star Map created from Hillas Parameters", 500, 500); 53 59 54 gStyle->SetPalette(1, 0); 60 // 61 // Set the palette you wanna use: 62 // - you could set the root "Pretty Palette Violet->Red" by 63 // gStyle->SetPalette(1, 0), but in some cases this may look 64 // confusing 65 // - The maximum colors root allowes us to set by ourself 66 // is 50 (idx: 51-100). This colors are set to a grayscaled 67 // palette 68 // - the number of contours must be two less than the number 69 // of palette entries 70 // 71 72 const Int_t numg = 32; // number of gray scaled colors 73 const Int_t numw = 32; // number of white 74 75 Int_t palette[numg+numw]; 76 77 // 78 // The first half of the colors are white. 79 // This is some kind of optical background supression 80 // 81 gROOT->GetColor(51)->SetRGB(1, 1, 1); 82 83 Int_t i; 84 for (i=0; i<numw; i++) 85 palette[i] = 51; 86 87 // 88 // now the (gray) scaled part is coming 89 // 90 for (;i<numw+numg; i++) 91 { 92 const Float_t gray = 1.0-(float)(i-numw)/(numg-1.0); 93 94 gROOT->GetColor(52+i)->SetRGB(gray, gray, gray); 95 palette[i] = 52+i; 96 } 97 98 // 99 // Set the palette and the number of contour levels 100 // 101 gStyle->SetPalette(numg+numw, palette); 102 fStarMap->SetContour(numg+numw-2); 103 104 // gStyle->SetPalette(1, 0); 55 105 fStarMap->Draw("colz"); 56 106 … … 68 118 const float t = dist*(sin(theta)-cos(theta)*m); 69 119 70 float y0 = -m*300+t;71 for (int i=-297; i<300; i+=3)72 {73 const float y1 = m*i+t;120 if (m>-1 && m<1) 121 for (int x=-298; x<298; x+=4) 122 { 123 const float y = m*x+t; 74 124 75 // if (y1<=y0-3 || y1>=y0+3) 76 // continue; 125 fStarMap->Fill(x, y); 126 } 127 else 128 for (int y=-298; y<298; y+=4) 129 { 130 const float x = (y-t)/m; 77 131 78 fStarMap->Fill(i, y1); 79 y0 = y1; 80 } 132 fStarMap->Fill(x, y); 133 } 81 134 } 82 135
Note:
See TracChangeset
for help on using the changeset viewer.