Changeset 8489


Ignore:
Timestamp:
05/10/07 16:33:01 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8488 r8489  
    5656     - added a new Tab to show the time development of the unsuitable
    5757       pixels
     58     - added a new tab showing the eveloution of the number of
     59       dead pixels
    5860
    5961   * mjobs/MJCalibration.cc:
    6062     - updated texts in bad pixel display
     63
     64   * datacenter/macros/fillsignal.C:
     65     - replaced CalcUnsuitable by the new members of MHCamera
     66     - also fill the maximum number of unsuitable pixels
     67     - and fill the maximum number of dead pixels
     68
     69   * mfilter/MFSoftwareTrigger.cc, mhcalib/MHCalibrationTestCam.cc,
     70     mimage/MCameraSmooth.cc:
     71     - removed obsolete calls to GetPixById
     72
     73   * msignal/MSignalCam.[h,cc]:
     74     - removed obolete function to access the MSignalPix'
     75     - removed obsolete GetPixById
     76     - added new function returning the number of unmapped pixels
     77     - a little code cleanup
     78
    6179
    6280
  • trunk/MagicSoft/Mars/NEWS

    r8484 r8489  
    1010     calibration (ignoring the interleaved calibrations) into account.
    1111
     12   - database: The database now has two other new values UnsuitableMax and
     13     DeadMax. They express the maximum number of pixels which were
     14     unsuitable, respectively dead, during the sequence. Because
     15     of high pedestal rms (cars passing) a few events with very high
     16     numbers of unsuitable pixels can happen. Not to suffer from this
     17     effect we don't take the highest 0.1% of the numbers into account.
     18
    1219   - general: fixed a bug which caused callisto and star to stop working
    1320     properly because the callisto output was currupted
     
    2835     is usefull mainly to judge if an intermediate calibration had
    2936     problems.
     37
     38   - callisto: Added a new tab "DeadPixTm" which shows the time evolution
     39     of the number of dead pixels over the whole sequence. Dead pixels
     40     in this context are unmapped pixels, i.e. pixels which could not
     41     be interpolated, and thus are ignored in the further analysis.
    3042
    3143   - callisto: It is now possible to use the position of the maximum
  • trunk/MagicSoft/Mars/datacenter/macros/fillsignal.C

    r8477 r8489  
    6363
    6464#include <TFile.h>
     65#include <TGraph.h>
    6566#include <TSQLResult.h>
    6667
     
    6970#include "MStatusArray.h"
    7071#include "MHCamera.h"
     72#include "MHVsTime.h"
    7173
    7274#include "MCalibrationPulseTimeCam.h"
     
    7476
    7577using namespace std;
    76 
    77 Int_t CalcUnsuitable(const MHCamera &cam, Float_t f)
    78 {
    79     Int_t n = 0;
    80     for (int i=0; i<cam.GetNbinsX(); i++)
    81         if (cam.GetBinContent(i+1)>f)
    82             n++;
    83 
    84     return n;
    85 }
    8678
    8779int Process(MSQLServer &serv, TString fname, Bool_t dummy)
     
    257249    }
    258250
    259     Int_t unsuitable50 = CalcUnsuitable(*cam, 0.50);
    260     Int_t unsuitable01 = CalcUnsuitable(*cam, 0.01);
     251    Int_t unsuitable50 = cam->GetNumBinsAboveThreshold(0.50);
     252    Int_t unsuitable01 = cam->GetNumBinsAboveThreshold(0.01);
     253
     254    TString unsuitablemax = "NULL";
     255    TString deadmax       = "NULL";
     256
     257    TGraph *gr = (TGraph*)arr.FindObjectInCanvas("BadPixTm", "TGraph", "BadPixTm");
     258    if (gr)
     259    {
     260        const Int_t p = TMath::FloorNint(gr->GetN()*0.999);
     261        unsuitablemax = Form("%d", TMath::Nint(TMath::KOrdStat(gr->GetN(), gr->GetY(), p)));
     262    }
     263
     264    gr = (TGraph*)arr.FindObjectInCanvas("DeadPixTm", "TGraph", "DeadPixTm");
     265    if (gr)
     266        deadmax = Form("%d", TMath::Nint(TMath::MaxElement(gr->GetN(), gr->GetY())));
     267
    261268
    262269/*
     
    316323    cout << "  Unsuitable > 50%:       " << setw(6) << unsuitable50 << endl;
    317324    cout << "  Unsuitable >  1%:       " << setw(6) << unsuitable01 << endl;
     325    cout << "  UnsuitableMax (99.9%)   " << setw(6) << unsuitablemax << endl;
     326    cout << "  DeadMax                 " << setw(6) << deadmax << endl;
    318327    cout << endl;
    319328
     
    331340                         " fPulsePosOffMed=%s,    fPulsePosOffDev=%s,   "
    332341                         " fHiLoGainRatioMed=%s,  fHiLoGainRatioDev=%s,  "
    333                          " fUnsuitable50=%d,  fUnsuitable01=%d  "
     342                         " fUnsuitable50=%d,  fUnsuitable01=%d, "
     343                         " fUnsuitableMax=%s, fDeadMax=%s "
    334344                         " WHERE fSequenceFirst='%d' ",
    335345                         meanrmsinner.Data(),  meanrmsouter.Data(),
     
    342352                         medhilocal.Data(),   devhilocal.Data(),
    343353                         unsuitable50, unsuitable01,
     354                         unsuitablemax.Data(), deadmax.Data(),
    344355                         seq);
    345356
  • trunk/MagicSoft/Mars/mfilter/MFSoftwareTrigger.cc

    r6858 r8489  
    110110Int_t MFSoftwareTrigger::CountPixels(Int_t idx, Float_t tm0) const
    111111{
    112     // Try to get the pixel information of a pixel with this index
    113     MSignalPix *pix = fEvt->GetPixById(idx);
    114 
    115     // If a pixel with this index is not existing... do nothing.
    116     if (!pix)
    117         return 0;
     112    // get the pixel information of a pixel with this index
     113    MSignalPix &pix = (*fEvt)[idx];
    118114
    119115    // If pixel already assigned to a cluster
    120     if (pix->TestBit(kWasChecked))
    121         return 0;
    122 
    123     if (pix->IsPixelUnmapped())
     116    if (pix.TestBit(kWasChecked))
     117        return 0;
     118
     119    if (pix.IsPixelUnmapped())
    124120        return 0;
    125121
    126122    // Assign the new island number num to this used pixel
    127     pix->SetBit(kWasChecked);
     123    pix.SetBit(kWasChecked);
    128124
    129125    // Get the size of this pixel and check threshold
    130     const Double_t size = pix->GetNumPhotons()*fCam->GetPixRatio(idx);
     126    const Double_t size = pix.GetNumPhotons()*fCam->GetPixRatio(idx);
    131127    if (size<fThreshold)
    132128        return 0;
    133129
    134     const Float_t tm1 = pix->GetArrivalTime();
     130    const Float_t tm1 = pix.GetArrivalTime();
    135131    if (TMath::Abs(tm1-tm0)>fTimeWindow)
    136132        return 0;
    137133
    138     //pix->SetBit(kAboveThreshold);
     134    //pix.SetBit(kAboveThreshold);
    139135
    140136    Int_t num = 1;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc

    r8339 r8489  
    230230    {
    231231
    232       MHCalibrationPix &histhi = (*this)[i];
    233 
    234       const MSignalPix *pix = calibration->GetPixById(i);
    235       if (!pix)
    236         continue;
    237 
    238       const Float_t   signal = pix->GetNumPhotons();
    239 
     232      const MSignalPix &pix = (*calibration)[i];
     233
     234      const Float_t signal = pix.GetNumPhotons();
    240235      if (signal < 0.0001)
    241         continue;
    242      
     236          continue;
     237
    243238      const Int_t aidx   = (*fGeom)[i].GetAidx();
    244239      const Int_t sector = (*fGeom)[i].GetSector();
    245240
    246       histhi.FillHistAndArray(signal) ;
     241      (*this)[i].FillHistAndArray(signal);
    247242
    248243      sumareahi  [aidx]   += signal;
  • trunk/MagicSoft/Mars/mimage/MCameraSmooth.cc

    r6855 r8489  
    120120                const UShort_t nid = gpix.GetNeighbor(j);
    121121
    122                 const MSignalPix *evtpix = fEvt->GetPixById(nid);
    123                 if (evtpix)
    124                 {
    125                     photons[i] += evtpix->GetNumPhotons();
    126                     errors[i]  += evtpix->GetErrorPhot();
    127                 }
     122                const MSignalPix &evtpix = (*fEvt)[nid];
     123                photons[i] += evtpix.GetNumPhotons();
     124                errors[i]  += evtpix.GetErrorPhot();
    128125                num++;
    129126            }
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r8484 r8489  
    603603    histbp.SetMinimum(0);
    604604
     605    MHVsTime histdp("MSignalCam.GetNumPixelsUnmapped");
     606    histdp.SetName("DeadPixTm");
     607    histdp.SetTitle("Number of dead/unmapped pixels;;N");
     608    histdp.SetMinimum(0);
     609
    605610    // Task to fill the histogram
    606     MFillH fillB(&histbp, "MTime", "FillBadTime");
     611    MFillH fillB(&histbp, "MTime", "FillBadPixTm");
     612    MFillH fillD(&histdp, "MTime", "FillDeadPixTm");
    607613    fillB.SetNameTab("BadPixTm");
     614    fillD.SetNameTab("DeadPixTm");
    608615
    609616    /*
     
    765772    tlist2.AddToList(&fill9);
    766773    tlist2.AddToList(&fillB);
     774    tlist2.AddToList(&fillD);
    767775    if (extractor1->HasLoGain())
    768776    {
  • trunk/MagicSoft/Mars/msignal/MSignalCam.cc

    r7876 r8489  
    1818!   Author(s): Thomas Bretz, 03/2005 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2005
     20!   Copyright: MAGIC Software Development, 2000-2007
    2121!
    2222!
     
    3838#include <fstream>
    3939
     40#include <TArrayI.h>
    4041#include <TArrayD.h>
    41 #include <TCanvas.h>
    4242
    4343#include "MLog.h"
     
    6868// --------------------------------------------------------------------------
    6969//
    70 // This is not yet implemented like it should.
    71 //
    72 /*
    73 void MSignalCam::Draw(Option_t* option)
    74 {
    75     //
    76     //   FIXME!!! Here the Draw function of the CamDisplay
    77     //   should be called to add the CamDisplay to the Pad.
    78     //   The drawing should be done in MCamDisplay::Paint
    79     //
    80 
    81     //    MGeomCam *geom = fType ? new MGeomCamMagic : new MGeomCamCT1;
    82     //    MCamDisplay *disp = new MCamDisplay(geom);
    83     //    delete geom;
    84     //    disp->DrawPhotNum(this);
    85 }
    86 */
    87 
    88 // --------------------------------------------------------------------------
    89 //
    9070// reset counter and delete netries in list.
    9171//
    9272void MSignalCam::Reset()
    9373{
    94     //fNumPixels        =  0;
    9574    fNumSinglePixels  =  0;
    9675    fSizeSinglePixels =  0;
    9776    fSizeSubIslands   =  0;
    9877    fSizeMainIsland   =  0;
    99     //fMaxIndex         = -1;
    10078    fNumIslands       = -1;
    101     //fLut.Set(0);
    10279
    10380    fNumPixelsSaturatedHiGain = -1;
     
    10683    fPixels->R__FOR_EACH(TObject, Clear)();
    10784}
    108 /*
    109 void MSignalCam::FixSize()
    110 {
    111     fLut.Set(fMaxIndex+1);
    112 
    113     if (fPixels->GetEntriesFast() == (Int_t)fNumPixels)
    114         return;
    115 
    116     fPixels->ExpandCreateFast(fNumPixels);
    117 }*/
    11885
    11986// --------------------------------------------------------------------------
     
    134101// --------------------------------------------------------------------------
    135102//
    136 // Checks if in the pixel list is an entry with pixel id
    137 //
    138 Bool_t MSignalCam::IsPixelExisting(Int_t id) const
    139 {
    140     return GetPixById(id) ? kTRUE : kFALSE;
    141 }
    142 
    143 // --------------------------------------------------------------------------
    144 //
    145 //   Checks if in the pixel list is an entry with pixel id
    146 //
    147 Bool_t MSignalCam::IsPixelUsed(Int_t id) const
    148 {
    149     const MSignalPix *pix = GetPixById(id);
    150     return pix ? pix->IsPixelUsed() : kFALSE;
    151 }
    152 
    153 // --------------------------------------------------------------------------
    154 //
    155 //   Checks if in the pixel list is an entry with pixel id
    156 //
    157 Bool_t MSignalCam::IsPixelCore(Int_t id) const
    158 {
    159     const MSignalPix *pix = GetPixById(id);
    160     return pix ? pix->IsPixelCore() : kFALSE;
    161 }
     103//   Count and return the number of unmapped pixels
     104//
     105Int_t MSignalCam::GetNumPixelsUnmapped() const
     106{
     107    const UInt_t n = GetNumPixels();
     108
     109    if (n <= 0)
     110        return -1;
     111
     112    Int_t cnt=0;
     113    for (UInt_t i=0; i<n; i++)
     114    {
     115        if ((*this)[i].IsPixelUnmapped())
     116            cnt++;
     117    }
     118
     119    return cnt;
     120}
    162121
    163122// --------------------------------------------------------------------------
     
    169128Float_t MSignalCam::GetNumPhotonsMin(const MGeomCam *geom) const
    170129{
    171     if (GetNumPixels() <= 0)
     130    const UInt_t n = GetNumPixels();
     131
     132    if (n <= 0)
    172133        return -5.;
    173134
    174     const UInt_t n = GetNumPixels();
    175 
    176135    Float_t minval = FLT_MAX;
    177136
     
    181140        if (!pix.IsPixelUsed())
    182141            continue;
    183 
    184         //const UInt_t id = pix.GetPixId();
    185         //if (id<0 || id>=n)
    186         //    continue;
    187142
    188143        Float_t testval = pix.GetNumPhotons();
     
    206161Float_t MSignalCam::GetNumPhotonsMax(const MGeomCam *geom) const
    207162{
    208     if (GetNumPixels() <= 0)
     163    const UInt_t n = GetNumPixels();
     164
     165    if (n <= 0)
    209166        return 50.;
    210167
    211     const UInt_t n = GetNumPixels();
    212 
    213168    Float_t maxval = -FLT_MAX;
    214169
     
    218173        if (!pix.IsPixelUsed())
    219174            continue;
    220 
    221         //const UInt_t id = pix.GetPixId();
    222         //if (id<0 || id>=n)
    223         //    continue;
    224175
    225176        Float_t testval = pix.GetNumPhotons();
     
    239190Float_t MSignalCam::GetRatioMin(const MGeomCam *geom) const
    240191{
    241     if (GetNumPixels() <= 0)
     192    const UInt_t n = GetNumPixels();
     193
     194    if (n <= 0)
    242195        return -5.;
    243196
    244197    Float_t minval = FLT_MAX;
    245198
    246     for (UInt_t i=0; i<GetNumPixels(); i++)
     199    for (UInt_t i=0; i<n; i++)
    247200    {
    248201        const MSignalPix &pix = (*this)[i];
     
    252205        Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot();
    253206        if (geom)
    254             testval *= geom->GetPixRatioSqrt(i/*pix.GetPixId()*/);
     207            testval *= geom->GetPixRatioSqrt(i);
    255208
    256209        if (testval < minval)
     
    267220Float_t MSignalCam::GetRatioMax(const MGeomCam *geom) const
    268221{
    269     if (GetNumPixels() <= 0)
     222    const UInt_t n = GetNumPixels();
     223
     224    if (n <= 0)
    270225        return -5.;
    271226
    272227    Float_t maxval = -FLT_MAX;
    273228
    274     for (UInt_t i=0; i<GetNumPixels(); i++)
     229    for (UInt_t i=0; i<n; i++)
    275230    {
    276231        const MSignalPix &pix = (*this)[i];
     
    280235        Float_t testval = pix.GetNumPhotons()/pix.GetErrorPhot();
    281236        if (geom)
    282             testval *= geom->GetPixRatioSqrt(i/*pix.GetPixId()*/);
     237            testval *= geom->GetPixRatioSqrt(i);
    283238
    284239        if (testval > maxval)
     
    297252Float_t MSignalCam::GetErrorPhotMin(const MGeomCam *geom) const
    298253{
    299     if (GetNumPixels() <= 0)
     254    const UInt_t n = GetNumPixels();
     255
     256    if (n <= 0)
    300257        return 50.;
    301258
    302259    Float_t minval = FLT_MAX;
    303260
    304     for (UInt_t i=0; i<GetNumPixels(); i++)
     261    for (UInt_t i=0; i<n; i++)
    305262    {
    306263        const MSignalPix &pix = (*this)[i];
     
    311268
    312269        if (geom)
    313             testval *= geom->GetPixRatio(i/*pix.GetPixId()*/);
     270            testval *= geom->GetPixRatio(i);
    314271
    315272        if (testval < minval)
     
    327284Float_t MSignalCam::GetErrorPhotMax(const MGeomCam *geom) const
    328285{
    329     if (GetNumPixels() <= 0)
     286    const UInt_t n = GetNumPixels();
     287
     288    if (n <= 0)
    330289        return 50.;
    331290
    332291    Float_t maxval = -FLT_MAX;
    333292
    334     for (UInt_t i=0; i<GetNumPixels(); i++)
     293    for (UInt_t i=0; i<n; i++)
    335294    {
    336295        const MSignalPix &pix = (*this)[i];
     
    341300
    342301        if (geom)
    343             testval *= geom->GetPixRatio(i/*pix.GetPixId()*/);
     302            testval *= geom->GetPixRatio(i);
    344303
    345304        if (testval > maxval)
     
    348307    return maxval;
    349308}
    350 /*
    351 void MSignalCam::RemoveUnusedPixels()
    352 {
    353     // Create iterator
    354     TIter Next(fPixels);
    355     MSignalPix *pix = NULL;
    356 
    357     fMaxIndex = -1;
    358 
    359     // Remove all unused pixels from list, calculate new fMaxIndex
    360     while ((pix=(MSignalPix*)Next()))
    361     {
    362         if (!pix->IsPixelUsed())
    363             fPixels->Remove(pix);
    364         else
    365             fMaxIndex = TMath::Max(fMaxIndex, pix->GetPixId());
    366     }
    367 
    368     // Crompress array
    369     fPixels->Compress();
    370 
    371     // Get new number of entries in array
    372     fNumPixels=fPixels->GetEntriesFast();
    373 
    374     // Rebuild lookup table
    375     RebuildLut();
    376 }
    377 */
    378 // --------------------------------------------------------------------------
    379 //
    380 // Return a pointer to the pixel with the requested idx. NULL if it doesn't
    381 // exist. The Look-up-table fLut is used. If its size is zero (according
    382 // to Rene this will happen if an old class object is loaded) we still
    383 // try to search in the array.
    384 //
    385 MSignalPix *MSignalCam::GetPixById(Int_t idx) const
    386 {
    387     return (MSignalPix*)(fPixels->UncheckedAt(idx));
    388     /*
    389     if (idx<0)
    390         return 0;
    391 
    392     if (fLut.GetSize()>0)
    393     {
    394         if (idx>=fLut.GetSize())
    395             return 0;
    396         return fLut[idx]<0 ? 0 : (MSignalPix*)(fPixels->UncheckedAt(fLut[idx]));
    397     }
    398 
    399     TIter Next(fPixels);
    400     MSignalPix *pix = NULL;
    401 
    402     while ((pix=(MSignalPix*)Next()))
    403         if (pix->GetPixId()==idx)
    404             return pix;
    405 
    406     return NULL;*/
    407 }
    408309
    409310MSignalPix *MSignalCam::AddPixel(Int_t idx, Float_t nph, Float_t er)
    410311{
    411     /*
    412     //
    413     // If this is too slow or takes to much space we might use
    414     // MGeomApply and an InitSize member function instead.
    415     //
    416     if (idx>=fLut.GetSize())
    417     {
    418         const Int_t n = fLut.GetSize();
    419         fLut.Set(idx*2+1); //idx+1 is slower than idx*2+1
    420         for (int i=n; i<idx*2+1; i++)
    421             fLut[i] = -1;
    422     }
    423 
    424     fLut[idx] = fNumPixels;
    425     if (idx>fMaxIndex)
    426         fMaxIndex=idx;
    427 
    428     return new ((*fPixels)[fNumPixels++]) MSignalPix(idx, nph, er);
    429     */
    430     //return new ((*fPixels)[idx]) MSignalPix(nph, er);
    431 
    432312    MSignalPix *pix = static_cast<MSignalPix*>((*fPixels)[idx]);
    433313    pix->Set(nph, er);
     
    452332Double_t MSignalCam::CalcIsland(const MGeomCam &geom, Int_t idx, Int_t num)
    453333{
    454     // Try to get the pixel information of a pixel with this index
    455     MSignalPix *pix = GetPixById(idx);
    456 
    457     // If a pixel with this index is not existing... do nothing.
    458     if (!pix)
     334    // Get the pixel information of a pixel with this index
     335    MSignalPix &pix = (*this)[idx];
     336
     337    // If an island number was already assigned to this pixel... do nothing.
     338    if (pix.GetIdxIsland()>=0)
    459339        return 0;
    460340
    461     // If an island number was already assigned to this pixel... do nothing.
    462     if (pix->GetIdxIsland()>=0)
     341    // If the pixel is an unused pixel... do nothing.
     342    if (!pix.IsPixelUsed())
    463343        return 0;
    464344
    465     // If the pixel is an unused pixel... do nothing.
    466     if (!pix->IsPixelUsed())
    467         return 0;
    468 
    469345    // Assign the new island number num to this used pixel
    470     pix->SetIdxIsland(num);
     346    pix.SetIdxIsland(num);
    471347
    472348    // Get the geometry information (neighbors) of this pixel
     
    474350
    475351    // Get the size of this pixel
    476     Double_t size = pix->GetNumPhotons();
     352    Double_t size = pix.GetNumPhotons();
    477353
    478354    // Now do the same with all its neighbors and sum the
     
    603479Bool_t MSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
    604480{
    605     MSignalPix *pix = GetPixById(idx);
    606     if (!pix)
     481    if (idx<0 || (UInt_t)idx>GetNumPixels())
    607482        return kFALSE;
    608483
     484    const MSignalPix &pix = (*this)[idx];
     485
    609486    // Used inlcudes status unampped
    610     if (!pix->IsPixelUsed() && (type<6 || type==8))
     487    if (!pix.IsPixelUsed() && (type<6 || type==8))
    611488        return kFALSE;
    612489
     
    616493    {
    617494    case 1: // scaled error of phtoons
    618         val = pix->GetErrorPhot()*TMath::Sqrt(ratio);
     495        val = pix.GetErrorPhot()*TMath::Sqrt(ratio);
    619496        return kTRUE;
    620497
    621498    case 2: // significance of number of photons
    622         if (pix->GetErrorPhot()<=0)
     499        if (pix.GetErrorPhot()<=0)
    623500            return kFALSE;
    624         val = pix->GetNumPhotons()*TMath::Sqrt(ratio)/pix->GetErrorPhot();
     501        val = pix.GetNumPhotons()*TMath::Sqrt(ratio)/pix.GetErrorPhot();
    625502        return kTRUE;
    626503
    627504    case 3: // number of photo electrons
    628         val = pix->GetNumPhotons();
     505        val = pix.GetNumPhotons();
    629506        break;
    630507
    631508    case 4: // error of signal
    632         val = pix->GetErrorPhot();
     509        val = pix.GetErrorPhot();
    633510        break;
    634511
    635512    case 5: // index of island
    636         val = pix->GetIdxIsland();
     513        val = pix.GetIdxIsland();
    637514        break;
    638515
    639516    case 6: // arrival time of mapped pixels only
    640         if (pix->IsPixelUnmapped())
     517        if (pix.IsPixelUnmapped())
    641518            return kFALSE;
    642         val = pix->GetArrivalTime();
     519        val = pix.GetArrivalTime();
    643520        break;
    644521
     
    647524        // otherwise to many large pixels survive (maybe because the
    648525        // fluctuations scale different than expected)
    649         if (pix->IsPixelUnmapped() || pix->GetNumPhotons()<50)
     526        if (pix.IsPixelUnmapped() || pix.GetNumPhotons()<50)
    650527            return kFALSE;
    651         val = pix->GetArrivalTime();
     528        val = pix.GetArrivalTime();
    652529        break;
    653530
    654531    case 8: // arrival time
    655         val = pix->GetArrivalTime();
     532        val = pix.GetArrivalTime();
    656533        break;
    657534
    658535        /*
    659536    case 10: // lo gain time
    660         if (pix->IsPixelUnmapped() || !pix->IsLoGainUsed() ||
    661             pix->GetNumPhotons()<320)
     537        if (pix.IsPixelUnmapped() || !pix.IsLoGainUsed() ||
     538            pix.GetNumPhotons()<320)
    662539            return kFALSE;
    663         val = pix->GetArrivalTime();
     540        val = pix.GetArrivalTime();
    664541        return kTRUE;
    665542
     
    668545        // otherwise to many large pixels survive (maybe because the
    669546        // fluctuations scale different than expected)
    670         if (pix->IsPixelUnmapped() || pix->IsLoGainUsed() ||
    671             pix->GetNumPhotons()<50)
     547        if (pix.IsPixelUnmapped() || pix.IsLoGainUsed() ||
     548            pix.GetNumPhotons()<50)
    672549            return kFALSE;
    673         val = pix->GetArrivalTime();
     550        val = pix.GetArrivalTime();
    674551        return kTRUE;
    675552        */
    676553
    677554    default:
    678         val = pix->GetNumPhotons()*ratio;
     555        val = pix.GetNumPhotons()*ratio;
    679556        return kTRUE;
    680557    }
  • trunk/MagicSoft/Mars/msignal/MSignalCam.h

    r8391 r8489  
    44#ifndef ROOT_TClonesArray
    55#include <TClonesArray.h>
    6 #endif
    7 #ifndef ROOT_TArrayI
    8 #include <TArrayI.h>
    96#endif
    107#ifndef MARS_MCamEvent
     
    6057    Int_t   GetNumPixelsSaturatedLoGain() const { return fNumPixelsSaturatedLoGain; }
    6158
    62     Bool_t  IsPixelExisting(Int_t id) const;
    63     Bool_t  IsPixelUsed    (Int_t id) const;
    64     Bool_t  IsPixelCore    (Int_t id) const;
     59    Int_t   GetNumPixelsUnmapped() const;
    6560
    6661    Float_t GetNumPhotonsMin(const MGeomCam *geom=NULL) const;
     
    7772    MSignalPix &operator[](int i) const { return *(MSignalPix*)(fPixels->UncheckedAt(i)); }
    7873
    79     MSignalPix *GetPixById(Int_t idx) const;
    80 
    8174    // Functions to change the contained data
    82     //void Scale(Double_t f) { fPixels->ForEach(MSignalPix, Scale)(f); }
    8375    Int_t CalcIslands(const MGeomCam &geom);
    8476
Note: See TracChangeset for help on using the changeset viewer.