Changeset 7367


Ignore:
Timestamp:
09/27/05 14:40:03 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mmuon
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.cc

    r7366 r7367  
    240240
    241241    //    Double_t err;
    242     Double_t mean, meanerr, dummy;
     242    Double_t sig, mean, dummy;
     243    gMinuit->GetParameter(1, mean, dummy);  // get the mean  value
    243244    gMinuit->GetParameter(2, sig,  dummy);  // get the sigma value
    244     gMinuit->GetParameter(1, mean, dummy);  // get the sigma value
    245245
    246246    for (Int_t i=0; i<entries; i++)
  • trunk/MagicSoft/Mars/mmuon/MHSingleMuon.h

    r7365 r7367  
    2424    Double_t fMargin;               //!
    2525
    26     TProfile fHistPhi;   // Histogram of photon distribution along the arc.
    27     TProfile fHistWidth; // Histogram of radial photon distribution of the arc.
     26    TProfile fHistPhi;    // Histogram of photon distribution along the arc.
     27    TProfile fHistWidth;  // Histogram of radial photon distribution of the arc.
    2828    TH1F     fHistTime;   // Histogram of arrival time distribution along the arc.
    2929
     
    5050
    5151#endif
    52 
    53 
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.cc

    r7365 r7367  
    3838// infomation stored in
    3939//
    40 // MMuonCalibPar.
     40//   MMuonCalibPar.
    4141//
    4242// The information will be available by using the task of
    4343//
    44 // MMuonCalibParCalc.
    45 //
     44//   MMuonCalibParCalc.
     45//
     46// Version 2:
     47// ----------
     48//   + Float_t fTime;      // Mean arrival time of core pixels
     49//   + Float_t fTimeRms;   // Rms of arrival time of core pixels
    4650//
    4751//  Input Containers:
     
    9094    fCenterY   =  0;
    9195    fTime      =  0;
     96    fTimeRms   = -1;
    9297}
    9398
     
    144149{
    145150    // ------- Make a temporaray copy of the signal ---------
     151    // ------- and calculate arrival time parameters --------
    146152    const Int_t n = geom.GetNumPixels();
    147153
     
    153159    Int_t q=0;
    154160
    155     Float_t fTime2=0;
     161    Float_t mean=0;
     162    Float_t sq  =0;
    156163
    157164    for (int i=0; i<n; i++)
     
    168175
    169176            //timing
    170             if(pix.IsPixelCore())
    171             {
    172                 fTime  += pix.GetArrivalTime();
    173                 fTime2 += pix.GetArrivalTime()*pix.GetArrivalTime();
    174                 q++;
    175             }
     177            if (!pix.IsPixelCore())
     178                continue;
     179
     180            mean += pix.GetArrivalTime();
     181            sq   += pix.GetArrivalTime()*pix.GetArrivalTime();
     182            q++;
    176183        }
    177184    }
    178     fTime    = fTime/q;
    179     fTime2   = fTime2/q;
    180     fTimeRms = TMath::Sqrt(fTime2-(fTime*fTime));
     185
     186    mean /= q;
     187    sq   /= q;
     188
     189    fTime    = mean;
     190    fTimeRms = TMath::Sqrt(sq-mean*mean);
    181191
    182192    fSignal.Set(p);
  • trunk/MagicSoft/Mars/mmuon/MMuonSearchPar.h

    r7365 r7367  
    2121    Float_t fCenterX;   // An estimated center position in X of the muon ring [mm]
    2222    Float_t fCenterY;   // An estimated center position in Y of the muon ring [mm]
    23     Float_t fTime;
    24     Float_t fTimeRms;
     23    Float_t fTime;      // Mean arrival time of core pixels
     24    Float_t fTimeRms;   // Rms of arrival time of core pixels
    2525
    2626    MArrayF fSignal;    //! Temporary storage for signal
     
    5757    void   Print(const MGeomCam &geom, Option_t *opt=NULL) const;
    5858
    59     ClassDef(MMuonSearchPar, 1) // Container to hold muon search parameters
     59    ClassDef(MMuonSearchPar, 2) // Container to hold muon search parameters
    6060};
    6161
Note: See TracChangeset for help on using the changeset viewer.