Changeset 17878 for trunk/Mars/fact
- Timestamp:
- 05/21/14 18:03:56 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Mars/fact/analysis/callisto.C
r17877 r17878 13 13 // map file to use (get that from La Palma!) 14 14 const char *map = usemap ? "/home/fact/FACT++/FACTmap111030.txt" : NULL; 15 15 /* 16 16 Bool_t maximum = kTRUE; 17 17 … … 21 21 22 22 const char *pulse_template = "template-pulse.root"; 23 23 */ 24 24 // ------------------------------------------------------ 25 25 26 bool use_delays=false;26 //bool use_delays=false; 27 27 28 28 int spike_removal=3; 29 30 // The gain as extracted from our dark count spectra 31 double gain = 258; 29 32 30 33 // ------------------------------------------------------ … … 32 35 // Extraction range in slices. It will always(!) contain the full range 33 36 // of integration 34 const int first_slice = 2 0; // 10ns35 const int last_slice = 2 50; // 125ns37 const int first_slice = 25; // 10ns 38 const int last_slice = 225; // 125ns 36 39 37 40 // Note that rise and fall time mean different things whether you use IntegralFixed or IntegraRel: … … 44 47 // * fFallTime: Number of slices right from maximum time 45 48 // 49 /* 46 50 const int rise_time_cal = maximum ? 40 : 10; // was 13; 5ns 47 51 const int fall_time_cal = maximum ? 120 : 160; // was 23; 80ns … … 57 61 58 62 const double heighttm = 0.5; // IntegralAbs { 1.5pe * 9.6mV/pe } / IntegralRel { 0.5 } 59 63 */ 60 64 Long_t max = 0; // All 61 65 Long_t max0 = max; // Time marker … … 277 281 278 282 // ====================================================== 279 283 /* 280 284 gLog << endl; 281 285 gLog.Separator("Processing external light pulser run"); … … 489 493 //hcalco.Scale(scale); 490 494 hcalco.DrawCopy(); 495 */ 496 497 TF1 f("f", "[0]*(1-1/(1+exp(x/[1])))*exp(-x/[2])", -15, 150); 498 f.SetParameter(0, gain*0.05143); 499 f.SetParameter(1, 1.075); 500 f.SetParameter(2, 19.3); 501 f.SetNpx(2*165); //2GHz 502 503 // Convert to graph 504 TGraph g(&f); 505 506 // Convert to float 507 MArrayF x(g.GetN()); 508 MArrayF y(g.GetN()); 509 for (int i=0; i<g.GetN(); i++) 510 { 511 x[i] = g.GetX()[i]; 512 y[i] = g.GetY()[i]; 513 } 514 515 MFilterData filter; 516 filter.Filter(1, g.GetN(), y.GetArray(), y.GetArray()); 517 518 // Define spline 519 MArrayF der1(g.GetN()); 520 MArrayF der2(g.GetN()); 521 522 MExtralgoSpline spline(y.GetArray(), y.GetSize(), 523 der1.GetArray(), der2.GetArray()); 524 525 spline.SetExtractionType(MExtralgoSpline::kAmplitudeRel); 526 spline.SetHeightTm(0.5); 527 528 // Estimate where the maximum is and extract signal 529 Long64_t maxi = TMath::LocMax(y.GetSize(), y.GetArray()); 530 spline.Extract(maxi); 531 532 // Scale factor for signal extraction 533 double scale = 1./spline.GetSignal(); 491 534 492 535 // ====================================================== … … 676 719 // --- 677 720 678 MExtractTimeAndChargeSpline extractor5dat; 721 MTreatSaturation treatsat5; 722 MFilterData filterdata5; 723 724 MExtractFACT extractor5dat; 679 725 extractor5dat.SetRange(first_slice, last_slice); 680 extractor5dat.SetRiseTimeHiGain(rise_time_dat); 681 extractor5dat.SetFallTimeHiGain(fall_time_dat); 682 extractor5dat.SetHeightTm(heighttm); 683 extractor5dat.SetChargeType(type); 684 extractor5dat.SetSaturationLimit(600000); 685 extractor5dat.SetNoiseCalculation(kFALSE); 686 726 /* 687 727 MExtractTimeAndChargeSpline extractor5cal; 688 728 extractor5cal.SetRange(first_slice, last_slice); … … 704 744 extractor5tm.SetNameSignalCam("TimeMarkerAmplitude"); 705 745 extractor5tm.SetNameTimeCam("TimeMarkerTime"); 706 746 */ 707 747 extractor5dat.SetFilter(&filterncl); 708 extractor5cal.SetFilter(&filtercal);748 //extractor5cal.SetFilter(&filtercal); 709 749 //extractor4tm.SetFilter(&filtercal); 710 750 … … 716 756 MCalibrateDrsTimes calctm5; 717 757 calctm5.SetNameUncalibrated("UncalibratedTimes"); 718 758 /* 719 759 MCalibrateDrsTimes calctm5tm("CalibrateTimeMarker"); 720 760 calctm5tm.SetNameArrivalTime("TimeMarkerTime"); … … 766 806 //fill5w.SetDrawOption("gaus"); 767 807 //fill5x.SetDrawOption("gaus"); 768 808 */ 769 809 770 810 MBadPixelsTreat treat5; 771 811 treat5.SetProcessPedestalRun(kFALSE); 772 812 treat5.SetProcessPedestalEvt(kFALSE); 773 813 /* 774 814 MHSectorVsTime hist5cal("CalVsTm"); 775 815 MHSectorVsTime hist5ped("PedVsTm"); … … 789 829 fill5cal.SetFilter(&filtercal); 790 830 fill5ped.SetFilter(&filterped); 791 831 */ 792 832 MHCamEvent evt5b(0, "ExtSig", "Extracted signal;;S [mV·sl]"); 793 833 MHCamEvent evt5c(0, "CalSig", "Calibrated and interpolated signal;;S [~phe]"); … … 831 871 MContinue test; 832 872 test.SetFilter(&filterncl); 833 873 /* 834 874 MTaskList tlist5tm; 835 875 tlist5tm.AddToList(&extractor5tm); … … 846 886 tlist5tm.AddToList(&fill5x); 847 887 tlist5tm.SetFilter(&filtercal); 848 888 */ 849 889 MTaskList tlist5dat; 850 890 tlist5dat.AddToList(&fill5b); … … 863 903 tlist5.AddToList(&filterped); 864 904 tlist5.AddToList(&fill5a); 905 tlist5.AddToList(&treatsat5); 906 tlist5.AddToList(&filterdata5); 865 907 tlist5.AddToList(&extractor5dat); 866 tlist5.AddToList(&extractor5cal);908 //tlist5.AddToList(&extractor5cal); 867 909 tlist5.AddToList(&calctm5); 868 tlist5.AddToList(&tlist5tm);910 //tlist5.AddToList(&tlist5tm); 869 911 tlist5.AddToList(&conv5); 870 912 tlist5.AddToList(&treat5); 871 tlist5.AddToList(&fill5ped);872 tlist5.AddToList(&fill5cal);913 //tlist5.AddToList(&fill5ped); 914 //tlist5.AddToList(&fill5cal); 873 915 tlist5.AddToList(&tlist5dat); 874 916 tlist5.AddToList(&write5);
Note:
See TracChangeset
for help on using the changeset viewer.