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 creationTime () const
 
std::string endTime () const
 
cond::Time_t endTimeStamp () const
 
int lastAnalyzedFill () const
 
int lastAnalyzedLumi () const
 Getters Methods. More...
 
int lastAnalyzedRun () const
 
std::string lumiRange () const
 
int maxPVs () const
 
float meanErrorPV () const
 
float meanPV () const
 
int numPVs () const
 
int numTracks () const
 
void print (std::stringstream &ss) const
 Print BeamSpotOnline parameters. More...
 
float rmsErrorPV () const
 
float rmsPV () const
 
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)
 
std::string startTime () const
 
cond::Time_t startTimeStamp () const
 
int usedEvents () const
 
 ~BeamSpotOnlineObjects () override
 
- Public Member Functions inherited from BeamSpotObjects
 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 ()
 

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::creationTime ( ) const
std::string BeamSpotOnlineObjects::endTime ( ) const

Definition at line 74 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 90 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 106 of file BeamSpotOnlineObjects.h.

References lastAnalyzedFill_.

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

int BeamSpotOnlineObjects::lastAnalyzedLumi ( ) const
inline

Getters Methods.

Definition at line 100 of file BeamSpotOnlineObjects.h.

References lastAnalyzedLumi_.

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

int BeamSpotOnlineObjects::lastAnalyzedRun ( ) const
inline
std::string BeamSpotOnlineObjects::lumiRange ( ) const

Definition at line 78 of file BeamSpotOnlineObjects.cc.

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

Referenced by BeamSpotDipServer::readRcd().

78  {
80 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< std::string > > stringParams_
int BeamSpotOnlineObjects::maxPVs ( ) const
float BeamSpotOnlineObjects::meanErrorPV ( ) const
float BeamSpotOnlineObjects::meanPV ( ) const
int BeamSpotOnlineObjects::numPVs ( ) const

Definition at line 50 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::numTracks ( ) const

Definition at line 48 of file BeamSpotOnlineObjects.cc.

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

std::vector< std::vector< int > > intParams_
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
void BeamSpotOnlineObjects::print ( std::stringstream &  ss) const

Print BeamSpotOnline parameters.

Definition at line 150 of file BeamSpotOnlineObjects.cc.

References BeamSpotObjects::beamType(), BeamSpotObjects::beamWidthX(), BeamSpotObjects::beamWidthXError(), BeamSpotObjects::beamWidthY(), BeamSpotObjects::beamWidthYError(), BeamSpotObjects::betaStar(), BeamSpotObjects::dxdz(), BeamSpotObjects::dxdzError(), BeamSpotObjects::dydz(), BeamSpotObjects::dydzError(), BeamSpotObjects::emittanceX(), BeamSpotObjects::emittanceY(), lastAnalyzedFill(), lastAnalyzedLumi(), lastAnalyzedRun(), BeamSpotObjects::sigmaZ(), BeamSpotObjects::sigmaZError(), BeamSpotObjects::x(), BeamSpotObjects::xError(), BeamSpotObjects::y(), BeamSpotObjects::yError(), BeamSpotObjects::z(), and BeamSpotObjects::zError().

Referenced by operator<<().

150  {
151  ss << "-----------------------------------------------------\n"
152  << " BeamSpotOnline Data\n\n"
153  << " Beam type = " << beamType() << "\n"
154  << " X0 = " << x() << " +/- " << xError() << " [cm]\n"
155  << " Y0 = " << y() << " +/- " << yError() << " [cm]\n"
156  << " Z0 = " << z() << " +/- " << zError() << " [cm]\n"
157  << " Sigma Z0 = " << sigmaZ() << " +/- " << sigmaZError() << " [cm]\n"
158  << " dxdz = " << dxdz() << " +/- " << dxdzError() << " [radians]\n"
159  << " dydz = " << dydz() << " +/- " << dydzError() << " [radians]\n"
160  << " Beam Width X = " << beamWidthX() << " +/- " << beamWidthXError() << " [cm]\n"
161  << " Beam Width Y = " << beamWidthY() << " +/- " << beamWidthYError() << " [cm]\n"
162  << " Emittance X = " << emittanceX() << " [cm]\n"
163  << " Emittance Y = " << emittanceY() << " [cm]\n"
164  << " Beta star = " << betaStar() << " [cm]\n"
165  << " Last Lumi = " << lastAnalyzedLumi() << "\n"
166  << " Last Run = " << lastAnalyzedRun() << "\n"
167  << " Last Fill = " << lastAnalyzedFill() << "\n"
168  << "-----------------------------------------------------\n\n";
169 }
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
int lastAnalyzedLumi() const
Getters Methods.
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
float BeamSpotOnlineObjects::rmsErrorPV ( ) const
float BeamSpotOnlineObjects::rmsPV ( ) const
template<class Archive >
void BeamSpotOnlineObjects::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void BeamSpotOnlineObjects::setCreationTime ( cond::Time_t  val)

Definition at line 137 of file BeamSpotOnlineObjects.cc.

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

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

137  {
139 }
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 129 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 145 of file BeamSpotOnlineObjects.cc.

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

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

145  {
147 }
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
cond::Time_t endTimeStamp() const
std::vector< std::vector< unsigned long long > > timeParams_
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 133 of file BeamSpotOnlineObjects.cc.

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

133  {
135 }
std::string lumiRange() const
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)

Definition at line 105 of file BeamSpotOnlineObjects.cc.

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

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

105  {
107 }
std::vector< std::vector< int > > intParams_
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
void BeamSpotOnlineObjects::setMeanErrorPV ( float  val)

Definition at line 113 of file BeamSpotOnlineObjects.cc.

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

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

113  {
115 }
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 109 of file BeamSpotOnlineObjects.cc.

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

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

109  {
111 }
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 121 of file BeamSpotOnlineObjects.cc.

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

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

121  {
123 }
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 117 of file BeamSpotOnlineObjects.cc.

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

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

117  {
119 }
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 125 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 141 of file BeamSpotOnlineObjects.cc.

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

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

141  {
143 }
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 101 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 70 of file BeamSpotOnlineObjects.cc.

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

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

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

Definition at line 86 of file BeamSpotOnlineObjects.cc.

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

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

86  {
88 }
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
std::vector< std::vector< unsigned long long > > timeParams_
int BeamSpotOnlineObjects::usedEvents ( ) const

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