9.6 Analysis Example Of CRAFT Data

Complete: 5
Detailed Review Status

Contents


Where Is The Data?

  1. the CMS Dataset Bookkeeping System (DBS) is a database and user API that indexes data for the CMS Collaboration
  2. the interface location is https://cmsweb.cern.ch/dbs_discovery/
    1. it provides three ways to find data: aSearch, Navigator and Runs
    2. the aSearch option uses Query Language (QL). To find CRAFT data
      find dataset where dataset like /Cosmics/Commissioning08-PromptReco*
      
      Several datasets will appear from this query. The one of interest is
      /Cosmics/Commissioning08-PromptReco-v2/RECO
      
    3. CRAFT data is currently being reprocessed in the following dataset
      /Cosmics/Commissioning08_CRAFT_ALL_V4_ReReco-v1/RECO
      
    4. the Runs option includes Data Quality information
  3. to select good runs
    1. https://twiki.cern.ch/twiki/bin/view/CMS/DQMSubDetectors
    2. https://twiki.cern.ch/twiki/bin/view/CMS/RunRegistry-CRAFT

Help for further information WorkBook - Locating Data Samples

Muon Collections

  • reconstruction for cosmic muons can be divided in 4 types
    1. lhc reco reconstructs the muon candidates starting from the beam spot. This is wrong for cosmic muons, because we know they traverse the CMS Detector from top to bottom, but it's useful if we want to study the cosmic muons as a background for LHC collisions
    2. cosmic reco reconstructs the muon candidates starting from the top of the CMS Detector, thus taking properly into account the energy loss. It has other differences with respect to the lhc reco, like no vertex constraint
    3. 1-leg reco considers the cosmic muon as a single candidate, providing the best resolution that one can achieve
    4. 2-leg reco splits the cosmic muon in two legs. This type is a good handle for measuring muon resolution, by comparing the momentum of both legs at a common (or close enough) point

  • this figure illustrates the 1-leg and 2-leg cases, and also shows the direction considered for the lhc and cosmic reconstructions

  • Some commonly-used collections available in the prompt reconstruction and the 1st reprocessing of CRAFT data are listed in the table below. For a full list of available collections and for changes in collection names in sebsequent reprocessings, see SWGuideCosmicMuonReco.

reco::MuonCollection reco::TrackCollections Description
muons globalCosmicMuons, cosmicMuons, ctfWithMaterialTracksP5 Enable all detectors and using 2-leg option
muons1LegBarrelOnly globalCosmicMuons1LegBarrelOnly, cosmicMuons1LegBarrelOnly, ctfWithMaterialTracksP5 Enable barrel-only detectors and using 1-leg option
muonsNoDriftBarrelOnly globalCosmicMuonsNoDriftBarrelOnly, cosmicMuonsNoDriftBarrelOnly, ctfWithMaterialTracksP5 Enable barrel-only detectors (with "No-Drift" option of the DT local reco algorithm) and using 1-leg option
muonsBarrelOnly globalCosmicMuonsBarrelOnly, cosmicMuonsBarrelOnly, ctfWithMaterialTracksP5 Enable barrel-only detectors and using 2-leg option
muonsEndCapsOnly globalCosmicMuonsEndCapsOnly, cosmicMuonsEndCapsOnly, ctfWithMaterialTracksP5 Enable endcap-only detectors and using 2-leg option
Muon candidates stored in these 3-in-1 reco::MuonCollections (1st column; names starting with "muons") have links to reco::Track objects containing a standalone-muon track (cosmicMuons* collections), tracker-only track (ctfWithMaterialTracksP5 collection), and to a combined global-muon track (globalCosmicMuons* collections). These "summary" collections of reco::Muons are similar to muon collections used in Monte Carlo prodictions of various physics samples, whereas reco::Muons collections outlined in the previous tables are more limited in scope (GLBMuons have one single link to a global muon, and STAMuons have one single link to a standalone muon).

  • one of the first things that can be checked for the different cosmic muon collections is the expected resolution. You can find such comparison here

  • the code snippet below shows
    • how to create a handle of a muon collection, in this case "GLBMuons"
    • how to access information of the global muon, like muon->pt()
    • how to access the combined muon link with ref = muon->combinedMuon()
    • how to access the standAlone muon link with ref = muon->standAloneMuon()
    • how to access the track link with ref = muon->track()
    • how to access values at the innermost and outermost positions, like ref->innerPosition().X()
edm::Handle<MuonCollection> muonColl;
event.getByLabel("GLBMuons", muonColl);

for (MuonCollection::const_iterator muon=muonColl->begin(), muonCollEnd=muonColl->end();
muon!=muonCollEnd; ++muon)
{
  std::cout << "globalMuon pt [GeV]: " << muon->pt() << std::endl;
  if (muon->combinedMuon().isNonnull()) {
    reco::TrackRef ref = muon->combinedMuon();
    std::cout << "combinedMuon number of hits: " << ref->numberOfValidHits() << std::endl;
  }

  if (muon->standAloneMuon().isNonnull()) {
    reco::TrackRef ref = muon->standAloneMuon();
    if (ref->innerOk())
      std::cout << "standAloneMuon inner x [cm]: " << ref->innerPosition().X() << std::endl;
  }

  if (muon->track().isNonnull()) {
    reco::TrackRef ref = muon->track();
    if (ref->outerOk())
      std::cout << "track outer pt [GeV]: " << ref->outerPt() << std::endl;
  }
}

  • the RECO track content can be found in the TrackBase.h and TrackExtra classes
    • TrackBase.h has the information at the reference point of the track (Vx, Vy, Vz), typically the point of closest approach to the beam spot
    • TrackExtra.h has additional track information, mostly at the innermost and outermost positions

Help for further information WorkBook - Introduction to muon reconstruction

Data Access Example

  1. download material
    ssh lxplus
    mkdir tutorial
    cd tutorial
    tar -xvzf ~piedra/public/craft.tgz
    
  2. get CMSSW_ 2_1_10
    source cms_setup.csh 2_1_10
    mv ../../UserArea .
    
  3. compile
    scramv1 b
    
  4. run
    cd UserArea/CraftAnalysis/test/
    cmsRun craftAnalysis.py
    
  5. draw example (output)
    root -l draw.C
    

Running On The GRID

  • prerequisites
  • use the CMS Remote Analysis Builder (CRAB) for job submission
  • in the crab.py configuration file one can read the dataset name that we found using DBS, the number of jobs to be submitted and the directory (craft) at which we will copy the output of this example
    [CMSSW]
    datasetpath=/Cosmics/Commissioning08-PromptReco-v2/RECO
    pset=CMSSW_2_1_10/src/UserArea/CraftAnalysis/test/craftAnalysis.py
    total_number_of_events=20000
    events_per_job=10000
    output_file=test.root
    
    [USER]
    ui_working_dir=craft
    return_data=1
    

  1. prepare CRAB
    cd tutorial
    source crab_setup.csh 2_1_10
    
  2. create and submit jobs
    crab -create
    crab -submit -continue craft
    
  3. how are my jobs doing?
    crab -status -continue craft
    
  4. get the output
    crab -getoutput -continue craft
    hadd test.root craft/res/test_*.root
    

Help for further information WorkBook - Running CMSSW code on the Grid using CRAB

Tutorial

  • talk given during the CMS Week: Offline Meetings (08-12 December 2008)


Reviewer/Editor and Date (copy from screen) Comments
KatiLassilaPerini - 18 Mar 2008 created the template page
GiorgiaMila - 29 Apr 2008 added the muon reconstruction analysis example
JonatanPiedra - 16 Dec 2008 replaced GRUMM example by CRAFT example

Responsible: JonatanPiedra - 16 Dec 2008
Last reviewed by: ChangLiu - 14 Feb 2008

Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r13 - 2009-12-03 - KatiLassilaPerini
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

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