Ignore:
Timestamp:
09/03/04 14:48:31 (20 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mhist
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhist/HistLinkDef.h

    r4463 r4841  
    1919#pragma link C++ class MHGamma+;
    2020#pragma link C++ class MHFlux;
     21#pragma link C++ class MHSigmaTheta;
    2122#pragma link C++ class MHEffOnTime+;
    2223#pragma link C++ class MHTimeDiffTime+;
  • trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc

    r4584 r4841  
    4444#include "MBinning.h"
    4545#include "MParList.h"
    46 #include "MSigmabar.h"
    4746
    4847#include "MGeomCam.h"
    49 #include "MBlindPixels.h"
     48#include "MGeomPix.h"
     49#include "MBadPixelsCam.h"
    5050
    5151#include "MPedPhotCam.h"
     
    114114    SetBinning(&fSigmaPixTheta,   &binst, &binspix, &binsb);
    115115    SetBinning(&fDiffPixTheta,    &binst, &binspix, &binsd);
     116
     117    fNamePedPhotCam = "MPedPhotCamFromData";
    116118}
    117119
     
    134136
    135137
    136     fPed = (MPedPhotCam*)plist->FindObject("MPedPhotCam");
     138
     139    fPed = (MPedPhotCam*)plist->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
    137140    if (!fPed)
    138141    {
    139         *fLog << err << "MPedPhotCam not found... aborting." << endl;
     142        *fLog << err << AddSerialNumber(fNamePedPhotCam)
     143              << "[MPedPhotCam] not found... aborting." << endl;
    140144        return kFALSE;
    141145    }
    142     fPed->InitSize(fCam->GetNumPixels());
     146    //fPed->InitSize(fCam->GetNumPixels());
    143147
    144148   
    145     fBlindPix = (MBlindPixels*)plist->FindObject("MBlindPixels");
    146     if (!fBlindPix)
     149    fBad = (MBadPixelsCam*)plist->FindObject("MBadPixelsCam");
     150    if (!fBad)
    147151    { 
    148        *fLog << err << "MBlindPixels not found... continue. " << endl;
     152       *fLog << err << "MBadPixelsCam not found... continue. " << endl;
    149153    }
    150154
     
    157161    }
    158162
    159     fSigmabar = (MSigmabar*)plist->FindObject("MSigmabar");
    160     if (!fSigmabar)
    161     {
    162         *fLog << err << "MSigmabar not found... aborting." << endl;
    163         return kFALSE;
    164     }
    165163
    166164    // Get Theta Binning
     
    213211{
    214212    Double_t theta = fPointPos->GetZd();
    215     fSigmabar->Calc(*fCam, *fPed, *fEvt);
    216     Double_t mysig      = fSigmabar->GetSigmabarInner();
    217     Double_t mysigouter = fSigmabar->GetSigmabarOuter();
    218 
    219     //*fLog << "theta, mysig, mysigouter = " << theta << ",  " << mysig
    220     //      << ",  " << mysigouter << endl;
     213
     214    Double_t mysig      = (fPed->GetArea(0)).GetRms();
     215    Double_t mysigouter = (fPed->GetArea(1)).GetRms();
     216
     217    *fLog << "theta, mysig, mysigouter = " << theta << ",  " << mysig
     218          << ",  " << mysigouter << endl;
    221219
    222220    fSigmaTheta.Fill(theta, mysig);
     
    239237        const MPedPhotPix &pix = (*fPed)[id];
    240238
    241         if ( fBlindPix != NULL  &&  fBlindPix->IsBlind(id) )
     239        if ( fBad != NULL  &&  ((*fBad)[id]).IsUnsuitable() )
    242240        {
    243           // this should never occur, because blind pixels should have
    244           // been set unused by MBlindPixelsCalc2::UnMap()
    245           //*fLog << all << "MHSigmaTheta::Fill; blind pixel found which is used, id = "
    246           //      << id << "... go to next pixel." << endl;
     241          // this should never occur, because bad pixels should have
     242          // been set unused
     243          *fLog << all << "MHSigmaTheta::Fill; bad pixel found which is used, id = "
     244                << id << "... go to next pixel." << endl;
    247245          continue;
    248246        }
     
    256254
    257255        Double_t diff;
    258         if (ratio > 0.5)
     256        const Byte_t aidx = (*fCam)[id].GetAidx();
     257        if (aidx == 0)
    259258        {
    260259          // inner pixel
  • trunk/MagicSoft/Mars/mhist/MHSigmaTheta.h

    r4584 r4841  
    1414#endif
    1515
     16
     17class MParList;
    1618class MGeomCam;
    1719class MCerPhotEvt;
    1820class MPointingPos;
    1921class MPedPhotCam;
    20 class MSigmabar;
    21 class MParList;
    22 class MBlindPixels;
     22class MBadPixelsCam;
    2323
    2424
     
    2929    MPedPhotCam    *fPed;        //!
    3030    MCerPhotEvt    *fEvt;        //!
    31     MSigmabar      *fSigmabar;   //!
    3231    MPointingPos   *fPointPos;   //!
    33     MBlindPixels   *fBlindPix;   //!
     32    MBadPixelsCam  *fBad;        //!
     33
     34    TString  fNamePedPhotCam; //! name of the 'MPedPhotCam' container
    3435
    3536                           // sigmabar is the average pedestal sigma 
     
    4445public:
    4546    MHSigmaTheta(const char *name=NULL, const char *title=NULL);
     47
     48    void SetNamePedPhotCam(const char *name)  { fNamePedPhotCam = name; }
    4649
    4750    Bool_t SetupFill(const MParList *plist);
  • trunk/MagicSoft/Mars/mhist/Makefile

    r4463 r4841  
    2222           -I../mgui -I../mgeom -I../mdata -I../mfilter -I../mimage \
    2323           -I../mmain -I../mmc -I../mreflector -I../mpointing       \
    24            -I../mastro -I../mpedestal
     24           -I../mastro -I../mpedestal -I../mbadpixels
    2525
    2626SRCFILES = MHEvent.cc \
     
    4545           MHGamma.cc \
    4646           MHFlux.cc \
     47           MHSigmaTheta.cc \
    4748           MHSigmaPixel.cc \
    4849           MHSigmabarTheta.cc \
Note: See TracChangeset for help on using the changeset viewer.