Ignore:
Timestamp:
05/23/03 17:30:31 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MCerPhotAnal.cc

    r1557 r2135  
    118118Bool_t MCerPhotAnal::Process()
    119119{
    120     fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
     120    //fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
    121121
    122122    MRawEvtPixelIter pixel(fRawEvt);
     
    201201    }
    202202
     203    fCerPhotEvt->FixSize();
    203204    fCerPhotEvt->SetReadyToSave();
    204205
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1965 r2135  
    164164Bool_t MCerPhotCalc::Process()
    165165{
    166     fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
     166    //fCerPhotEvt->InitSize(fRawEvt->GetNumPixels());
    167167
    168168    MRawEvtPixelIter pixel(fRawEvt);
     
    212212    }
    213213
     214    fCerPhotEvt->FixSize();
    214215    fCerPhotEvt->SetReadyToSave();
    215216
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r2052 r2135  
    7575{
    7676    fNumPixels = 0;
    77     fPixels->Delete();
     77    //fPixels->Delete();
     78}
     79
     80void MCerPhotEvt::FixSize()
     81{
     82    if (fPixels->GetEntriesFast() == (Int_t)fNumPixels)
     83        return;
     84
     85    fPixels->ExpandCreateFast(fNumPixels);
    7886}
    7987
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.h

    r2052 r2135  
    2323
    2424    UInt_t GetNumPixels() const { return fNumPixels; }
    25     void   InitSize(UInt_t num) { fPixels->Expand(num); }
     25    //void   InitSize(UInt_t num) { fPixels->Expand(num); }
    2626
    2727    void   AddPixel(Int_t id, Float_t nph, Float_t er)
     
    2929        new ((*fPixels)[fNumPixels++]) MCerPhotPix(id, nph, er);
    3030    }
     31
     32    void FixSize();
    3133
    3234    //Bool_t  AddEvent(const MCerPhotEvt &evt);
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r1965 r2135  
    209209    fPedCam->InitSize(num);
    210210
    211     const Float_t size0 = (*fGeom)[0].GetR() * (*fGeom)[0].GetR();
    212 
    213211    for (int i=0; i<num; i++)
    214212    {
    215         MPedestalPix   &pix     = (*fPedCam)[i];
    216         const MGeomPix &pixgeom = (*fGeom)[i];
     213        MPedestalPix &pix    = (*fPedCam)[i];
    217214
    218215        const Float_t pedrms = pix.GetSigma();
    219         const Float_t size   = pixgeom.GetR()*pixgeom.GetR()/size0;
    220 
     216        const Float_t ratio  = fGeom->GetPixRatio(i);
    221217        const Float_t ampl   = fFadc->GetAmplitud();
    222218
    223         pix.SetSigma(sqrt(pedrms*pedrms + dnsbpix*ampl*ampl*size));
     219        pix.SetSigma(sqrt(pedrms*pedrms + dnsbpix*ampl*ampl*ratio));
    224220    }
    225221
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r1544 r2135  
    8282Int_t MPedestalCam::GetSize() const
    8383{
    84     return fArray->GetEntries();
     84    return fArray->GetEntriesFast();
    8585}
    8686
Note: See TracChangeset for help on using the changeset viewer.