Changeset 7196


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

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7194 r7196  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22 2005/07/19 Thomas Bretz
     23
     24   * mjobs/MJCut.cc:
     25     - write MSrcPosCam to output
     26     - write MSrcPosAnti to output
     27     - removed MEnergyEst from output
     28     - added MSrcPosCorrect to tasklist
     29
     30   * mjobs/MJSpectrum.cc:
     31     - removed MSrcPosCalc from tasklist for refilling
     32     - removed hillas calculation from tasklist for refilling
     33       (both need a better concept in MJCut: not writing to
     34        results file, but to summary file)
     35
     36   * mjobs/MJStar.cc:
     37     - removed MSrcPosCalc from tasklist (better this is always done
     38       correctly in MJCut)
     39     - added Starguider information to output
     40     - replaced Rate historams by new histogram MHRate
     41     - added new histogram MHPointing
     42
     43   * mpointing/MSrcPosCorrect.cc:
     44     - write new optical axis to parameter list
     45
     46   * mreport/MReportStarguider.[h,cc]:
     47     - added GetDevAbs
     48
     49
     50
    2251 2005/07/16 Thomas Bretz
    2352
  • trunk/MagicSoft/Mars/NEWS

    r7194 r7196  
    8888     was assigned just with an event which was skipped later by another
    8989     task
     90   
     91   - star: new histograms MHPointing and MHRate
     92   
     93   - star: corrects now (correctly?) for the misspointing in May/April 05
    9094
    9195   - mars: show muon parameters graphically
  • trunk/MagicSoft/Mars/mjobs/MJCut.cc

    r7181 r7196  
    5151#include "MTaskEnv.h"
    5252#include "MSrcPosCalc.h"
     53#include "MSrcPosCorrect.h"
    5354#include "MHillasCalc.h"
    5455#include "MFillH.h"
     
    335336    write->AddContainer("MNewImagePar2",  "Events", kFALSE);
    336337    write->AddContainer("MHadronness",    "Events", kFALSE);
    337     write->AddContainer("MEnergyEst",     "Events", kFALSE);
     338    write->AddContainer("MSrcPosCam",     "Events", kFALSE);
     339    write->AddContainer("MSrcPosAnti",    "Events", kFALSE);
    338340    write->AddContainer("ThetaSquared",   "Events", kFALSE);
     341    write->AddContainer("OpticalAxis",    "Events", kFALSE);
    339342    write->AddContainer("Disp",           "Events", kFALSE);
    340343    write->AddContainer("MTime",          "Events", kFALSE);
     
    549552    scalc.SetMode(fIsWobble?MSrcPosCalc::kWobble:MSrcPosCalc::kOffData); /********************/
    550553
     554    MSrcPosCorrect scor;
     555
    551556    MHillasCalc hcalc;
    552557    MHillasCalc hcalc2("MHillasCalcAnti");
     
    558563    MTaskList tlist2;
    559564    tlist2.AddToList(&scalc);
     565    tlist2.AddToList(&scor);
    560566    tlist2.AddToList(&hcalc);
    561567    if (fIsWobble)
  • trunk/MagicSoft/Mars/mjobs/MJSpectrum.cc

    r7171 r7196  
    7777#include "MFillH.h"
    7878#include "MHillasCalc.h"
    79 #include "MSrcPosCalc.h"
     79//#include "MSrcPosCalc.h"
    8080#include "MContinue.h"
    8181
     
    968968
    969969    // Get correct source position
    970     MSrcPosCalc calc;
     970    //MSrcPosCalc calc;
    971971
    972972    // Calculate corresponding Hillas parameters
    973     MHillasCalc hcalc1;
    974     MHillasCalc hcalc2("MHillasCalcAnti");
    975     hcalc1.SetFlags(MHillasCalc::kCalcHillasSrc);
    976     hcalc2.SetFlags(MHillasCalc::kCalcHillasSrc);
    977     hcalc2.SetNameHillasSrc("MHillasSrcAnti");
    978     hcalc2.SetNameSrcPosCam("MSrcPosAnti");
     973    /*
     974     MHillasCalc hcalc1;
     975     MHillasCalc hcalc2("MHillasCalcAnti");
     976     hcalc1.SetFlags(MHillasCalc::kCalcHillasSrc);
     977     hcalc2.SetFlags(MHillasCalc::kCalcHillasSrc);
     978     hcalc2.SetNameHillasSrc("MHillasSrcAnti");
     979     hcalc2.SetNameSrcPosCam("MSrcPosAnti");
     980     */
    979981
    980982    // Fill collection area and energy estimator (unfolding)
     
    10341036    if (!fRawMc && fNoThetaWeights)
    10351037        tlist2.AddToList(&contsel);
    1036     tlist2.AddToList(&calc);
    1037     tlist2.AddToList(&hcalc1);
    1038     tlist2.AddToList(&hcalc2);
     1038    //tlist2.AddToList(&calc);
     1039    //tlist2.AddToList(&hcalc1);
     1040    //tlist2.AddToList(&hcalc2);
    10391041    tlist2.AddToList(&weight);
    10401042    tlist2.AddToList(&fill1a);
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r7171 r7196  
    6262#include "MImgCleanStd.h"
    6363#include "MSrcPosCalc.h"
     64#include "MSrcPosCorrect.h"
    6465#include "MHillasCalc.h"
    6566#include "MMuonSearchParCalc.h"
     
    192193    MReadReports readreal;
    193194    readreal.AddTree("Events", "MTime.", MReadReports::kMaster);
    194     readreal.AddTree("Drive", MReadReports::kRequired);
     195    readreal.AddTree("Drive",            MReadReports::kRequired);
     196    readreal.AddTree("Starguider",       MReadReports::kRequired);
    195197    readreal.AddTree("CC");
    196     //read.AddTree("Trigger");
    197     //read.AddTree("Camera");
    198     //read.AddTree("Currents");
    199198    readreal.AddFiles(iter);
    200199
     
    211210    MGeomApply             apply; // Only necessary to craete geometry
    212211    MEventRateCalc         rate;
    213     //MEventRateCalc         rate1; // 5min
    214212    rate.SetNumEvents(1200);
    215     //rate1.SetNumEvents(60000);
    216     //rate1.SetNameEventRate("MEventRate2");
    217     //rate1.SetNameTimeRate("MTimeRate2");
    218 
    219     /*
    220     MEventRateCalc         rate10000;
    221     rate10000.SetNameEventRate("MEventRate10000");
    222     rate10000.SetNumEvents(10000);
    223  */
    224     //MBadPixelsMerge        merge(&badpix);
    225213
    226214    MFSoftwareTrigger swtrig;
     
    228216    contsw.SetInverted();
    229217
    230 
    231218    MImgCleanStd           clean;
    232219    clean.SetNamePedPhotCam("MPedPhotFromExtractorRndm");
    233220
    234     MSrcPosCalc            poscalc;
     221    //MSrcPosCalc            poscalc;
     222    //MSrcPosCorrect         poscorrect;
    235223    MHillasCalc            hcalc;
    236224    hcalc.Disable(MHillasCalc::kCalcConc);
     
    241229    evt0b.SetThreshold(0);
    242230
    243     //MHCamEventRot evt0r("UsedRot", "Pixels marked Used (derotated)");
    244     //evt0r.SetThreshold(0);
    245 
    246     MH3 h1("MEventRate.fRate");
    247     h1.SetName("MHEventRate");
    248     h1.SetTitle("Event Rate distribution;R [Hz];Counts");
    249     h1.SetLogy();
    250 /*
    251     MH3 h12("MEventRate10000.fRate");
    252     h12.SetName("MHEventRate");
    253     h12.SetLogy();
    254  */
    255     MBinning b1("BinningMHEventRate");
    256     b1.SetEdges(150, 0, 1500);
    257     plist.AddToList(&b1);
    258 
    259     MHVsTime hvs("MEventRate.fRate");
    260     hvs.SetTitle("Rate per 500 events;;R [Hz]");
    261     hvs.SetNumEvents(500);
    262     hvs.SetMinimum(0);
    263 
    264     //MContinue cont1("MEventRate2.fRate/MEventRate.fRate>1.1");
    265     //MContinue cont2("MEventRate.fRate/MEventRate2.fRate>1.1");
    266 
    267     MFillH fillvs(&hvs,           "MTime",        "FillEventRate10s");
    268 
    269     MFillH fill0a(&evt0a,         "MSignalCam",   "FillSignalCam");
    270     MFillH fill0b(&evt0b,         "MSignalCam",   "FillCntUsedPixels");
    271     //MFillH fill0r(&evt0r,         "MCerPhotEvt",  "FillCntUsedRotated");
    272     MFillH fill1("MHHillas",      "MHillas",      "FillHillas");
    273     MFillH fill2("MHHillasExt",   "",             "FillHillasExt");
    274     MFillH fill3("MHHillasSrc",   "MHillasSrc",   "FillHillasSrc");
    275     MFillH fill4("MHImagePar",    "MImagePar",    "FillImagePar");
    276     MFillH fill5("MHNewImagePar", "MNewImagePar", "FillNewImagePar");
    277     //MFillH fill6("MHImageParTime","MImageParTime","FillImageParTime");
    278     //MFillH fill7("MHNewImagePar2","MNewImagePar2","FillNewImagePar2");
    279     MFillH fill8(&h1,             "",             "FillEventRate");
    280     MFillH fill9("MHEffectiveOnTime", "MTime",    "FillEffOnTime");
    281     //MFillH fillb(&h12, "", "FillEvtRate2");
    282     //MFillH fill9("MHCerPhot");
    283 
    284     //fill0r.SetDrawOption("colz");
    285     fill8.SetNameTab("EvtRate");
     231    MFillH fillvs("MHRate",           "MTime",           "FillEventRate");
     232    MFillH fillp1("MHPointing",       "MTimeDrive",      "FillDrive");
     233    MFillH fillp2("MHPointing",       "MTimeStarguider", "FillStarguider");
     234    fillp1.SetBit(MFillH::kDoNotDisplay);
     235    //fillp2.SetNameTab("Drive");
     236
     237    MFillH fill0a(&evt0a,             "MSignalCam",      "FillSignalCam");
     238    MFillH fill0b(&evt0b,             "MSignalCam",      "FillCntUsedPixels");
     239    MFillH fill1("MHHillas",          "MHillas",         "FillHillas");
     240    MFillH fill2("MHHillasExt",       "",                "FillHillasExt");
     241    MFillH fill3("MHHillasSrc",       "MHillasSrc",      "FillHillasSrc");
     242    MFillH fill4("MHImagePar",        "MImagePar",       "FillImagePar");
     243    MFillH fill5("MHNewImagePar",     "MNewImagePar",    "FillNewImagePar");
     244    MFillH fill9("MHEffectiveOnTime", "MTime",           "FillEffOnTime");
     245
     246    //fillvs.SetNameTab("Rate");
    286247    fill9.SetNameTab("EffOnTime");
    287248
     
    301262    write.AddContainer("MImagePar",     "Events");
    302263    write.AddContainer("MNewImagePar",  "Events");
    303     //write.AddContainer("MNewImagePar2", "Events");
    304     //write.AddContainer("MImageParTime", "Events");
    305264    write.AddContainer("MRawEvtHeader", "Events");
    306265    write.AddContainer("MPointingPos",  "Events");
     
    333292    else
    334293    {
    335         write.AddContainer("MTime",                "Events");
     294        write.AddContainer("MTime",                 "Events");
    336295        // Drive
    337         write.AddContainer("MReportDrive",         "Drive");
    338         write.AddContainer("MTimeDrive",           "Drive");
     296        write.AddContainer("MReportDrive",          "Drive");
     297        write.AddContainer("MTimeDrive",            "Drive");
     298        // Starguider
     299        write.AddContainer("MReportStarguider",     "Starguider");
     300        write.AddContainer("MTimeStarguider",       "Starguider");
    339301        // Effective On Time
    340302        writet.AddContainer("MEffectiveOnTime",     "EffectiveOnTime");
     
    375337        tlist2.AddToList(&rate);
    376338        tlist2.AddToList(&fillvs);
    377         tlist2.AddToList(&fill8);
    378339        tlist2.AddToList(&fill9);
    379340        tlist2.AddToList(&writet);
    380341    }
    381     //tlist2.AddToList(&fillb);
    382342    tlist2.AddToList(&clean);
    383343    tlist2.AddToList(&fill0a);
    384344    tlist2.AddToList(&fill0b);
    385     //tlist2.AddToList(&fill0r);
    386     tlist2.AddToList(&poscalc);
     345    //tlist2.AddToList(&poscalc);
     346    //tlist2.AddToList(&poscorrect);
    387347    tlist2.AddToList(&hcalc);
    388348    tlist2.AddToList(&fill1);
     
    439399    tlist.AddToList(&tlist2, "Events");
    440400    if (!ismc)
     401    {
    441402        tlist.AddToList(&fillw,  "CC");
     403        tlist.AddToList(&fillp1, "Drive");
     404        tlist.AddToList(&fillp2, "Starguider");
     405    }
    442406    tlist.AddToList(&write);
    443407
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCorrect.cc

    r7178 r7196  
    4949//
    5050MSrcPosCorrect::MSrcPosCorrect(const char *name, const char *title)
    51     : fSrcPosCam(NULL), fSrcPosAnti(NULL)
     51    : fSrcPosCam(NULL), fSrcPosAnti(NULL), fAxis(NULL)
    5252{
    5353    fName  = name  ? name  : "MSrcPosCorrect";
     
    7575
    7676    fSrcPosAnti = (MSrcPosCam*)pList->FindObject("MSrcPosAnti", "MSrcPosCam");
     77
     78    fAxis = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam", "OpticalAxis");
     79    if (!fAxis)
     80        return kFALSE;
    7781
    7882    return kTRUE;
     
    103107// Performs source position correction in the camera.
    104108// Due to missfocussing a shift of
    105 //    dx=0.048deg and dy=0.032deg
     109//    dx=0.048deg and dy=0.034deg
    106110//  or
    107111//    dx=14.24mm and dy=9.495mm
    108112// is added between run 53832 (excl) and 56161 (excl)
     113//
    109114// See also: Runbook
    110115//
    111 // 2005-05-23 03:33:51:
    112 // We start again to make tests on AMC with Roque lamp and PinDiode Tests.
    113 // At park position, we do a Laser initial isation and a Laser adjustment.
    114 // We discovered that the procedure we used yester day for Roque Lamp
    115 // light source was producing a very non-uniform light
    116 // We did some studies to produce an uniformly illuminated li ght from the
    117 // Roque Lamp Then we moved the telescope to the Roque Lamp position a nd
    118 // did a Laser adjust for  the Roque position. We put the telescope to
    119 // the same shaftencoder values as were used in August to adjust the
    120 // mirrors
    121 // ( 29691 for SE-Az and SE-Zd1 1301 and SE-Zd2 9912 ( someti mes
    122 // oscillating to 9913 ) ) When we looked at the image of the spot on the
    123 // camer a, we saw a clear offset from the centre. Then we calculated this
    124 // offset and put the correct numbers in the AMC code. Then we redid the
    125 // laser adjustment and fou nd the spot to be nicely centred.  Our
    126 // calculations showed that the offset was 0 .048 deg in X direction and
    127 // 0.032 deg in Y direction.
    128 // Good night
     116//    2005-05-23 03:33:51:
     117//    We start again to make tests on AMC with Roque lamp and PinDiode Tests.
     118//    At park position, we do a Laser initial isation and a Laser adjustment.
     119//    We discovered that the procedure we used yester day for Roque Lamp
     120//    light source was producing a very non-uniform light
     121//    We did some studies to produce an uniformly illuminated li ght from
     122//    the Roque Lamp Then we moved the telescope to the Roque Lamp position
     123//    and did a Laser adjust for the Roque position. We put the telescope to
     124//    the same shaftencoder values as were used in August to adjust the
     125//    mirrors
     126//    ( 29691 for SE-Az and SE-Zd1 1301 and SE-Zd2 9912 ( sometimes
     127//    oscillating to 9913 ) ) When we looked at the image of the spot on the
     128//    camer a, we saw a clear offset from the centre. Then we calculated this
     129//    offset and put the correct numbers in the AMC code. Then we redid the
     130//    laser adjustment and fou nd the spot to be nicely centred.  Our
     131//    calculations showed that the offset was 0.048 deg in X direction and
     132//    0.032 deg in Y direction.
     133//    Good night
    129134//
    130135Int_t MSrcPosCorrect::Process()
     
    133138        return kTRUE;
    134139
     140    // FIXME: Implement Culmination correction
     141
    135142    if (fRunNumber<56161 && fRunNumber>53832)
    136143    {
    137         // dx=-0.05deg, dy=0.03deg, d=0.06deg
     144        // dx=-0.048deg, dy=0.034deg, d=0.059deg
    138145        static const TVector2 dxy(-14.24, -9.495);
     146        fAxis->SetXY(dxy);
    139147        fSrcPosCam->Add(dxy);
    140148        if (fSrcPosAnti)
  • trunk/MagicSoft/Mars/mreport/MReportStarguider.cc

    r7005 r7196  
    127127}
    128128
     129Double_t MReportStarguider::GetDevAbs() const
     130{
     131    const Double_t pzd = fNominalZd * TMath::DegToRad();
     132    const Double_t azd = fDevZd/60  * TMath::DegToRad();
     133    const Double_t aaz = fDevAz/60  * TMath::DegToRad();
     134
     135    const double el = TMath::Pi()/2-pzd;
     136
     137    const double dphi2 = aaz/2.;
     138    const double cos2  = cos(dphi2)*cos(dphi2);
     139    const double sin2  = sin(dphi2)*sin(dphi2);
     140    const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
     141
     142    return acos(d)*TMath::RadToDeg()*60;
     143}
    129144
    130145void MReportStarguider::Print(Option_t *o) const
Note: See TracChangeset for help on using the changeset viewer.