Vertex-Based Luminosity Tutorial

This section contains a quick runthrough of the analysis, starting from existing D3PDs. This is intended just to get through the code, without necessarily understanding everything. You will need a couple directories for storing things:

  • $TESTAREA : Location of the code.
  • $TESTAREA/Run : not strictly necessary, but this will give us a convenient place to run the code from, and store logfiles from the code execution.
  • $D3PD_STORAGE_DIR : Location of D3PDs. Note that some of these will be quite large, ~100GB!
  • $LUMINOSITY_DATA_DIR : This will contain most of the data and results produced by the code, including pileup corrections, visible cross sections, luminosity ntuples, timestamps, deadtime, etc.

Get Code

  • Checkout the code, as described above.
  • Setup your environment (this has to be done every time, so consider scripting this):
             source RootCore/scripts/

Get Data

  • Download a Monte Carlo D3PD using dq2-get (used for deriving the fake vertex corrections). Feel free to modify the directory structure, if need be.
             cd $D3PD_STORAGE_DIR
             mkdir user.beate.trkReco_VtxLumi.valid1.107499.singlepart_empty.recon.AOD.e603_s1469_r3560.v6_D3PD/
             cd user.beate.trkReco_VtxLumi.valid1.107499.singlepart_empty.recon.AOD.e603_s1469_r3560.v6_D3PD/
             dq2-get -H . user.beate.trkReco_VtxLumi.valid1.107499.singlepart_empty.recon.AOD.e603_s1469_r3560.v6_D3PD/
    Note that you will need a consistent naming scheme for the Monte Carlo samples. For example, I call the above sample mc_8TeV_17.2_VtxLumi_pythia8_pu. This is used many times in the code to reference a particular MC sample for the fake corrections.

  • Download the Van der Meer scan D3PD (used to calibrating sigma_vis).
             cd $D3PD_STORAGE_DIR
             mkdir user.spagan.user.beate.trkReco_VtxLumi.data11_7TeV.00182013.calibration_VdM.daq.VTXD3PD.v01_EXT0.v1.0.120408182149/
             cd user.spagan.user.beate.trkReco_VtxLumi.data11_7TeV.00182013.calibration_VdM.daq.VTXD3PD.v01_EXT0.v1.0.120408182149/
             dq2-get -H . user.spagan.user.beate.trkReco_VtxLumi.data11_7TeV.00182013.calibration_VdM.daq.VTXD3PD.v01_EXT0.v1.0.120408182149/
  • Download the mu scan D3PD (will be used for an actual luminosity measurement). Note that this will be used quite a bit later, so download it in the background and move on to the next step.
             cd $D3PD_STORAGE_DIR
             mkdir user.spagan.user.beate.trkReco_x185.data11_7TeV.00188951.calibration_VdM.daq.VTXD3PD.v00_EXT0.v1.0
             cd user.spagan.user.beate.trkReco_x185.data11_7TeV.00188951.calibration_VdM.daq.VTXD3PD.v00_EXT0.v1.0
             dq2-get -H . user.spagan.user.beate.trkReco_x185.data11_7TeV.00188951.calibration_VdM.daq.VTXD3PD.v00_EXT0.v1.0
  • Download a tarball containing all the extras needed for the analysis
             cd $LUMINOSITY_DATA_DIR
             xrdcp root://
            tar -xzvf LumiVtxStarter_v1.0.tar.gz
  • Edit the paths in GlobalSettings/Root/GlobalSettings.cxx to point to everything you just downloaded.

Process D3PDs

  • Process Monte Carlo D3PDs for the fake correction. This is done as a ROOT TSelector, which loops over the events in the D3PD, performs the Monte Carlo truth matching, and returns histograms with fake/real vertex counts vs. number of generated interactions.
             mkdir $TESTAREA/Run
             cd $TESTAREA/Run
             TrackingAnaMC -b -q -a -o $LUMINOSITY_DATA_DIR/VtxTruthMatchResults/mc_8TeV_17.2_VtxLumi_pythia8_pu/InDetTrackD3PD_results $D3PD_STORAGE_DIR/user.beate.trkReco_VtxLumi.valid1.107499.singlepart_empty.recon.AOD.e603_s1469_r3560.v6_D3PD/*root* >& log_D3PDMC.txt &
    Note that this takes quite a lot of time and computing power. Consider (1) running this as a batch job, and (2) splitting up the processing into subjobs, and hadd-ing the result files. An example of this can be found at $TESTAREA/D3PDMC/scripts/
  • Process Van der Meer scan D3PD. This is similar to the Monte Carlo D3PDs, except that instead of truth-matching, we just count vertices vs. lumiblock/pseudolumiblock, and make some simple histograms.

    • First, make sure that the flag INPUT_DATA is set in the Makefile (aside: the other option is INPUT_MC, if you want to perform a "luminosity measurement" on a Monte Carlo sample as a closure test).
                  emacs/vi/SublimeText/Word $TESTAREA/cmt/Makefile.RootCore
                  (Set PACKAGE_CXXFLAGS = -g -DINPUT_DATA)
    • Next, run the TSelector code:
                  cd $TESTAREA/Run
                  TrackingAnaData -b -q -o $LUMINOSITY_DATA_DIR/VertexCounts/182013/17.2-VtxLumi/InDetTrackD3PD_results $D3PD_STORAGE_DIR/user.spagan.user.beate.trkReco_VtxLumi.data11_7TeV.00182013.calibration_VdM.daq.VTXD3PD.v01_EXT0.v1.0.120408182149/*root* >& log_D3PDData.txt &
    • Once again, this code takes some time to run, so consider submitting it as a batch job and/or splitting it up into subjobs and hadd-ing.
  • Process mu scan D3PD. The command are identical to previous step, swapping out the appropriate filenames.

Derive Pileup Corrections

  • The masking corrections have to be derived first. The commands for running are (-t specifies the "tag" of the sample, i.e. data or MC, 7 or 8 TeV, and which vertex reconstructions settings):
             cd $TESTAREA/Run
             initializePuCorr -t data_7TeV_17.2_VtxLumi >& log_initializePuCorr_data.txt &
             initializePuCorr -t mc_8TeV_17.2_VtxLumi_pythia8_pu >& log_initializePuCorr_mc.txt &

  • Next, the fake corrections:
             cd $TESTAREA/Run
             initializeFakeCorrection -t mc_8TeV_17.2_VtxLumi_pythia8_pu >& log_initializeFakeCorrection.txt &

Run the van der Meer scan analysis

  • Make the directories for the results.
             cd $LUMINOSITY_DATA_DIR
             mkdir -pv VdMCalibration/182013/17.2-VtxLumi/
  • Run the code
             cd $TESTAREA/Run
             runVdM -r 182013 -s 17.2-VtxLumi -v >& log_runVdM.txt &
    This takes some time, so now is a good time for coffee.
  • Look at the results. The code includes a script to make a latex table:
             cd $TESTAREA/Run
             tables -r 182013 -s 17.2-VtxLumi -m NVtx

Calculate luminosity for the mu scan (run 188951)

  • Once you have downloaded the D3PD and processed it with D3PDData, run:
             cd $TESTAREA/Run
             LumiVtx -r 188951 -s 17.2-Tight >& log_LumiVtx.txt &
    Apologies if this doesn't work out of the box, I haven't had time to check it over yet.

-- DavidRYu - 03-Jul-2012

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2012-07-03 - unknown
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 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