Changeset 6857


Ignore:
Timestamp:
03/18/05 17:54:02 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationTestCam.cc

    r6210 r6857  
    2626// MHCalibrationTestCam                                               
    2727//                                                                       
    28 // Fills the calibrated signal from an MCerPhotEvt into
     28// Fills the calibrated signal from an MSignalCam into
    2929// MHCalibrationPix for every:
    3030//
     
    9494#include "MCalibrationPix.h"
    9595
    96 #include "MCerPhotEvt.h"
    97 #include "MCerPhotPix.h"
     96#include "MSignalCam.h"
     97#include "MSignalPix.h"
    9898
    9999#include "MGeomCam.h"
     
    155155//
    156156// Searches pointer to:
    157 // - MCerPhotEvt
     157// - MSignalCam
    158158//
    159159// Calls:
     
    174174
    175175
    176   MCerPhotEvt *signal = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     176  MSignalCam *signal = (MSignalCam*)pList->FindObject("MSignalCam");
    177177  if (!signal)
    178178  {
    179       *fLog << err << "MCerPhotEvt not found... abort." << endl;
     179      *fLog << err << "MSignalCam not found... abort." << endl;
    180180      return kFALSE;
    181181  }
     
    199199// -------------------------------------------------------------------------------
    200200//
    201 // Retrieves pointer to MCerPhotEvt:
     201// Retrieves pointer to MSignalCam:
    202202//
    203203// Retrieves from MGeomCam:
     
    208208// Fills HiGain histograms (MHGausEvents::FillHistAndArray())
    209209// with:
    210 // - MCerPhotPix::GetNumPhotons(pixid);
     210// - MSignalPix::GetNumPhotons(pixid);
    211211//
    212212Bool_t MHCalibrationTestCam::FillHists(const MParContainer *par, const Stat_t w)
    213213{
    214214
    215   MCerPhotEvt *calibration = (MCerPhotEvt*)par;
     215  MSignalCam *calibration = (MSignalCam*)par;
    216216  if (!calibration)
    217217    {
     
    234234      MHCalibrationPix &histhi = (*this)[i];
    235235
    236       const MCerPhotPix *pix = calibration->GetPixById(i);
     236      const MSignalPix *pix = calibration->GetPixById(i);
    237237      if (!pix)
    238238        continue;
  • trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.cc

    r6855 r6857  
    2828// MGeomCamMagicEnhance
    2929//
    30 // This task takes MCerPhotEvt assuming that it is related to the Magic
    31 // camera geometry. By deviding and interpolation it resamples MCerPhotEvt
     30// This task takes MSignalCam assuming that it is related to the Magic
     31// camera geometry. By deviding and interpolation it resamples MSignalCam
    3232// such, that afterwards it is related to a geometry MGeomCamMagicXT
    3333//
     
    4040#include "MParList.h"
    4141
    42 #include "MCerPhotEvt.h"
    43 #include "MCerPhotPix.h"
     42#include "MSignalCam.h"
     43#include "MSignalPix.h"
    4444
    4545#include "MArrayD.h"
     
    4949using namespace std;
    5050
    51 const char *MGeomCamMagicEnhance::fgNameCerPhotEvtIn  = "MCerPhotEvt";
    52 const char *MGeomCamMagicEnhance::fgNameCerPhotEvtOut = "MCerPhotEvt";
     51const char *MGeomCamMagicEnhance::fgNameSignalCamIn  = "MSignalCam";
     52const char *MGeomCamMagicEnhance::fgNameSignalCamOut = "MSignalCam";
    5353
    5454// ---------------------------------------------------------------------------
     
    5757//
    5858MGeomCamMagicEnhance::MGeomCamMagicEnhance(const char *name, const char *title)
    59     : fNameCerPhotEvtIn(fgNameCerPhotEvtIn), fNameCerPhotEvtOut(fgNameCerPhotEvtOut),
     59    : fNameSignalCamIn(fgNameSignalCamIn), fNameSignalCamOut(fgNameSignalCamOut),
    6060    fEvtIn(0), fEvtOut(0)
    6161{
    6262    fName  = name  ? name  : "MGeomCamMagicEnhance";
    63     fTitle = title ? title : "Task to convert MCerPhotEvt from MGeomCamMagic to MGeomCamMagicXT";
     63    fTitle = title ? title : "Task to convert MSignalCam from MGeomCamMagic to MGeomCamMagicXT";
    6464}
    6565
    6666// ---------------------------------------------------------------------------
    6767//
    68 //  Search for MCerPhotEvt input and output container.
     68//  Search for MSignalCam input and output container.
    6969//
    7070Int_t MGeomCamMagicEnhance::PreProcess(MParList *plist)
    7171{
    72     fEvtIn = (MCerPhotEvt*)plist->FindObject(fNameCerPhotEvtIn, "MCerPhotEvt");
     72    fEvtIn = (MSignalCam*)plist->FindObject(fNameSignalCamIn, "MSignalCam");
    7373    if (!fEvtIn)
    7474    {
    75         *fLog << err << fNameCerPhotEvtIn << " [MCerPhotEvt] not found... abort." << endl;
     75        *fLog << err << fNameSignalCamIn << " [MSignalCam] not found... abort." << endl;
    7676        return kFALSE;
    7777    }
    7878
    79     fEvtOut = (MCerPhotEvt*)plist->FindCreateObj("MCerPhotEvt", fNameCerPhotEvtOut);
     79    fEvtOut = (MSignalCam*)plist->FindCreateObj("MSignalCam", fNameSignalCamOut);
    8080    if (!fEvtOut)
    8181        return kFALSE;
     
    155155// ---------------------------------------------------------------------------
    156156//
    157 //  Call Convert and copy result into output MCerPhotEvt
     157//  Call Convert and copy result into output MSignalCam
    158158//
    159159Int_t MGeomCamMagicEnhance::Process()
     
    162162    const MArrayD res(Convert());
    163163
    164     // Copy result into output MCerPhotEvt
     164    // Copy result into output MSignalCam
    165165    fEvtOut->InitSize(res.GetSize());
    166166
  • trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.h

    r5691 r6857  
    77
    88class MArrayD;
    9 class MCerPhotEvt;
     9class MSignalCam;
    1010
    1111class MGeomCamMagicEnhance : public MTask
    1212{
    1313private:
    14     static const char *fgNameCerPhotEvtIn;
    15     static const char *fgNameCerPhotEvtOut;
     14    static const char *fgNameSignalCamIn;
     15    static const char *fgNameSignalCamOut;
    1616
    17     TString fNameCerPhotEvtIn;
    18     TString fNameCerPhotEvtOut;
     17    TString fNameSignalCamIn;
     18    TString fNameSignalCamOut;
    1919
    20     MCerPhotEvt *fEvtIn;
    21     MCerPhotEvt *fEvtOut;
     20    MSignalCam *fEvtIn;
     21    MSignalCam *fEvtOut;
    2222
    2323    MArrayD Convert() const;
     
    3131    MGeomCamMagicEnhance(const char *name=0, const char *title=0);
    3232
    33     void SetNameCerPhotEvtIn(const char *n) { fNameCerPhotEvtIn = n; }
    34     void SetNameCerPhotEvtOut(const char *n) { fNameCerPhotEvtOut = n; }
     33    void SetNameSignalCamIn(const char *n) { fNameSignalCamIn = n; }
     34    void SetNameSignalCamOut(const char *n) { fNameSignalCamOut = n; }
    3535
    36     ClassDef(MGeomCamMagicEnhance, 0) //Task to convert MCerPhotEvt from MGeomCamMagic to MGeomCamMagicXT
     36    ClassDef(MGeomCamMagicEnhance, 0) //Task to convert MSignalCam from MGeomCamMagic to MGeomCamMagicXT
    3737};
    3838   
  • trunk/MagicSoft/Mars/mhft/MHexagonalFTCalc.cc

    r6855 r6857  
    3131// backward tranformation.
    3232//
    33 // If you don't want to copy the rsult back to any MCerPhotEvt call
    34 // SetNameCerPhotEvtOut()
     33// If you don't want to copy the rsult back to any MSignalCam call
     34// SetNameSignalCamOut()
    3535//
    3636// Currently - this will change in the future! - there are two output
     
    6060#include "MGeomPix.h"
    6161
    62 #include "MCerPhotEvt.h"
    63 #include "MCerPhotPix.h"
     62#include "MSignalCam.h"
     63#include "MSignalPix.h"
    6464
    6565#include "MHexagonFreqSpace.h"
     
    7272
    7373const char *MHexagonalFTCalc::fgNameGeomCam       = "MGeomCam";
    74 const char *MHexagonalFTCalc::fgNameCerPhotEvtIn  = "MCerPhotEvt";
    75 const char *MHexagonalFTCalc::fgNameCerPhotEvtOut = "MCerPhotEvt";
     74const char *MHexagonalFTCalc::fgNameSignalCamIn  = "MSignalCam";
     75const char *MHexagonalFTCalc::fgNameSignalCamOut = "MSignalCam";
    7676
    7777// ---------------------------------------------------------------------------
     
    8383MHexagonalFTCalc::MHexagonalFTCalc(const char *name, const char *title)
    8484    : fNameGeomCam(fgNameGeomCam),
    85     fNameCerPhotEvtIn(fgNameCerPhotEvtIn), fNameCerPhotEvtOut(fgNameCerPhotEvtOut),
     85    fNameSignalCamIn(fgNameSignalCamIn), fNameSignalCamOut(fgNameSignalCamOut),
    8686    fEvtIn(0), fEvtOut(0),
    8787    fMaxAmplitude(0.08), fMaxRowFraction(0.75), fSkipBwdTrafo(kFALSE)
     
    114114Int_t MHexagonalFTCalc::PreProcess(MParList *plist)
    115115{
    116     fEvtIn = (MCerPhotEvt*)plist->FindObject(fNameCerPhotEvtIn, "MCerPhotEvt");
     116    fEvtIn = (MSignalCam*)plist->FindObject(fNameSignalCamIn, "MSignalCam");
    117117    if (!fEvtIn)
    118118    {
    119         *fLog << err << fNameCerPhotEvtIn << " [MCerPhotEvt] not found... abort." << endl;
     119        *fLog << err << fNameSignalCamIn << " [MSignalCam] not found... abort." << endl;
    120120        return kFALSE;
    121121    }
    122122
    123123    fEvtOut=0;
    124     if (!fNameCerPhotEvtOut.IsNull())
    125     {
    126         fEvtOut = (MCerPhotEvt*)plist->FindCreateObj(fNameCerPhotEvtOut, "MCerPhotEvt");
     124    if (!fNameSignalCamOut.IsNull())
     125    {
     126        fEvtOut = (MSignalCam*)plist->FindCreateObj(fNameSignalCamOut, "MSignalCam");
    127127        if (!fEvtOut)
    128128            return kFALSE;
     
    240240// ---------------------------------------------------------------------------
    241241//
    242 // - Copy input MCerPhotEvt using the pixel mapping into an array
     242// - Copy input MSignalCam using the pixel mapping into an array
    243243// - Do forward transformation
    244244// - substract fourier offset
     
    246246// - add fourier offset
    247247// - do backward tranformation
    248 // - copy result back into output MCerPhotEvt
     248// - copy result back into output MSignalCam
    249249//
    250250Int_t MHexagonalFTCalc::Process()
     
    254254    MArrayD re(lim);
    255255
    256     //    MCerPhotPix *pix=0;
    257     //    MCerPhotEvtIter Next(fEvtIn, kFALSE);
    258     //    while ((pix = (MCerPhotPix*)Next()))
    259     // Copy data from MCerPhotEvt into array
     256    //    MSignalPix *pix=0;
     257    //    MSignalCamIter Next(fEvtIn, kFALSE);
     258    //    while ((pix = (MSignalPix*)Next()))
     259    // Copy data from MSignalCam into array
    260260    const UInt_t npix = fEvtIn->GetNumPixels();
    261261    for (UInt_t idx=0; idx<npix; idx++)
     
    302302
    303303    // ----------------------------------------------------
    304     // Do we have to copy the result back into MCerPhotEvt?
     304    // Do we have to copy the result back into MSignalCam?
    305305    // ----------------------------------------------------
    306306    if (!fEvtOut)
  • trunk/MagicSoft/Mars/mhft/MHexagonalFTCalc.h

    r5691 r6857  
    1313
    1414class MArrayD;
    15 class MCerPhotEvt;
     15class MSignalCam;
    1616class MHexagonFreqSpace;
    1717
     
    2020private:
    2121    static const char *fgNameGeomCam;       // Default name of used geometry
    22     static const char *fgNameCerPhotEvtIn;  // Default name of used input MCerPhotEvt
    23     static const char *fgNameCerPhotEvtOut; // Default name of used output MCerPhotEvt
     22    static const char *fgNameSignalCamIn;  // Default name of used input MSignalCam
     23    static const char *fgNameSignalCamOut; // Default name of used output MSignalCam
    2424
    2525    TString fNameGeomCam;       // name of used geometry
    26     TString fNameCerPhotEvtIn;  // name of used input MCerPhotEvt
    27     TString fNameCerPhotEvtOut; // name of used output MCerPhotEvt
     26    TString fNameSignalCamIn;  // name of used input MSignalCam
     27    TString fNameSignalCamOut; // name of used output MSignalCam
    2828
    29     MCerPhotEvt       *fEvtIn;  // input MCerPhotEvt
    30     MCerPhotEvt       *fEvtOut; // output MCerPhotEvt
     29    MSignalCam       *fEvtIn;  // input MSignalCam
     30    MSignalCam       *fEvtOut; // output MSignalCam
    3131
    3232    MHexagonFreqSpace *fFreq1;  //!
     
    5656
    5757    void SetNameGeomCam(const char *n) { fNameGeomCam = n; }       // name of camera geometry used
    58     void SetNameCerPhotEvtIn(const char *n)     { fNameCerPhotEvtIn = n; }  // name of input MCerPhotEvt used
    59     void SetNameCerPhotEvtOut(const char *n="") { fNameCerPhotEvtOut = n; } // name of ouput MCerPhotEvt used
     58    void SetNameSignalCamIn(const char *n)     { fNameSignalCamIn = n; }  // name of input MSignalCam used
     59    void SetNameSignalCamOut(const char *n="") { fNameSignalCamOut = n; } // name of ouput MSignalCam used
    6060
    6161    void SetMaxAmplitude(Float_t max) { fMaxAmplitude=max; } // amplitude to cut at
  • trunk/MagicSoft/Mars/mhft/Makefile

    r5694 r6857  
    1919#  connect the include files defined in the config.mk file
    2020#
    21 INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../manalysis
     21INCLUDES = -I. -I../mbase -I../mgui -I../mgeom -I../msignal
    2222
    2323#manalysis: MChisqEval (MParameters)
  • trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.cc

    r5354 r6857  
    2020!   Author(s): Markus Gaug 4/2004 <mailto:markus@ifae.es>
    2121!
    22 !   Copyright: MAGIC Software Development, 2000-2004
     22!   Copyright: MAGIC Software Development, 2000-2005
    2323!
    2424!
     
    3636//
    3737//  Input Containers:
    38 //   MCerPhotEvt
     38//   MSignalCam
    3939//
    4040//  Output Containers:
     
    5050#include "MRawRunHeader.h"
    5151
    52 #include "MCerPhotPix.h"
    53 #include "MCerPhotEvt.h"
     52#include "MSignalPix.h"
     53#include "MSignalCam.h"
    5454
    5555#include "MPedPhotPix.h"
     
    7777// Look for the following input containers:
    7878//
    79 //  - MCerPhotEvt
     79//  - MSignalCam
    8080//  - MBadPixelsCam
    8181//
     
    8888{     
    8989  // Look for input container
    90   fCerPhot = (MCerPhotEvt*)pList->FindObject("MCerPhotEvt");
     90  fCerPhot = (MSignalCam*)pList->FindObject("MSignalCam");
    9191  if (!fCerPhot)
    9292    {
    93       *fLog << err << "MPedPhotCalc::PreProcess Error: MCerPhotEvt not found... aborting." << endl;
     93      *fLog << err << "MSignalCam not found... aborting." << endl;
    9494      return kFALSE;
    9595    }
     
    9898  fBadPixels = (MBadPixelsCam*)pList->FindObject("MBadPixelsCam");
    9999  if (!fBadPixels)
    100     {
    101       *fLog << warn << "MPedPhotCalc::PreProcess Warning: No MBadPixelsCam found." << endl;
    102     }
     100      *fLog << warn << "WARNING - MBadPixelsCam not found... ignored." << endl;
    103101
    104102  // Create output container
     
    143141Int_t MPedPhotCalc::Process()
    144142{
    145     for(UInt_t i=0;i<fCerPhot->GetNumPixels();i++)
     143    const UInt_t n = fCerPhot->GetNumPixels();
     144    for(UInt_t idx=0; idx<n; idx++)
    146145    {
    147        const MCerPhotPix &pix = (*fCerPhot)[i];
    148        const Int_t pixidx = pix.GetPixId();
    149 
    150        const Float_t nphot = pix.GetNumPhotons();
     146       const Float_t nphot = (*fCerPhot)[idx].GetNumPhotons();
    151147       
    152        fSumx[pixidx]  += nphot;
    153        fSumx2[pixidx] += nphot*nphot;
     148       fSumx[idx]  += nphot;
     149       fSumx2[idx] += nphot*nphot;
    154150    }
    155151
  • trunk/MagicSoft/Mars/mpedestal/MPedPhotCalc.h

    r3803 r6857  
    1111
    1212class MPedPhotCam;
    13 class MCerPhotEvt;
     13class MSignalCam;
    1414class MBadPixelsCam;
    1515class MPedPhotCalc : public MTask
     
    1717
    1818  MPedPhotCam   *fPedestals;  // Pedestals of all pixels in the camera
    19   MCerPhotEvt   *fCerPhot;    // Calibrated Cherenkov events
     19  MSignalCam    *fCerPhot;    // Calibrated Cherenkov events
    2020  MBadPixelsCam *fBadPixels;  // Bad Pixels
    2121 
Note: See TracChangeset for help on using the changeset viewer.