Changeset 7064
- Timestamp:
- 05/19/05 15:38:38 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7063 r7064 45 45 * mmain/MEventDisplay.cc: 46 46 - removed MC trigger display 47 48 * mbase/MTaskList.[h,cc]: 49 - member function to use MTaskList in a TIter 50 51 * mhflux/MAlphaFitter.[h,cc]: 52 - improved the output line plotted into the histogram 53 - implemented getter for fSigInt 54 55 * mhflux/MHAlpha.[h,cc]: 56 - added some comments 57 - improved DistancetoPrimitive 58 59 * mhflux/MHThetaSq.[h,cc]: 60 - derives the binning now from the cut value or the MAlphaFitter 47 61 48 62 … … 1317 1331 1318 1332 1319 1320 1333 2005/04/14 Thomas Bretz 1321 1334 … … 2610 2623 - include MCalibrationPulseTimeCam to display 2611 2624 2625 2626 2612 2627 2005/02/18 Thomas Bretz 2613 2628 -
trunk/MagicSoft/Mars/mbase/MTaskList.cc
r5779 r7064 928 928 return kTRUE; 929 929 } 930 931 // -------------------------------------------------------------------------- 932 // 933 // Can be used to create an iterator over all tasks, eg: 934 // MTaskList tlist; 935 // TIter Next(tlist); // Be aware: Use a object here rather than a pointer! 936 // TObject *o=0; 937 // while ((o=Next())) 938 // { 939 // [...] 940 // } 941 // 942 MTaskList::operator TIterator*() const 943 { 944 return new TListIter(fTasks); 945 } -
trunk/MagicSoft/Mars/mbase/MTaskList.h
r5692 r7064 84 84 Bool_t WriteEnv(TEnv &env, TString prefix, Bool_t print=kFALSE) const; 85 85 86 operator TIterator*() const; 87 86 88 ClassDef(MTaskList, 1) //collection of tasks to be performed in the eventloop 87 89 }; -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7005 r7064 293 293 { 294 294 const Double_t w = GetGausSigma(); 295 const Int_t l = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 296 const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d (\\alpha<%%.1f\\circ) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)", 297 l<1?1:l); 295 const Double_t m = fIntegralMax; 296 297 const Int_t l1 = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 298 const Int_t l2 = m<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(m)); 299 const TString fmt = Form("\\sigma_{Li/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d B=%%d (x<%%.%df) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)", 300 l1<1?1:l1+1, l2<1?1:l2+1); 298 301 299 302 TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess, 300 f IntegralMax, fChiSqBg, fChiSqSignal,303 fEventsBackground, m, fChiSqBg, fChiSqSignal, 301 304 fCoefficients[3])); 302 305 -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r6949 r7064 109 109 fCoefficients.Set(3+s+1); fCoefficients.Reset(); } 110 110 111 Double_t GetSignalIntegralMax() const { return fSigInt; } 112 111 113 Double_t GetEventsExcess() const { return fEventsExcess; } 112 114 Double_t GetEventsSignal() const { return fEventsSignal; } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r6994 r7064 148 148 } 149 149 150 Double_t MHAlpha::GetVal() const151 {152 return static_cast<const MHillasSrc*>(fParameter)->GetAlpha();153 }154 155 150 Float_t MHAlpha::FitEnergyBins(Bool_t paint) 156 151 { … … 206 201 } 207 202 203 // -------------------------------------------------------------------------- 204 // 205 // Return the value from fParemeter which should be filled into the plots 206 // 207 Double_t MHAlpha::GetVal() const 208 { 209 return static_cast<const MHillasSrc*>(fParameter)->GetAlpha(); 210 } 211 212 213 // -------------------------------------------------------------------------- 214 // 215 // Store the pointer to the parameter container storing the plotted value 216 // (here MHillasSrc) in fParameter. 217 // 218 // return whether it was found or not. 219 // 208 220 Bool_t MHAlpha::GetParameter(const MParList &pl) 209 221 { … … 921 933 return rc; 922 934 } 935 936 Int_t MHAlpha::DistancetoPrimitive(Int_t px, Int_t py) 937 { 938 // If pad has no subpad return (we are in one of the subpads) 939 if (gPad->GetPad(1)==NULL) 940 return 9999; 941 942 // If pad has a subpad we are in the main pad. Check its value. 943 return gPad->GetPad(1)->DistancetoPrimitive(px,py)==0 ? 0 : 9999; 944 } -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r6988 r7064 34 34 MParContainer *fParameter; //! 35 35 36 private:37 36 const TH3D *fOffData; 38 37 39 38 MAlphaFitter fFit; // SEEMS THAT STREAMER HAS SOME PROBLEMS... MAYBE IF FUNC IS USED AT THE SAME TIME FOR FITS (PAINT) 40 39 40 private: 41 41 TH1D fHEnergy; // excess events vs energy 42 42 TH1D fHTheta; // excess events vs theta … … 74 74 void PaintText(Double_t val, Double_t error) const; 75 75 76 Int_t DistancetoPrimitive(Int_t px, Int_t py) { return 0; }76 Int_t DistancetoPrimitive(Int_t px, Int_t py); 77 77 78 78 virtual Bool_t GetParameter(const MParList &pl); -
trunk/MagicSoft/Mars/mhflux/MHThetaSq.cc
r7001 r7064 29 29 // This is a MHAlpha using "ThetaSquared [MParameterD]" as 'alpha' 30 30 // 31 // The default binning is determined from the integration range set in 32 // MAlphaFitter. 33 // 31 34 // For more detailes see MHAlpha. 32 35 // … … 39 42 #include "MBinning.h" 40 43 #include "MParList.h" 44 #include "MTaskList.h" 45 #include "MParameters.h" 41 46 42 47 #include "MLog.h" … … 88 93 } 89 94 95 // -------------------------------------------------------------------------- 96 // 97 // Overwrites the binning in Alpha (ThetaSq) with a binning for which 98 // the upper edge of the 5th bin (bin=5) fit the signal integration window. 99 // In total 75 bins are setup. 100 // 101 // In case of fOffData!=NULL the binnings are taken later from fOffData anyhow. 102 // 103 Bool_t MHThetaSq::SetupFill(const MParList *pl) 104 { 105 // Default is from default fitter 106 // if a user defined fitter is in the parlist: use this range 107 MAlphaFitter *fit = (MAlphaFitter*)pl->FindObject("MAlphaFitter"); 108 if (!fit) 109 fit = &fFit; 110 111 MParameterD *cut = (MParameterD*)pl->FindObject("ThetaSquaredCut", "MParameterD"); 112 if (cut) 113 fit->SetSignalIntegralMax(cut->GetVal()); 114 115 // Get Histogram binnings 116 MBinning binst, binse; 117 binst.SetEdges(fHist, 'x'); 118 binse.SetEdges(fHist, 'y'); 119 120 // Calculate bining which fits alpha-cut 121 const Double_t intmax = fit->GetSignalIntegralMax(); 122 const UInt_t nbins = 75; 123 const UInt_t nsig = 5; 124 125 MBinning binsa(nbins, 0, nbins*intmax/nsig); 126 127 // Apply binning 128 binsa.Apply(fHistTime); 129 MH::SetBinning(&fHist, &binst, &binse, &binsa); 130 131 // Remark: Binnings might be overwritten in MHAlpha::SetupFill 132 return MHAlpha::SetupFill(pl); 133 } 134 135 // -------------------------------------------------------------------------- 136 // 137 // Store the pointer to the parameter container storing the plotted value 138 // (here ThetaSq) in fParameter. 139 // 140 // return whether it was found or not. 141 // 90 142 Bool_t MHThetaSq::GetParameter(const MParList &pl) 91 143 { … … 98 150 } 99 151 152 // -------------------------------------------------------------------------- 153 // 154 // Return the value from fParemeter which should be filled into the plots 155 // 100 156 Double_t MHThetaSq::GetVal() const 101 157 { -
trunk/MagicSoft/Mars/mhflux/MHThetaSq.h
r7001 r7064 6 6 #endif 7 7 8 class MTaskList; 9 8 10 class MHThetaSq : public MHAlpha 9 11 { 10 12 private: 11 MParameterD *fThetaSq; 13 MParameterD *fThetaSq; //! 12 14 13 15 Bool_t GetParameter(const MParList &pl); … … 18 20 } 19 21 22 Bool_t SetupFill(const MParList *pl); 23 20 24 public: 21 25 MHThetaSq(const char *name=NULL, const char *title=NULL); -
trunk/MagicSoft/Mars/mjobs/MJStar.cc
r7054 r7064 433 433 tlist.AddToList(ismc ? (MTask*)&readmc : (MTask*)&readreal); 434 434 tlist.AddToList(&pcalc, ismc ? "Events" : "Drive"); 435 tlist.AddToList(&tlist2, "Events"); 435 436 if (!ismc) 436 437 tlist.AddToList(&fillw, "CC"); 437 tlist.AddToList(&tlist2, "Events");438 438 tlist.AddToList(&write); 439 439
Note:
See TracChangeset
for help on using the changeset viewer.