Changeset 9564 for trunk


Ignore:
Timestamp:
03/30/10 13:52:57 (15 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r9563 r9564  
    2424     - moved ARCHDEFS from DEFINES to CXXFLAGS otherwise it might get
    2525       ignored
     26
     27   * mbase/MQuaternion.h:
     28     - added member-function to normalize vector part of quaternion
     29
     30   * mbase/MTime.cc:
     31     - issue an error if __LINUX__ is not set
     32
     33   * mjobs/MJSimulation.cc:
     34     - set name of reflector explicitly to "Reflector"
     35
     36   * msimreflector/MMirror.h:
     37     - added member function to set z position (for optimization purpose)
     38     - added SimPSF(TVector3&)
     39
     40   * msimreflector/MSimReflector.[h,cc]:
     41     - added name of reflector as data member
    2642
    2743
  • trunk/MagicSoft/Mars/NEWS

    r9536 r9564  
    22
    33== <cvs> ==
     4
     5 ;general:
     6
     7   * On some systems (version of make?) the __LINUX__ definition was not set
     8     when compiling. This lead to MTime(-1) not working properly. Fixed.
     9
     10
    411
    512== Version 2.4 (2009/12/23) ==
  • trunk/MagicSoft/Mars/mbase/MQuaternion.h

    r9370 r9564  
    7676    //void Normalize() { fVectorPart *= TMath::Sqrt(1 - R2())/Z(); }
    7777
     78    void NormalizeVector() { fVectorPart = fVectorPart.Unit(); }
     79
    7880    ClassDef(MQuaternion, 1)
    7981};
  • trunk/MagicSoft/Mars/mbase/MTime.cc

    r9302 r9564  
    692692        Set(tv);
    693693#else
    694     Clear();
     694#error __LINUX__ not set
    695695#endif
    696696}
  • trunk/MagicSoft/Mars/mjobs/MJSimulation.cc

    r9525 r9564  
    398398    MSimReflector reflect;
    399399    reflect.SetNameGeomCam("GeomCones");
     400    reflect.SetNameReflector("Reflector");
    400401//  MSimStarField stars;
    401402
  • trunk/MagicSoft/Mars/msimreflector/MMirror.h

    r9371 r9564  
    4949    }
    5050
     51    void SetZ(Double_t z) { fPos.SetZ(z); }
     52
    5153    Double_t X() const { return fPos.X(); }
    5254    Double_t Y() const { return fPos.Y(); }
     
    6567
    6668    TVector3 SimPSF(const TVector3 &n, Double_t F, Double_t psf) const;
     69    TVector3 SimPSF(const TVector3 &n) const
     70    {
     71        return SimPSF(n, fFocalLength, fSigmaPSF/10); // Convert from mm to cm
     72    }
    6773
    6874    Bool_t ExecuteMirror(MQuaternion &p, MQuaternion &u) const;
  • trunk/MagicSoft/Mars/msimreflector/MSimReflector.cc

    r9356 r9564  
    7575    : fEvt(0), fMirror0(0), fMirror1(0), fMirror2(0), fMirror3(0),
    7676    fMirror4(0), /*fRunHeader(0),*/ fEvtHeader(0), fReflector(0),
    77     fGeomCam(0), fPointing(0), fDetectorMargin(0)
     77    fGeomCam(0), fPointing(0), fNameReflector("MReflector"),
     78    fDetectorMargin(0)
    7879{
    7980    fName  = name  ? name  : "MSimReflector";
     
    103104        return kFALSE;
    104105
    105     fReflector = (MReflector*)pList->FindObject("Reflector", "MReflector");
     106    fReflector = (MReflector*)pList->FindObject(fNameReflector, "MReflector");
    106107    if (!fReflector)
    107108    {
    108         *fLog << err << "Reflector [MReflector] not found... aborting." << endl;
     109        *fLog << err << fNameReflector << " [MReflector] not found..." << endl;
    109110        return kFALSE;
    110111    }
     
    112113    if (fReflector->GetNumMirrors()==0)
    113114    {
    114         *fLog << err << "ERROR - Reflector doesn't contain a single mirror." << endl;
     115        *fLog << err << "ERROR - Reflector '" << fNameReflector << "' doesn't contain a single mirror." << endl;
    115116        return kFALSE;
    116117    }
     
    119120    if (!fGeomCam)
    120121    {
    121         *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
     122        if (!fNameGeomCam.IsNull())
     123            *fLog << inf << fNameGeomCam << " [MGeomCam] not found..." << endl;
    122124
    123125        fGeomCam = (MGeomCam*)pList->FindObject("MGeomCam");
     
    300302
    301303    if (fSigmaPSF>0)
    302         n += SimPSF(n, fFocalLength, fSigmaPSF/10); // Convert from mm to cm
     304        n += SimPSF(n);
    303305
    304306    // Changes also the sign of the z-direction of flight
  • trunk/MagicSoft/Mars/msimreflector/MSimReflector.h

    r9307 r9564  
    3131
    3232    TString fNameGeomCam;        // Name of the geometry container storing the APD gemeotry
     33    TString fNameReflector;      // Name of the container storing the reflector geometry
    3334
    3435    Double_t fDetectorMargin;    // A margin around the detector (MGeomCam::HitCamera) in which photons are also stored
     
    4546
    4647    // MSimReflector
    47     void SetNameGeomCam(const char *name="MGeomCam") { fNameGeomCam = name; }
     48    void SetNameGeomCam(const char *name="MGeomCam")     { fNameGeomCam   = name; }
     49    void SetNameReflector(const char *name="MReflector") { fNameReflector = name; }
    4850
    4951    ClassDef(MSimReflector, 0) // Task to calculate reflection on a mirror
Note: See TracChangeset for help on using the changeset viewer.