CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
BeamSpotObjects Class Reference

#include <BeamSpotObjects.h>

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 ()
 

Private Attributes

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

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 25 of file BeamSpotObjects.h.

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

25  : sigmaZ_(0), beamwidthX_(0), beamwidthY_(0),
26  dxdz_(0), dydz_(0), type_(-1) {
27 
28  beamwidthXError_ = 0;
29  beamwidthYError_ = 0;
30  emittanceX_ = 0;
31  emittanceY_ = 0;
32  betaStar_ = 0;
33  std::memset(position_, 0, sizeof position_);
34  std::memset(covariance_, 0, sizeof covariance_);
35  }
double covariance_[7][7]
virtual BeamSpotObjects::~BeamSpotObjects ( )
inlinevirtual

Definition at line 37 of file BeamSpotObjects.h.

37 {}

Member Function Documentation

int BeamSpotObjects::GetBeamType ( ) const
inline

get beam type

Definition at line 107 of file BeamSpotObjects.h.

References type_.

Referenced by AlcaBeamMonitor::beginLuminosityBlock(), AlcaBeamSpotFromDB::endLuminosityBlockProduce(), and print().

107 { return type_; }
double BeamSpotObjects::GetBeamWidthX ( ) const
inline

get average transverse beam width

Definition at line 81 of file BeamSpotObjects.h.

References beamwidthX_.

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

81 { return beamwidthX_; }
double BeamSpotObjects::GetBeamWidthXError ( ) const
inline

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

Definition at line 99 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

99 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:48
double covariance_[7][7]
double BeamSpotObjects::GetBeamWidthY ( ) const
inline

get average transverse beam width

Definition at line 83 of file BeamSpotObjects.h.

References beamwidthY_.

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

83 { return beamwidthY_; }
double BeamSpotObjects::GetBeamWidthYError ( ) const
inline

get average transverse beam width error X = Y

Definition at line 101 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

101 { return sqrt(covariance_[6][6]); }
T sqrt(T t)
Definition: SSEVec.h:48
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 89 of file BeamSpotObjects.h.

References covariance_, i, and j.

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

89 { return covariance_[i][j]; }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
double covariance_[7][7]
double BeamSpotObjects::Getdxdz ( ) const
inline

get dxdz slope, crossing angle in XZ

Definition at line 85 of file BeamSpotObjects.h.

References dxdz_.

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

85 { return dxdz_; }
double BeamSpotObjects::GetdxdzError ( ) const
inline

get dxdz slope, crossing angle in XZ Error

Definition at line 103 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

103 { return sqrt(covariance_[4][4]); }
T sqrt(T t)
Definition: SSEVec.h:48
double covariance_[7][7]
double BeamSpotObjects::Getdydz ( ) const
inline

get dydz slope, crossing angle in YZ

Definition at line 87 of file BeamSpotObjects.h.

References dydz_.

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

87 { return dydz_; }
double BeamSpotObjects::GetdydzError ( ) const
inline

get dydz slope, crossing angle in YZ Error

Definition at line 105 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

105 { return sqrt(covariance_[5][5]); }
T sqrt(T t)
Definition: SSEVec.h:48
double covariance_[7][7]
double BeamSpotObjects::GetEmittanceX ( ) const
inline
double BeamSpotObjects::GetEmittanceY ( ) const
inline
double BeamSpotObjects::GetSigmaZ ( ) const
inline

get sigma Z, RMS bunch length

Definition at line 79 of file BeamSpotObjects.h.

References sigmaZ_.

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

79 { return sigmaZ_; }
double BeamSpotObjects::GetSigmaZError ( ) const
inline

get sigma Z, RMS bunch length Error

Definition at line 97 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

97 { return sqrt(covariance_[3][3]); }
T sqrt(T t)
Definition: SSEVec.h:48
double covariance_[7][7]
double BeamSpotObjects::GetX ( ) const
inline
double BeamSpotObjects::GetXError ( ) const
inline

get X beam position Error

Definition at line 91 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

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

91 { return sqrt(covariance_[0][0]); }
T sqrt(T t)
Definition: SSEVec.h:48
double covariance_[7][7]
double BeamSpotObjects::GetY ( ) const
inline
double BeamSpotObjects::GetYError ( ) const
inline

get Y beam position Error

Definition at line 93 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

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

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

get Z beam position

Definition at line 77 of file BeamSpotObjects.h.

References position_.

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

77 { return position_[2]; }
double BeamSpotObjects::GetZError ( void  ) const
inline

get Z beam position Error

Definition at line 95 of file BeamSpotObjects.h.

References covariance_, and mathSSE::sqrt().

Referenced by print().

95 { return sqrt(covariance_[2][2]); }
T sqrt(T t)
Definition: SSEVec.h:48
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
void BeamSpotObjects::SetBeamWidthX ( double  val)
inline

set average transverse beam width X

Definition at line 52 of file BeamSpotObjects.h.

References beamwidthX_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

52 { beamwidthX_ = val; }
void BeamSpotObjects::SetBeamWidthXError ( double  val)
inline

set beam width X error

Definition at line 56 of file BeamSpotObjects.h.

References beamwidthXError_.

56 { beamwidthXError_ = val; }
void BeamSpotObjects::SetBeamWidthY ( double  val)
inline

set average transverse beam width Y

Definition at line 54 of file BeamSpotObjects.h.

References beamwidthY_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

54 { beamwidthY_ = val; }
void BeamSpotObjects::SetBeamWidthYError ( double  val)
inline

set beam width Y error

Definition at line 58 of file BeamSpotObjects.h.

References beamwidthYError_.

58 { beamwidthYError_ = val; }
void BeamSpotObjects::SetBetaStar ( double  val)
inline

set beta star

Definition at line 70 of file BeamSpotObjects.h.

References betaStar_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), and BeamSpotFakeConditions::produce().

70 { betaStar_ = val;}
void BeamSpotObjects::SetCovariance ( int  i,
int  j,
double  val 
)
inline

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

Definition at line 60 of file BeamSpotObjects.h.

References covariance_, i, and j.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

60  {
61  covariance_[i][j] = val;
62  }
int i
Definition: DBlmapReader.cc:9
int j
Definition: DBlmapReader.cc:9
double covariance_[7][7]
void BeamSpotObjects::Setdxdz ( double  val)
inline

set dxdz slope, crossing angle

Definition at line 48 of file BeamSpotObjects.h.

References dxdz_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

48 { dxdz_ = val; }
void BeamSpotObjects::Setdydz ( double  val)
inline

set dydz slope, crossing angle in XZ

Definition at line 50 of file BeamSpotObjects.h.

References dydz_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

50 { dydz_ = val; }
void BeamSpotObjects::SetEmittanceX ( double  val)
inline

set emittance

Definition at line 66 of file BeamSpotObjects.h.

References emittanceX_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), and BeamSpotFakeConditions::produce().

66 { emittanceX_ = val;}
void BeamSpotObjects::SetEmittanceY ( double  val)
inline

set emittance

Definition at line 68 of file BeamSpotObjects.h.

References emittanceY_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), and BeamSpotFakeConditions::produce().

68 { emittanceY_ = val;}
void BeamSpotObjects::SetPosition ( double  x,
double  y,
double  z 
)
inline

set XYZ position

Definition at line 40 of file BeamSpotObjects.h.

References position_, x, detailsBasic3DVector::y, and detailsBasic3DVector::z.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

40  {
41  position_[0] = x;
42  position_[1] = y;
43  position_[2] = z;
44  };
float float float z
Definition: DDAxes.h:10
void BeamSpotObjects::SetSigmaZ ( double  val)
inline

set sigma Z, RMS bunch length

Definition at line 46 of file BeamSpotObjects.h.

References sigmaZ_.

Referenced by BeamSpotWrite2DB::endJob(), AlcaBeamSpotHarvester::endRun(), BeamSpotFakeConditions::produce(), and BeamFitter::write2DB().

46 { sigmaZ_ = val; }
void BeamSpotObjects::SetType ( int  type)
inline

set beam type

Definition at line 64 of file BeamSpotObjects.h.

References type_.

Referenced by BeamSpotWrite2DB::endJob(), and AlcaBeamSpotHarvester::endRun().

64 { type_ = type; }
type
Definition: HCALResponse.h:21

Member Data Documentation

double BeamSpotObjects::beamwidthX_
private

Definition at line 122 of file BeamSpotObjects.h.

Referenced by GetBeamWidthX(), and SetBeamWidthX().

double BeamSpotObjects::beamwidthXError_
private

Definition at line 124 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and SetBeamWidthXError().

double BeamSpotObjects::beamwidthY_
private

Definition at line 123 of file BeamSpotObjects.h.

Referenced by GetBeamWidthY(), and SetBeamWidthY().

double BeamSpotObjects::beamwidthYError_
private

Definition at line 125 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), and SetBeamWidthYError().

double BeamSpotObjects::betaStar_
private

Definition at line 132 of file BeamSpotObjects.h.

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

BeamSpotObjects::COND_SERIALIZABLE
private

Definition at line 135 of file BeamSpotObjects.h.

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

Definition at line 126 of file BeamSpotObjects.h.

Referenced by Getdxdz(), and Setdxdz().

double BeamSpotObjects::dydz_
private

Definition at line 127 of file BeamSpotObjects.h.

Referenced by Getdydz(), and Setdydz().

double BeamSpotObjects::emittanceX_
private

Definition at line 130 of file BeamSpotObjects.h.

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

double BeamSpotObjects::emittanceY_
private

Definition at line 131 of file BeamSpotObjects.h.

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

double BeamSpotObjects::position_[3]
private

Definition at line 120 of file BeamSpotObjects.h.

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

double BeamSpotObjects::sigmaZ_
private

Definition at line 121 of file BeamSpotObjects.h.

Referenced by GetSigmaZ(), and SetSigmaZ().

int BeamSpotObjects::type_
private