33 int main(
int argc,
char** argv){
39 TFile* f=TFile::Open(argv[1]);
40 TTree* tree=(TTree*)f->Get(
"pwa");
44 tree->SetBranchAddress(
"fitbin",&bin);
48 std::vector<double> intens(nw,0);
50 int n=tree->GetEntries();
56 for(
int j=0;j<nw;++j){
58 intens[j]+=bin->
intens(j)/I;
66 std::map<TString,double> waves;
67 std::map<double, TString> waves2;
70 for(
int j=0;j<nw;++j){
72 waves[bin->
wavename(j)]=intens[j]/(double)usedbins;
73 waves2[intens[j]/(double)usedbins]=bin->
wavename(j);
81 std::cout<<
"Wavename | ID"<<std::endl;
82 for(
int j=0;j<nw;++j){
83 std::cout<<bin->
wavename(j)<<
" | "<<j<<std::endl;
86 std::cout<<
"Wavename | Relative Intensity (sorted by name)"<<std::endl;
87 std::map<TString,double>::iterator wit=waves.begin();
88 while(wit!=waves.end()){
89 std::cout<<wit->first<<
" | "<<wit->second<<std::endl;
93 std::cout<<
"----------------------------------------------------"<<std::endl;
94 std::cout<<
"Wavename | Relative Intensity (sorted by intensity)"<<std::endl;
95 std::map<double,TString>::iterator wit2=waves2.end();
96 while(wit2!=waves2.begin()){
98 std::cout<<wit2->second<<
" | "<<wit2->first<<std::endl;
104 int mnparm(
int,
string,
double,
double,
double,
double) {
105 cerr <<
"this is impossible" << endl;