Search
uscms.org  uscms.fnal.gov  www 

LPC Computing

The Particle GUN

The ParticleGun is a very simple application using the G4Gun machinery to shoot single particles into the CMS detector. The generation is followed by simulation (OSCAR), digitization, DST creation and a Root tree maker (ORCA). The ParticleKillerGun is a special case where, in the simulation, all particles leaving the tracking volume are killed, i. e., truncated. This is realized by loading a special shared library into OSCAR.

Getting Started

In the following we assume that you have set up your environment correctly so that you can work within the cms framework. To do this execute the following lines:

source /afs/fnal.gov/files/code/cms/setup/cshrc uaf
setenv SCRAM_ARCH `scramv1 arch`

Note that the string scramv1 arch is bracketed with the so-called back-quote character - the one in the upper left corner of a standard keyboard.

At this point, we can attend to some preliminaries. This involves checking out some perl scripts and building some libraries, all of which are used later. To get the scripts and build the library which kills the particle once it goes beyond the tracking volume do the following:

cd /uscms_data/d1/$LOGNAME
# Connect up to the lpc CVS repository 
setenv CVSROOT :pserver:anonymous@cdcvs.fnal.gov:/cvs/lpc
# Get the needed scripts
cvs co ParticleGun
# Get the source code for the ParticleKiller library
scram project OSCAR OSCAR_3_6_5
cd OSCAR_3_6_5/src
cvs co OscarApplication
cd OscarApplication/ParticleKiller/src
scram b shared

There should be a flurry of activity after which you should find a file named libParticleKiller.so in the OSCAR_3_6_5/lib/$SCRAM_ARCH/ directory.

We will also need to compile the ExRootAnalysis and ExRootAnalysisReader packages that will allow us to generate and then read the Root tree to do some analysis of the output.

cd /uscms_data/d1/$LOGNAME
scram project ORCA ORCA_8_7_3
cd ORCA_8_7_3/src
eval `scram runtime -csh`
rehash
cmscvsroot ORCA
cvs co -r Tutorial_872 Examples/ExRootAnalysis
cvs co -r Tutorial_872 Examples/ExRootAnalysisReader
cd Examples/ExRootAnalysisReader
scram b shar

Webmaster | Last modified: Tuesday, 08-Jan-2008 13:09:08 CST