MINT2
Public Member Functions | Public Attributes | Private Member Functions | List of all members
DecayTreeItem Class Reference

#include <DecayTreeItem.h>

Inheritance diagram for DecayTreeItem:
AssociatedDecayTreeItem

Public Member Functions

 DecayTreeItem (int i=0)
 
 DecayTreeItem (const DecayTreeItem &other)
 
DecayTreeItemoperator= (const DecayTreeItem &other)
 
virtual ~DecayTreeItem ()
 
 operator int ()
 
 operator int () const
 
int parityFactor () const
 
int L () const
 
char L_as_SPD () const
 
void setL (int l)
 
void unSetL ()
 
void setPDG (int id)
 
const ParticlePropertiesprops () const
 
std::string name () const
 
std::string SVPAT () const
 
double mass () const
 
bool isNonResonant () const
 
double width () const
 
std::string charge () const
 
bool hasDistinctAnti () const
 
int pdg () const
 
std::string J () const
 
bool ChargeConThis ()
 
bool antiThis ()
 
virtual void print (std::ostream &out=std::cout) const
 
virtual void printShort (std::ostream &out=std::cout) const
 
DecayTreeItem operator- () const
 
DecayTreeItem operator+ () const
 

Public Attributes

int _pdg_id
 
int _L_angMom
 

Private Member Functions

int defaultParityFactor () const
 

Detailed Description

Definition at line 11 of file DecayTreeItem.h.

Constructor & Destructor Documentation

◆ DecayTreeItem() [1/2]

DecayTreeItem::DecayTreeItem ( int  i = 0)

Definition at line 8 of file DecayTreeItem.cpp.

9  : _pdg_id(i)
10  , _L_angMom(-9999)
11 {
12 }

◆ DecayTreeItem() [2/2]

DecayTreeItem::DecayTreeItem ( const DecayTreeItem other)

Definition at line 13 of file DecayTreeItem.cpp.

14  : _pdg_id(other._pdg_id)
15  , _L_angMom(other._L_angMom)
16 {}

◆ ~DecayTreeItem()

virtual DecayTreeItem::~DecayTreeItem ( )
inlinevirtual

Definition at line 51 of file DecayTreeItem.h.

51 {}

Member Function Documentation

◆ antiThis()

bool DecayTreeItem::antiThis ( )
inline

Definition at line 78 of file DecayTreeItem.h.

78 {return ChargeConThis();}
bool ChargeConThis()

◆ charge()

std::string DecayTreeItem::charge ( ) const

Definition at line 68 of file DecayTreeItem.cpp.

68  {
69  const ParticleProperties* pp = props();
70  if(0 == pp){
71  return "-9999";
72  }
73  return pp->charge();
74 }
std::string charge() const
const ParticleProperties * props() const

◆ ChargeConThis()

bool DecayTreeItem::ChargeConThis ( )

Definition at line 95 of file DecayTreeItem.cpp.

95  {
96  if(! hasDistinctAnti()) return false;
97  _pdg_id *= -1;
98  return true;
99 }
bool hasDistinctAnti() const

◆ defaultParityFactor()

int DecayTreeItem::defaultParityFactor ( ) const
inlineprivate

Definition at line 19 of file DecayTreeItem.h.

19  {
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  }

◆ hasDistinctAnti()

bool DecayTreeItem::hasDistinctAnti ( ) const

Definition at line 75 of file DecayTreeItem.cpp.

75  {
76  const ParticleProperties* pp = props();
77  if(0 == pp){
78  return -1;
79  }
80  return pp->hasDistinctAnti();
81 }
const ParticleProperties * props() const

◆ isNonResonant()

bool DecayTreeItem::isNonResonant ( ) const

Definition at line 54 of file DecayTreeItem.cpp.

54  {
55  const ParticleProperties* pp = props();
56  if(0 == pp){
57  return false;
58  }
59  return pp->isNonResonant();
60 }
const ParticleProperties * props() const

◆ J()

std::string DecayTreeItem::J ( ) const

Definition at line 86 of file DecayTreeItem.cpp.

86  {
87  const ParticleProperties* pp = props();
88  if(0 == pp){
89  return "";
90  }
91  return pp->J();
92 }
std::string J() const
const ParticleProperties * props() const

◆ L()

int DecayTreeItem::L ( ) const
inline

Definition at line 59 of file DecayTreeItem.h.

59 {return _L_angMom;}

◆ L_as_SPD()

char DecayTreeItem::L_as_SPD ( ) const

Definition at line 104 of file DecayTreeItem.cpp.

104  {
105  if(L() < 0) return ' ';
106 
107  if(L()==0) return 'S';
108  else if(L()==1) return 'P';
109  else if(L()==2) return 'D';
110  else if(L()==3) return 'F';
111  else if(L()==4) return 'G';
112  else if(L()==5) return 'H';
113  else if(L()==6) return 'I';
114  else{
115  // J's missing, next (L=7) is K, then alphabetical
116  char Kplus='K';
117  int advanceK = L()-7;
118  for(int i=0; i < advanceK; i++) Kplus++;
119  return Kplus;
120  }
121 }
int L() const
Definition: DecayTreeItem.h:59

◆ mass()

double DecayTreeItem::mass ( ) const

Definition at line 47 of file DecayTreeItem.cpp.

47  {
48  const ParticleProperties* pp = props();
49  if(0 == pp){
50  return -1;
51  }
52  return pp->mass();
53 }
const ParticleProperties * props() const

◆ name()

std::string DecayTreeItem::name ( ) const

Definition at line 33 of file DecayTreeItem.cpp.

33  {
34  const ParticleProperties* pp = props();
35  if(0 == pp){
36  return "";
37  }
38  return pp->name();
39 }
std::string name() const
const ParticleProperties * props() const

◆ operator int() [1/2]

DecayTreeItem::operator int ( )
inline

Definition at line 52 of file DecayTreeItem.h.

52  {
53  return _pdg_id;
54  }

◆ operator int() [2/2]

DecayTreeItem::operator int ( ) const
inline

Definition at line 55 of file DecayTreeItem.h.

55  {
56  return _pdg_id;
57  }

◆ operator+()

DecayTreeItem DecayTreeItem::operator+ ( ) const

Definition at line 151 of file DecayTreeItem.cpp.

151  {
152  return *this;
153 }

◆ operator-()

DecayTreeItem DecayTreeItem::operator- ( ) const

Definition at line 146 of file DecayTreeItem.cpp.

146  {
147  DecayTreeItem dt(*this);
148  dt.antiThis();
149  return dt;
150 }

◆ operator=()

DecayTreeItem & DecayTreeItem::operator= ( const DecayTreeItem other)

Definition at line 17 of file DecayTreeItem.cpp.

17  {
18  _pdg_id = other._pdg_id;
19  _L_angMom = other._L_angMom;
20  return *this;
21 }

◆ parityFactor()

int DecayTreeItem::parityFactor ( ) const
inline

Definition at line 58 of file DecayTreeItem.h.

58 {return defaultParityFactor();} // see above
int defaultParityFactor() const
Definition: DecayTreeItem.h:19

◆ pdg()

int DecayTreeItem::pdg ( ) const

Definition at line 82 of file DecayTreeItem.cpp.

82  {
83  return _pdg_id;
84 }

◆ print()

void DecayTreeItem::print ( std::ostream &  out = std::cout) const
virtual

Reimplemented in AssociatedDecayTreeItem.

Definition at line 123 of file DecayTreeItem.cpp.

123  {
124  const ParticleProperties* pp = props();
125  if(0 == pp){
126  out << _pdg_id;
127  }else{
128  out << pp->name()
129  << "(" << pp->SVPAT() <<")";
130  }
131  if(L() > -9998){
132  out << L_as_SPD() << "-wave";
133  }
134 }
std::string SVPAT() const
char L_as_SPD() const
int L() const
Definition: DecayTreeItem.h:59
std::string name() const
const ParticleProperties * props() const

◆ printShort()

void DecayTreeItem::printShort ( std::ostream &  out = std::cout) const
virtual

Definition at line 135 of file DecayTreeItem.cpp.

135  {
136  const ParticleProperties* pp = props();
137  if(0 == pp){
138  out << _pdg_id;
139  }else{
140  out << pp->name();
141  }
142  if(L() > -9998){
143  out << "[" << L_as_SPD() << "]";
144  }
145 }
char L_as_SPD() const
int L() const
Definition: DecayTreeItem.h:59
std::string name() const
const ParticleProperties * props() const

◆ props()

const ParticleProperties * DecayTreeItem::props ( ) const

Definition at line 23 of file DecayTreeItem.cpp.

23  {
25  if(0 == ppl){
26  std::cout << "Error in DecayTreeItem::props(): "
27  << "can't find ParticlePropertiesList."
28  << std::endl;
29  return 0;
30  }
31  return ppl->get(_pdg_id);
32 }
const ParticleProperties * get(const std::string &name) const
static const ParticlePropertiesList * getMe()

◆ setL()

void DecayTreeItem::setL ( int  l)
inline

Definition at line 61 of file DecayTreeItem.h.

61 { _L_angMom = l;}

◆ setPDG()

void DecayTreeItem::setPDG ( int  id)

Definition at line 101 of file DecayTreeItem.cpp.

101  {
102  _pdg_id = id;
103 }

◆ SVPAT()

std::string DecayTreeItem::SVPAT ( ) const

Definition at line 40 of file DecayTreeItem.cpp.

40  {
41  const ParticleProperties* pp = props();
42  if(0 == pp){
43  return "?";
44  }
45  return pp->SVPAT();
46 }
std::string SVPAT() const
const ParticleProperties * props() const

◆ unSetL()

void DecayTreeItem::unSetL ( )
inline

Definition at line 62 of file DecayTreeItem.h.

62 { _L_angMom = -9999;}

◆ width()

double DecayTreeItem::width ( ) const

Definition at line 61 of file DecayTreeItem.cpp.

61  {
62  const ParticleProperties* pp = props();
63  if(0 == pp){
64  return -1;
65  }
66  return pp->width();
67 }
const ParticleProperties * props() const
double width() const

Member Data Documentation

◆ _L_angMom

int DecayTreeItem::_L_angMom

Definition at line 42 of file DecayTreeItem.h.

◆ _pdg_id

int DecayTreeItem::_pdg_id

Definition at line 41 of file DecayTreeItem.h.


The documentation for this class was generated from the following files: