Changeset 6907 for trunk/MagicSoft/Mars/mimage
- Timestamp:
- 04/04/05 10:18:01 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mimage
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mimage/MHHillasExt.cc
r5142 r6907 244 244 // together with the canvas. 245 245 // 246 void MHHillasExt::Draw(Option_t * )246 void MHHillasExt::Draw(Option_t *o) 247 247 { 248 248 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 251 251 AppendPad(""); 252 252 253 pad->Divide(2, 2); 253 // FIXME: If same-option given make two independant y-axis! 254 const TString opt(o); 255 const Bool_t same = opt.Contains("same"); 256 257 if (!same) 258 pad->Divide(2,2); 259 else 260 { 261 fHM3Long.SetLineColor(kMagenta); 262 fHM3Trans.SetLineColor(kCyan); 263 264 fHAsym.SetLineColor(kBlue); 265 fHMaxDist.SetLineColor(kBlue); 266 } 254 267 255 268 pad->cd(1); 256 269 gPad->SetBorderMode(0); 257 MH::DrawSame(fHM3Long, fHM3Trans, "3^{rd} Moments" );270 MH::DrawSame(fHM3Long, fHM3Trans, "3^{rd} Moments", same); 258 271 259 272 pad->cd(3); 260 273 gPad->SetBorderMode(0); 261 fHAsym.Draw( );274 fHAsym.Draw(same?"same":""); 262 275 263 276 pad->cd(2); 264 277 gPad->SetBorderMode(0); 265 fHMaxDist.Draw( );278 fHMaxDist.Draw(same?"same":""); 266 279 267 280 delete pad->GetPad(4); -
trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc
r5142 r6907 71 71 // 72 72 fAlpha = new TH1F("Alpha", "Alpha of Ellipse", 90, -90, 90); 73 fDist = new TH1F("Dist", "Dist of Ellipse", 100, 0, 445);73 fDist = new TH1F("Dist", "Dist of Ellipse", 70, 0, 623); 74 74 fCosDA = new TH1F("CosDA", "cos(Delta,Alpha) of Ellipse", 101, -1, 1); 75 75 fDCA = new TH1F("DCA", "Distance of closest aproach", 101, -500, 500); … … 214 214 // together with the canvas. 215 215 // 216 void MHHillasSrc::Draw(Option_t * )216 void MHHillasSrc::Draw(Option_t *o) 217 217 { 218 218 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 223 223 // FIXME: Display Source position 224 224 225 pad->Divide(2, 2); 225 // FIXME: If same-option given make two independant y-axis! 226 const TString opt(o); 227 const Bool_t same = opt.Contains("same"); 228 229 if (!same) 230 pad->Divide(2,2); 231 else 232 { 233 fAlpha->SetLineColor(kGreen); 234 fDist->SetLineColor(kGreen); 235 fDCA->SetLineColor(kGreen); 236 fCosDA->SetLineColor(kGreen); 237 fDCADelta->SetLineColor(kGreen); 238 } 226 239 227 240 pad->cd(1); 228 241 gPad->SetBorderMode(0); 229 fAlpha->Draw( );242 fAlpha->Draw(same?"same":""); 230 243 231 244 pad->cd(2); 232 245 gPad->SetBorderMode(0); 233 fDist->Draw( );246 fDist->Draw(same?"same":""); 234 247 235 248 pad->cd(3); 236 249 gPad->SetBorderMode(0); 237 fDCA->Draw( );250 fDCA->Draw(same?"same":""); 238 251 239 252 pad->cd(4); … … 241 254 242 255 TVirtualPad *p = gPad; 243 p->Divide(1,2); 256 if (!same) 257 p->Divide(1,2); 244 258 p->cd(1); 245 259 gPad->SetBorderMode(0); 246 fCosDA->Draw( );260 fCosDA->Draw(same?"same":""); 247 261 248 262 p->cd(2); 249 263 gPad->SetBorderMode(0); 250 fDCADelta->Draw( );264 fDCADelta->Draw(same?"same":""); 251 265 } 252 266 -
trunk/MagicSoft/Mars/mimage/MHImagePar.cc
r6869 r6907 231 231 pad->Divide(2,2); 232 232 else 233 { 234 fHistSatHi.SetLineColor(kMagenta); 235 fHistSatLo.SetLineColor(kCyan); 236 237 fHistSizeMainIsland.SetLineColor(kMagenta); 238 fHistSizeSubIslands.SetLineColor(kCyan); 239 233 240 fHistIslands.SetLineColor(kGreen); 234 241 fHistNumSP.SetLineColor(kGreen); 242 fHistSizeSP.SetLineColor(kGreen); 243 } 244 245 pad->cd(1); 246 gPad->SetBorderMode(0); 247 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels", same); 248 fHistSatHi.SetMinimum(); // switch off to allow log-scale 249 fHistSatLo.SetMinimum(); // switch off to allow log-scale 250 fHistSatLo.SetMaximum(0.1); // dummy value to allow log-scale 251 252 pad->cd(4); 253 gPad->SetBorderMode(0); 254 MH::DrawSame(fHistSizeMainIsland, fHistSizeSubIslands, "Sizes...", same); 255 fHistSizeMainIsland.SetMinimum(); // switch off to allow log-scale 256 fHistSizeSubIslands.SetMinimum(); // switch off to allow log-scale 257 fHistSizeSubIslands.SetMaximum(0.1); // dummy value to allow log-scale 258 259 pad->cd(2); 260 gPad->SetBorderMode(0); 235 261 if (!same) 262 pad->GetPad(2)->Divide(1,2,1e-10,1e-10); 263 if (pad->GetPad(2)) 236 264 { 237 pad-> cd(1);265 pad->GetPad(2)->cd(1); 238 266 gPad->SetBorderMode(0); 239 MH::DrawSame(fHistSatHi, fHistSatLo, "Saturating Pixels"); 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); 267 fHistNumSP.Draw(same?"same":""); 268 pad->GetPad(2)->cd(2); 245 269 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 270 fHistSizeSP.Draw(same?"same":""); 250 271 } 251 252 pad->cd(2);253 gPad->SetBorderMode(0);254 pad->GetPad(2)->Divide(1,2,1e-10,1e-10);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 272 262 273 pad->cd(3); -
trunk/MagicSoft/Mars/mimage/MHNewImagePar.cc
r6869 r6907 284 284 void MHNewImagePar::Paint(Option_t *o) 285 285 { 286 if ( TString(o)==(TString)"log" && fHistLeakage1.GetMaximum()>0)287 gPad-> SetLogy();286 if (fHistLeakage1.GetMaximum()>0 && gPad->GetPad(1)) 287 gPad->GetPad(1)->SetLogy(); 288 288 } 289 289 … … 294 294 // together with the canvas. 295 295 // 296 void MHNewImagePar::Draw(Option_t * )296 void MHNewImagePar::Draw(Option_t *o) 297 297 { 298 298 TVirtualPad *pad = gPad ? gPad : MakeDefCanvas(this); … … 301 301 AppendPad(""); 302 302 303 pad->Divide(2,2); 303 // FIXME: If same-option given make two independant y-axis! 304 const TString opt(o); 305 const Bool_t same = opt.Contains("same"); 306 307 if (!same) 308 pad->Divide(2,2); 309 else 310 { 311 fHistLeakage1.SetLineColor(kMagenta); 312 fHistLeakage1.SetLineColor(kCyan); 313 314 fHistCorePix.SetLineColor(kMagenta); 315 fHistUsedPix.SetLineColor(kCyan); 316 317 fHistConc1.SetLineColor(kMagenta); 318 fHistConc.SetLineColor(kCyan); 319 320 fHistCoreArea.SetLineColor(kMagenta); 321 fHistUsedArea.SetLineColor(kCyan); 322 } 304 323 305 324 pad->cd(1); … … 307 326 TAxis &x = *fHistLeakage1.GetXaxis(); 308 327 x.SetRangeUser(0.0, x.GetXmax()); 309 MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2" );328 MH::DrawSame(fHistLeakage1, fHistLeakage2, "Leakage1 and Leakage2", same); 310 329 fHistLeakage1.SetMinimum(); 311 330 fHistLeakage2.SetMinimum(); 312 331 fHistLeakage2.SetMaximum(0.1); // dummy value to allow log-scale 313 AppendPad("log");314 332 315 333 pad->cd(2); 316 334 gPad->SetBorderMode(0); 317 MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels" );335 MH::DrawSame(fHistCorePix, fHistUsedPix, "Number of core/used Pixels", same); 318 336 319 337 pad->cd(3); 320 338 gPad->SetBorderMode(0); 321 MH::DrawSame(fHistConc1, fHistConc, "Concentrations" );339 MH::DrawSame(fHistConc1, fHistConc, "Concentrations", same); 322 340 323 341 pad->cd(4); 324 342 gPad->SetBorderMode(0); 325 MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels" );343 MH::DrawSame(fHistCoreArea, fHistUsedArea, "Area of core/used Pixels", same); 326 344 } 327 345
Note:
See TracChangeset
for help on using the changeset viewer.