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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoTS_TtoP0P1_StoP2P3:
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_DtoTS_TtoP0P1_StoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoTS_TtoP0P1_StoP2P3 ()
 
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< AssociatedDecayTreeS
 
- 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 258 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoTS_TtoP0P1_StoP2P3()

SF_DtoTS_TtoP0P1_StoP2P3::SF_DtoTS_TtoP0P1_StoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 267 of file SpinFactors4Body_Tensors.h.

268  : SpinFactor(theDecay, 4)
269  , T(0), S(0)
270  {
271  }
MINT::const_counted_ptr< AssociatedDecayTree > T
MINT::const_counted_ptr< AssociatedDecayTree > S
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50

◆ ~SF_DtoTS_TtoP0P1_StoP2P3()

virtual SF_DtoTS_TtoP0P1_StoP2P3::~SF_DtoTS_TtoP0P1_StoP2P3 ( )
inlinevirtual

Definition at line 273 of file SpinFactors4Body_Tensors.h.

273 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoTS_TtoP0P1_StoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 140 of file SpinFactors4Body_Tensors.cpp.

140  {
141  return getExampleDecay();
142 }
static const DecayTree & getExampleDecay()

◆ getExampleDecay()

const DecayTree & SF_DtoTS_TtoP0P1_StoP2P3::getExampleDecay ( )
static

Definition at line 129 of file SpinFactors4Body_Tensors.cpp.

129  {
130  if(0==_exampleDecay){
131  _exampleDecay = new DecayTree(421);
132  // remark: addDgtr always returns a pointer to the
133  // last daughter that was added, thus allowing these
134  // chains:
135  _exampleDecay->addDgtr( 225)->addDgtr( 221, -211);
136  _exampleDecay->addDgtr( 9010221)->addDgtr(-321, 321);
137  }
138  return *_exampleDecay;
139 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoTS_TtoP0P1_StoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 821 of file SpinFactors4Body_Tensors.cpp.

821  {
822  bool dbThis=false;
823  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
824 
825  TLorentzVector pT = p(0, evt) + p(1, evt);
826  TLorentzVector qT = p(0, evt) - p(1, evt);
827  TLorentzVector pS = p(2, evt) + p(3, evt);
828  TLorentzVector qD = pT - pS;
829  TLorentzVector pD = pT + pS;
830 
831  double MT = mRes(T, evt);
832 
833  ZTspin2 tT(qT, pT, MT);
834 
835  const double units = GeV*GeV * GeV*GeV;
836 
837  if (_useZemachTensors) {
838  ZTspin2 tD(qD,pD,pD.M());
839  SpinSumT P2T(pT,MT);
840  SpinSumV P1T(pT,MT);
841  ZTspin1 t1T(qT, pT, MT);
842 
843  SymmLorentzMatrix qq(qD);
844  //return tT.Contract_2(qq);
845  if(dbThis){
846  cout << "" << endl;
847  cout << P2T.Sandwich(qD,qD,qT,qT)/units << endl;
848  cout << tT.Contract_2(qq)/units << endl;
849  cout << tT.Contract(qD).Dot(qD)/units << endl;
850  cout << (qD.Dot(t1T)*qD.Dot(t1T) + 1./3. * t1T.Dot(t1T) * P1T.Sandwich(qD,qD))/units << endl;
851  cout << "" << endl;
852  }
853  //return P2T.Sandwich(qD,qD,qT,qT)/units;
854  return tT.Contract_2(tD)/units;
855  }
856 
857  double returnVal = (tT.Contract(qD)).Dot(qD) / units;
858 
859  if(dbThis){
860 
861 
862  cout << " SF_DtoTS_TtoP0P1_StoP2P3::getVal "
863  << " returning " << returnVal
864  << endl;
865  }
866  return returnVal;
867 
868 }
virtual bool parseTree(const DalitzEventPattern &pat)
MINT::const_counted_ptr< AssociatedDecayTree > T
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

◆ name()

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

Implements SpinFactor.

Definition at line 278 of file SpinFactors4Body_Tensors.h.

278  {
279  return "SpinFactor4:SF_DtoTS_TtoP0P1_StoP2P3("
280  + theDecay().oneLiner() + ")";
281  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoTS_TtoP0P1_StoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 771 of file SpinFactors4Body_Tensors.cpp.

771  {
772  // bool debugThis=false;
773  if(fsPS.size() < 4) fsPS.reserve(4);
774  if(theDecay(pat).nDgtr() != 2){
775  cout << "ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree"
776  << " expected exactly 2 daughers of D, have "
777  << theDecay(pat).nDgtr();
778  return false;
779  }
780 
781  for(int i=0; i< theDecay(pat).nDgtr(); i++){
783  if(dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T = dgtr;
784  else if(dgtr->getVal().SVPAT() == "S" && ! dgtr->isFinalState()) S = dgtr;
785  }
786 
787  if(0==S || 0==T){
788  cout << "ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree"
789  << " Didn't find T or S " << T.get() << ", " << S.get() << endl;
790  return false;
791  }
792  if(T->nDgtr() != 2){
793  cout << "ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree"
794  << " T should have 2 daughters, but it says it has "
795  << T->nDgtr() << "."
796  << endl;
797  return false;
798  }
799  fsPS[0] = T->getDgtrTreePtr(0);
800  fsPS[1] = T->getDgtrTreePtr(1);
801  // normalOrder(fsPS[0], fsPS[1]);
802 
803  if(S->nDgtr() != 2){
804  cout << "ERROR in SF_DtoTS_TtoP0P1_StoP2P3::parseTree"
805  << " S should have 2 daughters, but it says it has "
806  << S->nDgtr() << "."
807  << endl;
808  return false;
809  }
810  fsPS[2] = S->getDgtrTreePtr(0);
811  fsPS[3] = S->getDgtrTreePtr(1);
812  // normalOrder(fsPS[2], fsPS[3]);
813 
814  // this->printYourself();
815  return true;
816 }
MINT::const_counted_ptr< AssociatedDecayTree > T
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::const_counted_ptr< AssociatedDecayTree > S
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

◆ printYourself()

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

Implements SpinFactor.

Definition at line 870 of file SpinFactors4Body_Tensors.cpp.

870  {
871  // bool debugThis = false;
872  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
873  os << "spin factor SF_DtoTS_TtoP0P1_StoP2P3"
874  << "\n\t ZTspin2 tT(qT, pT, MT);"
875  << "\n\t return: (tT.Contract(qD)).Dot(qD) / GeV^4"
876  << "\n\t with pT = p(0) + p(1), qT = p(0) - p(1), pS = p(2) + p(3), qD = pT - qV;"
877  << "\n\t parsed tree " << theDecay().oneLiner()
878  << "\n like this:" << endl;
879  this->printParsing(os);
880 }
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_DtoTS_TtoP0P1_StoP2P3::_exampleDecay =0
staticprotected

Definition at line 260 of file SpinFactors4Body_Tensors.h.

◆ S

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoTS_TtoP0P1_StoP2P3::S
protected

Definition at line 261 of file SpinFactors4Body_Tensors.h.

◆ T

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

Definition at line 261 of file SpinFactors4Body_Tensors.h.


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