Ignore:
Timestamp:
04/23/01 15:42:03 (24 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
6 edited

Legend:

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

    r749 r765  
    2828// MCT1ReadAscii                                                           //
    2929//                                                                         //
     30// Reads a ascii file with CT1 data. The file description and some example //
     31// files can be found on the Magic homepage.                               //
     32//                                                                         //
    3033/////////////////////////////////////////////////////////////////////////////
    3134
     
    4548ClassImp(MCT1ReadAscii)
    4649
     50// --------------------------------------------------------------------------
     51//
     52// Default constructor. Creates an array which stores the file names of
     53// the files which should be read. If a filename is given it is added
     54// to the list.
     55//
    4756MCT1ReadAscii::MCT1ReadAscii(const char *fname,
    4857                             const char *name,
     
    6069}
    6170
     71// --------------------------------------------------------------------------
     72//
     73// Delete the filename list and the input stream if one exists.
     74//
    6275MCT1ReadAscii::~MCT1ReadAscii()
    6376{
     
    6780}
    6881
     82// --------------------------------------------------------------------------
     83//
     84// Add this file as the last entry in the chain
     85//
    6986void MCT1ReadAscii::AddFile(const char *txt)
    7087{
    71     //
    72     // Add this file as the last entry in the chain
    73     //
    74     const int   sz  = fFileNames->GetSize();
    75     const int   tsz = strlen(txt)+1;
     88    const int sz  = fFileNames->GetSize();
     89    const int tsz = strlen(txt)+1;
    7690
    7791    fFileNames->Set(sz+tsz);
     
    8094}
    8195
     96// --------------------------------------------------------------------------
     97//
     98// This opens the next file in the list and deletes its name from the list.
     99//
    82100Bool_t MCT1ReadAscii::OpenNextFile()
    83101{
     
    128146}
    129147
     148// --------------------------------------------------------------------------
     149//
     150// Open the first file in the list. Check for the output containers or create
     151// them if they don't exist.
     152//
     153// Initialize the size of the MPedestalCam container to 127 pixels (CT1 camera)
     154//
    130155Bool_t MCT1ReadAscii::PreProcess(MParList *pList)
    131156{
     
    159184}
    160185
     186// --------------------------------------------------------------------------
     187//
     188// Read apedestal entry (line) from the file
     189//
    161190void MCT1ReadAscii::ReadPedestals()
    162191{
     
    185214}
    186215
     216// --------------------------------------------------------------------------
     217//
     218// Read a data entry (line) from the file
     219//
    187220void MCT1ReadAscii::ReadData()
    188221{
     
    218251}
    219252
     253// --------------------------------------------------------------------------
     254//
     255// Check for the event number and depending on this number decide if
     256// pedestals or event data has to be read.
     257//
     258// If the end of the file is reached try to open the next in the list. If
     259// there is now next file stop the eventloop.
     260//
    220261Bool_t MCT1ReadAscii::Process()
    221262{
  • trunk/MagicSoft/Mars/manalysis/MHillas.cc

    r749 r765  
    4747ClassImp(MHillas)
    4848
     49// --------------------------------------------------------------------------
     50//
     51// Default constructor.
     52//
    4953MHillas::MHillas(const char *name, const char *title) :
    5054    fAlpha(0), fTheta(0), fWidth(0), fLength(0), fSize(0), fDist(0), fEllipse(NULL)
     
    5660}
    5761
     62// --------------------------------------------------------------------------
     63//
     64// Destructor. Deletes the TEllipse if one exists.
     65//
    5866MHillas::~MHillas()
    5967{
     
    6169}
    6270
     71// --------------------------------------------------------------------------
     72//
     73// Print the hillas Parameters to *fLog
     74//
    6375void MHillas::Print(Option_t *)
    6476{
     
    7183}
    7284
     85// --------------------------------------------------------------------------
     86//
     87// call the Paint function of the Ellipse if a TEllipse exists
     88//
    7389void MHillas::Paint(Option_t *)
    7490{
     
    7995}
    8096
     97// --------------------------------------------------------------------------
     98//
     99// Instead of adding MHillas itself to the Pad
     100// (s. AppendPad in TObject) we create an ellipse,
     101// which is added to the Pad by it's Draw function
     102// You can remove it by deleting the Ellipse Object
     103// (s. Clear() )
     104//
    81105void MHillas::Draw(Option_t *)
    82106{
    83     //
    84     // Instead of adding MHillas itself to the Pad
    85     // (s. AppendPad in TObject) we create an ellipse,
    86     // which is added to the Pad by it's Draw function
    87     // You can remove it by deleting the Ellipse Object
    88     // (s. Clear() )
    89     //
    90 
    91107    Clear();
    92108
     
    112128}
    113129
     130// --------------------------------------------------------------------------
     131//
     132// If a TEllipse object exists it is deleted
     133//
    114134void MHillas::Clear(Option_t *)
    115135{
     
    122142}
    123143
     144// --------------------------------------------------------------------------
     145//
     146// Calculate the Hillas parameters from a cerenkov photon event
     147// (The calcualtion is some kind of two dimentional statistics)
     148//
    124149Bool_t MHillas::Calc(MGeomCam &geom, MCerPhotEvt &evt)
    125150{
    126     //
    127     // Calculate the Hillas parameters from a cerenkov photon event
    128     // (The calcualtion is some kind of two dimentional statistics)
    129     //
    130 
    131151    const UInt_t nevt = evt.GetNumPixels();
    132152
  • trunk/MagicSoft/Mars/manalysis/MHillasCalc.cc

    r749 r765  
    2626/////////////////////////////////////////////////////////////////////////////
    2727//                                                                         //
    28 //   MHillas Calc                                                          //
     28//  MHillasCalc                                                            //
     29//                                                                         //
     30//  This is a task to calculate the Hillas parameters from each event      //
    2931//                                                                         //
    3032/////////////////////////////////////////////////////////////////////////////
     
    4244ClassImp(MHillasCalc)
    4345
     46// --------------------------------------------------------------------------
     47//
     48// Default constructor.
     49//
    4450MHillasCalc::MHillasCalc(const char *name, const char *title)
    4551{
     
    4854}
    4955
     56// --------------------------------------------------------------------------
     57//
     58// Check for a MCerPhotEvt object from which the Hillas are calculated.
     59// Try to find the Geometry conatiner. And try to find the output
     60// (Hillas) container or create one.
     61//
    5062Bool_t MHillasCalc::PreProcess( MParList *pList )
    5163{
     
    7183}
    7284
     85// --------------------------------------------------------------------------
     86//
     87// If you want do complex descisions inside the calculations
     88// we must move the calculation code inside this function
     89//
     90// If the calculation wasn't sucessfull skip this event
     91//
    7392Bool_t MHillasCalc::Process()
    7493{
    75     //
    76     // If you want do complex descisions inside the calculations
    77     // we must move the calculation code inside this function
    78     //
    79     // If the calculation wasn't sucessfull skip this event
    80     //
    8194    return fHillas->Calc(*fGeomCam, *fCerPhotEvt) ? kTRUE : kCONTINUE;
    8295}
  • trunk/MagicSoft/Mars/manalysis/MImgCleanStd.cc

    r749 r765  
    2424\* ======================================================================== */
    2525
     26/////////////////////////////////////////////////////////////////////////////
     27//
     28//  MImgCleanStd
     29//
     30//  This is the standard image cleaning. If you want to know how it works
     31//  Please look at the three CleanSteps and Process
     32//
     33/////////////////////////////////////////////////////////////////////////////
    2634#include "MImgCleanStd.h"
    2735
     
    3644ClassImp(MImgCleanStd)
    3745
     46// --------------------------------------------------------------------------
     47//
     48// Default constructor. Here you can specify the cleaning levels. If you
     49// don't specify them the 'common standard' values 2.5 and 3.0 (sigma
     50// above mean) are used
     51//
    3852MImgCleanStd::MImgCleanStd(const Float_t lvl1, const Float_t lvl2,
    3953                           const char *name, const char *title)
    4054    : fCleanLvl1(lvl1), fCleanLvl2(lvl2)
    4155{
    42     //
    43     //   the default constructor
    44     //
    4556    *fName  = name  ? name  : "MImgCleanStd";
    4657    *fTitle = title ? title : "Task which does a standard image cleaning";
     
    4960}
    5061
     62// --------------------------------------------------------------------------
     63//
     64//  This method looks for all pixels with an entry (photons)
     65//  that is three times bigger than the noise of the pixel
     66//  (std: 3 sigma, clean level 1)
     67//
    5168void MImgCleanStd::CleanStep1()
    5269{
    53     //
    54     //  This method looks for all pixels with an entry (photons)
    55     //  that is three times bigger than the noise of the pixel
    56     //  (std: 3 sigma, clean level 1)
    57     //
    58 
    5970    const Int_t entries = fEvt->GetNumPixels();
    6071
     
    7687}
    7788
     89// --------------------------------------------------------------------------
     90//
     91//  check if the survived pixel have a neighbor, that also
     92//  survived
     93//
    7894void MImgCleanStd::CleanStep2()
    7995{
    80     //
    81     //  check if the survived pixel have a neighbor, that also
    82     //  survived
    83     //
    84 
    8596    const Int_t entries = fEvt->GetNumPixels();
    8697
     
    142153}
    143154
     155// --------------------------------------------------------------------------
     156//
     157//   Look for the boundary pixels around the core pixels
     158//   if a pixel has more than 2.5 (clean level 2) sigma, and
     159//   a core neigbor it is declared as used.
     160//
    144161void MImgCleanStd::CleanStep3()
    145162{
    146     //
    147     //   Look for the boundary pixels around the core pixels
    148     //   if a pixel has more than 2.5 (clean level 2) sigma, and
    149     //   a core neigbor it is declared as used.
    150     //
    151163    const Int_t entries = fEvt->GetNumPixels();
    152164
     
    202214}
    203215
     216// --------------------------------------------------------------------------
     217//
     218//  check if MEvtHeader exists in the Parameter list already.
     219//  if not create one and add them to the list
     220//
    204221Bool_t MImgCleanStd::PreProcess (MParList *pList)
    205222{
    206     //
    207     //  check if MEvtHeader exists in the Parameter list already.
    208     //  if not create one and add them to the list
    209     //
    210223    fCam = (MGeomCam*)pList->FindObject("MGeomCam");
    211224    if (!fCam)
     
    225238}
    226239   
     240// --------------------------------------------------------------------------
     241//
     242// Cleans the image.
     243//
    227244Bool_t MImgCleanStd::Process()
    228245{
  • trunk/MagicSoft/Mars/manalysis/MPedestalCam.cc

    r749 r765  
    3636ClassImp(MPedestalCam)
    3737
     38// --------------------------------------------------------------------------
     39//
     40// Default constructor. Creates a MPedestalPix object for each pixel
     41//
    3842MPedestalCam::MPedestalCam(const char *name, const char *title)
    3943{
     
    5054}
    5155
     56// --------------------------------------------------------------------------
     57//
     58// Delete the array conatining the pixel pedest information
     59//
    5260MPedestalCam::~MPedestalCam()
    5361{
     62    // FIXME: Do we have to delete the objects itself?
    5463    delete fArray;
    5564}
  • trunk/MagicSoft/Mars/manalysis/MPedestalPix.cc

    r749 r765  
    3333#include "MPedestalPix.h"
    3434
    35 //#include <fstream.h>
    36 
    3735#include "MLog.h"
    3836
Note: See TracChangeset for help on using the changeset viewer.