CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 GetBeamType () const
 get beam type More...
 
double GetBeamWidthX () const
 get average transverse beam width More...
 
double GetBeamWidthXError () const
 get average transverse beam width error ASSUME the same for X and Y More...
 
double GetBeamWidthY () const
 get average transverse beam width More...
 
double GetBeamWidthYError () const
 get average transverse beam width error X = Y More...
 
double GetBetaStar () const
 get beta star More...
 
double GetCovariance (int i, int j) const
 get i,j element of the full covariance matrix 7x7 More...
 
double Getdxdz () const
 get dxdz slope, crossing angle in XZ More...
 
double GetdxdzError () const
 get dxdz slope, crossing angle in XZ Error More...
 
double Getdydz () const
 get dydz slope, crossing angle in YZ More...
 
double GetdydzError () const
 get dydz slope, crossing angle in YZ Error More...
 
double GetEmittanceX () const
 get emittance More...
 
double GetEmittanceY () const
 get emittance More...
 
double GetSigmaZ () const
 get sigma Z, RMS bunch length More...
 
double GetSigmaZError () const
 get sigma Z, RMS bunch length Error More...
 
double GetX () const
 get X beam position More...
 
double GetXError () const
 get X beam position Error More...
 
double GetY () const
 get Y beam position More...
 
double GetYError () const
 get Y beam position Error More...
 
double GetZ () const
 get Z beam position More...
 
double GetZError () const
 get Z beam position Error 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...
 
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 ( )
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]
virtual BeamSpotObjects::~BeamSpotObjects ( )
inlinevirtual

Definition at line 33 of file BeamSpotObjects.h.

33 {}

Member Function Documentation

int BeamSpotObjects::GetBeamType ( ) const
inline
double BeamSpotObjects::GetBeamWidthX ( ) const
inline
double BeamSpotObjects::GetBeamWidthXError ( ) 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 BeamSpotDipServer::readRcd().

93 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetBeamWidthY ( ) const
inline
double BeamSpotObjects::GetBeamWidthYError ( ) 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 BeamSpotDipServer::readRcd().

95 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetBetaStar ( ) const
inline
double BeamSpotObjects::GetCovariance ( int  i,
int  j 
) const
inline

get i,j element of the full covariance matrix 7x7

Definition at line 83 of file BeamSpotObjects.h.

References covariance_, mps_fire::i, and dqmiolumiharvest::j.

Referenced by AlcaBeamSpotFromDB::endLuminosityBlockProduce(), AlcaBeamMonitor::globalBeginLuminosityBlock(), and BeamSpotOnlineProducer::produce().

83 { return covariance_[i][j]; }
double covariance_[7][7]
double BeamSpotObjects::Getdxdz ( ) const
inline
double BeamSpotObjects::GetdxdzError ( ) 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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

97 { return sqrt(covariance_[4][4]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::Getdydz ( ) const
inline
double BeamSpotObjects::GetdydzError ( ) 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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

99 { return sqrt(covariance_[5][5]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetEmittanceX ( ) const
inline
double BeamSpotObjects::GetEmittanceY ( ) const
inline
double BeamSpotObjects::GetSigmaZ ( ) const
inline
double BeamSpotObjects::GetSigmaZError ( ) 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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

91 { return sqrt(covariance_[3][3]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetX ( ) const
inline
double BeamSpotObjects::GetXError ( ) 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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

85 { return sqrt(covariance_[0][0]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetY ( ) const
inline
double BeamSpotObjects::GetYError ( ) 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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

87 { return sqrt(covariance_[1][1]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::GetZ ( void  ) const
inline
double BeamSpotObjects::GetZError ( void  ) const
inline

get Z beam position Error

Definition at line 89 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

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

89 { return sqrt(covariance_[2][2]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
void BeamSpotObjects::print ( std::stringstream &  ss) const

print beam spot parameters

Definition at line 5 of file BeamSpotObjects.cc.

References GetBeamType(), GetBeamWidthX(), GetBeamWidthXError(), GetBeamWidthY(), GetBeamWidthYError(), GetBetaStar(), Getdxdz(), GetdxdzError(), Getdydz(), GetdydzError(), GetEmittanceX(), GetEmittanceY(), GetSigmaZ(), GetSigmaZError(), GetX(), GetXError(), GetY(), GetYError(), GetZ(), and GetZError().

Referenced by operator<<().

5  {
6  ss << "-----------------------------------------------------\n"
7  << " Beam Spot Data\n\n"
8  << " Beam type = " << GetBeamType() << "\n"
9  << " X0 = " << GetX() << " +/- " << GetXError() << " [cm]\n"
10  << " Y0 = " << GetY() << " +/- " << GetYError() << " [cm]\n"
11  << " Z0 = " << GetZ() << " +/- " << GetZError() << " [cm]\n"
12  << " Sigma Z0 = " << GetSigmaZ() << " +/- " << GetSigmaZError() << " [cm]\n"
13  << " dxdz = " << Getdxdz() << " +/- " << GetdxdzError() << " [radians]\n"
14  << " dydz = " << Getdydz() << " +/- " << GetdydzError() << " [radians]\n"
15  << " Beam Width X = " << GetBeamWidthX() << " +/- " << GetBeamWidthXError() << " [cm]\n"
16  << " Beam Width Y = " << GetBeamWidthY() << " +/- " << GetBeamWidthYError() << " [cm]\n"
17  << " Emittance X = " << GetEmittanceX() << " [cm]\n"
18  << " Emittance Y = " << GetEmittanceY() << " [cm]\n"
19  << " Beta star = " << GetBetaStar() << " [cm]\n"
20  << "-----------------------------------------------------\n\n";
21 }
double Getdydz() const
get dydz slope, crossing angle in YZ
double GetY() const
get Y beam position
double GetSigmaZ() const
get sigma Z, RMS bunch length
double GetBeamWidthX() const
get average transverse beam width
double GetYError() const
get Y beam position Error
double GetBeamWidthYError() const
get average transverse beam width error X = Y
double GetBeamWidthY() const
get average transverse beam width
double GetEmittanceX() const
get emittance
int GetBeamType() const
get beam type
double GetdydzError() const
get dydz slope, crossing angle in YZ Error
double GetZ() const
get Z beam position
double Getdxdz() const
get dxdz slope, crossing angle in XZ
double GetdxdzError() const
get dxdz slope, crossing angle in XZ Error
double GetBeamWidthXError() const
get average transverse beam width error ASSUME the same for X and Y
double GetSigmaZError() const
get sigma Z, RMS bunch length Error
double GetX() const
get X beam position
double GetXError() const
get X beam position Error
double GetBetaStar() const
get beta star
double GetEmittanceY() const
get emittance
double GetZError() const
get Z beam position Error
template<class Archive >
void BeamSpotObjects::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void BeamSpotObjects::SetBeamWidthX ( double  val)
inline
void BeamSpotObjects::SetBeamWidthXError ( double  val)
inline
void BeamSpotObjects::SetBeamWidthY ( double  val)
inline
void BeamSpotObjects::SetBeamWidthYError ( double  val)
inline
void BeamSpotObjects::SetBetaStar ( double  val)
inline
void BeamSpotObjects::SetCovariance ( int  i,
int  j,
double  val 
)
inline
void BeamSpotObjects::Setdxdz ( double  val)
inline
void BeamSpotObjects::Setdydz ( double  val)
inline
void BeamSpotObjects::SetEmittanceX ( double  val)
inline
void BeamSpotObjects::SetEmittanceY ( double  val)
inline
void BeamSpotObjects::SetPosition ( double  x,
double  y,
double  z 
)
inline
void BeamSpotObjects::SetSigmaZ ( double  val)
inline
void BeamSpotObjects::SetType ( int  type)
inline

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 127 of file BeamSpotObjects.h.

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

Definition at line 127 of file BeamSpotObjects.h.

Member Data Documentation

double BeamSpotObjects::beamwidthX_
protected

Definition at line 115 of file BeamSpotObjects.h.

Referenced by GetBeamWidthX(), and SetBeamWidthX().

double BeamSpotObjects::beamwidthXError_
protected

Definition at line 117 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and SetBeamWidthXError().

double BeamSpotObjects::beamwidthY_
protected

Definition at line 116 of file BeamSpotObjects.h.

Referenced by GetBeamWidthY(), and SetBeamWidthY().

double BeamSpotObjects::beamwidthYError_
protected

Definition at line 118 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and SetBeamWidthYError().

double BeamSpotObjects::betaStar_
protected

Definition at line 125 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), GetBetaStar(), and SetBetaStar().

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

Definition at line 119 of file BeamSpotObjects.h.

Referenced by Getdxdz(), and Setdxdz().

double BeamSpotObjects::dydz_
protected

Definition at line 120 of file BeamSpotObjects.h.

Referenced by Getdydz(), and Setdydz().

double BeamSpotObjects::emittanceX_
protected

Definition at line 123 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), GetEmittanceX(), and SetEmittanceX().

double BeamSpotObjects::emittanceY_
protected

Definition at line 124 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), GetEmittanceY(), and SetEmittanceY().

double BeamSpotObjects::position_[3]
protected

Definition at line 113 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), GetX(), GetY(), GetZ(), and SetPosition().

double BeamSpotObjects::sigmaZ_
protected

Definition at line 114 of file BeamSpotObjects.h.

Referenced by GetSigmaZ(), and SetSigmaZ().

int BeamSpotObjects::type_
protected