Changeset 5511 for trunk/MagicSoft/Mars
- Timestamp:
- 11/30/04 11:15:57 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r5510 r5511 28 28 - High-low-gain inverted weights files for the TDAS-Extractor 29 29 nr. 29, 31, 33. 30 30 31 * mjobs/MJCalibration.cc 32 - updated to new version of MPedCalcPedRun (only important for 33 intensity calibration) 34 31 35 32 36 2004/11/30: Wolfgang Wittek -
trunk/MagicSoft/Mars/macros/getExtractor.C
r5508 r5511 79 79 // 28: SetNameWeightsFile('msignal/cosmics_weights.dat')" << endl; 80 80 // 29: SetNameWeightsFile('msignal/cosmics_weights4.dat')" << endl; 81 // 30: SetNameWeightsFile('msignal/cosmics_weights_logain 6.dat')" << endl;82 // 31: SetNameWeightsFile('msignal/cosmics_weights _logain4.dat')" << endl;81 // 30: SetNameWeightsFile('msignal/cosmics_weights_logain.dat')" << endl; 82 // 31: SetNameWeightsFile('msignal/cosmics_weights4_logain.dat')" << endl; 83 83 // 32: SetNameWeightsFile('msignal/calibration_weights_UV.dat')" << endl; 84 // 33: SetNameWeightsFile('msignal/calibration_weights_UV4.dat')" << endl; 85 // 34: SetNameWeightsFile('msignal/calibration_weights_UV_logain6.dat')" << endl; 86 // 35: SetNameWeightsFile('msignal/calibration_weights_UV_logain4.dat')" << endl; 87 // 36: Real Fit: (not yet implemented)" << endl; 84 // 33: SetNameWeightsFile('msignal/calibration_weights_UV_logain.dat')" << endl; 85 // 34: Real Fit: (not yet implemented)" << endl; 88 86 // 89 87 // The extractor will also carry a meaningful name, storing all information about its … … 189 187 case 32: 190 188 case 33: 191 case 34:192 case 35:193 189 extractor = new MExtractTimeAndChargeDigitalFilter; 194 extractor->SetRange(0,1 4,2,14);190 extractor->SetRange(0,18,2,14); 195 191 useTimeAndCharge = kTRUE; 196 192 break; … … 312 308 break; 313 309 case 31: 314 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/cosmics_weights _logain4.dat");310 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/cosmics_weights4_logain.dat"); 315 311 break; 316 312 case 32: … … 318 314 break; 319 315 case 33: 320 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights4_UV.dat"); 321 break; 322 case 34: 323 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_logain_UV.dat"); 324 break; 325 case 35: 326 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_logain4_UV.dat"); 316 ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_UV_logain.dat"); 327 317 break; 328 318 default: -
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r5460 r5511 861 861 t7->SetTextColor(gStyle->GetColorPalette(Int_t(6./max*numcol + 1.))); 862 862 t7->SetTextAlign(12); 863 TText *t 8 = pave->AddText(Form("Deviating global F-Factor:%3i pixels",863 TText *t9 = pave->AddText(Form("Deviating Number of Photons: %3i pixels", 864 864 CountBadPixels(&disp24,7))); 865 t8->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.))); 866 t8->SetTextAlign(12); 867 TText *t9 = pave->AddText(Form("Deviating Number of Photons: %3i pixels", 868 CountBadPixels(&disp24,8))); 869 t9->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.))); 865 t9->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.))); 870 866 t9->SetTextAlign(12); 871 867 TText *t10= pave->AddText(Form("High-Gain Histogram Overflow: %3i pixels", 872 CountBadPixels(&disp24, 9)));873 t10->SetTextColor(gStyle->GetColorPalette(Int_t( 9./max*numcol + 1.)));868 CountBadPixels(&disp24,8 ))); 869 t10->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.))); 874 870 t10->SetTextAlign(12); 875 871 TText *t11= pave->AddText(Form("Low-Gain Histogram Overflow: %3i pixels", 876 CountBadPixels(&disp24, 10)));877 t11->SetTextColor(gStyle->GetColorPalette(Int_t( 10./max*numcol + 1.)));872 CountBadPixels(&disp24,9 ))); 873 t11->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.))); 878 874 t11->SetTextAlign(12); 879 875 TText *t12= pave->AddText(Form("Previously Excluded: %3i pixels", 880 CountBadPixels(&disp24,1 1)));881 t12->SetTextColor(gStyle->GetColorPalette(Int_t(1 1./max*numcol + 1.)));876 CountBadPixels(&disp24,10))); 877 t12->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.))); 882 878 t12->SetTextAlign(12); 883 879 pave->Draw(); … … 943 939 tt6->SetTextColor(gStyle->GetColorPalette(Int_t(7./max2*numcol + 1.))); 944 940 tt6->SetTextAlign(12); 941 TText *tt8 = pave2->AddText(Form("Deviating global F-Factor: %3i pixels", 942 CountBadPixels(&disp25,8))); 943 tt8->SetTextColor(gStyle->GetColorPalette(Int_t(8./max2*numcol + 1.))); 944 tt8->SetTextAlign(12); 945 945 pave2->Draw(); 946 946 … … 1677 1677 filltme.SetDrawOption(drawoption.Data()); 1678 1678 */ 1679 // 1680 // Set default extractors in case, none has been set... 1681 // 1682 if (!fExtractor) 1683 fExtractor = &extract2; 1684 if (!fTimeExtractor) 1685 fTimeExtractor = ×pline; 1686 1679 1687 MTaskEnv taskenv("ExtractSignal"); 1680 taskenv.SetDefault(fExtractor ? fExtractor : &extract2);1688 taskenv.SetDefault(fExtractor); 1681 1689 1682 1690 tlist.AddToList(&merge); … … 1684 1692 1685 1693 MPedCalcPedRun pedcalc; 1686 pedcalc.SetWindowSize(fExtractor 1687 ? (Int_t)TMath::Nint(fExtractor->GetNumHiGainSamples()) 1688 : (Int_t)TMath::Nint(extract2.GetNumHiGainSamples()) 1689 ); 1690 pedcalc.SetRange(fExtractor 1691 ? fExtractor->GetHiGainFirst() 1692 : extract2.GetHiGainFirst(), 1693 fExtractor 1694 ? fExtractor->GetHiGainLast() 1695 : extract2.GetHiGainLast() 1696 ); 1694 pedcalc.SetExtractWindow(fExtractor->GetHiGainFirst(),TMath::Nint(fExtractor->GetNumHiGainSamples())); 1697 1695 1698 1696 if (IsIntensity()) … … 1709 1707 if (!IsTimeAndCharge()) 1710 1708 { 1711 taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : ×pline);1709 taskenv2.SetDefault(fTimeExtractor); 1712 1710 1713 1711 if (IsRelTimes()) -
trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc
r5507 r5511 151 151 #include "MExtractPedestal.h" 152 152 #include "MExtractTimeAndCharge.h" 153 #include "MExtractTimeAndChargeDigitalFilter.h"154 153 155 154 #include "MParList.h" … … 422 421 if (fExtractor) 423 422 { 424 fExtractor->InitArrays(); 423 if (!fExtractor->InitArrays()) 424 return kFALSE; 425 425 SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples()); 426 if (fExtractor->InheritsFrom("MExtractTimeAndChargeDigitalFilter"))427 {428 MExtractTimeAndChargeDigitalFilter* df = (MExtractTimeAndChargeDigitalFilter*)fExtractor;429 if (!df->IsWeightsSet())430 if (!df->ReadWeightsFile(df->GetNameWeightsFile()))431 return kFALSE;432 }433 426 } 434 427 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc
r5504 r5511 139 139 fLoGainFirst, fLoGainLast, fNumLoGainSamples); 140 140 141 InitArrays(); 141 142 if (!InitArrays()) 143 return kFALSE; 144 142 145 Print(); 143 146 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h
r5504 r5511 40 40 fWindowSizeLoGain = windowl; } 41 41 42 virtual void InitArrays() {}42 virtual Bool_t InitArrays() { return kTRUE; } 43 43 44 44 virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum, -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc
r5505 r5511 180 180 // -------------------------------------------------------------------------- 181 181 // 182 // PreProcess183 //184 // Calls:185 // - ReadWeightsFile(fNameWeightsFile) if the weights have not yet been set.186 // - Creates new arrays according to the extraction range187 //188 Int_t MExtractTimeAndChargeDigitalFilter::PreProcess(MParList *pList)189 {190 if (!fWeightsSet)191 if (!ReadWeightsFile(fNameWeightsFile))192 return kFALSE;193 194 return MExtractTimeAndCharge::PreProcess(pList);195 }196 197 // --------------------------------------------------------------------------198 //199 182 // ReInit 200 183 // … … 220 203 // Gets called in the ReInit() and initialized the arrays 221 204 // 222 voidMExtractTimeAndChargeDigitalFilter::InitArrays()205 Bool_t MExtractTimeAndChargeDigitalFilter::InitArrays() 223 206 { 224 207 Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast); … … 226 209 range = (Int_t)(fLoGainLast - fLoGainFirst + 1); 227 210 fLoGainSignal.Set(range); 211 212 if (!fWeightsSet) 213 if (!ReadWeightsFile(fNameWeightsFile)) 214 return kFALSE; 215 228 216 } 229 217 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.h
r5505 r5511 53 53 54 54 Bool_t ReInit(MParList *pList); 55 Int_t PreProcess(MParList *pList);56 55 57 voidInitArrays();56 Bool_t InitArrays(); 58 57 59 58 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.cc
r5505 r5511 185 185 // Gets called in the ReInit() and initialized the arrays 186 186 // 187 voidMExtractTimeAndChargeSlidingWindow::InitArrays()187 Bool_t MExtractTimeAndChargeSlidingWindow::InitArrays() 188 188 { 189 189 Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast); … … 191 191 range = (Int_t)(fLoGainLast - fLoGainFirst + 1); 192 192 fLoGainSignal.Set(range); 193 194 return kTRUE; 195 193 196 } 194 197 -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.h
r5504 r5511 29 29 MArrayF fLoGainSignal; //! Store them in separate arrays 30 30 31 voidInitArrays();31 Bool_t InitArrays(); 32 32 33 33 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc
r5504 r5511 293 293 // Gets called in the ReInit() and initialized the arrays 294 294 // 295 voidMExtractTimeAndChargeSpline::InitArrays()295 Bool_t MExtractTimeAndChargeSpline::InitArrays() 296 296 { 297 297 … … 315 315 fLoGainFirstDeriv .Reset(); 316 316 fLoGainSecondDeriv.Reset(); 317 318 return kTRUE; 317 319 318 320 } -
trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h
r5504 r5511 43 43 Bool_t ReInit( MParList *pList ); 44 44 45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);45 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print); 46 46 47 voidInitArrays();47 Bool_t InitArrays(); 48 48 49 49 void CalcIntegralHiGain(Float_t &sum, Int_t startslice, Int_t lastslice);
Note:
See TracChangeset
for help on using the changeset viewer.