CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Friends
BeamSpotObjects Class Reference

#include <BeamSpotObjects.h>

Inheritance diagram for BeamSpotObjects:
BeamSpotOnlineObjects

Public Member Functions

 BeamSpotObjects ()
 default constructor More...
 
int beamType () const
 get beam type More...
 
double beamWidthX () const
 get average transverse beam width More...
 
double beamWidthXError () const
 get average transverse beam width error ASSUME the same for X and Y More...
 
double beamWidthY () const
 get average transverse beam width More...
 
double beamWidthYError () const
 get average transverse beam width error X = Y More...
 
double betaStar () const
 get beta star More...
 
double covariance (int i, int j) const
 get i,j element of the full covariance matrix 7x7 More...
 
double dxdz () const
 get dxdz slope, crossing angle in XZ More...
 
double dxdzError () const
 get dxdz slope, crossing angle in XZ Error More...
 
double dydz () const
 get dydz slope, crossing angle in YZ More...
 
double dydzError () const
 get dydz slope, crossing angle in YZ Error More...
 
double emittanceX () const
 get emittance More...
 
double emittanceY () const
 get emittance More...
 
void print (std::stringstream &ss) const
 print beam spot parameters More...
 
void setBeamWidthX (double val)
 set average transverse beam width X More...
 
void setBeamWidthXError (double val)
 set beam width X error More...
 
void setBeamWidthY (double val)
 set average transverse beam width Y More...
 
void setBeamWidthYError (double val)
 set beam width Y error More...
 
void setBetaStar (double val)
 set beta star More...
 
void setCovariance (int i, int j, double val)
 set i,j element of the full covariance matrix 7x7 More...
 
void setdxdz (double val)
 set dxdz slope, crossing angle More...
 
void setdydz (double val)
 set dydz slope, crossing angle in XZ More...
 
void setEmittanceX (double val)
 set emittance More...
 
void setEmittanceY (double val)
 set emittance More...
 
void setPosition (double x, double y, double z)
 set XYZ position More...
 
void setSigmaZ (double val)
 set sigma Z, RMS bunch length More...
 
void setType (int type)
 set beam type More...
 
double sigmaZ () const
 get sigma Z, RMS bunch length More...
 
double sigmaZError () const
 get sigma Z, RMS bunch length Error More...
 
double x () const
 get X beam position More...
 
double xError () const
 get X beam position Error More...
 
double y () const
 get Y beam position More...
 
double yError () const
 get Y beam position Error More...
 
double z () const
 get Z beam position More...
 
double zError () const
 get Z beam position Error More...
 
virtual ~BeamSpotObjects ()
 

Protected Attributes

double beamwidthX_
 
double beamwidthXError_
 
double beamwidthY_
 
double beamwidthYError_
 
double betaStar_
 
double covariance_ [7][7]
 
double dxdz_
 
double dydz_
 
double emittanceX_
 
double emittanceY_
 
double position_ [3]
 
double sigmaZ_
 
int type_
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Reconstructed beam spot object. It provides position, error, and width of the beam position.

Author
Francisco Yumiceva, Fermilab (yumic.nosp@m.eva@.nosp@m.fnal..nosp@m.gov)
Version
Id
BeamSpotObjects.h,v 1.9 2009/03/26 18:39:42 yumiceva Exp

Definition at line 20 of file BeamSpotObjects.h.

Constructor & Destructor Documentation

◆ BeamSpotObjects()

BeamSpotObjects::BeamSpotObjects ( )
inline

default constructor

Definition at line 23 of file BeamSpotObjects.h.

References beamwidthXError_, beamwidthYError_, betaStar_, covariance_, emittanceX_, emittanceY_, and position_.

23  : sigmaZ_(0), beamwidthX_(0), beamwidthY_(0), dxdz_(0), dydz_(0), type_(-1) {
24  beamwidthXError_ = 0;
25  beamwidthYError_ = 0;
26  emittanceX_ = 0;
27  emittanceY_ = 0;
28  betaStar_ = 0;
29  std::memset(position_, 0, sizeof position_);
30  std::memset(covariance_, 0, sizeof covariance_);
31  }
double covariance_[7][7]

◆ ~BeamSpotObjects()

virtual BeamSpotObjects::~BeamSpotObjects ( )
inlinevirtual

Definition at line 33 of file BeamSpotObjects.h.

33 {}

Member Function Documentation

◆ beamType()

int BeamSpotObjects::beamType ( ) const
inline

◆ beamWidthX()

double BeamSpotObjects::beamWidthX ( ) const
inline

◆ beamWidthXError()

double BeamSpotObjects::beamWidthXError ( ) const
inline

get average transverse beam width error ASSUME the same for X and Y

Definition at line 93 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), BeamSpotOnlineObjects::print(), and BeamSpotOnlineShifter::writeToDB().

93 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ beamWidthY()

double BeamSpotObjects::beamWidthY ( ) const
inline

◆ beamWidthYError()

double BeamSpotObjects::beamWidthYError ( ) const
inline

get average transverse beam width error X = Y

Definition at line 95 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), BeamSpotOnlineObjects::print(), and BeamSpotOnlineShifter::writeToDB().

95 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ betaStar()

double BeamSpotObjects::betaStar ( ) const
inline

◆ covariance()

double BeamSpotObjects::covariance ( int  i,
int  j 
) const
inline

◆ dxdz()

double BeamSpotObjects::dxdz ( ) const
inline

◆ dxdzError()

double BeamSpotObjects::dxdzError ( ) const
inline

get dxdz slope, crossing angle in XZ Error

Definition at line 97 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), and BeamSpotOnlineObjects::print().

97 { return sqrt(covariance_[4][4]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ dydz()

double BeamSpotObjects::dydz ( ) const
inline

◆ dydzError()

double BeamSpotObjects::dydzError ( ) const
inline

get dydz slope, crossing angle in YZ Error

Definition at line 99 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), and BeamSpotOnlineObjects::print().

99 { return sqrt(covariance_[5][5]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ emittanceX()

double BeamSpotObjects::emittanceX ( ) const
inline

◆ emittanceY()

double BeamSpotObjects::emittanceY ( ) const
inline

◆ print()

void BeamSpotObjects::print ( std::stringstream &  ss) const

print beam spot parameters

Definition at line 5 of file BeamSpotObjects.cc.

References beamType(), beamWidthX(), beamWidthXError(), beamWidthY(), beamWidthYError(), betaStar(), dxdz(), dxdzError(), dydz(), dydzError(), emittanceX(), emittanceY(), sigmaZ(), sigmaZError(), contentValuesCheck::ss, x(), xError(), y(), yError(), z(), and zError().

5  {
6  ss << "-----------------------------------------------------\n"
7  << " Beam Spot Data\n\n"
8  << " Beam type = " << beamType() << "\n"
9  << " X0 = " << x() << " +/- " << xError() << " [cm]\n"
10  << " Y0 = " << y() << " +/- " << yError() << " [cm]\n"
11  << " Z0 = " << z() << " +/- " << zError() << " [cm]\n"
12  << " Sigma Z0 = " << sigmaZ() << " +/- " << sigmaZError() << " [cm]\n"
13  << " dxdz = " << dxdz() << " +/- " << dxdzError() << " [radians]\n"
14  << " dydz = " << dydz() << " +/- " << dydzError() << " [radians]\n"
15  << " Beam Width X = " << beamWidthX() << " +/- " << beamWidthXError() << " [cm]\n"
16  << " Beam Width Y = " << beamWidthY() << " +/- " << beamWidthYError() << " [cm]\n"
17  << " Emittance X = " << emittanceX() << " [cm]\n"
18  << " Emittance Y = " << emittanceY() << " [cm]\n"
19  << " Beta star = " << betaStar() << " [cm]\n"
20  << "-----------------------------------------------------\n\n";
21 }
double emittanceX() const
get emittance
double dxdzError() const
get dxdz slope, crossing angle in XZ Error
double z() const
get Z beam position
double dydz() const
get dydz slope, crossing angle in YZ
double beamWidthX() const
get average transverse beam width
int beamType() const
get beam type
double beamWidthYError() const
get average transverse beam width error X = Y
double zError() const
get Z beam position Error
double x() const
get X beam position
double beamWidthY() const
get average transverse beam width
double y() const
get Y beam position
double xError() const
get X beam position Error
double sigmaZ() const
get sigma Z, RMS bunch length
double emittanceY() const
get emittance
double betaStar() const
get beta star
double dydzError() const
get dydz slope, crossing angle in YZ Error
double beamWidthXError() const
get average transverse beam width error ASSUME the same for X and Y
double sigmaZError() const
get sigma Z, RMS bunch length Error
double yError() const
get Y beam position Error
double dxdz() const
get dxdz slope, crossing angle in XZ

◆ serialize()

template<class Archive >
void BeamSpotObjects::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setBeamWidthX()

void BeamSpotObjects::setBeamWidthX ( double  val)
inline

◆ setBeamWidthXError()

void BeamSpotObjects::setBeamWidthXError ( double  val)
inline

◆ setBeamWidthY()

void BeamSpotObjects::setBeamWidthY ( double  val)
inline

◆ setBeamWidthYError()

void BeamSpotObjects::setBeamWidthYError ( double  val)
inline

◆ setBetaStar()

void BeamSpotObjects::setBetaStar ( double  val)
inline

◆ setCovariance()

void BeamSpotObjects::setCovariance ( int  i,
int  j,
double  val 
)
inline

◆ setdxdz()

void BeamSpotObjects::setdxdz ( double  val)
inline

◆ setdydz()

void BeamSpotObjects::setdydz ( double  val)
inline

◆ setEmittanceX()

void BeamSpotObjects::setEmittanceX ( double  val)
inline

◆ setEmittanceY()

void BeamSpotObjects::setEmittanceY ( double  val)
inline

◆ setPosition()

void BeamSpotObjects::setPosition ( double  x,
double  y,
double  z 
)
inline

◆ setSigmaZ()

void BeamSpotObjects::setSigmaZ ( double  val)
inline

◆ setType()

void BeamSpotObjects::setType ( int  type)
inline

◆ sigmaZ()

double BeamSpotObjects::sigmaZ ( ) const
inline

◆ sigmaZError()

double BeamSpotObjects::sigmaZError ( ) const
inline

get sigma Z, RMS bunch length Error

Definition at line 91 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), and BeamSpotOnlineObjects::print().

91 { return sqrt(covariance_[3][3]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ x()

double BeamSpotObjects::x ( ) const
inline

◆ xError()

double BeamSpotObjects::xError ( ) const
inline

get X beam position Error

Definition at line 85 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by BeamConditionsMonitor::endLuminosityBlock(), print(), and BeamSpotOnlineObjects::print().

85 { return sqrt(covariance_[0][0]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ y()

double BeamSpotObjects::y ( ) const
inline

◆ yError()

double BeamSpotObjects::yError ( ) const
inline

get Y beam position Error

Definition at line 87 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by BeamConditionsMonitor::endLuminosityBlock(), print(), and BeamSpotOnlineObjects::print().

87 { return sqrt(covariance_[1][1]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

◆ z()

double BeamSpotObjects::z ( ) const
inline

◆ zError()

double BeamSpotObjects::zError ( ) const
inline

get Z beam position Error

Definition at line 89 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print(), and BeamSpotOnlineObjects::print().

89 { return sqrt(covariance_[2][2]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 127 of file BeamSpotObjects.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 127 of file BeamSpotObjects.h.

Member Data Documentation

◆ beamwidthX_

double BeamSpotObjects::beamwidthX_
protected

Definition at line 115 of file BeamSpotObjects.h.

Referenced by beamWidthX(), and setBeamWidthX().

◆ beamwidthXError_

double BeamSpotObjects::beamwidthXError_
protected

Definition at line 117 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and setBeamWidthXError().

◆ beamwidthY_

double BeamSpotObjects::beamwidthY_
protected

Definition at line 116 of file BeamSpotObjects.h.

Referenced by beamWidthY(), and setBeamWidthY().

◆ beamwidthYError_

double BeamSpotObjects::beamwidthYError_
protected

Definition at line 118 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and setBeamWidthYError().

◆ betaStar_

double BeamSpotObjects::betaStar_
protected

Definition at line 125 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), betaStar(), and setBetaStar().

◆ covariance_

double BeamSpotObjects::covariance_[7][7]
protected

◆ dxdz_

double BeamSpotObjects::dxdz_
protected

Definition at line 119 of file BeamSpotObjects.h.

Referenced by dxdz(), and setdxdz().

◆ dydz_

double BeamSpotObjects::dydz_
protected

Definition at line 120 of file BeamSpotObjects.h.

Referenced by dydz(), and setdydz().

◆ emittanceX_

double BeamSpotObjects::emittanceX_
protected

Definition at line 123 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), emittanceX(), and setEmittanceX().

◆ emittanceY_

double BeamSpotObjects::emittanceY_
protected

Definition at line 124 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), emittanceY(), and setEmittanceY().

◆ position_

double BeamSpotObjects::position_[3]
protected

Definition at line 113 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), setPosition(), x(), y(), and z().

◆ sigmaZ_

double BeamSpotObjects::sigmaZ_
protected

Definition at line 114 of file BeamSpotObjects.h.

Referenced by setSigmaZ(), and sigmaZ().

◆ type_

int BeamSpotObjects::type_
protected