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.

Changes between Initial Version and Version 1 of RaveKinematics


Ignore:
Timestamp:
Jan 25, 2008, 9:40:15 AM (17 years ago)
Author:
fmos
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RaveKinematics

    v1 v1  
     1= RaveKinematics =
     2
     3== Introduction ==
     4
     5As 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.
     6
     7The 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.
     8
     9To 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.
     10
     11== Quickstart ==
     12
     13{{{
     14#!cpp
     15#include <iostream>
     16#include <sstream>
     17
     18#include <rave/Version.h>
     19#include <rave/TransientTrackKinematicParticle.h>
     20#include <rave/KinematicConstraintBuilder.h>
     21#include <rave/KinematicTreeFactory.h>
     22
     23namespace {
     24    std::vector< rave::KinematicParticle > createParticles()
     25    {
     26        rave::Vector7D state1 ( 0.0001, 0.0001, 0.0001, -31.2685, 13.0785, 28.7524, 0.1057 );
     27        rave::Covariance7D cov1 (
     28         1.5e-7,    3.6e-7,    4.0e-14,
     29                    8.5e-7,    9.6e-14,
     30                               1.7e-6,
     31                                        -1.4e-16,  -3.4e-16,   1.8e-24,
     32                                        -3.3e-16,  -8.1e-16,   4.3e-24,
     33                                        -3.9e-9,   -9.4e-9,    5.0e-17,
     34                                         4.9e-3,   -2.0e-3,   -4.4e-3,
     35                                                    9.2e-4,    1.8e-3,
     36                                                               4.1e-3,
     37           0,         0,         0,        0,         0,         0,      6.2 );
     38    rave::TransientTrackKinematicParticle particle1 (state1, cov1, +1.0, 100, 100);
     39
     40    rave::Vector7D state2 (-0.0006, -0.0006, 0.0018 , -57.1634, -57.6416, -40.0142 , 0.1057 );
     41    rave::Covariance7D cov2 (
     42        5.0e-7,    -5.0e-7,   -1.1e-14,
     43                    5.0e-7,    1.1e-14,
     44                               1.2e-6,
     45                                         1.5e-16,  -1.5e-16,   3.4e-24,
     46                                        -1.5e-16,   1.5e-16,  -3.4e-24,
     47                                         4.2e-9,   -4.2e-9,    9.7e-17,
     48                                         6.7e-2,    6.7e-2,    4.7e-2,
     49                                                    6.8e-2,    4.7e-2,
     50                                                               3.3e-2,
     51           0,         0,         0,        0,         0,         0,      6.2 );
     52    rave::TransientTrackKinematicParticle particle2 (state2, cov2, -1.0, 100, 100);
     53
     54    std::vector< rave::KinematicParticle > particles;
     55    particles.push_back( particle1 );
     56    particles.push_back( particle2 );
     57
     58    return particles;
     59  }
     60
     61  std::string fit ()
     62  {
     63    std::ostringstream o;
     64    rave::ConstantMagneticField mfield(0.,0.,4.);
     65    rave::KinematicTreeFactory factory ( mfield, rave::VacuumPropagator() );
     66    rave::KinematicConstraint constraint =
     67        rave::KinematicConstraintBuilder().createTwoTrackMassKinematicConstraint( 91.187 );
     68    std::vector < rave::KinematicParticle > input_particles = createParticles();
     69    rave::KinematicTree tree;
     70    try {
     71      tree = factory.useVertexFitter( input_particles, constraint );
     72    } catch ( ... ) {};
     73    if (!tree.isValid())
     74    {
     75      o << "The decay could not be reconstructed.";
     76    }
     77    else
     78    {
     79      rave::KinematicParticle topParticle = tree.topParticle();
     80      o << "The reconstructed mother particle is " << topParticle.fullstate();
     81    }
     82    return o.str();
     83  }
     84
     85  std::string version()
     86  {
     87    std::ostringstream o;
     88    o << "Rave Version " << rave::Version();
     89    return o.str();
     90  }
     91}
     92
     93int main(void)
     94{
     95  std::cout << "This is Rave Version " << rave::Version() << std::endl;
     96  std::cout << "Fitting says: " << fit() << std::endl;
     97  return 0;
     98}
     99}}}