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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3:
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_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3 ()
 
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< AssociatedDecayTreePT
 
MINT::const_counted_ptr< AssociatedDecayTreeT
 
- 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 344 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3()

SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 353 of file SpinFactors4Body_Tensors.h.

354  : SpinFactor(theDecay, 4)
355  , PT(0), T(0)
356  {
357  }
MINT::const_counted_ptr< AssociatedDecayTree > PT
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > T

◆ ~SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3()

virtual SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::~SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3 ( )
inlinevirtual

Definition at line 359 of file SpinFactors4Body_Tensors.h.

359 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 150 of file SpinFactors4Body_Tensors.cpp.

150  {
151  return getExampleDecay();
152 }

◆ getExampleDecay()

const DecayTree & SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::getExampleDecay ( )
static

Definition at line 145 of file SpinFactors4Body_Tensors.cpp.

145  {
146  _exampleDecay = new DecayTree(421);
147  _exampleDecay->addDgtr(-211, 10215)->addDgtr(211, 225)->addDgtr(211, -211);
148  return *_exampleDecay;
149 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 1152 of file SpinFactors4Body_Tensors.cpp.

1152  {
1153  bool dbThis=false;
1154  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
1155 
1156  double invGeV = 1;// 1.0/GeV;
1157 
1158  TLorentzVector pT = p(2, evt) + p(3, evt);
1159  TLorentzVector qT = p(2, evt) - p(3, evt);
1160  TLorentzVector pPT = pT + p(1, evt);
1161  TLorentzVector qPT = pT - p(1, evt);
1162  TLorentzVector pD = pPT + p(0, evt);
1163  TLorentzVector qD = pPT - p(0, evt);
1164 
1165  double MPT = mRes(PT, evt);
1166  double MT = mRes(T , evt);
1167  //double MV = mRes(S);
1168 
1169  ZTspin2 tPT(qD*invGeV, pPT*invGeV, MPT*invGeV);
1170  ZTspin2 tT(qT*invGeV, pT*invGeV, MT*invGeV);
1171 
1172  const double units = GeV*GeV*GeV*GeV;
1173 
1174  if (_useZemachTensors) {
1175  SpinSumT PT1(pPT,MPT);
1176  ZTspin1 LT(qT,pT,MT);
1177 
1178  return (PT1.Sandwich(qD,qD,LT,LT) + 1./3. * LT.Dot(LT)/(pT.Dot(pT)) * PT1.Sandwich(qD,qD,pT,pT))/units;
1179  }
1180 
1181  double returnVal = tPT.Contract_2(tT) / units;
1182 
1183  if(dbThis){
1184  cout << " SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::getVal "
1185  << " returning " << returnVal
1186  << " = " << tPT.Contract_2(tT) << " / " << units
1187  << "\n MPT = " << MPT << ", MT = " << MT
1188  << endl;
1189  }
1190  return returnVal;
1191 }
MINT::const_counted_ptr< AssociatedDecayTree > PT
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
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
MINT::const_counted_ptr< AssociatedDecayTree > T

◆ name()

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

Implements SpinFactor.

Definition at line 364 of file SpinFactors4Body_Tensors.h.

364  {
365  return "SpinFactor4:SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3("
366  + theDecay().oneLiner() + ")";
367  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 1099 of file SpinFactors4Body_Tensors.cpp.

1099  {
1100  // bool debugThis=false;
1101  if(fsPS.size() < 4) fsPS.reserve(4);
1102  if(theDecay(pat).nDgtr() != 2){
1103  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree"
1104  << " expected exactly 2 daughers of D, have "
1105  << theDecay(pat).nDgtr();
1106  return false;
1107  }
1108  for(int i=0; i< theDecay(pat).nDgtr(); i++){
1110  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
1111  else if(dgtr->getVal().SVPAT() == "PT" && ! dgtr->isFinalState()) PT = dgtr;
1112  }
1113  if(0==PT || 0==fsPS[0]){
1114  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree"
1115  << " Didn't find T or P0 " << PT.get() << ", " << fsPS[0].get() << endl;
1116  return false;
1117  }
1118 
1119  if(PT->nDgtr() != 2){
1120  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree"
1121  << " T should have 2 daughters, but it says it has "
1122  << PT->nDgtr() << "."
1123  << endl;
1124  return false;
1125  }
1126  for(int i=0; i< PT->nDgtr(); i++){
1127  const_counted_ptr<AssociatedDecayTree> dgtr= PT->getDgtrTreePtr(i);
1128  if (dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T = dgtr;
1129  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
1130  }
1131  if(0==T || 0==fsPS[1]){
1132  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree"
1133  << " Didn't find T or P1 " << T.get() << ", " << fsPS[1].get() << endl;
1134  return false;
1135  }
1136 
1137  if(T->nDgtr() != 2){
1138  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3_BASE::parseTree"
1139  << " V should have 2 daughters, but it says it has "
1140  << T->nDgtr() << "."
1141  << endl;
1142  return false;
1143  }
1144  fsPS[2] = T->getDgtrTreePtr(0);
1145  fsPS[3] = T->getDgtrTreePtr(1);
1146  // normalOrder(fsPS[2], fsPS[3]);
1147 
1148  // this->printYourself();
1149  return true;
1150 }
MINT::const_counted_ptr< AssociatedDecayTree > PT
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
MINT::const_counted_ptr< AssociatedDecayTree > T
int nDgtr() const
Definition: DDTree.h:96

◆ printYourself()

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

Implements SpinFactor.

Definition at line 1193 of file SpinFactors4Body_Tensors.cpp.

1193  {
1194  // bool debugThis = false;
1195  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
1196  os << "spin factor SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3"
1197  << "\n\t ZTspin2 tPT(qD, pPT, MPT);"
1198  << "\n\t ZTspin2 tT(qT, pT, MT);"
1199  << "\n\t pT = p(2) + p(3); qT = p(2) - p(3);"
1200  << "\n\t pPT = pT + p(1); qPT = pT - p(1);"
1201  << "\n\t pD = pPT + p(0); qD = pPT - p(0);"
1202  << "\n\t tPT.Contract_2(tT)/ GeV^8"
1203  << "\n\t parsed tree " << theDecay().oneLiner()
1204  << "\n like this:" << endl;
1205  this->printParsing(os);
1206 }
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_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::_exampleDecay =0
staticprotected

Definition at line 347 of file SpinFactors4Body_Tensors.h.

◆ PT

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoPseudoTP0_PseudoTtoTP1_TtoP2P3::PT
protected

Definition at line 348 of file SpinFactors4Body_Tensors.h.

◆ T

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

Definition at line 348 of file SpinFactors4Body_Tensors.h.


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