CMS 3D CMS Logo

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

#include <BeamSpotOnlineObjects.h>

Inheritance diagram for BeamSpotOnlineObjects:
BeamSpotObjects

Public Types

enum  FloatParamIndex {
  MEAN_PV = 0, ERR_MEAN_PV = 1, RMS_PV = 2, ERR_RMS_PV = 3,
  FSIZE = 4
}
 
enum  IntParamIndex {
  NUM_TRACKS = 0, NUM_PVS = 1, USED_EVENTS = 2, MAX_PVS = 3,
  ISIZE = 4
}
 Enums. More...
 
enum  StringParamIndex { START_TIME = 0, END_TIME = 1, LUMI_RANGE = 2, SSIZE = 3 }
 
enum  TimeParamIndex { CREATE_TIME = 0, START_TIMESTAMP = 1, END_TIMESTAMP = 2, TSIZE = 3 }
 

Public Member Functions

 BeamSpotOnlineObjects ()
 default constructor More...
 
cond::Time_t GetCreationTime () const
 
std::string GetEndTime () const
 
cond::Time_t GetEndTimeStamp () const
 
int GetLastAnalyzedFill () const
 
int GetLastAnalyzedLumi () const
 Getters Methods. More...
 
int GetLastAnalyzedRun () const
 
std::string GetLumiRange () const
 
int GetMaxPVs () const
 
float GetMeanErrorPV () const
 
float GetMeanPV () const
 
int GetNumPVs () const
 
int GetNumTracks () const
 
float GetRmsErrorPV () const
 
float GetRmsPV () const
 
std::string GetStartTime () const
 
cond::Time_t GetStartTimeStamp () const
 
int GetUsedEvents () const
 
void print (std::stringstream &ss) const
 Print BeamSpotOnline parameters. More...
 
void SetCreationTime (cond::Time_t val)
 
void SetEndTime (std::string val)
 
void SetEndTimeStamp (cond::Time_t val)
 
void SetLastAnalyzedFill (int val)
 
void SetLastAnalyzedLumi (int val)
 Setters Methods. More...
 
void SetLastAnalyzedRun (int val)
 
void SetLumiRange (std::string val)
 
void SetMaxPVs (int val)
 
void SetMeanErrorPV (float val)
 
void SetMeanPV (float val)
 
void SetNumPVs (int val)
 
void SetNumTracks (int val)
 
void SetRmsErrorPV (float val)
 
void SetRmsPV (float val)
 
void SetStartTime (std::string val)
 
void SetStartTimeStamp (cond::Time_t val)
 
void SetUsedEvents (int val)
 
 ~BeamSpotOnlineObjects () override
 
- Public Member Functions inherited from BeamSpotObjects
 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 Member Functions

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

Private Attributes

std::vector< std::vector< float > > floatParams_
 
std::vector< std::vector< int > > intParams_
 
int lastAnalyzedFill_
 
int lastAnalyzedLumi_
 
int lastAnalyzedRun_
 
std::vector< std::vector
< std::string > > 
stringParams_
 
std::vector< std::vector
< unsigned long long > > 
timeParams_
 

Friends

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

Additional Inherited Members

- Protected Attributes inherited from BeamSpotObjects
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_
 

Detailed Description

Class inheriting from BeamSpotObjects. New members of the class:

Author
Francisco Brivio, Milano-Bicocca (franc.nosp@m.esco.nosp@m..briv.nosp@m.io@c.nosp@m.ern.c.nosp@m.h)

Definition at line 25 of file BeamSpotOnlineObjects.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

BeamSpotOnlineObjects::BeamSpotOnlineObjects ( )
inline

default constructor

Definition at line 28 of file BeamSpotOnlineObjects.h.

References floatParams_, FSIZE, intParams_, ISIZE, lastAnalyzedFill_, lastAnalyzedLumi_, lastAnalyzedRun_, SSIZE, stringParams_, timeParams_, and TSIZE.

28  {
30  lastAnalyzedRun_ = 0;
32  intParams_.resize(ISIZE, std::vector<int>(1, 0));
33  floatParams_.resize(FSIZE, std::vector<float>(1, 0.0));
34  stringParams_.resize(SSIZE, std::vector<std::string>(1, ""));
35  timeParams_.resize(TSIZE, std::vector<unsigned long long>(1, 0ULL));
36  }
std::vector< std::vector< int > > intParams_
std::vector< std::vector< std::string > > stringParams_
std::vector< std::vector< unsigned long long > > timeParams_
std::vector< std::vector< float > > floatParams_
BeamSpotOnlineObjects::~BeamSpotOnlineObjects ( )
inlineoverride

Definition at line 38 of file BeamSpotOnlineObjects.h.

38 {}

Member Function Documentation

cond::Time_t BeamSpotOnlineObjects::GetCreationTime ( ) const
std::string BeamSpotOnlineObjects::GetEndTime ( ) const

Definition at line 76 of file BeamSpotOnlineObjects.cc.

References END_TIME, BeamSpotOnlineObjectsImpl::getOneParam(), and stringParams_.

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

76  {
78 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< std::string > > stringParams_
cond::Time_t BeamSpotOnlineObjects::GetEndTimeStamp ( ) const

Definition at line 92 of file BeamSpotOnlineObjects.cc.

References END_TIMESTAMP, BeamSpotOnlineObjectsImpl::getOneParam(), and timeParams_.

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

92  {
94 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< unsigned long long > > timeParams_
int BeamSpotOnlineObjects::GetLastAnalyzedFill ( ) const
inline

Definition at line 106 of file BeamSpotOnlineObjects.h.

References lastAnalyzedFill_.

Referenced by BeamSpotOnlineRecordsReader::dump(), and print().

int BeamSpotOnlineObjects::GetLastAnalyzedLumi ( ) const
inline

Getters Methods.

Definition at line 100 of file BeamSpotOnlineObjects.h.

References lastAnalyzedLumi_.

Referenced by BeamSpotOnlineRecordsReader::dump(), print(), and BeamSpotDipServer::readRcd().

int BeamSpotOnlineObjects::GetLastAnalyzedRun ( ) const
inline
std::string BeamSpotOnlineObjects::GetLumiRange ( ) const

Definition at line 80 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::getOneParam(), LUMI_RANGE, and stringParams_.

Referenced by BeamSpotDipServer::readRcd().

80  {
82 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< std::string > > stringParams_
int BeamSpotOnlineObjects::GetMaxPVs ( ) const
float BeamSpotOnlineObjects::GetMeanErrorPV ( ) const
float BeamSpotOnlineObjects::GetMeanPV ( ) const
int BeamSpotOnlineObjects::GetNumPVs ( ) const

Definition at line 52 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::getOneParam(), intParams_, and NUM_PVS.

Referenced by BeamSpotDipServer::readRcd().

std::vector< std::vector< int > > intParams_
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
int BeamSpotOnlineObjects::GetNumTracks ( ) const

Definition at line 48 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::getOneParam(), intParams_, and NUM_TRACKS.

48  {
50 }
std::vector< std::vector< int > > intParams_
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
float BeamSpotOnlineObjects::GetRmsErrorPV ( ) const
float BeamSpotOnlineObjects::GetRmsPV ( ) const
std::string BeamSpotOnlineObjects::GetStartTime ( ) const

Definition at line 72 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::getOneParam(), START_TIME, and stringParams_.

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

72  {
74 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< std::string > > stringParams_
cond::Time_t BeamSpotOnlineObjects::GetStartTimeStamp ( ) const

Definition at line 88 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::getOneParam(), START_TIMESTAMP, and timeParams_.

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

88  {
90 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< unsigned long long > > timeParams_
int BeamSpotOnlineObjects::GetUsedEvents ( ) const
void BeamSpotOnlineObjects::print ( std::stringstream &  ss) const

Print BeamSpotOnline parameters.

Definition at line 152 of file BeamSpotOnlineObjects.cc.

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

Referenced by operator<<().

152  {
153  ss << "-----------------------------------------------------\n"
154  << " BeamSpotOnline Data\n\n"
155  << " Beam type = " << GetBeamType() << "\n"
156  << " X0 = " << GetX() << " +/- " << GetXError() << " [cm]\n"
157  << " Y0 = " << GetY() << " +/- " << GetYError() << " [cm]\n"
158  << " Z0 = " << GetZ() << " +/- " << GetZError() << " [cm]\n"
159  << " Sigma Z0 = " << GetSigmaZ() << " +/- " << GetSigmaZError() << " [cm]\n"
160  << " dxdz = " << Getdxdz() << " +/- " << GetdxdzError() << " [radians]\n"
161  << " dydz = " << Getdydz() << " +/- " << GetdydzError() << " [radians]\n"
162  << " Beam Width X = " << GetBeamWidthX() << " +/- " << GetBeamWidthXError() << " [cm]\n"
163  << " Beam Width Y = " << GetBeamWidthY() << " +/- " << GetBeamWidthYError() << " [cm]\n"
164  << " Emittance X = " << GetEmittanceX() << " [cm]\n"
165  << " Emittance Y = " << GetEmittanceY() << " [cm]\n"
166  << " Beta star = " << GetBetaStar() << " [cm]\n"
167  << " Last Lumi = " << GetLastAnalyzedLumi() << "\n"
168  << " Last Run = " << GetLastAnalyzedRun() << "\n"
169  << " Last Fill = " << GetLastAnalyzedFill() << "\n"
170  << "-----------------------------------------------------\n\n";
171 }
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
int GetLastAnalyzedLumi() const
Getters Methods.
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 BeamSpotOnlineObjects::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void BeamSpotOnlineObjects::SetCreationTime ( cond::Time_t  val)

Definition at line 139 of file BeamSpotOnlineObjects.cc.

References CREATE_TIME, BeamSpotOnlineObjectsImpl::setOneParam(), and timeParams_.

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

139  {
141 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< unsigned long long > > timeParams_
void BeamSpotOnlineObjects::SetEndTime ( std::string  val)

Definition at line 131 of file BeamSpotOnlineObjects.cc.

References END_TIME, BeamSpotOnlineObjectsImpl::setOneParam(), and stringParams_.

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

131  {
133 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< std::string > > stringParams_
void BeamSpotOnlineObjects::SetEndTimeStamp ( cond::Time_t  val)
void BeamSpotOnlineObjects::SetLastAnalyzedFill ( int  val)
inline
void BeamSpotOnlineObjects::SetLastAnalyzedLumi ( int  val)
inline
void BeamSpotOnlineObjects::SetLastAnalyzedRun ( int  val)
inline
void BeamSpotOnlineObjects::SetLumiRange ( std::string  val)

Definition at line 135 of file BeamSpotOnlineObjects.cc.

References LUMI_RANGE, BeamSpotOnlineObjectsImpl::setOneParam(), and stringParams_.

135  {
137 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< std::string > > stringParams_
void BeamSpotOnlineObjects::SetMaxPVs ( int  val)
void BeamSpotOnlineObjects::SetMeanErrorPV ( float  val)

Definition at line 115 of file BeamSpotOnlineObjects.cc.

References ERR_MEAN_PV, floatParams_, and BeamSpotOnlineObjectsImpl::setOneParam().

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

115  {
117 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< float > > floatParams_
void BeamSpotOnlineObjects::SetMeanPV ( float  val)

Definition at line 111 of file BeamSpotOnlineObjects.cc.

References floatParams_, MEAN_PV, and BeamSpotOnlineObjectsImpl::setOneParam().

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

111  {
113 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< float > > floatParams_
void BeamSpotOnlineObjects::SetNumPVs ( int  val)
void BeamSpotOnlineObjects::SetNumTracks ( int  val)
void BeamSpotOnlineObjects::SetRmsErrorPV ( float  val)

Definition at line 123 of file BeamSpotOnlineObjects.cc.

References ERR_RMS_PV, floatParams_, and BeamSpotOnlineObjectsImpl::setOneParam().

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

123  {
125 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< float > > floatParams_
void BeamSpotOnlineObjects::SetRmsPV ( float  val)

Definition at line 119 of file BeamSpotOnlineObjects.cc.

References floatParams_, RMS_PV, and BeamSpotOnlineObjectsImpl::setOneParam().

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

119  {
121 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< float > > floatParams_
void BeamSpotOnlineObjects::SetStartTime ( std::string  val)

Definition at line 127 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::setOneParam(), START_TIME, and stringParams_.

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

127  {
129 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< std::string > > stringParams_
void BeamSpotOnlineObjects::SetStartTimeStamp ( cond::Time_t  val)

Definition at line 143 of file BeamSpotOnlineObjects.cc.

References BeamSpotOnlineObjectsImpl::setOneParam(), START_TIMESTAMP, and timeParams_.

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

143  {
145 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
std::vector< std::vector< unsigned long long > > timeParams_
void BeamSpotOnlineObjects::SetUsedEvents ( int  val)

Definition at line 103 of file BeamSpotOnlineObjects.cc.

References intParams_, BeamSpotOnlineObjectsImpl::setOneParam(), and USED_EVENTS.

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

103  {
105 }
std::vector< std::vector< int > > intParams_
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 162 of file BeamSpotOnlineObjects.h.

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

Definition at line 162 of file BeamSpotOnlineObjects.h.

Member Data Documentation

std::vector<std::vector<float> > BeamSpotOnlineObjects::floatParams_
private
std::vector<std::vector<int> > BeamSpotOnlineObjects::intParams_
private
int BeamSpotOnlineObjects::lastAnalyzedFill_
private
int BeamSpotOnlineObjects::lastAnalyzedLumi_
private
int BeamSpotOnlineObjects::lastAnalyzedRun_
private
std::vector<std::vector<std::string> > BeamSpotOnlineObjects::stringParams_
private
std::vector<std::vector<unsigned long long> > BeamSpotOnlineObjects::timeParams_
private