v00-00-80)d0root_btag's root-tuples
(version 7.2) (1)p14) (2),
orBF_TRACK" branch that
holds all the charged tracks for the event. Modified d0root-tuples have
been produced for all LP03 dimuon data by Xiaojian Zhang (currently
working on putting these changes in d0root_btag's CVS).
d0correct. If you are working
with older TMBTrees (produced with p13/p14) you probably want to use an
older tag.
% setup D0RunII
p14.06.00 % newrel -t p14.06.00 mywork_area
% cd mywork_area
% d0setwa
% ln -s
/d0dist/dist/releases/p14.06.00/tmb_analyze/macros macros
% cp macros/MakeTMBTreeClasses_so.C .
% root
root[] .x MakeTMBTreeClasses_so.C (that takes a minute or two,
don't be scared) root[] .q
% addpkg bflavor_tag v00-00-80
(or later tag; this is the tagging
code)
bflavor_tag/macros/
directory: % cp
bflavor_tag/macros/run_example_TMBtrees.C . (this
is an example of "user code")% cp
bflavor_tag/macros/run_example_TMBtrees.h . % cp
bflavor_tag/macros/Make_JPsi_TMB.C . (the "makefile")
Now it's time to run:% root Make_JPsi_TMB.C
d0root_btag's root-tuples:(description of example macro here)% cp
bflavor_tag/macros/run_example_d0root_btag.C .
(this is an example of "user code")% cp bflavor_tag/macros/run_example_d0root_btag.h
.
% cp bflavor_tag/macros/keepEvent.C
.
(continuation, I've put the B selection cuts in a separate file)% cp
bflavor_tag/macros/fit_mass_fraction.C .
(root macro for fitting the B mass distribution)% cp
bflavor_tag/macros/Make_d0root_btag . (the "makefile")
Now it's time to run:% root Make_d0root_btag.C
// this line screws up the include path - put it before we define
the include's
gROOT->ProcessLine(".x MakeTMBTreeClasses_so.C");
- Make
sure to define the include path name:TString incpath = gSystem->GetIncludePath();
incpath.Append(" -I$SRT_LOCAL/include -I$SRT_PUBLIC_CONTEXT/include");
gSystem->SetIncludePath(incpath.Data());
Add the following header file to your code/macro to be able to use the
tagging
class:
#include "bflavor_tag/BtaggerWrapper.hpp"
Using the tagging code in your
macro:| Input/Mode | TMBTree or d0root-tuple |
User feeds tagger
with data |
| #include: |
|
|
| Instantiation |
//
chain is pointer to input file Btagger
* tagMe = Btagger(chain); |
Btagger
* tagMe = Btagger(0); |
| Setup |
//
phi-separation of reconstructed B from tagger (default) |
|
| Event loop |
for(int
i = 0; i != _nevents; ++i){ |
for(int i = 0; i != _nevents; ++i){//
empty list of tracks, muons from previous eventtagMe->clear_user_data(); // set the z-position of the PV tagMe->setPVz(pv_z); // loop over tracks: // feed tagger with tracks not // included in B reconstruction; // The data format can be found herefor(int j = 0 ; j != _ntrks; ++j){ Trk_data trk = { eta, phi, chi2, pt, dca, dcaerr, zca, zcaerr, z, charge, nsmt_hits, nfct_hits }; tagMe->push_back(trk); } // loop over muons: for(int j = 0 ; j != _nmuons; ++j){ Muon_data muon = {eta, phi, pt, dca, charge, quality, nseg }; tagMe->push_back(muon); } int otherBcharge = tagMe->getBTag(B_phi, B_eta, B_pt, B_mass); } // event loop |