Changeset 2543 for trunk/MagicSoft/Mars/macros/CT1Analysis.C
- Timestamp:
- 11/20/03 09:13:31 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/macros/CT1Analysis.C
r2475 r2543 286 286 287 287 288 288 289 // Job E_XX : extended version of E_XX (including flux plots) 289 290 // - select g/h separation method XX … … 297 298 298 299 299 Bool_t JobE_XX = kFALSE; 300 Bool_t JobE_XX = kTRUE; 301 Bool_t CCollArea= kFALSE; // calculate eff. collection areas 300 302 Bool_t OEEst = kFALSE; // optimize energy estimator 301 Bool_t WEX = kFALSE; // update root file ? 302 Bool_t WRobert = kFALSE; // write out Robert's file ? 303 Bool_t WEX = kTRUE; // update root file ? 304 Bool_t WRobert = kTRUE; // write out Robert's file ? 305 303 306 304 307 … … 2527 2530 2528 2531 2529 2530 2532 //--------------------------------------------------------------------- 2531 2533 // Job E_XX … … 2547 2549 2548 2550 gLog << "" << endl; 2549 gLog << "Macro CT1Analysis : JobE_XX, OEEst, WEX = "2551 gLog << "Macro CT1Analysis : JobE_XX, CCollArea, OEEst, WEX = " 2550 2552 << (JobE_XX ? "kTRUE" : "kFALSE") << ", " 2553 << (CCollArea?"kTRUE" : "kFALSE") << ", " 2551 2554 << (OEEst ? "kTRUE" : "kFALSE") << ", " 2552 2555 << (WEX ? "kTRUE" : "kFALSE") << endl; … … 2554 2557 2555 2558 // type of data to be analysed 2556 TString typeData = "ON";2559 //TString typeData = "ON"; 2557 2560 //TString typeData = "OFF"; 2558 //TString typeData = "MC";2561 TString typeData = "MC"; 2559 2562 gLog << "typeData = " << typeData << endl; 2560 2563 … … 2567 2570 // and definition of final selections 2568 2571 2569 TString XX("SC");2570 //TString XX("RF");2572 //TString XX("SC"); 2573 TString XX("RF"); 2571 2574 TString fhadronnessName("Had"); 2572 2575 fhadronnessName += XX; … … 2574 2577 2575 2578 // maximum values of the hadronness, |ALPHA| and DIST 2576 Float_t maxhadronness = 0. 4;2579 Float_t maxhadronness = 0.23; 2577 2580 Float_t maxalpha = 20.0; 2578 2581 Float_t maxdist = 10.0; … … 2638 2641 2639 2642 //==================================================================== 2643 2644 MHMcCT1CollectionArea collarea; 2645 collarea.SetEaxis(MHMcCT1CollectionArea::kLinear); 2646 2647 MParList parlist; 2648 InitBinnings(&parlist); 2649 2650 if (CCollArea) 2651 { 2640 2652 gLog << "-----------------------------------------------" << endl; 2641 2653 gLog << "Start calculation of effective collection areas" << endl; 2642 MParList parlist; 2654 2655 2643 2656 MTaskList tasklist; 2644 2657 … … 2655 2668 MContinue conthadrons(&cuthadrons); 2656 2669 2657 MHMcCT1CollectionArea collarea;2658 collarea.SetEaxis(MHMcCT1CollectionArea::kLinear);2659 2670 2660 2671 MFillH filler("MHMcCT1CollectionArea", "MMcEvt"); … … 2665 2676 2666 2677 parlist.AddToList(&tasklist); 2667 InitBinnings(&parlist); 2678 2668 2679 parlist.AddToList(&collarea); 2669 2680 … … 2697 2708 collarea.CalcEfficiency(); 2698 2709 collarea.DrawClone(); 2710 2711 2712 2713 //--------------------------------------------- 2714 // Write histograms to a file 2715 // 2716 2717 TFile f(collareaName, "RECREATE"); 2718 //collarea.GetHist()->Write(); 2719 //collarea.GetHAll()->Write(); 2720 //collarea.GetHSel()->Write(); 2721 collarea.Write(); 2722 2723 f.Close(); 2724 2725 gLog << "Collection area plots written onto file " << collareaName << endl; 2726 2727 gLog << "Calculation of effective collection areas done" << endl; 2728 gLog << "-----------------------------------------------" << endl; 2729 //------------------------------------------------------------------ 2730 } 2731 2732 if (!CCollArea) 2733 { 2734 gLog << "-----------------------------------------------" << endl; 2735 gLog << "Read in effective collection areas from file " 2736 << collareaName << endl; 2737 2738 TFile collfile(collareaName); 2739 collfile.ls(); 2740 collarea.Read("MHMcCT1CollectionArea"); 2741 collarea.DrawClone(); 2742 2743 gLog << "Effective collection areas were read in from file " 2744 << collareaName << endl; 2745 gLog << "-----------------------------------------------" << endl; 2746 } 2747 2699 2748 2700 2749 // save binnings for call to CT1EEst … … 2712 2761 } 2713 2762 2714 2715 //--------------------------------------------- 2716 // Write histograms to a file 2717 // 2718 2719 TFile f(collareaName, "RECREATE"); 2720 collarea.GetHist()->Write(); 2721 collarea.GetHAll()->Write(); 2722 collarea.GetHSel()->Write(); 2723 f.Close(); 2724 2725 gLog << "Collection area plots written onto file " << collareaName << endl; 2726 2727 gLog << "Calculation of effective collection areas done" << endl; 2728 gLog << "-----------------------------------------------" << endl; 2729 //------------------------------------------------------------------ 2730 2731 2763 //------------------------------------- 2732 2764 TString fHilName = "MHillas"; 2733 2765 TString fHilNameExt = "MHillasExt";
Note:
See TracChangeset
for help on using the changeset viewer.