Changeset 1852 for trunk/MagicSoft


Ignore:
Timestamp:
03/21/03 11:10:36 (22 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r1851 r1852  
    11                                                 -*-*- END OF LINE -*-*-
     2
     3 2003/03/21: Thomas Bretz
     4    * manalysis/MEnergyEstParam.[h,cc]
     5      - Added StopMapping and Print functions.
     6
     7 2003/03/21: Abelardo Moralejo
     8
     9    * mhist/MHMatrix.[h,cc]:
     10      - Added third argument (a filter) to the second instantiation
     11        of the Fill procedure.
     12
     13    * macros/CT1EnergyEst.C:
     14      - Example of the parameter calculation and use of the energy
     15        estimation method for CT1.
     16
    217
    318 2003/03/21: Thomas Bretz
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.cc

    r1844 r1852  
    177177// --------------------------------------------------------------------------
    178178//
    179 // Set the four coefficients for the estimation of the impact parameter.
     179// Set the five coefficients for the estimation of the impact parameter.
    180180// Argument must ba a TArrayD of size 5.
    181181//
     
    193193// --------------------------------------------------------------------------
    194194//
    195 // Set the four coefficients for the estimation of the energy.
     195// Set the seven coefficients for the estimation of the energy.
    196196// Argument must ba a TArrayD of size 7.
    197197//
     
    209209// --------------------------------------------------------------------------
    210210//
    211 // Set the four coefficients for the estimation of impact and energy.
     211// Set the twelve coefficients for the estimation of impact and energy.
    212212// Argument must ba a TArrayD of size 12.
    213213//
     
    261261}
    262262
     263void MEnergyEstParam::StopMapping()
     264{
     265    fMatrix = NULL;
     266    fPairs->Clear();
     267    fHillasSrc->Clear();
     268    fEnergy->Clear();
     269}
     270
    263271// --------------------------------------------------------------------------
    264272//
     
    272280
    273281    AddToBranchList(hillas+".fDist");
     282}
     283
     284void MEnergyEstParam::Print(Option_t *opt)
     285{
     286    for (int i=0; i<fA.GetSize(); i++)
     287      *fLog << all << "fA[" << i << "]=" << fA[i] << endl;
     288    for (int i=0; i<fB.GetSize(); i++)
     289      *fLog << all << "fB[" << i << "]=" << fB[i] << endl;
    274290}
    275291
     
    295311
    296312    /* MY PARAM */
    297     const Double_t e1 = fB[0] + fB[1]*size + fB[3]*length + fB[4]*size*width;
    298     const Double_t e2 = fB[2] + fB[5]*size*width;
     313    //const Double_t e1 = fB[0] + fB[1]*size + fB[3]*length + fB[4]*size*width;
     314    //const Double_t e2 = fB[2] + fB[5]*size*width;
    299315
    300316    /* MARCOS */
    301     //const Double_t e1 = fB[0] + fB[1]*size + fB[3]*length + fB[4]*size*length;
    302     //const Double_t e2 = fB[2] + fB[5]*length;
     317    const Double_t e1 = fB[0] + fB[1]*size + fB[3]*length + fB[4]*size*length;
     318    const Double_t e2 = fB[2] + fB[5]*length;
    303319
    304320    TIter NextH(fHillasSrc);
     
    317333
    318334        /* MARCOS */
    319         //const Double_t ir = i0 * (i1 + fA[1]*dist); // [cm]
    320         /*const*/// Double_t er = e0 * (e1 + e2*ir);      // [GeV]
     335        const Double_t ir = i0 * (i1 + fA[1]*dist); // [cm]
     336        /*const*/ Double_t er = e0 * (e1 + e2*0/*ir*/);      // [GeV]
    321337
    322338        /* MY PARAM */
    323339        // if (width==0) return kCONTINUE;
    324         const Double_t ir = i0 * (i1 + dist*(fA[1]/width + fA[4]/log10(size))); // [cm]
    325         Double_t er = e0 * (e1 + e2*ir);      // [GeV]
     340        //const Double_t ir = i0 * (i1 + dist*(fA[1]/width + fA[4]/log10(size))); // [cm]
     341        //Double_t er = e0 * (e1 + e2*ir);      // [GeV]
    326342
    327343        /* MKA */
     
    339355        }
    340356
    341         est->SetEnergy(er);
     357        est->SetEnergy(er);
    342358        est->SetImpact(ir);
    343359        est->SetReadyToSave();
  • trunk/MagicSoft/Mars/manalysis/MEnergyEstParam.h

    r1847 r1852  
    5050
    5151    void InitMapping(MHMatrix *mat);
     52    void StopMapping();
    5253
    5354    Int_t GetNumCoeff() const { return fA.GetSize()+fB.GetSize(); }
     
    5758    void SetCoeffB(const TArrayD &arr);
    5859
     60    void Print(Option_t *o=NULL);
     61
    5962    ClassDef(MEnergyEstParam, 0) // Task to estimate the energy
    6063};
  • trunk/MagicSoft/Mars/mhist/MHMatrix.cc

    r1831 r1852  
    6868#include "MData.h"
    6969#include "MDataArray.h"
     70#include "MF.h"
     71
    7072
    7173ClassImp(MHMatrix);
     
    600602// --------------------------------------------------------------------------
    601603//
    602 Bool_t MHMatrix::Fill(MParList *plist, MTask *read)
     604Bool_t MHMatrix::Fill(MParList *plist, MTask *read, MF *filter)
    603605{
    604606    //
     
    614616
    615617    tlist.AddToList(read);
     618
     619
     620    if (filter)
     621      {
     622        tlist.AddToList(filter);
     623        fillh.SetFilter(filter);
     624      }
     625
    616626    tlist.AddToList(&fillh);
     627
    617628
    618629    MEvtLoop evtloop;
  • trunk/MagicSoft/Mars/mhist/MHMatrix.h

    r1829 r1852  
    2222class MParList;
    2323class MDataArray;
     24class MF;
    2425
    2526class MHMatrix : public MH
     
    9293    Double_t operator[](Int_t col) { return fM(fRow, col); }
    9394
    94     Bool_t Fill(MParList *plist, MTask *read);
     95    Bool_t Fill(MParList *plist, MTask *read, MF *filter=0);
    9596
    9697    TString GetDataMember() const;
  • trunk/MagicSoft/Mars/mhist/Makefile

    r1821 r1852  
    2323#
    2424INCLUDES = -I. -I../mbase -I../mraw -I../manalysis -I../mmc \
    25            -I../mgui -I../mgeom -I../mdata
     25           -I../mgui -I../mgeom -I../mdata -I../mfilter
    2626
    2727#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.