Ignore:
Timestamp:
Mar 30, 2013, 4:24:38 PM (11 years ago)
Author:
lemeur
Message:

cosmetique diagrammes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc

    r410 r414  
    580580}
    581581
    582 void particleBeam::histogramme(unsigned int iabs,vector<double>& xcor,vector<int>& hist,double out[3])
     582void particleBeam::histogramme(unsigned int iabs,vector<double>& xcor,vector<int>& hist, vector<string>& legende)
    583583{
     584  double out[3];
    584585  // out[0]= nbre de particules, out[1]= moyenne, out[2]= ecart-type
    585586  vector<double> vshf;
     
    592593    out[2] *= EREST_keV; // ecart-type en KeV
    593594  }
     595  // legendes
     596  string unites[2];
     597  if(iabs == 0 || iabs == 1 || iabs == 2) {
     598    unites[0]= unites[1]= " mm";
     599  }
     600  if(iabs == 3 || iabs == 4) {
     601    unites[0]= unites[1]= " mrad";
     602  }
     603  if(iabs == 5) {
     604    unites[0]= " MeV"; unites[1]= " KeV";
     605  }
     606
     607  legende.clear();
     608  legende.push_back(" entries : "+ mixedTools::intToString((int)out[0]) );
     609  legende.push_back(" mean : "+ mixedTools::doubleToString(out[1])+unites[0]);
     610  legende.push_back(" sigma rms : "+ mixedTools::doubleToString(out[2])+unites[1]);
    594611}
    595612
Note: See TracChangeset for help on using the changeset viewer.