Analysis examples that use Framework LHCb Computing Software
Analysis examples that use Framework LHCb Computing Software Week 24 -26 November 1999 G. Corti LHCb Software Week, 24 -26 November 1999 G. Corti
Caveat l l … from the point of view of someone wanting to do some physics analysis … only some of the things you would want to do and/or how you would want to do them, some personal choices … when encountered point out commonalties specific to “any/most” physics analysis algorithms. . . see previous talks and topical examples in the release for details on how to use Gaudi Framework components (data access, histograms, n-tuples, job. Option, message), but most of them are used together here LHCb Software Week, 24 -26 November 1999 G. Corti 2
List of release examples LHCb Software Week, 24 -26 November 1999 G. Corti 3
A Physics Analysis job with MC data: l l l Find the decay in the MC Event (ex: B 0® p+p - ) Find the signal in the Analysis Event by applying cuts on the characteristics of the particles in the decay (usually this require a primary vertex) Check how the reconstructed decay compare with the one in the MC Event LHCb Software Week, 24 -26 November 1999 G. Corti 4
MCDecay. Finder example l l l Look for one-step decay: Parent ® n Products B 0® p + p D+ ® K - p +p + Loops over the MCParticles, finds the Parent and following the Decay Vertex(ices), find the one with the required products and fills n-tuple with the decay information. The decay is defined in the job. Options: – MCDecay. Finder. Algorithm. Parent. Of. Decay = "K_S 0"; – MCDecay. Finder. Algorithm. Decay. Products = { "pi+", "pi-" }; LHCb Software Week, 24 -26 November 1999 G. Corti 5
MCDecay. Finder example (from the code) l Use Particle. Property. Svc to verify if the retrieved particles are those requested Status. Code sc = service. Locator()->get. Service( "Particle. Property. Svc", IID_IParticle. Property. Svc, reinterpret_cast<IInterface*&>( m_pp. Svc )); Particle. Property* pp = m_pp. Svc->find(m_name. Parent); long g. IDParent = pp->geant. ID(); . . . for ( iter. P = particles->begin() ; iter. P != particles->end(); iter. P++ ) { if ( (*iter. P)->particle. ID(). id() == g. IDParent ) { LHCb Software Week, 24 -26 November 1999 G. Corti 6
MCDecay. Finder example (results) Result running on SICB file B 0® p+p - (v 113 DSTrs), 500 events SICB Gaudi P. S. Although not in the example it is possible to define a “MCDecay” class to pass it to other algorithms LHCb Software Week, 24 -26 November 1999 G. Corti 7
Simple. Analysis Example l l Filters Part. Candidates ( p+p - ) based on some of their characteristics ( charged, at least one silicon hit, best p. ID) Makes invariant mass – between all p+p - combinations – only those with Pt > Pt cut – only those with Impact. Parameter > IP cut Set in job. Options Fills histograms or counters at various steps To calculate IP it is necessary a Primary Vertex: the algorithm Rec. Primary. Vertex creates a new data type (My. Ax. Vertex) and set its position to the MC Primary vertex and the Simple. Analysis. Algorithm retrieves My. Ax. Vertex LHCb Software Week, 24 -26 November 1999 G. Corti 8
Simple. Analysis Example ( from the code ) Filter the Part. Candidates Smart. Data. Ptr<Ax. Part. Candidate. Vector> candidates(event. Data. Service(), Event. Model: : Anal: : Ax. Part. Candidates); Can also use string “Event/Anal/Ax. Part. Candidates” Ax. Part. Candidate. Vector: : const_iterator iter. P = 0; std: : vector<Ax. Part. Candidate*> v. Char. Cand; for (iter. P = candidates->begin(); iter. P != candidates->end(); iter. P++){ if ( (*iter. P)->charge() != 0 ) { v. Char. Cand. push_back(*iter. P); } } log << MSG: : INFO << "Number of charged = " << v. Char. Cand. size() << endreq; This step is repeated many times checking different characteristics in successive steps but the order is subjective, all physics analysis will do it LHCb Software Week, 24 -26 November 1999 G. Corti 9
Simple. Analysis Example (mass and cuts) for (i. Plus=v. Pi. Plus. begin(); i. Plus!=v. Pi. Plus. end(); i. Plus++) { long pid = (*i. Plus)->particle. ID(). id(); Particle. Property* pp = m_pp. Svc->find. By. Std. Hep(pid); double pi. Mass = pp->mass(); Hep. Lorentz. Vector pi. PFour. Mom = (*i. Plus)->four. Momentum(pi. Mass); double ip. Pi. Plus = ip. calculate(*i. Plus, p. Primary); for (i. Pi. Minus=v. Pi. Minus. begin(); i. Pi. Minus!=v. Pi. Minus. end(); i. Pi. Minus++) { Hep. Lorentz. Vector pi. MFour. Mom = (*i. Pi. Minus)->four. Momentum(m_pi. Mass); Hep. Lorentz. Vector two. Pi. Comb = pi. PFour. Mom + pi. MFour. Mom; double ip. Pi. Minus = ip. calculate(*i. Pi. Minus, p. Primary); m_h. Two. Pi. Mass->fill(two. Pi. Comb. m(), 1. ); if((pi. MFour. Mom. perp()>=m_pi. Pt. Cut) && (pi. PFour. Mom. perp()>=m_pi. Pt. Cut)) { n. Comb. Pt. Cut++; m_h. Two. Pi. Cut. Mass->fill(two. Pi. Comb. m(), 1. ); } if ( (ip. Pi. Minus >= m_pi. IPCut) && ( ip. Pi. Plus >= m_pi. IPCut) ) { . . . LHCb Software Week, 24 -26 November 1999 G. Corti 10
Simple. Analysis Example (output) Event Counters Simple. Analysis. A. . . INFO >>> Execute INFO Number of Ax. Part. Candidates retrieved = 38 INFO Number of Ax. Part. Candidates charged = 38 INFO. . . and with at least one Silicon hit = 22 INFO. . . and with Best. Pid pi+ = 7 INFO. . . and with Best. Pid pi+ = 9 Job Counters Simple. Analysis. A. . . INFO >>> Finalize INFO Number of events processed INFO with Pt of both pi+, pi- > 1 INFO with IP of both pi+, pi- > 0. 01 LHCb Software Week, 24 -26 November 1999 = 500 = 343 = 282 indipendently G. Corti 11
Simple. Analysis Example (histograms) All p+p - combination for best p. ID with Pt cut and IP cut LHCb Software Week, 24 -26 November 1999 G. Corti 12
Summary l In order to write with Gaudi a selection algorithm for B 0® p+p - the same way it is done in SICB it is necessary to have vertexer Toolkit Sub. Algorithm l l primary vertex Algorithm “cheating” wrapped fortran Update of the Analysis Event Model is necessary (more then 1 -step decays) Common provider of subset of Part. Candidates is desirable but not essential LHCb Software Week, 24 -26 November 1999 G. Corti 13
- Slides: 13