ATLAS Offline Software
ConstraintFitOutput.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CONSTRAINTFITOUTPUT_H
6 #define CONSTRAINTFITOUTPUT_H
8 #include "TLorentzVector.h"
9 
10 namespace ZMassConstraint
11 {
13  {
14  public:
15 
19 
21  unsigned int getNConstituents() const { return m_particleList.size(); }
22 
24  const TLorentzVector& getConstituentFourVector(int index) const { return m_particleList.at(index); }
25 
27  void getCompositeFourVector(TLorentzVector& lv) const
28  { lv = TLorentzVector(); for( auto lv1 : m_particleList ) lv += lv1; }
29 
32  { return m_covariancePhiThetaP.block(5*index +2, 5*index+2, 3, 3); }
33 
35  void getConstituentCovariancePhiThetaP(int index, AmgMatrix(3,3)& outMatrix) const
36  { outMatrix = m_covariancePhiThetaP.block(5*index +2, 5*index+2, 3, 3); }
37 
40  { return m_covariancePhiThetaP.block(5*index, 5*index, 5, 5); }
41 
43  void getConstituentCovarianced0z0PhiThetaP(int index, AmgMatrix(5,5)& outMatrix) const
44  { outMatrix = m_covariancePhiThetaP.block(5*index, 5*index, 5, 5); }
45 
48  { return m_covariancePhiThetaP; }
49 
51  void setFitOutput(const std::vector<TLorentzVector>& particleList,
52  const Amg::MatrixX& covarXYZ,
53  const Amg::MatrixX& covard0z0PhiThetaP)
54  { m_particleList = particleList; m_covariance = covarXYZ; m_covariancePhiThetaP = covard0z0PhiThetaP; }
55 
56  protected:
57  std::vector<TLorentzVector> m_particleList;
60  };
61 }
62 
63 #endif
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
index
Definition: index.py:1
ZMassConstraint::ConstraintFitOutput
Definition: ConstraintFitOutput.h:13
ZMassConstraint::ConstraintFitOutput::getConstituentCovariancePhiThetaP
Amg::MatrixX getConstituentCovariancePhiThetaP(int index) const
Access to individual covariance PhiThetaP (3,3)
Definition: ConstraintFitOutput.h:31
ZMassConstraint::ConstraintFitOutput::ConstraintFitOutput
ConstraintFitOutput()
Constructor/destructor.
Definition: ConstraintFitOutput.h:17
ZMassConstraint::ConstraintFitOutput::getCompositeFourVector
void getCompositeFourVector(TLorentzVector &lv) const
Access to combined 4-vec.
Definition: ConstraintFitOutput.h:27
AmgMatrix
#define AmgMatrix(rows, cols)
Definition: EventPrimitives.h:49
ZMassConstraint::ConstraintFitOutput::~ConstraintFitOutput
~ConstraintFitOutput()
Definition: ConstraintFitOutput.h:18
ZMassConstraint::ConstraintFitOutput::m_covariance
Amg::MatrixX m_covariance
Definition: ConstraintFitOutput.h:58
ZMassConstraint
Definition: ConstraintFit.cxx:12
ZMassConstraint::ConstraintFitOutput::getConstituentCovarianced0z0PhiThetaP
void getConstituentCovarianced0z0PhiThetaP(int index, AmgMatrix(5, 5)&outMatrix) const
Access to individual covariance d0z0PhiThetaP (5,5)
Definition: ConstraintFitOutput.h:43
ZMassConstraint::ConstraintFitOutput::getConstituentFourVector
const TLorentzVector & getConstituentFourVector(int index) const
Access to individual particle 4-vec.
Definition: ConstraintFitOutput.h:24
ZMassConstraint::ConstraintFitOutput::setFitOutput
void setFitOutput(const std::vector< TLorentzVector > &particleList, const Amg::MatrixX &covarXYZ, const Amg::MatrixX &covard0z0PhiThetaP)
Set output.
Definition: ConstraintFitOutput.h:51
ZMassConstraint::ConstraintFitOutput::m_particleList
std::vector< TLorentzVector > m_particleList
Definition: ConstraintFitOutput.h:57
EventPrimitives.h
ZMassConstraint::ConstraintFitOutput::getConstituentCovariancePhiThetaP
const Amg::MatrixX & getConstituentCovariancePhiThetaP() const
Access to full covariance d0z0PhiThetaP (5 * nparticle, 5 * nparticle)
Definition: ConstraintFitOutput.h:47
ZMassConstraint::ConstraintFitOutput::m_covariancePhiThetaP
Amg::MatrixX m_covariancePhiThetaP
Definition: ConstraintFitOutput.h:59
ZMassConstraint::ConstraintFitOutput::getConstituentCovarianced0z0PhiThetaP
Amg::MatrixX getConstituentCovarianced0z0PhiThetaP(int index) const
Access to individual covariance d0z0PhiThetaP (5,5)
Definition: ConstraintFitOutput.h:39
ZMassConstraint::ConstraintFitOutput::getNConstituents
unsigned int getNConstituents() const
Number of particles.
Definition: ConstraintFitOutput.h:21
ZMassConstraint::ConstraintFitOutput::getConstituentCovariancePhiThetaP
void getConstituentCovariancePhiThetaP(int index, AmgMatrix(3, 3)&outMatrix) const
Access to individual covariance PhiThetaP (3,3)
Definition: ConstraintFitOutput.h:35