1. Flavor Tagging Main Page
  2. Tutorial
  3. root file with tagweight distributions in this sharepoint link. Also, there are official efficiency and mistag rate numbers in this link.


JetProb tagger can be used when SV0 fails. SV0 fails to have sufficient tracks, that is, be taggable, 60% of the time. The value returned should be zero.

It can also return -100 and -30.

Calibration is done by cutting at some value and then integrating above the cut. This can be done for many cuts to get a dependency on the value.

The lifetime tagger is applied to the same side and templates for ptrel for b,c, light are used to determine the purity and efficiency. System 8 from D0 is also used but this is not yet fully documented.

If one looks at Figure 1 of ATLAS-CONF-2010-099, for the plot of the signed decay length signficance, L/sigma(L), the spike at 0 was removed. The plot is made for simulated b, c and light flavour jets.

Information can be obtained from taggers with the Info and Info Plus objects. The number of tracks can be checked if they are nonzero but this does NOT work for SV0, only the other taggers.

The weight for all taggers is obtained with getFlavorTagWeight("SV0"). It is important to give an argument. It is not clear what happens if there is a misspelling:

Jet * myJet=myJetContainer[i];

double w=myJet->getFlavourTagWeight("SV0");

For the IP3D tagger and other "IP" taggers one can use (conceptually)

InfoPlus infop;

int ntrk=infop->numTrackInfo();

Code information (from tutorial)

Specifically the code for IP Taggers is:

const Analysis::IPInfoBase* infob=myJet->tagInfo<Analysis::IPInfoBase>("IP3D");

// Probability for each hypothesis


double pb=prob[0]; // b likelihood

double pu=prob[1]; // udsg likelihood

IPInfoPlus is not always on the AOD but can get more info, again for IP taggers:

const Analysis::IPInfoPlus* infop = myJet->tagInfo<Analysis::IPInfoPlus>("IPInfoPlus");

int ntrk=infop->numTrackInfo(); // number of contributing tracks

for (int i=0; i<ntrk; i++){

Analysis::IPTrackInfo trackInfo = infop->getTrackInfo(itinf);

// Individual contributions for weights

double w2D = trackInfo.trackWeight2D(); // for IP2D, also 3D and JP for IP3D and JetProb

// Impact parameter information

double d0val = trackInfo.d0Value(0); // also d0Significance and Z0


Additional Inforamation: SVInfoPlus

SVInfoPlus can be obtained from "SV0InfoPlus" in the argument to get the information (a correction on the tutorial mentioned above).

Note that the InfoPlus object will be zero if there are no track satisfying the criterion. One could then choose an orthogonal sample using jetweight. For us this would be considered another channel.

Detailed information on secondary vertex based taggers: SVInfoPlus

const Analysis::SVInfoPlus* info= myJet->taginfo<Analysis::SVInfoPlus>("SVInfoPlus");

Information about secondary vertex:

int ntrkv = info->getNGTrkInSvx() // number of good tracks in vertex

double mass=info->getMass(); // mass of secondary vertex

int n2t=info->getN2T(); // Number of two-track vertices

double efrc = info->getEnergyFraction(); // energy fraction svx/jet

Mods for SV0

Use the following to get the SV0 information

const Analysis::SVInfoPlus* info= myJet->taginfo<Analysis::SVInfoPlus>("SV0InfoPlus");

Perhaps all the rest follows!

MC Truth

const Trk::RecVertex& sv = info->getRecSvx(); // reference to svx

When one looks for a jet, see if it is labeled as b, then c then tau. If not it is light. To get the label

std::string lable="N/A";

const Analysis::TruthInfo *mcinfo=myJet->tagInfo<Analysis::TruthInfo>("TruthInfo");

if (mcinfo){



Label is "B", "C", "T", "N/A" for b,c,tau and usdg jets.

Distance to closest heavy flavor parton on tau lepton:

double drMinToB = mcinfo->deltaRMinTo("B");

double drMinToC = mcinfo->deltaRMinTo("C");

double drMinToT = mcinfo->deltaRMinTo("T");

Retrieving Calibration

To retrieve calibration to get efficiencies and rejection rates plus uncerrtainties use CalibrationDataInterface. Choose between the athena based and standalone tool.

CalibrationDataInterfaceROOT tool("SV0");

Analysis::CalibrationDataVariables test;

Analysis::CalibrationDataInterfaceROOT::Uncertainty uncsf=CalibrationDataInterfaceROOT::total

std::pair<double, double> sf= tool.getScaleFactor(test,flav,"5.72",uncsf);

std::pair<double, double> eff= tool.Efficiency(test,flav,"5.72",uncsf);

std::pair<double, double> effMC= tool.getMCEfficiency(test,flav,"5.72",uncsf);

Can also retrieve stat and sys error.


Example analyses

The file JetTagAna.cxx shows example analysis of jets.

The analysis ttbar lepton + jets used the weights to fit them to get cross section.

The dijet and jx MC samples are used for calibration but the jx samples need reweighting and are tricky to get right.

Flavor Tagging uses the BTaggingCalibrationDataInterface.

The plots in the sharepoint link can be interpreted by looking at the histogram file "JetWeight_Distributions.root". Go to a TBrowser and choose JetWeightDistributions.root -> SV0_plots ->noflip. Different pt bin histograms are given.

Note that this link can be reached by going to the Flavour tagging sharepoint page, then in the Discussion area on the left, choose the 7TeV Mistag Rate. "Mistag rates and weight distributions" is the entry of interest. The plots can be obtained by clicking on the top blog entry and then on "info" to see the attachments.

-- RichardStDenis - 2011-03-29

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2011-03-30 - RichardStDenis
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.
Ideas, requests, problems regarding TWiki? Send feedback