Changeset 7749 for trunk


Ignore:
Timestamp:
05/29/06 15:58:38 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7746 r7749  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2006/05/29 Thomas Bretz
     22
     23   * mbase/MEnv.cc:
     24     - included THashList for compatibility with root 5.10/00
     25
     26   * mdata/MDataArray.[h,cc]:
     27     - included TVector in header for compatibility with root 5.10/00
     28
     29   * mgui/MHexagon.cc:
     30     - changed argument of PaintFillArea from Float_t to Double_t
     31       for compatibility with root 5.10/00
     32
     33   * mhbase/MHMatrix.[h,cc]:
     34     - added some #ifdef for compatibility with root 5.10/00
     35     - included TVector in the header for compatibility with
     36       root 5.10/00
     37
     38   * mjtrain/MJTrainDisp.cc:
     39     - added the possibility to set weights
     40     - added new histogram to show avg psf versus energy
     41
     42   * mjtrain/MJTrainRanForest.cc:
     43     - included TFile for compatibility with root 5.10/00
     44
     45   * mranforest/MRanForest.[h,cc]:
     46     - included TMatrix and TVector in header for compatibilty
     47       with root 5.10/00
     48
     49   * mtools/MHSimulatedAnnealing.[h,cc]:
     50     - included TMatrix and TVector in header for compatibilty
     51       with root 5.10/00
     52
     53
    2054
    2155 2006/05/24
  • trunk/MagicSoft/Mars/mbase/MEnv.cc

    r7534 r7749  
    4040#include <TAttText.h>
    4141#include <TAttMarker.h>
     42#include <THashList.h>   // needed since root v5.10/00 (TEnv::GetTable)
    4243
    4344#include "MLog.h"
  • trunk/MagicSoft/Mars/mdata/MDataArray.cc

    r7130 r7749  
    3535#include <fstream>
    3636
    37 #include <TVector.h>
    38 
    3937#include "MLog.h"
    4038#include "MLogManip.h"
  • trunk/MagicSoft/Mars/mdata/MDataArray.h

    r7169 r7749  
    33
    44/////////////////////////////////////////////////////////////////////////////
    5 //             
    6 //  MDataArray 
     5//
     6//  MDataArray
    77//
    88/////////////////////////////////////////////////////////////////////////////
     
    1515#endif
    1616
    17 class TVector;
     17#ifndef ROOT_TVector
     18#include <TVector.h>
     19#endif
    1820
    1921class MData;
  • trunk/MagicSoft/Mars/mgui/MHexagon.cc

    r3514 r7749  
    284284    const Int_t np = 6;
    285285
    286     const Float_t dx[np+1] = { .5   , 0.    , -.5   , -.5   , 0.    ,  .5   , .5    };
    287     const Float_t dy[np+1] = { .2886,  .5772,  .2886, -.2886, -.5772, -.2886, .2886 };
     286    const Double_t dx[np+1] = { .5   , 0.    , -.5   , -.5   , 0.    ,  .5   , .5    };
     287    const Double_t dy[np+1] = { .2886,  .5772,  .2886, -.2886, -.5772, -.2886, .2886 };
    288288
    289289    //
    290290    //  calculate the positions of the pixel corners
    291291    //
    292     Float_t x[np+1], y[np+1];
     292    Double_t x[np+1], y[np+1];
    293293    for (Int_t i=0; i<np+1; i++)
    294294    {
  • trunk/MagicSoft/Mars/mhbase/MHMatrix.cc

    r7413 r7749  
    5353#include <TArrayD.h>
    5454#include <TArrayI.h>
    55 #include <TVector.h>
    5655
    5756#include <TH1.h>
     
    421420        avg /= rows;
    422421
     422#if ROOT_VERSION_CODE > ROOT_VERSION(5,00,00)
     423        TMatrixFColumn(m, x) += -avg;
     424#else
    423425        TMatrixColumn(m, x) += -avg;
     426#endif
    424427    }
    425428
     
    924927    //
    925928    TVector v(fM.GetNrows());
     929#if ROOT_VERSION_CODE > ROOT_VERSION(5,00,00)
     930    v = TMatrixFColumn_const(fM, refcolumn);
     931#else
    926932    v = TMatrixColumn(fM, refcolumn);
     933#endif
    927934    //v += -frombin;
    928935    //v *= 1/dbin;
     
    12601267    for (int i=0; i<m.GetNrows(); i++)
    12611268    {
     1269#if ROOT_VERSION_CODE > ROOT_VERSION(5,00,00)
     1270        const TMatrixFRow_const &row = TMatrixFRow_const(m, i);
     1271#else
    12621272        const TMatrixRow &row = TMatrixRow(m, i);
    1263 
     1273#endif
    12641274        // finite (-> math.h) checks for NaN as well as inf
    12651275        int jcol;
  • trunk/MagicSoft/Mars/mhbase/MHMatrix.h

    r7413 r7749  
    99#include <TMatrix.h>
    1010#endif
     11
    1112#ifndef MARS_MH
    1213#include "MH.h"
    1314#endif
    1415
     16#ifndef ROOT_TVector
     17#include <TVector.h>
     18#endif
     19
    1520class TArrayI;
    1621class TArrayF;
    17 class TVector;
    1822class TH1F;
    1923
  • trunk/MagicSoft/Mars/mjtrain/MJTrainDisp.cc

    r7552 r7749  
    115115    MHMatrix train("Train");
    116116    train.AddColumns(fRules);
     117    if (fEnableWeights)
     118        train.AddColumn("MWeight.fVal");
    117119    train.AddColumn("MHillasSrc.fDist*MGeomCam.fConvMm2Deg");
    118120    //train.AddColumn("TMath::Hypot(MHillasSrc.fDCA, MHillasSrc.fDist)*MGeomCam.fConvMm2Deg");
     
    126128    fill.AddPreCuts(fPreCuts);
    127129    fill.AddPreCuts(fTrainCuts);
     130    fill.AddPreTasks(fPreTasks);
     131    fill.AddPostTasks(fPostTasks);
    128132    if (!fill.Process())
    129133        return kFALSE;
     
    135139    rf.SetNumTry(fNumTry);
    136140    rf.SetNumObsoleteVariables(1);
     141    rf.SetLastDataColumnHasWeights(fEnableWeights);
    137142    rf.SetDisplay(fDisplay);
    138143    rf.SetLogStream(fLog);
     
    191196    MFillH fillh(&hist, "", "FillThetaSq");
    192197
     198    // 0 =  disp^2 - 2*disp*dist*cos(alpha) + dist^2
     199
     200    // cos^2 -1 = - sin^2
     201
     202    // disp = +dist* (cos(alpha) +/- sqrt(cos^2(alpha) - 1) )
     203
    193204    const char *rule = "(MHillasSrc.fDist*MGeomCam.fConvMm2Deg)^2 + (Disp.fVal)^2 - (2*MHillasSrc.fDist*MGeomCam.fConvMm2Deg*Disp.fVal*cos(MHillasSrc.fAlpha*kDeg2Rad))";
    194205
     
    199210    eval.SetY1("sqrt(ThetaSquared.fVal)");
    200211
    201     MH3 hdisp("MHillas.fSize", "sqrt(ThetaSquared.fVal)");
    202     hdisp.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]");
    203 
    204     MBinning binsx(100, 10, 100000, "BinningMH3X", "log");
    205     MBinning binsy(100, 0,  2,      "BinningMH3Y", "lin");
     212    MH3 hdisp1("MHillas.fSize",  "sqrt(ThetaSquared.fVal)");
     213    MH3 hdisp2("MMcEvt.fEnergy", "sqrt(ThetaSquared.fVal)");
     214    hdisp1.SetTitle("\\vartheta distribution vs. Size:Size [phe]:\\vartheta [\\circ]");
     215    hdisp2.SetTitle("\\vartheta distribution vs. Energy:Enerhy [GeV]:\\vartheta [\\circ]");
     216
     217    MBinning binsx(50, 10, 100000, "BinningMH3X", "log");
     218    MBinning binsy(50, 0,  1,      "BinningMH3Y", "lin");
    206219
    207220    plist.AddToList(&binsx);
    208221    plist.AddToList(&binsy);
    209222
    210     MFillH fillh2(&hdisp, "", "FillMH3");
    211     fillh2.SetDrawOption("blue profx");
     223    MFillH fillh2a(&hdisp1, "", "FillSize");
     224    MFillH fillh2b(&hdisp2, "", "FillEnergy");
     225    fillh2a.SetDrawOption("blue profx");
     226    fillh2b.SetDrawOption("blue profx");
     227    fillh2a.SetNameTab("Size");
     228    fillh2b.SetNameTab("Energy");
    212229
    213230    tlist.AddToList(&readtst);
     
    216233    tlist.AddToList(&calcthetasq);
    217234    tlist.AddToList(&fillh);
    218     tlist.AddToList(&fillh2);
     235    tlist.AddToList(&fillh2a);
     236    tlist.AddToList(&fillh2b);
    219237    tlist.AddToList(&eval);
    220238
  • trunk/MagicSoft/Mars/mjtrain/MJTrainRanForest.cc

    r7710 r7749  
    1818!   Author(s): Thomas Bretz 11/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2005
     20!   Copyright: MAGIC Software Development, 2005-2006
    2121!
    2222!
     
    3131/////////////////////////////////////////////////////////////////////////////
    3232#include "MJTrainRanForest.h"
     33
     34#include <TFile.h>
    3335
    3436#include "MLog.h"
  • trunk/MagicSoft/Mars/mranforest/MRanForest.cc

    r7724 r7749  
    4242#include "MRanForest.h"
    4343
    44 #include <TVector.h>
    4544#include <TRandom.h>
    4645
  • trunk/MagicSoft/Mars/mranforest/MRanForest.h

    r7693 r7749  
    1818#endif
    1919
    20 class TMatrix;
    21 class TVector;
     20#ifndef ROOT_TMatrix
     21#include <TMatrix.h>
     22#endif
     23
     24#ifndef ROOT_TVector
     25#include <TVector.h>
     26#endif
     27
    2228class TObjArray;
    2329
  • trunk/MagicSoft/Mars/mtools/MHSimulatedAnnealing.cc

    r5832 r7749  
    3333#include "MHSimulatedAnnealing.h"
    3434
    35 #include <TVector.h>
    36 #include <TMatrix.h>
    3735#include <TObjArray.h>
    3836
  • trunk/MagicSoft/Mars/mtools/MHSimulatedAnnealing.h

    r4647 r7749  
    55//  MHSimulatedAnnealing
    66//
    7 //  Output container of MSimulatedAnnealing
    87///////////////////////////////////////////////////////////////////////////////
    98#ifndef MARS_MH
     
    1514#endif
    1615
    17 class TMatrix;
    18 class TVector;
     16#ifndef ROOT_TMatrix
     17#include <TMatrix.h>
     18#endif
     19
     20#ifndef ROOT_TVector
     21#include <TVector.h>
     22#endif
     23
    1924
    2025class MHSimulatedAnnealing : public MH
Note: See TracChangeset for help on using the changeset viewer.