Changeset 2119 for trunk


Ignore:
Timestamp:
05/16/03 16:19:11 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2117 r2119  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/05/16: Abelardo Moralejo
     4
     5   * mmontecarlo/MMcEnergyEst.[h,cc]
     6     - Added SetCoeff
    27
    38 2003/05/16: Thomas Bretz
  • trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.cc

    r2062 r2119  
    9696    SetHillasName("MHillas");
    9797    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
     122Bool_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
    98137}
    99138
     
    196235
    197236  //
    198   // Set initial values of the parameters (close enough to the final ones, taken
    199   // from previous runs of the procedure). Parameter fA[4] is not used in the default
    200   // 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   //
    219237  // Set starting values and step sizes for parameters
    220238  //
  • trunk/MagicSoft/Mars/mmontecarlo/MMcEnergyEst.h

    r2031 r2119  
    4444  Double_t GetCoeff(Int_t i) { return i<fA.GetSize()? fA[i] : fB[i-fA.GetSize()]; }
    4545
     46  Bool_t SetCoeff(TArrayD &coeff);
     47
    4648  void FindParams();
    4749  void Print(Option_t *o="");
Note: See TracChangeset for help on using the changeset viewer.