Changeset 1180 for trunk/MagicSoft


Ignore:
Timestamp:
01/15/02 11:48:08 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
10 edited

Legend:

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

    r1148 r1180  
    2323\* ======================================================================== */
    2424
     25/////////////////////////////////////////////////////////////////////////////
     26//                                                                         //
     27// MBlindPixel                                                             //
     28//                                                                         //
     29// If you want to exclude pixels from the analysis (eg. hillas parameter   //
     30// calculation) you can use this container to switch off the pixels by Id  //
     31//                                                                         //
     32/////////////////////////////////////////////////////////////////////////////
    2533#include "MBlindPixels.h"
    2634
     
    4553// -------------------------------------------------------------------------
    4654//
    47 // We add information of blind (c!=0) or not (c=0) for the pixel i
     55// If you don't want to use pixel with Id id call
     56//    SetPixelBlind(id, kTRUE)
     57// otherwise
     58//    SetPixelBlind(id, kFALSE)
    4859//
    4960void MBlindPixels::SetPixelBlind(UShort_t id, Bool_t val)
  • trunk/MagicSoft/Mars/manalysis/MBlindPixels.h

    r1148 r1180  
    2525    Bool_t IsBlind(UShort_t id) { return (Bool_t)fPixels[id]; }
    2626
    27     ClassDef(MBlindPixels, 1)    // container of Blind pixels
     27    ClassDef(MBlindPixels, 1) // container to store blind pixels
    2828};
    2929
  • trunk/MagicSoft/Mars/manalysis/MCerPhotCalc.cc

    r1145 r1180  
    124124    while (pixel.Next())
    125125    {
    126 
    127         UInt_t pixid = pixel.GetPixelId();
     126        const UInt_t pixid = pixel.GetPixelId();
    128127
    129128        const MPedestalPix &ped = (*fPedestals)[pixid];
    130129
    131130        //
    132         // sanity check
     131        // sanity check (old MC files sometimes have pixids>577)
    133132        //
    134         if (!fPedestals->CheckBounds(pixid)){
    135             *fLog<<inf<<"Pixel ID larger than camera ... Skip the event"<<endl;
     133        if (!fPedestals->CheckBounds(pixid))
     134        {
     135            *fLog << inf << "Pixel ID larger than camera... skipping event." << endl;
    136136            return kCONTINUE;
    137137        }
     
    139139        Float_t nphot = (Float_t)pixel.GetSumHiGainSamples();
    140140
     141        //
    141142        // We check that the pixel is not empty, if it is empty
    142143        // we won't substract the pedestal. Empty means that it has
    143144        // 0 signal in all the slices.
    144 
    145         if(nphot!=0) nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean();
     145        //
     146        if (nphot!=0)
     147            nphot -= fRunHeader->GetNumSamplesHiGain()*ped.GetMean();
    146148
    147149        fCerPhotEvt->AddPixel(pixid, nphot, sqrt(fRunHeader->GetNumSamplesHiGain())*ped.GetSigma());
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalCopy.h

    r1132 r1180  
    11#ifndef MARS_MMcPedestalCopy
    22#define MARS_MMcPedestalCopy
    3 
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MMcPedestalCopy                                                         //
    7 //                                                                         //
    8 // This task copies the pedestals from the MC data into the corresponding  //
    9 // MARS Container (MPedestals). This seems to be overdone, but at this     //
    10 // point you have a standard interface to access the pedestals             //
    11 // (MPedestals), which makes it possible that from now on all pedestals    //
    12 // can be treated in the same way                                          //
    13 //                                                                         //
    14 /////////////////////////////////////////////////////////////////////////////
    153
    164#ifndef MARS_MTask
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.cc

    r1174 r1180  
    3838//  slice:                                                                 //
    3939//                                                                         //
    40 //  Y=sqrt(X*FADC_time/Number_of_slice*pixel_size)*Amp_single_phe_response //
     40//  Y = sqrt(X * FADC_time / Number_of_slices * pixel_size)                //
     41//      * Amp_single_phe_response                                          //
    4142//                                                                         //
    4243//  Input Containers:                                                      //
     
    8182    // RunHeader tree the auto scheme is disabled by default
    8283    //
    83     AddToBranchList("fPedesMean");
    84     AddToBranchList("fElecNoise");
     84    AddToBranchList("MMcFadcHeader.fPedesMean");
     85    AddToBranchList("MMcFadcHeader.fElecNoise");
    8586}
    8687
     
    105106// --------------------------------------------------------------------------
    106107//
    107 // The PreProcess does nothing since the process does not exist and
    108 // therefore it does not need any pointer or files already initialysed
    109 
     108// - check whether we have a monte carlo file. if not skip this task
     109// - try to get MMcFadcHeader, MGeomCam and MPedestalCam from the parameter
     110//   list
     111// - try to find a MMcRunHeader, too
     112//
    110113Bool_t MMcPedestalNSBAdd::PreProcess(MParList *pList)
    111114{
    112 
    113    // FIX ME , ReInit should be called automatically. When it is
    114    // implemented then this line should be removed.
    115 
    116115    if (!CheckRunType(pList))
    117116    {
     
    149148}
    150149
     150// --------------------------------------------------------------------------
     151//
     152// If a MMcRunHeader is available the DNSB MMcRunHeader::GetNumPheFromDNSB
     153// is returned. Otherwise the user given number is used.
     154//
    151155Float_t MMcPedestalNSBAdd::GetDnsb(MParList *pList) const
    152156{
     
    206210    for (int i=0; i<num; i++)
    207211    {
    208         MPedestalPix &pix     = (*fPedCam)[i];
    209         MGeomPix    &pixgeom = (*fGeom)[i];
    210 
    211         const Float_t pedrms  = pix.GetSigma();
    212         const Float_t size    = pixgeom.GetR()*pixgeom.GetR()/size0;
    213 
    214         const Float_t ampl    = fFadc->GetAmplitud();
     212        MPedestalPix   &pix     = (*fPedCam)[i];
     213        const MGeomPix &pixgeom = (*fGeom)[i];
     214
     215        const Float_t pedrms = pix.GetSigma();
     216        const Float_t size   = pixgeom.GetR()*pixgeom.GetR()/size0;
     217
     218        const Float_t ampl   = fFadc->GetAmplitud();
    215219
    216220        pix.SetSigma(sqrt(pedrms*pedrms + dnsbpix*ampl*ampl*size));
  • trunk/MagicSoft/Mars/manalysis/MMcPedestalNSBAdd.h

    r1132 r1180  
    11#ifndef MARS_MMcPedestalNSBAdd
    22#define MARS_MMcPedestalNSBAdd
    3 
    4 /////////////////////////////////////////////////////////////////////////////
    5 //                                                                         //
    6 // MMcPedestalNSBAdd                                                          //
    7 //                                                                         //
    8 // This task adds the contribution to pedestal rms from the NSB in the     //
    9 // MARS Container (MPedestals).                                            //
    10 //                                                                         //
    11 /////////////////////////////////////////////////////////////////////////////
    123
    134#ifndef MARS_MTask
     
    2213{
    2314private:
    24     MMcFadcHeader *fFadc;
    2515    const MGeomCam *fGeom;
    26     MPedestalCam *fPedCam;
     16    MMcFadcHeader  *fFadc;
     17    MPedestalCam   *fPedCam;
    2718
    2819    Float_t fDnsbPixel;
  • trunk/MagicSoft/Mars/mbase/MWriteAsciiFile.cc

    r1178 r1180  
    3232// This can be the name of the class or a given name, which identifies     //
    3333// the container in a parameter container list (MParList).                 //
    34 // The container is writte to the ascii file if its ReadyToSave flag is    //
     34// The container is written to the ascii file if its ReadyToSave flag is   //
    3535// set (MParContainer)                                                     //
     36//                                                                         //
     37// You can write more than one container in one line of the file, see      //
     38// AddContainer.                                                           //
    3639//                                                                         //
    3740/////////////////////////////////////////////////////////////////////////////
  • trunk/MagicSoft/Mars/meventdisp/MGCamDisplay.cc

    r1132 r1180  
    4242#include "MMcPedestalCopy.h"     // MMcPedestalCopy
    4343#include "MMcPedestalNSBAdd.h"   // MMcPedestalNSBAdd
    44 #include "MImgCleanStd.h"        // MImgCleanStd
     44#include "MBlindPixelCalc.h"     // MBlindPixelCalc
    4545#include "MGeomCamMagic.h"       // MGeomMagicCam
    4646
     
    120120    MClone            *clone = new MClone("MCerPhotEvt");
    121121    MImgCleanStd      *clean = new MImgCleanStd;
     122    MBlindPixelCalc   *blind = new MBlindPixelCalc;
    122123    MHillasCalc       *hcalc = new MHillasCalc;
    123124
     
    127128    tlist->AddToList(clone);
    128129    tlist->AddToList(clean);
     130    tlist->AddToList(blind);
    129131    tlist->AddToList(hcalc);
    130132
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.cxx

    r1167 r1180  
    157157// GetStarFieldRa. Get RA coordinates of the starfield
    158158//
    159 void MMcRunHeader::GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second)
     159void MMcRunHeader::GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second) const
    160160{
    161     *hour=fStarFieldRaH;
    162     *minute=fStarFieldRaM;
    163     *second=fStarFieldRaS;
     161    *hour   = fStarFieldRaH;
     162    *minute = fStarFieldRaM;
     163    *second = fStarFieldRaS;
    164164}
    165165// -------------------------------------------------------------------------
     
    167167// GetStarFieldDec. Get DE coordinates of the starfield
    168168//
    169 void MMcRunHeader::GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second)
     169void MMcRunHeader::GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second) const
    170170{
    171     *degree=fStarFieldDeD;
    172     *minute=fStarFieldDeM;
    173     *second=fStarFieldDeS;
     171    *degree = fStarFieldDeD;
     172    *minute = fStarFieldDeM;
     173    *second = fStarFieldDeS;
    174174}
  • trunk/MagicSoft/include-Classes/MMcFormat/MMcRunHeader.hxx

    r1168 r1180  
    9999
    100100    Float_t GetNumPheFromDNSB() const { return fNumPheFromDNSB; }
    101     void GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second);
    102     void GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second);
     101    void GetStarFieldRa(Int_t *hour, Int_t *minute, Int_t *second) const;
     102    void GetStarFieldDec(Int_t *degree, Int_t *minute, Int_t *second) const;
    103103
    104104    ClassDef(MMcRunHeader, 1)   // storage container for general info
Note: See TracChangeset for help on using the changeset viewer.