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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoPseudoTP0_PseudoTtoVP1_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_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoPseudoTP0_PseudoTtoVP1_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< AssociatedDecayTreePT
 
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 289 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3()

SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 298 of file SpinFactors4Body_Tensors.h.

299  : SpinFactor(theDecay, 4)
300  , PT(0), V(0)
301  {
302  }
MINT::const_counted_ptr< AssociatedDecayTree > V
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
MINT::const_counted_ptr< AssociatedDecayTree > PT

◆ ~SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3()

virtual SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::~SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3 ( )
inlinevirtual

Definition at line 304 of file SpinFactors4Body_Tensors.h.

304 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 167 of file SpinFactors4Body_Tensors.cpp.

167  {
168  return getExampleDecay();
169 }

◆ getExampleDecay()

const DecayTree & SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::getExampleDecay ( )
static

Definition at line 161 of file SpinFactors4Body_Tensors.cpp.

161  {
162  // (angular momenum of pi2->rho must be 1)
163  _exampleDecay = new DecayTree(421);
164  _exampleDecay->addDgtr(-211, 10215)->addDgtr(211, 113)->addDgtr(211, -211);
165  return *_exampleDecay;
166 }
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_PseudoTtoVP1_VtoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 940 of file SpinFactors4Body_Tensors.cpp.

940  {
941  bool dbThis=false;
942  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
943 
944  TLorentzVector pV = p(2, evt) + p(3, evt);
945  TLorentzVector qV = p(2, evt) - p(3, evt);
946  TLorentzVector pT = pV + p(1, evt);
947  TLorentzVector qT = pV - p(1, evt);
948  TLorentzVector pD = pT + p(0, evt);
949  TLorentzVector qD = pT - p(0, evt);
950 
951  double MT = mRes(PT, evt);
952  double MV = mRes(V, evt);
953 
954  ZTspin1 tV(qV, pV, MV);
955  ZTspin2 tT(qT, pT, MT);
956  //SpinSumT ProT(pT, MT);
957 
958  const double units = GeV*GeV * GeV*GeV;
959 
960  if (_useZemachTensors) {
961  SpinSumT PT(pT,MT);
962  ZTspin1 LT(qT,pT,MT);
963  ZTspin1 LD(qD,pD,pD.M());
964  return PT.Sandwich(LD,LD,LT,tV)/units + 1./3. * LD.Dot(LD) / (pD.Dot(pD)) * PT.Sandwich(pD,pD,LT,tV)/units;
965  //return PT.Sandwich(qD,qD,LT,tV)/units;
966  }
967 
968  double returnVal = (tT.Contract(qT)).Dot(tV) / units;
969 
970  if(dbThis){
971  cout << " SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3::getVal "
972  << " returning " << returnVal
973  << endl;
974  SpinSumT ProT(pT, MT);
975  cout << " compare to: "
976  << ProT.Sandwich(qD, qD, qT, tV) / units
977  << endl;
978  }
979  return returnVal;
980 }
MINT::const_counted_ptr< AssociatedDecayTree > V
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::NamedParameter< int > _useZemachTensors
Definition: SpinFactor.h:31
virtual bool parseTree(const DalitzEventPattern &pat)
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 > PT

◆ name()

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

Implements SpinFactor.

Definition at line 309 of file SpinFactors4Body_Tensors.h.

309  {
310  return "SpinFactor4:SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3("
311  + theDecay().oneLiner() + ")";
312  }
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_PseudoTtoVP1_VtoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 887 of file SpinFactors4Body_Tensors.cpp.

887  {
888  // bool debugThis=false;
889  if(fsPS.size() < 4) fsPS.reserve(4);
890  if(theDecay(pat).nDgtr() != 2){
891  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree"
892  << " expected exactly 2 daughers of D, have "
893  << theDecay(pat).nDgtr();
894  return false;
895  }
896  for(int i=0; i< theDecay(pat).nDgtr(); i++){
898  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
899  else if(dgtr->getVal().SVPAT() == "PT" && ! dgtr->isFinalState()) PT = dgtr;
900  }
901  if(0==PT || 0==fsPS[0]){
902  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree"
903  << " Didn't find T or P0 " << PT.get() << ", " << fsPS[0].get() << endl;
904  return false;
905  }
906 
907  if(PT->nDgtr() != 2){
908  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree"
909  << " T should have 2 daughters, but it says it has "
910  << PT->nDgtr() << "."
911  << endl;
912  return false;
913  }
914  for(int i=0; i< PT->nDgtr(); i++){
915  const_counted_ptr<AssociatedDecayTree> dgtr= PT->getDgtrTreePtr(i);
916  if (dgtr->getVal().SVPAT() == "V" && ! dgtr->isFinalState()) V = dgtr;
917  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
918  }
919  if(0==V || 0==fsPS[1]){
920  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree"
921  << " Didn't find V2 or P1 " << V.get() << ", " << fsPS[1].get() << endl;
922  return false;
923  }
924 
925  if(V->nDgtr() != 2){
926  cout << "ERROR in SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3_BASE::parseTree"
927  << " V should have 2 daughters, but it says it has "
928  << V->nDgtr() << "."
929  << endl;
930  return false;
931  }
932  fsPS[2] = V->getDgtrTreePtr(0);
933  fsPS[3] = V->getDgtrTreePtr(1);
934  // normalOrder(fsPS[2], fsPS[3]);
935 
936  // this->printYourself();
937  return true;
938 }
MINT::const_counted_ptr< AssociatedDecayTree > V
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 > PT

◆ printYourself()

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

Implements SpinFactor.

Definition at line 982 of file SpinFactors4Body_Tensors.cpp.

982  {
983  // bool debugThis = false;
984  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
985  os << "spin factor SF_DtoPseudoTP0_PseudoTtoVP1_VtoP2P3"
986  << "\n\t ProT(pT, MT)"
987  << "\n\t ZTspin1 tT2(qV, pV, MV);"
988  << "\n\t pV = p(2) + p(3); qV = p(2) - p(3);"
989  << "\n\t pT = pV + p(1); qT = pV - p(1);"
990  << "\n\t pD = pT + p(0); qD = pT - p(0);"
991  << "\n\t return: ProT.Sandwich(qD, qD, qT, tV) / GeV^4"
992  << "\n\t parsed tree " << theDecay().oneLiner()
993  << "\n like this:" << endl;
994  this->printParsing(os);
995 }
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_PseudoTtoVP1_VtoP2P3::_exampleDecay =0
staticprotected

Definition at line 292 of file SpinFactors4Body_Tensors.h.

◆ PT

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

Definition at line 293 of file SpinFactors4Body_Tensors.h.

◆ V

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

Definition at line 293 of file SpinFactors4Body_Tensors.h.


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