diff --git a/pub/src/commands.cpp b/pub/src/commands.cpp index 08da4081d73fd64b479bd53a91fc4639cc8e211a..40e4c53dd39b2ad24f6f098f95c78cd85d84144f 100644 --- a/pub/src/commands.cpp +++ b/pub/src/commands.cpp @@ -523,6 +523,7 @@ bool fridaCommand( string cmd ) " ry8 load spectra for two directions separately\n" " ryd load only spectra for two directions\n" " ryo load only spectra for open state\n" + " ryc raw counts (no normalization)\n" " rs load series of energy spectra\n" " rs2 load also spectra for open state\n" ; @@ -539,6 +540,8 @@ bool fridaCommand( string cmd ) NRSSM::ReadSpec( 12 ); } else if (cmd == "ryo") { NRSSM::ReadSpec( 9 ); + } else if (cmd == "ryc") { + NRSSM::ReadSpec( 16 ); } else if (cmd == "rs") { NRSSM::ReadSeries( 0 ); } else if (cmd == "rs2") { diff --git a/pub/src/rssm.cpp b/pub/src/rssm.cpp index aa4a5cf63cd649c13cf3e9c122119f8dbddcc932..c4b646d8cc429c4dc2a5c444aee1d233fa45185f 100644 --- a/pub/src/rssm.cpp +++ b/pub/src/rssm.cpp @@ -219,6 +219,7 @@ void NRSSM::ReadSpec( int flag ) // 2 save also chop histo // 4 save spectra also separately for both directions // 8 do not save regular spectrum +// 16 no normalization { string file_f, name; @@ -313,10 +314,13 @@ void NRSSM::ReadSpec( int flag ) for( int iraw=0; iraw<raw[iolf].size(); iraw+=(1+ndet*2) ){ x = raw[iolf][iraw]; for ( int j=0; j<ndet; ++j ){ - tmeas = raw[iolf][iraw+1+ndet+j]; - if( tmeas<1 ) continue; count = raw[iolf][iraw+1+j]; - olf[iolf]->VS(j)->push_xy( x, count/tmeas/tstep ); + if( !(flag&16) ){ + tmeas = raw[iolf][iraw+1+ndet+j]; + if( tmeas<1 ) continue; + count /= (tmeas*tstep); + } + olf[iolf]->VS(j)->push_xy( x, count ); } } } @@ -330,11 +334,14 @@ void NRSSM::ReadSpec( int flag ) for( int iraw=0; iraw<nline; iraw+=(1+ndet*2) ){ x = raw[iolf0][iraw]; for ( int j=0; j<ndet; ++j ){ - tmeas = raw[iolf0][iraw+1+ndet+j] + - raw[iolf1][iraw+1+ndet+j]; - if( tmeas<1 ) continue; count = raw[iolf0][iraw+1+j] + raw[iolf1][iraw+1+j]; - olf[6+ichop]->VS(j)->push_xy( x, count/tmeas/tstep ); + if( !(flag&16) ){ + tmeas = raw[iolf0][iraw+1+ndet+j] + + raw[iolf1][iraw+1+ndet+j]; + if( tmeas<1 ) continue; + count /= (tmeas*tstep); + } + olf[6+ichop]->VS(j)->push_xy( x, count ); } } }