Changeset 2119
- Timestamp:
- 05/16/03 16:19:11 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2117 r2119 1 1 -*-*- END OF LINE -*-*- 2 3 2003/05/16: Abelardo Moralejo 4 5 * mmontecarlo/MMcEnergyEst.[h,cc] 6 - Added SetCoeff 2 7 3 8 2003/05/16: Thomas Bretz -
trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc
r2062 r2119 96 96 SetHillasName("MHillas"); 97 97 SetHillasSrcName("MHillasSrc"); 98 99 // 100 // Set initial values of the parameters (close enough to the final 101 // ones, taken from previous runs of the procedure). Parameter 102 // fA[4] is not used in the default energy estimation model (from 103 // D. Kranich). 104 // 105 fA.Set(5); 106 fB.Set(7); 107 108 fA[0] = 21006.2; 109 fA[1] = -43.2648; 110 fA[2] = -690.403; 111 fA[3] = -0.0428544; 112 fA[4] = 1.; 113 fB[0] = -3391.05; 114 fB[1] = 136.58; 115 fB[2] = 0.253807; 116 fB[3] = 254.363; 117 fB[4] = 61.0386; 118 fB[5] = -0.0190984; 119 fB[6] = -421695; 120 } 121 122 Bool_t MMcEnergyEst::SetCoeff(TArrayD &coeff) 123 { 124 if (coeff.GetSize() != fA.GetSize()+fB.GetSize()) 125 { 126 *fLog << err << dbginf << "Wrong number of parameters!" << endl; 127 return(kFALSE); 128 } 129 130 for (Int_t i = 0; i < fA.GetSize(); i++) 131 fA[i] = coeff[i]; 132 for (Int_t i = 0; i < fB.GetSize(); i++) 133 fB[i] = coeff[i+fA.GetSize()]; 134 135 return(kTRUE); 136 98 137 } 99 138 … … 196 235 197 236 // 198 // Set initial values of the parameters (close enough to the final ones, taken199 // from previous runs of the procedure). Parameter fA[4] is not used in the default200 // energy estimation model (from D. Kranich).201 //202 fA.Set(5);203 fB.Set(7);204 205 fA[0] = 21006.2;206 fA[1] = -43.2648;207 fA[2] = -690.403;208 fA[3] = -0.0428544;209 fA[4] = 1.;210 fB[0] = -3391.05;211 fB[1] = 136.58;212 fB[2] = 0.253807;213 fB[3] = 254.363;214 fB[4] = 61.0386;215 fB[5] = -0.0190984;216 fB[6] = -421695;217 218 //219 237 // Set starting values and step sizes for parameters 220 238 // -
trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h
r2031 r2119 44 44 Double_t GetCoeff(Int_t i) { return i<fA.GetSize()? fA[i] : fB[i-fA.GetSize()]; } 45 45 46 Bool_t SetCoeff(TArrayD &coeff); 47 46 48 void FindParams(); 47 49 void Print(Option_t *o="");
Note:
See TracChangeset
for help on using the changeset viewer.