Ignore:
Timestamp:
05/10/05 14:31:05 (20 years ago)
Author:
meyer
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r7005 r7008  
    3030// Task to calculate the muon parameters
    3131//
    32 //  This class allows you to get more muon information especially useful for
     32// This class allows you to get more muon information especially useful for
    3333// the calibration of our telescope. This class store the information into the
    3434// container of MMuonCalibPar.
    3535//
    36 //  In order to make this class work, we need the information of the arc
     36// In order to make this class work, we need the information of the arc
    3737// center and the radius. Therefore, we need to use the task of
    3838// MMuonSearchParCalc.
     39// In the second step two histograms has to be filled for every muon.
     40// This is made by MHSingleMuon (look there for more information).
    3941//
    40 //  You can use this class such as the followings;
     42// The calculation of Muon parameters works as the followings;
    4143//
    4244//   MTaskList tlist;
    4345//   MMuonSearchParCalc musearchcalc;
     46//   MFillH fillmuon("MHSingleMuon", "", "FillMuon");
    4447//   MMuonCalibParCalc mucalibcalc;
    4548//   tlist.AddToList(&musearchcalc);
     49//   tlist.AddToList(&fillmuon);
    4650//   tlist.AddToList(&mucalibcalc);.
    4751//
    48 //  You may change the allowed region to estimate muon parameters such as
    49 // Muon SIZE and ARC LENGTH. The default value is 60 mm (0.2 deg.). If the
    50 // estimated radius of the arc is 1.0 degree, we take the photons in the
    51 // radius range from 0.8 to 1.2 degrees. You can change this value such as
    52 // the followings;
    5352//
    54 //   mucalibcalc.SetMargin(60.);
     53// For a faster coputation, pre cuts to select the candidates
     54// of muons for the calibration should be done. It is already implemented
     55// in star. You can set the values in star.rc.
    5556//
    56 //  You can retrieve the histogram (TH1F) using the function of GetHistPhi()
    57 // (also GetHistWid()). Therefore, you can draw the histogram such as
    58 //
    59 //   MParList  plist;
    60 //   MMuonCalibPar muparcalib;
    61 //   plist.AddToList(&muparcalib);.
    62 //   muparcalib.GetHistPhi().Draw();.
    63 //
    64 //  In order to use another information of muons such as the center position
    65 // of the estimated circle, the radius of the circle. Use the infomation
    66 // stored in MMuonSearchPar.
    67 //
    68 //
    69 // // For the faster computation, by default, the calculation of impact
    70 // // parameter is suppressed. If you want to calculate the impact parameter
    71 // // from the muon image, you can use the function of EnableImpactCalc(),
    72 // // namely;
    73 // //
    74 // //   mucalibcalc.EnableImpactCalc();.
    75 //
    76 //  In addition, for the faster comutation, pre cuts to select the candidates
    77 // of muons for the calibration is done. You can set the values using the
    78 // function of SetPreCuts. This function takes 5 variables. They correspond
    79 // to the cur for the Arc Radius (low and high), the deviation of the fit
    80 // (high), the Muon Size (low) and Arc Phi (low). You can set them such as
    81 //
    82 //   mucalibcalc.SetPreCuts(180., 400., 50., 2000., 180.);
    83 //
    84 //  If you want to disable the pre cuts, you can disable it by using the
    85 // function of DisablePreCuts(), namely;
    86 // 
    87 //   mucalibcalc.DisablePreCuts();.
    88 //
    89 //
    9057// ### TODO ###
    9158//  Up to now, in the histogram the error of the signal is estimated from
     
    9562// the pedestal is not taken into accout. The error treatment should be
    9663// done correctly.
    97 // 
     64//
    9865//
    9966//  Input Containers:
     
    186153Int_t MMuonCalibParCalc::Process()
    187154{
    188     // Calculation of Arc Phi etc...
     155    // Calculation of ArcPhi, ArcWidth and MuonSize.
    189156    const Float_t thresphi   = fMuonSetup->GetThresholdArcPhi();
    190157    const Float_t threswidth = fMuonSetup->GetThresholdArcWidth();
     
    202169    fMuonCalibPar->SetMuonSize(fHist->GetHistPhi().Integral());
    203170
    204     // Calculate Arc Length
     171    // Calculate ArcPhi
    205172    fMuonCalibPar->SetPeakPhi(peakphi);
    206173    fMuonCalibPar->SetArcPhi(arcphi);
    207174
    208     const Float_t conv = TMath::RadToDeg()*fGeomCam->GetConvMm2Deg();
    209     fMuonCalibPar->SetArcLength(fMuonCalibPar->GetArcPhi()*fMuonSearchPar->GetRadius()*conv);
     175//    const Float_t conv = TMath::RadToDeg()*fGeomCam->GetConvMm2Deg();
     176//    fMuonCalibPar->SetArcLength(fMuonCalibPar->GetArcPhi()
     177//                                *fMuonSearchPar->GetRadius()*conv);
    210178
    211     // Calculation of Arc Width etc...
     179    // Calculation of ArcWidth etc...
    212180    fMuonCalibPar->SetChiArcWidth(chi);
    213181    fMuonCalibPar->SetArcWidth(width);
    214182
     183    // Check if this is a 'Write-Out' candidate
     184    if (fMuonCalibPar->GetArcPhi()>160    && fMuonSearchPar->GetRadius()<400 &&
     185        fMuonSearchPar->GetDeviation()<50 && fMuonSearchPar->GetRadius()>170)
     186        fMuonCalibPar->SetReadyToSave();
     187
    215188    return kTRUE;
    216189}
Note: See TracChangeset for help on using the changeset viewer.