Changeset 7208


Ignore:
Timestamp:
07/22/05 11:11:26 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7205 r7208  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22 2005/07/22 Thomas Bretz
     23
     24   * macros/tutorials/extendcam.C, macros/tutorials/hft.C:
     25     - some updates. Replaced MCerPhotEvt by MSignalCam
     26
     27   * mhflux/MHDisp.cc:
     28     - some more fixes to allow no-smearing
     29
     30   * mhft/MGeomCamMagicEnhance.cc:
     31     - replaced GetPixById by the id itself
     32
     33   * mimage/MImgCleanStd.cc:
     34     - do not check for the pedestal container if absolute cleaning
     35       has been chosen
     36
     37   * mjobs/MJCalibrateSignal.cc:
     38     - removed obsolete comments
     39
     40   * mreport/MReport.[h,cc]:
     41     - added some conversions for wrong version numbers
     42
     43   * mreport/MReportCamera.cc:
     44     - fixed a problem reading files with gkActiveLoadControlVersNum
     45
     46
     47
    2248 2005/07/21 Thomas Bretz
    2349
  • trunk/MagicSoft/Mars/macros/tutorials/extendcam.C

    r7159 r7208  
    6565MHCamera *d6=new MHCamera(MGeomCamMagicXT());
    6666
    67 MCerPhotEvt *evt=0;
     67MSignalCam *evt=0;
    6868MMcEvt *mc;
    6969
     
    8181
    8282    //Für Real-Raum
    83     evt = (MCerPhotEvt*)plist->FindObject("MCerPhotEvt");
     83    evt = (MSignalCam*)plist->FindObject("MSignalCam");
    8484    if (!evt)
    8585    {
    86         cout << "Fehler: MCerPhotEvt" << endl;
     86        cout << "Fehler: MSignalCam" << endl;
    8787        return kFALSE;
    8888    }
     
    135135Int_t Process()
    136136{
    137     d1->SetCamContent(*(MCerPhotEvt*)cl1->GetClone());
    138     d2->SetCamContent(*(MCerPhotEvt*)cl2->GetClone());
     137    d1->SetCamContent(*(MSignalCam*)cl1->GetClone());
     138    d2->SetCamContent(*(MSignalCam*)cl2->GetClone());
    139139    d3->SetCamContent(*fFreq2);
    140     d4->SetCamContent(*(MCerPhotEvt*)cl4->GetClone());
    141     d5->SetCamContent(*(MCerPhotEvt*)cl3->GetClone());
     140    d4->SetCamContent(*(MSignalCam*)cl4->GetClone());
     141    d5->SetCamContent(*(MSignalCam*)cl3->GetClone());
    142142    d6->SetCamContent(*evt);
    143143
     
    174174    MReadMarsFile read("Events");
    175175    read.DisableAutoScheme();
    176     read.AddFile("/home/kolodziejski/Diplomarbeit/marsdata/mcdata/*.root");
     176    read.AddFile("/home/tbretz/Software/mcwobble/lza/cal/19*.root");
    177177    //read.AddFile("/home/hoehne/data/mcdata/gammas/calib/calib_gamma_zbin0.root");
    178178    //read.AddFile("/home/hoehne/data/mcdata/hadrons/calib/calib_proton_zbin0.root");
     
    184184    // enhance.SetNameCerPhotEvtOut("MCerPhotEvt2");
    185185
    186     MClone clone1("MCerPhotEvt", "Clone1");
    187     MClone clone2("MCerPhotEvt", "Clone2");
    188     MClone clone3("MCerPhotEvt", "Clone3");
    189     MClone clone4("MCerPhotEvt", "Clone4");
     186    MClone clone1("MSignalCam", "Clone1");
     187    MClone clone2("MSignalCam", "Clone2");
     188    MClone clone3("MSignalCam", "Clone3");
     189    MClone clone4("MSignalCam", "Clone4");
    190190
    191191    cl1 = &clone1;
     
    202202    mytask.SetProcess(Process);
    203203
    204     MImgCleanStd clean1(26, 18);
     204    MImgCleanStd clean1(8, 4.5);
    205205    clean1.SetMethod(MImgCleanStd::kAbsolute);
    206206    clean1.SetNameGeomCam("MGeomCamMagicXT");
    207 
    208     MImgCleanStd clean2(26, 18);
     207    clean1.SetNamePedPhotCam("MPedPhotFromExtractorRndm");
     208
     209    MImgCleanStd clean2(8, 4.5);
    209210    clean2.SetMethod(MImgCleanStd::kAbsolute);
    210211    clean2.SetNameGeomCam("MGeomCamMagicXT");
     212    clean2.SetNamePedPhotCam("MPedPhotFromExtractorRndm");
    211213
    212214    // Setup your tasklist
  • trunk/MagicSoft/Mars/macros/tutorials/hft.C

    r7159 r7208  
    188188}
    189189
    190 void hft(const char *fname="/home/hoehne/data/mcdata/hadrons/calib/calib_proton_zbin0.root")
     190void hft(const char *fname="/home/tbretz/Software/mcwobble/lza/cal/19*.root")
    191191{
    192192    // Setup parameter- and tasklist
     
    201201
    202202    // Clone MCerPhotEvt befor eimage cleaning
    203     MClone clone1("MCerPhotEvt", "Clone1");
     203    MClone clone1("MSignalCam", "Clone1");
    204204
    205205    // Setup image cleaning
    206     MImgCleanStd clean(24, 12);
     206    MImgCleanStd clean(8.5, 4);
    207207    clean.SetMethod(MImgCleanStd::kAbsolute);
     208    clean.SetNamePedPhotCam("MPedPhotFromExtractorRndm");
    208209
    209210    // Clone MCerPhotEvt befor eimage cleaning
    210     MClone clone2("MCerPhotEvt", "Clone2");
     211    MClone clone2("MSignalCam", "Clone2");
    211212
    212213    // Setup intercative task calling the functions defined above
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7202 r7208  
    248248    // To calculate significance map smear with 2*theta-cut and
    249249    // do not normalize gauss, for event map use theta-cut/2 instead
    250     for (int x=1; x<=nx; x++)
    251     {
    252         const Double_t cx = axex.GetBinCenter(x);
    253         const Double_t px = cx-pos1.X();
    254 
    255         for (int y=1; y<=ny; y++)
    256         {
    257             const Double_t cy = axey.GetBinCenter(y);
    258             const Double_t sp = Sq(px, cy-pos1.Y());
    259             if (smear)
     250    if (smear || fHistOff)
     251    {
     252        for (int x=1; x<=nx; x++)
     253        {
     254            const Double_t cx = axex.GetBinCenter(x);
     255            const Double_t px = cx-pos1.X();
     256
     257            for (int y=1; y<=ny; y++)
    260258            {
    261                 const Double_t dp = sp/psf;
    262 
    263                 // Values below 1e-3 (>3.5sigma) are not filled into the histogram
    264                 if (dp<4)
     259                const Double_t cy = axey.GetBinCenter(y);
     260                const Double_t sp = Sq(px, cy-pos1.Y());
     261                if (smear)
    265262                {
    266                     const Double_t rc = TMath::Exp(-dp)/normg;
    267                     if (!fHistOff)
    268                         bg.AddBinContent(bg.GetBin(x, y), rc);
    269                     else
    270                         fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
     263                    const Double_t dp = sp/psf;
     264
     265                    // Values below 1e-3 (>3.5sigma) are not filled into the histogram
     266                    if (dp<4)
     267                    {
     268                        const Double_t rc = TMath::Exp(-dp)/normg;
     269                        if (!fHistOff)
     270                            bg.AddBinContent(bg.GetBin(x, y), rc);
     271                        else
     272                            fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
     273                    }
    271274                }
     275
     276                if (!fHistOff)
     277                    continue;
     278
     279                // If we are filling the signal already (fHistOff!=NULL)
     280                // we also fill the background by projecting the
     281                // background in the camera into the sky plot.
     282                const TVector2 v = TVector2(cx+m.X(), cy+m.Y());
     283
     284                // Speed up further: Xmax-fWobble
     285                if (v.Mod()>axex.GetXmax()) // Gains 10% speed
     286                    continue;
     287
     288                const Int_t    bx = axex.FindFixBin(v^rot);
     289                const Int_t    by = axey.FindFixBin(v*rot);
     290                const Double_t bg = fHistOff->GetBinContent(bx, by, bz);
     291
     292                fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg);
    272293            }
    273 
    274             if (!fHistOff)
    275                 continue;
    276 
    277             // If we are filling the signal already (fHistOff!=NULL)
    278             // we also fill the background by projecting the
    279             // background in the camera into the sky plot.
    280             const TVector2 v = TVector2(cx+m.X(), cy+m.Y());
    281 
    282             // Speed up further: Xmax-fWobble
    283             if (v.Mod()>axex.GetXmax()) // Gains 10% speed
    284                 continue;
    285 
    286             const Int_t    bx = axex.FindFixBin(v^rot);
    287             const Int_t    by = axey.FindFixBin(v*rot);
    288             const Double_t bg = fHistOff->GetBinContent(bx, by, bz);
    289 
    290             fHistBg.AddBinContent(fHistBg.GetBin(x, y), bg);
    291294        }
    292295    }
  • trunk/MagicSoft/Mars/mhft/MGeomCamMagicEnhance.cc

    r6857 r7208  
    9292    Double_t dEvt[577];
    9393    for (int i = 0; i<577; ++i)
    94         dEvt[i] = fEvtIn->GetPixById(i)->GetNumPhotons();
     94        dEvt[i] = (*fEvtIn)[i].GetNumPhotons();
    9595
    9696    MArrayD dEvent(1141);
  • trunk/MagicSoft/Mars/mimage/MImgCleanStd.cc

    r7179 r7208  
    563563    }
    564564
    565     fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
    566     if (!fPed)
    567     {
    568         *fLog << err << fNamePedPhotCam << " [MPedPhotCam] not found... aborting." << endl;
    569         return kFALSE;
     565    fPed=0;
     566    if (fCleaningMethod!=kAbsolute)
     567    {
     568        fPed = (MPedPhotCam*)pList->FindObject(AddSerialNumber(fNamePedPhotCam), "MPedPhotCam");
     569        if (!fPed)
     570        {
     571            *fLog << err << fNamePedPhotCam << " [MPedPhotCam] not found... aborting." << endl;
     572            return kFALSE;
     573        }
    570574    }
    571575
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r7189 r7208  
    620620    write.AddContainer("MTime",                     "Events",     kFALSE);
    621621    write.AddContainer("MRawEvtHeader",             "Events");
    622     //write.AddContainer("MArrivalTime",              "Events",     kFALSE);
    623     //write.AddContainer("MPointingPos",              "Events",     kFALSE);
    624622    // Slow-Control: Current-tree
    625623    write.AddContainer("MTimeCurrents",             "Currents",   kFALSE);
  • trunk/MagicSoft/Mars/mreport/MReport.cc

    r4575 r7208  
    2929//  This is a base class for all reports comming from subsystems stored in
    3030//  a report file.
     31//
     32//
     33// Due to wrong assignment by arehucas the veriosn number for some
     34// cases is replaced.
     35//
     36//   Old Version | MjdMin  | MjdMax  | New Version
     37//  -------------+---------+---------+-------------
     38//   200504130   | 53548.0 | 53567.0 | 200506300
     39//   200503170   | 53446.5 | 53447.5 | 200502240
     40//
    3141//
    3242//  Be carefull: The class name of all classes derived from this class
     
    105115// SetupReading must be called successfully before.
    106116//
     117// Due to wrong assignment by arehucas the veriosn number for some
     118// cases is replaced.
     119//
     120//   Old Version | MjdMin  | MjdMax  | New Version
     121//  -------------+---------+---------+-------------
     122//   200504130   | 53548.0 | 53567.0 | 200506300
     123//   200503170   | 53446.5 | 53447.5 | 200502240
     124//
    107125Int_t MReport::Interprete(TString &str, const MTime &start, const MTime &stop, Int_t ver)
    108126{
     127    // Interprete header (time, status, etc) of report
    109128    if (!InterpreteHeader(str))
    110129        return kFALSE;
     
    116135        return -1;
    117136
     137    // Due to wrong assignment by arehucas the veriosn number for some
     138    // cases is replaced.
     139    if (ver==200504130 && GetMjd()>53548 && GetMjd()<53567)
     140        ver=200506300;
     141
     142    if (ver==200503170 && GetMjd()>53446.5 && GetMjd()<53447.5)
     143        ver=200502240;
     144
     145    // Interprete body (contents) of report
    118146    const Int_t rc = InterpreteBody(str, ver);
    119147    if (rc != kTRUE)
  • trunk/MagicSoft/Mars/mreport/MReport.h

    r4575 r7208  
    55#include "MParContainer.h"
    66#endif
    7 
     7#include "MTime.h"
    88class MTime;
    99class MParList;
     
    4242
    4343    Byte_t GetState() const { return fState; }
     44    Double_t GetMjd() const { return fTime ? fTime->GetMjd() : -1; }
    4445
    4546    ClassDef(MReport, 1) // Base class for control reports
  • trunk/MagicSoft/Mars/mreport/MReportCamera.cc

    r7202 r7208  
    622622        return kCONTINUE;
    623623
    624     if (ver >= gkActiveLoadControlVersNum)
     624    if (ver > gkActiveLoadControlVersNum)
    625625    {
    626626         if (!InterpreteActiveLoad(str))
Note: See TracChangeset for help on using the changeset viewer.