MINT2
DecayTreeItem.h
Go to the documentation of this file.
1 #ifndef DECAYTREEITEM_HH
2 #define DECAYTREEITEM_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:18:03 GMT
5 
7 #include <iostream>
8 #include <sstream>
9 #include <string>
10 
12  // conversion functions make it behave mostly
13  // like an int (then it's just _pdg_id).
14  // the "_asi" is important in the fit.
15  // it associates a final state particle in the
16  // decay tree to a particle number (1-3 or 1-4) in
17  // the event record.
18 
19  int defaultParityFactor()const{
20  // parity factor is the factor by which I multiply
21  // 3-momenta before calculating spin factors.
22  // The default is set such that if you have the
23  // same amplitude model for D->f and Dbar->fbar
24  // MINT conserves CP (and not just C by iteself, which
25  // would be the case w/o this measure)
26  // There is a public "parityFactor()" method below.
27  // This can be modified in case I want to allow users in the future
28  // to change this behaviour, for example by adding a variable
29  // the modifies the parity factor. For now it's fixed and
30  // parityFactor just returns the defaultParityFactor,
31  // which is 1 for particles, -1 for antiparticles
32  // and 1 for particles that are their own antiparticles.
33  // It is the latter case where one might at some point
34  // like to be able to change the behaviour, i.e.
35  // when CP-conjugating a decay of a C eigenstate (but not
36  // needed for a CP eigenstate, I'd think).
37  //
38  return (_pdg_id < 0 ? -1 : +1);
39  }
40  public:
41  int _pdg_id;
42  int _L_angMom; // angular momentum in decay
43  // (default: -9999; the fitter then uses automatically
44  // the smallest _L_angMom compatible with L conservation and P
45  // conservation - i.e. we assume strong decays.)
46 
47  DecayTreeItem(int i=0);
48  DecayTreeItem(const DecayTreeItem& other);
49  DecayTreeItem& operator=(const DecayTreeItem& other);
50 
51  virtual ~DecayTreeItem(){}
52  operator int(){
53  return _pdg_id;
54  }
55  operator int() const{
56  return _pdg_id;
57  }
58  int parityFactor()const{return defaultParityFactor();} // see above
59  int L()const {return _L_angMom;}
60  char L_as_SPD()const;
61  void setL(int l){ _L_angMom = l;}
62  void unSetL(){ _L_angMom = -9999;}
63 
64  void setPDG(int id);
65 
66  const ParticleProperties* props() const;
67  std::string name() const;
68  std::string SVPAT() const;
69  double mass() const;
70  bool isNonResonant() const;
71  double width() const;
72  std::string charge() const;
73  bool hasDistinctAnti() const;
74  int pdg() const;
75  std::string J() const;
76 
77  bool ChargeConThis();
78  bool antiThis(){return ChargeConThis();}
79 
80  virtual void print(std::ostream& out = std::cout) const;
81  virtual void printShort(std::ostream& out = std::cout) const;
82 
83 
84  DecayTreeItem operator-() const;
85  DecayTreeItem operator+() const;
86 };
87 
88 std::ostream& operator<<(std::ostream& out
89  , const DecayTreeItem& dti);
90 std::stringstream& operator<<(std::stringstream& out
91  , const DecayTreeItem& dti);
92 
93 // this is a hack - ther must be a better solution
94 std::stringstream& operator<<(std::stringstream& out
95  , int i);
96 
97 
98 #endif
99 //
virtual ~DecayTreeItem()
Definition: DecayTreeItem.h:51
std::string SVPAT() const
bool hasDistinctAnti() const
char L_as_SPD() const
DecayTreeItem & operator=(const DecayTreeItem &other)
std::string charge() const
double mass() const
void setL(int l)
Definition: DecayTreeItem.h:61
virtual void print(std::ostream &out=std::cout) const
virtual void printShort(std::ostream &out=std::cout) const
bool ChargeConThis()
void setPDG(int id)
std::string J() const
int L() const
Definition: DecayTreeItem.h:59
std::string name() const
int parityFactor() const
Definition: DecayTreeItem.h:58
int pdg() const
double width() const
bool isNonResonant() const
const ParticleProperties * props() const
std::ostream & operator<<(std::ostream &out, const DecayTreeItem &dti)
DecayTreeItem(int i=0)
int defaultParityFactor() const
Definition: DecayTreeItem.h:19
DecayTreeItem operator+() const
DecayTreeItem operator-() const