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

Legend:

Unmodified
Added
Removed
  • 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.