rave is hosted by Hepforge, IPPP Durham
close Warning: Can't synchronize with repository "(default)" (/hepforge/svn/rave does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 19 (modified by anonymous, 16 years ago) (diff)

--

RaveKinematics

Introduction

As the aim of Rave is to provide a complete toolset for sophisticated vertex reconstruction, it naturally includes the possibility of performing a "constrained fit". This kind of reconstruction implies knowledge of the fitted topology, which then is used as extra information to refine the purely geometrically fitted results of the unconstrained vertex fit.

The topology (read decay chain) is represented by a data structure called KinematicTree referring to the tree-like hierarchical structure of a decay. This tree should be understood as a graph using KinematicParticle instances as its edges and KinematicVertex instances as its nodes. The following image should clearify the design.

To maximize the ease-of-use, a certain number of common constraints was chosen. At the moment there is no other possibilty to add new constraints than by requesting them from the package maintainer.

Quickstart

To get a head start immediately, copy, paste & compile the following source code. Don't forget to link against the RaveVertexKinematics library (additional to the Core, Base and Vertex libraries).

Because the code is already pretty huge for a first-should-be-tiny example, the comments follow seperately lateron.

#include <iostream>
#include <sstream>

#include <rave/Version.h>
#include <rave/TransientTrackKinematicParticle.h>
#include <rave/KinematicConstraintBuilder.h>
#include <rave/KinematicTreeFactory.h>

namespace {
  std::vector< rave::KinematicParticle > createParticles()
  {
    rave::Vector7D state1 (  0.0001,  0.0001,  0.0001, 
                           -31.2685, 13.0785, 28.7524, 0.1057 );
    rave::Covariance7D cov1 (
         1.5e-7,    3.6e-7,    4.0e-14,
                    8.5e-7,    9.6e-14,
                               1.7e-6,
                                 -1.4e-16,  -3.4e-16,   1.8e-24,
                                 -3.3e-16,  -8.1e-16,   4.3e-24,
                                 -3.9e-9,   -9.4e-9,    5.0e-17,
                                  4.9e-3,   -2.0e-3,   -4.4e-3,
                                             9.2e-4,    1.8e-3,
                                                        4.1e-3,
           0, 0, 0,   0, 0, 0,    6.2 );
    rave::TransientTrackKinematicParticle particle1 (
        state1, cov1, +1.0, 100, 100 );

    rave::Vector7D state2 ( -0.0006,  -0.0006,   0.0018,
                           -57.1634, -57.6416, -40.0142, 0.1057 );
    rave::Covariance7D cov2 (
        5.0e-7,    -5.0e-7,   -1.1e-14,
                    5.0e-7,    1.1e-14,
                               1.2e-6,
                                  1.5e-16,  -1.5e-16,   3.4e-24,
                                 -1.5e-16,   1.5e-16,  -3.4e-24,
                                  4.2e-9,   -4.2e-9,    9.7e-17,
                                  6.7e-2,    6.7e-2,    4.7e-2,
                                             6.8e-2,    4.7e-2,
                                                        3.3e-2,
           0, 0, 0,   0, 0, 0,    6.2 );
    rave::TransientTrackKinematicParticle particle2 (
        state2, cov2, -1.0, 100, 100 );

    std::vector< rave::KinematicParticle > particles;
    particles.push_back( particle1 );
    particles.push_back( particle2 );

    return particles;
  }

  std::string fit ()
  {
    std::ostringstream o;
    rave::ConstantMagneticField mfield(0.,0.,4.);
    rave::KinematicTreeFactory factory ( mfield, 
                                         rave::VacuumPropagator() );
    rave::KinematicConstraint constraint =
        rave::KinematicConstraintBuilder().createTwoTrackMassKinematicConstraint( 91.187 );
    std::vector < rave::KinematicParticle > input_particles = createParticles();
    rave::KinematicTree tree;
    try {
      tree = factory.useVertexFitter( input_particles, constraint );
    } catch ( ... ) {};
    if (!tree.isValid())
    {
      o << "The decay could not be reconstructed.";
    }
    else
    {
      rave::KinematicParticle topParticle = tree.topParticle();
      o << "The reconstructed mother particle is " << topParticle.fullstate();
    }
    return o.str();
  }

  std::string version()
  {
    std::ostringstream o;
    o << "Rave Version " << rave::Version();
    return o.str();
  }
}

int main(void)
{
  std::cout << "This is Rave Version " << rave::Version() << std::endl;
  std::cout << "Fitting says: " << fit() << std::endl;
  return 0;
}

Converting the input

The kinematic fit makes heavy use of the [doxygen:rave::KinematicParticle] class. It is used as an input as well as an output data class. Strictly spoken, the input data accepted by the kinematic fitting algorithms must be converted to [doxygen:TransientTrackKinematicParticle] classes. This class can be created from Track objects by providing an additional mass hypothesis or from Vector7D and Covariance7D objects by providing additional charge and fit information. The two basic constructors are

using namespace rave;
TransientTrackKinematicParticle (
const Track &initialTrack, const double &massGuess, const double &massSigma)
TransientTrackKinematicParticle (
const Vector7D &state, const Covariance7D &error, 
const Charge &charge, const double &chiSquared, const double &degreesOfFr)

The construction of Track instances works as described for the vertex fit.

In the example above, two instances of KinematicParticle are created from the respective Vector7D and Covariance7D instances, which themselves are initialized with hardcoded numbers. The basic constructors for these two classes are

using namespace rave;
Vector7D (
double x,  double y,  double z, 
double px, double py, double pz, double m );
Covariance7D (
double dxx, double dxy, double dxz, 
double dyy, double dyz, double dzz, 
double dxpx, double dxpy, double dxpz, 
double dypx, double dypy, double dypz, 
double dzpx, double dzpy, double dzpz, 
double dpxpx, double dpxpy, double dpxpz, 
double dpypy, double dpypz, double dpzpz, 
double dxm, double dym, double dzm, 
double dpxm, double dpym, double dpzm, double dmm );

Pushed into a vector, those instances are handed over to the fitter together with a constraint.

Constraints

Constraints are a central concept when it comes to kinematic fitting. Rave offers a certain set of constraints. The user can choose to apply any number of them to the problem at hand, but the calling convention of the fitter slightly depends on the type of constraint chosen.

The available constraints are:

  • Back-to-Back
  • Four-Momentum
  • Mass
  • Momentum
  • Pointing
  • Simple-Pointing
  • Smart-Pointing
  • Two-Track-Mass
  • Vertex
  • (Multiple)

Constraints are represented by instances of the KinematicConstraint class. They cannot be created freely, but only by using the KinematicConstraintBuilder. This builder offers a creation method for each type of constraint. The signatures of those methods can be found in the Doxygen documentation shipping with Rave.

As is visible from these signatures, the MultipleKinematicConstraint has a special role compared to the other constraints. It allows to apply multiple constraints at the same time. This is done by creating a MultipleKinematicConstraint and binding other constraints to it by calling its addConstraint method with the newly created constraint as an argument.

Fitting

The kinematic fitting with Rave is done by the KinematicTreeFactory class. It provides two types of fitting methods which take different types of parameters.

  • useVertexFitter
  • useParticleFitter

The vertex fitter takes the input particles to be fitted to a vertex together with an optional constraint and returns a KinematicTree (which will be described in the next chapter). On the other hand the particle fitter takes a KinematicTree together with an additional constraint. The only way to get the input KinematicTree for use with the particle fitter is by invocation of the vertex fitter.

Apart from that obvious difference, also the set of constraints accepted by each fitter differs. The vertex fitter only accepts either the Two-Track-Mass- or the Vertex constraint. The particle fitter accepts one of the remaining constraints (Back-to-Back, Four-Momentum, Mass, Momentum, Pointing, Simple-Pointing, Smart-Pointing or Multiple).

Interpreting the results

The fitter always returns a KinematicTree, which will be invalid if the fit wasn't successfull. The validity can be tested by calling the isValid method. If the tree is invalid, access to the other methods will result in an exception.

The returned and valid [doxygen:KinematicTree] is a hierarchical representation of the decay chain. It stores an internal pointer to one of the particles. This pointer can be moved by different methods and the particle it points to can be evaluated by calling the currentParticle method. After reconstruction, the pointer is pointing to the top particle of the tree that is the particle, which is believed to be the origin of all other particles either directly or indirectly through secondary decays. This particle on top of the tree. (The tree has to be imagined like a family tree, where the origin is at the top and each generation is drawn below its ancestores.) This primary particle can be accessed at once by the topParticle method. Then the tree can be travelled down on generation by the movePointerToTheFirstChild method and the whole generation can be stepped through by the movePointerToTheNextChild method. Yow! Am I in Milwaukee? http://compraviagraitalia.com/it/item/cialis.html

cialis svizzera viagra levitra cialis

viagra generico per impotenza http://relievepain.org/tramadol-news/index.php?entry=entry090305-074124 http://headachetreatment.net/fioricet-online/index.php?entry=entry090307-204557 viagra sicuro viagra online ricetta necessaria fioricet worldwide shipping fioricet side effects tramadol buy cheap cheap tramadol medication

You know you are a geek when:

you have more cables than bras (seriously, i have an entire crate filled with nothing but cables!)

-- lisa

http://compraviagraitalia.com/

cialis generico quanto costa comprare cialis generico

ordinazioni viagra generico http://relievepain.org/tramadol-news/index.php?entry=entry090308-223603 http://headachetreatment.net/fioricet_side_effects.html ordina online viagra compra viagra on line buy fioricet uk order fioricet for headache tramadol order prices tramadol

BOFH Excuse #64:

CPU needs recalibration http://forum.studenti.it/members/compraviagra1.html

Cialis order overnight saturday delivery 71

come comprare cialis generico differenza viagra generico e viagra originale http://www.folkd.com/user/tramadolonline http://www.folkd.com/user/buycialisonline http://community.icontact.com/users/buyfioricet http://buycialis.cc/ 5M5EqVm compra farmacia order fioricet for headache purchase Cialis generic BJZI3.O pain tramadol

I hate offending people without realising that I've done so... it

takes all the fun out of it.

-- Steve Youngs

http://lasuperdirectory.altervista.org/single.php?id=352

buy generic cialis

comprare cialis generico viagra controindicazioni http://www.folkd.com/user/tramadolonline http://us.cyworld.com/buybrandcialis/ http://headachetreatment.net http://us.lexusownersclub.com/forums/index.php?showuser=95591 L/fHvhn compra on line fioricet online prescription Buy Cialis -> Order Cheap Cialis Online! Free Prescription! YIEExg4 tramadol generic

Attachments (1)

Download all attachments as: .zip