00001
00002
00003
00004
00005
00006
00008
00009 #include <vector>
00010 #include <stdlib.h>
00011 #include <math.h>
00012 #include "AlConcreteVertices.h"
00013
00015
00016
00017
00019
00020
00021 AlVertex::AlVertex():QvrtBase()
00022 {
00023 qvrt=NULL;
00024 }
00025
00026
00027 AlVertex::AlVertex(const AlVertex& origin):QvrtBase(origin)
00028 {
00029 qvrt = origin.qvrt;
00030 }
00031
00032
00033 AlVertex::~AlVertex() {}
00034
00035
00036 void AlVertex::SetPointer(QVRT* pointer)
00037 {
00038 qvrt=pointer;
00039 setA4V(qvrt->VX,qvrt->VY,qvrt->VZ,0);
00040 }
00041
00042
00043 int AlVertex::KVN() const {if(qvrt != NULL) return qvrt->VN; else return -1;}
00053 int AlVertex::KVTYPE() const {if(qvrt != NULL) return qvrt->TY; else return -1;}
00054 double AlVertex::QVCHIF() const {if(qvrt != NULL) return qvrt->CF; else return -1;}
00055 HepDouble min1(HepDouble a, int b, int c) { return -1;}
00056 HepSymMatrix AlVertex::QVEM() const
00057 {
00058 HepSymMatrix tmpobj(3,0);
00059 if(qvrt != NULL)
00060 {
00061 int cnt=0;
00062 for(unsigned int i=1;i<=3;i++)
00063 for(unsigned int j=1;j<=i;j++)
00064 tmpobj(i,j)=qvrt->EM[cnt++];
00065 }
00066 else
00067 {
00068 tmpobj.apply(&min1);
00069 }
00070 return tmpobj;
00071 }
00072 float AlVertex::QVEM(int i,int j) const
00073 {
00074 if(qvrt == NULL) return -1;
00075 if(i*j==1) return qvrt->EM[1];
00076 if(i*j==2) return qvrt->EM[2];
00077 if(i*j==4) return qvrt->EM[3];
00078 if(i*j==3) return qvrt->EM[4];
00079 if(i*j==6) return qvrt->EM[5];
00080 if(i*j==9) return qvrt->EM[6];
00081 return -1;
00082 }
00083 float AlVertex::PKINK() const {if(qvrt != NULL) return qvrt->PK; else return -1;}
00084 float AlVertex::PTOUT() const {if(qvrt != NULL) return qvrt->PT; else return -1;}
00085 float AlVertex::PLOUT() const {if(qvrt != NULL) return qvrt->PL; else return -1;}
00099 int AlVertex::IHYPK() const {if(qvrt != NULL) return qvrt->HY; else return -1;}
00100 float AlVertex::TOF() const {if((qvrt != NULL)&&(qvrt->AF != NULL)) return qvrt->AF->TO; else return -1;}
00101 char* AlVertex::VertexVolumeName() const
00102 {
00103 if((qvrt != NULL)&&(qvrt->AF != NULL))
00104 return qvrt->AF->VN;
00105 else
00106 return "none";
00107 }
00108 char* AlVertex::VertexMechanisme() const
00109 {
00110 if((qvrt != NULL)&&(qvrt->AF != NULL))
00111 return qvrt->AF->VM;
00112 else
00113 return "none";
00114 }
00115
00116
00118
00119
00120
00122
00123
00124 AlUsrVertex::AlUsrVertex():QvrtBase()
00125 {
00126 HepSymMatrix _tmp(3,0);
00127 _EM.assign(_tmp);
00128 _EM.apply(&min1);
00129 _CHI2 = -1;
00130 }
00131
00132
00133 AlUsrVertex::AlUsrVertex(const AlUsrVertex& origin):QvrtBase(origin)
00134 {
00135 _EM = origin._EM;
00136 _CHI2 = origin._CHI2;
00137 }
00138
00139
00140 AlUsrVertex::AlUsrVertex(const AlVertex& origin):QvrtBase(origin)
00141 {
00142 _EM = origin.QVEM();
00143 _CHI2 = origin.QVCHIF();
00144 }
00145
00146
00147 AlUsrVertex::~AlUsrVertex() {}
00148
00149
00150 void AlUsrVertex::setEM(const HepSymMatrix& matrix)
00151 {
00152 _EM = matrix;
00153 }
00154 void AlUsrVertex::setCHIF(const double chi2)
00155 {
00156 _CHI2 = chi2;
00157 }
00158
00159
00169 int AlUsrVertex::KVNTYPE() const {return 6;}
00170 double AlUsrVertex::QVCHIF() const {return _CHI2;}
00171 HepSymMatrix AlUsrVertex::QVEM() const {return _EM;}
00172 float AlUsrVertex::QVEM(int i,int j) const {return _EM(i,j);}
00173