Changeset 7122 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 06/01/05 18:13:13 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r7064 r7122 83 83 : fNameParameter("MHillasSrc"), fParameter(0), 84 84 fOffData(0), fResult(0), /*fExcess(0),*/ fEnergy(0), fHillas(0), 85 fPointPos(0), fTimeEffOn(0), fTime(0), 86 fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), fSkipHistEnergy(kFALSE), 87 fForceUsingSize(kFALSE), fNumTimeBins(10), fMatrix(0) 88 85 fPointPos(0), fTimeEffOn(0), fTime(0), fNumTimeBins(10), 86 fMatrix(0), fSkipHistTime(kFALSE), fSkipHistTheta(kFALSE), 87 fSkipHistEnergy(kFALSE), fForceUsingSize(kFALSE) 89 88 { 90 89 // … … 449 448 if (fMatrix) 450 449 { 451 alpha = (*fMatrix)[fMap[0]];450 alpha = fMap[0]<0 ? GetVal() : (*fMatrix)[fMap[0]]; 452 451 energy = fMap[1]<0 ? -1 : (*fMatrix)[fMap[1]]; 453 452 size = fMap[2]<0 ? -1 : (*fMatrix)[fMap[2]]; -
trunk/MagicSoft/Mars/mhflux/MHAlpha.h
r7064 r7122 52 52 MTime fLastTime; //! Last fTimeEffOn 53 53 54 UShort_t fNumTimeBins; // Number of time bins to fill together 55 UShort_t fNumRebin; //! 56 57 //const TString fNameProjAlpha; //! This should make sure, that gROOT doen't confuse the projection with something else 58 protected: 59 MHMatrix *fMatrix; //! 60 Int_t fMap[5]; //! 61 54 62 Bool_t fSkipHistTime; 55 63 Bool_t fSkipHistTheta; … … 57 65 Bool_t fForceUsingSize; 58 66 59 UShort_t fNumTimeBins; // Number of time bins to fill together 60 UShort_t fNumRebin; //! 61 62 //const TString fNameProjAlpha; //! This should make sure, that gROOT doen't confuse the projection with something else 63 64 MHMatrix *fMatrix; //! 65 Int_t fMap[5]; //! 66 67 Float_t FitEnergyBins(Bool_t paint=kFALSE); 67 private: 68 Float_t FitEnergyBins(Bool_t paint=kFALSE); 68 69 void FitThetaBins(Bool_t paint=kFALSE); 69 70 … … 127 128 void DrawAll(); //*MENU* 128 129 129 v oid InitMapping(MHMatrix *mat, Int_t type=0);130 virtual void InitMapping(MHMatrix *mat, Int_t type=0); 130 131 void StopMapping(); 131 132 -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7115 r7122 197 197 return kFALSE; 198 198 } 199 const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign( 1.0f, hsrc.GetCosDeltaAlpha())*fMm2Deg;199 const Double_t m3l = fHilExt->GetM3Long()*TMath::Sign(fMm2Deg, hsrc.GetCosDeltaAlpha()); 200 200 201 201 gweight = m3l>fM3lCut ? 1 : 0; … … 217 217 } 218 218 219 // Workaround: Number-of-entries 220 if (gweight>0.25) 221 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight); 222 if (gweight<0.75) 223 fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight)); 219 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight); 220 fHist.Fill(pos2.X(), pos2.Y(), 0.0, w*(1-gweight)); 224 221 225 222 return kTRUE; … … 273 270 const Double_t x0 = h1->GetXaxis()->GetBinCenter(ix); 274 271 const Double_t y0 = h1->GetYaxis()->GetBinCenter(iy); 272 const Double_t w0 = h1->GetXaxis()->GetBinWidth(1); 275 273 276 274 for (int x=0; x<h1->GetNbinsX(); x++) … … 294 292 h2->Fit(&func, "IMQ", "", 0, 1.0); 295 293 296 const Double_t r0 = 2*func.GetParameter(2); 297 const Double_t e = func.Integral(0, r0)/h1->GetBinWidth(1); 298 func.SetParameter(0, 0); 299 const Double_t b = func.Integral(0, r0)/h1->GetBinWidth(1); 294 // No wintegrate the function f(x) per Delta Area 295 // which is f(x)/(pi*delta r*(2*r+delta r)) 296 TF1 func2("fcn2", Form("(gaus + [3]*x*x + [4])/(2*x+%.5f)", w0)); 297 for (int i=0; i<5; i++) 298 func2.SetParameter(i, func.GetParameter(i)); 299 300 const Double_t r0 = 2*func2.GetParameter(2); 301 const Double_t e = func2.Integral(0, r0)/(w0*TMath::Pi()); 302 func2.SetParameter(0, 0); 303 const Double_t b = func2.Integral(0, r0)/(w0*TMath::Pi()); 300 304 const Double_t s = MMath::SignificanceLiMa(e, b); 301 305
Note:
See TracChangeset
for help on using the changeset viewer.