Changeset 7142 for trunk/MagicSoft/Mars/mhflux
- Timestamp:
- 06/10/05 13:10:09 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mhflux
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r7093 r7142 117 117 118 118 fFunc->FixParameter(1, 0); 119 fFunc->FixParameter(4, 0); 119 if (fPolynomOrder!=1) 120 fFunc->FixParameter(4, 0); 120 121 fFunc->SetParLimits(2, 0, 90); 121 122 fFunc->SetParLimits(3, -1, 1); … … 159 160 fFunc->ReleaseParameter(2); 160 161 fFunc->FixParameter(3, fFunc->GetParameter(3)); 162 fFunc->FixParameter(4, fFunc->GetParameter(4)); 161 163 for (int i=5; i<fFunc->GetNpar(); i++) 162 164 fFunc->FixParameter(i, fFunc->GetParameter(i)); … … 297 299 const Int_t l1 = w<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(w)); 298 300 const Int_t l2 = m<=0 ? 0 : (Int_t)TMath::Ceil(-TMath::Log10(m)); 299 const TString fmt = Form("\\sigma_{L i/Ma}=%%.1f \\omega=%%.%df\\circ E=%%d B=%%d (x<%%.%df) (\\chi_{b}^{2}/ndf=%%.1f \\chi_{s}^{2}/ndf=%%.1f c_{0}=%%.1f)",301 const TString fmt = Form("\\sigma_{L/M}=%%.1f \\omega=%%.%df\\circ E=%%d B=%%d x<%%.%df \\tilde\\chi_{b}=%%.1f \\tilde\\chi_{s}=%%.1f c=%%.1f f=%%.2f", 300 302 l1<1?1:l1+1, l2<1?1:l2+1); 301 303 302 304 TLatex text(x, y, Form(fmt.Data(), fSignificance, w, (int)fEventsExcess, 303 305 (int)fEventsBackground, m, fChiSqBg, fChiSqSignal, 304 fCoefficients[3] ));306 fCoefficients[3], fScaleFactor)); 305 307 306 308 text.SetBit(TLatex::kTextNDC); -
trunk/MagicSoft/Mars/mhflux/MHAlpha.cc
r7122 r7142 139 139 binsa.SetEdges(18, 0, 90); 140 140 binse.SetEdgesLog(15, 10, 100000); 141 binst.SetEdges Cos(50, 0, 60);141 binst.SetEdgesASin(51, -0.005, 0.505); 142 142 binse.Apply(fHEnergy); 143 143 binst.Apply(fHTheta); … … 818 818 819 819 if (hof ? fit.Fit(*hon, *hof, alpha) : fit.Fit(*hon)) 820 *fLog << dbg << "Bin " << i << ": sigma=" << fit.GetSignificance() << " omega=" << fit.GetGausSigma() << " events=" << fit.GetEventsExcess() << endl; 820 { 821 *fLog << dbg << "Bin " << i << ": sigma=" << fit.GetSignificance() << " omega=" << fit.GetGausSigma() << " events=" << fit.GetEventsExcess() << " scale=" << fit.GetScaleFactor() << endl; 822 fit.PaintResult(); 823 } 821 824 /* 822 825 if (fit.FitEnergy(fHist, fOffData, i, kTRUE)) -
trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc
r7094 r7142 95 95 MBinning binsa, binse, binst; 96 96 binse.SetEdgesLog(15, 10, 1000000); 97 binst.SetEdges Cos(50, 0, 60);97 binst.SetEdgesASin(51, -0.005, 0.505); 98 98 99 99 binse.Apply(fHEnergy); … … 289 289 if (TString(option)=="paint4") 290 290 { 291 const TString txt = Form("A_{eff}=%.0fm^{2} A_{abs}=%.0fm^{2} r=%.0fm", 292 GetCollectionAreaEff(), 291 //const TString txt = Form("A_{eff}=%.0fm^{2} A_{abs}=%.0fm^{2} r=%.0fm", 292 // GetCollectionAreaEff(), 293 // GetCollectionAreaAbs(), fMcAreaRadius); 294 const TString txt = Form("A_{abs}=%.0fm^{2} r=%.0fm", 293 295 GetCollectionAreaAbs(), fMcAreaRadius); 294 296 -
trunk/MagicSoft/Mars/mhflux/MHDisp.cc
r7122 r7142 203 203 204 204 // Now we can safly derotate both position... 205 TVector2 srcp(fSrcPos->GetXY()); 205 TVector2 srcp; 206 if (fSrcPos) 207 srcp = fSrcPos->GetXY(); 208 206 209 if (rho!=0) 207 210 { … … 211 214 } 212 215 213 if (fSrcPos) 214 { 215 pos1 -= srcp*fMm2Deg; 216 pos2 -= srcp*fMm2Deg; 217 } 216 pos1 -= srcp*fMm2Deg; 217 pos2 -= srcp*fMm2Deg; 218 218 219 219 fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*gweight); -
trunk/MagicSoft/Mars/mhflux/MHEffectiveOnTime.cc
r7115 r7142 410 410 // setup binning 411 411 MBinning btheta("BinningTheta"); 412 btheta.SetEdges Cos(100, 0, 60);412 btheta.SetEdgesASin(51, -0.005, 0.505); 413 413 414 414 MBinning btime("BinningDeltaT"); -
trunk/MagicSoft/Mars/mhflux/MHEnergyEst.cc
r6983 r7142 96 96 MBinning binsi, binse, binst, binsr; 97 97 binse.SetEdgesLog(15, 10, 1000000); 98 binst.SetEdges Cos(50, 0, 60);98 binst.SetEdgesASin(51, -0.005, 0.505); 99 99 binsi.SetEdges(10, 0, 400); 100 100 binsr.SetEdges(50, -1.3, 1.3); -
trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.cc
r7130 r7142 72 72 73 73 #include <TF1.h> 74 #include <TH1.h> 74 75 75 76 #include "MLog.h" … … 79 80 #include "MParameters.h" 80 81 82 #include "MPointingPos.h" 83 81 84 #include "MMcEvt.hxx" 82 85 #include "MMcCorsikaRunHeader.h" … … 106 109 fAllowChange = kFALSE; 107 110 108 fFunc = NULL; 109 fMcEvt = NULL; 110 fWeight = NULL; 111 fFunc = NULL; 112 fMcEvt = NULL; 113 fWeight = NULL; 114 fZdWeights = NULL; 115 fPointing = NULL; 111 116 } 112 117 … … 150 155 if (!fWeight) 151 156 return kFALSE; 157 158 if (!fZdWeights) 159 return kTRUE; 160 161 fPointing = (MPointingPos*)pList->FindObject("MPointingPos"); 162 if (!fPointing) 163 { 164 *fLog << err << "MPointingPos not found... abort." << endl; 165 return kFALSE; 166 } 152 167 153 168 return kTRUE; … … 362 377 const Double_t e = fMcEvt->GetEnergy(); 363 378 364 fWeight->SetVal(fFunc->Eval(e)); 379 Double_t w = 1; 380 381 if (fZdWeights) 382 { 383 const Int_t i = fZdWeights->GetXaxis()->FindFixBin(fPointing->GetZd()); 384 w = fZdWeights->GetBinContent(i); 385 cout << i << " " << w << " " << fPointing->GetZd() << endl; 386 } 387 388 fWeight->SetVal(fFunc->Eval(e)*w); 365 389 366 390 return kTRUE; -
trunk/MagicSoft/Mars/mhflux/MMcSpectrumWeight.h
r7094 r7142 7 7 8 8 class TF1; 9 class TH1; 9 10 class MParList; 10 11 class MMcEvt; 11 12 class MParameterD; 13 class MPointingPos; 12 14 class MMcCorsikaRunHeader; 13 15 … … 17 19 const MMcEvt *fMcEvt; // Pointer to the container with the MC energy 18 20 MParameterD *fWeight; // Pointer to the output MWeight container 21 MPointingPos *fPointing; 19 22 20 23 TString fNameWeight; // Name of the MWeight container … … 22 25 23 26 TF1 *fFunc; // Function calculating the weights 27 TH1 *fZdWeights; // Set additional ZA weights 24 28 25 29 Double_t fOldSlope; // Slope of energy spectrum generated with Corsika … … 59 63 void SetEnergyRange(Double_t min=-2, Double_t max=-1) { fEnergyMin=min; fEnergyMax=max; } 60 64 void SetOldSlope(Double_t s=-2.6) { fOldSlope=s; } 65 void SetZdWeights(TH1 *h=0) { fZdWeights = h; } 61 66 Bool_t Set(const MMcCorsikaRunHeader &h); 62 67
Note:
See TracChangeset
for help on using the changeset viewer.