MINT2
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SF_DtoPP0_PtoVP1_VtoP2P3 Class Reference

#include <SpinFactors4Body_ScalarsAndVectors.h>

Inheritance diagram for SF_DtoPP0_PtoVP1_VtoP2P3:
SpinFactor MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > CachedByEvent< std::complex< double > > MINT::FitParDependent ISpinFactor MINT::IFitParDependent MINT::IFitParRegister MINT::PolymorphVector< FitParRef > MINT::IReturnRealForEvent< IDalitzEvent > MINT::IReturnComplexForEvent< IDalitzEvent > MINT::IFitParDependent

Public Member Functions

virtual void printYourself (std::ostream &os=std::cout) const
 
 SF_DtoPP0_PtoVP1_VtoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoPP0_PtoVP1_VtoP2P3 ()
 
virtual double getVal (IDalitzEvent &evt)
 
virtual std::string name () const
 
virtual const DecayTreeexampleDecay ()
 
- Public Member Functions inherited from SpinFactor
virtual double RealVal (IDalitzEvent &evt)
 
virtual std::complex< double > ComplexVal (IDalitzEvent &evt)
 
virtual std::complex< double > getNewVal (IDalitzEvent &evt)
 
double mRes (const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
 
double mRes (const MINT::const_counted_ptr< AssociatedDecayTree > &adt, IDalitzEvent &evt)
 
const AssociatedDecayTreetheDecay () const
 
const AssociatedDecayTreetheDecay (const DalitzEventPattern &) const
 
const AssociatedDecayTreetheDecay (IDalitzEvent &evt) const
 
 SpinFactor (const AssociatedDecayTree &decay, int nFinal=3)
 
 SpinFactor (const SpinFactor &other)
 
virtual void printParsing (std::ostream &os=std::cout) const
 
virtual ~SpinFactor ()
 
- Public Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
virtual ~IReturnRealForEvent ()
 
- Public Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
virtual ~IReturnComplexForEvent ()
 
- Public Member Functions inherited from CachedByEvent< std::complex< double > >
 CachedByEvent ()
 
 CachedByEvent (const CachedByEvent &)
 
std::complex< double > getValWithCaching (IDalitzEvent &evt)
 
std::complex< double > getValWithCachingPermutation (IDalitzEvent &evt)
 
- Public Member Functions inherited from MINT::FitParDependent
virtual unsigned int size () const
 
virtual const FitParRefoperator[] (unsigned int i) const
 
virtual FitParRefoperator[] (unsigned int i)
 
virtual bool changedSinceLastCall () const
 
virtual void rememberFitParValues ()
 
virtual bool registerFitParDependence (const IFitParDependent &fpd)
 
bool registerFitParDependence (const FitParRef &fpr)
 
void removeAllFitParDependencies ()
 
 FitParDependent (IFitParRegister *daddy=0)
 
 FitParDependent (const FitParDependent &other, IFitParRegister *newDaddy=0)
 
void listFitParDependencies (std::ostream &os=std::cout) const
 
- Public Member Functions inherited from MINT::PolymorphVector< FitParRef >
 PolymorphVector ()
 
 PolymorphVector (unsigned int N)
 
 PolymorphVector (unsigned int N, const FitParRef &c)
 
 PolymorphVector (const PolymorphVector &other)
 
 PolymorphVector (const typename std::vector< FitParRef > &other)
 
virtual ~PolymorphVector ()
 
std::vector< FitParRef > & theVector ()
 
const std::vector< FitParRef > & theVector () const
 
FitParRefoperator[] (unsigned int i)
 
const FitParRefoperator[] (unsigned int i) const
 
FitParRefat (unsigned int i)
 
const FitParRefat (unsigned int i) const
 
std::vector< FitParRef >::iterator begin ()
 
std::vector< FitParRef >::const_iterator begin () const
 
std::vector< FitParRef >::iterator end ()
 
std::vector< FitParRef >::const_iterator end () const
 
std::vector< FitParRef >::iterator find (const FitParRef &c)
 
std::vector< FitParRef >::const_iterator find (const FitParRef &c) const
 
FitParReffront ()
 
const FitParReffront () const
 
FitParRefback ()
 
const FitParRefback () const
 
unsigned int size () const
 
bool empty () const
 
void push_back (const FitParRef &c)
 
void pop_back ()
 
void erase (typename std::vector< FitParRef >::iterator pos)
 
void erase (typename std::vector< FitParRef >::iterator first, typename std::vector< FitParRef >::iterator last)
 
PolymorphVector< FitParRef > & operator= (const PolymorphVector< FitParRef > &other)
 
void clear ()
 
void resize (unsigned int N)
 
void resize (unsigned int N, const FitParRef &c)
 
 operator const typename std::vector< FitParRef > & () const
 
 operator typename std::vector< FitParRef > & ()
 
bool operator== (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator!= (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator< (const MINT::PolymorphVector< FitParRef > &v2) const
 
bool operator> (const MINT::PolymorphVector< FitParRef > &v2) const
 
- Public Member Functions inherited from ISpinFactor
virtual ~ISpinFactor ()
 

Static Public Member Functions

static const DecayTreegetExampleDecay ()
 

Protected Member Functions

virtual bool parseTree (const DalitzEventPattern &pat)
 
- Protected Member Functions inherited from SpinFactor
TLorentzVector p (int i, IDalitzEvent &evt)
 
- Protected Member Functions inherited from MINT::IReturnRealForEvent< IDalitzEvent >
 IReturnRealForEvent ()
 
- Protected Member Functions inherited from MINT::IReturnComplexForEvent< IDalitzEvent >
 IReturnComplexForEvent ()
 
- Protected Member Functions inherited from CachedByEvent< std::complex< double > >
long int rememberNumber ()
 
long int rememberNumberPermutation (IDalitzEvent &evt)
 
long int configNumber ()
 
std::complex< double > recalculate (IDalitzEvent &evt)
 
std::complex< double > recalculatePermutation (IDalitzEvent &evt)
 
- Protected Member Functions inherited from ISpinFactor
 ISpinFactor ()
 

Protected Attributes

MINT::const_counted_ptr< AssociatedDecayTreeP
 
MINT::const_counted_ptr< AssociatedDecayTreeV
 
- Protected Attributes inherited from SpinFactor
const AssociatedDecayTree_theDecay
 
int _nFinal
 
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
 
MINT::NamedParameter< int > _useZemachTensors
 
- Protected Attributes inherited from CachedByEvent< std::complex< double > >
long int _rememberNumber
 
std::vector< long int > _rememberNumberPermutation
 
long int _configNumber
 
- Protected Attributes inherited from MINT::PolymorphVector< FitParRef >
std::vector< FitParRef_vec
 

Static Protected Attributes

static DecayTree_exampleDecay =0
 

Detailed Description

Definition at line 69 of file SpinFactors4Body_ScalarsAndVectors.h.

Constructor & Destructor Documentation

◆ SF_DtoPP0_PtoVP1_VtoP2P3()

SF_DtoPP0_PtoVP1_VtoP2P3::SF_DtoPP0_PtoVP1_VtoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 78 of file SpinFactors4Body_ScalarsAndVectors.h.

79  : SpinFactor(theDecay, 4)
80  , P(0), V(0)
81  {
82  }
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
MINT::const_counted_ptr< AssociatedDecayTree > V
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > P

◆ ~SF_DtoPP0_PtoVP1_VtoP2P3()

virtual SF_DtoPP0_PtoVP1_VtoP2P3::~SF_DtoPP0_PtoVP1_VtoP2P3 ( )
inlinevirtual

Definition at line 84 of file SpinFactors4Body_ScalarsAndVectors.h.

84 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoPP0_PtoVP1_VtoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 124 of file SpinFactors4Body_ScalarsAndVectors.cpp.

124  {
125  return getExampleDecay();
126 }

◆ getExampleDecay()

const DecayTree & SF_DtoPP0_PtoVP1_VtoP2P3::getExampleDecay ( )
static

Definition at line 113 of file SpinFactors4Body_ScalarsAndVectors.cpp.

113  {
114  if(0==_exampleDecay){
115  _exampleDecay = new DecayTree(421);
116  // remark: addDgtr always returns a pointer to the
117  // last daughter that was added, thus allowing these
118  // chains:
119  _exampleDecay->addDgtr(-211, 100211)->addDgtr(211, 113)->addDgtr(-211,211);
120  }
121  return *_exampleDecay;
122 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoPP0_PtoVP1_VtoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 169 of file SpinFactors4Body_ScalarsAndVectors.cpp.

169  {
170  // bool debugThis = false;
171 
172  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
173  TLorentzVector pV = p(2, evt) + p(3, evt);
174  TLorentzVector qV = p(2, evt) - p(3, evt);
175 
176  double MassV = mRes(V, evt);
177 
178  if (_useZemachTensors) {
179  double MP = mRes(P, evt);
180  TLorentzVector pP= pV + p(1, evt);
181  TLorentzVector qP= pV - p(1, evt);
182 
183  ZTspin1 LP(qP,pP,MP);
184  ZTspin1 LV(qV,pV,MassV);
185  return (LP.Dot(LV))/(GeV*GeV);
186  }
187 
188  return (p(1, evt).Dot(qV)
189  - p(1, evt).Dot(pV) * pV.Dot(qV) / (MassV*MassV))
190  /(GeV*GeV)
191  ;
192 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
virtual bool parseTree(const DalitzEventPattern &pat)
MINT::NamedParameter< int > _useZemachTensors
Definition: SpinFactor.h:31
TLorentzVector p(int i, IDalitzEvent &evt)
Definition: SpinFactor.cpp:11
MINT::const_counted_ptr< AssociatedDecayTree > V
virtual const DalitzEventPattern & eventPattern() const =0
double mRes(const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
Definition: SpinFactor.cpp:53
static const double GeV
MINT::const_counted_ptr< AssociatedDecayTree > P
Definition: ZTspin1.h:9

◆ name()

virtual std::string SF_DtoPP0_PtoVP1_VtoP2P3::name ( ) const
inlinevirtual

Implements SpinFactor.

Definition at line 87 of file SpinFactors4Body_ScalarsAndVectors.h.

87  {
88  return "SpinFactor4:SF_DtoPP0_PtoVP1_VtoP2P3("
89  + theDecay().oneLiner() + ")";
90  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoPP0_PtoVP1_VtoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 128 of file SpinFactors4Body_ScalarsAndVectors.cpp.

128  {
129  // bool debugThis=false;
130  if(fsPS.size() < 4) fsPS.reserve(4);
131  for(int i=0; i< theDecay(pat).nDgtr(); i++){
133  if (dgtr->getVal().SVPAT() == "P" && ! dgtr->isFinalState()) P = dgtr;
134  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
135  }
136  if(0==P || 0==fsPS[0]){
137  cout << "ERROR in SF_DtoPP0_PtoVP1_VtoP2P3::parseTree"
138  << " Didn't find P or P1 " << P.get() << ", " << fsPS[0].get() << endl;
139  return false;
140  }
141 
142  for(int i=0; i< P->nDgtr(); i++){
143  const_counted_ptr<AssociatedDecayTree> dgtr= P->getDgtrTreePtr(i);
144  if (dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V = dgtr;
145  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
146  }
147  if(0==V || 0==fsPS[1]){
148  cout << "ERROR in SF_DtoPP0_PtoVP1_VtoP2P3::parseTree"
149  << " Didn't find V or P2 " << V.get() << ", " << fsPS[1].get() << endl;
150  return false;
151  }
152 
153  if(V->nDgtr() != 2){
154  cout << "ERROR in SF_DtoAP0_AtoVP1_VtoP2P3::parseTree"
155  << " V should have 2 daughters, but it says it has "
156  << V->nDgtr() << "."
157  << endl;
158  return false;
159  }
160  fsPS[2] = V->getDgtrTreePtr(0);
161  fsPS[3] = V->getDgtrTreePtr(1);
162  // normalOrder(fsPS[2], fsPS[3]);
163 
164  // this->printYourself();
165 
166  return true;
167 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
std::string SVPAT() const
const ValueType & getVal() const
Definition: DDTree.h:102
bool isFinalState() const
Definition: DDTree.h:93
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
MINT::const_counted_ptr< AssociatedDecayTree > V
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > P
int nDgtr() const
Definition: DDTree.h:96

◆ printYourself()

void SF_DtoPP0_PtoVP1_VtoP2P3::printYourself ( std::ostream &  os = std::cout) const
virtual

Implements SpinFactor.

Definition at line 193 of file SpinFactors4Body_ScalarsAndVectors.cpp.

193  {
194  // bool debugThis = false;
195 
196  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
197  os << "---------------------------------------------------------"
198  << "\n spin factor SF_DtoPP0_PtoVP1_VtoP2P3 "
199  << "\n (p(1).Dot(qV) -p(1).Dot(pV) * pV.Dot(qV) / (MassV*MassV)) / (GeV*GeV)"
200  << "\n with pV = p(2) + p(3); qV = p(2) - p(3)"
201  << "\n parsed tree " << theDecay().oneLiner()
202  << "\n like this:" << endl;
203  this->printParsing(os);
204 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
virtual void printParsing(std::ostream &os=std::cout) const
Definition: SpinFactor.cpp:57
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

Member Data Documentation

◆ _exampleDecay

DecayTree * SF_DtoPP0_PtoVP1_VtoP2P3::_exampleDecay =0
staticprotected

Definition at line 71 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ P

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoPP0_PtoVP1_VtoP2P3::P
protected

Definition at line 72 of file SpinFactors4Body_ScalarsAndVectors.h.

◆ V

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoPP0_PtoVP1_VtoP2P3::V
protected

Definition at line 72 of file SpinFactors4Body_ScalarsAndVectors.h.


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