/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/lcio/src/cpp/src/CPPFORT/lcvtx.cc File Reference

#include "CPPFORT/lcvtx.h"
#include "lcio.h"
#include "IMPL/VertexImpl.h"
#include "IMPL/ReconstructedParticleImpl.h"
#include <iostream>

Include dependency graph for lcvtx.cc:

Go to the source code of this file.

Functions

PTRTYPE lcvtxcreate ()
int lcvtxdelete (PTRTYPE vertex)
int lcvtxid (PTRTYPE vertex)
bool lcvtxisprimary (PTRTYPE vertex)
char * lcvtxgetalgorithmtype (PTRTYPE vertex)
float lcvtxgetchi2 (PTRTYPE vertex)
float lcvtxgetprobability (PTRTYPE vertex)
int lcvtxgetposition (PTRTYPE vertex, float pos[3])
int lcvtxgetcovmatrix (PTRTYPE vertex, float cvmtx[VTXCOVMATRIX])
int lcvtxgetparameters (PTRTYPE vertex, float *vec, int *nvec)
PTRTYPE lcvtxgetassociatedparticle (PTRTYPE vertex)
int lcvtxsetprimary (PTRTYPE vertex, bool pri)
int lcvtxsetalgorithmtype (PTRTYPE vertex, char *type)
int lcvtxsetchi2 (PTRTYPE vertex, float chi2)
int lcvtxsetprobability (PTRTYPE vertex, float probability)
int lcvtxsetposition (PTRTYPE vertex, float pos[3])
int lcvtxsetcovmatrix (PTRTYPE vertex, float cvmtx[VTXCOVMATRIX])
int lcvtxaddparameter (PTRTYPE vertex, float param)
int lcvtxsetassociatedparticle (PTRTYPE vertex, PTRTYPE particle)


Function Documentation

PTRTYPE lcvtxcreate (  ) 

Definition at line 13 of file lcvtx.cc.

00013                      {
00014   VertexImpl* vtx = new VertexImpl ;
00015   return C2F_POINTER( LCObject*, vtx ) ;
00016 }

int lcvtxdelete ( PTRTYPE  vertex  ) 

Definition at line 17 of file lcvtx.cc.

00017                                  {
00018   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00019   delete vtx ;
00020   return LCIO::SUCCESS ;
00021 }

int lcvtxid ( PTRTYPE  vertex  ) 

Definition at line 26 of file lcvtx.cc.

00026                               {
00027   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00028   return vtx->id() ;
00029 }

bool lcvtxisprimary ( PTRTYPE  vertex  ) 

Definition at line 31 of file lcvtx.cc.

00031                                        {
00032   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00033   return vtx->isPrimary() ;
00034 }

char* lcvtxgetalgorithmtype ( PTRTYPE  vertex  ) 

Definition at line 36 of file lcvtx.cc.

00036                                                {
00037   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00038   return const_cast<char*>( vtx->getAlgorithmType().c_str() );
00039 }

float lcvtxgetchi2 ( PTRTYPE  vertex  ) 

Definition at line 41 of file lcvtx.cc.

00041                                      {
00042   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00043   return vtx->getChi2() ;
00044 }

float lcvtxgetprobability ( PTRTYPE  vertex  ) 

Definition at line 46 of file lcvtx.cc.

00046                                             {
00047   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00048   return vtx->getProbability() ;
00049 }

int lcvtxgetposition ( PTRTYPE  vertex,
float  pos[3] 
)

Definition at line 51 of file lcvtx.cc.

00051                                                      {
00052   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00053   for( int i=0 ; i<3 ;  *pos++ = vtx->getPosition()[i++]  ) ;
00054   return LCIO::SUCCESS ;
00055 }

int lcvtxgetcovmatrix ( PTRTYPE  vertex,
float  cvmtx[VTXCOVMATRIX] 
)

Definition at line 57 of file lcvtx.cc.

00057                                                                     {
00058   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00059   for( int i=0 ; i<VTXCOVMATRIX ;  cvmtx[i] = vtx->getCovMatrix()[i++]  ) ;
00060   return LCIO::SUCCESS ;
00061 }

int lcvtxgetparameters ( PTRTYPE  vertex,
float *  vec,
int *  nvec 
)

Definition at line 63 of file lcvtx.cc.

00063                                                                 {
00064   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00065   int ntot = *nvec - 1 ;
00066   const FloatVec* floatVec = &vtx->getParameters() ;
00067   for(unsigned int l=0; l < floatVec->size(); l++){
00068     if ( l > (unsigned)(ntot) ) {
00069       std::cout << "LCVertex: in getParameters more than " << ntot << "parameters to store" << std::endl ;
00070       return LCIO::ERROR ;
00071     }
00072     *vec++ = (*floatVec)[l] ;
00073   }
00074   *nvec = (int)(floatVec->size() + 1);
00075   return LCIO::SUCCESS ;
00076 }

PTRTYPE lcvtxgetassociatedparticle ( PTRTYPE  vertex  ) 

Definition at line 78 of file lcvtx.cc.

00078                                                      {
00079   Vertex* vtx = f2c_pointer<Vertex,LCObject>( vertex ) ;
00080   ReconstructedParticle* recP = vtx->getAssociatedParticle();
00081   return reinterpret_cast<PTRTYPE>( recP );
00082 }

int lcvtxsetprimary ( PTRTYPE  vertex,
bool  pri 
)

Definition at line 87 of file lcvtx.cc.

00087                                                 {
00088   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00089   vtx->setPrimary( pri ) ;
00090   return LCIO::SUCCESS ;
00091 }

int lcvtxsetalgorithmtype ( PTRTYPE  vertex,
char *  type 
)

Definition at line 93 of file lcvtx.cc.

00093                                                         {
00094   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00095   vtx->setAlgorithmType( type ) ;
00096   return LCIO::SUCCESS ;
00097 }

int lcvtxsetchi2 ( PTRTYPE  vertex,
float  chi2 
)

Definition at line 99 of file lcvtx.cc.

00099                                                {
00100   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00101   vtx->setChi2( chi2 ) ;
00102   return LCIO::SUCCESS ;
00103 }

int lcvtxsetprobability ( PTRTYPE  vertex,
float  probability 
)

Definition at line 105 of file lcvtx.cc.

00105                                                              {
00106   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00107   vtx->setProbability( probability ) ;
00108   return LCIO::SUCCESS ;
00109 }

int lcvtxsetposition ( PTRTYPE  vertex,
float  pos[3] 
)

Definition at line 111 of file lcvtx.cc.

00111                                                      {
00112   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00113   vtx->setPosition( pos ) ;
00114   return LCIO::SUCCESS ;
00115 }

int lcvtxsetcovmatrix ( PTRTYPE  vertex,
float  cvmtx[VTXCOVMATRIX] 
)

Definition at line 117 of file lcvtx.cc.

00117                                                                    {
00118   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00119   vtx->setCovMatrix( cvmtx ) ;
00120   return LCIO::SUCCESS ;
00121 }

int lcvtxaddparameter ( PTRTYPE  vertex,
float  param 
)

Definition at line 123 of file lcvtx.cc.

00123                                                     {
00124   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00125   vtx->addParameter( param ) ;
00126   return LCIO::SUCCESS ;
00127 }

int lcvtxsetassociatedparticle ( PTRTYPE  vertex,
PTRTYPE  particle 
)

Definition at line 129 of file lcvtx.cc.

00129                                                                    {
00130   VertexImpl* vtx = f2c_pointer<VertexImpl,LCObject>( vertex ) ;
00131   ReconstructedParticle* rcp = f2c_pointer<ReconstructedParticle,LCObject>( particle ) ;
00132   vtx->setAssociatedParticle( rcp ) ;
00133   return LCIO::SUCCESS ;
00134 }


Generated on Mon Jan 7 13:16:40 2013 for MicromegasFramework by  doxygen 1.4.7