Changeset 4322


Ignore:
Timestamp:
06/22/04 14:24:03 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r4319 r4322  
    2828    - added one argument to CntCamContent to tell if event above or
    2929      below threshold have to be counted. Default is above, like before
     30    - added one argument to Projection and ProjectionS giving the number
     31      of bins as argument (default 50 like before)
    3032
    3133  * mcalib/MCalibrationChargeCalc.cc
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r4321 r4322  
    986986      area[0] = i;
    987987
    988       TH1D *hist = camphes.ProjectionS(TArrayI(),area);
     988      TH1D *hist = camphes.ProjectionS(TArrayI(),area,"_py",100);
    989989      hist->Fit("gaus","Q");
    990990      const Float_t mean  = hist->GetFunction("gaus")->GetParameter(1);
     
    992992      const Int_t   ndf   = hist->GetFunction("gaus")->GetNDF();
    993993
    994       if (ndf < 1)
     994      if (ndf < 2)
    995995        {
    996996          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons "
     
    10041004      const Double_t prob = hist->GetFunction("gaus")->GetProb();
    10051005
    1006       if (prob < 0.0005)
     1006      if (prob < 0.001)
    10071007        {
    10081008          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons "
     
    13941394      area[0] = i;
    13951395
    1396       TH1D *hist = camffactor.ProjectionS(TArrayI(),area);
     1396      TH1D *hist = camffactor.ProjectionS(TArrayI(),area,"_py",100);
    13971397      hist->Fit("gaus","Q");
    13981398      const Float_t mean  = hist->GetFunction("gaus")->GetParameter(1);
     
    14001400      const Int_t   ndf   = hist->GetFunction("gaus")->GetNDF();
    14011401
    1402       if (ndf < 1)
     1402      if (ndf < 2)
    14031403        {
    14041404          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor "
     
    14121412      const Double_t prob = hist->GetFunction("gaus")->GetProb();
    14131413
    1414       if (prob < 0.0005)
     1414      if (prob < 0.001)
    14151415        {
    14161416          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the F-Factor "
  • trunk/MagicSoft/Mars/mhist/MHCamera.cc

    r4318 r4322  
    541541// into account.
    542542//
    543 TH1D *MHCamera::ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name) const
    544 {
    545     Int_t nbins = 50;
     543TH1D *MHCamera::ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name, const Int_t nbins) const
     544{
    546545
    547546    // Create the projection histogram
  • trunk/MagicSoft/Mars/mhist/MHCamera.h

    r4318 r4322  
    240240    UInt_t   GetNumPixels() const;
    241241
    242     TH1D    *Projection(const char *name="_py") const { return ProjectionS(TArrayI(), TArrayI(), name); }
    243     TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py") const
    244     {
    245         return ProjectionS(TArrayI(1, &sector), TArrayI(1, &aidx), name);
    246     }
    247     TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_py") const;
     242    TH1D    *Projection(const char *name="_py", const Int_t nbins=50) const
     243      {
     244        return ProjectionS(TArrayI(), TArrayI(), name,nbins);
     245      }
     246    TH1D    *ProjectionS(Int_t sector, Int_t aidx, const char *name="_py", const Int_t nbins=50) const
     247    {
     248        return ProjectionS(TArrayI(1, &sector), TArrayI(1, &aidx), name, nbins);
     249    }
     250    TH1D    *ProjectionS(const TArrayI &sector, const TArrayI &aidx, const char *name="_py", const Int_t nbins=50) const;
    248251
    249252    TProfile *RadialProfile(const char *name="_rad") const { return  RadialProfileS(TArrayI(), TArrayI(), name);}
Note: See TracChangeset for help on using the changeset viewer.