CMS 3D CMS Logo

BeamSpotObjects Class Reference

Reconstructed beam spot object. More...

#include <CondFormats/BeamSpotObjects/interface/BeamSpotObjects.h>

List of all members.

Public Member Functions

 BeamSpotObjects ()
 default constructor
double GetBeamWidth () const
 get average transverse beam width
double GetBeamWidthError () const
 get average transverse beam width
double GetCovariance (int i, int j) const
 get i,j element of the full covariance matrix 7x7
double Getdxdz () const
 get dxdz slope, crossing angle in XZ
double GetdxdzError () const
 get dxdz slope, crossing angle in XZ Error
double Getdydz () const
 get dydz slope, crossing angle in YZ
double GetdydzError () const
 get dydz slope, crossing angle in YZ Error
double GetSigmaZ () const
 get sigma Z, RMS bunch length
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 GetY () const
 get Y beam position
double GetYError () const
 get Y beam position Error
double GetZ () const
 get Z beam position
double GetZError () const
 get Z beam position Error
void print (std::stringstream &ss) const
 print beam spot parameters
void SetBeamWidth (double val)
 set average transverse beam width in YZ
void SetCovariance (int i, int j, double val)
 set i,j element of the full covariance matrix 7x7
void Setdxdz (double val)
 set dxdz slope, crossing angle
void Setdydz (double val)
 set dydz slope, crossing angle in XZ
void SetPosition (double x, double y, double z)
 set XYZ position
void SetSigmaZ (double val)
 set sigma Z, RMS bunch length
virtual ~BeamSpotObjects ()

Private Attributes

double beamwidth_
double covariance_ [7][7]
double dxdz_
double dydz_
double position_ [3]
double sigmaZ_


Detailed Description

Reconstructed beam spot object.

It provides position, error, and width of the beam position.

Author:
Francisco Yumiceva, Fermilab (yumiceva@fnal.gov)
Version:
Id
BeamSpotObjects.h,v 1.4 2008/02/01 17:16:26 yumiceva Exp

Definition at line 18 of file BeamSpotObjects.h.


Constructor & Destructor Documentation

BeamSpotObjects::BeamSpotObjects (  )  [inline]

default constructor

Definition at line 23 of file BeamSpotObjects.h.

References covariance_, and position_.

00023                          : sigmaZ_(0), beamwidth_(0), dxdz_(0), dydz_(0) {
00024                 
00025                 std::memset(position_, 0, sizeof position_);
00026                 std::memset(covariance_, 0, sizeof covariance_);
00027         }

virtual BeamSpotObjects::~BeamSpotObjects (  )  [inline, virtual]

Definition at line 29 of file BeamSpotObjects.h.

00029 {}


Member Function Documentation

double BeamSpotObjects::GetBeamWidth (  )  const [inline]

get average transverse beam width

Definition at line 59 of file BeamSpotObjects.h.

References beamwidth_.

Referenced by print(), and BeamSpotProducer::produce().

00059 { return beamwidth_; }

double BeamSpotObjects::GetBeamWidthError (  )  const [inline]

get average transverse beam width

Definition at line 75 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::GetCovariance ( int  i,
int  j 
) const [inline]

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

Definition at line 65 of file BeamSpotObjects.h.

References covariance_.

Referenced by BeamSpotProducer::produce().

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

double BeamSpotObjects::Getdxdz (  )  const [inline]

get dxdz slope, crossing angle in XZ

Definition at line 61 of file BeamSpotObjects.h.

References dxdz_.

Referenced by print(), and BeamSpotProducer::produce().

00061 { return dxdz_; }

double BeamSpotObjects::GetdxdzError (  )  const [inline]

get dxdz slope, crossing angle in XZ Error

Definition at line 77 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::Getdydz (  )  const [inline]

get dydz slope, crossing angle in YZ

Definition at line 63 of file BeamSpotObjects.h.

References dydz_.

Referenced by print(), and BeamSpotProducer::produce().

00063 { return dydz_; }

double BeamSpotObjects::GetdydzError (  )  const [inline]

get dydz slope, crossing angle in YZ Error

Definition at line 79 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::GetSigmaZ (  )  const [inline]

get sigma Z, RMS bunch length

Definition at line 57 of file BeamSpotObjects.h.

References sigmaZ_.

Referenced by print(), and BeamSpotProducer::produce().

00057 { return sigmaZ_; }

double BeamSpotObjects::GetSigmaZError (  )  const [inline]

get sigma Z, RMS bunch length Error

Definition at line 73 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::GetX (  )  const [inline]

get X beam position

Definition at line 51 of file BeamSpotObjects.h.

References position_.

Referenced by print(), and BeamSpotProducer::produce().

00051 { return position_[0]; }

double BeamSpotObjects::GetXError (  )  const [inline]

get X beam position Error

Definition at line 67 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::GetY (  )  const [inline]

get Y beam position

Definition at line 53 of file BeamSpotObjects.h.

References position_.

Referenced by print(), and BeamSpotProducer::produce().

00053 { return position_[1]; }

double BeamSpotObjects::GetYError (  )  const [inline]

get Y beam position Error

Definition at line 69 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

double BeamSpotObjects::GetZ ( void   )  const [inline]

get Z beam position

Definition at line 55 of file BeamSpotObjects.h.

References position_.

Referenced by print(), and BeamSpotProducer::produce().

00055 { return position_[2]; }

double BeamSpotObjects::GetZError ( void   )  const [inline]

get Z beam position Error

Definition at line 71 of file BeamSpotObjects.h.

References covariance_, and funct::sqrt().

Referenced by print().

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

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

print beam spot parameters

Definition at line 5 of file BeamSpotObjects.cc.

References GetBeamWidth(), GetBeamWidthError(), Getdxdz(), GetdxdzError(), Getdydz(), GetdydzError(), GetSigmaZ(), GetSigmaZError(), GetX(), GetXError(), GetY(), GetYError(), GetZ(), and GetZError().

Referenced by operator<<().

00005                                                      {
00006           ss << "-----------------------------------------------------\n"
00007              << "            Calculated Beam Spot\n\n"
00008              << "   X0 = " << GetX() << " +/- " << GetXError() << " [cm]\n"
00009              << "   Y0 = " << GetY() << " +/- " << GetYError() << " [cm]\n"
00010              << "   Z0 = " << GetZ() << " +/- " << GetZError() << " [cm]\n"
00011              << " Sigma Z0 = " << GetSigmaZ() << " +/- " << GetSigmaZError() << " [cm]\n"
00012              << " dxdz = " << Getdxdz() << " +/- " << GetdxdzError() << " [radians]\n"
00013              << " dydz = " << Getdydz() << " +/- " << GetdydzError() << " [radians]\n"
00014              << " Beam Width = " << GetBeamWidth() << " +/- " << GetBeamWidthError() << " [cm]\n"
00015              << "-----------------------------------------------------\n\n";
00016 }

void BeamSpotObjects::SetBeamWidth ( double  val  )  [inline]

set average transverse beam width in YZ

Definition at line 44 of file BeamSpotObjects.h.

References beamwidth_.

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

00044 { beamwidth_ = val; }

void BeamSpotObjects::SetCovariance ( int  i,
int  j,
double  val 
) [inline]

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

Definition at line 46 of file BeamSpotObjects.h.

References covariance_.

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

00046                                                      {
00047                 covariance_[i][j] = val;
00048         }

void BeamSpotObjects::Setdxdz ( double  val  )  [inline]

set dxdz slope, crossing angle

Definition at line 40 of file BeamSpotObjects.h.

References dxdz_.

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

00040 { dxdz_ = val; }

void BeamSpotObjects::Setdydz ( double  val  )  [inline]

set dydz slope, crossing angle in XZ

Definition at line 42 of file BeamSpotObjects.h.

References dydz_.

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

00042 { dydz_ = val; }

void BeamSpotObjects::SetPosition ( double  x,
double  y,
double  z 
) [inline]

set XYZ position

Definition at line 32 of file BeamSpotObjects.h.

References position_.

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

00032                                                         { 
00033                 position_[0] = x;
00034                 position_[1] = y;
00035                 position_[2] = z;
00036         };

void BeamSpotObjects::SetSigmaZ ( double  val  )  [inline]

set sigma Z, RMS bunch length

Definition at line 38 of file BeamSpotObjects.h.

References sigmaZ_.

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

00038 { sigmaZ_ = val; }


Member Data Documentation

double BeamSpotObjects::beamwidth_ [private]

Definition at line 87 of file BeamSpotObjects.h.

Referenced by GetBeamWidth(), and SetBeamWidth().

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

Definition at line 90 of file BeamSpotObjects.h.

Referenced by BeamSpotObjects(), GetBeamWidthError(), GetCovariance(), GetdxdzError(), GetdydzError(), GetSigmaZError(), GetXError(), GetYError(), GetZError(), and SetCovariance().

double BeamSpotObjects::dxdz_ [private]

Definition at line 88 of file BeamSpotObjects.h.

Referenced by Getdxdz(), and Setdxdz().

double BeamSpotObjects::dydz_ [private]

Definition at line 89 of file BeamSpotObjects.h.

Referenced by Getdydz(), and Setdydz().

double BeamSpotObjects::position_[3] [private]

Definition at line 85 of file BeamSpotObjects.h.

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

double BeamSpotObjects::sigmaZ_ [private]

Definition at line 86 of file BeamSpotObjects.h.

Referenced by GetSigmaZ(), and SetSigmaZ().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:15:01 2009 for CMSSW by  doxygen 1.5.4