Changeset 4584 for trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C
- Timestamp:
- 08/12/04 06:58:34 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/ONOFFAnalysis.C
r3598 r4584 171 171 //----------------------------------------------- 172 172 //TString tag = "040126"; 173 TString tag = "040127";174 //TString tag = "040215";173 //TString tag = "040127"; 174 TString tag = "040215"; 175 175 176 176 //const char *offfile = "~magican/ct1test/wittek/offdata.preproc"; … … 183 183 //const char *offfile = "*.OFF"; 184 184 // 15 Feb 04 185 const char *offfile = "*.OFF"; 185 //const char *offfile = "*.OFF"; 186 const char *offfile = "174*.OFF"; 186 187 187 188 … … 191 192 //const char *onfile = "MCerPhot_output"; 192 193 //const char *onfile = "*.ON"; 193 const char *onfile = "1216*.ON";194 //const char *onfile = "1216*.ON"; 194 195 // 27 Jan 04 195 196 //const char *onfile = "12*.ON"; … … 198 199 // 15 Feb 04 199 200 //const char *onfile = "*.ON"; 200 201 202 const char *mcfile = "/data/MAGIC/mc_eth/magLQE_3/gh/0/0/G_M0_00_0_550*.root"; 201 const char *onfile = "174*.ON"; 202 203 204 //const char *mcfile = "/data/MAGIC/mc_eth/magLQE_3/gh/0/0/G_M0_00_0_550*.root"; 203 205 //const char *mcfile = "/data/MAGIC/mc_eth/magLQE_4/gh/0/0/G_M0_00_0_550*.root"; 204 206 //const char *mcfile = "/data/MAGIC/mc_eth/magLQE_5/gh/0/0/G_M0_00_0_550*.root"; 207 //const char *mcfile = "calibrated_gammas"; 208 const char *mcfile = "calibrated_data_david*"; 209 205 210 //----------------------------------------------- 206 211 … … 224 229 225 230 // 15 Feb 04, David 226 if (tag == "040215") 227 TString inPath = "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15/"; 228 231 //if (tag == "040215") 232 // TString inPath = "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15/"; 233 if (tag == "040215") 234 TString inPathON = "/.magic/magicserv01/scratch/Daniel/CalibratedData/MispointingTest/2004_02_15ForgottenData/finesam20/"; 235 TString inPathOFF = "/.magic/magicserv01/scratch/David/CalibratedData/Mkn421/2004_02_15/"; 236 TString inPathMC = "/.magic/magicserv01/scratch/David/MCData/MCApril2004/Data/gammas_highnoise/"; 229 237 230 238 // path for output from Mars 231 239 //TString outPath = "~wittek/datacrab_feb04/"; 232 240 //TString outPath = "~wittek/datacrab_01march04/"; 233 TString outPath = "~wittek/datacrab_ 19mar04/";241 TString outPath = "~wittek/datacrab_27april04/"; 234 242 235 243 //----------------------------------------------- … … 248 256 249 257 Bool_t JobA = kTRUE; 250 Bool_t GPad = kFALSE; // generate padding histograms? 251 Bool_t WPad = kFALSE; // write out padding histograms ? 252 Bool_t RPad = kFALSE; // read in padding histograms ? 253 Bool_t Wout = kTRUE; // write out root file ON1.root 254 // (or OFF1.root or MC1.root)? 258 Bool_t GPadON = kFALSE; // \ generate padding histograms 259 Bool_t GPadOFF = kFALSE; // | and write them onto disk 260 Bool_t GPadMC = kFALSE; // / 261 Bool_t Merge = kFALSE; // merge padding histograms 262 // and write them onto disk 263 Bool_t Wout = kTRUE; // read in merged padding histograms and 264 // write out root file of padded data 265 // (ON1.root, OFF1.root or MC1.root) 255 266 256 267 … … 310 321 // Job E_XX : extended version of E_XX (including flux plots) 311 322 // - select g/h separation method XX 312 // - read MC root file 313 323 // - read MC root file 324 // - calculate eff. collection area 314 325 // - optimize energy estimator 315 326 // - read ON root file … … 346 357 gLog << "Macro ONOFFAnalysis : Start of Job A" << endl; 347 358 gLog << "" << endl; 348 gLog << "Macro ONOFFAnalysis : JobA, WPad, RPad, Wout = " 349 << (JobA ? "kTRUE" : "kFALSE") << ", " 350 << (WPad ? "kTRUE" : "kFALSE") << ", " 351 << (RPad ? "kTRUE" : "kFALSE") << ", " 352 << (Wout ? "kTRUE" : "kFALSE") << endl; 359 gLog << "Macro ONOFFAnalysis : JobA, GPadON, GPadOFF, GPadMC, Merge, Wout = " 360 << (JobA ? "kTRUE" : "kFALSE") << ", " 361 << (GPadON ? "kTRUE" : "kFALSE") << ", " 362 << (GPadOFF ? "kTRUE" : "kFALSE") << ", " 363 << (GPadMC ? "kTRUE" : "kFALSE") << ", " 364 << (Merge ? "kTRUE" : "kFALSE") << ", " 365 << (Wout ? "kTRUE" : "kFALSE") << endl; 353 366 354 367 … … 358 371 359 372 360 TString fileON = inPath ;373 TString fileON = inPathON; 361 374 fileON += onfile; 362 375 fileON += ".root"; 363 376 364 TString fileOFF = inPath ;377 TString fileOFF = inPathOFF; 365 378 fileOFF += offfile; 366 379 fileOFF += ".root"; 367 380 368 TString fileMC = mcfile;381 TString fileMC = inPathMC; 369 382 fileMC += mcfile; 370 383 fileMC += ".root"; … … 373 386 << fileOFF << ", " << fileMC << endl; 374 387 375 // name of file to conatin the histograms for the padding388 // name of file to conatin the merged histograms for the padding 376 389 TString outNameSigTh = outPath; 377 390 outNameSigTh += "SigmaTheta"; … … 379 392 380 393 //-------------------------------------------------- 394 // name of files to contain the paddding histograms of ON, OFF and MC data 395 TString NamePadON(outPath); 396 NamePadON += "PadON"; 397 NamePadON += ".root"; 398 399 TString NamePadOFF(outPath); 400 NamePadOFF += "PadOFF"; 401 NamePadOFF += ".root"; 402 403 TString NamePadMC(outPath); 404 NamePadMC += "PadMC"; 405 NamePadMC += ".root"; 406 407 //-------------------------------------------------- 381 408 // type of data to be padded 382 TString typeInput = "ON";383 //TString typeInput = "OFF";384 //TString typeInput = "MC";409 //TString typeInput = "ON"; 410 //TString typeInput = "OFF"; 411 TString typeInput = "MC"; 385 412 gLog << "typeInput = " << typeInput << endl; 386 413 … … 416 443 // 417 444 // read ON, OFF and MC data files 418 // generate (or read in) the padding histograms for ON and OFFdata419 // and merge these histograms445 // generate (or read in) the padding histograms for ON, OFF and MC data 446 // 420 447 421 448 MPad pad; … … 423 450 pad.SetDataType(typeInput); 424 451 452 if (GPadON || GPadOFF || GPadMC) 453 { 425 454 // generate the padding histograms 426 if (GPad)427 {428 455 gLog << "=====================================================" << endl; 429 456 gLog << "Start generating the padding histograms" << endl; 457 } 458 430 459 //----------------------------------------- 431 460 // ON events 461 462 if (GPadON) 463 { 432 464 433 465 gLog << "-----------" << endl; … … 438 470 MParList pliston; 439 471 472 MObservatory observon; 473 440 474 MReadMarsFile readON("Events", fileON); 441 475 readON.DisableAutoScheme(); 442 //MCT1ReadPreProc readON(fileON); 443 444 //MFSelBasic selthetaon; 445 //selthetaon.SetCuts(-100.0, 29.5, 35.5); 446 //MContinue contthetaon(&selthetaon); 447 448 MBlindPixelCalc blindon; 449 blindon.SetUseBlindPixels(); 476 477 MGeomApply apply; 478 479 MSourcePosfromStarPos sourcefromstaron; 480 sourcefromstaron.AddFile("~wittek/datacrab_26feb04/positions040215.txt", 0); 481 482 MBlindPixelsCalc2 blindon; 483 //blindon.SetUseBlindPixels(); 484 blindon.SetCheckPedestalRms(); 450 485 451 486 MFSelBasic selbasicon; … … 459 494 460 495 MHSigmaTheta sigthON("SigmaThetaON"); 461 MFillH fillsigthetaON ("SigmaThetaON[MHSigmaTheta]", "M McEvt");496 MFillH fillsigthetaON ("SigmaThetaON[MHSigmaTheta]", "MPointingPos"); 462 497 fillsigthetaON.SetName("FillSigTheta"); 463 498 … … 467 502 pliston.AddToList(&tliston); 468 503 InitBinnings(&pliston); 504 pliston.AddToList(&observon); 469 505 pliston.AddToList(&blindON); 470 506 pliston.AddToList(&sigthON); … … 475 511 476 512 tliston.AddToList(&readON); 477 //tliston.AddToList(&contthetaon); 513 tliston.AddToList(&apply); 514 tliston.AddToList(&sourcefromstaron); 478 515 479 516 tliston.AddToList(&blindon); … … 489 526 evtloopon.SetProgressBar(&baron); 490 527 491 Int_t maxeventson = -1;492 //Int_t maxeventson = 10000;528 //Int_t maxeventson = -1; 529 Int_t maxeventson = 10000; 493 530 if ( !evtloopon.Eventloop(maxeventson) ) 494 531 return; … … 507 544 TH2D *blindnthon = blindON.GetBlindN(); 508 545 546 gLog << "" << endl; 547 gLog << "Macro ONOFFAnalysis : write padding plots for ON data from file " 548 << NamePadON << endl; 549 550 TFile filewriteon(NamePadON, "RECREATE", ""); 551 sigthon->Write(); 552 sigpixthon->Write(); 553 diffpixthon->Write(); 554 blindidthon->Write(); 555 blindnthon->Write(); 556 filewriteon.Close(); 557 558 gLog << "" << endl; 559 gLog << "Macro ONOFFAnalysis : padding plots for ON data written onto file " 560 << NamePadON << endl; 561 } 562 // end of GPadON 563 564 509 565 //----------------------------------------- 510 566 // OFF events 567 568 if (GPadOFF) 569 { 511 570 512 571 gLog << "------------" << endl; … … 517 576 MParList plistoff; 518 577 578 MObservatory observoff; 579 519 580 MReadMarsFile readOFF("Events", fileOFF); 520 581 readOFF.DisableAutoScheme(); 521 // MCT1ReadPreProc readOFF(fileOFF); 522 523 MFSelBasic selthetaoff; 524 selthetaoff.SetCuts(-100.0, 29.5, 35.5); 525 MContinue contthetaoff(&selthetaoff); 526 527 MBlindPixelCalc blindoff; 528 blindoff.SetUseBlindPixels(); 582 583 MSourcePosfromStarPos sourcefromstaroff; 584 sourcefromstaroff.AddFile("~wittek/datacrab_26feb04/positions040215.txt", 0); 585 586 MBlindPixelsCalc2 blindoff; 587 //blindoff.SetUseBlindPixels(); 588 blindoff.SetCheckPedestalRms(); 529 589 530 590 MFSelBasic selbasicoff; … … 538 598 539 599 MHSigmaTheta sigthOFF("SigmaThetaOFF"); 540 MFillH fillsigthetaOFF ("SigmaThetaOFF[MHSigmaTheta]", "M McEvt");600 MFillH fillsigthetaOFF ("SigmaThetaOFF[MHSigmaTheta]", "MPointingPos"); 541 601 fillsigthetaOFF.SetName("FillSigThetaOFF"); 542 602 … … 546 606 plistoff.AddToList(&tlistoff); 547 607 InitBinnings(&plistoff); 608 plistoff.AddToList(&observoff); 548 609 plistoff.AddToList(&blindOFF); 549 610 plistoff.AddToList(&sigthOFF); … … 554 615 555 616 tlistoff.AddToList(&readOFF); 556 //tlistoff.AddToList(&contthetaoff);617 tlistoff.AddToList(&sourcefromstaroff); 557 618 558 619 tlistoff.AddToList(&blindoff); … … 568 629 evtloopoff.SetProgressBar(&baroff); 569 630 570 Int_t maxeventsoff = -1;571 //Int_t maxeventsoff = 20000;631 //Int_t maxeventsoff = -1; 632 Int_t maxeventsoff = 10000; 572 633 if ( !evtloopoff.Eventloop(maxeventsoff) ) 573 634 return; … … 586 647 TH2D *blindnthoff = blindOFF.GetBlindN(); 587 648 649 gLog << "" << endl; 650 gLog << "Macro ONOFFAnalysis : write padding plots for OFF data from file " 651 << NamePadOFF << endl; 652 653 TFile filewriteoff(NamePadOFF, "RECREATE", ""); 654 sigthoff->Write(); 655 sigpixthoff->Write(); 656 diffpixthoff->Write(); 657 blindidthoff->Write(); 658 blindnthoff->Write(); 659 filewriteoff.Close(); 660 661 gLog << "" << endl; 662 gLog << "Macro ONOFFAnalysis : padding plots for OFF data written onto file " 663 << NamePadOFF << endl; 664 } 665 // end of GPadOFF 666 667 588 668 589 669 //----------------------------------------- 590 670 // MC events 671 672 if (GPadMC) 673 { 591 674 592 675 gLog << "------------" << endl; … … 597 680 MParList plistmc; 598 681 682 MObservatory observmc; 683 599 684 MReadMarsFile readMC("Events", fileMC); 600 685 readMC.DisableAutoScheme(); 601 // MCT1ReadPreProc readMC(fileMC); 602 603 MFSelBasic selthetamc; 604 selthetamc.SetCuts(-100.0, 29.5, 35.5); 605 MContinue contthetamc(&selthetamc); 606 607 MBlindPixelCalc blindmc; 608 blindmc.SetUseBlindPixels(); 686 687 MSourcePosfromStarPos sourcefromstarmc; 688 689 MBlindPixelsCalc2 blindmc; 690 //blindmc.SetUseBlindPixels(); 691 blindmc.SetCheckPedestalRms(); 609 692 610 693 MFSelBasic selbasicmc; … … 618 701 619 702 MHSigmaTheta sigthMC("SigmaThetaMC"); 620 MFillH fillsigthetaMC ("SigmaThetaMC[MHSigmaTheta]", "M McEvt");703 MFillH fillsigthetaMC ("SigmaThetaMC[MHSigmaTheta]", "MPointingPos"); 621 704 fillsigthetaMC.SetName("FillSigThetaMC"); 622 705 … … 626 709 plistmc.AddToList(&tlistmc); 627 710 InitBinnings(&plistmc); 711 plistmc.AddToList(&observmc); 628 712 plistmc.AddToList(&blindMC); 629 713 plistmc.AddToList(&sigthMC); … … 634 718 635 719 tlistmc.AddToList(&readMC); 636 //tlistmc.AddToList(&contthetamc);720 tlistmc.AddToList(&sourcefromstarmc); 637 721 638 722 tlistmc.AddToList(&blindmc); … … 648 732 evtloopmc.SetProgressBar(&barmc); 649 733 650 Int_t maxeventsmc = -1;651 //Int_t maxeventsmc = 20000;734 //Int_t maxeventsmc = -1; 735 Int_t maxeventsmc = 10000; 652 736 if ( !evtloopmc.Eventloop(maxeventsmc) ) 653 737 return; … … 666 750 TH2D *blindnthmc = blindMC.GetBlindN(); 667 751 752 gLog << "" << endl; 753 gLog << "Macro ONOFFAnalysis : write padding plots for MC data from file " 754 << NamePadMC << endl; 755 756 TFile filewritemc(NamePadMC, "RECREATE", ""); 757 sigthmc->Write(); 758 sigpixthmc->Write(); 759 diffpixthmc->Write(); 760 blindidthmc->Write(); 761 blindnthmc->Write(); 762 filewritemc.Close(); 763 764 gLog << "" << endl; 765 gLog << "Macro ONOFFAnalysis : padding plots for MC data written onto file " 766 << NamePadMC << endl; 767 } 768 // end of GPadMC 668 769 669 770 //----------------------------------------- 670 771 772 if (GPadON || GPadOFF || GPadMC) 773 { 774 gLog << "" << endl; 671 775 gLog << "End of generating the padding histograms" << endl; 672 776 gLog << "=====================================================" << endl; 673 674 pad.MergeONOFFMC(sigthmc, diffpixthmc, sigpixthmc,675 blindidthmc, blindnthmc,676 sigthon, diffpixthon, sigpixthon,677 blindidthon, blindnthon,678 sigthoff, diffpixthoff, sigpixthoff,679 blindidthoff, blindnthoff);680 681 682 if (WPad)683 {684 // write the padding histograms onto a file ---------685 pad.WritePaddingDist(outNameSigTh);686 }687 777 } 688 778 689 // read the padding histograms --------------------------- 690 if (RPad) 779 if (Merge) 691 780 { 692 pad.ReadPaddingDist(outNameSigTh); 781 782 //----------------------------------- 783 TH2D sigon; 784 TH3D sigpixon; 785 TH3D diffpixon; 786 TH2D blindidon; 787 TH2D blindnon; 788 789 TFile filereadon(NamePadON); 790 filereadon.ls(); 791 sigon.Read("2D-ThetaSigmabar(Inner)"); 792 sigpixon.Read("3D-ThetaPixSigma"); 793 diffpixon.Read("3D-ThetaPixDiff"); 794 blindidon.Read("2D-IdBlindPixels"); 795 blindnon.Read("2D-NBlindPixels"); 796 797 TH2D *sigthon = new TH2D( (const TH2D&)sigon ); 798 TH3D *sigpixthon = new TH3D( (const TH3D&)sigpixon ); 799 TH3D *diffpixthon = new TH3D( (const TH3D&)diffpixon ); 800 TH2D *blindidthon = new TH2D( (const TH2D&)blindidon ); 801 TH2D *blindnthon = new TH2D( (const TH2D&)blindnon ); 802 803 /* 804 TH2D *sigthon = (TH2D*)sigon.Clone(); 805 TH3D *sigpixthon = (TH3D*)sigpixon.Clone(); 806 TH3D *diffpixthon = (TH3D*)diffpixon.Clone(); 807 TH2D *blindidthon = (TH2D*)blindidon.Clone(); 808 TH2D *blindnthon = (TH2D*)blindnon.Clone(); 809 */ 810 811 //filereadon.Close(); 812 gLog << "" << endl; 813 gLog << "Macro ONOFFAnalysis : padding plots for ON data read from file " 814 << NamePadON << endl; 815 816 817 //----------------------------------- 818 TH2D sigoff; 819 TH3D sigpixoff; 820 TH3D diffpixoff; 821 TH2D blindidoff; 822 TH2D blindnoff; 823 824 TFile filereadoff(NamePadOFF); 825 filereadoff.ls(); 826 sigoff.Read("2D-ThetaSigmabar(Inner)"); 827 sigpixoff.Read("3D-ThetaPixSigma"); 828 diffpixoff.Read("3D-ThetaPixDiff"); 829 blindidoff.Read("2D-IdBlindPixels"); 830 blindnoff.Read("2D-NBlindPixels"); 831 832 TH2D *sigthoff = new TH2D( (const TH2D&)sigoff ); 833 TH3D *sigpixthoff = new TH3D( (const TH3D&)sigpixoff ); 834 TH3D *diffpixthoff = new TH3D( (const TH3D&)diffpixoff ); 835 TH2D *blindidthoff = new TH2D( (const TH2D&)blindidoff ); 836 TH2D *blindnthoff = new TH2D( (const TH2D&)blindnoff ); 837 838 /* 839 TH2D *sigthoff = (TH2D*)sigoff.Clone(); 840 TH3D *sigpixthoff = (TH3D*)sigpixoff.Clone(); 841 TH3D *diffpixthoff = (TH3D*)diffpixoff.Clone(); 842 TH2D *blindidthoff = (TH2D*)blindidoff.Clone(); 843 TH2D *blindnthoff = (TH2D*)blindnoff.Clone(); 844 */ 845 846 //filereadoff.Close(); 847 gLog << "" << endl; 848 gLog << "Macro ONOFFAnalysis : padding plots for OFF data read from file " 849 << NamePadOFF << endl; 850 851 852 //----------------------------------- 853 TH2D sigmc; 854 TH3D sigpixmc; 855 TH3D diffpixmc; 856 TH2D blindidmc; 857 TH2D blindnmc; 858 859 TFile filereadmc(NamePadMC); 860 filereadmc.ls(); 861 sigmc.Read("2D-ThetaSigmabar(Inner)"); 862 sigpixmc.Read("3D-ThetaPixSigma"); 863 diffpixmc.Read("3D-ThetaPixDiff"); 864 blindidmc.Read("2D-IdBlindPixels"); 865 blindnmc.Read("2D-NBlindPixels"); 866 867 TH2D *sigthmc = new TH2D( (const TH2D&)sigmc ); 868 TH3D *sigpixthmc = new TH3D( (const TH3D&)sigpixmc ); 869 TH3D *diffpixthmc = new TH3D( (const TH3D&)diffpixmc ); 870 TH2D *blindidthmc = new TH2D( (const TH2D&)blindidmc ); 871 TH2D *blindnthmc = new TH2D( (const TH2D&)blindnmc ); 872 873 /* 874 TH2D *sigthmc = (TH2D*)sigmc.Clone(); 875 TH3D *sigpixthmc = (TH3D*)sigpixmc.Clone(); 876 TH3D *diffpixthmc = (TH3D*)diffpixmc.Clone(); 877 TH2D *blindidthmc = (TH2D*)blindidmc.Clone(); 878 TH2D *blindnthmc = (TH2D*)blindnmc.Clone(); 879 */ 880 881 //filereadmc.Close(); 882 gLog << "" << endl; 883 gLog << "Macro ONOFFAnalysis : padding plots for MC data read from file " 884 << NamePadMC << endl; 885 886 pad.MergeONOFFMC(*sigthmc, *diffpixthmc, *sigpixthmc, 887 *blindidthmc, *blindnthmc, 888 *sigthon, *diffpixthon, *sigpixthon, 889 *blindidthon, *blindnthon, 890 *sigthoff, *diffpixthoff,*sigpixthoff, 891 *blindidthoff,*blindnthoff); 892 893 // write the target padding histograms onto a file --------- 894 pad.WritePaddingDist(outNameSigTh); 693 895 } 896 // end of Merge 897 694 898 695 899 … … 698 902 if (Wout) 699 903 { 904 // read the target padding histograms --------------------------- 905 pad.ReadPaddingDist(outNameSigTh); 906 907 700 908 gLog << "=====================================================" << endl; 701 909 gLog << "Start the padding" << endl; … … 723 931 MGeomApply apply; 724 932 725 //MPedestalWorkaround waround;726 727 933 // a way to find out whether one is dealing with MC : 728 MFDataMember f1("MRawRunHeader.fRunType", '>', 255.5); // MC 729 f1.SetName("Select MC"); 730 MFDataMember f2("MRawRunHeader.fRunType", '<', 255.5); // data 731 f2.SetName("Select Data"); 732 733 //if (typeInput == "ON") 734 //{ 735 // MCT1PointingCorrCalc pointcorr(sourceName, "MCT1PointingCorrCalc", 736 // "MCT1PointingCorrCalc"); 737 //} 934 //MFDataMember f1("MRawRunHeader.fRunType", '>', 255.5); // MC 935 //f1.SetName("Select MC"); 936 //MFDataMember f2("MRawRunHeader.fRunType", '<', 255.5); // data 937 //f2.SetName("Select Data"); 938 738 939 MSourcePosfromStarPos sourcefromstar; 739 940 if (typeInput == "ON") 740 941 { 741 sourcefromstar.SetSourceAndStarPosition(742 "Crab", 22, 0, 52, 5, 34, 32.0,743 "Zeta-Tau", 21, 8, 33, 5, 37, 38.7);744 sourcefromstar.AddStar("Tau114", 21, 56, 13, 5, 27, 38.1);745 // sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsOn.4.txt",0);746 747 if(inPath == "/.magic/magicserv01/scratch/calibrated/")748 {749 sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions2stars.txt", 0);750 // sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsNoStar.txt", 0);751 }752 else if(inPath == "/.magic/magicserv01/scratch/calibrated26/")753 sourcefromstar.AddFile("~wittek/datacrab_26feb04/stars_2004_01_26", 0);754 755 else if(inPath == "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15/")756 942 //sourcefromstar.SetSourceAndStarPosition( 943 // "Crab", 22, 0, 52, 5, 34, 32.0, 944 // "Zeta-Tau", 21, 8, 33, 5, 37, 38.7); 945 //sourcefromstar.AddStar("Tau114", 21, 56, 13, 5, 27, 38.1); 946 ////sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsOn.4.txt",0); 947 948 //if(inPath == "/.magic/magicserv01/scratch/calibrated/") 949 //{ 950 //sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions2stars.txt", 0); 951 ////sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsNoStar.txt", 0); 952 //} 953 //else if(inPath == "/.magic/magicserv01/scratch/calibrated26/") 954 // sourcefromstar.AddFile("~wittek/datacrab_26feb04/stars_2004_01_26", 0); 955 956 //else if(inPath == "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15/") 957 sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions040215.txt", 0); 757 958 } 758 959 else if (typeInput == "OFF") 759 960 { 760 if(inPath == "/.magic/magicserv01/scratch/calibrated/")761 sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsOff.txt", 0);762 else if(inPath == "/.magic/magicserv01/scratch/calibrated26/")763 sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions_2004_01_26", 0);764 else if(inPath == "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15")765 961 //if(inPath == "/.magic/magicserv01/scratch/calibrated/") 962 // sourcefromstar.AddFile("~wittek/datacrab_26feb04/positionsOff.txt", 0); 963 //else if(inPath == "/.magic/magicserv01/scratch/calibrated26/") 964 // sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions_2004_01_26", 0); 965 //else if(inPath == "/mnt/magicserv01/scratch/David/CalibratedData/Crab/2004_02_15") 966 sourcefromstar.AddFile("~wittek/datacrab_26feb04/positions040215.txt", 0); 766 967 } 767 768 769 //MBlindPixelCalc blindbeforepad; 968 else if (typeInput == "MC") 969 { 970 } 971 972 MBlindPixelsCalc2 blindbeforepad; 770 973 //blindbeforepad.SetUseBlindPixels(); 771 //blindbeforepad.SetName("BlindBeforePadding"); 772 773 //MBlindPixelCalc blind; 774 //blind.SetUseBlindPixels(); 775 //blind.SetUseInterpolation(); 776 //blind.SetName("BlindAfterPadding"); 777 778 MSigmabarCalc sigbar; 974 blindbeforepad.SetCheckPedestalRms(); 975 blindbeforepad.SetName("BlindBeforePadding"); 779 976 780 977 //MBadPixelCalcRms blind; … … 794 991 MSigmabarCalc sigbarcalc; 795 992 796 MFillH fillsigtheta ("SigmaTheta[MHSigmaTheta]", "M McEvt");993 MFillH fillsigtheta ("SigmaTheta[MHSigmaTheta]", "MPointingPos"); 797 994 fillsigtheta.SetName("HSigmaTheta"); 798 995 … … 845 1042 //write.AddContainer("MMcRunHeader", "RunHeaders", kFALSE); 846 1043 //write.AddContainer("MTime", "Events"); 847 write.AddContainer("MMcEvt", "Events"); 848 //write.AddContainer("ThetaOrig", "Events"); 1044 write.AddContainer("MPointingPos", "Events"); 849 1045 write.AddContainer("MSrcPosCam", "Events"); 850 1046 write.AddContainer("MSigmabar", "Events"); … … 868 1064 869 1065 tliston.AddToList(&read); 870 871 1066 //tliston.AddToList(&f1); 872 1067 //tliston.AddToList(&f2); 873 1068 tliston.AddToList(&apply); 874 //tliston.AddToList(&waround);875 1069 tliston.AddToList(&sourcefromstar); 876 1070 877 //tliston.AddToList(&blindbeforepad); 878 // tliston.AddToList(&pad); 879 // if (typeInput == "ON") 880 // tliston.AddToList(&pointcorr); 881 882 tliston.AddToList(&sigbar); 1071 tliston.AddToList(&blindbeforepad); 1072 1073 tliston.AddToList(&contbasic); 1074 tliston.AddToList(&pad); 1075 883 1076 tliston.AddToList(&blind); 884 tliston.AddToList(&contbasic);885 886 1077 tliston.AddToList(&fillblind); 887 //tliston.AddToList(&sigbarcalc);1078 tliston.AddToList(&sigbarcalc); 888 1079 tliston.AddToList(&fillsigtheta); 889 1080 tliston.AddToList(&clean); … … 913 1104 // evtloop.Write(); 914 1105 915 Int_t maxevents = -1;916 //Int_t maxevents = 1000;1106 //Int_t maxevents = -1; 1107 Int_t maxevents = 2000; 917 1108 if ( !evtloop.Eventloop(maxevents) ) 918 1109 return; … … 1109 1300 matrixg.EnableGraphicalOutput(); 1110 1301 1111 matrixg.AddColumn("cos( MMcEvt.fTelescopeTheta)");1302 matrixg.AddColumn("cos((MPointingPos.fZd)/kRad2Deg)"); 1112 1303 matrixg.AddColumn("MSigmabar.fSigmabar"); 1113 1304 matrixg.AddColumn("log10(MHillas.fSize)"); … … 1198 1389 bing.SetEdges(10, 0., 1.0); 1199 1390 1200 MH3 gref("cos( MMcEvt.fTelescopeTheta)");1391 MH3 gref("cos((MPointingPos.fZd)/kRad2Deg)"); 1201 1392 gref.SetName(mgname); 1202 1393 MH::SetBinning(&gref.GetHist(), &bing); … … 1231 1422 writetraing.AddContainer("MRawRunHeader", "RunHeaders"); 1232 1423 writetraing.AddContainer("MTime", "Events"); 1233 writetraing.AddContainer("M McEvt","Events");1424 writetraing.AddContainer("MPointingPos", "Events"); 1234 1425 writetraing.AddContainer("ThetaOrig", "Events"); 1235 1426 writetraing.AddContainer("MSrcPosCam", "Events"); … … 1248 1439 writetestg.AddContainer("MRawRunHeader", "RunHeaders"); 1249 1440 writetestg.AddContainer("MTime", "Events"); 1250 writetestg.AddContainer("M McEvt","Events");1441 writetestg.AddContainer("MPointingPos", "Events"); 1251 1442 writetestg.AddContainer("ThetaOrig", "Events"); 1252 1443 writetestg.AddContainer("MSrcPosCam", "Events"); … … 1331 1522 binh.SetEdges(10, 0., 1.0); 1332 1523 1333 //MH3 href("cos( MMcEvt.fTelescopeTheta)");1524 //MH3 href("cos((MPointingPos.fZd)/kRad2Deg)"); 1334 1525 //href.SetName(mhname); 1335 1526 //MH::SetBinning(&href.GetHist(), &binh); … … 1366 1557 writetrainh.AddContainer("MRawRunHeader", "RunHeaders"); 1367 1558 writetrainh.AddContainer("MTime", "Events"); 1368 writetrainh.AddContainer("M McEvt","Events");1559 writetrainh.AddContainer("MPointingPos", "Events"); 1369 1560 writetrainh.AddContainer("ThetaOrig", "Events"); 1370 1561 writetrainh.AddContainer("MSrcPosCam", "Events"); … … 1382 1573 writetesth.AddContainer("MRawRunHeader", "RunHeaders"); 1383 1574 writetesth.AddContainer("MTime", "Events"); 1384 writetesth.AddContainer("M McEvt","Events");1575 writetesth.AddContainer("MPointingPos", "Events"); 1385 1576 writetesth.AddContainer("ThetaOrig", "Events"); 1386 1577 writetesth.AddContainer("MSrcPosCam", "Events"); … … 1667 1858 write.AddContainer("MRawRunHeader", "RunHeaders"); 1668 1859 write.AddContainer("MTime", "Events"); 1669 write.AddContainer("M McEvt","Events");1860 write.AddContainer("MPointingPos", "Events"); 1670 1861 write.AddContainer("ThetaOrig", "Events"); 1671 1862 write.AddContainer("MSrcPosCam", "Events"); … … 1992 2183 bin.SetEdges(10, 0., 1.0); 1993 2184 1994 MH3 mh3("cos( MMcEvt.fTelescopeTheta)");2185 MH3 mh3("cos((MPointingPos.fZd)/kRad2Deg)"); 1995 2186 mh3.SetName(mname); 1996 2187 MH::SetBinning(&mh3.GetHist(), &bin); … … 2355 2546 2356 2547 write.AddContainer("MRawRunHeader", "RunHeaders"); 2357 //write.AddContainer("MTime", "Events"); 2358 write.AddContainer("MMcEvt", "Events"); 2359 //write.AddContainer("ThetaOrig", "Events"); 2548 write.AddContainer("MTime", "Events"); 2549 write.AddContainer("MPointingPos", "Events"); 2360 2550 write.AddContainer("MSrcPosCam", "Events"); 2361 2551 write.AddContainer("MSigmabar", "Events"); … … 3137 3327 3138 3328 3139 MFillH filler("MHMcCollectionArea", "M McEvt");3329 MFillH filler("MHMcCollectionArea", "MPointingPos"); 3140 3330 filler.SetName("CollectionArea"); 3141 3331 … … 3326 3516 write.AddContainer("MRawRunHeader", "RunHeaders"); 3327 3517 write.AddContainer("MTime", "Events"); 3328 write.AddContainer("M McEvt","Events");3518 write.AddContainer("MPointingPos", "Events"); 3329 3519 write.AddContainer("ThetaOrig", "Events"); 3330 3520 write.AddContainer("MSrcPosCam", "Events"); … … 3400 3590 // new from Robert 3401 3591 3402 MFillH hfill6("MHTimeDiffTheta", "M McEvt");3592 MFillH hfill6("MHTimeDiffTheta", "MPointingPos"); 3403 3593 hfill6.SetName("HTimeDiffTheta"); 3404 3594 3405 MFillH hfill6a("MHTimeDiffTime", "M McEvt");3595 MFillH hfill6a("MHTimeDiffTime", "MPointingPos"); 3406 3596 hfill6a.SetName("HTimeDiffTime"); 3407 3597 … … 3611 3801 3612 3802 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3803 3804 3805 3806 3807 3808 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824
Note:
See TracChangeset
for help on using the changeset viewer.