Changeset 9422 for trunk/MagicSoft


Ignore:
Timestamp:
04/16/09 10:46:32 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9420 r9422  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2009/04/16 Thomas Bretz
     21
     22   * mbase/MEvtLoop.cc:
     23     - make sure that no negative values for the estimated time
     24       is shown
     25
     26   * mcorsika/MCorsikaEvtHeader.cc:
     27     - calculate impact in the telescope dish plane and not on the
     28       ground
     29
     30   * mhflux/MHCollectionArea.cc:
     31     - initialize more variables in the constructor as suggested
     32       by valgrind
     33
     34   * mpointing/MHPointing.cc:
     35     - set the maximum such that both axis are scaled correctly
     36
     37   * msimcamera/MSimBundlePhotons.cc:
     38     - added some more output
     39
     40   * resmc/dwarf-pde-gapd.txt:
     41     - used new curve from ETH
     42     - extrapolated curve on both ends linearily
     43
     44   * resmc/dwarf-reflectivity.txt:
     45     - extrapolated linearily to 980 nm
     46
     47   * resmc/magic-pde.txt:
     48     - set to 0 at 900nm
     49
     50   * resmc/magic-reflectivity.txt:
     51     - extrpolated to 900nm
     52
     53
     54
    2055 2009/04/01 Thomas Bretz
    2156
     
    3065     - added a cut "Cut" after image parameter calculation
    3166     - updated noise numbers
     67
     68   * resmc/dwarf-pde-gapd.txt:
     69     - upadted with a more reliable curve from theeth meeting page
     70       (linear extrapolate below 350nm)
    3271
    3372
  • trunk/MagicSoft/Mars/NEWS

    r9420 r9422  
    2121   * Added the possibility to add a cut after the image parameter
    2222     calculation (''Cut'')
     23
     24   * updated the PDE of the GAPDs with a more reliable curve from
     25     the meeting page (linear extrapolate below 350nm)
     26
     27   * The impact distribution in the event distrbutions is now
     28     perpendicular to Alt/Az and the histogram is displayed in 1D
     29
     30   * The GAPD PDE has been updated
     31
     32   * PDEs and mirror reflectivities have been linearily extrapolated
     33     to match the wavelegth range between 290nm and 900nm
    2334
    2435 ;callisto:
  • trunk/MagicSoft/Mars/mbase/MEvtLoop.cc

    r9207 r9422  
    376376            txt += (Int_t)speed;
    377377            txt += "Evts/s";
    378             if (fNumEvents>0)
     378            if (fNumEvents>0 && (Int_t)fNumEvents-num>0)
    379379            {
    380380                txt += ", est: ";
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc

    r9374 r9422  
    6161// --------------------------------------------------------------------------
    6262//
    63 //  Return Hypot(x, y)
     63// Return Impact (distance of ground incident point from telescope axis)
     64//
     65// Distance d between a point q and a line u (via p):
     66//   d = | ( vec(q) - vec(p) ) x vec(u) |  /  | vec(u) |
     67//
     68// If p = 0
     69//
     70//   ==>   d = | vec(q) x vec(u) |  /  | vec(u) |
     71//          w :=  q = (x/y/0)
     72//          v :=  u = (Alt/Az)
     73//
     74// For Alt/Az = Theta/Phi:
     75//
     76//  x = r sin(theta) cos(phi)
     77//  y = r sin(theta) sin(phi)
     78//  z = r cos(theta)
     79//
     80//                   (   -q3*u2    )   ( -cos(theta)*y                                     )
     81// vec(q) x vec(u) = (    q3*u1    ) = (  cos(theta)*x                                     )
     82//                   ( q1*u2-q2*u1 )   ( sin(theta) cos(phi) * y - sin(theta) sin(phi) * x )
     83//
     84//   ==> d = sqrt( cos(theta)^2 (x^2  + y^2 ) +
     85//                 sin(theta)^2 ( cos(phi) y + sin(phi) x)^2 )
    6486//
    6587Double_t MCorsikaEvtHeader::GetImpact() const
    6688{
    67     return TMath::Hypot(fX, fY);
     89    const Double_t c = TMath::Cos(fZd);
     90    const Double_t s = TMath::Sin(fZd);
     91
     92    const Double_t p = TMath::Cos(fAz)*fX - TMath::Sin(fAz)*fY;
     93
     94    return TMath::Sqrt(c*c*(fX*fX + fY*fY) + s*s* p*p);
    6895}
    6996
  • trunk/MagicSoft/Mars/mhflux/MHCollectionArea.cc

    r9375 r9422  
    6767//
    6868MHCollectionArea::MHCollectionArea(const char *name, const char *title)
    69   : fMcEvt(0), fHeader(0), fMcAreaRadius(-1), fIsExtern(kFALSE)
     69    : fMcEvt(0), fHeader(0), fMcAreaRadius(-1),
     70    fTotalNumSimulatedShowers(0), fAllEvtsTriggered(kFALSE),
     71    fIsExtern(kFALSE)
    7072{
    7173    //   initialize the histogram for the distribution r vs E
  • trunk/MagicSoft/Mars/mpointing/MHPointing.cc

    r9153 r9422  
    332332    if (fDevTimeCosy.GetN()>0)
    333333        fDevTimeCosy.SetMinimum(0);
     334
     335
    334336    if (fBrightness.GetN()>0)
     337    {
    335338        fBrightness.SetMinimum(0);
     339        fBrightness.SetMaximum(95);
     340    }
    336341    if (fNumStars.GetN()>0)
     342    {
    337343        fNumStars.SetMinimum(0);
     344        fNumStars.SetMaximum(95);
     345    }
    338346    if (fNumStarsCor.GetN()>0)
     347    {
    339348        fNumStarsCor.SetMinimum(0);
     349        fNumStarsCor.SetMaximum(95);
     350    }
    340351
    341352    DrawGraph(fDevTimeSG,   "\\Delta [arcmin]");
  • trunk/MagicSoft/Mars/msimcamera/MSimBundlePhotons.cc

    r9318 r9422  
    106106    // Make sure that each line has exactly one row
    107107    if (!fLut.HasConstantLength() && fLut.GetMaxEntries()!=1)
    108         return kFALSE;
     108    {
     109        *fLog << err << fFileName << " wrongly formatted." << endl;
     110        return kFALSE;
     111    }
    109112
    110113    *fLog << inf << "Using look-up table from " << fFileName << endl;
  • trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc

    r9318 r9422  
    163163    }
    164164
    165     // Get Number of pixels
    166     const UInt_t npix = fData->GetNumPixels();
    167 
    168     if (npix!=fCamera->GetNumChannels())
     165    // Make sure that we have not more analog channels than pixels
     166    // FIXME: Is this really necessary?
     167    if (fCamera->GetNumChannels()>fData->GetNumPixels())
    169168    {
    170169        *fLog << err;
    171170        *fLog << "ERROR - Number of analog channels " << fCamera->GetNumChannels();
    172         *fLog << " doesn't match number of pixels " << fData->GetNumPixels() << endl;
     171        *fLog << " exceeds number of pixels " << fData->GetNumPixels() << endl;
    173172        return kERROR;
    174173    }
     
    221220
    222221    // Digitize into a buffer
    223     MArrayI buffer(nslices*npix);
     222    MArrayI buffer(nslices*fData->GetNumPixels());
    224223
    225224    // Loop over all channels/pixels
    226     for (UInt_t i=0; i<npix; i++)
     225    for (UInt_t i=0; i<fCamera->GetNumChannels(); i++)
    227226    {
    228227        // Get i-th canalog hannel
  • trunk/MagicSoft/Mars/resmc/dwarf-pde-gapd.txt

    r9378 r9422  
    1 250 0.05
    2 300 0.16
    3 350 0.30
    4 400 0.40
    5 450 0.35
    6 500 0.28
    7 550 0.20
    8 600 0.17
    9 650 0.18
    10 700 0.13
    11 750 0.04
     1280 0
     2320 0.14
     3360 0.2483
     4369.655 0.272855
     5380.359 0.30322
     6392.682 0.328166
     7400 0.3427
     8410 0.36
     9420 0.3791
     10429.652 0.394688
     11440 0.4056
     12450 0.4111
     13460 0.4132
     14469.397 0.413991
     15480 0.4125
     16487.328 0.409247
     17500 0.4052
     18509.192 0.397064
     19520 0.3869
     20530 0.3736
     21540 0.3634
     22550 0.35
     23560 0.3368
     24570 0.325
     25580 0.3114
     26590 0.2987
     27600 0.2847
     28610 0.2726
     29616.74 0.261643
     30626.822 0.250952
     31636.905 0.241449
     32646.987 0.22957
     33660 0.2192
     34670 0.2099
     35680 0.2028
     36690 0.1933
     37700 0.1847
     38710 0.1778
     39720 0.1699
     40730 0.1616
     41740 0.1526
     42750 0.1464
     43760 0.138
     44770 0.1308
     45780 0.1232
     46790 0.1158
     47846.399 0.0751422
     48950 0
  • trunk/MagicSoft/Mars/resmc/dwarf-reflectivity.txt

    r9378 r9422  
    88530 0.873
    99620 0.811
     10710 0.749
     11800 0.687
     12890 0.625
     13980 0.563
  • trunk/MagicSoft/Mars/resmc/magic-pde.txt

    r9378 r9422  
    4444690  0.00494685
    4545700  0.00310554
     46900  0
  • trunk/MagicSoft/Mars/resmc/magic-reflectivity.txt

    r9378 r9422  
    4747750 0.81
    4848800 0.77
    49 850 0.75
     49900 0.69
Note: See TracChangeset for help on using the changeset viewer.