Changeset 764 for trunk


Ignore:
Timestamp:
04/23/01 15:12:45 (23 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

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

    r749 r764  
    2323\* ======================================================================== */
    2424
    25 /////////////////////////////////////////////////////////////////////////////
    26 //                                                                         //
    27 //   MCerPhotCalc                                                          //
    28 //                                                                         //
    29 /////////////////////////////////////////////////////////////////////////////
     25//////////////////////////////////////////////////////////////////////////////
     26//                                                                          //
     27//   MCerPhotCalc                                                           //
     28//                                                                          //
     29//   This is a task which calculates the number of photons from the FADC    //
     30//   time slices. At the moment it integrates simply the FADC values.       //
     31//                                                                          //
     32//////////////////////////////////////////////////////////////////////////////
    3033
    3134#include "MCerPhotCalc.h"
     
    4346ClassImp(MCerPhotCalc)
    4447
    45     MRawEvtData  *fRawEvt;     // raw event data (time slices)
    46     MPedestalCam *fPedestals;  // Pedestals of all pixels in the camera
    47     MCerPhotEvt  *fCerPhotEvt; // Cerenkov Photon Event used for calculation
    48 
     48// --------------------------------------------------------------------------
     49//
     50// Default constructor.
     51//
    4952MCerPhotCalc::MCerPhotCalc(const char *name, const char *title)
    5053{
     
    5356}
    5457
     58// --------------------------------------------------------------------------
     59//
     60// The PreProcess searches for the following input containers:
     61//  - MRawEvtData
     62//  - MPedestalCam
     63//
     64// The following output containers are also searched and created if
     65// they were not found:
     66//  - MCerPhotEvt
     67//
    5568Bool_t MCerPhotCalc::PreProcess( MParList *pList )
    5669{
     
    7689}
    7790
     91// --------------------------------------------------------------------------
     92//
     93// Calculate the integral of the FADC time slaices and store them as a new
     94// pixel in the MCerPhotEvt container.
     95//
    7896Bool_t MCerPhotCalc::Process()
    7997{
  • trunk/MagicSoft/Mars/manalysis/MCerPhotEvt.cc

    r749 r764  
    3838ClassImp(MCerPhotEvt)
    3939
     40// --------------------------------------------------------------------------
     41//
     42// Creates a MCerPhotPix object for each pixel in the event
     43//
    4044MCerPhotEvt::MCerPhotEvt(const char *name, const char *title) : fNumPixels(0)
    4145{
    42   //   the default constructor
    43 
    44  
     46
    4547  *fName  = name  ? name  : "MCerPhotEvt";
    4648  *fTitle = name  ? name  : "(Number of Photon)-Event Information";
     
    5456}
    5557
     58// --------------------------------------------------------------------------
     59//
     60// This is not yet implemented like it should.
     61//
    5662void MCerPhotEvt::Draw(Option_t* option)
    5763{
     
    6874}
    6975
     76// --------------------------------------------------------------------------
     77//
     78// add a new pixel to the list and increase the number
     79// of valid pixels in the list by one
     80//
    7081void MCerPhotEvt::AddPixel(Int_t id, Float_t nph, Float_t err)
    7182{
    72     //
    73     // add a new pixel to the list and increase the number
    74     // of valid pixels in the list by one
    75     //
    76 
    7783    // TClonesArray -> 'operator new with placement' should be used
    7884    new ((*fPixels)[fNumPixels++]) MCerPhotPix( id, nph, err);
    7985}
    8086
     87// --------------------------------------------------------------------------
     88//
     89// reset counter and delete netries in list.
     90//
    8191void MCerPhotEvt::Clear(Option_t *)
    8292{
    83     //
    84     // reset counter and delete netries in list.
    85     //
    8693    fNumPixels = 0 ;
    8794    fPixels->Clear() ;
    8895}
    8996
     97// --------------------------------------------------------------------------
     98//
     99//  Dump the cerenkov photon event to *fLog
     100//
    90101void MCerPhotEvt::Print(Option_t *)
    91102{
     
    101112}
    102113
     114// --------------------------------------------------------------------------
     115//
     116// Checks if in the pixel list is an entry with pixel id
     117//
    103118Bool_t MCerPhotEvt::IsPixelExisting(Int_t id)
    104119{
    105     //
    106     // Checks if in the pixel list is an entry with pixel id
    107     //
    108120    const Int_t entries = fPixels->GetEntries();
    109121
     
    117129}
    118130
     131// --------------------------------------------------------------------------
     132//
     133//   Checks if in the pixel list is an entry with pixel id
     134//
    119135Bool_t MCerPhotEvt::IsPixelUsed(Int_t id)
    120136{
    121     //
    122     //   Checks if in the pixel list is an entry with pixel id
    123     //
    124137    const Int_t entries = fPixels->GetEntries();
    125138
     
    135148}
    136149
     150// --------------------------------------------------------------------------
     151//
     152//   Checks if in the pixel list is an entry with pixel id
     153//
    137154Bool_t MCerPhotEvt::IsPixelCore(Int_t id)
    138155{
    139     //
    140     //   Checks if in the pixel list is an entry with pixel id
    141     //
    142156    const Int_t entries = fPixels->GetEntries();
    143157
     
    153167}
    154168
     169// --------------------------------------------------------------------------
     170//
     171// get the minimum number of photons of all valid pixels in the list
     172//
    155173Float_t MCerPhotEvt::GetNumPhotonsMin()
    156174{
    157     //
    158     // get the minimum number of photons of all valid pixels in the list
    159     //
    160175    if (fNumPixels <= 0)
    161176        return -5. ;
     
    175190}
    176191
     192// --------------------------------------------------------------------------
     193//
     194// get the maximum number of photons of all valid pixels in the list
     195//
    177196Float_t MCerPhotEvt::GetNumPhotonsMax()
    178197{
    179     //
    180     // get the maximum number of photons of all valid pixels in the list
    181     //
    182198    if (fNumPixels <= 0)
    183199        return 50.;
  • trunk/MagicSoft/Mars/manalysis/MCerPhotPix.cc

    r749 r764  
    3030ClassImp(MCerPhotPix)
    3131
    32 MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot ) :
     32// --------------------------------------------------------------------------
     33//
     34// Default constructor. The pixel is assumed as used and not a core pixel.
     35//
     36MCerPhotPix::MCerPhotPix(Int_t pix, Float_t phot, Float_t errphot) :
    3337    fPixId(pix), fIsUsed(kTRUE), fIsCore(kFALSE), fPhot(phot), fErrPhot(errphot)
    3438{
    3539}
    3640
     41// --------------------------------------------------------------------------
     42//
     43// Sets the information of one pixel.  The pixel is assumed as used and
     44// not a core pixel.
     45//
    3746void MCerPhotPix::SetPixelContent(Int_t pix, Float_t phot, Float_t errphot)
    3847{
    39   fPixId    = pix ;
    40   fIsUsed   = kTRUE ;
    41   fIsUsed   = kFALSE ;
    42   fPhot     = phot ;
    43   fErrPhot  = errphot ;
     48    fPixId   = pix;
     49    fIsUsed  = kTRUE;
     50    fPhot    = phot;
     51    fErrPhot = errphot;
    4452}
    4553
     54// --------------------------------------------------------------------------
     55//
     56//  Print information to gLog.
     57//
    4658void MCerPhotPix::Print(Option_t *)
    4759{
    48   //   information about a pixel
    4960    gLog << "MCerPhotPix: Pixel: "<< fPixId ;
    5061
  • trunk/MagicSoft/Mars/mraw/MRawRunHeader.cc

    r749 r764  
    4141ClassImp(MRawRunHeader)
    4242
     43// --------------------------------------------------------------------------
     44//
     45// Default constructor. Creates array which stores the pixel assignment.
     46//
     47//
    4348MRawRunHeader::MRawRunHeader(const char *name, const char *title) : fPixAssignment(NULL)
    4449{
     
    5257}
    5358
     59// --------------------------------------------------------------------------
     60//
     61// Destructor. Deletes the 'pixel-assignment-array'
     62//
    5463MRawRunHeader::~MRawRunHeader()
    5564{
     
    5766}
    5867
     68// --------------------------------------------------------------------------
     69//
     70// Read in one run header from the binary file
     71//
    5972void MRawRunHeader::ReadEvt(istream& fin)
    6073{
     
    106119}
    107120
     121// --------------------------------------------------------------------------
     122//
     123// print run header information on *fLog
     124//
    108125void MRawRunHeader::Print(Option_t *t)
    109126{
    110     //
    111     // print run header information on screen
    112     //
    113127    *fLog << endl;
    114128    *fLog << "MagicNumber:  0x" << hex << fMagicNumber << " - " << (fMagicNumber==kMagicNumber?"OK":"Wrong!") << endl;
     
    145159}
    146160
     161// --------------------------------------------------------------------------
     162//
     163// Return the assigned pixel number for the given FADC channel
     164//
    147165UShort_t MRawRunHeader::GetPixAssignment(UShort_t i) const
    148166{
     
    151169}
    152170
     171// --------------------------------------------------------------------------
     172//
     173// return the number of pixel in this event.
     174//
    153175UShort_t MRawRunHeader::GetNumPixel() const
    154176{
Note: See TracChangeset for help on using the changeset viewer.