PandaRoot
RecoComposite.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 // ******************************************************
20 #ifndef EXTERNALBTAPARTICLE_H
21 #define EXTERNALBTAPARTICLE_H 1
22 
23 #include "ParticleBase.h"
24 #include "TVectorD.h"
25 #include "TMatrixDSym.h"
26 #include "Rtypes.h"
27 
28 namespace DecayTreeFitter {
29 
30 class RecoComposite : public ParticleBase {
31  public:
33  virtual ~RecoComposite();
34 
35  // the number of parameters
36  virtual int dim() const { return m_hasEnergy ? 8 : 7; } // (x,y,z,t,px,py,pz,(E))
37 
38  // the number of 'measurements'
39  int dimM() const { return m_hasEnergy ? 7 : 6; }
42 
43  virtual ErrCode initPar1(FitParams *);
44  virtual ErrCode initPar2(FitParams *);
45  virtual int type() const { return kRecoComposite; }
46 
47  virtual int posIndex() const { return index(); }
48  virtual int lenIndex() const { return index() + 3; }
49  virtual int momIndex() const { return index() + 4; }
50 
51  virtual bool hasEnergy() const { return m_hasEnergy; }
52  virtual bool hasPosition() const { return true; }
53 
54  virtual void updCache();
55  virtual double chiSquare(const FitParams *fitparams) const;
56 
57  virtual void addToConstraintList(constraintlist &alist, int depth) const
58  {
59  alist.push_back(Constraint(this, Constraint::composite, depth, dimM()));
60  alist.push_back(Constraint(this, Constraint::geometric, depth, 3));
61  }
62 
63  protected: // I hate this, so we need to change the design ...
64  // cache
65  TVectorD m_m; // 'measurement' (x,y,zpx,py,pz,E)
66  TMatrixDSym m_matrixV; // covariance in measurement
68  ClassDef(RecoComposite, 1)
69 };
70 
71 } // namespace DecayTreeFitter
72 
73 #endif
std::vector< DecayTreeFitter::Constraint > constraintlist
Definition: ParticleBase.h:114
virtual ErrCode initPar2(FitParams *)
const ParticleBase * mother() const
Definition: ParticleBase.h:64
ErrCode projectRecoComposite(const FitParams *, Projection &) const
RecoComposite(RhoCandidate *bc, const ParticleBase *mother)
virtual int posIndex() const
Definition: RecoComposite.h:47
virtual int momIndex() const
Definition: RecoComposite.h:49
virtual ErrCode initPar1(FitParams *)
virtual bool hasPosition() const
Definition: RecoComposite.h:52
virtual void addToConstraintList(constraintlist &alist, int depth) const
Definition: RecoComposite.h:57
virtual int lenIndex() const
Definition: RecoComposite.h:48
virtual int index() const
Definition: ParticleBase.h:63
virtual int type() const
Definition: RecoComposite.h:45
virtual ErrCode projectConstraint(Constraint::Type, const FitParams *, Projection &) const
virtual bool hasEnergy() const
Definition: RecoComposite.h:51
virtual double chiSquare(const FitParams *fitparams) const