ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | Friends | List of all members
Trk::VKMassConstraint Class Referencefinal

#include <Derivt.h>

Inheritance diagram for Trk::VKMassConstraint:
Collaboration diagram for Trk::VKMassConstraint:

Public Member Functions

 VKMassConstraint (int, double, VKVertex *)
 
 VKMassConstraint (int, double, std::vector< int >, VKVertex *)
 
 ~VKMassConstraint ()
 
virtual VKConstraintBaseclone () const override
 
void setTargetMass (double M)
 
virtual void applyConstraint () override
 
double getTargetMass () const
 
const std::vector< int > & getUsedParticles () const
 
const VKVertexgetOriginVertex () const
 
VKContraintType getType () const
 

Public Attributes

int NCDim
 
int NTrk
 
std::vector< double > aa
 
std::vector< std::vector< Vect3DF > > f0t
 
std::vector< Vect3DFh0t
 

Protected Attributes

VKVertexm_originVertex
 
const VKContraintType m_type
 

Private Attributes

std::vector< int > m_usedParticles
 
double m_targetMass
 

Friends

std::ostream & operator<< (std::ostream &out, const VKMassConstraint &)
 

Detailed Description

Definition at line 46 of file Derivt.h.

Constructor & Destructor Documentation

◆ VKMassConstraint() [1/2]

Trk::VKMassConstraint::VKMassConstraint ( int  NTRK,
double  mass,
VKVertex vk 
)
inline

Definition at line 136 of file Derivt.h.

137  : VKConstraintBase(1, NTRK, VKContraintType::Mass, vk),
138  m_usedParticles(NTRK, 0),
139  m_targetMass(mass) {
140  for (int i = 0; i < NTrk; i++)
141  m_usedParticles[i] = i;
142 }

◆ VKMassConstraint() [2/2]

Trk::VKMassConstraint::VKMassConstraint ( int  NTRK,
double  mass,
std::vector< int >  listTrk,
VKVertex vk 
)
inline

Definition at line 144 of file Derivt.h.

147  : VKConstraintBase(1, NTRK, VKContraintType::Mass, vk),
148  m_usedParticles(std::move(listTrk)),
149  m_targetMass(mass) {
150  m_originVertex = vk;
151 }

◆ ~VKMassConstraint()

Trk::VKMassConstraint::~VKMassConstraint ( )
inlinedefault

Member Function Documentation

◆ applyConstraint()

void Trk::VKMassConstraint::applyConstraint ( )
inlineoverridevirtual

Implements Trk::VKConstraintBase.

Definition at line 206 of file Derivt.h.

206  {
207  calcMassConstraint(this);
208 }

◆ clone()

VKConstraintBase * Trk::VKMassConstraint::clone ( ) const
inlineoverridevirtual

Implements Trk::VKConstraintBase.

Definition at line 190 of file Derivt.h.

190  {
191  return new VKMassConstraint(*this);
192 }

◆ getOriginVertex()

const VKVertex* Trk::VKConstraintBase::getOriginVertex ( ) const
inlineinherited

Definition at line 30 of file Derivt.h.

30 { return m_originVertex; }

◆ getTargetMass()

double Trk::VKMassConstraint::getTargetMass ( ) const
inline

Definition at line 57 of file Derivt.h.

57 { return m_targetMass; };

◆ getType()

VKContraintType Trk::VKConstraintBase::getType ( ) const
inlineinherited

Definition at line 31 of file Derivt.h.

31 { return m_type; }

◆ getUsedParticles()

const std::vector<int>& Trk::VKMassConstraint::getUsedParticles ( ) const
inline

Definition at line 58 of file Derivt.h.

58 { return m_usedParticles; };

◆ setTargetMass()

void Trk::VKMassConstraint::setTargetMass ( double  M)
inline

Definition at line 55 of file Derivt.h.

55 { m_targetMass = M; };

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const VKMassConstraint cnst 
)
friend

Definition at line 33 of file Derivt.cxx.

33  {
34  const VKVertex* vk = cnst.getOriginVertex();
35  int NP = cnst.m_usedParticles.size();
36  // out.setf( std::ios::scientific); out.precision(7); out << std::endl;
37  out.precision(7);
38  out << std::defaultfloat;
39  out << " Mass constraint (total NTRK=" << vk->TrackList.size() << ")"
40  << std::endl;
41  out << " * target mass: " << cnst.getTargetMass() << std::endl;
42  out << " * particle indexes: ";
43  for (int i = 0; i < NP; i++) {
44  out << cnst.m_usedParticles[i] << ", ";
45  }
46  out << std::endl;
47  out << " * particle masses: ";
48  for (int i = 0; i < NP; i++) {
49  out << vk->TrackList[cnst.m_usedParticles[i]]->getMass() << ", ";
50  }
51  out << std::endl;
52  out << (VKConstraintBase&)cnst << '\n';
53  out.precision(6); // restore default
54  return out;
55 }

Member Data Documentation

◆ aa

std::vector<double> Trk::VKConstraintBase::aa
inherited

Definition at line 36 of file Derivt.h.

◆ f0t

std::vector<std::vector<Vect3DF> > Trk::VKConstraintBase::f0t
inherited

Definition at line 37 of file Derivt.h.

◆ h0t

std::vector<Vect3DF> Trk::VKConstraintBase::h0t
inherited

Definition at line 38 of file Derivt.h.

◆ m_originVertex

VKVertex* Trk::VKConstraintBase::m_originVertex
protectedinherited

Definition at line 40 of file Derivt.h.

◆ m_targetMass

double Trk::VKMassConstraint::m_targetMass
private

Definition at line 62 of file Derivt.h.

◆ m_type

const VKContraintType Trk::VKConstraintBase::m_type
protectedinherited

Definition at line 41 of file Derivt.h.

◆ m_usedParticles

std::vector<int> Trk::VKMassConstraint::m_usedParticles
private

Definition at line 61 of file Derivt.h.

◆ NCDim

int Trk::VKConstraintBase::NCDim
inherited

Definition at line 34 of file Derivt.h.

◆ NTrk

int Trk::VKConstraintBase::NTrk
inherited

Definition at line 35 of file Derivt.h.


The documentation for this class was generated from the following file:
NP
Definition: dumpNPs.cxx:34
Base_Fragment.mass
mass
Definition: Sherpa_i/share/common/Base_Fragment.py:59
Trk::VKMassConstraint::m_usedParticles
std::vector< int > m_usedParticles
Definition: Derivt.h:58
Trk::VKMassConstraint::m_targetMass
double m_targetMass
Definition: Derivt.h:62
Trk::VKConstraintBase::VKConstraintBase
VKConstraintBase(const int, int, VKContraintType, VKVertex *)
Definition: Derivt.h:125
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
Trk::VKConstraintBase::NTrk
int NTrk
Definition: Derivt.h:35
Trk::VKContraintType::Mass
@ Mass
lumiFormat.i
int i
Definition: lumiFormat.py:85
Trk::VKConstraintBase::m_originVertex
VKVertex * m_originVertex
Definition: Derivt.h:40
Trk::VKMassConstraint::VKMassConstraint
VKMassConstraint(int, double, VKVertex *)
Definition: Derivt.h:136
Trk::VKConstraintBase::m_type
const VKContraintType m_type
Definition: Derivt.h:41
Trk::calcMassConstraint
void calcMassConstraint(VKMassConstraint *cnst)
Definition: Derclc1.cxx:24