Ignore:
Timestamp:
03/01/09 12:51:04 (16 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msim
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msim/MHPhotonEvent.cc

    r9348 r9367  
    266266    MH::FindGoodLimits(num, num, xmin, xmax, kTRUE);
    267267
    268     MBinning(abs(num), xmin-.5, xmax-.5).Apply(fHistWL);
     268    MBinning(TMath::Abs(num), xmin-.5, xmax-.5).Apply(fHistWL);
    269269
    270270    return kTRUE;
  • trunk/MagicSoft/Mars/msim/MSimPointingPos.cc

    r9362 r9367  
    9292}
    9393
     94// --------------------------------------------------------------------------
     95//
     96// Get the distance from the real source to the poitning position.
     97//
     98Double_t MSimPointingPos::GetOffTargetDistance() const
     99{
     100    return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg();
     101}
     102
     103// --------------------------------------------------------------------------
     104//
     105// Get the phi angle counted from the upward direction the source position
     106// is rotated. distance from the real source to the pointing position.
     107// A negative value refers to a random distribution.
     108//
     109Double_t MSimPointingPos::GetOffTargetPhi() const
     110{
     111    return fOffTargetPhi<0 ? -1 : fOffTargetPhi*TMath::RadToDeg();
     112}
     113
     114// --------------------------------------------------------------------------
     115//
     116// Set fOffTargetDistance, see also GetOffTargetDistance
     117//
     118void MSimPointingPos::SetOffTargetDistance(Double_t d)
     119{
     120    fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad();
     121}
     122
     123// --------------------------------------------------------------------------
     124//
     125// Set fOffTargetPhi, see also GetOffTargetPhi
     126//
     127void MSimPointingPos::SetOffTargetPhi(Double_t p)
     128{
     129    fOffTargetPhi = p<0 ? -1 : p*TMath::DegToRad();
     130}
     131
     132
    94133
    95134// --------------------------------------------------------------------------
     
    153192    {
    154193        dtheta = fOffTargetDistance;
    155         dphi   = fOffTargetPhi>0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());
     194        dphi   = fOffTargetPhi>=0 ? fOffTargetPhi : gRandom->Uniform(TMath::TwoPi());
    156195    }
    157196    else
  • trunk/MagicSoft/Mars/msim/MSimPointingPos.h

    r9362 r9367  
    3636
    3737    // Getter
    38     Double_t GetOffTargetDistance() const { return fOffTargetDistance==0 ? 0 : fOffTargetDistance*TMath::RadToDeg(); }
    39     Double_t GetOffTargetPhi() const { return fOffTargetPhi*TMath::RadToDeg(); }
     38    Double_t GetOffTargetDistance() const;
     39    Double_t GetOffTargetPhi() const;
    4040
    4141    // Setter
    42     void SetOffTargetDistance(Double_t d=0) { fOffTargetDistance = d==0 ? 0 : d*TMath::DegToRad(); }
    43     void SetOffTargetPhi(Double_t p=0) { fOffTargetPhi = p*TMath::DegToRad(); }
     42    void SetOffTargetDistance(Double_t d=0);
     43    void SetOffTargetPhi(Double_t p=-1);
    4444
    4545    // MSimPointingPos
Note: See TracChangeset for help on using the changeset viewer.