Changeset 8073 for trunk/MagicSoft/Mars
- Timestamp:
- 10/16/06 19:43:37 (18 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/manalysis/MEnergyEstimate.cc
r7149 r8073 34 34 // "(4.4*MHillas.fSize*MHillas.fLength) + (5.5*MHillasSrc.fDist*MHillas.fLength)"); 35 35 // 36 // For description of rules, see MData Chain.36 // For description of rules, see MDataPhrase. 37 37 // 38 38 // The default rule is "MMcEvt.fEnergy" -
trunk/MagicSoft/Mars/manalysis/MParameterCalc.cc
r7150 r8073 33 33 // "(4.4*MHillas.fSize*MHillas.fLength) + (5.5*MHillasSrc.fDist*MHillas.fLength)"); 34 34 // 35 // For description of rules, see MData Chain.35 // For description of rules, see MDataPhrase. 36 36 // 37 37 // Output: … … 43 43 #include "MParList.h" 44 44 45 #include "MData Chain.h"45 #include "MDataPhrase.h" 46 46 #include "MParameters.h" 47 47 … … 63 63 fTitle = title ? title : "Task to calculate a MParameterD"; 64 64 65 fData = new MData Chain(def);65 fData = new MDataPhrase(def); 66 66 } 67 67 … … 77 77 // -------------------------------------------------------------------------- 78 78 // 79 // Delete fData. Initialize a new MData Chainwith rule.79 // Delete fData. Initialize a new MDataPhrase with rule. 80 80 // Returns if fData->IsValid() 81 81 // … … 83 83 { 84 84 delete fData; 85 fData = new MData Chain(rule);85 fData = new MDataPhrase(rule); 86 86 87 87 return fData->IsValid(); … … 183 183 // MyEstimator.1: 5.5 184 184 // 185 // For more details see MData Chain::ReadEnv185 // For more details see MDataPhrase::ReadEnv 186 186 // 187 187 Int_t MParameterCalc::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 188 188 { 189 MData Chain *f = new MDataChain;189 MDataPhrase *f = new MDataPhrase; 190 190 f->SetName(fName); 191 191 -
trunk/MagicSoft/Mars/manalysis/MParameterCalc.h
r7150 r8073 12 12 { 13 13 private: 14 MData *fData; //-> Input MData Chainwith rule14 MData *fData; //-> Input MDataPhrase with rule 15 15 MParameterD *fParameter; //! Output parameter 16 16 -
trunk/MagicSoft/Mars/mbase/MMath.cc
r8029 r8073 554 554 // An exact solution of the cubic polynomial equation: 555 555 // 556 // x^3 + a*x^2 + b*x + c = 0556 // x^3 + a*x^2 + b*x + c = 0 557 557 // 558 558 // was first published by Gerolamo Cardano (1501-1576) in his treatise, … … 563 563 // discovered. Zeno source code 564 564 // 565 // http://home.att.net/~srschmitt/cubizen.html 566 // 565 567 // % compute real or complex roots of cubic polynomial 566 568 // function cubic( var z1, z2, z3 : real, a, b, c : real ) : real … … 598 600 // end function 599 601 // 602 // see also http://en.wikipedia.org/wiki/Cubic_equation 603 // 600 604 Int_t MMath::SolvePol3(Double_t a, Double_t b, Double_t c, 601 605 Double_t &x1, Double_t &x2, Double_t &x3) 602 606 { 607 // Double_t coeff[4] = { 1, a, b, c }; 608 // return TMath::RootsCubic(coeff, x1, x2, x3) ? 1 : 3; 609 603 610 const Double_t Q = (a*a - 3*b)/9; 604 611 const Double_t R = (9*b*a - 27*c - 2*a*a*a)/54; … … 607 614 // ----- The single-real / duplicate-roots solution ----- 608 615 616 // D<0: three real roots 617 // D>0: one real root 618 // D==0: maximum two real roots (two identical roots) 619 620 // R==0: only one unique root 621 // R!=0: two roots 622 609 623 if (D==0) 610 624 { 611 625 const Double_t r = MMath::Sqrt3(R); 612 626 613 x1 = 2*r - a/3.; // real root 614 x2 = r - a/3.; // real root 615 627 x1 = r - a/3.; // real root 628 if (R==0) 629 return 1; 630 631 x2 = 2*r - a/3.; // real root 616 632 return 2; 617 633 } -
trunk/MagicSoft/Mars/mdata/DataLinkDef.h
r3666 r8073 14 14 #pragma link C++ class MDataFormula+; 15 15 16 #pragma link C++ class MDataPhrase+; 17 16 18 #endif -
trunk/MagicSoft/Mars/mdata/MDataList.cc
r7804 r8073 310 310 // 311 311 // Builds a rule from all the list members. This is a rule which could 312 // be used to rebuild the list using the constructor of a MData Chain312 // be used to rebuild the list using the constructor of a MDataPhrase 313 313 // 314 314 TString MDataList::GetRule() const -
trunk/MagicSoft/Mars/mdata/MDataMember.cc
r3572 r8073 187 187 // -------------------------------------------------------------------------- 188 188 // 189 // Builds a rule which c n be used in a MDataChainto describe this object189 // Builds a rule which can be used in a MDataPhrase to describe this object 190 190 // 191 191 TString MDataMember::GetRule() const -
trunk/MagicSoft/Mars/mdata/Makefile
r3927 r8073 16 16 17 17 SRCFILES = MData.cc \ 18 MDataPhrase.cc \ 18 19 MDataArray.cc \ 19 20 MDataElement.cc \ -
trunk/MagicSoft/Mars/mhbase/MH.cc
r8047 r8073 1322 1322 // 1323 1323 // see http://root.cern.ch/phpBB2/viewtopic.php?p=14818 1324 // see http://savannah.cern.ch/bugs/?20722 1324 1325 // 1325 1326 void MH::SetBinomialErrors(TH1 &hres, const TH1 &h1, const TH1 &h2, Double_t c1, Double_t c2) … … 1329 1330 const Double_t b1 = h1.GetBinContent(binx); 1330 1331 const Double_t b2 = h2.GetBinContent(binx); 1331 const Double_t w = c2*b2 ? (c1*b1)/(c2*b2) : 0;1332 1332 const Double_t e1 = h2.GetBinError(binx); 1333 1333 const Double_t e2 = h1.GetBinError(binx); 1334 1334 1335 const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2); 1335 //const Double_t w = c2*b2 ? (c1*b1)/(c2*b2) : 0; 1336 //const Double_t rc = ((1-2*w)*e1*e1+w*w*e2*e2)/(b2*b2); 1337 1338 const Double_t c = c2==0 ? 1 : c1/c2; 1339 const Double_t u = b2==0 ? 0 : b1/b2; 1340 1341 const Double_t rc = c*((1-2*u)*e1*e1+u*u*e2*e2)/(b2*b2); 1336 1342 1337 1343 hres.SetBinError(binx, TMath::Sqrt(TMath::Abs(rc)));
Note:
See TracChangeset
for help on using the changeset viewer.