Ignore:
Timestamp:
10/04/03 12:47:13 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/AnalysisLinkDef.h

    r2300 r2377  
    1919#pragma link C++ class MMcPedestalCopy+;
    2020#pragma link C++ class MMcPedestalNSBAdd+;
     21#pragma link C++ class MGeomApply+;
    2122
    2223#pragma link C++ class MHadronness+;
  • trunk/MagicSoft/Mars/manalysis/MBlindPixelCalc.cc

    r2298 r2377  
    303303    fPixels->Clear();
    304304
     305    if (!fGeomCam->InheritsFrom("MGeomCamMagic"))
     306    {
     307        *fLog << warn << "MBlindPixelCalc::ReInit: Warning - Starfield only implemented for Magic standard Camera... no action." << endl;
     308        return kTRUE;
     309    }
     310
    305311    //
    306312    // Set as blind some particular pixels because of a particular
  • trunk/MagicSoft/Mars/manalysis/MBlindPixels.h

    r1967 r2377  
    2121    void AdoptPixels(Char_t pixels[577]) { fPixels.Adopt(577, pixels); }
    2222
     23    void AdoptPixels(const TArrayC &pixels) { fPixels = pixels; }
     24
    2325    void Clear(Option_t *o="")  { fPixels.Reset(); }
    2426
    2527    Bool_t IsBlind(UShort_t id) const { return fPixels.GetSize() && ((TArrayC)fPixels)[id]; }
     28
     29    void InitSize(UShort_t i) { fPixels.Set(i); }
    2630
    2731    ClassDef(MBlindPixels, 1) // container to store blind pixels
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r2350 r2377  
    4848#include "MLogManip.h"
    4949
     50#include "MGeomCam.h"
    5051#include "MMcRunHeader.hxx"
    5152
     
    174175void MCerPhotCalc::ScalePedestals()
    175176{
    176     Int_t n = 577; //FIXME: fPedestals->GetNumPixel();
     177    const Int_t n = fPedestals->GetSize();
    177178
    178179    for (int idx=0; idx<n; idx++)
     
    186187        const Double_t offset = fEnableFix ? ped.GetPedestal()-0.5 : ped.GetPedestal();
    187188
    188         ped.Set(offset*fSumWeights,
    189                 ped.GetPedestalRms()*fSumQuadWeights);
     189        ped.Set(offset*fSumWeights, ped.GetPedestalRms()*fSumQuadWeights);
    190190    }
    191191
     
    205205//        ScalePedestals();
    206206
     207    const Int_t n = fWeight.GetSize();
     208
    207209    MRawEvtPixelIter pixel(fRawEvt);
    208210
    209     Int_t SaturatedPixels = 0;
     211    Int_t saturatedpixels = 0;
    210212
    211213    while (pixel.Next())
    212214    {
    213215        const UInt_t idx = pixel.GetPixelId();
    214         MPedestalPix &ped = (*fPedestals)[idx];
    215 
    216216        //
    217217        // sanity check (old MC files sometimes have pixids>577)
     
    219219        if (!fPedestals->CheckBounds(idx))
    220220        {
    221             *fLog << inf << "Pixel Index larger than camera... skipping event." << endl;
     221            *fLog << inf << "Pixel Index out of MPedestalCam bounds... skipping event." << endl;
    222222            return kCONTINUE;
    223         }
     223        }
     224
     225        MPedestalPix &ped = (*fPedestals)[idx];
    224226
    225227        //
     
    230232        Int_t i;
    231233        Double_t nphot = 0;
    232         for (i=0; i<fWeight.GetSize(); i++)
     234        for (i=0; i<n; i++)
    233235        {
    234236            if (ptr[i]==0xff)
     
    237239        }
    238240
    239         Bool_t SaturatedLG = kFALSE;
    240 
    241         if (i<fWeight.GetSize())
     241        Bool_t saturatedlg = kFALSE;
     242
     243        if (i<n)
    242244        {
    243245            nphot = 0;
     
    250252            }
    251253
    252             for (i=0; i<fWeight.GetSize(); i++)
     254            for (i=0; i<n; i++)
    253255            {
    254               if (ptr[i]==0xff)
    255                 SaturatedLG = kTRUE;
    256 
    257               nphot += ptr[i]*fWeight[i];
     256                if (ptr[i]==0xff)
     257                    saturatedlg = kTRUE;
     258
     259                nphot += ptr[i]*fWeight[i];
    258260            }
    259261
     
    266268        fCerPhotEvt->AddPixel(idx, nphot, 0);
    267269
    268         if (SaturatedLG)
    269           SaturatedPixels ++;
    270     }
    271 
    272     switch(SaturatedPixels)
    273       {
    274       case 0:
    275         break;
    276       case 1:
    277         *fLog << warn << "WARNING: 1 pixel had saturating low gains..." << endl;
    278         break;
    279       default:
    280         *fLog << warn << "WARNING: " << SaturatedPixels << " pixels had saturating low gains..." << endl;
    281         break;
    282       }
    283 
     270        if (saturatedlg)
     271          saturatedpixels++;
     272    }
     273
     274    if (saturatedpixels>0)
     275        *fLog << warn << "WARNING: " << saturatedpixels << " pixel(s) had saturating low gains..." << endl;
    284276
    285277    fCerPhotEvt->FixSize();
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.cc

    r2237 r2377  
    126126        return kFALSE;
    127127
    128     const int num = fMcPed->GetNumPixel();
    129 
    130     fPedCam->InitSize(num);
     128    const int num = fPedCam->GetSize();
    131129
    132130    for (int i=0; i<num; i++)
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r2237 r2377  
    207207        return kFALSE;
    208208
    209     const int num = fFadc->GetNumPixel();
    210    
    211     fPedCam->InitSize(num);
     209    const int num = fPedCam->GetSize();
    212210
    213211    for (int i=0; i<num; i++)
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r2244 r2377  
    5353    fTitle = title ? title : "Storage container for all Pedestal Information in the camera";
    5454
    55     fArray = new TClonesArray("MPedestalPix", 577);
     55    fArray = new TClonesArray("MPedestalPix", 1);
    5656
    57     for (int i=0; i<577; i++)
    58         new ((*fArray)[i]) MPedestalPix;
     57//    for (int i=0; i<577; i++)
     58//        new ((*fArray)[i]) MPedestalPix;
    5959}
    6060
  • trunk/MagicSoft/Mars/manalysis/Makefile

    r2300 r2377  
    3535           MMcPedestalCopy.cc \
    3636           MMcPedestalNSBAdd.cc \
     37           MGeomApply.cc \
    3738           MCurrents.cc \
    3839           MEnergyEst.cc \
Note: See TracChangeset for help on using the changeset viewer.