13.07.2015 Views

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

BABAR C++ Course Running the Examples - HEPHY

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Find D 0 sFind more D 0 and D*Find all <strong>the</strong> D 0 –> Kπ candidatesHepAList D0s;Combiner D0comb1(&kaons, &pions);while ( t = D0comb1.next() ) {if (t->charge() != 0.0) continue;if (fabs(t->mass() - d0Mass) > 0.2) continue;D0s.append(new AsTrack(*t));}• D0comb1 is initialized with two different lists• D0comb1.next() doespicks next track from kaon listlocks <strong>the</strong> trackpicks next unlocked track from pion listcreate and return pointer to new track which is sum• thus a measured track is never used twice in onecombination• note we must make copy of trackFind D 0 ->Kππ 0Combiner D0comb2(&kaons, &pions, &piZeros);while ( t = D0comb2.next() ) {if (t->charge() != 0.0) continue;if (fabs(t->mass() - d0Mass) > 0.2) continue;D0s.append(new AsTrack(*t));}Find D *HepAList Dstars;Combiner DsComb(&D0s, &pions);while ( t = DsComb.next() ) {if (fabs(t->mass() - dStarMass) > 0.2) continue;Dstars.append(new AsTrack(*t));}• Combiner allows variable number of arguments• D 0 –> Kπ and D 0 –> Kππ 0 go into same D0s list• Locking a track from D0s list, will lock all itschildren• note that <strong>the</strong> while loops are no more complex <strong>the</strong>n<strong>the</strong> previous ones<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 156 Paul F. Kunz<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 157 Paul F. Kunz

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!