|
[Rivet-svn] r3824 - schools/2008-Debrecen/handoutsblackhole at projects.hepforge.org blackhole at projects.hepforge.orgTue Jul 17 13:22:11 BST 2012
Author: dgrell Date: Tue Jul 17 13:22:11 2012 New Revision: 3824 Log: 2008 Herwig++ Added: schools/2008-Debrecen/handouts/ schools/2008-Debrecen/handouts/Debrecen.tex schools/2008-Debrecen/handouts/Herwig.tex schools/2008-Debrecen/handouts/ipppcompcourse.cls schools/2008-Debrecen/handouts/ipppcompcourse.sty Added: schools/2008-Debrecen/handouts/Debrecen.tex ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ schools/2008-Debrecen/handouts/Debrecen.tex Tue Jul 17 13:22:11 2012 (r3824) @@ -0,0 +1,266 @@ +\documentclass{ipppcompcourse} + +\setlecturename{Herwig++ Tutorial} +\setlecturedate{2008-08-13} +\setlecturesheet{1} + +\usepackage{hepnicenames} +\newcommand{\hw}{\textsf{Herwig++}} +\renewcommand{\baselinestretch}{1.2} +\begin{document} +\section{Preparation} +%The \hw{} homepage is at \cmd{http://projects.hepforge.org/herwig/}. +To speed up the setup, we have pre-installed \hw{} version 2.2.1 for the +tutorials. To use it, you should create a working directory, +and copy the configuration file across (we'll explain their role +in section \ref{details} below). Do not type the \textsf{\$} character!\\ +\inp{mkdir hw-tutorial}\\ +\inp{cd hw-tutorial}\\ +\inp{cp /opt/mcnet/share/Herwig++/LHC.in .}%\\ +%To access the executables for all tutorials, you need to add the bin directory to your path:\\ +%\inp{export PATH=\$PATH:/opt/mcnet/bin} + +\section{Simple LHC events} +As a first step, we will generate 100 LHC Drell-Yan events in the default setup that +comes with the distribution:\\ +\inp{Herwig++ read LHC.in}\\ +\inp{Herwig++ run LHC.run -N100}\\ The second step will take about 2 minutes on the machines here. Most of this time is taken up by the constant initialization time, with the actual event generation lasting a few seconds. +We'll explain the commands in the next section. + +Looking at the file +\outp{LHC.log}, you should see the detailed record of the first 10 +events of this \emph{run}: \\ +\inp{less LHC.log}\\ +Each \emph{event} is made up of +individual \emph{steps} that reflect the treatment of the event as it passes +through the various stages of the generator (hard subprocess, parton +shower, hadronization and decays). +Every \emph{particle} in a step has an entry like +\begin{verbatim} +16 g 21 [13] (42,43) 14>>20 {+6,-5} + -1.040 -2.805 177.756 177.783 0.750 +\end{verbatim} +The first line contains +\texttt{16}, the particle's label in this event; +\texttt{g 21}, the particle's name and PDG code; +\texttt{[13]}, the label(s) of parent particle(s); +\texttt{(42,43)} the label(s) of child particle(s); and +\texttt{14>>20 \{+6,-5\}}, the colour structure: this particle is connected via + colour lines 5 and 6 to the particles with number 14 and + 20. Sometimes you'll also see something like \texttt{7v} or + \texttt{2\^}; they signify that the current particle is a clone of + particle 7 below / 2 above. +The second line shows $p_x$, $p_y$, $p_z$, $E$ and +$\pm\sqrt{|E^2 - \vec{p}^2|}$. + +Note that everybody has generated the exact same events (go and +compare!), with exactly +the same momenta. Adding 10 of these runs together will \emph{not} be +equivalent to running 1000 events! To make statistically independent +runs, you need to specify a random seed, either with\\ +\inp{Herwig++ run LHC.run -N100 -seed 123456}\\ +or, as we'll see now, in the \outp{LHC.in} file. + +\section{Input files}\label{details} +Any \textsf{ThePEG}-based generator like \hw{} is controlled mainly through +input files (\textsf{.in} files). +In the input files, you can assemble a \emph{Repository} +of component objects (each one is a C++ class of its own) +and their parameter settings. These are then assembled into +an event generator, which is then run. + \hw{} already comes with a pre-prepared + default setup\footnote{in + \cmd{/opt/mcnet/share/Herwig++/defaults}}. As a user, you will +only need to write a file with a few lines (like \outp{LHC.in}) +for your own parameter modifications. The next few sections +will go through this. + +The first command we ran (\cmd{Herwig++ read LHC.in}) takes the +default repository provided with the installation%\footnote{% +%The default repository can also be re-created by the user, by copying +%over the files from \cmd{/opt/mcnet/share/Herwig++/defaults}, and running +%\inp{Herwig++ init}. This +%reads the file \outp{HerwigDefaults.in} (which in turn includes most +%of the other \textsf{.in} files) to prepare a default \emph{LEPGenerator} +%and \emph{LHCGenerator} object. This default setup is now stored in +%\outp{HerwigDefaults.rpo}. +%A regular user does not really need to run \cmd{init} at all, +%everything can be modified at the \cmd{read} stage. +%} +, and reads in the additional +instructions from \outp{LHC.in} to modify the repository +accordingly. A complete setup for a generator run will now be saved to +disk in a \outp{.run} file, for use with a command like +\cmd{Herwig++ run LHC.run -N100}. The run can also +be started directly from the \outp{LHC.in} file, which is especially +useful for batch jobs or parameter scans. + +Writing new \textsf{.in} files is the main way of interacting with +\hw. Have a look at the other examples we have provided for LEP, Tevatron, +or ILC (\outp{LEP.in, TVT.in} and \outp{ILC.in}) and see +if you can understand the differences (type the dot!):\\ +\inp{cp -u /opt/mcnet/share/Herwig++/???.in .} + +The two most useful repository commands are \outp{create}, which registers a +C++ object with the repository under a chosen name, and \outp{set}, +which is used to modify parameters of an object. Note that all this +can be done without recompiling any code! + +Take your time to play with the options in the example files. Here are some +suggestions for things you can try: +\begin{enumerate} +\item Run 100 Tevatron events. +\item Start a Tevatron run directly from the \textsf{.in} file. The information you need is already in the files. Be careful with + the number of events you generate, the default is $10^7$, and we + don't have that much time today! +\item Compare the Drell-Yan cross sections for Tevatron and LHC. The cross sections are written to \outp{TVT.out} and \outp{LHC.out}, respectively. +\end{enumerate} + +\section{Analysis handlers} +There is an easier way to analyse the generated events than looking at +the \outp{.log} file. \outp{ThePEG} provides the option to attach +multiple \emph{analysis handlers} to a generator object. Every analysis +handler initializes itself before a run (\emph{e.g.}~to book +histograms), analyses each event in turn (fill histograms) and then runs some +finalization code at the end of the run (output histograms). + +As part of the default setup, one analysis handler +has always been running already. The \emph{BasicConsistency} handler +does what its name promises: checking for charge and momentum +conservation. + +\subsection{Graphviz plot} +Let's briefly look at a useful +handler that allows us to visualize the internal structure of an event +within \hw{}. Copy the pre-prepared input file into your directory:\\ +\inp{cp -u /opt/mcnet/share/Herwig++/Graph.in .}\\ +%Enable the \emph{GraphvizPlot} analysis for LHC (the +%line in \outp{LHC.in} which mentions \outp{/Herwig/Analysis/Plot}) and +Run one event with\\ \inp{Herwig++ read Graph.in}\\ The \emph{Plot} analysis +should have produced a file \outp{Graph-Plot-1.dot}, which contains the +description of a directed graph for the generated event. The +\outp{graphviz} package will plot the graph for us:\\ +\inp{dot -Tpng Graph-Plot-1.dot > plot.png}\\ +Have a look with +\inp{display plot.png} +or any other image viewer\footnote{\cmd{dot} can output other image + formats, too; choose them with the \cmd{-T} flag.} +\begin{enumerate} +\item Identify the Drell-Yan process. Has there been initial state radition? +\item Keep track of the incoming protons and proton remnants. Did +only one $2\to 2$ scattering take place? +\item Re-generate and look at +another event by changing the seed value in \textsf{Graph.in}. +\end{enumerate} +It is important to note that these plots only reflect the internal +event structure in +the generator. Most internal lines do \emph{not} have a physical significance! +We have also disabled the hadronization and decay steps in \textsf{Graph.in} + to keep the plot simpler. +\subsection{Other analyses} +{In the following days we will use Rivet for physics + analyses. However, \hw{} also offers a variety of stand-alone +analysis handlers. + If you'd like to see some of them, +please ask a demonstrator to show you.} +%%%%% +%\subsection{\textsf{HepMC} output} +%For later analysis we can produce event files in +%the \textsf{HepMC} format. \hw{} +%contains a special analysis handler which is capable of writing the +%generated events to a \textsf{HepMC} file, \cmd{/Herwig/Analysis/HepMCFile}. +%You can change the default output format by using the \cmd{Format} interface +%of \cmd{HepMCFile}. Possible values are \texttt{GenEvent, +% AsciiParticles, Ascii, ExtendedAscii} +%and \cmd{Dump}, which produces human readable output. A filename can +%be specified +%using the \cmd{Filename} interface. Have a look at \outp{LHC.in}, in +%the analysis +%section we already provide an example of a \textsf{HepMC} analysis handler. + +\section{Changing default settings} +Take a look at the default settings in +\cmd{/opt/mcnet/share/Herwig++/defaults}, we have +commented them extensively. Ask the tutors to explain parameters. +Can you identify which four lines in + \outp{HerwigDefaults.in} control the + hard subprocess, the parton shower, the hadronization and the + decays? + +\subsection{Switching off simulation steps} +So far we have looked at completely generated events including parton showers, +hadronization, decays of hadrons and multiple parton interactions. The +first three of these +steps may be switched off by setting the corresponding \emph{step + handler} interfaces of an +event handler to \cmd{NULL}. Multiple parton interactions are switched +off by setting the \cmd{MPI} +interface of the \cmd{ShowerHandler} to \cmd{No}. + +Add repository commands to your local \outp{LHC.in} + switching on or off successive +steps and look at the effects by generating a few events. The default +settings are +provided in \outp{HerwigDefaults.in} and \outp{Shower.in}. +% Take care +%of the directories, in which the different objects reside. + +\subsection{Changing the hard process} +In the remainder of this tutorial, we will be interested +in $t\overline{t}$ production at the LHC. The default hard process +for LHC is Drell-Yan vector boson production with leptonic decays. + +Edit \outp{LHC.in} to replace the matrix element for vector boson production +by the one for top-quark pair production.% for \cmd{LHCGenerator}'s default \cmd{SubProcessHandler}. +The relevant matrix element +is already in the default repository, it's called +\cmd{/Herwig/MatrixElements/MEHeavyQuark}. +Generate a few events as for the default settings. +Try to keep track of the top quarks in \outp{LHC.log}. +Can you identify if there +has been gluon radiation off the top quarks prior to their decay? + +%\subsection{Initial and final state radiation} +%Initial and final state QCD radiation may be switched off +% seperately. Work out +%the relevant interface settings by looking at the comments and repository +%commands in \cmd{Shower.in}, for +%\begin{enumerate} +%\item switching off initial state radiation, +%\item switching off final state radiation, +%\end{enumerate} + +%Again, you can just add the repository commands for setting interface values +%to your local \outp{LHC.in} file. + +%If you want to look at some events in detail, +%it is reasonable to switch off hadronization, decays and multiple parton +%interactions when looking at the effect of the different settings +%(just to have clearer output). +%\subsection{Cuts} + + + +\subsection{Changing particle properties} + +The properties of a particle are contained in a \cmd{ParticleData} object. All of these +objects are stored in the default repository in \cmd{/Herwig/Particles}. + +The top quark's properties are contained in \cmd{/Herwig/Particles/t}, the anti-top's +properties are set automatically. You can change the mass and width of the top quark +using the \cmd{NominalMass} and \cmd{Width} interfaces. + +Particles can be set stable explicitly. For the top quark to be stable, +add\\ \cmd{set /Herwig/Particles/t:Stable Stable} to \outp{LHC.in} (the default +value for the top quark is of course \cmd{Unstable}). You will also need to +switch off the hadronization. Why is this necessary? + +\section*{That's it!} +Thanks for trying \hw{}! If you have any questions later on, please +email us at\\ \cmd{herwig at projects.hepforge.org} +or have a look at +\cmd{http://projects.hepforge.org/herwig/}, where many how-tos +can be found. We're adding more as our time allows. For detailed documentation +refer to our manual, \texttt{arxiv:0803.0883}. + +\end{document} Added: schools/2008-Debrecen/handouts/Herwig.tex ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ schools/2008-Debrecen/handouts/Herwig.tex Tue Jul 17 13:22:11 2012 (r3824) @@ -0,0 +1,203 @@ +\documentclass{ipppcompcourse} + +\setlecturename{Herwig++ Tutorial} +\setlecturedate{2007-04-18} +\setlecturesheet{6} + +\usepackage{hepnicenames} +\newcommand{\hw}{\textsf{Herwig++}} + +\begin{document} +\section{Preparation} +To speed up the setup, we have pre-installed \hw{} version 2.0.1 for the +tutorials. To use it easily, you should create a working directory, +and copy the configuration files across (we'll explain their role +in section \ref{details} below):\\ +\inp{mkdir hw-test}\\ +\inp{cd hw-test}\\ +\inp{cp /mt/share/MCnet07/Herwig++/share/Herwig++/*.in .}\\ +Also, create a link to the executable:\\ +\inp{ln -s /mt/share/MCnet07/Herwig++/bin/Herwig++} + + + +\section{Simple LEP events} +As a first step, we will generate 100 LEP events in the default setup that +comes with the distribution:\\ +\inp{./Herwig++ init}\\ +\inp{./Herwig++ read LEP.in}\\ +\inp{./Herwig++ run LEP.run -N100}\\ +We'll explain the commands in the next section. Looking at the file +\outp{LEP.log}, you should see some events. Each event is made up of +individual steps that reflect the treatment of the event as it passes +through the various stages of the generator (hard subprocess, parton +shower, hadronization and decays). + + +Every particle has an +entry like +\begin{verbatim} +16 g 21 [13] (42,43) 14>>20 {+6,-5} + -1.040 -2.805 177.756 177.783 0.750 +\end{verbatim} +The first line contains +\texttt{16}, the particle's label in this event; +\texttt{g 21}, the particle's name and PDG code; +\texttt{[13]}, the label(s) of parent particle(s); +\texttt{(42,43)} the label(s) of child particle(s); and +\texttt{14>>20 \{+6,-5\}}, the colour structure: this particle is connected via + colour lines 5 and 6 to the particles with number 14 and + 20. Sometimes you'll also see something like \texttt{7v} or + \texttt{2\^}; they signify that the current particle is a clone of + particle 7 below / 2 above. +The second line shows $p_x$, $p_y$, $p_z$, $E$ and $\pm\sqrt{|E^2 - p^2|}$. + + +\section{Input files}\label{details} +Any \textsf{ThePEG}-based generator like \hw{} is controlled mainly through +input files (\textsf{.in} files). There you prepare a number +of component objects and their parameter settings +in a \emph{Repository}, assemble them into an +event generator and run it. \hw{} already comes with the right input +files for the default setup. As a user, you will only need to write a +few lines for your own parameter modifications. The next few sections +will go through this. + +The first command we ran +(\inp{./Herwig++ init}) +reads the file \outp{HerwigDefaults.in} (which in turn includes most +of the other \textsf{.in} files) to prepare a default \emph{LEPGenerator} +and \emph{LHCGenerator} object. This default setup is now stored in +\outp{HerwigDefaults.rpo}. + +Usually you would only run \cmd{init} very +rarely. To prepare actual runs, we can write an additional +\textsf{.in} file. Examples we have provided are \outp{LEP.in}, +\outp{LHC.in}, \outp{TVT.in} or \outp{ILC.in}. + +The second command we ran (\inp{./Herwig++ read LEP.in}) takes the +repository generated by \cmd{init}, reads in the additional +instructions from \outp{LEP.in} and modifies the repository +accordingly. A complete setup for a generator run will now be saved to +disk for use with \cmd{./Herwig++ run LEP.run -N100}. The run can also +be controlled directly from the \outp{LEP.in} file. + +Please take some time now to look +through \outp{HerwigDefaults.in} and the other \textsf{.in} files, we have +commented them extensively. Ask \hw{} tutors to explain parameters. + +Here are some things you can try: +\begin{enumerate} +\item Run 100 LHC events. +\item Control a run directly from the \textsf{.in} file. Be careful with + the number of events you generate, the default is $10^7$, and we + don't have that much time today! +\item Compare the cross-sections for the default LEP process at the Z + pole and away from the Z pole. The cross-section is written to \outp{LEP.out}. +\item Generate various LHC processes by changing the matrix element + that's used. +\item Can you identify which four objects in the + repository control the + hard subprocess, the parton shower, the hadronization and the + decays? What do the generated events look like if you turn some of + them off\footnote{Has to be done in \textsf{HerwigDefaults.in}, + re-run \cmd{init} afterwards. Not + all combinations will work!}? +\end{enumerate} + +\section{Analysis handlers} +There is an easier way to analyse the generated events than looking at +the \outp{.log} file. \outp{ThePEG} provides the option to attach +multiple \emph{analysis handlers} to a generator object. Every analysis +handler initializes itself before a run (\emph{e.g.}~to book +histograms), analyses each event in turn (fill histograms) and then runs some +finalization code at the end of the run (output histograms). + +Looking at \outp{Analysis.in}, you can see that one analysis handler +has always been running already. The \emph{BasicConsistency} handler +does what its name promises: checking for charge and momentum conservation. +\subsection{Graphviz plot} +Before we go on to a physics analysis, let's briefly look at a useful +handler that allows us to visualize the internal structure of an event +within \hw{}. Enable the \emph{GraphvizPlot} analysis for LEP and run one LEP +event (don't forget to run \cmd{init} and \cmd{read} before). \emph{GraphvizPlot} +should have produced a file \outp{graphviz-1.dot}, which contains the +description of a directed graph for the generated event. The +\outp{graphviz} package will plot the graph for us:\\ +\inp{ln -s /mt/share/MCnet07/graphviz/bin/dot}\\ +\inp{./dot -Tpng graphviz-1.dot > LEP-plot.png}\\ +Have a look with +\inp{display LEP-plot.png} +or any other image viewer\footnote{other image formats are possible, + too, look at \cmd{dot}'s manpage}. +\begin{enumerate} +\item Compare a LEP and an LHC event. Find the hard subprocess in the + LHC event. +\end{enumerate} +It is important to note that these plots only reflect the internal +event structure in +the generator. Most internal lines do \emph{not} have a physical significance! + +\subsection{Z boson \maybebm{p_T} at LHC} +Insert the \emph{SimpleLHC} analysis into the LHC generator and run +1000 events with either the \emph{MEqq2gZ2ff} or \emph{MEqq2W2ff} +matrix elements activated. The output is a collection of histograms in +\outp{topdraw} format. To turn them into a postscript file, use\\ +\inp{/usr/local/td/bin/td -dPOSTSCRIPT SimpleLHCAnalysis.top}\\ +and view it with\\ +\inp{gv SimpleLHCAnalysis.ps}\footnote{There may be some empty + histograms, which should not really be displayed. We'll fix our + handler for version 2.0.2, promise!} + +\subsection{User analysis} +\outp{ThePEG} and therefore \hw{} allow you to compile stand-alone +modules that you have +written. This can happen anywhere outside of the main source +code and +you can then specify in the \outp{.in} files that you would like + to use your replacement module. +It is therefore possible + to override or extend any default component with one that you have + written yourself. + +Let's try this with an analysis handler. We have prepared a shortened version of +\emph{SimpleLHC} for you to play with:\\ +\inp{cp /mt/share/MCnet07/Herwig++/tutorial-analysis/* .} (don't leave +out the dot!)\\ +The code is in \outp{TutorialAnalysis.*}. With a bit of practice, +these files could easily have been written by yourself. + +\hw{} comes with a \outp{Makefile-UserModules} that allows quick +integration of your own code modules. Let's first rename it to the +default name that \outp{make} expects, and run the compilation:\\ +\inp{mv Makefile-UserModules Makefile}\\ +\inp{make}\\ +By default, the library will have the same name as the \outp{.cc} +file. In our case, that's \outp{TutorialAnalysis.so}. How do you tell +Herwig to use this new library? It's as simple as adding these lines +to your input file:\\ +\cmd{create MCnet07::TutorialAnalysis TheNewTutorialAnalysis TutorialAnalysis.so}\\ +\cmd{insert LHCGenerator:AnalysisHandlers 0 TheNewTutorialAnalysis}\\ +Run LHC events again, you should now be able to find the new +\outp{TutorialAnalysis.top} file\footnote{If you didn't turn off + \emph{SimpleLHC} beforehand, it will also run and produce its own + output file.}. + +\begin{enumerate} +\item Look at the code of \emph{TutorialAnalysis} and try to + understand what it does. Ask for help if needed! +\item Modify the code to produce a line of screen output after the run + is complete. That line should confirm to the user that \emph{TutorialAnalysis} + has run. +\item Implement Bryan Webber's suggested analyses. You'll probably need\\ + \texttt{http://www.thep.lu.se/ThePEG/Doc/refman-html}. Again, ask for help! +\end{enumerate} +\section*{That's it!} +Thanks for trying \hw{}! If you have any questions later on, please +email us at\\ \cmd{herwig at projects.hepforge.org} +or look at the Wiki at\\ \cmd{http://projects.hepforge.org/herwig/}. The list of +user information is a bit sparse at the moment, but we'll add any +requested how-to or tutorial. Please ask for them! It helps us to know +what you are interested in as users. + +\end{document} Added: schools/2008-Debrecen/handouts/ipppcompcourse.cls ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ schools/2008-Debrecen/handouts/ipppcompcourse.cls Tue Jul 17 13:22:11 2012 (r3824) @@ -0,0 +1,91 @@ +\ProvidesClass{ipppcompcourse} +\LoadClass[a4paper,10pt,twoside]{article} +\RequirePackage{a4wide,xspace,setspace,verbatim} +\RequirePackage{ipppcompcourse} +\setlength{\parindent}{0cm} +\onehalfspacing + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\def\lecturename{foo} +\def\lecturesheet{} +\def\lecturedate{\today} +\DeclareRobustCommand{\setlecturename}[1]{\def\lecturename{#1}} +\DeclareRobustCommand{\setlecturesheet}[1]{\def\lecturesheet{#1}} +\DeclareRobustCommand{\setlecturedate}[1]{\def\lecturedate{#1}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\AtBeginDocument{ + CTEQ - MCnet \hfill Tutorial session\newline + Debrecen 2008 \hfill Herwig++ examples\newline + \lecturedate \hfill {\footnotesize Manuel~B\"ahr, David Grellscheid, Seyi Latunde-Dada, Peter Richardson, Jon Tully}\newline + \rule{\textwidth}{.5mm} + \begin{center} + \textbf{\LARGE \lecturename}%\\ + %Andy Buckley --- David Grellscheid + \end{center} + \setlength{\parskip}{3pt} +} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%\DeclareRobustCommand{\exercise}[1]{\begin{center}\ensuremath{\blacktriangleright}\hspace{1em}\textbf{#1}\hspace{1em}\ensuremath{\blacktriangleleft}\end{center}} + +\DeclareRobustCommand{\exercise}[1]{% +\begin{center}\ensuremath{\blacktriangleright}\hspace{1em} +\begin{minipage}[t]{0.7\columnwidth} +\textbf{#1} +\end{minipage} +\hspace{1em}\ensuremath{\blacktriangleleft} +\end{center}} + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +\setlength{\fboxrule}{1.5pt} +\DeclareRobustCommand{\timeforbreak}[1]{% +\vspace{0.5cm} +\fbox{ +\begin{minipage}[t][3\height][c]{0.965\columnwidth} +\begin{center} +\textbf{ +\large +#1 +} +\end{center} +\end{minipage} +} +} + +\DeclareRobustCommand{\timeforabreak}[1]{\timeforbreak{#1}} +\DeclareRobustCommand{\timefortea}[1]{\timeforbreak{#1}} + +\DeclareRobustCommand{\timefornotes}[1]{% +\vspace{0.5cm} +\fbox{ +\begin{minipage}[t][6\height][t]{0.965\columnwidth} +\vspace{\baselineskip} +\begin{center} +\textbf{ +\large +#1 +} +\end{center} +\end{minipage} +} +} + +\DeclareRobustCommand{\codelisting}[1]{% +%\newline +\vspace{0.6cm} +\hrule height 1.5pt width 0.75\textwidth +\verbatiminput{#1} +%\vspace{-0.2cm} +\hrule height 1.5pt width 0.75\textwidth +\vspace{0.5cm} +} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + Added: schools/2008-Debrecen/handouts/ipppcompcourse.sty ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ schools/2008-Debrecen/handouts/ipppcompcourse.sty Tue Jul 17 13:22:11 2012 (r3824) @@ -0,0 +1,40 @@ +\ProvidesPackage{ipppcompcourse} +\RequirePackage{xspace,fancyvrb,url,amsmath,amssymb,maybemath} + +\DeclareRobustCommand{\bsl}{\char`\\} +\DeclareRobustCommand{\tld}{\char`\~} +\DeclareRobustCommand{\pipe}{\cmd{|}} +\DeclareRobustCommand{\ampr}{\cmd{\&}} +\DeclareRobustCommand{\hash}{\char`\#} +\DeclareRobustCommand{\spc}{\textvisiblespace} +\DeclareRobustCommand{\dblpipe}{\cmd{||}\xspace} +\DeclareRobustCommand{\dblampr}{\cmd{\&\&}\xspace} + +\DeclareRobustCommand{\cmd}[1]{\texttt{#1}} +\DeclareRobustCommand{\kbd}[1]{\texttt{#1}} +\DeclareRobustCommand{\gen}[1]{\emph{\textless{#1}\textgreater\xspace}} +\DeclareRobustCommand{\var}[1]{\texttt{\textdollar#1}} +\DeclareRobustCommand{\escvar}[1]{\texttt{\textdollar\{#1\}}} +\DeclareRobustCommand{\outp}[1]{\textsf{#1}} +\DeclareRobustCommand{\inp}[1]{\outp{\textdollar} \cmd{#1}} + +\DeclareRobustCommand{\texcmd}[1]{\texttt{\char`\\#1}} +\DeclareRobustCommand{\texenv}[1]{\texttt{\char`#1}} +\DeclareRobustCommand{\texopt}[1]{\texttt{\char`#1}} +\DeclareRobustCommand{\texpkg}[1]{\texttt{\char`#1}} +\DeclareRobustCommand{\texcls}[1]{\texttt{\char`#1}} +\DeclareRobustCommand{\texarg}[1]{\texttt{\char`#1}} +\DeclareRobustCommand{\texcommand}[1]{\texcmd{#1}} +\DeclareRobustCommand{\texoption}[1]{\texopt{#1}} +\newenvironment{snippet}{\Verbatim}{\endVerbatim} + +\DeclareRobustCommand{\smile}{\cmd{:)}\xspace} +\DeclareRobustCommand{\frown}{\cmd{:(}\xspace} + +%% C++ +\DeclareRobustCommand{\Rplus}{\protect\nolinebreak\hspace{-.01em}\protect\raisebox{.25ex}{\small\textbf{+}}} +\DeclareRobustCommand{\plusplus}{\Rplus\Rplus} +%\DeclareRobustCommand{\PP}{\plusplus} +\DeclareRobustCommand{\PP}{++} +%\DeclareRobustCommand{\CC}{C\plusplus\xspace} +\DeclareRobustCommand{\CC}{C\PP\xspace}
More information about the Rivet-svn mailing list |