Changeset 4585 for trunk/MagicSoft


Ignore:
Timestamp:
08/12/04 07:15:35 (20 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4584 r4585  
    2323
    2424  2004/08/12 : Wolfgang Wittek
     25
     26    * manalysis/MSourcPosFromStarPos.[h,cc]
     27      - replace MMcEvt by MPointingPos
    2528
    2629    * manalysis/MSigmabarCalc.[h,cc]
  • trunk/MagicSoft/Mars/manalysis/MSourcePosfromStarPos.cc

    r3847 r4585  
    5656#include "MSrcPosCam.h"
    5757#include "MPointingPos.h"
     58#include "MMcEvt.hxx"
    5859
    5960#include "MLog.h"
     
    9798    fdyStar.ResizeTo(fRows,fSize);
    9899
    99     fStars = 0;
     100    fStars     = 0;
     101    fStarsRead = 0;
    100102    fDecSource = 0.0;
    101103    fRaSource  = 0.0;
     
    255257   }
    256258
    257 
    258     fSrcPos = (MSrcPosCam*)pList->FindObject(AddSerialNumber("MSrcPosCam"));
     259   fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
     260   if (!fMcEvt)
     261   {
     262       *fLog << all << "MSourcePosfromStarPos::PreProcess; MMcEvt not found... continue." << endl;
     263   }
     264   else
     265   {
     266       *fLog << all << "MSourcePosfromStarPos::PreProcess; MMcEvt was found... continue." << endl;
     267   }
     268
     269
     270    fSrcPos = (MSrcPosCam*)pList->FindCreateObj("MSrcPosCam");
    259271    if (!fSrcPos)
    260272    {
     
    490502Bool_t MSourcePosfromStarPos::ReInit(MParList *pList)
    491503{
    492   //if (1 == 1) return kTRUE;
    493 
    494 
    495504  Int_t run = fRun->GetRunNumber();
    496505  *fLog << all << "MSourcePosfromStarPos::ReInit; run = " << run << endl;
    497506
     507  // temporary solution for MC
     508  // copy (theta, phi) from MMcEvt into MPointingPos
     509  if (fRun->GetRunType() > 255.5)
     510  {
     511    *fLog << all << "                     these are MC data" << endl;
     512    Double_t thetarad = fMcEvt->GetTelescopeTheta();
     513    Double_t phirad   = fMcEvt->GetTelescopePhi();
     514    fPointPos->SetLocalPosition(thetarad*kRad2Deg, phirad*kRad2Deg);
     515    fPointPos->SetReadyToSave();
     516    return kTRUE;   
     517  }
    498518
    499519  //-------------------------------------------------------------------
     
    652672        << fStars << ",  fRuns = " << fRuns << ",  fRows = " << fRows
    653673        << ",  fSize = " << fSize << endl;
    654   *fLog << "       first run : " << fRunNr[0] << ",  last run : "
    655         << fRunNr[fRuns-1] << endl;
     674  if (fRuns > 0)
     675  {
     676    *fLog << "       first run : " << fRunNr[0] << ",  last run : "
     677          << fRunNr[fRuns-1] << endl;
     678  }
    656679}
    657680
     
    725748
    726749  fRuns += 1;
    727   *fLog << fRuns <<"th run : " << ival << endl; 
     750  //*fLog << fRuns <<"th run : " << ival << endl; 
    728751
    729752  fRunNr.AddAt(ival, fRuns-1);
  • trunk/MagicSoft/Mars/manalysis/MSourcePosfromStarPos.h

    r3847 r4585  
    3030class MRawRunHeader;
    3131class MPointingPos;
     32class MMcEvt;
    3233class MGeomCam;
    3334class MSrcPosCam;
     
    4041    const MRawRunHeader *fRun;      //!
    4142    const MGeomCam      *fGeomCam;  //! Camera Geometry used to calculate Hillas
     43    MMcEvt              *fMcEvt;       //!
    4244    MPointingPos        *fPointPos;       //!
    4345    MSrcPosCam          *fSrcPos;         //!
Note: See TracChangeset for help on using the changeset viewer.