Changeset 7297 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
08/22/05 10:46:31 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7292 r7297  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2005/08/22 Thomas Bretz
     22
     23   * mgeom/MGeomPix.h:
     24     - added new function GetDist returning the distance between two
     25       pixels
     26
     27   * mhist/MHCamera.h:
     28     - added new function (also to context menu) SetMinMax
     29
     30   * mhist/MHEvent.[h,cc]:
     31     - added the possibility to set min and max values for the displayed
     32       data
     33     - added a new option to display the arrival time after cleaning
     34
     35   * mmain/MEventDisplay.cc:
     36     - added the arrival time after cleaning to display
     37     - set the min value in some displays to 0
     38
     39   * msignal/MSignalCam.cc:
     40     - added the possibility to return the arrival time after cleaning
     41
     42
     43
    2044 2005/08/18
    2145
  • trunk/MagicSoft/Mars/mgeom/MGeomCam.cc

    r6338 r7297  
    141141// --------------------------------------------------------------------------
    142142//
     143// Returns the distance between the pixels i and j. -1 if an index
     144// doesn't exist. The default for j is 0. Assuming that 0 is the index
     145// for a central pixel you can get the distance to the camera center.
     146//
     147Float_t MGeomCam::GetDist(UShort_t i, UShort_t j) const
     148{
     149    if (i>=fNumPixels || j>=fNumPixels)
     150        return -1;
     151
     152    return (*this)[i].GetDist((*this)[j]);
     153}
     154
     155// --------------------------------------------------------------------------
     156//
    143157//  Set the kIsOuterRing flag for all pixels which have a outermost pixel
    144158//  as Next Neighbor and don't have the kIsOutermostRing flag itself.
  • trunk/MagicSoft/Mars/mgeom/MGeomPix.h

    r5429 r7297  
    6363    UInt_t  GetSector() const { return fSector; }
    6464
     65    Float_t GetDist(const MGeomPix & pix) const  { return TMath::Hypot(fX-pix.fX, fY-pix.fY); }
     66
    6567    Float_t GetA() const    { return fA; /*fD*fD*gsTan60/2;*/ }
    6668    Int_t   GetAidx() const { return fAidx; }
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r7001 r7297  
    221221    void     SetInvDeepBlueSeaPalette(); // *MENU*
    222222
    223     void     SetAutoScale() { fMinimum = fMaximum = -1111; } // *MENU*
    224 
    225223    void     SetFreezed(Bool_t f=kTRUE) { f ? SetBit(kFreezed) : ResetBit(kFreezed); } // *TOGGLE* *GETTER=IsFreezed
    226224    Bool_t   IsFreezed() const { return TestBit(kFreezed); }
     
    228226
    229227    void     SetAbberation(Float_t f=0.0713) { fAbberation=f; } // *MENU*
     228
     229    void     SetAutoScale() { fMinimum = fMaximum = -1111; } // *MENU*
     230    void     SetMinMax(Double_t min=-1111, Double_t max=-1111) { SetMinimum(min); SetMaximum(max); } // *MENU*
    230231
    231232    void     AddNotify(TObject *event);
  • trunk/MagicSoft/Mars/mhist/MHEvent.cc

    r7180 r7297  
    7171// --------------------------------------------------------------------------
    7272//
    73 MHEvent::MHEvent(EventType_t type) : fHist(NULL), fType(type)
     73MHEvent::MHEvent(EventType_t type) : fHist(NULL), fType(type),
     74    fMinimum(-1111), fMaximum(-1111)
    7475{
    7576    fName = "MHEvent";
     
    121122    fHist = new MHCamera(*cam);
    122123    fHist->AddNotify(fClone);
     124
     125    fHist->SetMinimum(fMinimum);
     126    fHist->SetMaximum(fMaximum);
    123127
    124128    switch (fType)
     
    167171        break;
    168172     case kEvtArrTime:
     173     case kEvtArrTimeCleaned:
    169174        fHist->SetName("Arrival Time");
    170175        fHist->SetYTitle("t [slice id]");
     
    241246    case kEvtArrTime:
    242247        fHist->SetCamContent(*event, 6);
     248        break;
     249    case kEvtArrTimeCleaned:
     250        fHist->SetCamContent(*event, 8);
    243251        break;
    244252    case kEvtTrigPix:
  • trunk/MagicSoft/Mars/mhist/MHEvent.h

    r7180 r7297  
    2525        kEvtPedPhot, kEvtPedPhotRMS,
    2626        kEvtCleaningLevels, kEvtCleaningData,
    27         kEvtIdxMax, kEvtArrTime, kEvtTrigPix, kEvtIslandIndex
     27        kEvtIdxMax, kEvtArrTime, kEvtArrTimeCleaned,
     28        kEvtTrigPix, kEvtIslandIndex
    2829    };
    2930
     
    4546    EventType_t fType;
    4647
     48    Double_t fMinimum;
     49    Double_t fMaximum;
     50
    4751    TH1 *GetHistByName(const TString name) const { return (TH1*)fHist; }
    4852
     
    5357    MHEvent(EventType_t type=kEvtSignalRaw);
    5458    ~MHEvent();
     59
     60    void SetMinimum(Double_t min=-1111) { fMinimum=min; }
     61    void SetMaximum(Double_t max=-1111) { fMaximum=max; }
    5562
    5663    MHCamera *GetHist() { return fHist; }
  • trunk/MagicSoft/Mars/mmain/MEventDisplay.cc

    r7188 r7297  
    223223    MHEvent *evt07 = new MHEvent(MHEvent::kEvtIdxMax);
    224224    MHEvent *evt08 = new MHEvent(MHEvent::kEvtArrTime);
     225    MHEvent *evt09 = new MHEvent(MHEvent::kEvtArrTimeCleaned);
    225226    //MHEvent *evt09 = new MHEvent(MHEvent::kEvtTrigPix);
    226227    MHEvent *evt10 = new MHEvent(MHEvent::kEvtIslandIndex);
     
    228229    evt01->SetName("Signal");
    229230    evt02->SetName("Cleaned");
    230     evt03->SetName("Pedestal");
     231    evt03->SetName("Ped");
    231232    evt04->SetName("PedRMS");
    232233    evt06a->SetName("CleanData");
    233     evt06b->SetName("CleanLevels");
    234     evt07->SetName("Max Slice Idx");
    235     evt08->SetName("Arrival Time");
    236     //evt09->SetName("Trigger");
     234    evt06b->SetName("Levels");
     235    evt07->SetName("MaxSliceIdx");
     236    evt08->SetName("ArrTime");
     237    evt09->SetName("Time");
    237238    evt10->SetName("Islands");
     239
     240    evt01->SetMinimum(0);
     241    evt03->SetMinimum(0);
     242    evt04->SetMinimum(0);
     243    evt06a->SetMinimum(0);
    238244
    239245    // This makes sure, that the containers are deleted...
     
    246252    plist->AddToList(evt07);
    247253    plist->AddToList(evt08);
    248     //plist->AddToList(evt09);
     254    plist->AddToList(evt09);
    249255    plist->AddToList(evt10);
    250256
     
    336342    {
    337343        MFillH *fill08 = new MFillH(evt08, "MSignalCam", "MFillH8");
     344        MFillH *fill09 = new MFillH(evt09, "MSignalCam", "MFillH9");
    338345        tlist->AddToList(fill08);
     346        tlist->AddToList(fill09);
    339347    }
    340348    tlist->AddToList(hcalc);
  • trunk/MagicSoft/Mars/msignal/MSignalCam.cc

    r6856 r7297  
    600600    MSignalPix *pix = GetPixById(idx);
    601601
    602     if ((!pix || !pix->IsPixelUsed()) && type<6)
     602    if ((!pix || !pix->IsPixelUsed()) && (type<6 || type==8))
    603603        return kFALSE;
    604604
     
    632632        val = pix->GetArrivalTime();
    633633        break;
     634    case 8:
     635        val = pix->GetArrivalTime();
     636        break;
    634637    default:
    635638        val = pix->GetNumPhotons()*ratio;
Note: See TracChangeset for help on using the changeset viewer.