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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Finally, find all B 0 –> D * D *SummaryUse <strong>the</strong> Combiner again to find <strong>the</strong> B 0 sCombiner B0Comb(&Dstars, &Dstars);int B0Count = 0;while ( t = B0Comb.next() ) {if (t->charge() != 0) continue;if (fabs(t->mass() - B0Mass) > 0.2) continue;// find B’s momentum in CM frameHepLorentzVector b(*t);b.boost(CMBoost);• b will be <strong>the</strong> Lorentz vector component of our B 0• CMBoost was calculated in our initialization step• obviously, can do a lot more things at this stageWe now know enough <strong>C++</strong> to do a physics analysisNext session we’ll look at polymorphic uses ofinheritance with examples from GismoThen, we’ll be pretty much done with learning <strong>the</strong>languageIt’s soon time to start some mini-projects using <strong>C++</strong><strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 158 Paul F. Kunz<strong>BABAR</strong> <strong>C++</strong> <strong>Course</strong> 159 Paul F. Kunz

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

Saved successfully!

Ooh no, something went wrong!