PandaRoot
InternalParticle.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 INTERNALPARTICLE_H
22 #define INTERNALPARTICLE_H 1
23 
24 #include "ParticleBase.h"
25 #include <vector>
26 #include "Rtypes.h"
27 
28 extern bool fitvertex;
29 extern bool addfreeZ;
30 
31 namespace DecayTreeFitter {
32 
34  public:
36 
37  virtual int dim() const { return fitvertex ? (mother() ? 8 : 7) : (addfreeZ ? 5 : 4); }
38 
39  virtual ErrCode initPar1(FitParams *);
40  virtual ErrCode initPar2(FitParams *);
41  virtual int type() const { return kInternalParticle; }
42 
43  // parameter definition
44  virtual int posIndex() const { return fitvertex ? index() : (addfreeZ ? index() : -1); }
45  virtual int lenIndex() const { return fitvertex ? (mother() ? index() + 3 : -1) : -1; }
46  virtual int momIndex() const { return fitvertex ? (mother() ? index() + 4 : index() + 3) : (addfreeZ ? index() + 1: index()); }
47  virtual bool hasEnergy() const { return true; }
48  virtual bool hasPosition() const { return fitvertex ? true : (addfreeZ ? true : false); }
49  virtual std::string parname(int index) const;
50 
51  // constraints
55  ErrCode projectMassConstraintTwoBody(const FitParams *fitparams, Projection &p) const;
56  virtual ErrCode projectConstraint(Constraint::Type type, const FitParams *fitparams, Projection &p) const;
57 
58  // some of that other stuff
59  virtual void addToConstraintList(constraintlist &alist, int depth) const;
60 
61  // bool swapMotherDaughter(FitParams* fitparams, const ParticleBase* newmother) ;
62 
63  protected:
64  ErrCode initMom(FitParams *fitparams) const;
65 
66  private:
67  bool m_lifetimeconstraint;
68  bool m_isconversion;
69  ClassDef(InternalParticle, 1)
70 };
71 
72 } // namespace DecayTreeFitter
73 
74 #endif
ErrCode projectConversionConstraint(const FitParams *, Projection &p) const
std::vector< DecayTreeFitter::Constraint > constraintlist
Definition: ParticleBase.h:114
const ParticleBase * mother() const
Definition: ParticleBase.h:64
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:63
bool addfreeZ