CMS Analysis Grimoire

Concepts Technicalities Particular Subjects
CMS Software Obtaining Events High Energy Physics
Monte Carlo Simulation Event Displays  
Collision Data cmsRun Configuration SUperSYmmetry
Event Reconstruction Analysis Code  
Data Tiers Running Jobs
  ROOT Tricks Miscellanea
  Common Code Faults  
     
  Computing At cmslpc  

Concepts

CMS Software

Monte Carlo Simulation

Collision Data

Event Reconstruction

    • Various information about the detector e.g. alignment, beam spot location, jet energy scales, and other detailed calibration constants etc. are run- (time-) dependent, and must therefore be kept in a database, and require some kind of time tagging in order to look up. Selection of this database is done via the "global tag".
    • You need to use the correct global tag in your cmsRun configuration file, especially if performing any of the following tasks:
      • Re-reconstruction of objects from basic detector info (caloTowers, ...).
      • b-tagging and other tasks where alignment info is used.
      • Accessing info that depends on running conditions (geometry, jet energy corrections (JEC), ...).
    • Typically you can just take the newest global tag appropriate for data or MC (depends on the sample you're processing), and which is valid for the software version that you're using.
      • Global tags are cumulative, so a newer global tag will typically be valid even for older data runs, although the situation is more complicated for MC samples.
    • There is a specific recommendation for global tags to use for JEC.
    • Example to specify a global tag in your cmsRun config file:
    process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
    if isData:  process.GlobalTag.globaltag = 'GR_R_42_V12::All'
    else:       process.GlobalTag.globaltag = 'START42_V12::All'
    print " ++  globalTag           =", process.GlobalTag.globaltag.value()
    
    ( The isData value is something you have to determine yourself. )
  • Current Jet Energy Correction techniques include pile-up subtraction using L1fastjet.

Data Tiers

Technicalities

Obtaining Events

  • The list of all available datasets are available via the DBS data discovery page, or more recently the Data Aggregation System (DAS).
    • The file mover service lets you download any file known to DBS, via a web interface.
    • If you know the address of a storage element that hosts the file that you want, it is often much faster to download it directly from a terminal. You can do this with either the srmcp (mostly requires the v2 protocol now) or lcg-cp commands. Which one works sometimes depends on the site.
      • A list of site URLs...
      • The following is a list of known prefixes to go before the LFN name ( typically /store/... ) in order to download from various sites:
    Site Storage element prefix lcg-cp srmcp
    Aachen srm://grid-srm.physik.rwth-aachen.de:8443/srm/managerv2?SFN=/pnfs/physik.rwth-aachen.de/cms DONE DONE
    Gridka srm://gridka-dCache.fzk.de:8443/pnfs/gridka.de/cms/Prod Question DONE
    UCSD srm://srm-3.t2.ucsd.edu:8443/pnfs/t2.ucsd.edu/data3/cms/phedex DONE DONE
      srm://bsrm-1.t2.ucsd.edu:8443/srm/v2/server?SFN=/hadoop/cms/phedex DONE DONE
    IN2P3 srm://ccsrm.in2p3.fr:8443/pnfs/in2p3.fr/data/cms/data Question DONE
    INFN srm://t2-srm-02.lnl.infn.it:8443/pnfs/lnl.infn.it/data/cms Question DONE
    CERN srm://srm-cms.cern.ch:8443//srm/managerv2?SFN= DONE No
    CNAF srm://castorsrm.cr.cnaf.infn.it:8443 Question DONE
    FNAL srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN= Question DONE
    DESY srm://dcache-se-cms.desy.de:8443/srm/managerv2?SFN=/pnfs/desy.de/cms/tier2 DONE DONE
    MAITE srm://maite.iihe.ac.be:8443/pnfs/iihe/cms Question DONE
    UFL srm://srm.ihepa.ufl.edu:8443/srm/managerv2?SFN=/cmsdata Question DONE
    BARI srm://storm-se-01.ba.infn.it:8444/srm/managerv2?SFN=/cms Question DONE
    UK (IC) srm://gfe02.hep.ph.ic.ac.uk:8443/srm/managerv2?SFN=/pnfs/hep.ph.ic.ac.uk/data/cms Question DONE
    Florida srm://setenvsrm.ihepa.ufl.edu:8443/srm/managerv2?SFN=/raid Question DONE
    Vienna srm://hephyse.oeaw.ac.at:8446/srm/managerv2?SFN=/dpm/oeaw.ac.at/home/cms Question DONE
    RAL srm://srm-cms.gridpp.rl.ac.uk:8443/srm/managerv2?SFN=/castor/ads.rl.ac.uk/prod/cms Question DONE
    Please help fix/add to this list -- it seems to become deprecated easily!
      • Example of downloading via srmcp -- note that local files require four (!) slashes after the URL file:////:
    srcmp -debug -2 "srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/11/store/lfn/path/official_data.root" "file:///${PWD}/official_data.root"
    srcmp -debug -2 "srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/resilient/username/private_data.root" "file:///${PWD}/private_data.root"
    
    ( srmcp might sometimes not succeed without the -debug option. Don't ask why. )
      • Example of downloading via lcgcp:
    lcg-cp -b -D srmv2 -v "srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/11/store/lfn/path/official_data.root" "file:///${PWD}/official_data.root"
    lcg-cp -b -D srmv2 -v "srm://cmssrm.fnal.gov:8443/srm/managerv2?SFN=/resilient/username/private_data.root" "file:///${PWD}/private_data.root"
    
      • For downloading from FNAL dCache from a cmslpc terminal, it can be faster to use dccp (also doesn't require a GRID certificate):
    dccp /pnfs/cms/WAX/11/store/lfn/path/official_data.data $PWD
    dccp /pnfs/cms/WAX/resilient/username/private_data.data $PWD
    dccp dcap://cmsgridftp.fnal.gov:24125/pnfs/fnal.gov/usr/cms/WAX/resilient/username/private_data.data $PWD
    
  • To get a few particular events...
  • To merge EDM files...

Event Displays

  • Fireworks is an event display program that can run on your laptop.
    • The MaskedECALProducer plugin creates an EcalRecHitCollection which contains one recHit per masked channel. The "energy" of each recHit corresponds to the channel status divided by 10. You can obtain this by checking out:

      cd $CMSSW_BASE/src
      cvs co -d RecoParticleFlow/PostProcessing UserCode/RecoParticleFlow/PostProcessing
      

      and running the following module in a job that skims out events of interest:

      process.load("RecoParticleFlow.PostProcessing.maskedecalproducer_cfi")
      process.customProducts  = cms.Path( process.maskedECALProducer )
      

      You have to save the products in your event content to be able to load it in Fireworks:

      process.out.outputCommands.append('keep *_maskedECALProducer_*_*')
      

cmsRun Configuration

Analysis Code

Running Jobs

ROOT Tricks

  • For debugging purposes, it is often useful to see whether your ROOT file actually contains filled branches, and whether the contents of those branches make sense. This is especially true if you're trying to create and save your own products.

    First of all, the EDM products probably require some dictionaries to be loaded before ROOT can interpret their contents. You can do this by ensuring that you have a rootlogon.C macro in the current directory with at least the following contents:

    {
        gSystem->Load("libFWCoreFWLite");
        AutoLibraryLoader::enable();
        gSystem->Load("libDataFormatsFWLite");
    }
    
    Of course this means that you must have performed cmsenv in an appropriate CMSSW location.

    You can then load your EDM file in an interactive session:

    root -b myrootfile.root
    

    If you execute the .ls command, you will see the trees contained in your file. For a standard EDM file this will be:

      KEY: TTree    MetaData;1
      KEY: TTree    ParameterSets;1
      KEY: TTree    Parentage;1
      KEY: TTree    Events;1
      KEY: TTree    LuminosityBlocks;1
      KEY: TTree    Runs;1
    
    The Events tree contains per-event data, and the LuminosityBlocks and Runs trees contain data that are only stored per luminosity block or run.

    You can see the list of branches for a tree of your choice via TTree::Print(), which also accepts wildcards:

    Events->Print("*recoVertexs*")
    

    This for example produces:

    ******************************************************************************
    *Tree    :Events    :                                                        *
    *Entries :     6840 : Total =      1458855009 bytes  File  Size =  221062271 *
    *        :          : Tree compression factor =   6.60                       *
    ******************************************************************************
    *Branch  :recoVertexs_offlinePrimaryVertices__RECO.                          *
    *Entries :     6840 : BranchElement (see below)                              *
    *............................................................................*
    *Br    0 :recoVertexs_offlinePrimaryVertices__RECO.edm::EDProduct :          *
    *Entries :     6840 : Total  Size=      97626 bytes  File Size  =      15210 *
    *Baskets :        9 : Basket Size=      51200 bytes  Compression=   6.37     *
    *............................................................................*
    *Br    1 :recoVertexs_offlinePrimaryVertices__RECO.present :                 *
    *Entries :     6840 : Total  Size=       8543 bytes  File Size  =       1275 *
    *Baskets :        9 : Basket Size=      51200 bytes  Compression=   6.19     *
    *............................................................................*
    *Br    2 :recoVertexs_offlinePrimaryVertices__RECO.obj :                     *
    *Entries :     6840 : Total  Size=   58955811 bytes  File Size  =    7004211 *
    *Baskets :      491 : Basket Size=   25600000 bytes  Compression=   8.42     *
    *............................................................................*
    

    Typically the branches containing .obj correspond to the content fields. You can print out their contents for a few objects/events via TTree::Scan():

    Events->Scan("recoGenJets_ak5GenJets__HLT.obj.pt_");
    Events->Scan("recoVertexs_offlinePrimaryVertices__RECO.obj@.size()");
    

    Note the second syntax, where you can use the @ prefix in order to address properties of a container ( here a std::vector<reco::Vertex> ) instead of the constituent objects.

Common Code Faults

Computing At cmslpc

Particular Subjects

High Energy Physics

  • The Particle Data Group produces several staple references ranging from the basics of kinematics, probability and statistics, to techniques for colliders and detectors.
    • In particular the PDGLive page lists the measured and theoretical properties of various particles.

SUperSYmmetry

Miscellanea

-- SueAnnKoay - 14-Jun-2011

Edit | Attach | Watch | Print version | History: r62 < r61 < r60 < r59 < r58 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r62 - 2013-05-31 - SueAnnKoay
 
    • 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-2021 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