MINT2
AssociatedDecayTreeItem.cpp
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 #include <vector>
4 
6 #include "Mint/DecayTreeItem.h"
7 #include "Mint/IDalitzEvent.h"
8 
10  : DecayTreeItem(i)
11 {
12  _asi.clear();
13 }
15  : DecayTreeItem(other)
16  , _asi(other._asi)
17 {}
19  : DecayTreeItem(other)
20 {
21  _asi.clear();
22 }
23 const std::vector<int>& AssociatedDecayTreeItem::asi() const{
24  return _asi;
25 }
26 int AssociatedDecayTreeItem::asi(int i) const{
27  return _asi[i];
28 }
29 
30 void AssociatedDecayTreeItem::print(std::ostream& out) const{
31  const ParticleProperties* pp = props();
32  if(0 == pp){
33  out << _pdg_id;
34  }else{
35  out << pp->name()
36  << "(" << pp->SVPAT() <<")";
37  }
38  if(! this->_asi.empty()){
39  out << "[";
40  for(unsigned int i=0; i< _asi.size(); i++){
41  out << this->_asi[i];
42  }
43  out << "]";
44  }
45 }
46 
47 
48 TLorentzVector AssociatedDecayTreeItem::p(const IDalitzEvent* evt) const{
49  TLorentzVector pV;
50  if(0 == evt) return pV;
51  for(unsigned int i=0; i < asi().size(); i++){
52  pV += evt->p(this->asi(i));
53  }
54  return pV;
55 }
56 
58  if(0 == evt) return 0;
59  return evt->sij(this->asi());
60 }
62  if(0 == evt) return 0;
63  double m2 = mReco2(evt);
64  if(m2 >= 0.0) return sqrt(m2);
65  else return -sqrt(m2);
66 }
68  // will return actual mass for the "non-resonant particles"
69  if(this->isNonResonant() && 0 != evt){
70  return mReco(evt);
71  }else{
72  return this->mass();
73  }
74 }
75 //
double mReco2(const IDalitzEvent *evt) const
std::string SVPAT() const
virtual double sij(const MINT::PolymorphVector< int > &indices) const =0
double mass() const
virtual const TLorentzVector & p(unsigned int i) const =0
static const double m2
double mReco(const IDalitzEvent *evt) const
std::string name() const
virtual void print(std::ostream &out=std::cout) const
bool isNonResonant() const
const std::vector< int > & asi() const
const ParticleProperties * props() const
TLorentzVector p(const IDalitzEvent *evt) const
double mRes(const IDalitzEvent *evt=0) const