Changeset 9567 for trunk/MagicSoft


Ignore:
Timestamp:
04/13/10 11:22:26 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9565 r9567  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2010/04/13 Thomas Bretz
     22
     23   * msim/MHPhotonEvent.cc:
     24     - automatic binning for case 3
     25     - new case 5
     26
     27   * msim/MHPhotonEvent.h:
     28     - this can be a huge memory consumption and we don't need double
     29       precision (range) accordingly changed all TH*D to TH*F.
     30       consequently increased class version number
     31
     32
    2033
    2134 2010/03/30 Thomas Bretz
  • trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc

    r9367 r9567  
    3838// Type 1:
    3939//   The maximum in x and y is determined from MCorsikaRunHeader
    40 //   (not yet implemented. Fixed to 25000)
     40//   (not yet implemented. Fixed to 25000, 100 bins)
    4141//
    4242// Type 2:
    4343//   The maximum in x and y is determined from MReflector->GetMaxR();
     44//   (100 bins)
    4445//
    4546// Type 3:
    4647//   The maximum in x and y is determined from MGeomCam->GetMaxR();
     48//   (roughly 10 bins per pixel)
    4749//
    4850// Type 4:
    49 //   As type 3 but divided by 10.
    50 //
    51 // The binning is optimized using MH::FindGoodLimits. The number of bins
    52 // in 100 in the default case and 50 for type 3-4.
     51//   Two times the traversal size of pixel #0 ( 4*MGeomCam[0].GetT() )
     52//   (101 bins, units cm)
     53//
     54// Type 5:
     55//   As type 3 but in cm instead of mm
     56//
     57// The binning is optimized using MH::FindGoodLimits.
    5358//
    5459// Fill expects a MPhotonEvent (the second argumnet in MFillH).
     
    5964//  + TH1D fHistH;
    6065//
     66// Class Version 3:
     67// ----------------
     68//  + replaced TH1D by TH1F
     69//  + replaced TH2D by TH2F
    6170//
    6271/////////////////////////////////////////////////////////////////////////////
     
    173182
    174183    MH::FindGoodLimits(num, num, min, max, kFALSE);
    175 
     184    MH::FindGoodLimits(num, num, min, max, kFALSE);
    176185    MBinning binsd, binsa, binsz;
    177186    binsd.SetEdges(num, min, max);
     
    213222            break;
    214223        }
    215     case 3: // The maximum radius
     224    case 3: // The maximum radius (mm)
     225        fHistXY.SetXTitle("X [mm]");
     226        fHistXY.SetYTitle("Y [mm]");
     227        fHistT.SetXTitle("X [mm]");
     228        fHistT.SetYTitle("Y [mm]");
     229        // *Fallthrough*
     230
    216231    case 4: // Two times the pixel-0 traversal size
     232    case 5: // The maximum radius (cm)
    217233        {
    218234            MGeomCam *c = (MGeomCam*)pList->FindObject("MGeomCam");
     
    222238                return kFALSE;
    223239            }
    224             xmax = fType==3 ? c->GetMaxRadius()/10 : 2*(*c)[0].GetT()/10;
    225             num  = 50;
     240            // Type 3: Define ~10 bins per pixel
     241            xmax = fType==3 ? c->GetMaxRadius() : 4*(*c)[0].GetT()/10;
     242            num  = fType==3 ? TMath::Nint(10*(2*c->GetMaxRadius())/(2*(*c)[0].GetT())) : 101;
     243
     244            if (fType==5)
     245                xmax /= 10;
    226246
    227247            break;
  • trunk/MagicSoft/Mars/msim/MHPhotonEvent.h

    r9347 r9567  
    1919{
    2020private:
    21     TH2D       fHistXY;
    22     TH2D       fHistUV;
     21    TH2F       fHistXY;
     22    TH2F       fHistUV;
    2323    TProfile2D fHistT;
    24     TH1D       fHistWL;
    25     TH1D       fHistH;
     24    TH1F       fHistWL;
     25    TH1F       fHistH;
    2626
    2727    Int_t      fType;
     
    6060    }
    6161
    62     ClassDef(MHPhotonEvent, 2) // Histogram to display the information of MPhotonEvents
     62    const TH2F &GetHistXY() const { return fHistXY; }
     63    const TProfile2D &GetHistT() const  { return fHistT; }
     64
     65    ClassDef(MHPhotonEvent, 3) // Histogram to display the information of MPhotonEvents
    6366};
    6467
Note: See TracChangeset for help on using the changeset viewer.