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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoT1P0_T1toT2P1_T2toP2P3:
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_DtoT1P0_T1toT2P1_T2toP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoT1P0_T1toT2P1_T2toP2P3 ()
 
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< AssociatedDecayTreeT1
 
MINT::const_counted_ptr< AssociatedDecayTreeT2
 
- 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 229 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoT1P0_T1toT2P1_T2toP2P3()

SF_DtoT1P0_T1toT2P1_T2toP2P3::SF_DtoT1P0_T1toT2P1_T2toP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 238 of file SpinFactors4Body_Tensors.h.

239  : SpinFactor(theDecay, 4)
240  , T1(0), T2(0)
241  {
242  }
MINT::const_counted_ptr< AssociatedDecayTree > T2
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > T1

◆ ~SF_DtoT1P0_T1toT2P1_T2toP2P3()

virtual SF_DtoT1P0_T1toT2P1_T2toP2P3::~SF_DtoT1P0_T1toT2P1_T2toP2P3 ( )
inlinevirtual

Definition at line 244 of file SpinFactors4Body_Tensors.h.

244 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoT1P0_T1toT2P1_T2toP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 115 of file SpinFactors4Body_Tensors.cpp.

115  {
116  return getExampleDecay();
117 }
static const DecayTree & getExampleDecay()

◆ getExampleDecay()

const DecayTree & SF_DtoT1P0_T1toT2P1_T2toP2P3::getExampleDecay ( )
static

Definition at line 118 of file SpinFactors4Body_Tensors.cpp.

118  {
119  _exampleDecay = new DecayTree(421);
120  _exampleDecay->addDgtr(-211, 100215)->addDgtr(211, 225)->addDgtr(-211, 211);
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_DtoT1P0_T1toT2P1_T2toP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 707 of file SpinFactors4Body_Tensors.cpp.

707  {
708  bool dbThis=false;
709  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
710 
711  TLorentzVector pT2 = p(2, evt) + p(3, evt);
712  TLorentzVector qT2 = p(2, evt) - p(3, evt);
713  TLorentzVector pT1 = pT2 + p(1, evt);
714  TLorentzVector qT1 = pT2 - p(1, evt);
715  TLorentzVector pD = pT1 + p(0, evt);
716  TLorentzVector qD = pT1 - p(0, evt);
717 
718  double MT1 = mRes(T1 ,evt);
719  double MT2 = mRes(T2, evt);
720 
721  ZTspin2 tT1(qT1, pT1, MT1);
722  ZTspin2 tT2(qT2, pT2, MT2);
723 
724  TLorentzVector DT(tT1.Contract(qT1));
725 
726  const double units = GeV*GeV * GeV*GeV * GeV*GeV;
727 
728  if (_useZemachTensors) {
729  ZTspin1 LT1(qT1, pT1, MT1);
730  ZTspin1 LT2(qT2, pT2, MT2);
731  SpinSumT PT1(pT1,MT1);
732 
733  TLorentzVector tmp1 = LeviCivita(LT1,pT1,LT2);
734  TLorentzVector tmp2 = LeviCivita(LT1,pT1,pT2);
735  tmp2 *= LT2.Dot(LT2)*1./(3.*pT2.Dot(pT2));
736 
737  return (PT1.Sandwich(qD,qD,tmp1,LT2)+PT1.Sandwich(qD,qD,tmp2,pT2))/units;
738  }
739 
740  //returns always 0 since tT2 is a symmetric matrix !
741  //should not be used !
742  double returnVal = LeviCivita(pD, DT, tT2) / units;
743 
744  if(dbThis){
745  cout << " SF_DtoT1P0_T1toT2P1_T2toP2P3::getVal "
746  << " returning " << returnVal
747  << endl;
748  }
749  return returnVal;
750 }
virtual bool parseTree(const DalitzEventPattern &pat)
MINT::const_counted_ptr< AssociatedDecayTree > T2
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
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
MINT::const_counted_ptr< AssociatedDecayTree > T1

◆ name()

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

Implements SpinFactor.

Definition at line 249 of file SpinFactors4Body_Tensors.h.

249  {
250  return "SpinFactor4:SF_DtoT1P0_T1toT2P1_T2toP2P3("
251  + theDecay().oneLiner() + ")";
252  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoT1P0_T1toT2P1_T2toP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 654 of file SpinFactors4Body_Tensors.cpp.

654  {
655  // bool debugThis=false;
656  if(fsPS.size() < 4) fsPS.reserve(4);
657  if(theDecay(pat).nDgtr() != 2){
658  cout << "ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree"
659  << " expected exactly 2 daughers of D, have "
660  << theDecay(pat).nDgtr();
661  return false;
662  }
663  for(int i=0; i< theDecay(pat).nDgtr(); i++){
665  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
666  else if(dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T1 = dgtr;
667  }
668  if(0==T1 || 0==fsPS[0]){
669  cout << "ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree"
670  << " Didn't find T or P0 " << T1.get() << ", " << fsPS[0].get() << endl;
671  return false;
672  }
673 
674  if(T1->nDgtr() != 2){
675  cout << "ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree"
676  << " T should have 2 daughters, but it says it has "
677  << T1->nDgtr() << "."
678  << endl;
679  return false;
680  }
681  for(int i=0; i< T1->nDgtr(); i++){
682  const_counted_ptr<AssociatedDecayTree> dgtr= T1->getDgtrTreePtr(i);
683  if (dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T2 = dgtr;
684  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
685  }
686  if(0==T2 || 0==fsPS[1]){
687  cout << "ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree"
688  << " Didn't find T2 or P1 " << T2.get() << ", " << fsPS[1].get() << endl;
689  return false;
690  }
691 
692  if(T2->nDgtr() != 2){
693  cout << "ERROR in SF_DtoT1P0_T1toT2P1_T2toP2P3_BASE::parseTree"
694  << " V should have 2 daughters, but it says it has "
695  << T2->nDgtr() << "."
696  << endl;
697  return false;
698  }
699  fsPS[2] = T2->getDgtrTreePtr(0);
700  fsPS[3] = T2->getDgtrTreePtr(1);
701  // normalOrder(fsPS[2], fsPS[3]);
702 
703  // this->printYourself();
704  return true;
705 }
MINT::const_counted_ptr< AssociatedDecayTree > T2
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
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
int nDgtr() const
Definition: DDTree.h:96
MINT::const_counted_ptr< AssociatedDecayTree > T1

◆ printYourself()

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

Implements SpinFactor.

Definition at line 752 of file SpinFactors4Body_Tensors.cpp.

752  {
753  // bool debugThis = false;
754  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
755  os << "spin factor SF_DtoT1P0_T1toT2P1_T2toP2P3"
756  << "\n\t ZTspin2 tT1(qT, pT, MT);"
757  << "\n\t ZTspin1 tT2(qV, pV, MV);"
758  << "\n\t TLorentzVector DT(tT1.Contract(qT1));"
759  << "\n\t pV = p(2, evt) + p(3); qV = p(2) - p(3);"
760  << "\n\t pT = pV + p(1); qT = pV - p(1);"
761  << "\n\t pD = pT + p(0); qD = pT - p(0);"
762  << "\n\t return: LeviCivita(pD, DT, tT2)/GeV^6"
763  << "\n\t parsed tree " << theDecay().oneLiner()
764  << "\n like this:" << endl;
765  this->printParsing(os);
766 }
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_DtoT1P0_T1toT2P1_T2toP2P3::_exampleDecay =0
staticprotected

Definition at line 232 of file SpinFactors4Body_Tensors.h.

◆ T1

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoT1P0_T1toT2P1_T2toP2P3::T1
protected

Definition at line 233 of file SpinFactors4Body_Tensors.h.

◆ T2

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoT1P0_T1toT2P1_T2toP2P3::T2
protected

Definition at line 233 of file SpinFactors4Body_Tensors.h.


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