Changeset 6489 for trunk/MagicSoft/Mars/mimage/MHImagePar.cc
- Timestamp:
- 02/15/05 16:18:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHImagePar.cc
r5994 r6489 66 66 fHistSatHi.SetDirectory(NULL); 67 67 fHistSatHi.UseCurrentStyle(); 68 fHistSatHi.SetLineColor(kBlue); 68 69 fHistSatHi.SetFillStyle(4000); 69 70 … … 72 73 fHistSatLo.SetXTitle("Pixels"); 73 74 fHistSatLo.SetYTitle("Counts"); 74 fHistSatLo.SetLineColor(kBlue);75 75 fHistSatLo.SetDirectory(NULL); 76 76 fHistSatLo.UseCurrentStyle(); … … 83 83 fHistIslands.SetDirectory(NULL); 84 84 fHistIslands.UseCurrentStyle(); 85 fHistIslands.SetLineColor(kBlue);85 //fHistIslands.SetLineColor(kBlue); 86 86 fHistIslands.SetFillStyle(4000); 87 87 88 fHistSizeSubIslands.SetName("SizeSub"); 89 fHistSizeSubIslands.SetTitle("Size of Sub Islands"); 90 fHistSizeSubIslands.SetXTitle("S [phe]"); 91 fHistSizeSubIslands.SetYTitle("Counts"); 92 fHistSizeSubIslands.SetDirectory(NULL); 93 fHistSizeSubIslands.UseCurrentStyle(); 94 fHistSizeSubIslands.SetLineColor(kBlue); 95 fHistSizeSubIslands.SetFillStyle(4000); 96 97 fHistSizeMainIsland.SetName("SizeMain"); 98 fHistSizeMainIsland.SetTitle("Size of Main Island"); 99 fHistSizeMainIsland.SetXTitle("S [phe]"); 100 fHistSizeMainIsland.SetYTitle("Counts"); 101 fHistSizeMainIsland.SetDirectory(NULL); 102 fHistSizeMainIsland.UseCurrentStyle(); 103 fHistSizeMainIsland.SetFillStyle(4000); 104 105 fHistNumSP.SetName("NumSP"); 106 fHistNumSP.SetTitle("Number of single core pixels"); 107 fHistNumSP.SetXTitle("N"); 108 fHistNumSP.SetYTitle("Counts"); 109 fHistNumSP.SetDirectory(NULL); 110 fHistNumSP.UseCurrentStyle(); 111 //fHistNumSP.SetLineColor(kBlue); 112 fHistNumSP.SetFillStyle(4000); 113 114 fHistSizeSP.SetName("SizeSP"); 115 fHistSizeSP.SetTitle("Size of single core pixels"); 116 fHistSizeSP.SetXTitle("S [phe]"); 117 fHistSizeSP.SetYTitle("Counts"); 118 fHistSizeSP.SetDirectory(NULL); 119 fHistSizeSP.UseCurrentStyle(); 120 //fHistSizeSP.SetLineColor(kBlue); 121 fHistSizeSP.SetFillStyle(4000); 122 123 88 124 MBinning bins; 89 125 90 126 bins.SetEdges(60, -0.5, 59.5); 127 bins.Apply(fHistSatLo); 91 128 bins.Apply(fHistSatHi); 92 bins.Apply(fHistSatHi); 129 bins.Apply(fHistNumSP); 130 131 bins.SetEdgesLog(50, 1, 1e7); 132 bins.Apply(fHistSizeSubIslands); 133 bins.Apply(fHistSizeMainIsland); 134 bins.Apply(fHistSizeSP); 93 135 94 136 bins.SetEdges(15, 0.5, 15.5); … … 103 145 Bool_t MHImagePar::SetupFill(const MParList *plist) 104 146 { 147 ApplyBinning(*plist, "Pixels", &fHistSatLo); 105 148 ApplyBinning(*plist, "Pixels", &fHistSatHi); 106 ApplyBinning(*plist, "Pixels", &fHist SatHi);149 ApplyBinning(*plist, "Pixels", &fHistNumSP); 107 150 108 151 ApplyBinning(*plist, "Islands", &fHistIslands); 152 153 ApplyBinning(*plist, "Size", &fHistSizeSubIslands); 154 ApplyBinning(*plist, "Size", &fHistSizeMainIsland); 155 ApplyBinning(*plist, "Size", &fHistSizeSP); 109 156 110 157 return kTRUE; … … 126 173 const MImagePar &h = *(MImagePar*)par; 127 174 128 fHistSatHi.Fill(h.GetNumSatPixelsHG(), w); 129 fHistSatLo.Fill(h.GetNumSatPixelsLG(), w); 130 131 fHistIslands.Fill(h.GetNumIslands(), w); 175 fHistSatHi.Fill(h.GetNumSatPixelsHG(), w); 176 fHistSatLo.Fill(h.GetNumSatPixelsLG(), w); 177 fHistNumSP.Fill(h.GetNumSinglePixels(), w); 178 fHistSizeSP.Fill(h.GetSizeSinglePixels(), w); 179 fHistSizeSubIslands.Fill(h.GetSizeSubIslands(), w); 180 fHistSizeMainIsland.Fill(h.GetSizeMainIsland(), w); 181 fHistIslands.Fill(h.GetNumIslands(), w); 132 182 133 183 return kTRUE; … … 136 186 void MHImagePar::Paint(Option_t *o) 137 187 { 138 /*139 if (TString(o)==(TString)"log1" && fHistSatHi.GetMaximum()>0)140 gPad->SetLogy();141 if (TString(o)==(TString)"log2" && fHistIslands.GetMaximum()>0)142 gPad->SetLogy();143 */144 188 if (fHistSatHi.GetMaximum()>0 && gPad->GetPad(1)) 145 189 gPad->GetPad(1)->SetLogy(); 146 if (fHistIslands.GetMaximum()>0 && gPad->GetPad(2)) 147 gPad->GetPad(2)->SetLogy(); 190 if (fHistIslands.GetMaximum()>0 && gPad->GetPad(3)) 191 gPad->GetPad(3)->SetLogy(); 192 193 TVirtualPad *pad = gPad->GetPad(2); 194 if (pad) 195 { 196 if (fHistNumSP.GetMaximum()>0 && pad->GetPad(1)) 197 pad->GetPad(1)->SetLogy(); 198 if (fHistSizeSP.GetMaximum()>0 && pad->GetPad(2)) 199 { 200 pad->GetPad(2)->SetLogx(); 201 pad->GetPad(2)->SetLogy(); 202 } 203 } 204 if (fHistSizeMainIsland.GetMaximum()>0 && gPad->GetPad(4)) 205 { 206 gPad->GetPad(4)->SetLogx(); 207 gPad->GetPad(4)->SetLogy(); 208 } 148 209 } 149 210 … … 168 229 169 230 if (!same) 170 pad->Divide( 1,2);231 pad->Divide(2,2); 171 232 else 172 233 fHistIslands.SetLineColor(kGreen); … … 177 238 gPad->SetBorderMode(0); 178 239 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 179 fHistSatHi.SetMinimum(); // switch off to allow log-scale 180 fHistSatLo.SetMinimum(); // switch off to allow log-scale 181 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 182 //AppendPad("log1"); 240 fHistSatHi.SetMinimum(); // switch off to allow log-scale 241 fHistSatLo.SetMinimum(); // switch off to allow log-scale 242 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 243 244 pad->cd(4); 245 gPad->SetBorderMode(0); 246 MH::DrawSame(fHistSizeMainIsland, fHistSizeSubIslands, "Sizes..."); 247 fHistSizeMainIsland.SetMinimum(); // switch off to allow log-scale 248 fHistSizeSubIslands.SetMinimum(); // switch off to allow log-scale 249 fHistSizeSubIslands.SetMaximum(0.1); // dummy value to allow log-scale 183 250 } 184 251 185 252 pad->cd(2); 186 253 gPad->SetBorderMode(0); 254 pad->GetPad(2)->Divide(1,2,0,0); 255 pad->GetPad(2)->cd(1); 256 gPad->SetBorderMode(0); 257 fHistNumSP.Draw(same?"same":""); 258 pad->GetPad(2)->cd(2); 259 gPad->SetBorderMode(0); 260 fHistSizeSP.Draw(same?"same":""); 261 262 pad->cd(3); 263 gPad->SetBorderMode(0); 187 264 fHistIslands.Draw(same?"same":""); 188 //AppendPad("log2");189 265 } 190 266
Note:
See TracChangeset
for help on using the changeset viewer.