Ignore:
Timestamp:
02/10/09 20:00:10 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msimreflector
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msimreflector/MMirror.cc

    r9243 r9312  
    7878#include <TRandom.h>
    7979
     80#include "MLog.h"
     81
    8082#include "MQuaternion.h"
    8183
     
    133135    return dn;  // Return the vector to be added to the normal vector
    134136}
     137
     138void MMirror::Print(Option_t *o) const
     139{
     140    gLog << fPos.X()  << " " << fPos.Y()  << " " << fPos.Z() << " ";
     141    gLog << fNorm.X() << " " << fNorm.Y() << " " << fNorm.Z() << " ";
     142    gLog << fFocalLength << " ";
     143
     144    const TString n = ClassName();
     145
     146    gLog << n(7, n.Length());
     147}
  • trunk/MagicSoft/Mars/msimreflector/MMirror.h

    r9236 r9312  
    7070    // ----- Mirror specialized functions -----
    7171
    72     // This should fit with Paint()
    7372    virtual Bool_t HasHit(const MQuaternion &p) const=0;
    74     // This should fit with HasHit()
    75     //void Paint(Option_t *)=0;
    7673    virtual Bool_t CanHit(const MQuaternion &p) const=0;
    7774
    7875    virtual Int_t ReadM(const TObjArray &tok)=0;
     76
     77    // TObject
     78    void Print(Option_t *o) const;
    7979
    8080    /*
     
    8686    }
    8787    */
    88     ClassDef(MMirror, 0) // Base class to describe a mirror
     88    ClassDef(MMirror, 1) // Base class to describe a mirror
    8989};
    9090
  • trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.cc

    r9252 r9312  
    3838#include <TEllipse.h>
    3939#include <TVirtualPad.h>
     40
     41#include "MLog.h"
    4042
    4143#include "MQuaternion.h"
     
    99101// ------------------------------------------------------------------------
    100102//
     103// Print the contents of the mirror
     104//
     105void MMirrorDisk::Print(Option_t *o) const
     106{
     107    MMirror::Print(o);
     108    gLog << " " << fR << endl;
     109}
     110
     111// ------------------------------------------------------------------------
     112//
    101113// Paint the mirror in x/y.
    102114//
  • trunk/MagicSoft/Mars/msimreflector/MMirrorDisk.h

    r9236 r9312  
    99{
    1010private:
    11     Double_t fR;
     11    Double_t fR; // Radius of the disk
    1212
    1313public:
    1414    MMirrorDisk() : fR(24.75) { }
    1515
     16    // MMirror
    1617    Double_t GetMaxR() const { return fR; }
    1718
    18     // This should fit with Paint()
     19    Bool_t CanHit(const MQuaternion &p) const;
    1920    Bool_t HasHit(const MQuaternion &p) const;
    20     // This should fit with HasHit()
    21     void Paint(Option_t *);
    22     Bool_t CanHit(const MQuaternion &p) const;
     21
    2322    Int_t ReadM(const TObjArray &tok);
    2423
    25     ClassDef(MMirrorDisk, 0)  // A spherical disk type mirror
     24    //TObject
     25    void Paint(Option_t *);
     26    void Print(Option_t *) const;
     27
     28    ClassDef(MMirrorDisk, 1)  // A spherical disk type mirror
    2629};
    2730
  • trunk/MagicSoft/Mars/msimreflector/MMirrorHex.cc

    r9252 r9312  
    3939#include <TEllipse.h>
    4040#include <TVirtualPad.h>
     41
     42#include "MLog.h"
    4143
    4244#include "MHexagon.h"
     
    142144// ------------------------------------------------------------------------
    143145//
     146// Print the contents of the mirror
     147//
     148void MMirrorHex::Print(Option_t *o) const
     149{
     150    MMirror::Print(o);
     151    gLog << " " << fD*2 << endl;
     152}
     153
     154// ------------------------------------------------------------------------
     155//
    144156// Read the mirror's setup from a file. The first eight tokens should be
    145157// ignored. (This could be fixed!)
  • trunk/MagicSoft/Mars/msimreflector/MMirrorHex.h

    r9236 r9312  
    2121    MMirrorHex() { SetD(24.75); }
    2222
     23    // MMirror
    2324    Double_t GetMaxR() const { return fMaxR; }
    2425
    25     // This should fit with Paint()
     26    Bool_t CanHit(const MQuaternion &p) const;
    2627    Bool_t HasHit(const MQuaternion &p) const;
    27     // This should fit with HasHit()
    28     void Paint(Option_t *);
    29     Bool_t CanHit(const MQuaternion &p) const;
     28
    3029    Int_t ReadM(const TObjArray &tok);
    3130
    32     ClassDef(MMirrorHex, 0) // A spherical hexagon type mirror
     31    // TObject
     32    void Paint(Option_t *);
     33    void Print(Option_t *) const;
     34
     35    ClassDef(MMirrorHex, 1) // A spherical hexagon type mirror
    3336};
    3437
  • trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.cc

    r9252 r9312  
    4040#include <TEllipse.h>
    4141#include <TVirtualPad.h>
     42
     43#include "MLog.h"
    4244
    4345#include "MQuaternion.h"
     
    139141// ------------------------------------------------------------------------
    140142//
     143// Print the contents of the mirror
     144//
     145void MMirrorSquare::Print(Option_t *o) const
     146{
     147    MMirror::Print(o);
     148    gLog << " " << fSideLength << endl;
     149}
     150
     151// ------------------------------------------------------------------------
     152//
    141153// Read the mirror's setup from a file. The first eight tokens should be
    142154// ignored. (This could be fixed!)
  • trunk/MagicSoft/Mars/msimreflector/MMirrorSquare.h

    r9252 r9312  
    1010private:
    1111    Double_t fSideLength; // HALF of the side length!
     12
    1213public:
    1314    MMirrorSquare() : fSideLength(24.75) { }
    1415
     16    // MMirror
    1517    Double_t GetMaxR() const;
    1618
    17     // This should fit with Paint()
    1819    Bool_t HasHit(const MQuaternion &p) const;
    19     // This should fit with HasHit()
    20     void Paint(Option_t *);
    2120    Bool_t CanHit(const MQuaternion &p) const;
     21
    2222    Int_t ReadM(const TObjArray &tok);
    2323
    24     ClassDef(MMirrorSquare, 0) // A spherical square type mirror
     24    // TObject
     25    void Paint(Option_t *);
     26    void Print(Option_t *) const;
     27
     28    ClassDef(MMirrorSquare, 1) // A spherical square type mirror
    2529};
    2630
  • trunk/MagicSoft/Mars/msimreflector/MReflector.h

    r9262 r9312  
    2828    void InitMaxR();
    2929
     30    // MParContainer
    3031    Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
    3132
     
    4647    Int_t ExecuteReflector(MQuaternion &p, MQuaternion &u) const;
    4748
     49    // TObject
    4850    void Paint(Option_t *o);
     51    void Print(Option_t *o) const;
    4952
    50     ClassDef(MReflector, 0) // Parameter container storing a collection of several mirrors (reflector)
     53    ClassDef(MReflector, 1) // Parameter container storing a collection of several mirrors (reflector)
    5154};
    5255   
  • trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc

    r9307 r9312  
    559559    fEvt->Sort(kTRUE);
    560560
     561    // FIXME FIXME FIXME: Set maxindex, first and last time.
     562    // SetMaxIndex(fReflector->GetNumMirrors()-1)
     563    // if (fEvt->GetNumPhotons())
     564    // {
     565    //    SetTime(fEvt->GetFirst()->GetTime(), fEvt->GetLast()->GetTime());
     566    // }
     567
    561568    return kTRUE;
    562569}
Note: See TracChangeset for help on using the changeset viewer.