π0→γ γ Studies

Overview

We want to do a general study to visualize to see if there is any obvious correlation between ES and EE for π0 calibration.

MC Generation

Start by generating a sample of pi0s. To do this, I used CMSSW_5_3_3. The first thing to do is generate a config file, follow these (somewhat out of date) instructions. When you run the cmsDriver.py command, you can use a sort of "template" file, many of which can be found in CMSSW. The recommended procuedure is to run RECO seperately. I ran the following command:

cmsDriver.py Configuration/Generator/python/SinglePiPt1_cfi.py -s GEN,SIM,DIGI,L1,DIGI2RAW --conditions auto:mc --datatier 'GEN-SIM-DIGI' --eventcontent RAWSIM -n 10 --no_exec

-s specify which steps of the MC simulation you want to the MC simulation to run through
--conditions auto:mc specify the global tag
-n number of events
-- no_exec don't execute yet, just make the config file

Additional details are given in the workbook.

Note that the config file SinglePiPt1 _cfi.py apparently generates pi+ ( PID number 211), not pi0 (PID number 111) which is what I need. So this can be manually changed by editing the generated config file, which will have a name like SinglePiPt1 _cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW.py. Change the line:           PartID = cms.vint32(211) to say => PartID = cms.vint32(111)

Set AddAntiparticle(True) to AddAntiparticle(False). The program seems to get confused with PID -111, since the Pi0 is it's own antiparticle.

Finally, run the command using

cmsRun SinglePiPt1_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW.py

Viewing root file in TBrowser

The above cmsRun command will generate a root file with the name SinglePiPt1 _cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW.root.To view this file, you need to first load fwlite. In your home directory, put the following information in a rootlogon file.

{
// Set up FW Lite for automatic loading of CMS libraries
// and data formats. As you may have other user-defined setup
// in your rootlogon.C, the CMS setup is executed only if the CMS
// environment is set up.
//
TString cmsswbase = getenv("CMSSW_BASE");
if (cmsswbase.Length() > 0) {
//
// The CMSSW environment is defined (this is true even for FW Lite)
// so set up the rest.
//
cout << "Loading FW Lite setup." << endl;
gSystem->Load("libFWCoreFWLite.so");
AutoLibraryLoader::enable();
gSystem->Load("libDataFormatsFWLite.so");
gSystem->Load("libDataFormatsPatCandidates.so");
}
}

Run the file when you start root, root $HOME/rootlogin.C, which loads FWLite.

RECO

Now the MC data need to be reconstructed. Renerate the cmsDriver file in a similar fashion as the MC file was generated:

cmsDriver.py reco -s RAW2DIGI,RECO --filein SinglePiPt1 _cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW.root --fileout SinglePiPt1 _cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_OUT.root --conditions auto:mc --no_exec

If a change is made in input/ouput file, just adjust it using the --filelin or --fileout commands.Be sure to specify that the file is contained locally by making the filename start with 'file:'

fileNames = cms.untracked.vstring('file:SinglePiPt1_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW.root')

Also set the number of events.

Then run the command:

cmsRun reco_RAW2DIGI_RECO.py

Visualization in ECAL/ES

Once the RECO root file is generated, the interesting question is what the output looks like. Start by first adding particle flow CMSSW packages

addpkg RecoParticleFlow/Configuration
addpkg RecoParticleFlow/PFRootEvent
scram b -j 4

Convert RECO to display format

Once you have done this, you need to run reco to display. Go to the directory:

CMSSW_5_3_3/src/RecoParticleFlow/Configuration/test/

Edit the input file name in the source file, RecoToDisplay _cfg.py

:

 
fileNames = cms.untracked.vstring(
    'file:/afs/cern.ch/user/b/bcarlson/CMSSW_5_3_3/src/SinglePiPt1_cfi_py_GEN_SIM_DIGI_L1_DIGI2RAW_OUT.root'
     ) 

Finally cmsRun RecoToDisplay _cfg.py

Note the output file name is display.root

Setting up PFRootEvent

The viewer I have been using is called PFRootEvent. The documentation is helpful to a point, but out of date. Some key pointers are that the files pointed to in the twiki page are not available in CMSSW, but some other comparable files are available. PFRootEvent (or other folders) is an outdated filesystem, and it seems to be the case that if you remove the 'CMS.' from the directory names given in the twiki things work. Don't look for RecoParticleFlow/PFRootEvent/test/Macros/tauBenchmarkDisplay_famos.C but instead look for jetDisplay_famos.C in the same directory. You then need to make sure that jetDisplay_famos.C actually points to the control file, which is the file particleFlow.opt. This means editing the line defines the opt file to point to the particleFlow control file:

string opt = "../particleFlow.opt";

Once you have made all of these modifications, you can run the program using root, root -x -l jetDisplay_famos.C, which makes the nice plots shown on the twiki page.

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2012-09-20 - BenCarlson
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback