CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
SimBeamSpotObjects Class Reference

#include <SimBeamSpotObjects.h>

Public Member Functions

double alpha () const
 
double betaStar () const
 get BetaStar and Emittance More...
 
double emittance () const
 
double meanX () const
 get meanX, meanY, meanZ position More...
 
double meanY () const
 
double meanZ () const
 
double phi () const
 get Phi, Alpha and TimeOffset More...
 
void print (std::stringstream &ss) const
 print sim beam spot parameters More...
 
void setAlpha (double val)
 
void setBetaStar (double val)
 set BetaStar and Emittance More...
 
void setEmittance (double val)
 
void setMeanX (double val)
 set meanX, meanY, meanZ More...
 
void setMeanY (double val)
 
void setMeanZ (double val)
 
void setPhi (double val)
 set Phi, Alpha and TimeOffset More...
 
void setSigmaX (double val)
 set sigmaX, sigmaY, sigmaZ More...
 
void setSigmaY (double val)
 
void setSigmaZ (double val)
 
void setTimeOffset (double val)
 
void setX (double val)
 set X, Y, Z positions More...
 
void setY (double val)
 
void setZ (double val)
 
double sigmaX () const
 get sigmaX, sigmaY, sigmaZ More...
 
double sigmaY () const
 
double sigmaZ () const
 
 SimBeamSpotObjects ()
 default constructor More...
 
double timeOffset () const
 
double x () const
 get X, Y, Z position More...
 
double y () const
 
double z () const
 
virtual ~SimBeamSpotObjects ()
 

Private Member Functions

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

Private Attributes

double fAlpha
 
double fbetastar
 
double femittance
 
double fMeanX
 
double fMeanY
 
double fMeanZ
 
double fPhi
 
double fSigmaX
 
double fSigmaY
 
double fSigmaZ
 
double fTimeOffset
 
double fX0
 
double fY0
 
double fZ0
 

Friends

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

Detailed Description

Provide the vertex smearing parameters from DB

This Object contains the parameters needed by the vtx smearing functions used up to Run 3:

Definition at line 28 of file SimBeamSpotObjects.h.

Constructor & Destructor Documentation

◆ SimBeamSpotObjects()

SimBeamSpotObjects::SimBeamSpotObjects ( )
inline

default constructor

Definition at line 31 of file SimBeamSpotObjects.h.

References fAlpha, fbetastar, femittance, fMeanX, fMeanY, fMeanZ, fPhi, fSigmaX, fSigmaY, fSigmaZ, fTimeOffset, fX0, fY0, and fZ0.

31  {
32  fX0 = 0.0;
33  fY0 = 0.0;
34  fZ0 = 0.0;
35  fMeanX = 0.0;
36  fMeanY = 0.0;
37  fMeanZ = 0.0;
38  fSigmaX = -1.0;
39  fSigmaY = -1.0;
40  fSigmaZ = 0.0;
41  fbetastar = 0.0;
42  femittance = 0.0;
43  fPhi = 0.0;
44  fAlpha = 0.0;
45  fTimeOffset = 0.0;
46  };

◆ ~SimBeamSpotObjects()

virtual SimBeamSpotObjects::~SimBeamSpotObjects ( )
inlinevirtual

Definition at line 48 of file SimBeamSpotObjects.h.

48 {};

Member Function Documentation

◆ alpha()

double SimBeamSpotObjects::alpha ( ) const
inline

Definition at line 87 of file SimBeamSpotObjects.h.

References fAlpha.

Referenced by BeamProfile2DBReader::analyze(), print(), and BetafuncEvtVtxGenerator::update().

87 { return fAlpha; }

◆ betaStar()

double SimBeamSpotObjects::betaStar ( ) const
inline

get BetaStar and Emittance

Definition at line 83 of file SimBeamSpotObjects.h.

References fbetastar.

Referenced by BeamProfile2DBReader::analyze(), print(), and BetafuncEvtVtxGenerator::update().

83 { return fbetastar; }

◆ emittance()

double SimBeamSpotObjects::emittance ( ) const
inline

Definition at line 84 of file SimBeamSpotObjects.h.

References femittance.

Referenced by BeamProfile2DBReader::analyze(), print(), and BetafuncEvtVtxGenerator::update().

84 { return femittance; }

◆ meanX()

double SimBeamSpotObjects::meanX ( ) const
inline

get meanX, meanY, meanZ position

Definition at line 75 of file SimBeamSpotObjects.h.

References fMeanX.

Referenced by BeamProfile2DBReader::analyze(), print(), and GaussEvtVtxGenerator::update().

75 { return fMeanX; }

◆ meanY()

double SimBeamSpotObjects::meanY ( ) const
inline

Definition at line 76 of file SimBeamSpotObjects.h.

References fMeanY.

Referenced by BeamProfile2DBReader::analyze(), print(), and GaussEvtVtxGenerator::update().

76 { return fMeanY; }

◆ meanZ()

double SimBeamSpotObjects::meanZ ( ) const
inline

Definition at line 77 of file SimBeamSpotObjects.h.

References fMeanZ.

Referenced by BeamProfile2DBReader::analyze(), print(), and GaussEvtVtxGenerator::update().

77 { return fMeanZ; }

◆ phi()

double SimBeamSpotObjects::phi ( ) const
inline

◆ print()

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

print sim beam spot parameters

Definition at line 24 of file SimBeamSpotObjects.cc.

References alpha(), betaStar(), emittance(), meanX(), meanY(), meanZ(), phi(), sigmaX(), sigmaY(), sigmaZ(), contentValuesCheck::ss, timeOffset(), x(), y(), and z().

24  {
25  ss << "-----------------------------------------------------\n"
26  << " Sim Beam Spot Data\n\n"
27  << " X0 = " << x() << " [cm]\n"
28  << " Y0 = " << y() << " [cm]\n"
29  << " Z0 = " << z() << " [cm]\n"
30  << " MeanX = " << meanX() << " [cm]\n"
31  << " MeanY = " << meanY() << " [cm]\n"
32  << " MeanZ = " << meanZ() << " [cm]\n"
33  << " Sigma X0 = " << sigmaX() << " [cm]\n"
34  << " Sigma Y0 = " << sigmaY() << " [cm]\n"
35  << " Sigma Z0 = " << sigmaZ() << " [cm]\n"
36  << " Beta star = " << betaStar() << " [cm]\n"
37  << " Emittance X = " << emittance() << " [cm]\n"
38  << " Phi = " << phi() << " [radians]\n"
39  << " Alpha = " << alpha() << " [radians]\n"
40  << " TimeOffset = " << timeOffset() << " [ns]\n"
41  << "-----------------------------------------------------\n\n";
42 }
double sigmaZ() const
double sigmaX() const
get sigmaX, sigmaY, sigmaZ
double meanX() const
get meanX, meanY, meanZ position
double alpha() const
double timeOffset() const
double meanY() const
double meanZ() const
double emittance() const
double phi() const
get Phi, Alpha and TimeOffset
double betaStar() const
get BetaStar and Emittance
double x() const
get X, Y, Z position

◆ serialize()

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

◆ setAlpha()

void SimBeamSpotObjects::setAlpha ( double  val)
inline

Definition at line 67 of file SimBeamSpotObjects.h.

References fAlpha, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setBetaStar()

void SimBeamSpotObjects::setBetaStar ( double  val)
inline

set BetaStar and Emittance

Definition at line 63 of file SimBeamSpotObjects.h.

References fbetastar, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setEmittance()

void SimBeamSpotObjects::setEmittance ( double  val)
inline

◆ setMeanX()

void SimBeamSpotObjects::setMeanX ( double  val)
inline

set meanX, meanY, meanZ

Definition at line 55 of file SimBeamSpotObjects.h.

References fMeanX, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setMeanY()

void SimBeamSpotObjects::setMeanY ( double  val)
inline

Definition at line 56 of file SimBeamSpotObjects.h.

References fMeanY, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setMeanZ()

void SimBeamSpotObjects::setMeanZ ( double  val)
inline

Definition at line 57 of file SimBeamSpotObjects.h.

References fMeanZ, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setPhi()

void SimBeamSpotObjects::setPhi ( double  val)
inline

set Phi, Alpha and TimeOffset

Definition at line 66 of file SimBeamSpotObjects.h.

References fPhi, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setSigmaX()

void SimBeamSpotObjects::setSigmaX ( double  val)
inline

set sigmaX, sigmaY, sigmaZ

Definition at line 59 of file SimBeamSpotObjects.h.

References fSigmaX, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setSigmaY()

void SimBeamSpotObjects::setSigmaY ( double  val)
inline

◆ setSigmaZ()

void SimBeamSpotObjects::setSigmaZ ( double  val)
inline

◆ setTimeOffset()

void SimBeamSpotObjects::setTimeOffset ( double  val)
inline

◆ setX()

void SimBeamSpotObjects::setX ( double  val)
inline

set X, Y, Z positions

Definition at line 51 of file SimBeamSpotObjects.h.

References fX0, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setY()

void SimBeamSpotObjects::setY ( double  val)
inline

Definition at line 52 of file SimBeamSpotObjects.h.

References fY0, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ setZ()

void SimBeamSpotObjects::setZ ( double  val)
inline

Definition at line 53 of file SimBeamSpotObjects.h.

References fZ0, and heppy_batch::val.

Referenced by BeamProfile2DBWriter::BeamProfile2DBWriter().

◆ sigmaX()

double SimBeamSpotObjects::sigmaX ( ) const

get sigmaX, sigmaY, sigmaZ

Definition at line 9 of file SimBeamSpotObjects.cc.

References fbetastar, femittance, fSigmaX, and mathSSE::sqrt().

Referenced by BeamProfile2DBReader::analyze(), print(), and GaussEvtVtxGenerator::update().

9  {
10  if (fSigmaX >= 0.) // Gaussian smearing
11  return fSigmaX;
12  else // BetaFunc smearing
13  return (1 / std::sqrt(2)) * std::sqrt(femittance * fbetastar);
14 }
T sqrt(T t)
Definition: SSEVec.h:19

◆ sigmaY()

double SimBeamSpotObjects::sigmaY ( ) const

Definition at line 16 of file SimBeamSpotObjects.cc.

References fbetastar, femittance, fSigmaY, and mathSSE::sqrt().

Referenced by BeamProfile2DBReader::analyze(), print(), and GaussEvtVtxGenerator::update().

16  {
17  if (fSigmaY >= 0.) // Gaussian smearing
18  return fSigmaY;
19  else // BetaFunc smearing
20  return (1 / std::sqrt(2)) * std::sqrt(femittance * fbetastar);
21 }
T sqrt(T t)
Definition: SSEVec.h:19

◆ sigmaZ()

double SimBeamSpotObjects::sigmaZ ( ) const
inline

◆ timeOffset()

double SimBeamSpotObjects::timeOffset ( ) const
inline

◆ x()

double SimBeamSpotObjects::x ( ) const
inline

◆ y()

double SimBeamSpotObjects::y ( ) const
inline

◆ z()

double SimBeamSpotObjects::z ( ) const
inline

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 101 of file SimBeamSpotObjects.h.

◆ cond::serialization::access

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

Definition at line 101 of file SimBeamSpotObjects.h.

Member Data Documentation

◆ fAlpha

double SimBeamSpotObjects::fAlpha
private

Definition at line 98 of file SimBeamSpotObjects.h.

Referenced by alpha(), setAlpha(), and SimBeamSpotObjects().

◆ fbetastar

double SimBeamSpotObjects::fbetastar
private

Definition at line 97 of file SimBeamSpotObjects.h.

Referenced by betaStar(), setBetaStar(), sigmaX(), sigmaY(), and SimBeamSpotObjects().

◆ femittance

double SimBeamSpotObjects::femittance
private

Definition at line 97 of file SimBeamSpotObjects.h.

Referenced by emittance(), setEmittance(), sigmaX(), sigmaY(), and SimBeamSpotObjects().

◆ fMeanX

double SimBeamSpotObjects::fMeanX
private

Definition at line 95 of file SimBeamSpotObjects.h.

Referenced by meanX(), setMeanX(), and SimBeamSpotObjects().

◆ fMeanY

double SimBeamSpotObjects::fMeanY
private

Definition at line 95 of file SimBeamSpotObjects.h.

Referenced by meanY(), setMeanY(), and SimBeamSpotObjects().

◆ fMeanZ

double SimBeamSpotObjects::fMeanZ
private

Definition at line 95 of file SimBeamSpotObjects.h.

Referenced by meanZ(), setMeanZ(), and SimBeamSpotObjects().

◆ fPhi

double SimBeamSpotObjects::fPhi
private

Definition at line 98 of file SimBeamSpotObjects.h.

Referenced by phi(), setPhi(), and SimBeamSpotObjects().

◆ fSigmaX

double SimBeamSpotObjects::fSigmaX
private

Definition at line 96 of file SimBeamSpotObjects.h.

Referenced by setSigmaX(), sigmaX(), and SimBeamSpotObjects().

◆ fSigmaY

double SimBeamSpotObjects::fSigmaY
private

Definition at line 96 of file SimBeamSpotObjects.h.

Referenced by setSigmaY(), sigmaY(), and SimBeamSpotObjects().

◆ fSigmaZ

double SimBeamSpotObjects::fSigmaZ
private

Definition at line 96 of file SimBeamSpotObjects.h.

Referenced by setSigmaZ(), sigmaZ(), and SimBeamSpotObjects().

◆ fTimeOffset

double SimBeamSpotObjects::fTimeOffset
private

Definition at line 99 of file SimBeamSpotObjects.h.

Referenced by setTimeOffset(), SimBeamSpotObjects(), and timeOffset().

◆ fX0

double SimBeamSpotObjects::fX0
private

Definition at line 94 of file SimBeamSpotObjects.h.

Referenced by setX(), SimBeamSpotObjects(), and x().

◆ fY0

double SimBeamSpotObjects::fY0
private

Definition at line 94 of file SimBeamSpotObjects.h.

Referenced by setY(), SimBeamSpotObjects(), and y().

◆ fZ0

double SimBeamSpotObjects::fZ0
private

Definition at line 94 of file SimBeamSpotObjects.h.

Referenced by setZ(), SimBeamSpotObjects(), and z().