/[PAMELA software]/calo/flight/CaloProfile/src/CaloProfile.cpp
ViewVC logotype

Diff of /calo/flight/CaloProfile/src/CaloProfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by mocchiut, Thu May 13 13:55:37 2010 UTC revision 1.19 by mocchiut, Tue May 18 04:03:29 2010 UTC
# Line 690  CaloLong::CaloLong(PamLevel2 *l2p){   Line 690  CaloLong::CaloLong(PamLevel2 *l2p){  
690    //  lmipth = 100.;    //  lmipth = 100.;
691    lmipth = 0.;    lmipth = 0.;
692    //    //
693      lfit = 0;
694  };  };
695    
696  TF1 *CaloLong::GetFit(){  TF1 *CaloLong::GetFit(){
697    TString fnam=Form("lfit%s",suf.Data());  //  TString fnam=Form("lfit%s",suf.Data());
698    TF1 *lfit  = dynamic_cast<TF1*>(gDirectory->FindObject(fnam));  //  TF1 *lfit  = dynamic_cast<TF1*>(gDirectory->FindObject(fnam));
699    if ( lfit ) return lfit;    if ( lfit ) return lfit;
700    return NULL;    return NULL;
701  }  }
# Line 747  void CaloLong::Print(){ Line 748  void CaloLong::Print(){
748    Fit();    Fit();
749    //    //
750    printf("==================== Calorimeter Longitudinal Profile =======================\n");    printf("==================== Calorimeter Longitudinal Profile =======================\n");
751    printf(" OBT: %u PKT: %u ATIME: %u \n",OBT,PKT,atime);    printf(" OBT: %u PKT: %u ATIME: %u suf %s \n",OBT,PKT,atime,suf.Data());
752    printf(" fitresult:.. %i\n",fitresult);    printf(" fitresult:.. %i\n",fitresult);
753    printf(" chi2     :.. %f\n",chi2);    printf(" chi2     :.. %f\n",chi2);
754    printf(" ndf      :.. %f\n",ndf);    printf(" ndf      :.. %f\n",ndf);
# Line 1265  void CaloLong::Fit(Bool_t draw){ Line 1266  void CaloLong::Fit(Bool_t draw){
1266    th = new TH2F(thid,thid,1000,-0.2,xmax,1000,0.,emax*1.2);    th = new TH2F(thid,thid,1000,-0.2,xmax,1000,0.,emax*1.2);
1267    gh = new TGraphErrors(numpo,xxx,yyy,exx,eyy);    gh = new TGraphErrors(numpo,xxx,yyy,exx,eyy);
1268    TString fnam=Form("lfit%s",suf.Data());    TString fnam=Form("lfit%s",suf.Data());
1269    TF1 *lfit  = dynamic_cast<TF1*>(gDirectory->FindObject(fnam));  //  TF1 *lfit  = dynamic_cast<TF1*>(gDirectory->FindObject(fnam));
1270    if ( lfit ) lfit->Delete();    if ( lfit ) lfit->Delete();
1271    lfit = new TF1(fnam,ccurve,0.,xmax,3);    lfit = new TF1(fnam,ccurve,0.,xmax,3);
1272  //   if ( !lfit ){  //   if ( !lfit ){

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.23