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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoTP0_TtoVP1_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_DtoTP0_TtoVP1_VtoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoTP0_TtoVP1_VtoP2P3 ()
 
virtual double getVal (IDalitzEvent &evt)
 
virtual const DecayTreeexampleDecay ()
 
virtual std::string name () const
 
- 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< AssociatedDecayTreeT
 
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 201 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoTP0_TtoVP1_VtoP2P3()

SF_DtoTP0_TtoVP1_VtoP2P3::SF_DtoTP0_TtoVP1_VtoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 210 of file SpinFactors4Body_Tensors.h.

211  : SpinFactor(theDecay, 4)
212  , T(0), V(0)
213  {
214  }
MINT::const_counted_ptr< AssociatedDecayTree > V
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
MINT::const_counted_ptr< AssociatedDecayTree > T
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50

◆ ~SF_DtoTP0_TtoVP1_VtoP2P3()

virtual SF_DtoTP0_TtoVP1_VtoP2P3::~SF_DtoTP0_TtoVP1_VtoP2P3 ( )
inlinevirtual

Definition at line 216 of file SpinFactors4Body_Tensors.h.

216 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoTP0_TtoVP1_VtoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 123 of file SpinFactors4Body_Tensors.cpp.

123  {
124  return getExampleDecay();
125 }
static const DecayTree & getExampleDecay()

◆ getExampleDecay()

const DecayTree & SF_DtoTP0_TtoVP1_VtoP2P3::getExampleDecay ( )
static

Definition at line 110 of file SpinFactors4Body_Tensors.cpp.

110  {
111  _exampleDecay = new DecayTree(421);
112  _exampleDecay->addDgtr(-211, 215)->addDgtr(211, 113)->addDgtr(-211, 211);
113  return *_exampleDecay;
114 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoTP0_TtoVP1_VtoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 597 of file SpinFactors4Body_Tensors.cpp.

597  {
598  bool dbThis=false;
599  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
600 
601  TLorentzVector pV = p(2, evt) + p(3, evt);
602  TLorentzVector qV = p(2, evt) - p(3, evt);
603  TLorentzVector pT = pV + p(1, evt);
604  TLorentzVector qT = pV - p(1, evt);
605  TLorentzVector pD = pT + p(0, evt);
606  TLorentzVector qD = pT - p(0, evt);
607 
608  double MT = mRes(T, evt);
609  double MV = mRes(V, evt);
610 
611  ZTspin2 t2T(qT, pT, MT);
612  ZTspin1 tV(qV, pV, MV);
613 
614  TLorentzVector DT(t2T.Contract(qD));
615 
616  const double units = GeV*GeV * GeV*GeV * GeV*GeV;
617 
618  if (_useZemachTensors) {
619  ZTspin1 tD(qD,pD,pD.M());
620  ZTspin1 t1T(qT, pT, MT);
621  SpinSumV P1T(pT,MT);
622  SpinSumT P2T(pT,MT);
623 
624  TLorentzVector tmp = LeviCivita(t1T,pT,P1T.Dot(tV));
625 
626  return P2T.Sandwich(tD,tD,tmp,t1T)/ units + 1./3. * tD.Dot(tD) / (pT.Dot(pT)) * P2T.Sandwich(pD,pD,tmp,t1T)/ units;
627  }
628 
629  double returnVal = LeviCivita(pD, qD, DT, tV) / units;
630 
631  if(dbThis){
632  cout << " SF_DtoTP0_TtoVP1_VtoP2P3::getVal "
633  << " returning " << returnVal
634  << endl;
635  }
636  return returnVal;
637 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::const_counted_ptr< AssociatedDecayTree > V
virtual bool parseTree(const DalitzEventPattern &pat)
MINT::const_counted_ptr< AssociatedDecayTree > T
MINT::NamedParameter< int > _useZemachTensors
Definition: SpinFactor.h:31
TLorentzVector p(int i, IDalitzEvent &evt)
Definition: SpinFactor.cpp:11
virtual const DalitzEventPattern & eventPattern() const =0
double mRes(const AssociatedDecayTreeItem &adt, IDalitzEvent &evt)
Definition: SpinFactor.cpp:53
static const double GeV
Definition: ZTspin1.h:9
double LeviCivita(const TLorentzVector &p0, const TLorentzVector &p1, const TLorentzVector &p2, const TLorentzVector &p3)
Definition: LeviCivita.h:12

◆ name()

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

Implements SpinFactor.

Definition at line 221 of file SpinFactors4Body_Tensors.h.

221  {
222  return "SpinFactor4:SF_DtoTP0_TtoVP1_VtoP2P3("
223  + theDecay().oneLiner() + ")";
224  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoTP0_TtoVP1_VtoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 544 of file SpinFactors4Body_Tensors.cpp.

544  {
545  // bool debugThis=false;
546  if(fsPS.size() < 4) fsPS.reserve(4);
547  if(theDecay(pat).nDgtr() != 2){
548  cout << "ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree"
549  << " expected exactly 2 daughers of D, have "
550  << theDecay(pat).nDgtr();
551  return false;
552  }
553  for(int i=0; i< theDecay(pat).nDgtr(); i++){
555  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
556  else if(dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T = dgtr;
557  }
558  if(0==T || 0==fsPS[0]){
559  cout << "ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree"
560  << " Didn't find T or P0 " << T.get() << ", " << fsPS[0].get() << endl;
561  return false;
562  }
563 
564  if(T->nDgtr() != 2){
565  cout << "ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree"
566  << " T should have 2 daughters, but it says it has "
567  << T->nDgtr() << "."
568  << endl;
569  return false;
570  }
571  for(int i=0; i< T->nDgtr(); i++){
572  const_counted_ptr<AssociatedDecayTree> dgtr= T->getDgtrTreePtr(i);
573  if (dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V = dgtr;
574  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
575  }
576  if(0==V || 0==fsPS[1]){
577  cout << "ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree"
578  << " Didn't find V2 or P1 " << V.get() << ", " << fsPS[1].get() << endl;
579  return false;
580  }
581 
582  if(V->nDgtr() != 2){
583  cout << "ERROR in SF_DtoTP0_TtoVP1_VtoP2P3_BASE::parseTree"
584  << " V should have 2 daughters, but it says it has "
585  << V->nDgtr() << "."
586  << endl;
587  return false;
588  }
589  fsPS[2] = V->getDgtrTreePtr(0);
590  fsPS[3] = V->getDgtrTreePtr(1);
591  // normalOrder(fsPS[2], fsPS[3]);
592 
593  // this->printYourself();
594  return true;
595 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::const_counted_ptr< AssociatedDecayTree > V
std::string SVPAT() const
const ValueType & getVal() const
Definition: DDTree.h:102
MINT::const_counted_ptr< AssociatedDecayTree > T
bool isFinalState() const
Definition: DDTree.h:93
MINT::const_counted_ptr< DDTree< ValueType > > getDgtrTreePtr(int i) const
Definition: DDTree.h:114
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
int nDgtr() const
Definition: DDTree.h:96

◆ printYourself()

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

Implements SpinFactor.

Definition at line 639 of file SpinFactors4Body_Tensors.cpp.

639  {
640  // bool debugThis = false;
641  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
642  os << "spin factor SF_DtoTP0_TtoVP1_VtoP2P3"
643  << "\n\t ZTspin2 tT1(qT, pT, MT);"
644  << "\n\t ZTspin1 tT2(qV, pV, MV);"
645  << "\n\t pV = p(2) + p(3); qV = p(2) - p(3);"
646  << "\n\t pT = pV + p(1); qT = pV - p(1);"
647  << "\n\t pD = pT + p(0); qD = pT - p(0);"
648  << "\n\t return: DT(tT.Contract(qD))/GeV^6"
649  << "\n\t parsed tree " << theDecay().oneLiner()
650  << "\n like this:" << endl;
651  this->printParsing(os);
652 }
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_DtoTP0_TtoVP1_VtoP2P3::_exampleDecay =0
staticprotected

Definition at line 204 of file SpinFactors4Body_Tensors.h.

◆ T

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoTP0_TtoVP1_VtoP2P3::T
protected

Definition at line 205 of file SpinFactors4Body_Tensors.h.

◆ V

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

Definition at line 205 of file SpinFactors4Body_Tensors.h.


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