\usepackage{fancyheadings}
\pagestyle{fancyplain}

%\lhead[\rmfamily \thepage]{\fancyplain{}%
%{\slshape \rightmark}}
\lhead[\rmfamily \thepage]{\fancyplain{}}
\chead[\fancyplain{}{\slshape \leftmark}]%
      {\fancyplain{}{\slshape \rightmark}}
\rhead[\fancyplain{}]{\rmfamily \thepage}
%\chead{\setlength{\unitlength}{1mm}
%  \begin{picture}(0,0)
%        \put(-79.25,-2.5){\line(1,0){160}}
%  \end{picture} }
%\rhead[\fancyplain{}{\slshape \rightmark}]{\rmfamily \thepage}
\lfoot{}
\cfoot{}
\rfoot{}
%[\fancyplain{}{\slshape \leftmark}]%
%{\setlength{\unitlength}{1mm}\setlength{\epsfxsize}{1.5cm}
%  \begin{picture}(0,0)
%    \put(-14,-3.8){\epsfbox{ihep.ps}}
%  \end{picture} }

%\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\headrulewidth}{0.3mm}
\renewcommand{\headrulewidth}{0.0mm}
\renewcommand{\footrulewidth}{0.0pt}
%\renewcommand{\footrulewidth}{0.4pt}

%% leftmark to printout the chapter-no and chaptername
%\renewcommand{\chaptermark}[1]{\markboth%
%{\chaptermarkformat #1}{}}
\renewcommand{\chaptermark}[1]{\markboth%
{\thechapter.\ #1}{}}
%\renewcommand{\sectionmark}[1]{\markright%
%{\bfseries{\thesection.}\ \slshap{#1}}}
\renewcommand{\sectionmark}[1]{\markright%
{\thesection \ #1}}
%\renewcommand{\sectionmark}[1]{\markright%
%{\thesection.\ \uppercase{#1}}}
