PandaRoot
InteractionPoint.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 // ******************************************************
14 // DecayTreeFitter Package
15 // We thank the original author Wouter Hulsbergen
16 // (BaBar, LHCb) for providing the sources.
17 // http://arxiv.org/abs/physics/0503191v1 (2005)
18 // Adaptation & Development for PANDA: Ralf Kliemt (2015)
19 // Adjustment for fully neutral reactions: Jean Noel (2023)
20 // **********************************************************************************
21 #ifndef DECAYTREEFITTER_INTERACTIONPOINT_H
22 #define DECAYTREEFITTER_INTERACTIONPOINT_H 1
23 
24 #include "InternalParticle.h"
25 //#include "RecoParticle.h"
26 //#include "GaudiKernel/GenericVectorTypes.h"
27 //#include "GaudiKernel/SymmetricMatrixTypes.h"
28 #include "TMatrixD.h"
29 #include "RhoVector3Err.h"
30 #include "Rtypes.h"
31 
32 namespace LHCb {
33 class VertexBase;
34 }
35 
36 extern bool fitvertex;
37 extern bool addfreeZ;
38 
39 namespace DecayTreeFitter {
40 
42  public:
43  InteractionPoint(RhoCandidate *daughter, const Configuration &config);
44  InteractionPoint(const RhoVector3Err &ipvertex, RhoCandidate *daughter, const Configuration &config);
45  InteractionPoint(const RhoLorentzVectorErr &ipmom, RhoCandidate *daughter, const Configuration &config);
46  InteractionPoint(const RhoLorentzVectorErr &ipmom, const RhoVector3Err &ipvertex, RhoCandidate *daughter, const Configuration &config);
47 
48  virtual int dim() const { return fitvertex ? 7 : (addfreeZ ? 5 : 4); }
49  virtual ErrCode initPar1(FitParams *);
50  virtual ErrCode initCov(FitParams *) const;
51  // ErrCode initMom( FitParams* fitparams ) const ;
52 
53  virtual int type() const { return kInteractionPoint; }
54 
55  virtual double chiSquare(const FitParams *par) const;
56 
57  ErrCode projectIPConstraint(const FitParams *fitpar, Projection &) const;
58  ErrCode projectBeamConstraint(const FitParams *fitpar, Projection &) const;
59  virtual ErrCode projectConstraint(Constraint::Type, const FitParams *, Projection &) const;
60 
61  virtual void addToConstraintList(constraintlist &alist, int depth) const;
62 
63  private:
64  TVector3 m_ipPos; // interaction point position
65  TMatrixDSym m_ipPosCov; // cov matrix
66  TMatrixDSym m_ipPosCovInv; // inverse of cov matrix
67  TLorentzVector m_ipMom; // Beam Momentum
68  TMatrixDSym m_ipMomCov; // cov matrix
69  TMatrixDSym m_ipMomCovInv; // inverse of cov matrix
70  bool m_hasposcon;
71  bool m_hasmomcon;
72  bool m_hasposcov;
73  bool m_hasmomcov;
74  ClassDef(InteractionPoint, 1)
75 };
76 
77 } // namespace DecayTreeFitter
78 
79 #endif
std::vector< DecayTreeFitter::Constraint > constraintlist
Definition: ParticleBase.h:114
bool addfreeZ
bool fitvertex