Ignore:
Timestamp:
05/22/03 06:53:14 (22 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfileio
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.cc

    r2117 r2132  
    832832// --------------------------------------------------------------------------
    833833//
     834// Discretize Theta according to the binning in Theta
     835//   theta [rad]
     836//   DiscreteTheta [rad]  (= bin center)
     837//
     838Double_t MCT1ReadPreProc::DiscreteTheta(Double_t theta)
     839{
     840    if (!fBinningT)
     841        return theta;
     842
     843    const Int_t bin = fBinningT->FindLoEdge(theta * 180/TMath::Pi());
     844    if (bin<0)
     845        return theta;
     846
     847    const Double_t low = fBinningT->GetEdges()[bin];
     848    const Double_t up  = fBinningT->GetEdges()[bin+1];
     849
     850    Double_t discreteTheta = 0.5*(up+low) * TMath::Pi()/180;
     851
     852    return discreteTheta;
     853}
     854
     855// --------------------------------------------------------------------------
     856//
    834857// Analyse the event data, means store and copy the needed data into
    835858// Mars structures and data members
     
    921944    const Double_t theta = TMath::Pi()*(0.5-1./180*event.ialt_arcs/3600);
    922945    fThetaOrig->SetVal(theta);
    923 
    924     //if (theta>TMath::Pi()/2)
    925     //{
    926     //    *fLog << "MCT1ReadPreProc::ProcessEvent; theta out of range : "
    927     //          << theta << endl;
    928     //    return kCONTINUE;
    929     //}
    930946
    931947    // store hour angle
     
    948964                 fIsMcFile ? event.imcimpact_m*100 : 0,
    949965                 TMath::Pi()/180*event.iaz_arcs/3600, // azimuth (arcseconds)
    950                  fIsMcFile ? SmearTheta(theta) : theta,
     966                 // fIsMcFile ? SmearTheta(theta) : theta,
     967                 DiscreteTheta(theta),
    951968                 0, /* fTFirst */
    952969                 0, /* fTLast */
  • trunk/MagicSoft/Mars/mfileio/MCT1ReadPreProc.h

    r2117 r2132  
    7272
    7373    Double_t SmearTheta(Double_t theta);
     74    Double_t DiscreteTheta(Double_t theta);
    7475
    7576    Bool_t PreProcess(MParList *pList);
Note: See TracChangeset for help on using the changeset viewer.