Author Archives: Thomas

About Thomas

:)

Latex – Splitting the page into two colomns

To make the whole document to have multiple columns –  \documentclass[11pt,twocolumn]{article}

To start a new page with two column – \twocolumn

To define the distance between the two columns – \setlength{\columnsep}{distance}

If you need a line to separate the columns – \setlength{\columnseprule}{thickness}

 

 

For more info – http://texblog.wordpress.com/2007/08/11/creating-two-columns-in-article-report-or-book/

 

http://texblog.wordpress.com/2007/08/01/placing-figurestables-side-by-side-minipage/

Advertisements

Leave a comment

Filed under LaTeX

Luminosity and LHC beam parameters

A good paper on luminosity and LHC beam parameters  Luminosities

Leave a comment

Filed under LHC

Acoplanarity

Here is a small article about “Acoplanarity and beam line rotation”.

http://www.slac.stanford.edu/BFROOT/www/Detector/Trigger/software/L3TFilters/rotation.ps

 

Leave a comment

Filed under Physics

Pythia6 tips

The PYLIST(12) subroutine of Pythia will give a list of all decay channels with their IDC numbers and many more details. The output of the PYLIST(12) is available here

The PDG standard, with the local Pythia extensions, is referred to as the KF particle code.  This code you have to be thoroughly familiar with. It is described below.  The KF code is not convenient for a direct storing of masses, decay data, or other particle properties, since the KF codes are so spread out.  Instead a compressed code KC between 1 and 500 is used here. A particle and its antiparticle are mapped to the same KC code, but else the mapping is unique. To generate processes 14, 18 and 29, for instance, one needs MSEL=0 MSUB(14)=1 MSUB(18)=1 MSUB(29)=1 MSUB(ISUB) = 1 is the command to switch on process ISUB Selection of kinematics cuts in the CKIN array. To generate hard scatterings with 50 GeV ≤ p⊥ ≤ 100 GeV, for instance, use CKIN(3)=50D0 CKIN(4)=100D0

Leave a comment

Filed under Pythia

Memory Leak in Action

The most important and interesting thing we come across while learning about pointers is memory leak. If we declare a pointer and forgets to delete it manually, it will stay in existence and can cause memory leak. I do not know how many of you have tried to see it in action. However I wanted to see it and so I wrote this small code:

//The program illustrates the destructive power of pointers
//Author:Thomas Mathew tm1729@gmail.com
#include "iostream"
using namespace std;

int main()
{
   int i=0;
   while (i!=-1){
         double *pi = new double;
         if (i%100000==0) { cout<<"Pointer : "<<i<<" Address: "<<pi<<endl;}
         i++;
         }
   return 0;
}

To see the effect of the code on memory consumption, have a look at the system monitor display

As you can see the memory consumption increases so rapidly and once it uses 100% RAM, it starts to use up Swap. And as soon as I terminate the program, its all back to normal. The ripple effect is due to the occasional cout command. You can change the frequency of cout and see how fast/slow memory consumption increases.

 

 

3 Comments

Filed under C++

Relativistic Kinematics

A very good material on Relativistic Kinematics for particle physicists Kinematics for PP

You can also access it from http://pdg.lbl.gov/2008/reviews/kinemarpp.pdf

 

1 Comment

Filed under Physics

Using the rupee symbol is LaTeX

First download tfrupee.zip from here

unzip tfrupee.zip  
cd tfrupee/  
sudo cp -rv fonts/type1/tfrupee/ /usr/share/texmf/fonts/type1/  
sudo cp -rv fonts/afm/tfrupee/ /usr/share/texmf/fonts/afm/  
sudo cp -rv fonts/tfm/tfrupee/ /usr/share/texmf/fonts/tfm/  
sudo cp -rv fonts/map/dvips/tfrupee/ /usr/share/texmf/fonts/map/dvips/  
sudo cp -rv fonts/source/tfrupee/ /usr/share/texmf/fonts/source/  
sudo cp -rv tex/latex/tfrupee/ /usr/share/texmf/tex/latex/  
sudo texhash  
sudo updmap-sys --enable Map=tfrupee.map

Test it with this simple tex file.

\documentclass[12pt]{article}  
\usepackage{tfrupee}  
\begin{document}  
\rupee~7,000  
\end{document}

Courtesy: http://tex.stackexchange.com/questions/874/indian-rupee-symbol

Leave a comment

Filed under LaTeX