PandaRoot
InternalParticle.h
Go to the documentation of this file.
1 // ******************************************************
2 // DecayTreeFitter Package
3 // We thank the original author Wouter Hulsbergen
4 // (BaBar, LHCb) for providing the sources.
5 // http://arxiv.org/abs/physics/0503191v1 (2005)
6 // Adaptation & Development for PANDA: Ralf Kliemt (2015)
7 // Adjustment for fully neutral reactions: Jean Noel (2023)
8 // **********************************************************************************
9 #ifndef INTERNALPARTICLE_H
10 #define INTERNALPARTICLE_H 1
11 
12 #include "ParticleBase.h"
13 #include <vector>
14 #include "Rtypes.h"
15 
16 extern bool fitvertex;
17 extern bool addfreeZ;
18 
19 namespace DecayTreeFitter {
20 
22  public:
24 
25  virtual int dim() const { return fitvertex ? (mother() ? 8 : 7) : (addfreeZ ? 5 : 4); }
26 
27  virtual ErrCode initPar1(FitParams *);
28  virtual ErrCode initPar2(FitParams *);
29  virtual int type() const { return kInternalParticle; }
30 
31  // parameter definition
32  virtual int posIndex() const { return fitvertex ? index() : (addfreeZ ? index() : -1); }
33  virtual int lenIndex() const { return fitvertex ? (mother() ? index() + 3 : -1) : -1; }
34  virtual int momIndex() const { return fitvertex ? (mother() ? index() + 4 : index() + 3) : (addfreeZ ? index() + 1: index()); }
35  virtual bool hasEnergy() const { return true; }
36  virtual bool hasPosition() const { return fitvertex ? true : (addfreeZ ? true : false); }
37  virtual std::string parname(int index) const;
38 
39  // constraints
43  ErrCode projectMassConstraintTwoBody(const FitParams *fitparams, Projection &p) const;
44  virtual ErrCode projectConstraint(Constraint::Type type, const FitParams *fitparams, Projection &p) const;
45 
46  // some of that other stuff
47  virtual void addToConstraintList(constraintlist &alist, int depth) const;
48 
49  // bool swapMotherDaughter(FitParams* fitparams, const ParticleBase* newmother) ;
50 
51  protected:
52  ErrCode initMom(FitParams *fitparams) const;
53 
54  private:
55  bool m_lifetimeconstraint;
56  bool m_isconversion;
57  ClassDef(InternalParticle, 1)
58 };
59 
60 } // namespace DecayTreeFitter
61 
62 #endif
ErrCode projectConversionConstraint(const FitParams *, Projection &p) const
std::vector< DecayTreeFitter::Constraint > constraintlist
Definition: ParticleBase.h:102
const ParticleBase * mother() const
Definition: ParticleBase.h:52
bool fitvertex
ErrCode projectLifeTimeConstraint(const FitParams *, Projection &) const
virtual void addToConstraintList(constraintlist &alist, int depth) const
ErrCode projectKineConstraint(const FitParams *, Projection &) const
virtual ErrCode projectConstraint(Constraint::Type type, const FitParams *fitparams, Projection &p) const
ErrCode initMom(FitParams *fitparams) const
virtual std::string parname(int index) const
InternalParticle(RhoCandidate *bc, const ParticleBase *mother, const Configuration &config)
virtual ErrCode initPar1(FitParams *)
ErrCode projectMassConstraintTwoBody(const FitParams *fitparams, Projection &p) const
virtual ErrCode initPar2(FitParams *)
virtual int index() const
Definition: ParticleBase.h:51
bool addfreeZ