Changeset 9367
- Timestamp:
- 03/01/09 12:51:04 (16 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r9366 r9367 18 18 19 19 -*-*- END OF LINE -*-*- 20 2009/03/01 Thomas Bretz 21 22 * ganymed.rc, ganymed_onoff.rc, ganymed_wobble.rc: 23 - added pointing model 328198 24 25 * mbase/MSpline3.h: 26 - added a cast to make it compile with root 5.18 27 28 * melectronics/MPulseShape.cc: 29 - included TH1 to make it compile with root 5.18 30 31 * mhflux/MAlphaFitter.[h,cc]: 32 - convert MString::Format to Data() 33 - added type SignificanceSqrtExcess 34 35 * mhflux/MHFalseSource.cc, mjobs/MJSpectrum.cc: 36 - convert MString::Format to Data() 37 38 * mhist/MHCamera.cc: 39 - changed some const TString to const char to resolve 40 ambiguity in root 5.18 in TF1 constructor 41 42 * msim/MHPhotonEvent.cc: 43 - use TMath::Abs instead of abs 44 45 * msim/MSimPointingPos.[h,cc]: 46 - moved getter and setter to source file to avoid including of 47 TMath 48 49 50 20 51 2009/02/26 Daniel Hoehne-Moench 21 52 -
trunk/MagicSoft/Mars/NEWS
r9359 r9367 93 93 94 94 * Now outputs MSrcPosCam for Monte Carlos in the Events tree. 95 96 ;ganymed 97 98 * added pointing model 328198 95 99 96 100 ;sponde -
trunk/MagicSoft/Mars/ganymed.rc
r9078 r9367 56 56 #MPointingDevCalc.MaxAge 1.0 57 57 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198 59 59 60 60 # ------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/ganymed_onoff.rc
r9078 r9367 56 56 #MPointingDevCalc.MaxAge 1.0 57 57 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198 59 59 60 60 # ------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/ganymed_wobble.rc
r9078 r9367 56 56 #MPointingDevCalc.MaxAge 1.0 57 57 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 58 MPointingDevCalc.PointingModels: 1 81855 83722 89180 267253 291104 328198 59 59 60 60 # ------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mbase/MSpline3.h
r9312 r9367 54 54 Int_t GetNp() const { return fNp; } 55 55 56 TH1 *GetHistogram() const { return fHistogram; }56 TH1 *GetHistogram() const { return (TH1*)fHistogram; } 57 57 58 58 ClassDef(MSpline3, 1) // An extension of the TSpline3 -
trunk/MagicSoft/Mars/melectronics/MPulseShape.cc
r9312 r9367 33 33 34 34 #include <TF1.h> 35 #include <TH1.h> 35 36 36 37 #include "MLog.h" -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.cc
r9302 r9367 115 115 { 116 116 case kGauss: 117 fFunc=new TF1("", MString::Format("gaus(0) + pol%d(3)", fPolynomOrder) );117 fFunc=new TF1("", MString::Format("gaus(0) + pol%d(3)", fPolynomOrder).Data()); 118 118 break; 119 119 case kThetaSq: … … 417 417 /* 418 418 cout << MMath::SignificanceLiMaSigned(hon.Integral(1, bin), fit.GetEventsBackground()/sc, sc) << " "; 419 cout << sc << " " ;419 cout << sc << " " << fit.GetEventsBackground() << " "; 420 420 cout << fit.fChiSqBg << endl; 421 421 */ … … 847 847 return 0; 848 848 return -GetSignificance()*TMath::Log10(GetEventsExcess()); 849 case kSignificanceSqrtExcess: 850 if (GetEventsExcess()<1) 851 return 0; 852 return -GetSignificance()*TMath::Sqrt(GetEventsExcess()); 849 853 case kSignificanceExcess: 850 854 return -GetSignificance()*GetEventsExcess(); -
trunk/MagicSoft/Mars/mhflux/MAlphaFitter.h
r9302 r9367 30 30 kSignificanceChi2, 31 31 kSignificanceLogExcess, 32 kSignificanceSqrtExcess, 32 33 kSignificanceExcess, 33 34 kExcess, -
trunk/MagicSoft/Mars/mhflux/MHFalseSource.cc
r9303 r9367 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.2 5 2009-02-07 20:47:33 tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHFalseSource.cc,v 1.26 2009-03-01 12:51:03 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 1189 1189 } 1190 1190 1191 TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom) , 0, 90);1192 TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom) , 0, 90);1191 TF1 f1("f1", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom).Data(), 0, 90); 1192 TF1 f2("f2", MString::Format("gaus(0) + pol%d(3)", fHistOff ? 0 : polynom).Data(), 0, 90); 1193 1193 f1.SetParameters(maxpar.GetArray()); 1194 1194 f2.SetParameters(maxpar.GetArray()); -
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r9328 r9367 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.11 7 2009-02-12 20:05:06tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MHCamera.cc,v 1.118 2009-03-01 12:51:03 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 2245 2245 const Double_t width = xmax-xmin; 2246 2246 2247 const TStringdgausformula = "([0]-[3])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"2247 const char *dgausformula = "([0]-[3])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])" 2248 2248 "+[3]/[5]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])"; 2249 2249 2250 const TStringtgausformula = "([0]-[3]-[6])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])"2250 const char *tgausformula = "([0]-[3]-[6])/[2]*exp(-0.5*(x-[1])*(x-[1])/[2]/[2])" 2251 2251 "+[3]/[5]*exp(-0.5*(x-[4])*(x-[4])/[5]/[5])" 2252 2252 "+[6]/[8]*exp(-0.5*(x-[7])*(x-[7])/[8]/[8])"; -
trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc
r9345 r9367 1936 1936 1937 1937 // Spectrum fitted (convert res[1] from TeV to GeV) 1938 TF1 flx("flx", MString::Format("%e*pow(x/500, %f)", res[1]/500, res[0]) );1938 TF1 flx("flx", MString::Format("%e*pow(x/500, %f)", res[1]/500, res[0]).Data()); 1939 1939 1940 1940 // Number of events this spectrum would produce per s and m^2 -
trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc
r9348 r9367 266 266 MH::FindGoodLimits(num, num, xmin, xmax, kTRUE); 267 267 268 MBinning( abs(num), xmin-.5, xmax-.5).Apply(fHistWL);268 MBinning(TMath::Abs(num), xmin-.5, xmax-.5).Apply(fHistWL); 269 269 270 270 return kTRUE; -
trunk/MagicSoft/Mars/msim/MSimPointingPos.cc
r9362 r9367 92 92 } 93 93 94 // -------------------------------------------------------------------------- 95 // 96 // Get the distance from the real source to the poitning position. 97 // 98 Double_t MSimPointingPos::GetOffTargetDistance() const 99 { 100 return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); 101 } 102 103 // -------------------------------------------------------------------------- 104 // 105 // Get the phi angle counted from the upward direction the source position 106 // is rotated. distance from the real source to the pointing position. 107 // A negative value refers to a random distribution. 108 // 109 Double_t MSimPointingPos::GetOffTargetPhi() const 110 { 111 return fOffTargetPhi<0 ? -1 : fOffTargetPhi*TMath::RadToDeg(); 112 } 113 114 // -------------------------------------------------------------------------- 115 // 116 // Set fOffTargetDistance, see also GetOffTargetDistance 117 // 118 void MSimPointingPos::SetOffTargetDistance(Double_t d) 119 { 120 fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); 121 } 122 123 // -------------------------------------------------------------------------- 124 // 125 // Set fOffTargetPhi, see also GetOffTargetPhi 126 // 127 void MSimPointingPos::SetOffTargetPhi(Double_t p) 128 { 129 fOffTargetPhi = p<0 ? -1 : p*TMath::DegToRad(); 130 } 131 132 94 133 95 134 // -------------------------------------------------------------------------- … … 153 192 { 154 193 dtheta = fOffTargetDistance; 155 dphi = fOffTargetPhi> 0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());194 dphi = fOffTargetPhi>=0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi()); 156 195 } 157 196 else -
trunk/MagicSoft/Mars/msim/MSimPointingPos.h
r9362 r9367 36 36 37 37 // Getter 38 Double_t GetOffTargetDistance() const { return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); }39 Double_t GetOffTargetPhi() const { return fOffTargetPhi*TMath::RadToDeg(); }38 Double_t GetOffTargetDistance() const; 39 Double_t GetOffTargetPhi() const; 40 40 41 41 // Setter 42 void SetOffTargetDistance(Double_t d=0) { fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); }43 void SetOffTargetPhi(Double_t p= 0) { fOffTargetPhi = p*TMath::DegToRad(); }42 void SetOffTargetDistance(Double_t d=0); 43 void SetOffTargetPhi(Double_t p=-1); 44 44 45 45 // MSimPointingPos
Note:
See TracChangeset
for help on using the changeset viewer.