VertexFit Class Reference

#include <VertexFit.h>

Inheritance diagram for VertexFit:

TrackPool List of all members.

Public Member Functions

 ~VertexFit ()
void init ()
void AddVertex (int number, VertexParameter vpar, std::vector< int > lis)
void AddVertex (int number, VertexParameter vpar, int n1, int n2)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11)
void AddVertex (int number, VertexParameter vpar, int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12)
void AddBeamFit (int number, VertexParameter vpar, int n)
void BuildVirtualParticle (int number)
void setIterNumber (const int niter=10)
void setChisqCut (const double chicut=1000, const double chiter=1.0e-3)
void setMagCorrFactor (const double factor=1.000)
double factor () const
bool Fit ()
bool Fit (int n)
bool BeamFit (int n)
void Swim (int n)
double chisq () const
double chisq (int n) const
bool pull (int n, int itk, HepVector &p)
HepLorentzVector pfit (int n) const
HepPoint3D xfit (int n) const
HepVector w (int n) const
HepSymMatrix Ew (int n) const
WTrackParameter wtrk (int n) const
HepVector cpu () const
HepPoint3D vx (int n) const
HepVector Vx (int n) const
HepSymMatrix Evx (int n) const
double errorVx (int n, int i) const
VertexParameter vpar (int n) const
WTrackParameter wVirtualTrack (int n) const
void AddTrack (const int number, const double mass, const RecMdcTrack *trk)
void AddTrack (const int number, const double mass, const RecMdcKalTrack *trk)
void AddTrack (const int number, const double mass, const RecEmcShower *trk)
void AddTrack (const int number, const WTrackParameter wtrk)
void AddMissTrack (const int number, const double mass)
void AddMissTrack (const int number, const double mass, const HepLorentzVector p4)
void AddMissTrack (const int number, const double mass, const RecEmcShower *trk)
void AddMissTrack (const int number, const RecEmcShower *trk)
void AddMissTrack (const int number, const HepLorentzVector p4)
void AddTrackVertex (const int number, const double mass, const RecEmcShower *trk)
std::vector< int > AddList (int n1)
std::vector< int > AddList (int n1, int n2)
std::vector< int > AddList (int n1, int n2, int n3)
std::vector< int > AddList (int n1, int n2, int n3, int n4)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11)
std::vector< int > AddList (int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12)
std::vector< WTrackParameterwTrackOrigin () const
WTrackParameter wTrackOrigin (int n) const
std::vector< WTrackParameterwTrackInfit () const
WTrackParameter wTrackInfit (int n) const
std::vector< int > wTrackList () const
int wTrackList (int n) const
int numberWTrack () const
std::vector< GammaShapeGammaShapeValue () const
GammaShape GammaShapeValue (int n) const
std::vector< int > GammaShapeList () const
int GammaShapeList (int n) const
int numberGammaShape () const
void setWTrackOrigin (const int n, const WTrackParameter wtrk)
void setWTrackOrigin (const WTrackParameter wtrk)
void setWTrackInfit (const int n, const WTrackParameter wtrk)
void setWTrackInfit (const WTrackParameter wtrk)
void setWTrackList (const int n)
void clearWTrackOrigin ()
void clearWTrackInfit ()
void clearWTrackList ()
void clearone ()
void cleartwo ()
int numberone () const
int numbertwo () const
vector< int > mappositionA () const
vector< int > mappositionB () const
vector< int > mapkinematic () const
void clearMapkinematic ()
void clearMappositionA ()
void clearMappositionB ()
void setMapkinematic (const int n)
void setMappositionA (const int n)
void setMappositionB (const int n)
void setGammaShape (const int n, const GammaShape gammashape)
void setGammaShape (const GammaShape gammashape)
void setGammaShapeList (const int n)
void clearGammaShape ()
void clearGammaShapeList ()
void setBeamPosition (const HepPoint3D BeamPosition)
void setVBeamPosition (const HepSymMatrix VBeamPosition)
HepPoint3D getBeamPosition () const
HepSymMatrix getVBeamPosition () const

Static Public Member Functions

static VertexFitinstance ()

Private Member Functions

void UpdateConstraints (const VertexConstraints &vc)
void fitVertex (int n)
void vertexCovMatrix (int n)
void swimVertex (int n)
void fitBeam (int n)
void swimBeam (int n)
HepVector xOrigin () const
void setXOrigin (const HepVector &x)
HepSymMatrix xcovOrigin () const
void setXCovOrigin (const HepSymMatrix &v)
HepSymMatrix xcovOriginInversed () const
void setXCovOriginInversed (const HepSymMatrix &v)
HepVector xInfit () const
void setXInfit (const HepVector &x)
HepSymMatrix xcovInfit () const
void setXCovInfit (const HepSymMatrix &v)
HepSymMatrix xcovInfitInversed () const
void setXCovInfitInversed (const HepSymMatrix &v)
HepVector pOrigin (int i) const
void setPOrigin (int i, const HepVector &p)
HepSymMatrix pcovOrigin (int i) const
void setPCovOrigin (int i, const HepSymMatrix &v)
HepVector pInfit (int i) const
void setPInfit (int i, const HepVector &p)
HepSymMatrix pcovInfit (int i) const
void setPCovInfit (int i, const HepSymMatrix &v)
HepMatrix vfB (int i) const
void setB (int i, const HepMatrix &e)
HepMatrix vfBT (int i) const
void setBT (int i, const HepMatrix &e)
HepMatrix vfA (int i) const
void setA (int i, const HepMatrix &d)
HepMatrix vfAT (int i) const
void setAT (int i, const HepMatrix &d)
HepMatrix vfKQ (int i) const
void setKQ (int i, const HepMatrix &d)
HepVector vfG (int i) const
void setG (int i, const HepVector &p)
HepSymMatrix vfW (int i) const
void setW (int i, HepSymMatrix &m)
HepMatrix vfE (int i) const
void setE (int i, const HepMatrix &p)
HepVector Convert67 (const double &mass, const HepVector &p)
HepVector Convert76 (const HepVector &p)
 VertexFit ()

Private Attributes

std::vector< VertexParameterm_vpar_origin
std::vector< VertexParameterm_vpar_infit
std::vector< VertexConstraintsm_vc
std::vector< double > m_chisq
double m_chi
int m_nvtrk
std::vector< WTrackParameterm_virtual_wtrk
HepVector m_xOrigin
HepSymMatrix m_xcovOrigin
HepSymMatrix m_xcovOriginInversed
HepVector m_xInfit
HepSymMatrix m_xcovInfit
HepSymMatrix m_xcovInfitInversed
HepVector m_pOrigin
HepSymMatrix m_pcovOrigin
HepVector m_pInfit
HepSymMatrix m_pcovInfit
HepMatrix m_B
HepMatrix m_BT
HepMatrix m_A
HepMatrix m_AT
HepMatrix m_KQ
HepVector m_G
HepSymMatrix m_W
HepMatrix m_E
HepMatrix m_TRA
HepMatrix m_TRB
int m_niter
double m_chicut
double m_chiter
double m_factor
HepVector m_cpu

Static Private Attributes

static VertexFitm_pointer = 0
static const int NTRKPAR = 6
static const int NVTXPAR = 3
static const int NCONSTR = 2

Detailed Description

Definition at line 18 of file VertexFit.h.


Constructor & Destructor Documentation

VertexFit::~VertexFit (  ) 

Definition at line 22 of file VertexFit.cxx.

00023 {
00024         //if (m_pointer) delete m_pointer;
00025 }

VertexFit::VertexFit (  )  [private]

Definition at line 27 of file VertexFit.cxx.

Referenced by instance().

00027 {;} 


Member Function Documentation

void VertexFit::AddBeamFit ( int  number,
VertexParameter  vpar,
int  n 
)

Definition at line 74 of file VertexFit.cxx.

References TrackPool::AddList(), VertexConstraints::FixedVertexConstraints(), m_vc, m_vpar_infit, m_vpar_origin, and vpar().

00075 {
00076         std::vector<int> tlis = AddList(n);
00077         VertexConstraints vc;
00078         vc.FixedVertexConstraints(tlis);
00079         m_vc.push_back(vc);
00080         m_vpar_origin.push_back(vpar);
00081         m_vpar_infit.push_back(vpar);
00082         if ((unsigned int)number != m_vc.size() - 1)
00083                 std::cout << "wrong kinematic constraints index" << std::endl;
00084 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10,
int  n11,
int  n12 
) [inherited]

Definition at line 618 of file TrackPool.cxx.

00619                                            {
00620     std::vector<int> lis;
00621     lis.clear();
00622     lis.push_back(n1);
00623     lis.push_back(n2);
00624     lis.push_back(n3);
00625     lis.push_back(n4);
00626     lis.push_back(n5);
00627     lis.push_back(n6);
00628     lis.push_back(n7);
00629     lis.push_back(n8);
00630     lis.push_back(n9);
00631     lis.push_back(n10);
00632     lis.push_back(n11);
00633     lis.push_back(n12);
00634     return lis;
00635 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10,
int  n11 
) [inherited]

Definition at line 600 of file TrackPool.cxx.

00601                                   {
00602     std::vector<int> lis;
00603     lis.clear();
00604     lis.push_back(n1);
00605     lis.push_back(n2);
00606     lis.push_back(n3);
00607     lis.push_back(n4);
00608     lis.push_back(n5);
00609     lis.push_back(n6);
00610     lis.push_back(n7);
00611     lis.push_back(n8);
00612     lis.push_back(n9);
00613     lis.push_back(n10);
00614     lis.push_back(n11);
00615     return lis;
00616 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10 
) [inherited]

Definition at line 583 of file TrackPool.cxx.

00584                          {
00585     std::vector<int> lis;
00586     lis.clear();
00587     lis.push_back(n1);
00588     lis.push_back(n2);
00589     lis.push_back(n3);
00590     lis.push_back(n4);
00591     lis.push_back(n5);
00592     lis.push_back(n6);
00593     lis.push_back(n7);
00594     lis.push_back(n8);
00595     lis.push_back(n9);
00596     lis.push_back(n10);
00597     return lis;
00598 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9 
) [inherited]

Definition at line 567 of file TrackPool.cxx.

00568                 {
00569     std::vector<int> lis;
00570     lis.clear();
00571     lis.push_back(n1);
00572     lis.push_back(n2);
00573     lis.push_back(n3);
00574     lis.push_back(n4);
00575     lis.push_back(n5);
00576     lis.push_back(n6);
00577     lis.push_back(n7);
00578     lis.push_back(n8);
00579     lis.push_back(n9);
00580     return lis;
00581 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8 
) [inherited]

Definition at line 553 of file TrackPool.cxx.

00553                                                                                                 {
00554     std::vector<int> lis;
00555     lis.clear();
00556     lis.push_back(n1);
00557     lis.push_back(n2);
00558     lis.push_back(n3);
00559     lis.push_back(n4);
00560     lis.push_back(n5);
00561     lis.push_back(n6);
00562     lis.push_back(n7);
00563     lis.push_back(n8);
00564     return lis;
00565 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7 
) [inherited]

Definition at line 540 of file TrackPool.cxx.

00540                                                                                         {
00541     std::vector<int> lis;
00542     lis.clear();
00543     lis.push_back(n1);
00544     lis.push_back(n2);
00545     lis.push_back(n3);
00546     lis.push_back(n4);
00547     lis.push_back(n5);
00548     lis.push_back(n6);
00549     lis.push_back(n7);
00550     return lis;
00551 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6 
) [inherited]

Definition at line 528 of file TrackPool.cxx.

00528                                                                                 {
00529     std::vector<int> lis;
00530     lis.clear();
00531     lis.push_back(n1);
00532     lis.push_back(n2);
00533     lis.push_back(n3);
00534     lis.push_back(n4);
00535     lis.push_back(n5);
00536     lis.push_back(n6);
00537     return lis;
00538 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4,
int  n5 
) [inherited]

Definition at line 517 of file TrackPool.cxx.

00517                                                                         {
00518     std::vector<int> lis;
00519     lis.clear();
00520     lis.push_back(n1);
00521     lis.push_back(n2);
00522     lis.push_back(n3);
00523     lis.push_back(n4);
00524     lis.push_back(n5);
00525     return lis;
00526 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3,
int  n4 
) [inherited]

Definition at line 507 of file TrackPool.cxx.

00507                                                                 {
00508     std::vector<int> lis;
00509     lis.clear();
00510     lis.push_back(n1);
00511     lis.push_back(n2);
00512     lis.push_back(n3);
00513     lis.push_back(n4);
00514     return lis;
00515 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2,
int  n3 
) [inherited]

Definition at line 498 of file TrackPool.cxx.

00498                                                         {
00499     std::vector<int> lis;
00500     lis.clear();
00501     lis.push_back(n1);
00502     lis.push_back(n2);
00503     lis.push_back(n3);
00504     return lis;
00505 }

std::vector< int > TrackPool::AddList ( int  n1,
int  n2 
) [inherited]

Definition at line 490 of file TrackPool.cxx.

00490                                                 {
00491     std::vector<int> lis;
00492     lis.clear();
00493     lis.push_back(n1);
00494     lis.push_back(n2);
00495     return lis;
00496 }

std::vector< int > TrackPool::AddList ( int  n1  )  [inherited]

Definition at line 483 of file TrackPool.cxx.

Referenced by AddBeamFit(), KinematicFit::AddResonance(), KalmanKinematicFit::AddResonance(), KinematicFit::AddTotalEnergy(), KalmanKinematicFit::AddTotalEnergy(), KinematicFit::AddTotalMomentum(), KalmanKinematicFit::AddTotalMomentum(), and AddVertex().

00483                                         {
00484     std::vector<int> lis;
00485     lis.clear();
00486     lis.push_back(n1);
00487     return lis;
00488 }

void TrackPool::AddMissTrack ( const int  number,
const HepLorentzVector  p4 
) [inherited]

Definition at line 403 of file TrackPool.cxx.

References genRecEmupikp::i, ganga-rec::j, TrackPool::m_numberone, TrackPool::m_numbertwo, WTrackParameter::setEw(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setType(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), and TrackPool::setWTrackOrigin().

00403                                                                   {
00404     double dphi = 1E+3;
00405     double dthe = 1E+3;
00406     double dE = 1E+3;
00407     WTrackParameter wtrk(p4, dphi, dthe, dE);
00408     HepSymMatrix Ew = HepSymMatrix(7,0);
00409     for (int i = 0; i < 7; i++) {
00410         for (int j = 0; j < 7; j++) {
00411             if(i==j)    Ew[i][j] = 1E+6;
00412         }
00413     }
00414     wtrk.setType(1);
00415     wtrk.setEw(Ew);
00416     setWTrackOrigin(wtrk);
00417     setWTrackInfit(wtrk);
00418     setWTrackList(number);
00419     setMapkinematic(2);
00420     setMappositionA(m_numberone);
00421     setMappositionB(m_numbertwo);
00422     m_numbertwo = m_numbertwo + 4;     
00423 }

void TrackPool::AddMissTrack ( const int  number,
const RecEmcShower trk 
) [inherited]

Definition at line 250 of file TrackPool.cxx.

References cos(), DstEmcShower::dphi(), DstEmcShower::dtheta(), DstEmcShower::energy(), WTrackParameter::Ew(), TrackPool::m_BeamPosition, TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::m_VBeamPosition, mass, DstEmcShower::phi(), TrackPool::setGammaShape(), TrackPool::setGammaShapeList(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setPlmp(), WTrackParameter::setType(), WTrackParameter::setVplm(), WTrackParameter::setW(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), TrackPool::setWTrackOrigin(), sin(), DstEmcShower::theta(), DstEmcShower::x(), x, DstEmcShower::y(), and DstEmcShower::z().

00250                                                                       {
00251     //
00252     //parameters: phi lambda mass E
00253     //
00254 
00255     double mass = 0;
00256     double ptrk = trk->energy();
00257     double e = sqrt(ptrk*ptrk + mass * mass);
00258     double the = trk->theta();
00259     double phi = trk->phi();
00260     HepLorentzVector p4( e* sin(the) * cos(phi),
00261             e * sin(the) * sin(phi),
00262             e * cos(the),
00263             e);
00264     double dphi = trk->dphi();
00265     double dthe = trk->dtheta();
00266     double de   = 1E+6;
00267     double x = trk->x();
00268     double y = trk->y();
00269     double z = trk->z();
00270 
00271     HepPoint3D x3 (x, y ,z);
00272     WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de);
00273     HepSymMatrix Vpe = HepSymMatrix(2,0);
00274     //=== get Vclus===
00275     HepSymMatrix Vclus = HepSymMatrix (3,0);
00276     Vclus = (wtrk.Ew()).sub(5,7);
00277     double xpr = x - m_BeamPosition[0];
00278     double ypr = y - m_BeamPosition[1];
00279     double zpr = z - m_BeamPosition[2];
00280     double Rpr = sqrt(xpr*xpr + ypr*ypr);
00281     // === get jacobi ===   
00282     HepMatrix J(2,3,0);
00283     J[0][0] = -ypr/(Rpr*Rpr);
00284     J[0][1] = xpr/(Rpr*Rpr);
00285     J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr);
00286     J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr);
00287     J[1][2] = 1/Rpr;
00288     Vpe = Vclus.similarity(J) + m_VBeamPosition.similarity(J);
00289     Vpe[0][1]=0;
00290     double phipre = atan(ypr/xpr);
00291 
00292     if(xpr<0){
00293         phipre = atan(ypr/xpr) + 3.1415926;
00294     }
00295     double lambdapre = zpr/Rpr;
00296 
00297 
00298     HepVector plmp(4 , 0);
00299     plmp[0] = phipre;
00300     plmp[1] = lambdapre;
00301     plmp[2] = mass;
00302     plmp[3] = e;
00303     wtrk.setPlmp(plmp);
00304 
00305     HepSymMatrix Vplm(2,0);
00306     Vplm[0][0] = Vpe[0][0];
00307     Vplm[1][1] = Vpe[1][1];
00308     wtrk.setVplm(Vplm);
00309 
00310 
00311 
00312     // === set p4 ===
00313     double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre);
00314     double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre);
00315     double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre);
00316     double p0e = e;
00317 
00318     wtrk.setW(0,p0x);
00319     wtrk.setW(1,p0y);
00320     wtrk.setW(2,p0z);
00321     wtrk.setW(3,p0e);
00322 
00323     wtrk.setType(1);
00324     setWTrackOrigin(wtrk);
00325     setWTrackInfit(wtrk);
00326     setWTrackList(number);
00327     GammaShape gtrk(p4,dphi,dthe,de);
00328     setGammaShape(gtrk);
00329     setGammaShapeList(number);
00330     setMapkinematic(4);
00331     setMappositionA(m_numberone);
00332     setMappositionB(m_numbertwo);
00333 
00334     m_numberone = m_numberone + 2;
00335     m_numbertwo = m_numbertwo + 2;
00336 }

void TrackPool::AddMissTrack ( const int  number,
const double  mass,
const RecEmcShower trk 
) [inherited]

Definition at line 159 of file TrackPool.cxx.

References cos(), DstEmcShower::dphi(), DstEmcShower::dtheta(), DstEmcShower::energy(), WTrackParameter::Ew(), TrackPool::m_BeamPosition, TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::m_VBeamPosition, DstEmcShower::phi(), TrackPool::setGammaShape(), TrackPool::setGammaShapeList(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setPlmp(), WTrackParameter::setType(), WTrackParameter::setVplm(), WTrackParameter::setW(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), TrackPool::setWTrackOrigin(), sin(), DstEmcShower::theta(), DstEmcShower::x(), x, DstEmcShower::y(), and DstEmcShower::z().

00160                                  {
00161     //
00162     //parameters: phi lambda mass ptrk
00163     //
00164     double ptrk = trk->energy();
00165     double e = sqrt(ptrk*ptrk + mass * mass);
00166     double the = trk->theta();
00167     double phi = trk->phi();
00168     HepLorentzVector p4( e* sin(the) * cos(phi), 
00169             e * sin(the) * sin(phi),
00170             e * cos(the),
00171             e);
00172     double dphi = trk->dphi();
00173     double dthe = trk->dtheta();
00174     double de   = 1E+6;
00175     double x = trk->x();
00176     double y = trk->y();
00177     double z = trk->z();
00178 
00179     HepPoint3D x3 (x, y ,z);
00180     WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de);
00181     HepSymMatrix Vpe = HepSymMatrix(2,0);
00182     //=== get Vclus===
00183     HepSymMatrix Vclus = HepSymMatrix (3,0);
00184     Vclus = (wtrk.Ew()).sub(5,7);
00185     double xpr = x - m_BeamPosition[0];
00186     double ypr = y - m_BeamPosition[1];
00187     double zpr = z - m_BeamPosition[2];
00188     double Rpr = sqrt(xpr*xpr + ypr*ypr);
00189     // === get jacobi ===   
00190     HepMatrix J(2,3,0);
00191     J[0][0] = -ypr/(Rpr*Rpr);
00192     J[0][1] = xpr/(Rpr*Rpr);
00193     J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr);
00194     J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr);
00195     J[1][2] = 1/Rpr;
00196     Vpe = Vclus.similarity(J) + m_VBeamPosition.similarity(J);
00197     Vpe[0][1]=0;
00198 
00199     double phipre = atan(ypr/xpr);
00200 
00201     if(xpr<0){
00202         phipre = atan(ypr/xpr) + 3.1415926;
00203     } 
00204     double lambdapre = zpr/Rpr;  
00205 
00206 
00207     HepVector plmp(4 , 0);
00208     plmp[0] = phipre;
00209     plmp[1] = lambdapre;
00210     plmp[2] = mass;
00211     plmp[3] = ptrk;
00212     wtrk.setPlmp(plmp);
00213 
00214     HepSymMatrix Vplm(3,0);
00215     Vplm[0][0] = Vpe[0][0];
00216     Vplm[1][1] = Vpe[1][1];
00217     wtrk.setVplm(Vplm);
00218 
00219 
00220 
00221     // === set p4 ===
00222     double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre);
00223     double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre);  
00224     double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre);
00225     double p0e = e;
00226 
00227     wtrk.setW(0,p0x);
00228     wtrk.setW(1,p0y);
00229     wtrk.setW(2,p0z);
00230     wtrk.setW(3,p0e);
00231 
00232     wtrk.setType(1);
00233     setWTrackOrigin(wtrk);
00234     setWTrackInfit(wtrk);
00235     setWTrackList(number);
00236     GammaShape gtrk(p4,dphi,dthe,de);
00237     setGammaShape(gtrk);
00238     setGammaShapeList(number);
00239     setMapkinematic(5);
00240     setMappositionA(m_numberone);
00241     setMappositionB(m_numbertwo);
00242 
00243     m_numberone = m_numberone + 3;
00244     m_numbertwo = m_numbertwo + 1;
00245 }

void TrackPool::AddMissTrack ( const int  number,
const double  mass,
const HepLorentzVector  p4 
) [inherited]

Definition at line 341 of file TrackPool.cxx.

References WTrackParameter::Lambda(), TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setPlmp(), WTrackParameter::setType(), WTrackParameter::setVplm(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), and TrackPool::setWTrackOrigin().

00341                                                                                            {
00342     //
00343     //parameters: mass px py pz
00344     //  
00345 
00346     double dphi = 1E+6;
00347     double dthe = 1E+6;
00348     double dE = 1E+6;
00349     WTrackParameter wtrk(p4, dphi, dthe, dE);
00350     HepVector plmp(4, 0);
00351     double phipre = atan(p4[1]/p4[0]);
00352 
00353     if(p4[0]<0){
00354         phipre = atan(p4[1]/p4[0]) + 3.1415926;
00355     }
00356     plmp[0] = phipre;
00357     plmp[1] = wtrk.Lambda();
00358     plmp[2] = mass;
00359     plmp[3] = p4[3];
00360     HepSymMatrix Vplm(3, 0);
00361     wtrk.setPlmp(plmp);
00362     wtrk.setVplm(Vplm);
00363     wtrk.setType(1);
00364     setWTrackOrigin(wtrk);
00365     setWTrackInfit(wtrk); 
00366     setWTrackList(number);
00367     setMapkinematic(3);
00368     setMappositionA(m_numberone);
00369     setMappositionB(m_numbertwo);
00370     m_numberone = m_numberone + 1;
00371     m_numbertwo = m_numbertwo + 3;
00372 }

void TrackPool::AddMissTrack ( const int  number,
const double  mass 
) [inherited]

Definition at line 375 of file TrackPool.cxx.

References TrackPool::m_numberone, TrackPool::m_numbertwo, WTrackParameter::setEw(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setMass(), WTrackParameter::setW(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), TrackPool::setWTrackOrigin(), and w.

00375                                                                 {
00376     //
00377     //parameters: mass px py pz, but px,py,pz 's error matrix is set as 10e^6
00378     //
00379     WTrackParameter wtrk;
00380     wtrk.setMass(mass);
00381     HepVector w(7,0);
00382     HepSymMatrix Ew(7,0);
00383     w[0] = 0.2;
00384     w[1] = 0.2;
00385     w[2] = 0.2;
00386     w[3] = sqrt(0.2*0.2*3 + mass*mass);
00387     Ew[0][0] = 1E+6;
00388     Ew[1][1] = 1E+6;
00389     Ew[2][2] = 1E+6;
00390     wtrk.setW(w);
00391     wtrk.setEw(Ew);
00392     setWTrackOrigin(wtrk);
00393     setWTrackInfit(wtrk);
00394     setWTrackList(number);
00395     setMapkinematic(7);
00396     setMappositionA(m_numberone);
00397     setMappositionB(m_numbertwo);
00398     m_numberone = m_numberone + 4;
00399 
00400 }

void TrackPool::AddTrack ( const int  number,
const WTrackParameter  wtrk 
) [inherited]

Definition at line 429 of file TrackPool.cxx.

References TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::numberWTrack(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), and TrackPool::setWTrackOrigin().

00429                                                                {
00430     setWTrackOrigin(wtrk);
00431     setWTrackInfit(wtrk);
00432     setWTrackList(number);
00433     if(number != numberWTrack()-1) {
00434         std::cout << "TrackPool: wrong track index" <<" " 
00435             <<number<<" , " <<numberWTrack()<< std::endl;
00436     }
00437     setMapkinematic(0);
00438     setMappositionA(m_numberone); 
00439     setMappositionB(m_numbertwo);
00440     m_numberone = m_numberone + 4;
00441 }

void TrackPool::AddTrack ( const int  number,
const double  mass,
const RecEmcShower trk 
) [inherited]

Definition at line 44 of file TrackPool.cxx.

References EvtCyclic3::B, cos(), DstEmcShower::dE(), DstEmcShower::dphi(), DstEmcShower::dtheta(), DstEmcShower::energy(), WTrackParameter::Ew(), TrackPool::m_BeamPosition, TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::m_VBeamPosition, TrackPool::numberWTrack(), DstEmcShower::phi(), WTrackParameter::setEw(), TrackPool::setGammaShape(), TrackPool::setGammaShapeList(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), WTrackParameter::setPlmp(), WTrackParameter::setVplm(), WTrackParameter::setW(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), TrackPool::setWTrackOrigin(), sin(), DstEmcShower::theta(), DstEmcShower::x(), x, DstEmcShower::y(), and DstEmcShower::z().

00045                                  {
00046     //
00047     //parameters: phi lambda mass energy
00048     //  
00049     double ptrk = trk->energy();
00050     double e = sqrt(ptrk*ptrk + mass * mass);
00051     double the = trk->theta();
00052     double phi = trk->phi();
00053     HepLorentzVector p4(ptrk * sin(the) * cos(phi), 
00054             ptrk * sin(the) * sin(phi),
00055             ptrk * cos(the),
00056             e);
00057     double dphi = trk->dphi();
00058     double dthe = trk->dtheta();
00059     double de   = trk->dE();
00060     double x = trk->x();
00061     double y = trk->y();
00062     double z = trk->z();
00063     HepPoint3D x3 (x, y ,z);
00064     WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de);
00065     HepSymMatrix Vpl = HepSymMatrix(2,0);
00066     //=== get Vclus===
00067     HepSymMatrix Vclus = HepSymMatrix (3,0);
00068     Vclus = (wtrk.Ew()).sub(5,7);
00069     double xpr = x - m_BeamPosition[0];
00070     double ypr = y - m_BeamPosition[1];
00071     double zpr = z - m_BeamPosition[2];
00072     double Rpr = sqrt(xpr*xpr + ypr*ypr);
00073     // === get jacobi ===   
00074     HepMatrix J(2,3,0);
00075     J[0][0] = -ypr/(Rpr*Rpr);
00076     J[0][1] = xpr/(Rpr*Rpr);
00077     J[1][0] = -xpr * zpr/(Rpr*Rpr*Rpr);
00078     J[1][1] = -ypr * zpr/(Rpr*Rpr*Rpr);
00079     J[1][2] = 1/Rpr;
00080     Vpl = Vclus.similarity(J) + m_VBeamPosition.similarity(J);
00081     Vpl[0][1]=0;
00082     // === get phipre, lambda===
00083 
00084     double phipre = atan(ypr/xpr);
00085 
00086     if(xpr<0){
00087         phipre = atan(ypr/xpr) + 3.1415926;
00088     }
00089     double lambdapre = zpr/Rpr;
00090 
00091 
00092     // === set p4 ===
00093     double p0x = ptrk*cos(phipre)/sqrt(1 + lambdapre*lambdapre);
00094     double p0y = ptrk*sin(phipre)/sqrt(1 + lambdapre*lambdapre);
00095     double p0z = ptrk*lambdapre/sqrt(1 + lambdapre*lambdapre);
00096     double p0e = e;
00097 
00098 
00099     double p0ver = sqrt(p0x*p0x + p0y*p0y);
00100 
00101 
00102     HepMatrix B(4,3,0);
00103     B[0][0] = -p0y;
00104     B[0][1] = -p0z * p0x * p0ver/(p0e * p0e);
00105     B[0][2] = p0x/p0e;
00106     B[1][0] = p0x;
00107     B[1][1] = -p0z * p0y * p0ver/(p0e * p0e);
00108     B[1][2] = p0y/p0e;
00109     B[2][1] = p0ver * p0ver * p0ver/(p0e * p0e);
00110     B[2][2] = p0z/p0e;
00111     B[3][2] = 1;
00112 
00113     HepSymMatrix Vple(3,0);
00114     Vple[0][0] = Vpl[0][0];
00115     Vple[1][1] = Vpl[1][1];
00116     Vple[2][2] = de * de;
00117 
00118     HepSymMatrix Vpxyze(4,0);
00119     Vpxyze = Vple.similarity(B);
00120 
00121     wtrk.setW(0,p0x);
00122     wtrk.setW(1,p0y);
00123     wtrk.setW(2,p0z);
00124     wtrk.setW(3,p0e);
00125 
00126     wtrk.setEw(Vpxyze);
00127 
00128     HepSymMatrix Vplme(4,0);
00129     Vplme[0][0] = Vpl[0][0];
00130     Vplme[1][1] = Vpl[1][1];
00131     Vplme[3][3] = de * de;
00132     wtrk.setVplm(Vplme); 
00133 
00134     HepVector plmp(4 , 0);
00135     plmp[0] = phipre;
00136     plmp[1] = lambdapre;
00137     plmp[2] = mass;
00138     plmp[3] = e;
00139     wtrk.setPlmp(plmp);
00140 
00141 
00142     setWTrackOrigin(wtrk);
00143     setWTrackInfit(wtrk);
00144     setWTrackList(number);
00145     if(number != numberWTrack()-1) {
00146         std::cout << "TrackPool: wrong track index" <<" " 
00147             <<number<<" , " <<numberWTrack()<< std::endl;
00148     }
00149     GammaShape gtrk(p4,dphi,dthe,de);
00150     setGammaShape(gtrk);
00151     setGammaShapeList(number);
00152     setMapkinematic(1);
00153     setMappositionA(m_numberone);
00154     setMappositionB(m_numbertwo);
00155     m_numberone = m_numberone + 4;
00156 }

void TrackPool::AddTrack ( const int  number,
const double  mass,
const RecMdcKalTrack trk 
) [inherited]

void TrackPool::AddTrack ( const int  number,
const double  mass,
const RecMdcTrack trk 
) [inherited]

Definition at line 22 of file TrackPool.cxx.

References DstMdcTrack::err(), ers::error, DstMdcTrack::helix(), genRecEmupikp::i, TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::numberWTrack(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), and TrackPool::setWTrackOrigin().

Referenced by DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), Pi0EtaToGGRecAlg::execute(), BeamParams::execute(), CalibEventSelect::execute(), JsiLL::execute(), DQARhopi::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), Pi0::Pi0ListToTDS(), utility::SecondaryVFit(), and utility::vfit().

00023                                 {
00024     HepVector helix(5,0);
00025     double error[15];
00026     for(int i = 0; i < 5; i++)
00027         helix[i] = trk->helix(i);
00028     for(int i = 0; i < 15; i++)
00029         error[i] = trk->err(i);
00030     WTrackParameter wtrk(mass, helix, error);
00031     setWTrackOrigin(wtrk);
00032     setWTrackInfit(wtrk);
00033     setWTrackList(number);
00034     if(number != numberWTrack()-1) {
00035         std::cout << "TrackPool: wrong track index" <<" " 
00036             <<number<<" , " <<numberWTrack()<< std::endl;
00037     }
00038     setMapkinematic(0);
00039     setMappositionA(m_numberone);
00040     setMappositionB(m_numbertwo);
00041     m_numberone = m_numberone + 4;
00042 }

void TrackPool::AddTrackVertex ( const int  number,
const double  mass,
const RecEmcShower trk 
) [inherited]

Definition at line 444 of file TrackPool.cxx.

References cos(), DstEmcShower::dE(), DstEmcShower::dphi(), DstEmcShower::dtheta(), DstEmcShower::energy(), TrackPool::m_numberone, TrackPool::m_numbertwo, TrackPool::numberWTrack(), DstEmcShower::phi(), TrackPool::setGammaShape(), TrackPool::setGammaShapeList(), TrackPool::setMapkinematic(), TrackPool::setMappositionA(), TrackPool::setMappositionB(), TrackPool::setWTrackInfit(), TrackPool::setWTrackList(), TrackPool::setWTrackOrigin(), sin(), DstEmcShower::theta(), DstEmcShower::x(), x, DstEmcShower::y(), and DstEmcShower::z().

00444                                                                                            {
00445     double ptrk = trk->energy();
00446     double e = sqrt(ptrk*ptrk + mass * mass);
00447     double the = trk->theta();
00448     double phi = trk->phi();
00449     HepLorentzVector p4(ptrk * sin(the) * cos(phi), 
00450             ptrk * sin(the) * sin(phi),
00451             ptrk * cos(the),
00452             e);
00453     double dphi = trk->dphi();
00454     double dthe = trk->dtheta();
00455     double de   = trk->dE();
00456     double x = trk->x();
00457     double y = trk->y();
00458     double z = trk->z();
00459     HepPoint3D x3 (x, y ,z);
00460     WTrackParameter wtrk(x3, p4 ,dphi ,dthe, de);
00461     setWTrackOrigin(wtrk);
00462     setWTrackInfit(wtrk);
00463     setWTrackList(number);
00464     if(number != numberWTrack()-1) {
00465         std::cout << "TrackPool: wrong track index" <<" " 
00466             <<number<<" , " <<numberWTrack()<< std::endl;
00467     }
00468     GammaShape gtrk(p4,dphi,dthe,de);
00469     setGammaShape(gtrk);
00470     setGammaShapeList(number);
00471     setMapkinematic(6);
00472     m_numbertwo = 0;
00473     setMappositionA(m_numberone);
00474     setMappositionB(m_numbertwo);
00475 
00476     m_numberone = m_numberone + 4;
00477     m_numbertwo = m_numbertwo + 3;
00478 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10,
int  n11,
int  n12 
)

Definition at line 169 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00170 {
00171         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11, n12);
00172         AddVertex(number, vpar, tlis);
00173 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10,
int  n11 
)

Definition at line 163 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00164 {
00165         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11);
00166         AddVertex(number, vpar, tlis);
00167 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9,
int  n10 
)

Definition at line 157 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00158 {
00159         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10);
00160         AddVertex(number, vpar, tlis);
00161 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8,
int  n9 
)

Definition at line 151 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00152 {
00153         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8, n9);
00154         AddVertex(number, vpar, tlis);
00155 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7,
int  n8 
)

Definition at line 145 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00146 {
00147         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7, n8);
00148         AddVertex(number, vpar, tlis);
00149 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6,
int  n7 
)

Definition at line 139 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00140 {
00141         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6, n7);
00142         AddVertex(number, vpar, tlis);
00143 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5,
int  n6 
)

Definition at line 133 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00134 {
00135         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5, n6);
00136         AddVertex(number, vpar, tlis);
00137 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4,
int  n5 
)

Definition at line 127 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00128 {
00129         std::vector<int> tlis = AddList(n1, n2, n3, n4, n5);
00130         AddVertex(number, vpar, tlis);
00131 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3,
int  n4 
)

Definition at line 121 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00122 {
00123         std::vector<int> tlis = AddList(n1, n2, n3, n4);
00124         AddVertex(number, vpar, tlis);
00125 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2,
int  n3 
)

Definition at line 115 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00116 {
00117         std::vector<int> tlis = AddList(n1, n2, n3);
00118         AddVertex(number, vpar, tlis);
00119 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
int  n1,
int  n2 
)

Definition at line 108 of file VertexFit.cxx.

References TrackPool::AddList(), AddVertex(), and vpar().

00109 {
00110         std::vector<int> tlis = AddList(n1, n2);
00111         AddVertex(number, vpar, tlis);
00112 }

void VertexFit::AddVertex ( int  number,
VertexParameter  vpar,
std::vector< int >  lis 
)

Definition at line 89 of file VertexFit.cxx.

References VertexConstraints::CommonVertexConstraints(), genRecEmupikp::i, m_vc, m_virtual_wtrk, m_vpar_infit, m_vpar_origin, VertexParameter::setVx(), vpar(), vx(), and TrackPool::wTrackOrigin().

Referenced by AddVertex(), DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), BeamParams::execute(), JsiLL::execute(), DQARhopi::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), utility::SecondaryVFit(), and utility::vfit().

00090 {
00091         VertexConstraints vc;
00092         vc.CommonVertexConstraints(tlis);
00093         m_vc.push_back(vc);
00094         HepVector vx(3, 0);
00095         for (unsigned int i = 0; i < tlis.size(); i++) 
00096                 vx += wTrackOrigin(tlis[i]).X();
00097         vx = vx/tlis.size();
00098         VertexParameter n_vpar = vpar;
00099         n_vpar.setVx(vx);
00100         m_vpar_origin.push_back(n_vpar);
00101         m_vpar_infit.push_back(n_vpar);
00102         WTrackParameter vwtrk;
00103         m_virtual_wtrk.push_back(vwtrk);
00104         if ((unsigned int)number != m_vc.size() - 1)
00105                 std::cout << "wrong kinematic constraints index" << std::endl;
00106 }

bool VertexFit::BeamFit ( int  n  ) 

Definition at line 259 of file VertexFit.cxx.

References chisq(), fitBeam(), genRecEmupikp::i, m_chicut, m_chisq, m_chiter, m_niter, m_vc, m_vpar_infit, m_vpar_origin, TrackPool::setWTrackInfit(), delete_small_size::size, swimBeam(), vpar(), TrackPool::wTrackInfit(), and TrackPool::wTrackOrigin().

00260 {
00261         bool okfit = false;
00262         if (n < 0 || (unsigned int)n >= m_vc.size()) 
00263                 return okfit;
00264         for (unsigned int i = 0; i < (m_vc[n].Ltrk()).size(); i++) 
00265         {
00266                 int itk = (m_vc[n].Ltrk())[i];
00267                 setWTrackInfit(itk, wTrackOrigin(itk));
00268         }
00269         m_vpar_infit[n] = m_vpar_origin[n];
00270 
00271         // iteration loop
00272         std::vector<double> chisq;
00273         chisq.clear();
00274         for (int it = 0; it < m_niter; it++) 
00275         {
00276                 std::vector<WTrackParameter> wlis;
00277                 wlis.clear();
00278                 for (unsigned int i = 0; i < (m_vc[n].Ltrk()).size(); i++) 
00279                 {
00280                         int itk = (m_vc[n].Ltrk())[i];
00281                         wlis.push_back(wTrackInfit(itk));
00282                 }
00283                 VertexParameter vpar = m_vpar_infit[n];
00284                 m_vc[n].UpdateConstraints(vpar, wlis);
00285 
00286                 fitBeam(n);
00287                 chisq.push_back(m_chisq[n]);
00288                 if (it > 0) 
00289                 {
00290                         double delchi = chisq[it] - chisq[it-1];
00291                         if(fabs(delchi) < m_chiter)
00292                         break;
00293                 }
00294         }
00295         if(m_chisq[n]>=m_chicut) return okfit;
00296         swimBeam(n);
00297         okfit = true;
00298         return okfit;
00299 }

void VertexFit::BuildVirtualParticle ( int  number  ) 

Definition at line 619 of file VertexFit.cxx.

References EvtCyclic3::A, EvtCyclic3::B, Ew(), VertexFitBField::getCBz(), genRecEmupikp::i, VertexFitBField::instance(), VertexConstraints::Ltrk(), m_cpu, m_E, m_factor, m_nvtrk, m_pcovInfit, m_pInfit, m_TRB, m_vc, m_virtual_wtrk, m_xcovInfit, m_xInfit, NTRKPAR, NVTXPAR, pInfit(), WTrackParameter::setCharge(), WTrackParameter::setEw(), WTrackParameter::setW(), timer, vertexCovMatrix(), TrackPool::wTrackInfit(), and TrackPool::wTrackOrigin().

Referenced by DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), JsiLL::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), and utility::SecondaryVFit().

00620 {
00621 
00622         vertexCovMatrix(n);
00623         TStopwatch timer;
00624         timer.Start();
00625 
00626         HepMatrix A(NTRKPAR, NTRKPAR * m_nvtrk, 0);
00627         HepMatrix B(NTRKPAR, NVTXPAR, 0);
00628         VertexConstraints vc = m_vc[n];
00629         unsigned int NSIZE = vc.Ltrk().size();
00630         int charge = 0;
00631 
00632         HepMatrix Ai(6, 6, 0);
00633         Ai[0][0] = 1.0;
00634         Ai[1][1] = 1.0;
00635         Ai[2][2] = 1.0;
00636         HepMatrix Bi(6, 3, 0);
00637         Bi[3][0] = 1.0;
00638         Bi[4][1] = 1.0;
00639         Bi[5][2] = 1.0;
00640         HepVector w1(6, 0);
00641         HepVector w2(7, 0);
00642         HepSymMatrix Ew(7, 0);
00643         HepMatrix ew1(6, 6, 0);
00644         HepMatrix ew2(7, 7, 0);
00645         double totalE = 0;
00646 
00647         for(unsigned int i = 0; i < NSIZE; i++) 
00648         {
00649                 int itk = vc.Ltrk()[i];
00650                 charge += wTrackInfit(itk).charge();
00651 //              double afield = VertexFitBField::instance()->getCBz(m_xInfit, pInfit(itk).sub(4, 6));
00652                 double afield = m_factor * VertexFitBField::instance()->getCBz(m_xInfit, pInfit(itk).sub(4, 6));
00653                 double a = afield * wTrackInfit(itk).charge();
00654                 
00655                 totalE += wTrackOrigin(itk).w()[3];
00656                 Ai[0][4] = a;
00657                 Ai[1][3] = -a;
00658                 Bi[0][1] = -a;
00659                 Bi[1][0] = a;
00660                 A.sub(1, NTRKPAR*itk + 1, Ai);
00661                 B += Bi;
00662         }
00663         B[3][0] = 1.0;
00664         B[4][1] = 1.0;
00665         B[5][2] = 1.0;
00666 
00667         w1  = A * m_pInfit + B * m_xInfit;
00668         ew1 = m_pcovInfit.similarity(A) + m_xcovInfit.similarity(B) + A*m_E*B.T()+B*(m_E.T())*A.T();
00669 
00670         //convert w1(6x1) to w2(7x1)
00671         w2[0] = w1[0];
00672         w2[1] = w1[1];
00673         w2[2] = w1[2];
00674         w2[3] = totalE;
00675         w2[4] = w1[3];
00676         w2[5] = w1[4];
00677         w2[6] = w1[5];
00678         //convert ew1(6x6) to ew2(7x7)
00679         m_TRB[3][0] = w1[0] / totalE;
00680         m_TRB[3][1] = w1[1] / totalE;
00681         m_TRB[3][2] = w1[2] / totalE;
00682         ew2 = m_TRB * ew1 * m_TRB.T();
00683         Ew.assign(ew2);
00684         WTrackParameter vwtrk;
00685         vwtrk.setCharge(charge);
00686         vwtrk.setW(w2);
00687         vwtrk.setEw(Ew);
00688 
00689         m_virtual_wtrk[n] = vwtrk;
00690         timer.Stop();
00691         m_cpu[5] += timer.CpuTime();
00692 }    
00693 

double VertexFit::chisq ( int  n  )  const [inline]

Definition at line 66 of file VertexFit.h.

References m_chisq.

00066 {return m_chisq[n];}

double VertexFit::chisq (  )  const [inline]

Definition at line 65 of file VertexFit.h.

References m_chi.

Referenced by BeamFit(), DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), BeamParams::execute(), DQAKsKpi::execute(), and Fit().

00065 {return m_chi;}

void TrackPool::clearGammaShape (  )  [inline, inherited]

Definition at line 139 of file TrackPool.h.

References TrackPool::m_gammashape.

Referenced by init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00139 {m_gammashape.clear();}

void TrackPool::clearGammaShapeList (  )  [inline, inherited]

Definition at line 140 of file TrackPool.h.

References TrackPool::m_lgammashape.

Referenced by init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00140 {m_lgammashape.clear();}

void TrackPool::clearMapkinematic (  )  [inline, inherited]

Definition at line 124 of file TrackPool.h.

References TrackPool::m_mapkinematic.

Referenced by init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00124 {m_mapkinematic.clear();}

void TrackPool::clearMappositionA (  )  [inline, inherited]

Definition at line 125 of file TrackPool.h.

References TrackPool::m_mappositionA.

Referenced by init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00125 {m_mappositionA.clear();}

void TrackPool::clearMappositionB (  )  [inline, inherited]

Definition at line 126 of file TrackPool.h.

References TrackPool::m_mappositionB.

Referenced by init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00126 {m_mappositionB.clear();}

void TrackPool::clearone (  )  [inline, inherited]

Definition at line 115 of file TrackPool.h.

References TrackPool::m_numberone.

Referenced by init(), KinematicFit::init(), and KalmanKinematicFit::init().

00115 {m_numberone = 0;}

void TrackPool::cleartwo (  )  [inline, inherited]

Definition at line 116 of file TrackPool.h.

References TrackPool::m_numbertwo.

Referenced by init(), KinematicFit::init(), and KalmanKinematicFit::init().

00116 {m_numbertwo = 0;}

void TrackPool::clearWTrackInfit (  )  [inline, inherited]

Definition at line 112 of file TrackPool.h.

References TrackPool::m_wtrk_infit.

Referenced by init(), SecondVertexFit::init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00112 {m_wtrk_infit.clear();}

void TrackPool::clearWTrackList (  )  [inline, inherited]

Definition at line 113 of file TrackPool.h.

References TrackPool::m_lwtrk.

Referenced by init(), SecondVertexFit::init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00113 {m_lwtrk.clear();}

void TrackPool::clearWTrackOrigin (  )  [inline, inherited]

Definition at line 111 of file TrackPool.h.

References TrackPool::m_wtrk_origin.

Referenced by init(), SecondVertexFit::init(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00111 {m_wtrk_origin.clear();}

HepVector VertexFit::Convert67 ( const double &  mass,
const HepVector &  p 
) [private]

Definition at line 893 of file VertexFit.cxx.

Referenced by pull(), and swimVertex().

00893 {
00894 //      assert(p.num_row() == 6);
00895         HepVector m(7, 0);
00896         m.sub(1, p.sub(1, 3));
00897         m.sub(5, p.sub(4, 6));
00898         m[3] = sqrt(mass*mass + p[0]*p[0] + p[1]*p[1] + p[2]*p[2]);
00899         return m;
00900 }
00901 

HepVector VertexFit::Convert76 ( const HepVector &  p  )  [private]

Definition at line 903 of file VertexFit.cxx.

Referenced by Fit().

00903 {
00904 //      assert(p.num_row() == 7);
00905         HepVector m(6, 0);
00906         m.sub(1, p.sub(1, 3));
00907         m.sub(4, p.sub(5, 7));
00908         return m;
00909 }
00910 

HepVector VertexFit::cpu (  )  const [inline]

Definition at line 81 of file VertexFit.h.

References m_cpu.

00081 {return m_cpu;}

double VertexFit::errorVx ( int  n,
int  i 
) const [inline]

Definition at line 87 of file VertexFit.h.

References Evx(), and m_vpar_infit.

00087 { return sqrt((m_vpar_infit[n].Evx())[i][i]);}

HepSymMatrix VertexFit::Evx ( int  n  )  const [inline]

Definition at line 86 of file VertexFit.h.

References m_vpar_infit.

Referenced by errorVx(), PrimaryVertex::execute(), and Gam4pikp::execute().

00086 { return m_vpar_infit[n].Evx();}

HepSymMatrix VertexFit::Ew ( int  n  )  const [inline]

Definition at line 77 of file VertexFit.h.

References TrackPool::wTrackInfit().

Referenced by BuildVirtualParticle(), Fit(), and swimVertex().

00077 {return wTrackInfit(n).Ew();}

double VertexFit::factor (  )  const [inline]

Definition at line 50 of file VertexFit.h.

References m_factor.

Referenced by setMagCorrFactor().

00050 { return m_factor; }

bool VertexFit::Fit ( int  n  ) 

Definition at line 175 of file VertexFit.cxx.

References chisq(), Convert76(), Ew(), fitVertex(), m_A, m_AT, m_B, m_BT, m_chicut, m_chisq, m_chiter, m_cpu, m_E, m_G, m_niter, m_nvtrk, m_pcovInfit, m_pcovOrigin, m_pInfit, m_pOrigin, m_TRA, m_vc, m_vpar_infit, m_vpar_origin, m_W, m_xcovInfit, m_xcovInfitInversed, m_xcovOrigin, m_xcovOriginInversed, m_xInfit, m_xOrigin, NCONSTR, NTRKPAR, TrackPool::numberWTrack(), NVTXPAR, setPCovOrigin(), setPOrigin(), TrackPool::setWTrackInfit(), timer, UpdateConstraints(), w(), and TrackPool::wTrackOrigin().

00176 {
00177         bool okfit = false;
00178         TStopwatch timer;
00179         m_cpu = HepVector(10, 0);
00180         if (n < 0 || (unsigned int)n >= m_vc.size()) return okfit;
00181 
00182         timer.Start();
00183         int ifail;
00184         m_nvtrk = numberWTrack();
00185 
00186         m_pOrigin = HepVector(m_nvtrk * NTRKPAR, 0);
00187         m_pInfit  = HepVector(m_nvtrk * NTRKPAR, 0);
00188         m_pcovOrigin = HepSymMatrix(m_nvtrk * NTRKPAR, 0);
00189         m_pcovInfit  = HepSymMatrix(m_nvtrk * NTRKPAR, 0);
00190   
00191         int ntrk = numberWTrack();
00192         for(unsigned int itk = 0; itk < ntrk; itk++) 
00193         {
00194                 setWTrackInfit(itk, wTrackOrigin(itk));
00195                 setPOrigin(itk, Convert76(wTrackOrigin(itk).w()));
00196                 setPCovOrigin(itk, wTrackOrigin(itk).Ew().similarity(m_TRA));
00197         }
00198         m_pInfit = m_pOrigin;
00199 
00200         m_xOrigin = HepVector(NVTXPAR, 0);
00201         m_xInfit  = HepVector(NVTXPAR, 0);
00202         m_xcovOrigin = HepSymMatrix(NVTXPAR, 0);
00203         m_xcovInfit  = HepSymMatrix(NVTXPAR, 0);
00204         m_xcovOriginInversed = HepSymMatrix(NVTXPAR, 0);
00205         m_xcovInfitInversed  = HepSymMatrix(NVTXPAR, 0);
00206 
00207         m_xOrigin = m_vpar_origin[n].Vx();
00208         m_xcovOrigin = m_vpar_origin[n].Evx();
00209         m_xcovOriginInversed = m_xcovOrigin.inverse(ifail);
00210         m_xInfit = m_xOrigin;
00211 
00212         m_vpar_infit[n] = m_vpar_origin[n];
00213 
00214         m_B = HepMatrix(NCONSTR*m_nvtrk, NVTXPAR, 0);
00215         m_A = HepMatrix(NCONSTR*m_nvtrk, NTRKPAR*m_nvtrk, 0);
00216         m_BT = HepMatrix(NVTXPAR,NCONSTR*m_nvtrk, 0);
00217         m_AT = HepMatrix(NTRKPAR*m_nvtrk, NCONSTR*m_nvtrk, 0);
00218         m_G = HepVector(NCONSTR*m_nvtrk, 0);
00219         m_W = HepSymMatrix(NCONSTR*m_nvtrk, 0);
00220         m_E = HepMatrix(NTRKPAR*m_nvtrk, NVTXPAR, 0);
00221  
00222         timer.Stop();
00223         m_cpu[0] += timer.CpuTime();
00224 
00225         // iteration loop
00226         std::vector<double> chisq;
00227         chisq.clear();
00228         for (int it = 0; it < m_niter; it++)
00229         {
00230                 timer.Start();
00231                 UpdateConstraints(m_vc[n]);
00232                 timer.Stop();
00233                 m_cpu[1] += timer.CpuTime();
00234                 timer.Start();
00235                 fitVertex(n);
00236                 timer.Stop();
00237                 m_cpu[2] += timer.CpuTime();
00238                 chisq.push_back(m_chisq[n]);
00239                 if (it > 0) 
00240                 {
00241                         double delchi = chisq[it] - chisq[it-1];
00242                         if (fabs(delchi) < m_chiter) break;
00243                 }
00244         }
00245 
00246         /*REVISED
00247         if(m_chisq[n] >= m_chicut || m_chisq[n] < 0) return okfit;
00248         REVISED*/
00249         if (m_chisq[n] >= m_chicut) return okfit;
00250 
00251         // update vertex and its covariance
00252         m_vpar_infit[n].setVx(m_xInfit);
00253         m_vpar_infit[n].setEvx(m_xcovInfit);
00254 
00255         okfit = true;
00256         return okfit;
00257 }

bool VertexFit::Fit (  ) 

Definition at line 301 of file VertexFit.cxx.

References m_chi, m_chicut, m_chisq, m_vc, and swimVertex().

Referenced by DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), BeamParams::execute(), JsiLL::execute(), DQARhopi::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), utility::SecondaryVFit(), and utility::vfit().

00302 {
00303         bool okfit = false;
00304         double mychi = 0;
00305         for (unsigned int n = 0; n<(int)(m_vc.size()); n++) 
00306         {
00307                 Fit(n);
00308                 if (m_chisq[n] >= m_chicut) return okfit;
00309                 swimVertex(n);
00310                 mychi = mychi + m_chisq[n];
00311         }
00312         m_chi = mychi;
00313         okfit = true;
00314         return okfit;
00315 }

void VertexFit::fitBeam ( int  n  )  [private]

Definition at line 493 of file VertexFit.cxx.

Referenced by BeamFit().

00494 {
00495 /*
00496         if(m_chisq.size() == 0) {
00497     for(unsigned int i = 0; i < m_vc.size(); i++)
00498       m_chisq.push_back(0.0);
00499   }
00500 
00501   VertexConstraints vc = m_vc[n];
00502   VertexParameter   vpar = m_vpar_origin[n];
00503 
00504   unsigned int NSIZE = vc.Ltrk().size();
00505   int ifail;
00506 
00507   // get VD, lambda
00508   for(unsigned int i = 0; i < NSIZE; i++) {
00509     int itk = vc.Ltrk()[i];
00510     HepVector dela0(7, 0);
00511     dela0 = wTrackOrigin(itk).w()-wTrackInfit(itk).w();
00512     HepSymMatrix vd(2, 0);
00513     vd = ((wTrackOrigin(itk).Ew()).similarity(vc.Dc()[i])).inverse(ifail);
00514     HepVector lambda(2, 0);
00515     lambda = vd*(vc.Dc()[i]*dela0+vc.dc()[i]);
00516     vc.setVD(i, vd);
00517     vc.setLambda(i, lambda);
00518   }
00519   // get new dela = dela0 - Va0 Dt lambda
00520   // get new Va
00521   // get chisq
00522   HepMatrix covax(7, 3, 0);
00523   m_chisq[n] = 0;
00524   for(unsigned int i = 0; i < NSIZE; i++) {
00525     HepVector DtL(7, 0);
00526     DtL = (vc.Dc()[i]).T() * vc.lambda()[i];
00527     int itk = vc.Ltrk()[i];
00528     HepVector dela(7, 0);
00529     HepVector dela0(7, 0);
00530     dela0 = wTrackOrigin(itk).w()-wTrackInfit(itk).w();
00531     WTrackParameter wtrk = wTrackOrigin(itk);
00532     dela = -wTrackOrigin(itk).Ew() * DtL; 
00533     wtrk.setW(wtrk.w()+dela);
00534     HepSymMatrix Va(7, 0);
00535     HepSymMatrix Va0(7, 0);
00536     Va0 = wTrackOrigin(itk).Ew();
00537     HepMatrix DcT(7, 2, 0);
00538     DcT = (vc.Dc()[i]).T();
00539     HepSymMatrix DVdD(7, 0);
00540     DVdD = (vc.VD()[i]).similarity(DcT);
00541     Va = Va0 - DVdD.similarity(Va0);
00542     wtrk.setEw(Va);
00543     setWTrackInfit(itk, wtrk);
00544     HepVector dc(2, 0);
00545     dc = vc.Dc()[i]*dela0 +vc.dc()[i];
00546     m_chisq[n] = m_chisq[n] + dot(vc.lambda()[i], dc);
00547   }
00548   m_vpar_infit[n] = vpar;
00549   m_vc[n] = vc;
00550 */
00551 //No needed
00552 }

void VertexFit::fitVertex ( int  n  )  [private]

Definition at line 317 of file VertexFit.cxx.

References alpha, genRecEmupikp::i, VertexConstraints::Ltrk(), m_chisq, m_E, m_G, m_KQ, m_nvtrk, m_vc, m_W, m_xcovInfit, m_xcovInfitInversed, m_xcovOriginInversed, m_xInfit, m_xOrigin, NCONSTR, NTRKPAR, NVTXPAR, pcovOrigin(), pOrigin(), setE(), setKQ(), setPInfit(), delete_small_size::size, T, timer, vfAT(), vfBT(), vfG(), vfKQ(), and vfW().

Referenced by Fit().

00318 {
00319         if (m_chisq.size() == 0) 
00320         {
00321                 for (unsigned int i = 0; i < m_vc.size(); i++)
00322                 m_chisq.push_back(9999.0);
00323         }
00324         TStopwatch timer;
00325         VertexConstraints vc = m_vc[n];
00326 
00327         int ifail;
00328         int NSIZE = (vc.Ltrk()).size();
00329 
00330         // get new Vx
00331         timer.Start();
00332         m_xcovInfitInversed = m_xcovOriginInversed;
00333 
00334         for (unsigned int i = 0; i < NSIZE; i++) 
00335         {
00336                 int itk = (vc.Ltrk())[i];
00337                 m_xcovInfitInversed += vfW(itk).similarity(vfBT(itk));
00338         }
00339         m_xcovInfit = m_xcovInfitInversed.inverse(ifail);
00340   
00341         // calculate Kq and E
00342         m_KQ = HepMatrix(NVTXPAR, m_nvtrk * NCONSTR, 0);
00343         m_E  = HepMatrix(m_nvtrk*NTRKPAR, NVTXPAR, 0);
00344         for (unsigned int i = 0; i < NSIZE; i++) 
00345         {
00346                 int itk = (vc.Ltrk())[i];
00347                 setKQ(itk, (m_xcovInfit * vfBT(itk) * vfW(itk)));
00348                 setE(itk, (-pcovOrigin(itk) * vfAT(itk) * vfKQ(itk).T()));
00349         }
00350         // update vertex position
00351         m_xInfit = m_xOrigin;
00352         for (unsigned int i = 0; i < NSIZE; i++) 
00353         {
00354                 int itk = (vc.Ltrk())[i];
00355                 m_xInfit -= vfKQ(itk) * vfG(itk);
00356         }
00357         // update Track parameter
00358         HepVector dq0q(NVTXPAR, 0);
00359         dq0q = m_xcovInfitInversed * (m_xOrigin - m_xInfit);
00360         for (unsigned int i = 0; i < NSIZE; i++) 
00361         {
00362                 int itk = (vc.Ltrk())[i];
00363                 HepVector alpha(NTRKPAR, 0);
00364                 alpha = pOrigin(itk) - pcovOrigin(itk) * vfAT(itk) * (vfW(itk)*vfG(itk) - vfKQ(itk).T()*dq0q);
00365                 setPInfit(itk, alpha);
00366         }
00367         // get chisquare value
00368         m_chisq[n] = (m_W.similarity(m_G.T())- m_xcovInfitInversed.similarity((m_xInfit-m_xOrigin).T()))[0][0];
00369 }

int TrackPool::GammaShapeList ( int  n  )  const [inline, inherited]

Definition at line 98 of file TrackPool.h.

References TrackPool::m_lgammashape.

00098 {return m_lgammashape[n];}

std::vector<int> TrackPool::GammaShapeList (  )  const [inline, inherited]

Definition at line 96 of file TrackPool.h.

References TrackPool::m_lgammashape.

Referenced by KinematicFit::gda(), and KalmanKinematicFit::gda().

00096 {return m_lgammashape;}

GammaShape TrackPool::GammaShapeValue ( int  n  )  const [inline, inherited]

Definition at line 97 of file TrackPool.h.

References TrackPool::m_gammashape.

00097 {return m_gammashape[n];}

std::vector<GammaShape> TrackPool::GammaShapeValue (  )  const [inline, inherited]

Definition at line 95 of file TrackPool.h.

References TrackPool::m_gammashape.

Referenced by KinematicFit::gda(), and KalmanKinematicFit::gda().

00095 {return m_gammashape;}

HepPoint3D TrackPool::getBeamPosition (  )  const [inline, inherited]

Definition at line 147 of file TrackPool.h.

References TrackPool::m_BeamPosition.

Referenced by KalmanKinematicFit::Fit().

00147 {return m_BeamPosition;}

HepSymMatrix TrackPool::getVBeamPosition (  )  const [inline, inherited]

Definition at line 148 of file TrackPool.h.

References TrackPool::m_VBeamPosition.

Referenced by KalmanKinematicFit::Fit().

00148 {return m_VBeamPosition;}

void VertexFit::init (  ) 

Definition at line 29 of file VertexFit.cxx.

References TrackPool::clearGammaShape(), TrackPool::clearGammaShapeList(), TrackPool::clearMapkinematic(), TrackPool::clearMappositionA(), TrackPool::clearMappositionB(), TrackPool::clearone(), TrackPool::cleartwo(), TrackPool::clearWTrackInfit(), TrackPool::clearWTrackList(), TrackPool::clearWTrackOrigin(), m_chi, m_chicut, m_chisq, m_chiter, m_factor, m_niter, m_TRA, m_TRB, m_vc, m_virtual_wtrk, m_vpar_infit, and m_vpar_origin.

Referenced by DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), BeamParams::execute(), JsiLL::execute(), DQARhopi::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), DQAKsInfo::init(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), utility::SecondaryVFit(), and utility::vfit().

00030 {
00031         //derived from TrackPool
00032         clearWTrackOrigin();
00033         clearWTrackInfit();
00034         clearWTrackList();
00035         clearGammaShape();
00036         clearGammaShapeList();
00037         clearMapkinematic();
00038         clearMappositionA();
00039         clearMappositionB();
00040         clearone();
00041         cleartwo();
00042 
00043         m_vpar_origin.clear();
00044         m_vpar_infit.clear();
00045         m_vc.clear();
00046         m_chisq.clear();
00047         m_chi = 9999.;
00048         m_virtual_wtrk.clear();
00049         m_niter = 10;
00050         m_chiter = 1.0e-3;
00051         m_chicut = 1000;
00052 
00053         m_TRA = HepMatrix(6, 7, 0);
00054         m_TRA[0][0] = 1.0;
00055         m_TRA[1][1] = 1.0;
00056         m_TRA[2][2] = 1.0;
00057         m_TRA[3][4] = 1.0;
00058         m_TRA[4][5] = 1.0;
00059         m_TRA[5][6] = 1.0;
00060         m_TRB = HepMatrix(7, 6, 0);
00061         m_TRB[0][0] = 1.0;
00062         m_TRB[1][1] = 1.0;
00063         m_TRB[2][2] = 1.0;
00064         m_TRB[4][3] = 1.0;
00065         m_TRB[5][4] = 1.0;
00066         m_TRB[6][5] = 1.0;
00067 
00068         m_factor = 1.000;
00069 }

VertexFit * VertexFit::instance (  )  [static]

Definition at line 15 of file VertexFit.cxx.

References m_pointer, and VertexFit().

Referenced by DQADtag::DQADtag(), DQAKsInfo::DQAKsInfo(), LambdaReconstruction::execute(), KShortReconstruction::execute(), PrimaryVertex::execute(), BeamParams::execute(), JsiLL::execute(), DQARhopi::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), utility::SecondaryVFit(), and utility::vfit().

00016 {
00017         if (m_pointer) return m_pointer;
00018         m_pointer = new VertexFit();
00019         return m_pointer;
00020 }

vector<int> TrackPool::mapkinematic (  )  const [inline, inherited]

Definition at line 122 of file TrackPool.h.

References TrackPool::m_mapkinematic.

Referenced by KalmanKinematicFit::Fit(), KalmanKinematicFit::gda(), KalmanKinematicFit::getCInfit(), KalmanKinematicFit::getCOrigin(), KalmanKinematicFit::pInfit(), KalmanKinematicFit::pOrigin(), KalmanKinematicFit::pull(), and KalmanKinematicFit::updateConstraints().

00122 {return m_mapkinematic;}

vector<int> TrackPool::mappositionA (  )  const [inline, inherited]

Definition at line 120 of file TrackPool.h.

References TrackPool::m_mappositionA.

Referenced by KalmanKinematicFit::Fit(), KalmanKinematicFit::gda(), KalmanKinematicFit::getCInfit(), KalmanKinematicFit::getCOrigin(), KalmanKinematicFit::pInfit(), KalmanKinematicFit::pOrigin(), KalmanKinematicFit::pull(), and KalmanKinematicFit::updateConstraints().

00120 {return m_mappositionA;}

vector<int> TrackPool::mappositionB (  )  const [inline, inherited]

Definition at line 121 of file TrackPool.h.

References TrackPool::m_mappositionB.

Referenced by KalmanKinematicFit::Fit(), KalmanKinematicFit::gda(), KalmanKinematicFit::getCInfit(), KalmanKinematicFit::getCOrigin(), KalmanKinematicFit::pInfit(), KalmanKinematicFit::pOrigin(), KalmanKinematicFit::pull(), and KalmanKinematicFit::updateConstraints().

00121 {return m_mappositionB;}

int TrackPool::numberGammaShape (  )  const [inline, inherited]

Definition at line 99 of file TrackPool.h.

References TrackPool::m_lgammashape.

Referenced by KinematicFit::gda(), and KalmanKinematicFit::gda().

00099 { return ((int)(m_lgammashape.size()) );} 

int TrackPool::numberone (  )  const [inline, inherited]

Definition at line 117 of file TrackPool.h.

References TrackPool::m_numberone.

Referenced by KalmanKinematicFit::BuildVirtualParticle(), KalmanKinematicFit::Fit(), KalmanKinematicFit::fit(), and KalmanKinematicFit::upCovmtx().

00117 {return m_numberone;}

int TrackPool::numbertwo (  )  const [inline, inherited]

Definition at line 118 of file TrackPool.h.

References TrackPool::m_numbertwo.

Referenced by KalmanKinematicFit::Fit(), KalmanKinematicFit::fit(), and KalmanKinematicFit::upCovmtx().

00118 {return m_numbertwo;}

int TrackPool::numberWTrack (  )  const [inline, inherited]

Definition at line 79 of file TrackPool.h.

References TrackPool::m_lwtrk.

Referenced by KinematicFit::AddFourMomentum(), KalmanKinematicFit::AddFourMomentum(), KinematicFit::AddThreeMomentum(), KalmanKinematicFit::AddThreeMomentum(), TrackPool::AddTrack(), TrackPool::AddTrackVertex(), Fit(), KinematicFit::Fit(), KinematicFit::fit(), KalmanKinematicFit::Fit(), KalmanKinematicFit::fit(), KinematicFit::gda(), KalmanKinematicFit::gda(), and KinematicFit::upCovmtx().

00079 { return ((int)(m_lwtrk.size()));}

HepSymMatrix VertexFit::pcovInfit ( int  i  )  const [inline, private]

Definition at line 156 of file VertexFit.h.

References m_pcovInfit, and NTRKPAR.

Referenced by pull(), and swimVertex().

00156 { return m_pcovInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }

HepSymMatrix VertexFit::pcovOrigin ( int  i  )  const [inline, private]

Definition at line 148 of file VertexFit.h.

References m_pcovOrigin, and NTRKPAR.

Referenced by fitVertex(), UpdateConstraints(), and vertexCovMatrix().

00148 { return m_pcovOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }

HepLorentzVector VertexFit::pfit ( int  n  )  const [inline]

Definition at line 74 of file VertexFit.h.

References TrackPool::wTrackInfit().

00074 {return wTrackInfit(n).p();}

HepVector VertexFit::pInfit ( int  i  )  const [inline, private]

Definition at line 154 of file VertexFit.h.

References m_pInfit, and NTRKPAR.

Referenced by BuildVirtualParticle(), pull(), swimVertex(), and UpdateConstraints().

00154 { return m_pInfit.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }

HepVector VertexFit::pOrigin ( int  i  )  const [inline, private]

Definition at line 146 of file VertexFit.h.

References m_pOrigin, and NTRKPAR.

Referenced by fitVertex(), and UpdateConstraints().

00146 { return m_pOrigin.sub(i*NTRKPAR+1, (i+1)*NTRKPAR); }

bool VertexFit::pull ( int  n,
int  itk,
HepVector &  p 
)

Definition at line 457 of file VertexFit.cxx.

References abs, WTrackParameter::charge(), Convert67(), HTrackParameter::eHel(), HTrackParameter::helix(), genRecEmupikp::i, m_TRB, WTrackParameter::mass(), pcovInfit(), pInfit(), WTrackParameter::setCharge(), WTrackParameter::setEw(), WTrackParameter::setW(), vertexCovMatrix(), and TrackPool::wTrackOrigin().

Referenced by BeamParams::execute().

00458 {
00459         assert(p.num_row() == 5);
00460         vertexCovMatrix(n);
00461         
00462         WTrackParameter wtrk0, wtrk1;
00463         HepVector w1(6, 0);
00464         HepVector w2(7, 0);
00465         HepSymMatrix ew1(6, 0);
00466         HepSymMatrix ew2(7, 0);
00467         wtrk0 = wTrackOrigin(itk);
00468         w1  = pInfit(itk);
00469         ew1 = pcovInfit(itk);
00470         w2  = Convert67(wtrk0.mass(), w1);
00471         m_TRB[3][0] = w2[0] / w2[3];
00472         m_TRB[3][1] = w2[1] / w2[3];
00473         m_TRB[3][2] = w2[2] / w2[3];
00474         ew2 = ew1.similarity(m_TRB);
00475         wtrk1.setW(w2);
00476         wtrk1.setEw(ew2);
00477         wtrk1.setCharge(wtrk0.charge());
00478 
00479         HTrackParameter htrk0(wtrk0);
00480         HTrackParameter htrk1(wtrk1);
00481         for (int i = 0; i < 5; i++) 
00482         {
00483                 double del = htrk0.eHel()[i][i] - htrk1.eHel()[i][i];
00484                 if (del == 0.0) 
00485                 {
00486                         return false;
00487                 }
00488                 p[i] = (htrk0.helix()[i] - htrk1.helix()[i]) / sqrt(abs(del));
00489         } 
00490         return true;
00491 }

void VertexFit::setA ( int  i,
const HepMatrix &  d 
) [inline, private]

Definition at line 170 of file VertexFit.h.

References m_A, NCONSTR, and NTRKPAR.

Referenced by UpdateConstraints().

00170 {m_A.sub(i*NCONSTR+1, i*NTRKPAR+1, d);}

void VertexFit::setAT ( int  i,
const HepMatrix &  d 
) [inline, private]

Definition at line 174 of file VertexFit.h.

References m_AT, NCONSTR, and NTRKPAR.

Referenced by UpdateConstraints().

00174 {m_AT.sub(i*NTRKPAR+1, i*NCONSTR+1, d);}

void VertexFit::setB ( int  i,
const HepMatrix &  e 
) [inline, private]

Definition at line 162 of file VertexFit.h.

References m_B, and NCONSTR.

Referenced by UpdateConstraints().

00162 {m_B.sub(i*NCONSTR+1, 1, e);}

void TrackPool::setBeamPosition ( const HepPoint3D  BeamPosition  )  [inline, inherited]

Definition at line 143 of file TrackPool.h.

References TrackPool::m_BeamPosition.

Referenced by Gam4pikp::execute(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00143 {m_BeamPosition = BeamPosition;}

void VertexFit::setBT ( int  i,
const HepMatrix &  e 
) [inline, private]

Definition at line 166 of file VertexFit.h.

References m_BT, and NCONSTR.

Referenced by UpdateConstraints().

00166 {m_BT.sub(1, i*NCONSTR+1, e);}

void VertexFit::setChisqCut ( const double  chicut = 1000,
const double  chiter = 1.0e-3 
) [inline]

Definition at line 48 of file VertexFit.h.

References m_chicut, and m_chiter.

Referenced by DQAKsInfo::calculate().

00048 { m_chicut = chicut;m_chiter = chiter; }

void VertexFit::setE ( int  i,
const HepMatrix &  p 
) [inline, private]

Definition at line 190 of file VertexFit.h.

References m_E, and NTRKPAR.

Referenced by fitVertex().

00190 {m_E.sub(i*NTRKPAR+1, 1, p);}

void VertexFit::setG ( int  i,
const HepVector &  p 
) [inline, private]

Definition at line 182 of file VertexFit.h.

References m_G, and NCONSTR.

Referenced by UpdateConstraints().

00182 {m_G.sub(i*NCONSTR+1, p);}

void TrackPool::setGammaShape ( const GammaShape  gammashape  )  [inline, inherited]

Definition at line 136 of file TrackPool.h.

References TrackPool::m_gammashape.

00136 {m_gammashape.push_back(gammashape);}

void TrackPool::setGammaShape ( const int  n,
const GammaShape  gammashape 
) [inline, inherited]

Definition at line 135 of file TrackPool.h.

References TrackPool::m_gammashape.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00135 {m_gammashape[n] = gammashape;}

void TrackPool::setGammaShapeList ( const int  n  )  [inline, inherited]

Definition at line 137 of file TrackPool.h.

References TrackPool::m_lgammashape.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00137 {m_lgammashape.push_back(n);}

void VertexFit::setIterNumber ( const int  niter = 10  )  [inline]

Definition at line 47 of file VertexFit.h.

References m_niter.

00047 { m_niter = niter; }

void VertexFit::setKQ ( int  i,
const HepMatrix &  d 
) [inline, private]

Definition at line 178 of file VertexFit.h.

References m_KQ, and NCONSTR.

Referenced by fitVertex().

00178 {m_KQ.sub(1, i*NCONSTR+1, d);}

void VertexFit::setMagCorrFactor ( const double  factor = 1.000  )  [inline]

Definition at line 49 of file VertexFit.h.

References factor(), and m_factor.

00049 { m_factor = factor; }

void TrackPool::setMapkinematic ( const int  n  )  [inline, inherited]

Definition at line 128 of file TrackPool.h.

References TrackPool::m_mapkinematic.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00128 {m_mapkinematic.push_back(n);}

void TrackPool::setMappositionA ( const int  n  )  [inline, inherited]

Definition at line 129 of file TrackPool.h.

References TrackPool::m_mappositionA.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00129 {m_mappositionA.push_back(n);}

void TrackPool::setMappositionB ( const int  n  )  [inline, inherited]

Definition at line 130 of file TrackPool.h.

References TrackPool::m_mappositionB.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00130 {m_mappositionB.push_back(n);}

void VertexFit::setPCovInfit ( int  i,
const HepSymMatrix &  v 
) [inline, private]

Definition at line 157 of file VertexFit.h.

References m_pcovInfit, and NTRKPAR.

Referenced by vertexCovMatrix().

00157 { m_pcovInfit.sub(i*NTRKPAR+1, v); }

void VertexFit::setPCovOrigin ( int  i,
const HepSymMatrix &  v 
) [inline, private]

Definition at line 149 of file VertexFit.h.

References m_pcovOrigin, and NTRKPAR.

Referenced by Fit().

00149 { m_pcovOrigin.sub(i*NTRKPAR+1,v); }

void VertexFit::setPInfit ( int  i,
const HepVector &  p 
) [inline, private]

Definition at line 155 of file VertexFit.h.

References m_pInfit, and NTRKPAR.

Referenced by fitVertex().

00155 { m_pInfit.sub(i*NTRKPAR+1, p); }

void VertexFit::setPOrigin ( int  i,
const HepVector &  p 
) [inline, private]

Definition at line 147 of file VertexFit.h.

References m_pOrigin, and NTRKPAR.

Referenced by Fit().

00147 { m_pOrigin.sub(i*NTRKPAR+1, p); }

void TrackPool::setVBeamPosition ( const HepSymMatrix  VBeamPosition  )  [inline, inherited]

Definition at line 144 of file TrackPool.h.

References TrackPool::m_VBeamPosition.

Referenced by Gam4pikp::execute(), KinematicFit::init(), KalmanKinematicFit::init(), and TrackPool::TrackPool().

00144 {m_VBeamPosition = VBeamPosition;} 

void VertexFit::setW ( int  i,
HepSymMatrix &  m 
) [inline, private]

Definition at line 186 of file VertexFit.h.

References m_W, and NCONSTR.

Referenced by UpdateConstraints().

00186 {m_W.sub(i*NCONSTR+1, m);}

void TrackPool::setWTrackInfit ( const WTrackParameter  wtrk  )  [inline, inherited]

Definition at line 108 of file TrackPool.h.

References TrackPool::m_wtrk_infit.

00108 {m_wtrk_infit.push_back(wtrk);}

void TrackPool::setWTrackInfit ( const int  n,
const WTrackParameter  wtrk 
) [inline, inherited]

Definition at line 106 of file TrackPool.h.

References TrackPool::m_wtrk_infit.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), TrackPool::AddTrackVertex(), BeamFit(), KinematicFit::covMatrix(), Fit(), KinematicFit::Fit(), KalmanKinematicFit::Fit(), KinematicFit::pull(), KalmanKinematicFit::pull(), swimVertex(), and KinematicFit::upCovmtx().

00106 {m_wtrk_infit[n] = wtrk;}

void TrackPool::setWTrackList ( const int  n  )  [inline, inherited]

Definition at line 109 of file TrackPool.h.

References TrackPool::m_lwtrk.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00109 {m_lwtrk.push_back(n);}

void TrackPool::setWTrackOrigin ( const WTrackParameter  wtrk  )  [inline, inherited]

Definition at line 107 of file TrackPool.h.

References TrackPool::m_wtrk_origin.

00107 {m_wtrk_origin.push_back(wtrk);}

void TrackPool::setWTrackOrigin ( const int  n,
const WTrackParameter  wtrk 
) [inline, inherited]

Definition at line 105 of file TrackPool.h.

References TrackPool::m_wtrk_origin.

Referenced by TrackPool::AddMissTrack(), TrackPool::AddTrack(), and TrackPool::AddTrackVertex().

00105 {m_wtrk_origin[n] = wtrk;}

void VertexFit::setXCovInfit ( const HepSymMatrix &  v  )  [inline, private]

Definition at line 139 of file VertexFit.h.

References m_xcovInfit.

00139 {m_xcovInfit = v;}

void VertexFit::setXCovInfitInversed ( const HepSymMatrix &  v  )  [inline, private]

Definition at line 141 of file VertexFit.h.

References m_xcovInfitInversed.

void VertexFit::setXCovOrigin ( const HepSymMatrix &  v  )  [inline, private]

Definition at line 128 of file VertexFit.h.

References m_xcovOrigin.

00128 {m_xcovOrigin = v;}

void VertexFit::setXCovOriginInversed ( const HepSymMatrix &  v  )  [inline, private]

Definition at line 130 of file VertexFit.h.

References m_xcovOriginInversed.

void VertexFit::setXInfit ( const HepVector &  x  )  [inline, private]

Definition at line 137 of file VertexFit.h.

References m_xInfit.

00137 {m_xInfit = x;}

void VertexFit::setXOrigin ( const HepVector &  x  )  [inline, private]

Definition at line 126 of file VertexFit.h.

References m_xOrigin.

00126 { m_xOrigin = x;}

void VertexFit::Swim ( int  n  )  [inline]

Definition at line 58 of file VertexFit.h.

References swimVertex(), and vertexCovMatrix().

Referenced by DQAKsInfo::calculate(), JsiLL::execute(), DQARhopi::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), utility::SecondaryVFit(), and utility::vfit().

00058 { vertexCovMatrix(n); swimVertex(n);}

void VertexFit::swimBeam ( int  n  )  [private]

Definition at line 555 of file VertexFit.cxx.

Referenced by BeamFit().

00556 {
00557 /*
00558   // const double alpha = -0.00299792458;
00559   //
00560   //  Track parameter can be expressed as:
00561   // 
00562   //  px = px0 + a*(y0 - yv)
00563   //  py = py0 - a*(x0 - xv)
00564   //  pz = pz0
00565   //  e  = e
00566   //  x  = xv
00567   //  y  = yv
00568   //  z  = zv
00569   //
00570   //  thus p = A * a + B * vx
00571   //      x = vx
00572 
00573   
00574   VertexConstraints vc = m_vc[n];
00575   VertexParameter  vpar = m_vpar_infit[n];
00576   unsigned int NSIZE = vc.Ltrk().size();
00577 
00578   for(unsigned int i = 0; i < NSIZE; i++) {
00579     int itk = vc.Ltrk()[i];
00580     HepMatrix A(4, 7, 0);
00581     HepMatrix B(4, 3, 0);
00582     
00583     double afield = VertexFitBField::instance()->getCBz(vpar.Vx(), pInfit(itk).sub(4, 6));
00584     double a = afield * wTrackInfit(itk).charge();
00585     A[0][0] = 1.0;
00586     A[0][5] = a;
00587     A[1][1] = 1.0;
00588     A[1][4] = -a;
00589     A[2][2] = 1.0;
00590     A[3][3] = 1.0;
00591     B[0][1] = -a;
00592     B[1][0] = a;
00593     HepVector p(4, 0);
00594     p = A * wTrackInfit(itk).w() + B * vpar.Vx();
00595     HepVector x(3, 0);
00596     x = vpar.Vx();
00597     HepVector w(7, 0);
00598     HepSymMatrix Ew(7, 0);
00599     for(int j = 0; j < 4; j++)
00600       w[j] = p[j];
00601     for(int j = 0; j < 3; j++)
00602       w[j+4] = x[j];
00603 
00604     WTrackParameter wtrk;
00605     wtrk.setCharge(wTrackInfit(itk).charge());
00606     wtrk.setW(w);
00607     HepSymMatrix Vpv(4, 0);
00608     Vpv = (wTrackInfit(itk).Ew()).similarity(A);
00609     for(int j = 0; j < 4; j++) 
00610       for(int k= 0; k < 4; k++) 
00611         Ew[j][k] = Vpv[j][k];
00612     wtrk.setEw(Ew);
00613     setWTrackInfit(itk, wtrk);
00614   }
00615 */
00616 //No needed
00617 }

void VertexFit::swimVertex ( int  n  )  [private]

Definition at line 392 of file VertexFit.cxx.

References EvtCyclic3::A, EvtCyclic3::B, Convert67(), Ew(), VertexFitBField::getCBz(), genRecEmupikp::i, VertexFitBField::instance(), VertexConstraints::Ltrk(), m_cpu, m_factor, m_TRB, m_vc, m_xcovInfit, m_xInfit, WTrackParameter::mass(), pcovInfit(), pInfit(), WTrackParameter::setEw(), WTrackParameter::setW(), TrackPool::setWTrackInfit(), timer, vfE(), TrackPool::wTrackInfit(), TrackPool::wTrackOrigin(), and wtrk().

Referenced by Fit(), and Swim().

00393 {
00394         TStopwatch timer;
00395         timer.Start();
00396         // Track parameter can be expressed as:
00397         //
00398         // px = px0 + a*(y0 - yv)
00399         // py = py0 - a*(x0 - xv)
00400         // pz = pz0
00401         // e  = e
00402         // x  = xv
00403         // y  = yv
00404         // z  = zv
00405         //
00406         // thus p = A * a + B * vx
00407         // x = vx
00408         VertexConstraints vc = m_vc[n];
00409         unsigned int NSIZE = vc.Ltrk().size();
00410 
00411         HepMatrix A(6, 6, 0);
00412         A[0][0] = 1.0;
00413         A[1][1] = 1.0;
00414         A[2][2] = 1.0;
00415         HepMatrix B(6, 3, 0);
00416         B[3][0] = 1.0;
00417         B[4][1] = 1.0;
00418         B[5][2] = 1.0;
00419         HepVector w1(6, 0);
00420         HepVector w2(7, 0);
00421         HepSymMatrix Ew(7, 0);
00422         HepMatrix ew1(6, 6, 0);
00423         HepMatrix ew2(7, 7, 0);
00424 
00425         for (unsigned int i = 0; i < NSIZE; i++) 
00426         {
00427                 int itk = vc.Ltrk()[i];
00428 //              double afield = VertexFitBField::instance()->getCBz(m_xInfit, pInfit(itk).sub(4, 6));
00429                 double afield = m_factor * VertexFitBField::instance()->getCBz(m_xInfit, pInfit(itk).sub(4, 6));
00430                 double a = afield * wTrackInfit(itk).charge();
00431 
00432                 A[0][4] = a;
00433                 A[1][3] = -a;
00434                 B[0][1] = -a;
00435                 B[1][0] = a;
00436                 w1 = A * pInfit(itk) + B * m_xInfit;
00437                 ew1 = pcovInfit(itk).similarity(A) + m_xcovInfit.similarity(B) + A*vfE(itk)*B.T() + B*(vfE(itk).T())*A.T();
00438 
00439                 WTrackParameter wtrk = wTrackOrigin(itk);
00440                 w2 = Convert67(wtrk.mass(), w1);
00441                 wtrk.setW(w2);
00442 
00443                 m_TRB[3][0] = w2[0] / w2[3];
00444                 m_TRB[3][1] = w2[1] / w2[3];
00445                 m_TRB[3][2] = w2[2] / w2[3];
00446 
00447                 ew2 = m_TRB * ew1 * m_TRB.T();
00448                 Ew.assign(ew2);
00449                 wtrk.setEw(Ew);
00450                 //renew parameters of input track 
00451                 setWTrackInfit(itk, wtrk);
00452         }
00453         timer.Stop();
00454         m_cpu[4] += timer.CpuTime();
00455 }

void VertexFit::UpdateConstraints ( const VertexConstraints vc  )  [private]

Definition at line 695 of file VertexFit.cxx.

References alpha, dc, VertexFitBField::getCBz(), genRecEmupikp::i, VertexFitBField::instance(), VertexConstraints::Ltrk(), m_factor, m_xInfit, m_xOrigin, mass, max, min, pcovOrigin(), pInfit(), pOrigin(), setA(), setAT(), setB(), setBT(), setG(), setW(), delete_small_size::size, VertexConstraints::type(), type, vx(), TrackPool::wTrackOrigin(), and x.

Referenced by Fit().

00695 {
00696         int ntrk = (vc.Ltrk()).size();
00697         int type = vc.type();
00698         switch(type) 
00699         {
00700                 case 1:
00701                 {
00702                         for (unsigned int i = 0; i < ntrk; i++) 
00703                         {
00704                                 int itk = (vc.Ltrk())[i];
00705                                 HepVector alpha(6, 0);
00706                                 double mass, e;
00707                                 HepLorentzVector p;
00708                                 HepPoint3D x, vx;
00709                                 alpha = pInfit(itk);
00710                                 
00711                                 mass = wTrackOrigin(itk).mass();
00712                                 e    = sqrt(mass*mass + alpha[0]*alpha[0] + alpha[1]*alpha[1] + alpha[2]*alpha[2]);
00713                                 p    = HepLorentzVector(alpha[0], alpha[1], alpha[2], e);
00714                                 x    = HepPoint3D(alpha[3], alpha[4], alpha[5]);
00715 
00716                                 vx = HepPoint3D(m_xInfit[0], m_xInfit[1], m_xInfit[2]);
00717                                 HepPoint3D delx = vx - x;
00718 
00719 //                              double afield = VertexFitBField::instance()->getCBz(m_xInfit, wTrackOrigin(itk).X());
00720                                 double afield = m_factor * VertexFitBField::instance()->getCBz(m_xInfit, wTrackOrigin(itk).X());
00721                                 double a = afield * (0.0+wTrackOrigin(itk).charge());
00722 
00723                                 double J = a * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
00724                                 J = std::min(J, 1-1e-4);
00725                                 J = std::max(J, -1+1e-4);
00726                                 double Rx = delx.x() - 2 * p.px() * (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
00727                                 double Ry = delx.y() - 2 * p.py() *     (delx.x()*p.px() + delx.y()*p.py()) / p.perp2();
00728                                 double S  = 1.0 / sqrt(1-J*J) / p.perp2();
00729                                 // dc
00730                                 HepVector dc(2, 0);
00731                                 dc[0] = delx.y()*p.px() - delx.x()*p.py() -     0.5*a*(delx.x()*delx.x() + delx.y()*delx.y());
00732                                 dc[1] = delx.z() - p.pz()/a*asin(J);
00733                                 //setd(itk, dc);
00734                                 // Ec
00735                                 HepMatrix Ec(2, 3, 0);
00736                                 // m_Ec.push_back(Ec);
00737                                 // Dc
00738                                 HepMatrix Dc(2, 6, 0);
00739                                 Dc[0][0] = delx.y();
00740                                 Dc[0][1] = -delx.x();
00741                                 Dc[0][2] = 0;
00742                                 Dc[0][3] = p.py() + a * delx.x();
00743                                 Dc[0][4] = -p.px() + a * delx.y();
00744                                 Dc[0][5] = 0;
00745                                 Dc[1][0] = -p.pz() * S * Rx;
00746                                 Dc[1][1] = -p.pz() * S * Ry;
00747                                 Dc[1][2] = - asin(J) / a;
00748                                 Dc[1][3] = p.px() * p.pz() * S;
00749                                 Dc[1][4] = p.py() * p.pz() * S;
00750                                 Dc[1][5] = -1.0;
00751                                 // setD(itk, Dc);
00752                                 // setDT(itk, Dc.T());
00753                                 // VD
00754                                 HepSymMatrix vd(2, 0);
00755                                 int ifail;
00756                                 vd = pcovOrigin(itk).similarity(Dc);
00757                                 vd.invert(ifail);
00758                                 // setVD(itk, vd);
00759                         }
00760                         break;
00761                 }
00762                 case 2:
00763                 default: 
00764                 {
00765                         for (unsigned int i = 0; i < ntrk; i++) 
00766                         {
00767                                 int itk = (vc.Ltrk())[i];
00768                                 HepVector alpha(6, 0);
00769                                 double mass, e;
00770                                 HepLorentzVector p;
00771                                 HepPoint3D x, vx;
00772                                 alpha = pInfit(itk);
00773                                 //p  = HepLorentzVector(alpha[0], alpha[1], alpha[2], alpha[3]);
00774                                 //x  = HepPoint3D(alpha[4], alpha[5], alpha[6]);
00775 
00776                                 mass = wTrackOrigin(itk).mass();
00777                                 e    = sqrt(mass*mass + alpha[0]*alpha[0] + alpha[1]*alpha[1] + alpha[2]*alpha[2]);
00778                                 p    = HepLorentzVector(alpha[0], alpha[1], alpha[2], e);
00779                                 x    = HepPoint3D(alpha[3], alpha[4], alpha[5]);
00780                                 
00781                                 vx = HepPoint3D(m_xInfit[0], m_xInfit[1], m_xInfit[2]);
00782                                 HepPoint3D delx = vx - x;
00783 
00784                                 if (wTrackOrigin(itk).charge() == 0) 
00785                                 {
00786                                         // dc -->g
00787                                         HepVector dc(2, 0);
00788                                         dc[0] = p.pz()*delx.x() - p.px()*delx.z();
00789                                         dc[1] = p.pz()*delx.y() - p.py()*delx.z();
00790                                         // Ec --> B
00791                                         HepMatrix Ec(2, 3, 0);
00792                                         Ec[0][0] = p.pz();
00793                                         Ec[0][1] = 0;
00794                                         Ec[0][2] = -p.px();
00795                                         Ec[1][0] = 0;
00796                                         Ec[1][1] = p.pz();
00797                                         Ec[1][2] = -p.py();
00798                                         setB(itk, Ec);
00799                                         setBT(itk, Ec.T());
00800                                         // Dc
00801                                         HepMatrix Dc(2, 6, 0);
00802                                         Dc[0][0] = -delx.z();
00803                                         Dc[0][1] = 0;
00804                                         Dc[0][2] = delx.x();
00805                                         Dc[0][3] = -p.pz();
00806                                         Dc[0][4] = 0;
00807                                         Dc[0][5] = p.px();
00808                                         Dc[1][0] = 0;
00809                                         Dc[1][1] = -delx.z();
00810                                         Dc[1][2] = delx.y();
00811                                         Dc[1][3] = 0;
00812                                         Dc[1][4] = -p.pz();
00813                                         Dc[1][5] = p.py();
00814                                         setA(itk, Dc);
00815                                         setAT(itk, Dc.T());
00816                                         
00817                                         // VD --> W
00818                                         HepSymMatrix vd(2, 0);
00819                                         int ifail;
00820         
00821                                         vd = pcovOrigin(itk).similarity(Dc);
00822                                         vd.invert(ifail);
00823                                         setW(itk,vd);
00824 
00825                                         //G=A(p0-pe)+B(x0-xe)+d
00826                                         HepVector gc(2,0);
00827                                         gc = Dc*(pOrigin(itk)-pInfit(itk)) + Ec*(m_xOrigin-m_xInfit) + dc;
00828                                         setG(itk,gc);
00829 
00830                                 } 
00831                                 else 
00832                                 {
00833         //                              double afield = VertexFitBField::instance()->getCBz(m_xInfit,wTrackOrigin(itk).X());
00834                                         double afield = m_factor * VertexFitBField::instance()->getCBz(m_xInfit,wTrackOrigin(itk).X());
00835                                         double a = afield * (0.0+wTrackOrigin(itk).charge());
00836                                         double J = a * (delx.x()*p.px() + delx.y()*p.py())/p.perp2();
00837                                         J = std::min(J, 1-1e-4);
00838                                         J = std::max(J, -1+1e-4);
00839                                         double Rx = delx.x() - 2*p.px()*(delx.x()*p.px() + delx.y()*p.py())/p.perp2();
00840                                         double Ry = delx.y() - 2*p.py()*(delx.x()*p.px() + delx.y()*p.py())/p.perp2();
00841                                         double S  = 1.0 / sqrt(1-J*J) / p.perp2();
00842 
00843                                         // dc
00844                                         HepVector dc(2, 0);
00845                                         dc[0] = delx.y() * p.px() - delx.x() * p.py() - 0.5 * a * (delx.x() * delx.x() + delx.y() * delx.y());
00846                                         dc[1] = delx.z() - p.pz() / a*asin(J);
00847                                         // Ec
00848                                         HepMatrix Ec(2, 3, 0);
00849                                         Ec[0][0] = -p.py()- a * delx.x();
00850                                         Ec[0][1] = p.px() - a * delx.y();
00851                                         Ec[0][2] = 0;
00852                                         Ec[1][0] = -p.px() * p.pz() * S ;
00853                                         Ec[1][1] = -p.py() * p.pz() * S ;
00854                                         Ec[1][2] = 1.0;
00855                                         setB(itk, Ec);
00856                                         setBT(itk, Ec.T());
00857  
00858                                         //Dc
00859                                         HepMatrix Dc(2,6,0);
00860                                         Dc[0][0] = delx.y();
00861                                         Dc[0][1] = -delx.x();
00862                                         Dc[0][2] = 0;
00863                                         Dc[0][3] = p.py() + a*delx.x();
00864                                         Dc[0][4] = -p.px() + a*delx.y();
00865                                         Dc[0][5] = 0;
00866 
00867                                         Dc[1][0] = -p.pz()*S*Rx;
00868                                         Dc[1][1] = -p.pz()*S*Ry;
00869                                         Dc[1][2] = -asin(J)/a;
00870                                         Dc[1][3] = p.px()*p.pz()*S;
00871                                         Dc[1][4] = p.py()*p.pz()*S;
00872                                         Dc[1][5] = -1.0;
00873                                         setA(itk,Dc);
00874                                         setAT(itk,Dc.T());
00875                                         // VD
00876                                         HepSymMatrix vd(2, 0);
00877                                         int ifail;
00878                                         vd = pcovOrigin(itk).similarity(Dc);
00879                                         vd.invert(ifail);
00880                                         setW(itk, vd);
00881                                         // G = A(p0-pe)+B(x0-xe)+d
00882                                         HepVector gc(2, 0);
00883                                         gc = Dc * (pOrigin(itk) - pInfit(itk)) + Ec *(m_xOrigin - m_xInfit) + dc;
00884                                         setG(itk, gc);
00885                                 }
00886                         }
00887                         break;
00888                 }
00889         }
00890 }
00891 

void VertexFit::vertexCovMatrix ( int  n  )  [private]

Definition at line 371 of file VertexFit.cxx.

References genRecEmupikp::i, VertexConstraints::Ltrk(), m_cpu, m_E, m_nvtrk, m_pcovInfit, m_vc, m_xcovInfitInversed, NTRKPAR, pcovOrigin(), setPCovInfit(), timer, vfAT(), and vfW().

Referenced by BuildVirtualParticle(), pull(), and Swim().

00372 {
00373         TStopwatch timer;
00374         timer.Start();
00375 
00376         VertexConstraints vc = m_vc[n];
00377 
00378         unsigned int NSIZE = vc.Ltrk().size();
00379         int ifail;
00380         m_pcovInfit = HepSymMatrix(NTRKPAR*m_nvtrk, 0);
00381         for (unsigned int i = 0; i < NSIZE; i++) 
00382         {
00383                 int itk = vc.Ltrk()[i];
00384                 setPCovInfit(itk, pcovOrigin(itk) - vfW(itk).similarity(pcovOrigin(itk) * vfAT(itk)));
00385         }
00386         m_pcovInfit = m_pcovInfit + m_xcovInfitInversed.similarity(m_E);
00387 
00388         timer.Stop();
00389         m_cpu[3] += timer.CpuTime();
00390 }

HepMatrix VertexFit::vfA ( int  i  )  const [inline, private]

Definition at line 169 of file VertexFit.h.

References m_A, NCONSTR, and NTRKPAR.

00169 {return m_A.sub(i*NCONSTR+1, (i+1)*NCONSTR, i*NTRKPAR+1, (i+1)*NTRKPAR);}

HepMatrix VertexFit::vfAT ( int  i  )  const [inline, private]

Definition at line 173 of file VertexFit.h.

References m_AT, NCONSTR, and NTRKPAR.

Referenced by fitVertex(), and vertexCovMatrix().

00173 {return m_AT.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, i*NCONSTR+1, (i+1)*NCONSTR);}

HepMatrix VertexFit::vfB ( int  i  )  const [inline, private]

Definition at line 161 of file VertexFit.h.

References m_B, NCONSTR, and NVTXPAR.

00161 {return m_B.sub(i*NCONSTR+1, (i+1)*NCONSTR, 1, NVTXPAR);}

HepMatrix VertexFit::vfBT ( int  i  )  const [inline, private]

Definition at line 165 of file VertexFit.h.

References m_BT, NCONSTR, and NVTXPAR.

Referenced by fitVertex().

00165 {return m_BT.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}

HepMatrix VertexFit::vfE ( int  i  )  const [inline, private]

Definition at line 189 of file VertexFit.h.

References m_E, NTRKPAR, and NVTXPAR.

Referenced by swimVertex().

00189 {return m_E.sub(i*NTRKPAR+1, (i+1)*NTRKPAR, 1, NVTXPAR);}

HepVector VertexFit::vfG ( int  i  )  const [inline, private]

Definition at line 181 of file VertexFit.h.

References m_G, and NCONSTR.

Referenced by fitVertex().

00181 {return m_G.sub(i*NCONSTR+1, (i+1)*NCONSTR);}

HepMatrix VertexFit::vfKQ ( int  i  )  const [inline, private]

Definition at line 177 of file VertexFit.h.

References m_KQ, NCONSTR, and NVTXPAR.

Referenced by fitVertex().

00177 {return m_KQ.sub(1, NVTXPAR, i*NCONSTR+1, (i+1)*NCONSTR);}

HepSymMatrix VertexFit::vfW ( int  i  )  const [inline, private]

Definition at line 185 of file VertexFit.h.

References m_W, and NCONSTR.

Referenced by fitVertex(), and vertexCovMatrix().

00185 {return m_W.sub(i*NCONSTR+1, (i+1)*NCONSTR);}

VertexParameter VertexFit::vpar ( int  n  )  const [inline]

Definition at line 88 of file VertexFit.h.

References m_vpar_infit.

Referenced by AddBeamFit(), AddVertex(), BeamFit(), DQAKsInfo::calculate(), JsiLL::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), and utility::SecondaryVFit().

00088 {return m_vpar_infit[n];}

HepVector VertexFit::Vx ( int  n  )  const [inline]

Definition at line 85 of file VertexFit.h.

References m_vpar_infit.

Referenced by PrimaryVertex::execute(), and BeamParams::execute().

00085 { return m_vpar_infit[n].Vx();}

HepPoint3D VertexFit::vx ( int  n  )  const [inline]

Definition at line 84 of file VertexFit.h.

References m_vpar_infit.

Referenced by AddVertex(), Gam4pikp::execute(), and UpdateConstraints().

00084 { return m_vpar_infit[n].vx();}

HepVector VertexFit::w ( int  n  )  const [inline]

Definition at line 76 of file VertexFit.h.

References TrackPool::wTrackInfit().

Referenced by Fit().

00076 {return wTrackInfit(n).w();}

WTrackParameter TrackPool::wTrackInfit ( int  n  )  const [inline, inherited]

Definition at line 76 of file TrackPool.h.

References TrackPool::m_wtrk_infit.

00076 {return m_wtrk_infit[n];}

std::vector<WTrackParameter> TrackPool::wTrackInfit (  )  const [inline, inherited]

Definition at line 73 of file TrackPool.h.

References TrackPool::m_wtrk_infit.

Referenced by BeamFit(), BuildVirtualParticle(), KinematicFit::BuildVirtualParticle(), KalmanKinematicFit::BuildVirtualParticle(), KinematicFit::covMatrix(), Ew(), KinematicFit::infit(), KalmanKinematicFit::infit(), pfit(), KinematicFit::pull(), KalmanKinematicFit::pull(), swimVertex(), KinematicFit::upCovmtx(), w(), wtrk(), and xfit().

00073 {return m_wtrk_infit;}

int TrackPool::wTrackList ( int  n  )  const [inline, inherited]

Definition at line 77 of file TrackPool.h.

References TrackPool::m_lwtrk.

00077 {return m_lwtrk[n];}

std::vector<int> TrackPool::wTrackList (  )  const [inline, inherited]

Definition at line 74 of file TrackPool.h.

References TrackPool::m_lwtrk.

00074 {return m_lwtrk;}

WTrackParameter TrackPool::wTrackOrigin ( int  n  )  const [inline, inherited]

Definition at line 75 of file TrackPool.h.

References TrackPool::m_wtrk_origin.

00075 {return m_wtrk_origin[n];}

std::vector<WTrackParameter> TrackPool::wTrackOrigin (  )  const [inline, inherited]

Definition at line 72 of file TrackPool.h.

References TrackPool::m_wtrk_origin.

Referenced by AddVertex(), BeamFit(), BuildVirtualParticle(), KinematicFit::covMatrix(), Fit(), SecondVertexFit::Fit(), KinematicFit::Fit(), KalmanKinematicFit::Fit(), KinematicFit::gda(), KalmanKinematicFit::gda(), KinematicFit::origin(), KalmanKinematicFit::origin(), pull(), KinematicFit::pull(), KalmanKinematicFit::pull(), swimVertex(), KinematicFit::upCovmtx(), and UpdateConstraints().

00072 {return m_wtrk_origin;}

WTrackParameter VertexFit::wtrk ( int  n  )  const [inline]

Definition at line 78 of file VertexFit.h.

References TrackPool::wTrackInfit().

Referenced by JsiLL::execute(), DQARhopi::execute(), Rhopi::execute(), Ppjrhopi::execute(), Gam4pikp::execute(), Pipipi0::MTotal(), Pipi::MTotal(), Kpipi0pi0::MTotal(), Kpipi0::MTotal(), Kpi::MTotal(), Kkpipi::MTotal(), Kkpi0::MTotal(), Kk::MTotal(), K3pipi0::MTotal(), K3pi::MTotal(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), swimVertex(), and utility::vfit().

00078 {return wTrackInfit(n);}

WTrackParameter VertexFit::wVirtualTrack ( int  n  )  const [inline]

Definition at line 91 of file VertexFit.h.

References m_virtual_wtrk.

Referenced by DQAKsInfo::calculate(), LambdaReconstruction::execute(), KShortReconstruction::execute(), JsiLL::execute(), DQAKsKpi::execute(), incllambda::execute(), inclks::execute(), K0pipipi0::MTotal(), K0pipi::MTotal(), K0pi0::MTotal(), K0kpi::MTotal(), K0kk::MTotal(), LocalKsSelector::operator()(), and utility::SecondaryVFit().

00091 {return m_virtual_wtrk[n];}

HepSymMatrix VertexFit::xcovInfit (  )  const [inline, private]

Definition at line 138 of file VertexFit.h.

References m_xcovInfit.

00138 {return m_xcovInfit;}

HepSymMatrix VertexFit::xcovInfitInversed (  )  const [inline, private]

Definition at line 140 of file VertexFit.h.

References m_xcovInfitInversed.

00140 {return m_xcovInfitInversed;}

HepSymMatrix VertexFit::xcovOrigin (  )  const [inline, private]

Definition at line 127 of file VertexFit.h.

References m_xcovOrigin.

00127 {return m_xcovOrigin;}

HepSymMatrix VertexFit::xcovOriginInversed (  )  const [inline, private]

Definition at line 129 of file VertexFit.h.

References m_xcovOriginInversed.

00129 {return m_xcovOriginInversed;}

HepPoint3D VertexFit::xfit ( int  n  )  const [inline]

Definition at line 75 of file VertexFit.h.

References TrackPool::wTrackInfit().

00075 {return wTrackInfit(n).x();}

HepVector VertexFit::xInfit (  )  const [inline, private]

Definition at line 136 of file VertexFit.h.

References m_xInfit.

00136 {return m_xInfit;}

HepVector VertexFit::xOrigin (  )  const [inline, private]

Definition at line 125 of file VertexFit.h.

References m_xOrigin.

00125 {return m_xOrigin;}


Member Data Documentation

HepMatrix VertexFit::m_A [private]

Definition at line 168 of file VertexFit.h.

Referenced by Fit(), setA(), and vfA().

HepMatrix VertexFit::m_AT [private]

Definition at line 172 of file VertexFit.h.

Referenced by Fit(), setAT(), and vfAT().

HepMatrix VertexFit::m_B [private]

Definition at line 160 of file VertexFit.h.

Referenced by Fit(), setB(), and vfB().

HepMatrix VertexFit::m_BT [private]

Definition at line 164 of file VertexFit.h.

Referenced by Fit(), setBT(), and vfBT().

double VertexFit::m_chi [private]

Definition at line 115 of file VertexFit.h.

Referenced by chisq(), Fit(), and init().

double VertexFit::m_chicut [private]

Definition at line 206 of file VertexFit.h.

Referenced by BeamFit(), Fit(), init(), and setChisqCut().

std::vector<double> VertexFit::m_chisq [private]

Definition at line 114 of file VertexFit.h.

Referenced by BeamFit(), chisq(), Fit(), fitVertex(), and init().

double VertexFit::m_chiter [private]

Definition at line 207 of file VertexFit.h.

Referenced by BeamFit(), Fit(), init(), and setChisqCut().

HepVector VertexFit::m_cpu [private]

Definition at line 209 of file VertexFit.h.

Referenced by BuildVirtualParticle(), cpu(), Fit(), swimVertex(), and vertexCovMatrix().

HepMatrix VertexFit::m_E [private]

Definition at line 188 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), setE(), vertexCovMatrix(), and vfE().

double VertexFit::m_factor [private]

Definition at line 208 of file VertexFit.h.

Referenced by BuildVirtualParticle(), factor(), init(), setMagCorrFactor(), swimVertex(), and UpdateConstraints().

HepVector VertexFit::m_G [private]

Definition at line 180 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setG(), and vfG().

HepMatrix VertexFit::m_KQ [private]

Definition at line 176 of file VertexFit.h.

Referenced by fitVertex(), setKQ(), and vfKQ().

int VertexFit::m_niter [private]

Definition at line 205 of file VertexFit.h.

Referenced by BeamFit(), Fit(), init(), and setIterNumber().

int VertexFit::m_nvtrk [private]

Definition at line 116 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), and vertexCovMatrix().

HepSymMatrix VertexFit::m_pcovInfit [private]

Definition at line 153 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), pcovInfit(), setPCovInfit(), and vertexCovMatrix().

HepSymMatrix VertexFit::m_pcovOrigin [private]

Definition at line 145 of file VertexFit.h.

Referenced by Fit(), pcovOrigin(), and setPCovOrigin().

HepVector VertexFit::m_pInfit [private]

Definition at line 152 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), pInfit(), and setPInfit().

VertexFit * VertexFit::m_pointer = 0 [static, private]

Definition at line 203 of file VertexFit.h.

Referenced by instance().

HepVector VertexFit::m_pOrigin [private]

Definition at line 144 of file VertexFit.h.

Referenced by Fit(), pOrigin(), and setPOrigin().

HepMatrix VertexFit::m_TRA [private]

Definition at line 192 of file VertexFit.h.

Referenced by Fit(), and init().

HepMatrix VertexFit::m_TRB [private]

Definition at line 193 of file VertexFit.h.

Referenced by BuildVirtualParticle(), init(), pull(), and swimVertex().

std::vector<VertexConstraints> VertexFit::m_vc [private]

Definition at line 112 of file VertexFit.h.

Referenced by AddBeamFit(), AddVertex(), BeamFit(), BuildVirtualParticle(), Fit(), fitVertex(), init(), swimVertex(), and vertexCovMatrix().

std::vector<WTrackParameter> VertexFit::m_virtual_wtrk [private]

Definition at line 118 of file VertexFit.h.

Referenced by AddVertex(), BuildVirtualParticle(), init(), and wVirtualTrack().

std::vector<VertexParameter> VertexFit::m_vpar_infit [private]

Definition at line 110 of file VertexFit.h.

Referenced by AddBeamFit(), AddVertex(), BeamFit(), errorVx(), Evx(), Fit(), init(), vpar(), Vx(), and vx().

std::vector<VertexParameter> VertexFit::m_vpar_origin [private]

Definition at line 108 of file VertexFit.h.

Referenced by AddBeamFit(), AddVertex(), BeamFit(), Fit(), and init().

HepSymMatrix VertexFit::m_W [private]

Definition at line 184 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setW(), and vfW().

HepSymMatrix VertexFit::m_xcovInfit [private]

Definition at line 134 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), setXCovInfit(), swimVertex(), and xcovInfit().

HepSymMatrix VertexFit::m_xcovInfitInversed [private]

Definition at line 135 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setXCovInfitInversed(), vertexCovMatrix(), and xcovInfitInversed().

HepSymMatrix VertexFit::m_xcovOrigin [private]

Definition at line 123 of file VertexFit.h.

Referenced by Fit(), setXCovOrigin(), and xcovOrigin().

HepSymMatrix VertexFit::m_xcovOriginInversed [private]

Definition at line 124 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setXCovOriginInversed(), and xcovOriginInversed().

HepVector VertexFit::m_xInfit [private]

Definition at line 133 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), setXInfit(), swimVertex(), UpdateConstraints(), and xInfit().

HepVector VertexFit::m_xOrigin [private]

Definition at line 122 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setXOrigin(), UpdateConstraints(), and xOrigin().

const int VertexFit::NCONSTR = 2 [static, private]

Definition at line 213 of file VertexFit.h.

Referenced by Fit(), fitVertex(), setA(), setAT(), setB(), setBT(), setG(), setKQ(), setW(), vfA(), vfAT(), vfB(), vfBT(), vfG(), vfKQ(), and vfW().

const int VertexFit::NTRKPAR = 6 [static, private]

Definition at line 211 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), pcovInfit(), pcovOrigin(), pInfit(), pOrigin(), setA(), setAT(), setE(), setPCovInfit(), setPCovOrigin(), setPInfit(), setPOrigin(), vertexCovMatrix(), vfA(), vfAT(), and vfE().

const int VertexFit::NVTXPAR = 3 [static, private]

Definition at line 212 of file VertexFit.h.

Referenced by BuildVirtualParticle(), Fit(), fitVertex(), vfB(), vfBT(), vfE(), and vfKQ().


Generated on Tue Nov 29 23:36:21 2016 for BOSS_7.0.2 by  doxygen 1.4.7