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

#include <SpinFactors4Body_Tensors.h>

Inheritance diagram for SF_DtoAP0_AtoTP1_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_DtoAP0_AtoTP1_TtoP2P3 (const AssociatedDecayTree &theDecay)
 
virtual ~SF_DtoAP0_AtoTP1_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< AssociatedDecayTreeA
 
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 375 of file SpinFactors4Body_Tensors.h.

Constructor & Destructor Documentation

◆ SF_DtoAP0_AtoTP1_TtoP2P3()

SF_DtoAP0_AtoTP1_TtoP2P3::SF_DtoAP0_AtoTP1_TtoP2P3 ( const AssociatedDecayTree theDecay)
inline

Definition at line 384 of file SpinFactors4Body_Tensors.h.

385  : SpinFactor(theDecay, 4)
386  , A(0), T(0)
387  {
388  }
SpinFactor(const AssociatedDecayTree &decay, int nFinal=3)
Definition: SpinFactor.h:74
MINT::const_counted_ptr< AssociatedDecayTree > A
MINT::const_counted_ptr< AssociatedDecayTree > T
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50

◆ ~SF_DtoAP0_AtoTP1_TtoP2P3()

virtual SF_DtoAP0_AtoTP1_TtoP2P3::~SF_DtoAP0_AtoTP1_TtoP2P3 ( )
inlinevirtual

Definition at line 390 of file SpinFactors4Body_Tensors.h.

390 {}

Member Function Documentation

◆ exampleDecay()

const DecayTree & SF_DtoAP0_AtoTP1_TtoP2P3::exampleDecay ( )
virtual

Implements SpinFactor.

Definition at line 179 of file SpinFactors4Body_Tensors.cpp.

179  {
180  return getExampleDecay();
181 }
static const DecayTree & getExampleDecay()

◆ getExampleDecay()

const DecayTree & SF_DtoAP0_AtoTP1_TtoP2P3::getExampleDecay ( )
static

Definition at line 172 of file SpinFactors4Body_Tensors.cpp.

172  {
173  _exampleDecay = new DecayTree(421);
174  // example: D->a1(1260) pi, a1 -> f2(1270) pi
175  // (kinematically challenged, but in PDG - broad particles...)
176  _exampleDecay->addDgtr(-211, 20213)->addDgtr(211, 225)->addDgtr(211, -211);
177  return *_exampleDecay;
178 }
MINT::counted_ptr< DDTree< ValueType > > addDgtr(const DDTree< ValueType > *treePtr)
Definition: DDTree.h:211
DDTree< DecayTreeItem > DecayTree
Definition: DecayTree.h:35

◆ getVal()

double SF_DtoAP0_AtoTP1_TtoP2P3::getVal ( IDalitzEvent evt)
virtual

Implements SpinFactor.

Definition at line 1266 of file SpinFactors4Body_Tensors.cpp.

1266  {
1267  bool dbThis=false;
1268  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) parseTree(evt.eventPattern());
1269 
1270  TLorentzVector pT = p(2, evt) + p(3, evt);
1271  TLorentzVector qT = p(2, evt) - p(3, evt);
1272  TLorentzVector pA = pT + p(1, evt);
1273  TLorentzVector qA = pT - p(1, evt);
1274  TLorentzVector pD = pA + p(0, evt);
1275  TLorentzVector qD = pA - p(0, evt);
1276 
1277  double MA = mRes(A, evt);
1278  double MT = mRes(T, evt);
1279  //double MV = mRes(S);
1280 
1281  ZTspin1 tA(qA, pA, MA);
1282  ZTspin2 tT(qT, pT, MT);
1283 
1284  const double units = GeV*GeV*GeV*GeV;
1285 
1286  if (_useZemachTensors) {
1287  ZTspin1 LD(qD,pD,pD.M());
1288  SpinSumT PT(pT,MT);
1289  //return (tT.Contract(tA)).Dot(LD);
1290  return PT.Sandwich(qT,qT,LD,tA)/units;
1291  }
1292 
1293  double returnVal = (tT.Contract(tA)).Dot(qD) / units;
1294 
1295  if(dbThis){
1296  cout << " SF_DtoAP0_AtoTP1_TtoP2P3::getVal "
1297  << " returning " << returnVal
1298  << endl;
1299  }
1300  return returnVal;
1301 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
MINT::const_counted_ptr< AssociatedDecayTree > A
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
virtual bool parseTree(const DalitzEventPattern &pat)
Definition: ZTspin1.h:9

◆ name()

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

Implements SpinFactor.

Definition at line 395 of file SpinFactors4Body_Tensors.h.

395  {
396  return "SpinFactor4:SF_DtoAP0_AtoTP1_TtoP2P3("
397  + theDecay().oneLiner() + ")";
398  }
const AssociatedDecayTree & theDecay() const
Definition: SpinFactor.h:50
void oneLiner(std::stringstream &seam, int generation=0) const
Definition: DDTree.h:375

◆ parseTree()

bool SF_DtoAP0_AtoTP1_TtoP2P3::parseTree ( const DalitzEventPattern pat)
protectedvirtual

Definition at line 1213 of file SpinFactors4Body_Tensors.cpp.

1213  {
1214  // bool debugThis=false;
1215  if(fsPS.size() < 4) fsPS.reserve(4);
1216  if(theDecay(pat).nDgtr() != 2){
1217  cout << "ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree"
1218  << " expected exactly 2 daughers of D, have "
1219  << theDecay(pat).nDgtr();
1220  return false;
1221  }
1222  for(int i=0; i< theDecay(pat).nDgtr(); i++){
1224  if (dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[0] = dgtr;
1225  else if(dgtr->getVal().SVPAT() == "A" && ! dgtr->isFinalState()) A = dgtr;
1226  }
1227  if(0==A || 0==fsPS[0]){
1228  cout << "ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree"
1229  << " Didn't find T or P0 " << A.get() << ", " << fsPS[0].get() << endl;
1230  return false;
1231  }
1232 
1233  if(A->nDgtr() != 2){
1234  cout << "ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree"
1235  << " T should have 2 daughters, but it says it has "
1236  << A->nDgtr() << "."
1237  << endl;
1238  return false;
1239  }
1240  for(int i=0; i< A->nDgtr(); i++){
1241  const_counted_ptr<AssociatedDecayTree> dgtr= A->getDgtrTreePtr(i);
1242  if (dgtr->getVal().SVPAT() == "T" && ! dgtr->isFinalState()) T = dgtr;
1243  else if(dgtr->getVal().SVPAT() == "P" && dgtr->isFinalState()) fsPS[1] = dgtr;
1244  }
1245  if(0==T || 0==fsPS[1]){
1246  cout << "ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree"
1247  << " Didn't find T or P1 " << T.get() << ", " << fsPS[1].get() << endl;
1248  return false;
1249  }
1250 
1251  if(T->nDgtr() != 2){
1252  cout << "ERROR in SF_DtoAP0_AtoTP1_TtoP2P3_BASE::parseTree"
1253  << " A should have 2 daughters, but it says it has "
1254  << T->nDgtr() << "."
1255  << endl;
1256  return false;
1257  }
1258  fsPS[2] = T->getDgtrTreePtr(0);
1259  fsPS[3] = T->getDgtrTreePtr(1);
1260  // normalOrder(fsPS[2], fsPS[3]);
1261 
1262  // this->printYourself();
1263  return true;
1264 }
std::vector< MINT::const_counted_ptr< AssociatedDecayTree > > fsPS
Definition: SpinFactor.h:30
std::string SVPAT() const
MINT::const_counted_ptr< AssociatedDecayTree > A
const ValueType & getVal() const
Definition: DDTree.h:102
bool isFinalState() const
Definition: DDTree.h:93
MINT::const_counted_ptr< AssociatedDecayTree > T
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_DtoAP0_AtoTP1_TtoP2P3::printYourself ( std::ostream &  os = std::cout) const
virtual

Implements SpinFactor.

Definition at line 1303 of file SpinFactors4Body_Tensors.cpp.

1303  {
1304  // bool debugThis = false;
1305  if(! ( fsPS[0] && fsPS[1] && fsPS[2] && fsPS[3]) ) return;
1306  os << "spin factor SF_DtoAP0_AtoTP1_TtoP2P3"
1307  << "\n\t ZTspin1 tA(qA, pA, MA);"
1308  << "\n\t ZTspin2 tT(qT, pT, MT);"
1309  << "\n\t pT = p(2) + p(3); qT = p(2) - p(3);"
1310  << "\n\t pA = pT + p(1); qA = pT - p(1);"
1311  << "\n\t pD = pA + p(0); qD = pA - p(0);"
1312  << "\n\t (tT.Contract(tA)).Dot(qD) / GeV^4"
1313  << "\n\t parsed tree " << theDecay().oneLiner()
1314  << "\n like this:" << endl;
1315  this->printParsing(os);
1316 }
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_DtoAP0_AtoTP1_TtoP2P3::_exampleDecay =0
staticprotected

Definition at line 378 of file SpinFactors4Body_Tensors.h.

◆ A

MINT::const_counted_ptr<AssociatedDecayTree> SF_DtoAP0_AtoTP1_TtoP2P3::A
protected

Definition at line 379 of file SpinFactors4Body_Tensors.h.

◆ T

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

Definition at line 379 of file SpinFactors4Body_Tensors.h.


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