Ignore:
Timestamp:
07/10/03 12:34:10 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCT1SupercutsCalc.cc

    r2225 r2272  
    144144    fAlphaUp[7] = 0.;
    145145    //---------------------------------
     146}
     147
     148// --------------------------------------------------------------------------
     149//
     150// Set the parameter values from vector 'par'
     151//
     152// Attention : it is assumed that there are (9*ncutpar) values
     153//
     154void MCT1SupercutsCalc::SetParams(Double_t *par)
     155{
     156    UInt_t ncutpar = fLengthUp.GetSize();
     157    UInt_t k0 = 0;
     158
     159    TArrayD lup(ncutpar,     par + k0);
     160    SetLengthUp(lup);
     161    k0 += ncutpar;
     162
     163    TArrayD wup(ncutpar,     par + k0);
     164    SetWidthUp(wup);
     165    k0 += ncutpar;
     166
     167    TArrayD dup(ncutpar,     par + k0);
     168    SetDistUp(dup);
     169    k0 += ncutpar;
     170
     171    TArrayD llo(ncutpar,     par + k0);
     172    SetLengthLo(llo);
     173    k0 += ncutpar;
     174
     175    TArrayD wlo(ncutpar,     par + k0);
     176    SetWidthLo(wlo);
     177    k0 += ncutpar;
     178
     179    TArrayD dlo(ncutpar,     par + k0);
     180    SetDistLo(dlo);
     181    k0 += ncutpar;
     182
     183    TArrayD aup(ncutpar,     par + k0);
     184    SetAsymUp(aup);
     185    k0 += ncutpar;
     186
     187    TArrayD alo(ncutpar,     par + k0);
     188    SetAsymLo(alo);
     189    k0 += ncutpar;
     190
     191    TArrayD alphaup(ncutpar, par + k0);
     192    SetAlphaUp(alphaup);
     193}
     194
     195// --------------------------------------------------------------------------
     196//
     197// Get the parameter values
     198//
     199// Attention : it is assumed that there are (9*ncutpar) values
     200//
     201void MCT1SupercutsCalc::GetParams(Double_t *par)
     202{
     203    UInt_t ncutpar = fLengthUp.GetSize();
     204    UInt_t k0 = 0;
     205
     206    for (UInt_t j=0; j<ncutpar; j++)
     207    {
     208      UInt_t k = k0 + j;
     209      par[k] = fLengthUp[j];
     210    }
     211    k0 += ncutpar;
     212
     213    for (UInt_t j=0; j<ncutpar; j++)
     214    {
     215      UInt_t k = k0 + j;
     216      par[k] = fWidthUp[j];
     217    }
     218    k0 += ncutpar;
     219
     220    for (UInt_t j=0; j<ncutpar; j++)
     221    {
     222      UInt_t k = k0 + j;
     223      par[k] = fDistUp[j];
     224    }
     225    k0 += ncutpar;
     226
     227    for (UInt_t j=0; j<ncutpar; j++)
     228    {
     229      UInt_t k = k0 + j;
     230      par[k] = fLengthLo[j];
     231    }
     232    k0 += ncutpar;
     233
     234    for (UInt_t j=0; j<ncutpar; j++)
     235    {
     236      UInt_t k = k0 + j;
     237      par[k] = fWidthLo[j];
     238    }
     239    k0 += ncutpar;
     240
     241    for (UInt_t j=0; j<ncutpar; j++)
     242    {
     243      UInt_t k = k0 + j;
     244      par[k] = fDistLo[j];
     245    }
     246    k0 += ncutpar;
     247
     248    for (UInt_t j=0; j<ncutpar; j++)
     249    {
     250      UInt_t k = k0 + j;
     251      par[k] = fAsymUp[j];
     252    }
     253    k0 += ncutpar;
     254
     255    for (UInt_t j=0; j<ncutpar; j++)
     256    {
     257      UInt_t k = k0 + j;
     258      par[k] = fAsymLo[j];
     259    }
     260    k0 += ncutpar;
     261
     262    for (UInt_t j=0; j<ncutpar; j++)
     263    {
     264      UInt_t k = k0 + j;
     265      par[k] = fAlphaUp[j];
     266    }
    146267}
    147268
     
    275396    fMap[5] = fMatrix->AddColumn("MHillas.fMeanY");
    276397    fMap[6] = fMatrix->AddColumn("MHillasSrc.fDist");
     398    fMap[7] = fMatrix->AddColumn("MHillasSrc.fAlpha");
    277399}
    278400
     
    332454    return kTRUE;
    333455}
    334 
    335 
    336 
    337 
    338 
    339 
    340 
    341 
    342 
    343 
    344 
    345 
    346 
     456//==========================================================================
Note: See TracChangeset for help on using the changeset viewer.