MINT2
AssociatingDecayTree.h
Go to the documentation of this file.
1 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
2 // status: Mon 9 Feb 2009 19:18:02 GMT
3 #ifndef ASSOCIATING_DECAY_TREE
4 #define ASSOCIATING_DECAY_TREE
5 
6 /*
7  This is a decay tree whose elements have been associated
8  to one or more final state particle in the event record.
9  This is done by storing the indices of the particles in the
10  event record.
11 
12  Stable particles in the tree get associated to one stable
13  particle in the event records.
14  Unstable particles 'carry' the association to all their
15  daughter particles.
16 */
17 
18 #include "Mint/DecayTree.h"
20 
22 
24 #include "Mint/counted_ptr.h"
25 
27  protected:
28  mutable AssociatedDecayTree _theDecay; // 'mutable' probably not so nice
29  mutable DalitzEventPattern _prevPattern; // ditto
30  // mutable IDalitzEvent* _evtPtr;
31 
33 
34  bool associate(const DalitzEventPattern& pat) const;
35  bool associate(const IDalitzEvent& evt) const;
36 
37  bool associateFinalStates(const DalitzEventPattern& pat) const;
38  bool associateFinalStates(const IDalitzEvent& evt) const;
39  bool associateResonances() const;
40  std::vector<int> addAssociations(MINT::counted_ptr<AssociatedDecayTree> ctree) const;
41  std::vector<int> addAssociations(AssociatedDecayTree* tree) const;
42 
43  bool patternHasChanged(const DalitzEventPattern& pat) const;
44  bool patternHasChanged(const IDalitzEvent& evt) const;
45 
46  public:
48  : _theDecay(tree)
49  , _prevPattern()
50  , _theTreesPattern(tree)
51  {
52  //associate();
53  // std::cout << "associated the decay tree\n" << *this << std::endl;
54  }
55 
57  : _theDecay(other._theDecay)
58  , _prevPattern(other._prevPattern)
60  {}
61 
62  const AssociatedDecayTree* getTreePtr(const DalitzEventPattern& pat) const;
63  const AssociatedDecayTree* getTreePtr(const IDalitzEvent& evt) const;
64 
65  const AssociatedDecayTree& getTree(const DalitzEventPattern& pat) const;
66  const AssociatedDecayTree& getTree(const IDalitzEvent& evt) const;
67 
69  return _theDecay;
70  }
71 
72  const DalitzEventPattern& getTreePattern() const;
73 
74 };
75 
76 #endif
77 //
const AssociatedDecayTree * getTreePtr(const DalitzEventPattern &pat) const
AssociatingDecayTree(const DecayTree &tree)
DecayTree getBareTree() const
AssociatingDecayTree(const AssociatingDecayTree &other)
const DalitzEventPattern & getTreePattern() const
AssociatedDecayTree _theDecay
bool patternHasChanged(const DalitzEventPattern &pat) const
const AssociatedDecayTree & getTree(const DalitzEventPattern &pat) const
bool associate(const DalitzEventPattern &pat) const
std::vector< int > addAssociations(MINT::counted_ptr< AssociatedDecayTree > ctree) const
DalitzEventPattern _theTreesPattern
bool associateFinalStates(const DalitzEventPattern &pat) const
DalitzEventPattern _prevPattern