Changeset 9252


Ignore:
Timestamp:
01/24/09 01:49:53 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9249 r9252  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
    21 
    2221 2009/01/23 Daniela Dorner
    2322
     
    4746
    4847 2009/01/23 Thomas Bretz
     48
     49   * mcorsika/MCorsikaEvtHeader.[h,cc], msim/MPhotonData.[h,cc],
     50     msimcamera/MSimExcessNoise.cc, msimreflector/MMirrorDisk.cc,
     51     msimreflector/MMirrorHex.cc, msimreflector/MMirrorSquare.[h,cc],
     52     msimreflector/MReflector.cc, msimreflector/MSimReflector.cc,
     53     melectronics/MAnalogSignal.cc:
     54     - moved code which needs TMath to source file
     55     - included TMath for newer root versions
     56     - included TObjArray for newer root versions
    4957
    5058   * msimcamera/MSimAPD.[h,cc], msimcamera/MSimBundlePhotons.[h,cc],
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.cc

    r9229 r9252  
    3333#include <fstream>
    3434
     35#include <TMath.h>
     36
    3537#include "MLog.h"
    3638#include "MLogManip.h"
     
    5052    fName  = name  ? name  : "MCorsikaEvtHeader";
    5153    fTitle = title ? title : "Raw Event Header Information";
     54}
     55
     56// --------------------------------------------------------------------------
     57//
     58//  Return Hypot(x, y)
     59//
     60Double_t MCorsikaEvtHeader::GetImpact() const
     61{
     62    return TMath::Hypot(fX, fY);
    5263}
    5364
  • trunk/MagicSoft/Mars/mcorsika/MCorsikaEvtHeader.h

    r9229 r9252  
    5858    Float_t GetY() const { return fY; }
    5959
    60     Double_t GetImpact() const { return TMath::Hypot(fX, fY); }
     60    Double_t GetImpact() const;
    6161
    6262    Int_t  ReadEvt(istream& fin);    // read in event header block
  • trunk/MagicSoft/Mars/melectronics/MAnalogSignal.cc

    r9243 r9252  
    3434
    3535#include <TRandom.h>
     36#include <TObjArray.h>
    3637
    3738#include "MLog.h"
  • trunk/MagicSoft/Mars/msim/MPhotonData.cc

    r9243 r9252  
    4040#include <iostream>
    4141
     42#include <TMath.h>
     43
    4244#include "MLog.h"
    4345#include "MLogManip.h"
     
    9597// --------------------------------------------------------------------------
    9698//
     99// return the cosine of the Theta-angle == sqrt(1-CosU^2-CosV^2)
     100//
     101Double_t MPhotonData::GetCosW() const
     102{
     103    return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV);
     104}
     105
     106// --------------------------------------------------------------------------
     107//
     108// Return the theta angle in radians
     109//
     110Double_t MPhotonData::GetTheta() const
     111{
     112    return TMath::ACos(GetCosW());
     113}
     114
     115// --------------------------------------------------------------------------
     116//
     117// Return a TQuaternion with the first three components x, y, and z
     118// and the fourth component the time.
     119//
     120TQuaternion MPhotonData::GetPosQ() const
     121{
     122    return TQuaternion(GetPos3(), fTime);
     123}
     124
     125// --------------------------------------------------------------------------
     126//
     127// return a TQuaternion with the first three components the direction
     128// moving in space (GetDir3()) and the fourth component is the
     129// one devided by the speed of light (converted to cm/ns)
     130//
     131// FIXME: v in air!
     132//
     133TQuaternion MPhotonData::GetDirQ() const
     134{
     135    return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9));
     136}
     137
     138// --------------------------------------------------------------------------
     139//
    97140// Set the data member according to the 8 floats read from a reflector-file.
    98141// This function MUST reset all data-members, no matter whether these are
  • trunk/MagicSoft/Mars/msim/MPhotonData.h

    r9232 r9252  
    2121//class ifstream;
    2222#include <iosfwd>
    23 /*
    24 class TH1;
    25 class TH2;
    26 class TH3;
    27 */
     23
    2824class MCorsikaRunHeader;
    2925
     
    6763    Float_t  GetCosU()  const { return fCosU; }
    6864    Float_t  GetCosV()  const { return fCosV; }
    69     Double_t GetCosW()  const { return TMath::Sqrt(1 - fCosU*fCosU - fCosV*fCosV); } // cos(Theta)
    70     Double_t GetTheta() const { return TMath::ACos(GetCosW()); }
     65    Double_t GetCosW()  const;
     66    Double_t GetTheta() const;
    7167
    7268    Double_t GetTime()  const { return fTime; }
     
    8177    TVector3 GetDir3()  const { return TVector3(fCosU, fCosV, -GetCosW()); }
    8278
    83     // Getter 4D                                      // cm   // ns
    84     TQuaternion GetPosQ() const { return TQuaternion(GetPos3(), fTime); }
    85     // FIXME: v in air!                                       // m/s  cm? / ns
    86     TQuaternion GetDirQ() const { return TQuaternion(GetDir3(), 1./(TMath::C()*100/1e9)); }
     79    // Getter 4D
     80    TQuaternion GetPosQ() const;
     81    TQuaternion GetDirQ() const;
    8782
    8883    // Getter Others
  • trunk/MagicSoft/Mars/msimcamera/MSimExcessNoise.cc

    r9243 r9252  
    3939#include "MSimExcessNoise.h"
    4040
     41#include <TMath.h>
    4142#include <TRandom.h>
    4243
  • trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc

    r9243 r9252  
    3131//////////////////////////////////////////////////////////////////////////////
    3232#include "MMirrorDisk.h"
     33
     34#include <stdlib.h> // atof (Ubuntu 8.10)
     35
     36#include <TObjArray.h>
    3337
    3438#include <TEllipse.h>
  • trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc

    r9243 r9252  
    3131//////////////////////////////////////////////////////////////////////////////
    3232#include "MMirrorHex.h"
     33
     34#include <stdlib.h> // atof (Ubuntu 8.10)
     35
     36#include <TMath.h>
     37#include <TObjArray.h>
    3338
    3439#include <TEllipse.h>
  • trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc

    r9243 r9252  
    3232#include "MMirrorSquare.h"
    3333
     34#include <stdlib.h> // atof (Ubuntu 8.10)
     35
     36#include <TMath.h>
     37#include <TObjArray.h>
     38
    3439#include <TBox.h>
    3540#include <TEllipse.h>
     
    4146
    4247using namespace std;
     48
     49Double_t MMirrorSquare::GetMaxR() const
     50{
     51    return TMath::Sqrt(2.)*fSideLength;
     52}
    4353
    4454// ------------------------------------------------------------------------
  • trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h

    r9236 r9252  
    1313    MMirrorSquare() : fSideLength(24.75) { }
    1414
    15     Double_t GetMaxR() const { return TMath::Sqrt(2.)*fSideLength; }
     15    Double_t GetMaxR() const;
    1616
    1717    // This should fit with Paint()
  • trunk/MagicSoft/Mars/msimreflector/MReflector.cc

    r9243 r9252  
    3333#include <errno.h>
    3434
     35#include <stdlib.h> // atof (Ubuntu 8.10)
     36
     37#include <TClass.h>
    3538#include <TSystem.h>
    3639
  • trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc

    r9239 r9252  
    3030#include "MSimReflector.h"
    3131
     32#include <TMath.h>
    3233#include <TRandom.h>
    3334
Note: See TracChangeset for help on using the changeset viewer.