Changeset 9356


Ignore:
Timestamp:
02/19/09 22:59:24 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9355 r9356  
    9090     - clean isolated pixels away before calculating image parameters
    9191     - don't clean calibration runs
    92      - correct displayed az ba magnetic field
     92     - correct displayed az by magnetic field
     93     - added auto range for the 2D histograms
     94     - set automatic binning for dist
    9395
    9496   * readcorsika.cc:
     
    107109   * ceres.rc:
    108110     - added units for psf
     111     - some small updates
    109112
    110113   * msimreflector/MSimReflector.cc:
     
    116119     - don't write PoinitingCorsika anymore. ARRANg already includes
    117120       the rotation
     121
     122   * mgeom/MGeomCamMagic.[h,cc]:
     123     - added a constructor which allows to set the focal distance
     124
     125   * msimcamera/MSimAPD.cc, msimcamera/MSimGeomCam.cc,
     126     msimcamera/MSimRandomPhotons.cc, msimreflector/MSimReflector.cc:
     127     - don't create an object if MGeomCam not found, try "MGeomCam"
     128       as default instead
     129
    118130
    119131
  • trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.cc

    r9259 r9356  
    1919!   Author(s): Harald Kornmayer 1/2001
    2020!
    21 !   Copyright: MAGIC Software Development, 2000-2003
     21!   Copyright: MAGIC Software Development, 2000-2008
    2222!
    2323!
     
    4545MGeomCamMagic::MGeomCamMagic(const char *name)
    4646    : MGeomCam(577, 17, name, "Geometry information of Magic Camera")
     47{
     48    CreateCam();
     49    CreateNN();
     50    InitGeometry();
     51}
     52
     53// --------------------------------------------------------------------------
     54//
     55//  Magic camera has 577 pixels. For geometry and Next Neighbor info see
     56//  CreateCam and CreateNN. You can give the distance dist from
     57//  the mirror center to the focal plane.
     58//
     59MGeomCamMagic::MGeomCamMagic(Double_t dist, const char *name)
     60    : MGeomCam(577, dist, name, "Geometry information of Magic Camera")
    4761{
    4862    CreateCam();
  • trunk/MagicSoft/Mars/mgeom/MGeomCamMagic.h

    r9259 r9356  
    1414public:
    1515    MGeomCamMagic(const char *name=NULL);
     16    MGeomCamMagic(Double_t dist, const char *name=NULL);
    1617
    1718    Bool_t HitFrame(MQuaternion p, const MQuaternion &u) const;
  • trunk/MagicSoft/Mars/mjobs/MJSimulation.cc

    r9352 r9356  
    189189    hist.InitName("Impact;Impact;Impact");
    190190    hist.InitTitle("Impact;West <--> East [m];South <--> North [m]");
     191    hist.SetAutoRange();
    191192
    192193    hist.AddHist("MCorsikaEvtHeader.fFirstInteractionHeight/100000");
     
    198199    hist.InitTitle("Sky Origin;Az [deg];Zd [deg]");
    199200    hist.SetDrawOption("colz");
     201    hist.SetAutoRange();
    200202
    201203    TString sin2 = "sin(MCorsikaEvtHeader.fZd)*sin(MCorsikaRunHeader.fZdMin*TMath::DegToRad())";
     
    346348    MBinning binse( 100,     1,   100000, "BinningEnergy", "log");
    347349    MBinning binss( 100,     1, 10000000, "BinningSize",   "log");
    348     MBinning binsi(  50,  -250,      250, "BinningImpact");
     350    MBinning binsi( 100,  -500,      500, "BinningImpact");
    349351    MBinning binsh( 150,     0,       50, "BinningHeight");
    350352    MBinning binsaz(720,  -360,      360, "BinningAz");
     
    352354    MBinning binsvc( 45,     0,        9, "BinningViewCone");
    353355    MBinning binsew(150,     0,       50, "BinningEvtWidth");
     356    MBinning binsd("BinningDistC");
     357    MBinning binsd0("BinningDist");
    354358    MBinning binstr("BinningTrigPos");
    355359
     
    363367    plist.AddToList(&binsew);
    364368    plist.AddToList(&binstr);
     369    plist.AddToList(&binsd);
     370    plist.AddToList(&binsd0);
    365371
    366372    MHn mhn1, mhn2, mhn3;
     
    660666    //-------------------------------------------
    661667
     668    MGeomCam *cam = static_cast<MGeomCam*>(env2.GetCont());
     669
    662670    if (binstr.IsDefault())
    663671        binstr.SetEdgesLin(150, -shape.GetPulseWidth(),
    664672                           header.GetFreqSampling()/1000.*header.GetNumSamples()+shape.GetPulseWidth());
     673
     674    if (binsd.IsDefault() && cam)
     675        binsd.SetEdgesLin(100, 0, cam->GetMaxRadius()*cam->GetConvMm2Deg());
     676
     677    if (binsd0.IsDefault() && cam)
     678        binsd0.SetEdgesLin(100, 0, cam->GetMaxRadius()*cam->GetConvMm2Deg());
     679
    665680
    666681    header.Print();
     
    711726            }
    712727
    713             if (env2.GetCont())
     728            if (cam)
    714729            {
    715730                c.cd(4);
     
    719734                gPad->SetGridy();
    720735                gROOT->SetSelectedPad(0);
    721                 MHCamera *c = new MHCamera(static_cast<MGeomCam&>(*env2.GetCont()));
     736                MHCamera *c = new MHCamera(*cam);
    722737                c->SetStats(kFALSE);
    723738                c->SetBit(MHCamera::kNoLegend);
  • trunk/MagicSoft/Mars/msimcamera/MSimAPD.cc

    r9349 r9356  
    100100        *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    101101
    102         fGeom = (MGeomCam*)pList->FindCreateObj(fNameGeomCam);
     102        fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
    103103        if (!fGeom)
     104        {
     105            *fLog << err << "MGeomCam not found... aborting." << endl;
    104106            return kFALSE;
     107        }
    105108    }
    106109
  • trunk/MagicSoft/Mars/msimcamera/MSimGeomCam.cc

    r9347 r9356  
    9191        *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    9292
    93         fGeom = (MGeomCam*)pList->FindCreateObj(fNameGeomCam);
     93        fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
    9494        if (!fGeom)
     95        {
     96            *fLog << err << "MGeomCam not found... aborting." << endl;
    9597            return kFALSE;
     98        }
    9699    }
    97100
  • trunk/MagicSoft/Mars/msimcamera/MSimRandomPhotons.cc

    r9272 r9356  
    9191        *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    9292
    93         fGeom = (MGeomCam*)pList->FindCreateObj(fNameGeomCam);
     93        fGeom = (MGeomCam*)pList->FindObject("MGeomCam");
    9494        if (!fGeom)
     95        {
     96            *fLog << err << "MGeomCam not found... aborting." << endl;
    9597            return kFALSE;
     98        }
    9699    }
    97100
     
    175178            // Add a new photon
    176179            // FIXME: SLOW!
    177             MPhotonData &ph = fEvt->Add(); 
     180            MPhotonData &ph = fEvt->Add();
    178181
    179182            // Set source to NightSky, time to t and tag to pixel index
  • trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc

    r9354 r9356  
    121121        *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    122122
    123         fGeomCam = (MGeomCam*)pList->FindCreateObj(fNameGeomCam);
     123        fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
    124124        if (!fGeomCam)
     125        {
     126            *fLog << err << "MGeomCam not found... aborting." << endl;
    125127            return kFALSE;
     128        }
    126129    }
    127130
Note: See TracChangeset for help on using the changeset viewer.