Changeset 14911 for trunk/Mars/mmuon


Ignore:
Timestamp:
02/13/13 10:47:33 (12 years ago)
Author:
tbretz
Message:
Reverting to last revision.
File:
1 edited

Legend:

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

    r14896 r14911  
    211211    for (Int_t i=0; i<entries; i++)
    212212    {
    213         const MSignalPix &pix = (*fSignalCam)[i];
    214         if (fUseCleanedSignal && !pix.IsPixelUsed())
    215             continue;
    216 
    217         const MGeom  &gpix = (*fGeomCam)[i];
     213        const MSignalPix &pix  = (*fSignalCam)[i];
     214        const MGeom      &gpix = (*fGeomCam)[i];
    218215
    219216        const Float_t dx = gpix.GetX() - cenx;
     
    230227        }
    231228
    232         // use only the inner pixels. FIXME: This is geometry dependent
     229        // use only the inner pixles. FIXME: This is geometry dependent
    233230        if (gpix.GetAidx()>0)
    234231            continue;
     
    237234    }
    238235
    239     if (!fUseCleanedSignal)
    240     {
    241         // Setup the function and perform the fit
    242         TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax());
    243 
    244         // Choose starting values as accurate as possible
    245         g1.SetParameter(0, fHistTime.GetMaximum());
    246         g1.SetParameter(1, 0);
    247         g1.SetParameter(2, 0.7); // FIXME! GetRMS instead???
    248 
    249         // According to fMuonSearchPar->GetTimeRMS() identified muons
    250         // do not have an arrival time rms>3
    251         g1.SetParLimits(1, -1.7, 1.7);
    252         g1.SetParLimits(2,  0,   3.4);
    253 
    254         // options : N  do not store the function, do not draw
    255         //           I  use integral of function in bin rather than value at bin center
    256         //           R  use the range specified in the function range
    257         //           Q  quiet mode
    258         if (fHistTime.Fit(&g1, "QNB"))
    259             return kTRUE;
    260 
    261         fRelTimeMean  = g1.GetParameter(1);
    262         fRelTimeSigma = g1.GetParameter(2);
    263     }
    264     else
    265     {
    266         fRelTimeMean  = fMuonSearchPar->GetTime();
    267         fRelTimeSigma = fMuonSearchPar->GetTimeRms();
    268     }
     236    // Setup the function and perform the fit
     237    TF1 g1("g1", "gaus");//, -fHistTime.GetXmin(), fHistTime.GetXmax());
     238
     239    // Choose starting values as accurate as possible
     240    g1.SetParameter(0, fHistTime.GetMaximum());
     241    g1.SetParameter(1, 0);
     242    g1.SetParameter(2, 0.7); // FIXME! GetRMS instead???
     243
     244    // According to fMuonSearchPar->GetTimeRMS() identified muons
     245    // do not have an arrival time rms>3
     246    g1.SetParLimits(1, -1.7, 1.7);
     247    g1.SetParLimits(2,  0,   3.4);
     248
     249    // options : N  do not store the function, do not draw
     250    //           I  use integral of function in bin rather than value at bin center
     251    //           R  use the range specified in the function range
     252    //           Q  quiet mode
     253    if (fHistTime.Fit(&g1, "QNB"))
     254        return kTRUE;
     255
     256    fRelTimeMean  = g1.GetParameter(1);
     257    fRelTimeSigma = g1.GetParameter(2);
    269258
    270259    // The mean arrival time which was subtracted before will
     
    275264    {
    276265        const MSignalPix &pix  = (*fSignalCam)[i];
    277         if (fUseCleanedSignal && !pix.IsPixelUsed())
    278             continue;
    279 
    280         const MGeom &gpix = (*fGeomCam)[i];
     266        const MGeom      &gpix = (*fGeomCam)[i];
    281267
    282268        const Float_t dx = gpix.GetX() - cenx;
     
    287273        // if the signal is not near the estimated circle, it is ignored.
    288274        if (TMath::Abs(dist-fMuonSearchPar->GetRadius())<fMargin &&
    289             (fUseCleanedSignal || TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma))
     275            TMath::Abs(pix.GetArrivalTime()-tm0) < 2*fRelTimeSigma)
    290276        {
    291277            fHistPhi.Fill(TMath::ATan2(dx, dy)*TMath::RadToDeg(), pix.GetNumPhotons());
     
    407393{
    408394    Int_t first, last;
     395
    409396    if (!FindRangeAboveThreshold(fHistWidth, thres, first, last))
    410397        return kFALSE;
Note: See TracChangeset for help on using the changeset viewer.