Tools
 

Home
Members
Meetings
Projects
Tools
MC
LPC Home
US CMS
PRS EGamma
CMS
Contacts

Ability to share analysis code is one of the cornerstones of success of any HEP experiment.

Below are the instructions for using ExRoot macros that are being developed in the LPC EGAMMA group. So far they include

bullet"vanilla" electron ID
bullettools for tracing brems and conversions
bulletshower shape variables for basic clusters

Many ExRoot tutorials are available, for example see http://agenda.cern.ch/fullAgenda.php?ida=a05677. Also, this link has description for most of the branches

The following instructions are specific to UAF

1. Set up CMS environment

setenv SCRAM_ARCH slc3_ia32_gcc323
source /afs/fnal.gov/files/code/cms/setup/cshrc uaf


2. Cerate working area

scram project ORCA ORCA_8_7_3
cd ORCA_8_7_3/src

3. Check out the code

setenv CVSROOT :pserver:anonymous@cdcvs.fnal.gov:/cvs/lpc
cvs login
(password is lpc)
cvs co Examples/ExRootAnalysis
cvs co Examples/ExRootAnalysisReader
cvs co Examples/ExRootMacros

4. Build the code and libraries

eval `scram runtime –csh`
cd Examples/ExRootAnalysis
scram b
cd ../ExRootAnalysisReader
scram b
cd ../ExRootMacros
scram b

5. Create a root-tuple from Digis (most common since DST changes)

cd ../ExRootAnalysis
        (edit orcarc_Digi to pont to your input file and enable/disable branches if you wish)
ExRootAnalysisDigi -c orcarc_Digi
        (output root file will appear in this directory)

6. Simple analysis using TTree::Draw

Now we can start ROOT and look at the data stored on the tree
      Note 1: under SLC3 system use root.exe to run ROOT
      Note 2: ROOT automatically locates the shared library
Start ROOT and load shared library:
root.exe
gSystem->Load("libExRootAnalysisReader");

Open ROOT tree file and do some basic analysis using Draw or TBrowser:
TFile::Open("test.root");
Analysis->Draw("Elec.CalET");
TBrowser browser;


7. Macro-based analysis

Package ExRootMacros contains a few useful macros and example programs. You can use the macros by loading
gSystem->Load("libExRootMacros");

eSelect - a class that calculates electron likelihood (currently in beta version). It needs branches EGSClus, EGClus and a track branch, for example TrkCmb.

test_e.C - is an example of how to use the eSelect class in analysis; can be run by
a command "root.exe test_e.C".

ebc_shape - a class that calculates shape variables for bacis clusters:
shape() method calculates sigma_phi and sigma_eta
profile() method calculates fraction of energy in two and three highest crystals

ebc_iso - a class that calculates isolation based on BasicIsland clusters. It takes as an argument a list of BasicClusters (i.e. two photons that you want to reconstruct pi0 from), calculates average eta and phi, and then sums all BasicIsland clusters, except of course the input ones, in a cone.

mceg_trace - selects "final" MC electrons/photons (i.e. after all brems and conversions)
particles are crudely extrapolated to the calorimeter surface. Returns TClonesArray
of objects type mceg (see comments in mceg.h)

test.C is a test program that demonstrates how you can work with ExRoot trees and the macros above.

 

Home | Members | Meetings | Projects | Tools | MC | LPC Home | US CMS | PRS EGamma | CMS | Contacts

Last updated: 02/27/06.