Changeset 1770 for trunk/MagicSoft
- Timestamp:
- 02/20/03 15:32:13 (22 years ago)
- Location:
- trunk/MagicSoft/Mars/manalysis
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MPadSchweizer.cc
r1768 r1770 272 272 //fSigmabar->Print(""); 273 273 274 if (SigbarOld > 0.0)275 {276 *fLog << "MPadSchweizer::Process(); Sigmabar of event to be padded is > 0 : "277 << SigbarOld << ". Stop event loop " << endl;274 //if (SigbarOld > 0.0) 275 //{ 276 //*fLog << "MPadSchweizer::Process(); Sigmabar of event to be padded is > 0 : " 277 // << SigbarOld << ". Stop event loop " << endl; 278 278 // input data should have Sigmabar = 0; stop event loop 279 return kFALSE;280 }279 // return kFALSE; 280 //} 281 281 282 282 Double_t Theta = kRad2Deg*fMcEvt->GetTelescopeTheta(); … … 307 307 << binNumber << " has no entries; Skip event " << endl; 308 308 // event cannot be padded; skip event 309 delete fHSigma; 309 310 return kCONTINUE; 310 311 } … … 328 329 if (Sigmabar <= SigbarOld) 329 330 { 331 *fLog << "MPadSchweizer::Process(); target Sigmabar is less than SigbarOld : " 332 << Sigmabar << ", " << SigbarOld << ", Skip event" << endl; 330 333 return kCONTINUE; 331 334 } … … 360 363 Double_t RMS = fHNoise->GetRMS(1); 361 364 delete fHNoise; 362 elNoise2 = TMath::Min( 2.0*RMS, Sigmabar*Sigmabar - SigbarOld*SigbarOld);365 elNoise2 = TMath::Min(RMS, Sigmabar*Sigmabar - SigbarOld*SigbarOld); 363 366 //*fLog << "elNoise2 = " << elNoise2 << endl; 364 367 … … 375 378 // - and for which the no.of photons is != 0.0 376 379 // 377 Double_t Sig = 0.0;378 Double_t Sigma2 = 0.0;379 Double_t Diff = 0.0;380 Double_t addSig2 = 0.0;381 Double_t elNoise2Pix = 0.0;380 Double_t Sig; 381 Double_t Sigma2; 382 Double_t Diff; 383 Double_t addSig2; 384 Double_t elNoise2Pix; 382 385 383 386 … … 504 507 // and its RMS (sigmaNSB) 505 508 Double_t NSB0 = fRnd->Poisson(lambdabar*Area); 506 Double_t sigmaNSB0 = sqrt( NSB0*(F2excess-1.0) + elNoise2Pix ); 509 Double_t arg = NSB0*(F2excess-1.0) + elNoise2Pix; 510 Double_t sigmaNSB0; 511 512 if (arg >= 0.0) 513 { 514 sigmaNSB0 = sqrt( arg ); 515 } 516 else 517 { 518 *fLog << "MPadSchweizer::Process(); argument of sqrt < 0.0 : " 519 << arg << endl; 520 sigmaNSB0 = 0.0000001; 521 } 522 507 523 508 524 //--------------------------------- … … 578 594 Bool_t MPadSchweizer::PostProcess() 579 595 { 580 TCanvas &c = *(MH::MakeDefCanvas("PadSchweizer", "", 900, 900));581 c.Divide(3, 3);596 TCanvas &c = *(MH::MakeDefCanvas("PadSchweizer", "", 900, 1200)); 597 c.Divide(3, 4); 582 598 gROOT->SetSelectedPad(NULL); 583 599 584 600 585 601 c.cd(1); 586 fHSigmaTheta->SetTitle("2D : Sigmabar, \\Theta ( before padding)");602 fHSigmaTheta->SetTitle("2D : Sigmabar, \\Theta (reference sample)"); 587 603 fHSigmaTheta->DrawClone(); 588 604 fHSigmaTheta->SetBit(kCanDelete); … … 596 612 fHSigbarTheta->SetBit(kCanDelete); 597 613 598 //c.cd(3);599 //fHSigmaPedestal->DrawClone();600 //fHSigmaPedestal->SetBit(kCanDelete);601 602 //c.cd(5);603 //fHPhotons->DrawClone();604 //fHPhotons->SetBit(kCanDelete);605 614 606 615 c.cd(7); … … 614 623 TH2D *l; 615 624 616 *fLog << "before" << endl;617 618 625 c.cd(2); 619 626 l = (TH2D*) ((TH3*)fHDiffPixTh)->Project3D("zx"); 620 621 *fLog << "after" << endl;622 627 623 628 l->SetTitle("Sigma^2-Sigmabar^2 vs. \\Theta (all pixels)"); … … 671 676 //-------------------------------------------------------------------- 672 677 678 c.cd(10); 679 fHSigmaPedestal->DrawClone(); 680 fHSigmaPedestal->SetBit(kCanDelete); 681 682 c.cd(11); 683 fHPhotons->DrawClone(); 684 fHPhotons->SetBit(kCanDelete); 685 686 //-------------------------------------------------------------------- 687 673 688 return kTRUE; 674 689 } -
trunk/MagicSoft/Mars/manalysis/MPadSchweizer.h
r1768 r1770 28 28 { 29 29 private: 30 MGeomCam*fCam;30 const MGeomCam *fCam; 31 31 MCerPhotEvt *fEvt; 32 32 MSigmabar *fSigmabar;
Note:
See TracChangeset
for help on using the changeset viewer.