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 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::BeamSpotObjects ( )
inline

default constructor

Definition at line 23 of file BeamSpotObjects.h.

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  }

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

◆ ~BeamSpotObjects()

virtual BeamSpotObjects::~BeamSpotObjects ( )
inlinevirtual

Definition at line 33 of file BeamSpotObjects.h.

33 {}

Member Function Documentation

◆ GetBeamType()

int BeamSpotObjects::GetBeamType ( ) const
inline

◆ GetBeamWidthX()

double BeamSpotObjects::GetBeamWidthX ( ) const
inline

◆ GetBeamWidthXError()

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.

93 { return sqrt(covariance_[6][6]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetBeamWidthY()

double BeamSpotObjects::GetBeamWidthY ( ) const
inline

◆ GetBeamWidthYError()

double BeamSpotObjects::GetBeamWidthYError ( ) const
inline

get average transverse beam width error X = Y

Definition at line 95 of file BeamSpotObjects.h.

95 { return sqrt(covariance_[6][6]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetBetaStar()

double BeamSpotObjects::GetBetaStar ( ) const
inline

◆ GetCovariance()

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.

83 { return covariance_[i][j]; }

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

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

◆ Getdxdz()

double BeamSpotObjects::Getdxdz ( ) const
inline

◆ GetdxdzError()

double BeamSpotObjects::GetdxdzError ( ) const
inline

get dxdz slope, crossing angle in XZ Error

Definition at line 97 of file BeamSpotObjects.h.

97 { return sqrt(covariance_[4][4]); }

References covariance_, and mathSSE::sqrt().

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

◆ Getdydz()

double BeamSpotObjects::Getdydz ( ) const
inline

◆ GetdydzError()

double BeamSpotObjects::GetdydzError ( ) const
inline

get dydz slope, crossing angle in YZ Error

Definition at line 99 of file BeamSpotObjects.h.

99 { return sqrt(covariance_[5][5]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetEmittanceX()

double BeamSpotObjects::GetEmittanceX ( ) const
inline

◆ GetEmittanceY()

double BeamSpotObjects::GetEmittanceY ( ) const
inline

◆ GetSigmaZ()

double BeamSpotObjects::GetSigmaZ ( ) const
inline

◆ GetSigmaZError()

double BeamSpotObjects::GetSigmaZError ( ) const
inline

get sigma Z, RMS bunch length Error

Definition at line 91 of file BeamSpotObjects.h.

91 { return sqrt(covariance_[3][3]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetX()

double BeamSpotObjects::GetX ( ) const
inline

◆ GetXError()

double BeamSpotObjects::GetXError ( ) const
inline

get X beam position Error

Definition at line 85 of file BeamSpotObjects.h.

85 { return sqrt(covariance_[0][0]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetY()

double BeamSpotObjects::GetY ( ) const
inline

◆ GetYError()

double BeamSpotObjects::GetYError ( ) const
inline

get Y beam position Error

Definition at line 87 of file BeamSpotObjects.h.

87 { return sqrt(covariance_[1][1]); }

References covariance_, and mathSSE::sqrt().

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

◆ GetZ()

double BeamSpotObjects::GetZ ( void  ) const
inline

◆ GetZError()

double BeamSpotObjects::GetZError ( void  ) const
inline

get Z beam position Error

Definition at line 89 of file BeamSpotObjects.h.

89 { return sqrt(covariance_[2][2]); }

References covariance_, and mathSSE::sqrt().

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

◆ print()

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

print beam spot parameters

Definition at line 5 of file BeamSpotObjects.cc.

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 }

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

◆ 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

set beam width X error

Definition at line 52 of file BeamSpotObjects.h.

52 { beamwidthXError_ = val; }

References beamwidthXError_, and heppy_batch::val.

Referenced by BeamMonitor::FitAndFill(), and FakeBeamMonitor::FitAndFill().

◆ SetBeamWidthY()

void BeamSpotObjects::SetBeamWidthY ( double  val)
inline

◆ SetBeamWidthYError()

void BeamSpotObjects::SetBeamWidthYError ( double  val)
inline

set beam width Y error

Definition at line 54 of file BeamSpotObjects.h.

54 { beamwidthYError_ = val; }

References beamwidthYError_, and heppy_batch::val.

Referenced by BeamMonitor::FitAndFill(), and FakeBeamMonitor::FitAndFill().

◆ 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

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 GetBeamWidthX(), 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 GetBeamWidthY(), 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(), GetBetaStar(), and SetBetaStar().

◆ covariance_

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

◆ dxdz_

double BeamSpotObjects::dxdz_
protected

Definition at line 119 of file BeamSpotObjects.h.

Referenced by Getdxdz(), and Setdxdz().

◆ dydz_

double BeamSpotObjects::dydz_
protected

Definition at line 120 of file BeamSpotObjects.h.

Referenced by Getdydz(), and Setdydz().

◆ emittanceX_

double BeamSpotObjects::emittanceX_
protected

Definition at line 123 of file BeamSpotObjects.h.

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

◆ emittanceY_

double BeamSpotObjects::emittanceY_
protected

Definition at line 124 of file BeamSpotObjects.h.

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

◆ position_

double BeamSpotObjects::position_[3]
protected

Definition at line 113 of file BeamSpotObjects.h.

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

◆ sigmaZ_

double BeamSpotObjects::sigmaZ_
protected

Definition at line 114 of file BeamSpotObjects.h.

Referenced by GetSigmaZ(), and SetSigmaZ().

◆ type_

int BeamSpotObjects::type_
protected
BeamSpotObjects::covariance_
double covariance_[7][7]
Definition: BeamSpotObjects.h:121
BeamSpotObjects::GetBeamWidthY
double GetBeamWidthY() const
get average transverse beam width
Definition: BeamSpotObjects.h:77
BeamSpotObjects::Getdxdz
double Getdxdz() const
get dxdz slope, crossing angle in XZ
Definition: BeamSpotObjects.h:79
DDAxes::y
mps_fire.i
i
Definition: mps_fire.py:355
BeamSpotObjects::dxdz_
double dxdz_
Definition: BeamSpotObjects.h:119
BeamSpotObjects::GetSigmaZError
double GetSigmaZError() const
get sigma Z, RMS bunch length Error
Definition: BeamSpotObjects.h:91
BeamSpotObjects::emittanceY_
double emittanceY_
Definition: BeamSpotObjects.h:124
BeamSpotObjects::GetSigmaZ
double GetSigmaZ() const
get sigma Z, RMS bunch length
Definition: BeamSpotObjects.h:73
BeamSpotObjects::GetBeamType
int GetBeamType() const
get beam type
Definition: BeamSpotObjects.h:101
BeamSpotObjects::GetZ
double GetZ() const
get Z beam position
Definition: BeamSpotObjects.h:71
BeamSpotObjects::beamwidthXError_
double beamwidthXError_
Definition: BeamSpotObjects.h:117
BeamSpotObjects::beamwidthYError_
double beamwidthYError_
Definition: BeamSpotObjects.h:118
BeamSpotObjects::type_
int type_
Definition: BeamSpotObjects.h:122
DDAxes::x
BeamSpotObjects::emittanceX_
double emittanceX_
Definition: BeamSpotObjects.h:123
BeamSpotObjects::beamwidthY_
double beamwidthY_
Definition: BeamSpotObjects.h:116
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
BeamSpotObjects::betaStar_
double betaStar_
Definition: BeamSpotObjects.h:125
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
DDAxes::z
BeamSpotObjects::position_
double position_[3]
Definition: BeamSpotObjects.h:113
BeamSpotObjects::GetBetaStar
double GetBetaStar() const
get beta star
Definition: BeamSpotObjects.h:107
BeamSpotObjects::GetEmittanceX
double GetEmittanceX() const
get emittance
Definition: BeamSpotObjects.h:103
BeamSpotObjects::GetXError
double GetXError() const
get X beam position Error
Definition: BeamSpotObjects.h:85
BeamSpotObjects::dydz_
double dydz_
Definition: BeamSpotObjects.h:120
BeamSpotObjects::GetY
double GetY() const
get Y beam position
Definition: BeamSpotObjects.h:69
BeamSpotObjects::sigmaZ_
double sigmaZ_
Definition: BeamSpotObjects.h:114
BeamSpotObjects::beamwidthX_
double beamwidthX_
Definition: BeamSpotObjects.h:115
BeamSpotObjects::GetBeamWidthX
double GetBeamWidthX() const
get average transverse beam width
Definition: BeamSpotObjects.h:75
BeamSpotObjects::GetYError
double GetYError() const
get Y beam position Error
Definition: BeamSpotObjects.h:87
type
type
Definition: HCALResponse.h:21
heppy_batch.val
val
Definition: heppy_batch.py:351
BeamSpotObjects::GetEmittanceY
double GetEmittanceY() const
get emittance
Definition: BeamSpotObjects.h:105
BeamSpotObjects::Getdydz
double Getdydz() const
get dydz slope, crossing angle in YZ
Definition: BeamSpotObjects.h:81
BeamSpotObjects::GetZError
double GetZError() const
get Z beam position Error
Definition: BeamSpotObjects.h:89
BeamSpotObjects::GetdydzError
double GetdydzError() const
get dydz slope, crossing angle in YZ Error
Definition: BeamSpotObjects.h:99
BeamSpotObjects::GetBeamWidthXError
double GetBeamWidthXError() const
get average transverse beam width error ASSUME the same for X and Y
Definition: BeamSpotObjects.h:93
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
BeamSpotObjects::GetBeamWidthYError
double GetBeamWidthYError() const
get average transverse beam width error X = Y
Definition: BeamSpotObjects.h:95
BeamSpotObjects::GetX
double GetX() const
get X beam position
Definition: BeamSpotObjects.h:67
BeamSpotObjects::GetdxdzError
double GetdxdzError() const
get dxdz slope, crossing angle in XZ Error
Definition: BeamSpotObjects.h:97