Haciendo un analizador

En este paso vamos a hacer un analizador que corra sobre el archivo root que obtuvimos en el paso anterior (Particle Flow). En este proceso tenemos que usar la siguiente versión de CMSSW: CMSSW_3_3_6 Vamos a la carpeta src de esta versión:

cd CMSSW_3_3_6/src
cmsenv

Luego hacemos

svn co svn+ssh://andresib@svn.cern.ch/reps/cmsuniandes/Analysis/SusyAnalyzers

Al hacer esto se crea una carpeta nueva en "src" llamada: SusyAnalyzers. Entramos en esta carpeta y renombramos el directorio SusyOSLepton por SusyOSLeptoneliminable.

Luego movemos el directorio "SusyOSLepton_CMSSW_3_X" que se encuentra dentro de directorio "CMSSW_3_1_4/src/SusyAnalyzers/Tags" al directorio: "CMSSW_3_1_4/src/SusyAnalyzers/".

Hecho esto renombramos el directorio (que movimos); el nombre "SusyOSLepton_CMSSW_3_X" lo cambiamos por "SusyOsLepton". Entramos al directorio "SusyOsLepton" (que acabamos de renombrar) y vamos a la carpeta "test". En esa carpeta vamos a editar el archivo: "susyleptons.cfg.pat.py"

En ese archivo agregamos lo siguiente:

inputfile = 'file:/home/le-cabre/CMSSW_3_3_6/src/PhysicsTools/PFCandProducer/test/LM1_PF2PATandPATuple.root'

Es decir agregamos la ruta del archivo que obtuvimos al hacer Particle Flow. Luego vamos a la carpeta: "SusyOSLepton"

En mi caso tendría que hacer:

cd /home/le-cabre/CMSSW_3_3_6/src/SusyAnalyzers/SusyOSLepton

y compilamos

scram b -j 4

Obtenemos algo similar a lo siguiente:

Reading cached build data
>> Local Products Rules ..... started
>> Local Products Rules ..... done
>> Entering Package SusyAnalyzers/SusyOSLepton
>> Updating python symlinks.
   python/SusyAnalyzers/SusyOSLepton/python -> src/SusyAnalyzers/SusyOSLepton/python
   python/SusyAnalyzers/SusyOSLeptoneliminable/python -> src/SusyAnalyzers/SusyOSLeptoneliminable/python
   python/SusyAnalyzers/TestPf_CMSSW_3_X/python -> src/SusyAnalyzers/TestPf_CMSSW_3_X/python
Entering library rule at SusyAnalyzers/SusyOSLepton
>> Compiling /home/le-cabre/CMSSW_3_3_6/src/SusyAnalyzers/SusyOSLepton/src/SusyOSLepton.cc 
>> Building shared library tmp/slc4_ia32_gcc345/src/SusyAnalyzers/SusyOSLepton/src/SusyAnalyzersSusyOSLepton/libSusyAnalyzersSusyOSLepton.so
@@@@ Checking shared library for missing symbols: libSusyAnalyzersSusyOSLepton.so
@@@@ ----> OK, shared library FULLY-BOUND (no missing symbols): libSusyAnalyzersSusyOSLepton.so
Leaving library rule at SusyAnalyzers/SusyOSLepton
@@@@ Running edmWriteConfigs for SusyAnalyzersSusyOSLepton
--- Registered EDM Plugin: SusyAnalyzersSusyOSLepton
>> Leaving Package SusyAnalyzers/SusyOSLepton
>> Package SusyAnalyzers/SusyOSLepton built
@@@@ Refreshing Plugins:EdmPluginRefresh

una vez compilamos corremos el analizador

cd test/
cmsRun susyleptons.cfg.pat.py

deberiamos obtener algo como lo siguiente:

25-Feb-2010 10:48:36 COT  Initiating request to open file file:/home/le-cabre/CMSSW_3_3_6/src/PhysicsTools/PFCandProducer/test/LM1_PF2PATandPATuple.root
25-Feb-2010 10:48:54 COT  Successfully opened file file:/home/le-cabre/CMSSW_3_3_6/src/PhysicsTools/PFCandProducer/test/LM1_PF2PATandPATuple.root


*****  JOB CONFIGURATION  ******

- Muon Collection Label     :   cleanLayer1Muons
- Electron Collection Label :   cleanLayer1Electrons
- Jet Collection Label      :   cleanLayer1JetsIC5
- MET Collection Label      :   layer1METsIC5

***  Selection Cuts :

Muon Isolation Cut (MuonIsoCut)                 -> ON   =  0
Muon Pt Cut (MuonPtCut)                         -> ON   =  2
Muon Eta Cut (MuonEtaCut)                       -> ON   =  2.1
Muon Track Chi2/DoF (MuonChiDoFCut)             -> ON   =  10
Muon d0 Cut (Muond0Cut)                         -> ON   =  0.2
Muon number-of-tracks Cut (MuonTrkCut)          -> ON   =  11
Muon HCal-Energy-Deposition Cut (MuonHCalECut)  -> ON   =  6
Muon ECal-Energy-Deposition Cut (MuonECalECut)  -> ON   =  4

Electron Pt Cut (ElecPtCut)                      = 2
Electron Eta Cut (ElecEtaCut)                    = 2.5
Electron Isolation Cut (ElecIsoCut)              = 0
Electron d0 Cut (Elecd0Cut)                      = 0.2

Number-of-Electrons Cut (ElectronCut)            =  1
MET Cut (METCut)                                 =  50
Number-of-Jets Cut (JetNumCut)                   =  3
Jet Pt Cut (JetPtCut)                            =  50
Jet Eta Cut (JetEtaCut)                          =  2.4
Jet ElectroMagnetic-Fraction Cut (JetEMFCut)     =  0.1


Begin processing the 1st record. Run 1, Event 1, LumiSection 1 at 25-Feb-2010 10:48:56 COT
Event run : 1
Event number : 1
Begin processing the 2nd record. Run 1, Event 2, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 2
Begin processing the 3rd record. Run 1, Event 3, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 3
Begin processing the 4th record. Run 1, Event 4, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 4
Begin processing the 5th record. Run 1, Event 5, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 5
Begin processing the 6th record. Run 1, Event 6, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 6
This event passed SL electron SR SR leptons
This event passed SL electron SR PF leptons
This event passed SL electron PF PF leptons
This event passed SL electron PF sr leptons
Begin processing the 7th record. Run 1, Event 7, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 7
Begin processing the 8th record. Run 1, Event 8, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 8
Begin processing the 9th record. Run 1, Event 9, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 9
Begin processing the 10th record. Run 1, Event 10, LumiSection 1 at 25-Feb-2010 10:48:57 COT
Event run : 1
Event number : 10
25-Feb-2010 10:48:58 COT  Closed file file:/home/le-cabre/CMSSW_3_3_6/src/PhysicsTools/PFCandProducer/test/LM1_PF2PATandPATuple.root

=============================================

MessageLogger Summary

 type     category        sev    module        subroutine        count    total
 ---- -------------------- -- ---------------- ----------------  -----    -----
    1 fileAction           -s AfterFile                              2        2
    2 fileAction           -s PoolSource:sourc                       1        1

 type    category    Examples: run/evt        run/evt          run/evt
 ---- -------------------- ---------------- ---------------- ----------------
    1 fileAction           pre-events       PostEndRun       
    2 fileAction           pre-events                        

Severity    # Occurrences   Total Occurrences
--------    -------------   -----------------
System                  3                   3

Al final se debe de obtener un archivo llamado "OSLepton_LM0.root". Al abrirlo con root se deberían ver varios histogramas. En principio tenemos que modificar el código del analizador para obtener histogramas de nuestro interes.

El siguiente paso es: Correr todo el proceso en GRID

-- AndresCabrera - 09-Jun-2010

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2010-06-09 - AndresCabrera
 
    • 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