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 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 ( )
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::beamType ( ) const
inline
double BeamSpotObjects::beamWidthX ( ) const
inline
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 BeamSpotDipServer::readRcd().

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

95 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:19
double covariance_[7][7]
double BeamSpotObjects::betaStar ( ) const
inline
double BeamSpotObjects::covariance ( 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::dxdz ( ) const
inline
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(), 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::dydz ( ) const
inline
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(), 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::emittanceX ( ) const
inline
double BeamSpotObjects::emittanceY ( ) const
inline
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(), x(), xError(), y(), yError(), z(), and zError().

Referenced by operator<<().

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 z() const
get Z beam position
double yError() const
get Y beam position Error
double emittanceY() const
get emittance
double emittanceX() const
get emittance
double xError() const
get X beam position Error
double dydzError() const
get dydz slope, crossing angle in YZ Error
double beamWidthY() const
get average transverse beam width
double dxdzError() const
get dxdz slope, crossing angle in XZ Error
double y() const
get Y beam position
double dxdz() const
get dxdz slope, crossing angle in XZ
double zError() const
get Z beam position Error
double beamWidthYError() const
get average transverse beam width error X = Y
double sigmaZ() const
get sigma Z, RMS bunch length
double beamWidthX() const
get average transverse beam width
double x() const
get X beam position
double sigmaZError() const
get sigma Z, RMS bunch length Error
double betaStar() const
get beta star
double dydz() const
get dydz slope, crossing angle in YZ
int beamType() const
get beam type
double beamWidthXError() const
get average transverse beam width error ASSUME the same for X and Y
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

set XYZ position

Definition at line 36 of file BeamSpotObjects.h.

References position_, x(), y(), and z().

Referenced by BeamSpotWrite2DB::endJob(), BeamSpotOnlineRecordsWriter::endJob(), AlcaBeamSpotHarvester::endRun(), FakeBeamMonitor::FitAndFill(), BeamMonitor::FitAndFill(), OnlineBeamSpotESProducer::OnlineBeamSpotESProducer(), and BeamFitter::write2DB().

36  {
37  position_[0] = x;
38  position_[1] = y;
39  position_[2] = z;
40  };
double z() const
get Z beam position
double y() const
get Y beam position
double x() const
get X beam position
void BeamSpotObjects::setSigmaZ ( double  val)
inline
void BeamSpotObjects::setType ( int  type)
inline
double BeamSpotObjects::sigmaZ ( ) const
inline
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(), 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::x ( ) const
inline
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(), 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::y ( ) const
inline
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(), 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::z ( ) const
inline
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(), BeamSpotOnlineObjects::print(), and BeamSpotDipServer::readRcd().

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

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 beamWidthX(), 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 beamWidthY(), 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(), betaStar(), and setBetaStar().

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

Definition at line 119 of file BeamSpotObjects.h.

Referenced by dxdz(), and setdxdz().

double BeamSpotObjects::dydz_
protected

Definition at line 120 of file BeamSpotObjects.h.

Referenced by dydz(), and setdydz().

double BeamSpotObjects::emittanceX_
protected

Definition at line 123 of file BeamSpotObjects.h.

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

double BeamSpotObjects::emittanceY_
protected

Definition at line 124 of file BeamSpotObjects.h.

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

double BeamSpotObjects::position_[3]
protected

Definition at line 113 of file BeamSpotObjects.h.

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

double BeamSpotObjects::sigmaZ_
protected

Definition at line 114 of file BeamSpotObjects.h.

Referenced by setSigmaZ(), and sigmaZ().

int BeamSpotObjects::type_
protected