TrackCalib Package

TrackCalib wass created as tool for creating tracking efficiency correction tables allowing for user-defined track-quality cuts, binning and variable combinations. It also allows to check 1D- and 2D-efficiency dependencies for many variables.

Questions of comments regarding the TrackCalibTool contact authors michael.kolpin@cernNOSPAMPLEASE.ch and renata.kopecnan@cern.ch[renata.kopecnan@cern.ch]]. More general information regarding tracking efficiencies can be found in the Tracking efficiencies twiki. Also see the Tutorial talk at A&S week, 06.04.2017

TrackCalib setup instructions

TrackCalib will be integrated to the next release of Urania. To get Urania, standart setup is used:

lb-dev Urania/v7r0
cd UraniaDev _v7r0
git lb-use Urania
git lb-checkout Urania/master TrackCalib

make configure
make

More detailed instructions can be found in the Git4LHCb twiki.

TrackCalib running instructions

In order to run the TrackCalib package, a bash sheel needs to be loaded

./run bash --norc

The package is run from the Urania folder.

Minimal preparation script execution:

python scripts/CreateTrackEffTables.py "2016_25ns"

This loops over both MC and Data, all three methods (Long, Velo and T), create a reduced tuple (with multiplicity weights), Fit in the _default binning, and create plots of the results. The year_conditions define the dataset used. It is possible to also run step-by-step or to add other options.

Running step-by-step

The three sub-scripts can be run separately by specifying:

--Prepare: only runs the Prepare script, reducing the dataset to specified variables, weighting MC in multiplicity, and applying additional matching criteria

--Fit: creates the efficiency fits in a given set of variables, mode, and method with an earlier created tuple

--Plot: Plots the efficiencies from the fit, and creates data/MC correction tables in all 2D variables

Additional options

There are several additional options.

Global options

-v: verbose printout

-vROOT: sets ROOT printout level to kInfo, default:kFatal

-mode "MC/Data": specify to only run over Data or MC; default: both

-simVer "SimXYZ": defines the Sim version of the MC; default: Sim09b

-method "<method1>,<method2>": specify method to use, separate by comma; default: Long, T, and Velo

-variables "<var1>,<var2>,<var3>": additional variables for which the efficiency dependency is evaluated; default: P, ETA, nPVs, nSPDHits

-variables2D "<var1>-<var2>,<var3>-<var4>": additional sets of 2D variables for which the efficiency dependency is evaluated. Minus connects the variables within a set, comma separates sets; default: P-ETA

-matchCrit "Probe:<criterion1,criterion2>;Global:<criterion3>": Define tighter matching criterion (when is an event considered efficient), e.g. Matched_GhostProb < 0.3, separation as above

-polarity "MagUp/MagDown": specify to run only over MagUp or MagDown. Does not affect the Prepare script

Hence, for example to run over 2016 collision data only, use Long and Velo methods for PT and ETA with GhostProb &lt 0.5, run:

python scripts/CreateTrackEffTables.py "2016_25ns" -mode "Data" -method "Long, Velo" -variables "PT,ETA" -variables2D "PT-ETA" -matchCrit "Probe: GhostProb<0.3;Global:GhostProb<0.3"

'Prepare' script options

-noWeight: set to disable reweighting MC to fit the Data multiplicity

-weightVar: reweighting MC to fit the Data multiplicity in the weighting variable; default = "nSPDHits"

-cuts "Probe:<cut1,cut2,cut3>;Tag:<cut4>;Global:<cut6,cut7>": Define additional cuts applied to the probe/tag muon as well as global cuts (e.g. Jpsi cuts, runNumber, etc.). Separate individual cuts by comma, categories by semicolon

-maxEntries 1234567: Sets the maximum number of events used per method and charge. Needed to limit memory consumption of fit script; default: 4.e7

As an example, running Prepare script over MC only, Sim08h with 100.000 entries using only T-station method without multiplicity reweighting with GhostProb &lt 0.3 requires the following command:

python scripts/CreateTrackEffTables.py "2015_50ns" -mode "MC" -simVer "Sim08h" -noWeight -method "T" -maxEntries "100.000 --Prepare"

'Fit' script

-binning "<var1>:<binborder1>,<binborder2>,<binborder3>;<var2>:<binborder4>,...": binning scheme used for the customised variables defined as above. Bin borders separated by comma, variable+binning sets by semicolon.

-simFit "True/False": controls the use of a simultaneous fit to matched and failed events to evaluate efficiency. Should be set to False for binnings/datasets with low statistics; default: True

-binnedFit: Sets the use of a binned fit to evaluate efficiency. Should be set to True for datasets with large statistics; default: False

-binsInFit 123: Sets the number of bins in the fit; default: 100

Running Fit script for both MC and 2016 data, using Long method for PT and ETA with bins of PT 0MeV-1000MeV-5000MeV and standard ETA bins

python scripts/CreateTrackEffTables.py "2016_25ns" -variables "PT,ETA" -binning "PT:0,1000,5000" --Fit"

'Plot' script

-vartitles "<var1>:<vartitle1>;<var2>:<vartitle2>": defines the axis title for the custom variables as defined above, standard TLatex synthax can be used

-maxError: Sets the maximal acceptable error for the efficiencies; default: 0.03. If the error is >maxError, the efficiency is set to 1 +- 5%

-maxDeviation: Sets the maximal deviation of the efficiency from 1; default: 0.3. If the deviation is >maxDeviation, the efficiency is set to 1 +- 5%

-ignoreBins "<var1>-<var2>:<bin1var1>-<bin1var2>,<bin2var1>-<bin2var2>,...": Sets which variable bins should be set to 1+-5%; default: P-ETA:1-2,5-1. Given bins are set to 1 +- 5%

In order to set the efficiency to 1+-5% in the first bin of PT-ETA as well as for any bit that has error larger than 2%, run:

python scripts/CreateTrackEffTables.py "2016_25ns" -variables2D "PT-ETA" -vartitles "PT:P_T" -ignoreBins "PT-ETA:1-1" -maxError 0.02 --Plot"

Adding global variables

Note that adding non-standard global variables requires manual changes in Prepare.py.

Standard global variables are:

totCandidates, nTracks, nLongTracks, nTTTracks, nVeloTracks, nPVs, nSPDHits, nVeloClusters, nITClusters, nOTClusters, nTTClusters, nRich1Hits, nRich2Hits, nMuonTracks, matched, Polarity

In case of doubt contact the authors.

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2017-11-07 - RenataKopecna1
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

  • Edit
  • Attach
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