File indexing completed on 2024-09-07 04:35:36
0001 #ifndef SIMBEAMSPOTOBJECTS_H
0002 #define SIMBEAMSPOTOBJECTS_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #include "CondFormats/Serialization/interface/Serializable.h"
0025
0026 #include <sstream>
0027
0028 class SimBeamSpotObjects {
0029 public:
0030
0031 SimBeamSpotObjects() {
0032 fX0 = 0.0;
0033 fY0 = 0.0;
0034 fZ0 = 0.0;
0035 fMeanX = 0.0;
0036 fMeanY = 0.0;
0037 fMeanZ = 0.0;
0038 fSigmaX = -1.0;
0039 fSigmaY = -1.0;
0040 fSigmaZ = 0.0;
0041 fbetastar = 0.0;
0042 femittance = 0.0;
0043 fPhi = 0.0;
0044 fAlpha = 0.0;
0045 fTimeOffset = 0.0;
0046 };
0047
0048 virtual ~SimBeamSpotObjects() {}
0049
0050
0051 void setX(double val) { fX0 = val; }
0052 void setY(double val) { fY0 = val; }
0053 void setZ(double val) { fZ0 = val; }
0054
0055 void setMeanX(double val) { fMeanX = val; }
0056 void setMeanY(double val) { fMeanY = val; }
0057 void setMeanZ(double val) { fMeanZ = val; }
0058
0059 void setSigmaX(double val) { fSigmaX = val; }
0060 void setSigmaY(double val) { fSigmaY = val; }
0061 void setSigmaZ(double val) { fSigmaZ = val; }
0062
0063 void setBetaStar(double val) { fbetastar = val; }
0064 void setEmittance(double val) { femittance = val; }
0065
0066 void setPhi(double val) { fPhi = val; }
0067 void setAlpha(double val) { fAlpha = val; }
0068 void setTimeOffset(double val) { fTimeOffset = val; }
0069
0070
0071 double x() const { return fX0; }
0072 double y() const { return fY0; }
0073 double z() const { return fZ0; }
0074
0075 double meanX() const { return fMeanX; }
0076 double meanY() const { return fMeanY; }
0077 double meanZ() const { return fMeanZ; }
0078
0079 double sigmaX() const;
0080 double sigmaY() const;
0081 double sigmaZ() const { return fSigmaZ; }
0082
0083 double betaStar() const { return fbetastar; }
0084 double emittance() const { return femittance; }
0085
0086 double phi() const { return fPhi; }
0087 double alpha() const { return fAlpha; }
0088 double timeOffset() const { return fTimeOffset; }
0089
0090
0091 void print(std::stringstream& ss) const;
0092
0093 private:
0094 double fX0, fY0, fZ0;
0095 double fMeanX, fMeanY, fMeanZ;
0096 double fSigmaX, fSigmaY, fSigmaZ;
0097 double fbetastar, femittance;
0098 double fPhi, fAlpha;
0099 double fTimeOffset;
0100
0101 COND_SERIALIZABLE;
0102 };
0103
0104 std::ostream& operator<<(std::ostream&, SimBeamSpotObjects beam);
0105
0106 #endif