FairRoot/PandaRoot
DecayChain.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 // ******************************************************
8 #ifndef DECAYCHAIN_H
9 #define DECAYCHAIN_H 1
10 
11 #include <map>
12 #include "ParticleBase.h"
13 #include "MergedConstraint.h"
14 #include "Rtypes.h"
15 
16 //namespace LHCb {
17 // class Particle ;
18 // class VertexBase ;
19 //}
20 
21 namespace DecayTreeFitter {
22 
23  class FitParams ;
24  class ParticleBase ;
25 
26  class DecayChain
27  {
28  public:
29  DecayChain() : m_mother(0) {}
30 
31  DecayChain(RhoCandidate* bc, const Configuration& config) ;
32  DecayChain(RhoCandidate* bc, const RhoVector3Err& pv, const Configuration& config) ;
33  DecayChain(RhoCandidate* bc, const RhoLorentzVectorErr& lv, const Configuration& config) ;
34  DecayChain(RhoCandidate* bc, const RhoLorentzVectorErr& lv, const RhoVector3Err& pv, const Configuration& config) ;
35 
36  virtual ~DecayChain() ;
37 
38  int dim() const { return m_dim ; }
39 
40  void initConstraintList() ;
42  ErrCode filter(FitParams* par, bool firstpass=true) ;
43  double chiSquare(const FitParams* par) const ;
44 
45  ParticleBase* mother() { return m_mother ; }
46  const ParticleBase* cand() { return m_cand ; }
47  const ParticleBase* mother() const { return m_mother ; }
48  const ParticleBase* locate(RhoCandidate* bc) const ;
49  // void locate( RhoCandidate* pid, ParticleBase::ParticleContainer& result ) ;
50 
51  int index(RhoCandidate* bc) const ;
52  int posIndex(RhoCandidate* bc) const ;
53  int momIndex(RhoCandidate* bc) const ;
54  int lenIndex(RhoCandidate* bc) const ;
55  void setOwner(bool b) { m_isOwner=b ;}
56  //int momIndex() const ;
57 
58  void printConstraints(std::ostream& os=std::cout) const ;
59  void setMassConstraint( RhoCandidate* bc, bool add=true) ;
60  void setMassConstraint( RhoCandidate* bc, double mass) ;
61  // void setMassConstraint( RhoCandidate* pid, bool add=true) ;
62  // void setMassConstraint( RhoCandidate* pid, double mass) ;
63 
64  ChiSquare chiSquare( RhoCandidate* bc, const FitParams* fitpars ) const ;
65  private:
66  int m_dim ;
67  ParticleBase* m_mother ; // head of decay tree
68  const ParticleBase* m_cand ; // fit candidate (not same to mother in case of bs/be constraint)
70  std::vector<Constraint*> m_mergedconstraintlist ;
72  typedef std::map<RhoCandidate*,const ParticleBase*> ParticleMap ;
74  bool m_isOwner ;
75  ClassDef ( DecayChain,1 )
76  } ;
77 
78 }
79 
80 
81 
82 #endif
int momIndex(RhoCandidate *bc) const
Definition: DecayChain.cxx:286
std::map< RhoCandidate *, const ParticleBase * > ParticleMap
Definition: DecayChain.h:72
int lenIndex(RhoCandidate *bc) const
Definition: DecayChain.cxx:292
ParticleBase * m_mother
Definition: DecayChain.h:67
ParticleBase::constraintlist m_constraintlist
Definition: DecayChain.h:69
std::vector< DecayTreeFitter::Constraint > constraintlist
Definition: ParticleBase.h:110
ErrCode init(FitParams *par)
Definition: DecayChain.cxx:114
TTree * b
Double_t par[3]
ParticleBase * mother()
Definition: DecayChain.h:45
ErrCode filter(FitParams *par, bool firstpass=true)
Definition: DecayChain.cxx:145
MergedConstraint m_mergedconstraint
Definition: DecayChain.h:71
int index(RhoCandidate *bc) const
Definition: DecayChain.cxx:272
const ParticleBase * cand()
Definition: DecayChain.h:46
const ParticleBase * m_cand
Definition: DecayChain.h:68
int posIndex(RhoCandidate *bc) const
Definition: DecayChain.cxx:280
const ParticleBase * mother() const
Definition: DecayChain.h:47
void printConstraints(std::ostream &os=std::cout) const
Definition: DecayChain.cxx:21
const ParticleBase * locate(RhoCandidate *bc) const
Definition: DecayChain.cxx:201
double chiSquare(const FitParams *par) const
Definition: DecayChain.cxx:195
std::vector< Constraint * > m_mergedconstraintlist
Definition: DecayChain.h:70
void setMassConstraint(RhoCandidate *bc, bool add=true)
Definition: DecayChain.cxx:217