Changeset 4826


Ignore:
Timestamp:
09/01/04 18:06:06 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4824 r4826  
    1919
    2020                                                 -*-*- END OF LINE -*-*-
     21
     22 2004/09/1: Thomas Bretz
     23
     24   * mfileio/MWriteRootFile.[h,cc]:
     25     - do not add a container which is already in the list
     26     - replaced fNameCont by fTitle in MRootFileBranch
     27
     28   * mgeom/MGeomPix.[h,cc]:
     29     - declared tan(30)
     30     - added GetL member function
     31
     32   * mhist/MHAlpha.cc:
     33     - added a logging output
     34
     35   * mhist/MHFalseSource.[h,cc]:
     36     - shift by MSrcPosCam introduced
     37     - fixed on-off plot
     38     - fixed changed return value MHillasSrc::Calc
     39     - as a workaround for some crashes removed SetBit(kCanDelete)
     40       of catalog
     41
     42   * mimage/MHHillasSrc.cc, mimage/MHillasSrc.cc:
     43     - some small fixes to new plots
     44     - some cosmetics to the code
     45
     46   * mimage/MHillas.cc, mimage/MHillasExt.cc,
     47     mimage/MImagePar.cc, mimage/MImgCleanStd.cc,
     48     mimage/MNewImagePar.cc:
     49     - removed obsolete include of fstream
     50
     51   * mpointing/Makefile, mpointing/PointingLinkDef.h:
     52     - added new class MPointingPosFromModel
     53     
     54   * mpointing/MPointingPosFromModel.[h,cc]:
     55     - added
     56
     57
     58
    2159 2004/08/31: Daniel Mazin
    2260
    2361   * manalysis/MSigmabarCalc.h:
    24      - added function SetNamePedPhotCam to set the name of the MPedPhotCam container
     62     - added function SetNamePedPhotCam to set the name of the
     63       MPedPhotCam container
     64
     65
    2566
    2667 2004/08/31: Thomas Bretz
  • trunk/MagicSoft/Mars/NEWS

    r4767 r4826  
    5454   - The the mars-executable Camera Display can now also read
    5555     calibrated data files written by callisto/MJCalibrateSignal
     56
     57   - Added a new class which can calculate the source position in
     58     the camera from a pointing model known to be correct and
     59     the pointing model used for observations (MSrcPosFromModel)
    5660
    5761
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.cc

    r4817 r4826  
    233233        name += branch->GetName();
    234234
    235         *fLog << " " << name.Strip(TString::kTrailing, '.') << ": \t" << branch->GetEntries() << " entries." << endl;
     235        *fLog << " " << name.Strip(TString::kTrailing, '.') << ": \t" << (ULong_t)branch->GetEntries() << " entries." << endl;
    236236    }
    237237
     
    240240    while ((t=(TTree*)NextTree()))
    241241        if (t->TestBit(kIsNewTree))
    242             *fLog << " " << t->GetName() << ": \t" << t->GetEntries() << " entries." << endl;
     242            *fLog << " " << t->GetName() << ": \t" << (ULong_t)t->GetEntries() << " entries." << endl;
    243243    *fLog << endl;
    244244}
     
    257257void MWriteRootFile::AddContainer(const char *cname, const char *tname, Bool_t must)
    258258{
     259    TIter Next(&fBranches);
     260    TObject *o=0;
     261    while ((o=Next()))
     262        if (TString(o->GetName())==TString(tname) && TString(o->GetTitle())==TString(cname))
     263        {
     264            *fLog << "WARNING - Container '" << cname << "' in Tree '" << tname << "' already scheduled... ignored." << endl;
     265            return;
     266        }
     267
    259268    //
    260269    // create a new entry in the list of branches to write and
     
    281290                                  Bool_t must)
    282291{
     292    TIter Next(&fBranches);
     293    TObject *o=0;
     294    while ((o=Next()))
     295        if (TString(o->GetName())==TString(tname) &&
     296            static_cast<MRootFileBranch*>(o)->GetContainer()==cont)
     297        {
     298            *fLog << "WARNING - Container " << cont << " in Tree '" << tname << "' already scheduled... ignored." << endl;
     299            return;
     300        }
     301
    283302    //
    284303    // create a new entry in the list of branches to write and
  • trunk/MagicSoft/Mars/mfileio/MWriteRootFile.h

    r4698 r4826  
    2323
    2424    MParContainer *fContainer;
    25     TString        fContName;
    2625
    2726    Bool_t         fMust;
     
    3736    {
    3837        Init(NULL, kFALSE);
    39         fContName = "";
     38        fTitle = "";
    4039    }
    4140
     
    4443    {
    4544        Init(tname, must);
    46         fContName = cname;
     45        fTitle = cname;
    4746    }
    4847
    4948    MRootFileBranch(MParContainer *cont, const char *tname=NULL, Bool_t must=kFALSE)
    50         : fTree(NULL), fBranch(NULL), fContName(""), fMust(0)
     49        : fTree(NULL), fBranch(NULL), fMust(0)
    5150    {
    5251        Init(tname, must);
     52        fTitle = "";
    5353        fContainer = cont;
    5454    }
     
    5858    void          *GetAddress()         { return &fContainer; }
    5959    TBranch       *GetBranch() const    { return fBranch; }
    60     const char    *GetContName() const  { return fContName; }
     60    const char    *GetContName() const  { return fTitle; }
    6161    Bool_t         MustHave() const     { return fMust; }
    6262
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.cc

    r3666 r4826  
    6565using namespace std;
    6666
     67const Float_t MGeomPix::gsTan30 = tan(30/kRad2Deg);
    6768const Float_t MGeomPix::gsTan60 = tan(60/kRad2Deg);
    6869
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.h

    r3666 r4826  
    1212private:
    1313    static const Float_t gsTan60; // tan(60/kRad2Deg);
     14    static const Float_t gsTan30; // tan(30/kRad2Deg);
    1415
    1516    enum {
     
    4546    Float_t GetY() const  { return fY; }
    4647    Float_t GetD() const  { return fD; }
     48    Float_t GetL() const  { return fD*gsTan30; } // Length of one of the parallel sides
    4749    UInt_t  GetSector() const { return fSector; }
    4850
  • trunk/MagicSoft/Mars/mhist/MHAlpha.cc

    r3779 r4826  
    138138        const MHillasSrc *hil = dynamic_cast<const MHillasSrc*>(par);
    139139        if (!par)
     140        {
     141            *fLog << err << dbginf << "MHillasSrc not found... abort." << endl;
    140142            return kFALSE;
     143        }
    141144
    142145        alpha = hil->GetAlpha();
  • trunk/MagicSoft/Mars/mhist/MHFalseSource.cc

    r4704 r4826  
    276276        *fLog << warn << "MTime not found... no derotation." << endl;
    277277
     278    fSrcPos = (MSrcPosCam*)plist->FindObject(AddSerialNumber("MSrcPosCam"));
     279    if (!fSrcPos)
     280        *fLog << warn << "MSrcPosCam not found... no translation." << endl;
     281
    278282    fObservatory = (MObservatory*)plist->FindObject(AddSerialNumber("MObservatory"));
    279283    if (!fObservatory)
     
    341345            // convert degrees to millimeters
    342346            v *= 1./fMm2Deg;
     347
     348            if (fSrcPos)
     349                v += fSrcPos->GetXY();
     350
    343351            src.SetXY(v);
    344352
    345353            // Source dependant hillas parameters
    346             if (!hsrc.Calc(*hil))
     354            if (hsrc.Calc(*hil)>0)
    347355            {
    348356                *fLog << warn << "Calculation of MHillasSrc failed for x=" << cx[ix] << " y=" << cy[iy] << endl;
     
    498506    if ((h5 = (TH2D*)gPad->FindObject("Alpha_yx_diff")))
    499507    {
    500         h5->Add(h3, h2, -1);
     508        h5->Add(h2, h3, -1);
    501509        MakeSymmetric(h5);
    502510    }
     
    575583    *fLog << err << "FIXME - The catalog will never be deleted, because this crashes!" << endl;
    576584
    577     stars->SetBit(kCanDelete);
     585//    stars->SetBit(kCanDelete);
    578586
    579587    return stars;
  • trunk/MagicSoft/Mars/mhist/MHFalseSource.h

    r3682 r4826  
    1414class MParList;
    1515class MTime;
     16class MSrcPosCam;
    1617class MPointingPos;
    1718class MObservatory;
     
    2223    MTime         *fTime;        //! container to take the event time from
    2324    MPointingPos  *fPointPos;    //! container to take pointing position from
     25    MSrcPosCam    *fSrcPos;      //! container for sopurce position in camera
    2426    MObservatory  *fObservatory; //! conteiner to take observatory location from
    2527
  • trunk/MagicSoft/Mars/mimage/MHHillasSrc.cc

    r4817 r4826  
    7373    fDist  = new TH1F("Dist",  "Dist of Ellipse",                 100,   0, 445);
    7474    fCosDA = new TH1F("CosDA", "cos(Delta,Alpha) of Ellipse",     101,  -1,   1);
    75     fDCA   = new TH1F("DCA",   "Distance of closest aproach",     101,  -1,   1);
    76     fDCADelta  = new TH1F("DCADelta", "Angle between shower and x-axis", 101,   0, 360);
     75    fDCA   = new TH1F("DCA",   "Distance of closest aproach",     101,  -500,   500);
     76    fDCADelta = new TH1F("DCADelta", "Angle between shower and x-axis", 101,   0, 360);
    7777
    7878    fAlpha->SetDirectory(NULL);
     
    132132    ApplyBinning(*plist, "Dist",     fDist);
    133133    ApplyBinning(*plist, "DCA",      fDCA);
    134     ApplyBinning(*plist, "DCADelta",     fDCADelta);
     134    ApplyBinning(*plist, "DCADelta", fDCADelta);
    135135
    136136    return kTRUE;
     
    203203
    204204    fDist->SetXTitle(mmscale ? "Dist [mm]" : "Dist [\\circ]");
    205     fDCA->SetXTitle(mmscale ? "DCA [mm]" : "DCA [\\circ]");
     205    fDCA ->SetXTitle(mmscale ? "DCA [mm]" : "DCA [\\circ]");
    206206
    207207    fUseMmScale = mmscale;
  • trunk/MagicSoft/Mars/mimage/MHillas.cc

    r4710 r4826  
    6060#include "MHillas.h"
    6161
    62 #include <fstream>
    63 
    6462#include <TArrayF.h>
    6563#include <TEllipse.h>
  • trunk/MagicSoft/Mars/mimage/MHillasExt.cc

    r4710 r4826  
    6363#include "MHillasExt.h"
    6464
    65 #include <fstream>
    6665#include <TArrayF.h>
    6766
  • trunk/MagicSoft/Mars/mimage/MHillasSrc.cc

    r4817 r4826  
    6969#include "MHillasSrc.h"
    7070
    71 #include <fstream>
    7271#include <TArrayF.h>
    7372
     
    9998
    10099    fDCA           = -1;
    101     fDCADelta          =  0;
     100    fDCADelta      =  0;
    102101}
    103102
  • trunk/MagicSoft/Mars/mimage/MImagePar.cc

    r4710 r4826  
    3636/////////////////////////////////////////////////////////////////////////////
    3737#include "MImagePar.h"
    38 
    39 #include <fstream>
    4038
    4139#include "MLog.h"
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r4717 r4826  
    605605
    606606#ifdef DEBUG
    607         *fLog << all << "Calc Islands" << endl;
     607    *fLog << all << "Calc Islands" << endl;
    608608#endif
    609609    // Takes roughly 10% of the time
  • trunk/MagicSoft/Mars/mimage/MNewImagePar.cc

    r4710 r4826  
    6969#include "MNewImagePar.h"
    7070
    71 #include <fstream>
    72 
    7371#include "MLog.h"
    7472#include "MLogManip.h"
  • trunk/MagicSoft/Mars/mpointing/Makefile

    r4804 r4826  
    2626           MPointingPosCalc.cc \
    2727           MSrcPosCam.cc \
    28            MSrcPosCalc.cc
     28           MSrcPosCalc.cc \
     29           MSrcPosFromModel.cc
    2930
    3031############################################################
  • trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h

    r4804 r4826  
    1010#pragma link C++ class MPointingPosCalc+;
    1111
     12#pragma link C++ class MSrcPosCam+;
    1213#pragma link C++ class MSrcPosCalc+;
    13 #pragma link C++ class MSrcPosCam+;
     14#pragma link C++ class MSrcPosFromModel+;
    1415
    1516#endif
Note: See TracChangeset for help on using the changeset viewer.