Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tag/Micro Filter Tutorial Chris Roat Stanford 31 July 2000.

Similar presentations


Presentation on theme: "Tag/Micro Filter Tutorial Chris Roat Stanford 31 July 2000."— Presentation transcript:

1 Tag/Micro Filter Tutorial Chris Roat Stanford 31 July 2000

2 Outline zAim of this Tutorial zDefinitions of Tag and Micro zPlan of Attack zDetails of Filters zTools Overview (Lists, Iterators, Vertexers) zExecution zAdditional Exercises

3 Aim of this Tutorial zTeach a novice audience zProvide an example of using BaBar code zStep-by-step instructions to get a working executable zUse simple to understand code z(maybe enlighten you as to the meaning of some of the lingo)

4 What is the tag database? zmost distilled version of data - event-wide zcontains: yanalysis bits: loose selections for certain processes (Bprong2, Tau3Loose, etc.) yevent parameters (eTotal, thrustMag, etc.) ytrigger flags (which Level 1&3 triggers fired) zshort time to read, so filtering at this level saves reading in details of events

5 What is the micro database? zmore information then “tag”, but less information than available in reconstruction zgeared toward fast analysis zcontains ykinematics (candidate charge, mass) ylists (tracks, electrons, kaons) ydetector info (# EMC crystals, # DCH hits)  tracking (  2,...) and PID (consistency)

6 Plan of Attack - Our Example find B decays to J/psi( l + l - ) K s (  +  - ) ztag requirements ya possible J/psi (single bit in database) y6 tracks (2 leptons, 2 pions, 2 from tag-B) y4 from IP (pions don’t have to be from IP) zmicro requirements y>=2 positive, >=2 negative tracks yvertex oppositely charged tracks, to find J/psi or K s yvertex J/psi and K s to find B

7 Details of Filters - Tag zinherits from TagFilterModule zTagFilterModule::event(anEvent); // gets tag ztag()->getInt(myInt, “nTracks”); // retrieves the integer counting the # of tracks in event zsetPassed(true); // tells filter to pass the event on to the next part of the code

8 Details of Filters - Micro zinherits from APPFilterModule zuser defined cuts, like on electron consistency yprivate data member (.hh) xAbsParmGeneral _eleCons; yin constructor (.cc) x, _eleCons("eleConsCut",this,-0.01) // default=-0.01 xcommands()->append(& _eleCons); // can use in tcl yused in code (.cc) x_eleCons.value() // return current value zuses lists, iterators, trees, and vertexers...

9 Tools - Lists ztemplated - floats, BtaCandidates, any class! zUseful in looping over tracks or creating ntuples. zHepAList * bcList; // construct zbcList.append(myCand); // add to it zgetTmpAList(anEvent, bcList, _btaCandList.value()); // get it from the event (_btaCandList is a tcl variable).append().purge().isEmpty().hasMember().reverse().sort( fcn ).remove().swap() Methods

10 Tools - Iterators zUsed hand-in-hand with lists zFirst call with () returns first member of list zSubsequent () calls iterate (null = all done!) BtaCandidate* theCand; HepAListIterator iterCand(*bcList); while ( 0 != ( theCand = iterCand() ) ) { code.. }.next()() overloaded as.next().prev().rewind().skip(int).current().skipAll() Methods

11 Tools - Vertexers zFitters are a general class that can constrain a decay tree through kinematics and/or geometry. Here we use only geometry. VtxLeastChiVertexer theVertexer; BtaOpMakeTree cVert( theVertexer ); BtaCandidate* cand=cVert.create(*bc1,*bc2); double mass = cand->mass(); zSee Physics->Vertexing&Composition for a User’s Guide

12 Tools - Modules zTypes yGeneral Purpose and Initialization yInput/Output yFilter/Analysis zExecutable has code for all modules, but it doesn’t know any more than that! zTcl files tell say in what order to call modules zJob begin/end calls are important for writing out the files, or other initialization/finalization zJob event calls are important for analysis

13 Execution zThe next slides take you through a first analysis with tag/micro. zWe will use the analysis-3 release zA more in-depth tutorial of these steps can be found at: yDocumentation->Physics Analysis How-to ->How to skim on tag, do an analysis on micro (http://www.slac.stanford.edu/BFROOT/www/Physics/ OtherDoc/microtut/NanoMicroTut-analysis-3/)

14 Execution - Setup Release zlog on to tersk with ssh zunset all Beta variables yunsetenv Beta* zvariable pointing to scratch space (x= first letter of logon) ysetenv MYWORK $BFROOT/work/x/${USER} ymkdir ${MYWORK} zcreate the release directory ysrtpath 8.6.3d-physics-1 SunOS5 ynewrel -s $MYWORK -t 8.6.3d-physics-1 tut-anal3

15 Execution - Setup Packages zload in packages to your release directory yaddpkg workdir yaddpkg BetaExamples NanoMicroTutorial zset up your workdir package ygmake workdir.setup

16 Execution - Compile & Link zcompile BetaExamples package (all on 1 line) ybsub -q bldrecoq -o lib.log gmake BetaExamples.lib ROPT=-Shared-noFastbuild zlink your executable (all on 1 line) ybsub -q bldrecoq -o extrabin.log gmake BetaExamples.extrabin ROPT=-Shared- noFastbuild

17 Execution - Run! zset up your environment to look at SP3 database ysp3analboot zrun your executable in workdir ycd workdir yBtaExampleFilterApp../BetaExamples/bdbFilter.tcl zat Framework prompt, type the following to bypass a bug, run over 10 events, and finish! ymod disable SvtBdbLoad1 SvtBdbLoad2 yev cont -nev 10 yexit

18 Output HBOOK file zThe job will produce and hbook file, framework.hbook, in your workdir directory that contains: yan ntuple named "Jpsi Ks micro Analysis" ya set of histograms named 'TagFilter;xxx' with the histograms produced by the JpsiK0sTagFilter ya set of histograms named 'MicroFilter;xxx' with the histograms produced by the JpsiK0sMicroFilter

19 Additional Exercises zRequire a good primary vertex in the tag filter. zTry histogramming the different consistencies. Examine the histograms and implement new cuts on in tcl. zAdd constraints to the vertexer (use a BeamSpot constraint, for example) zUse Kanga instead of Objectivity!


Download ppt "Tag/Micro Filter Tutorial Chris Roat Stanford 31 July 2000."

Similar presentations


Ads by Google