Changeset 414 in PSPA for Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc
- Timestamp:
- Mar 30, 2013, 4:24:38 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc
r410 r414 580 580 } 581 581 582 void particleBeam::histogramme(unsigned int iabs,vector<double>& xcor,vector<int>& hist, double out[3])582 void particleBeam::histogramme(unsigned int iabs,vector<double>& xcor,vector<int>& hist, vector<string>& legende) 583 583 { 584 double out[3]; 584 585 // out[0]= nbre de particules, out[1]= moyenne, out[2]= ecart-type 585 586 vector<double> vshf; … … 592 593 out[2] *= EREST_keV; // ecart-type en KeV 593 594 } 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]); 594 611 } 595 612
Note: See TracChangeset
for help on using the changeset viewer.