File indexing completed on 2024-04-06 12:02:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "CondFormats/PPSObjects/interface/CTPPSBeamParameters.h"
0018 #include <iostream>
0019
0020
0021
0022 CTPPSBeamParameters::CTPPSBeamParameters()
0023 : beam_momentum_45_(0.),
0024 beam_momentum_56_(0.),
0025 beta_star_x_45_(0.),
0026 beta_star_x_56_(0.),
0027 beta_star_y_45_(0.),
0028 beta_star_y_56_(0.),
0029 beam_divergence_x_45_(0.),
0030 beam_divergence_x_56_(0.),
0031 beam_divergence_y_45_(0.),
0032 beam_divergence_y_56_(0.),
0033 half_crossing_angle_x_45_(0.),
0034 half_crossing_angle_x_56_(0.),
0035 half_crossing_angle_y_45_(0.),
0036 half_crossing_angle_y_56_(0.),
0037 vtx_offset_x_45_(0.),
0038 vtx_offset_x_56_(0.),
0039 vtx_offset_y_45_(0.),
0040 vtx_offset_y_56_(0.),
0041 vtx_offset_z_45_(0.),
0042 vtx_offset_z_56_(0.),
0043 vtx_offset_t_45_(0.),
0044 vtx_offset_t_56_(0.),
0045 vtx_stddev_x_(0.),
0046 vtx_stddev_y_(0.),
0047 vtx_stddev_z_(0.),
0048 vtx_stddev_t_(0.) {}
0049
0050
0051 CTPPSBeamParameters::~CTPPSBeamParameters() {}
0052
0053
0054
0055 double CTPPSBeamParameters::getBeamMom45() const { return beam_momentum_45_; }
0056 double CTPPSBeamParameters::getBeamMom56() const { return beam_momentum_56_; }
0057
0058 double CTPPSBeamParameters::getBetaStarX45() const { return beta_star_x_45_; }
0059 double CTPPSBeamParameters::getBetaStarY45() const { return beta_star_y_45_; }
0060 double CTPPSBeamParameters::getBetaStarX56() const { return beta_star_x_56_; }
0061 double CTPPSBeamParameters::getBetaStarY56() const { return beta_star_y_56_; }
0062
0063 double CTPPSBeamParameters::getBeamDivergenceX45() const { return beam_divergence_x_45_; }
0064 double CTPPSBeamParameters::getBeamDivergenceY45() const { return beam_divergence_y_45_; }
0065 double CTPPSBeamParameters::getBeamDivergenceX56() const { return beam_divergence_x_56_; }
0066 double CTPPSBeamParameters::getBeamDivergenceY56() const { return beam_divergence_y_56_; }
0067
0068 double CTPPSBeamParameters::getHalfXangleX45() const { return half_crossing_angle_x_45_; }
0069 double CTPPSBeamParameters::getHalfXangleY45() const { return half_crossing_angle_y_45_; }
0070 double CTPPSBeamParameters::getHalfXangleX56() const { return half_crossing_angle_x_56_; }
0071 double CTPPSBeamParameters::getHalfXangleY56() const { return half_crossing_angle_y_56_; }
0072
0073 double CTPPSBeamParameters::getVtxOffsetX45() const { return vtx_offset_x_45_; }
0074 double CTPPSBeamParameters::getVtxOffsetY45() const { return vtx_offset_y_45_; }
0075 double CTPPSBeamParameters::getVtxOffsetZ45() const { return vtx_offset_z_45_; }
0076 double CTPPSBeamParameters::getVtxOffsetT45() const { return vtx_offset_t_45_; }
0077 double CTPPSBeamParameters::getVtxOffsetX56() const { return vtx_offset_x_56_; }
0078 double CTPPSBeamParameters::getVtxOffsetY56() const { return vtx_offset_y_56_; }
0079 double CTPPSBeamParameters::getVtxOffsetZ56() const { return vtx_offset_z_56_; }
0080 double CTPPSBeamParameters::getVtxOffsetT56() const { return vtx_offset_t_56_; }
0081
0082 double CTPPSBeamParameters::getVtxStddevX() const { return vtx_stddev_x_; }
0083 double CTPPSBeamParameters::getVtxStddevY() const { return vtx_stddev_y_; }
0084 double CTPPSBeamParameters::getVtxStddevZ() const { return vtx_stddev_z_; }
0085 double CTPPSBeamParameters::getVtxStddevT() const { return vtx_stddev_t_; }
0086
0087
0088
0089 void CTPPSBeamParameters::setBeamMom45(double mom) { beam_momentum_45_ = mom; }
0090 void CTPPSBeamParameters::setBeamMom56(double mom) { beam_momentum_56_ = mom; }
0091
0092 void CTPPSBeamParameters::setBetaStarX45(double beta) { beta_star_x_45_ = beta; }
0093 void CTPPSBeamParameters::setBetaStarY45(double beta) { beta_star_y_45_ = beta; }
0094 void CTPPSBeamParameters::setBetaStarX56(double beta) { beta_star_x_56_ = beta; }
0095 void CTPPSBeamParameters::setBetaStarY56(double beta) { beta_star_y_56_ = beta; }
0096
0097 void CTPPSBeamParameters::setBeamDivergenceX45(double div) { beam_divergence_x_45_ = div; }
0098 void CTPPSBeamParameters::setBeamDivergenceY45(double div) { beam_divergence_y_45_ = div; }
0099 void CTPPSBeamParameters::setBeamDivergenceX56(double div) { beam_divergence_x_56_ = div; }
0100 void CTPPSBeamParameters::setBeamDivergenceY56(double div) { beam_divergence_y_56_ = div; }
0101
0102 void CTPPSBeamParameters::setHalfXangleX45(double angle) { half_crossing_angle_x_45_ = angle; }
0103 void CTPPSBeamParameters::setHalfXangleY45(double angle) { half_crossing_angle_y_45_ = angle; }
0104 void CTPPSBeamParameters::setHalfXangleX56(double angle) { half_crossing_angle_x_56_ = angle; }
0105 void CTPPSBeamParameters::setHalfXangleY56(double angle) { half_crossing_angle_y_56_ = angle; }
0106
0107 void CTPPSBeamParameters::setVtxOffsetX45(double offset) { vtx_offset_x_45_ = offset; }
0108 void CTPPSBeamParameters::setVtxOffsetY45(double offset) { vtx_offset_y_45_ = offset; }
0109 void CTPPSBeamParameters::setVtxOffsetZ45(double offset) { vtx_offset_z_45_ = offset; }
0110 void CTPPSBeamParameters::setVtxOffsetT45(double offset) { vtx_offset_t_45_ = offset; }
0111 void CTPPSBeamParameters::setVtxOffsetX56(double offset) { vtx_offset_x_56_ = offset; }
0112 void CTPPSBeamParameters::setVtxOffsetY56(double offset) { vtx_offset_y_56_ = offset; }
0113 void CTPPSBeamParameters::setVtxOffsetZ56(double offset) { vtx_offset_z_56_ = offset; }
0114 void CTPPSBeamParameters::setVtxOffsetT56(double offset) { vtx_offset_t_56_ = offset; }
0115
0116 void CTPPSBeamParameters::setVtxStddevX(double stddev) { vtx_stddev_x_ = stddev; }
0117 void CTPPSBeamParameters::setVtxStddevY(double stddev) { vtx_stddev_y_ = stddev; }
0118 void CTPPSBeamParameters::setVtxStddevZ(double stddev) { vtx_stddev_z_ = stddev; }
0119 void CTPPSBeamParameters::setVtxStddevT(double stddev) { vtx_stddev_t_ = stddev; }
0120
0121 void CTPPSBeamParameters::printInfo(std::stringstream& s) {
0122 s << "\n Beam parameters : \n"
0123 << "\n beam_momentum_45 = " << beam_momentum_45_ << " GeV"
0124 << "\n beam_momentum_56 = " << beam_momentum_56_ << " GeV"
0125 << "\n beta_star_x_45 = " << beta_star_x_45_ << " cm"
0126 << "\n beta_star_y_45 = " << beta_star_y_45_ << " cm"
0127 << "\n beta_star_x_56 = " << beta_star_x_56_ << " cm"
0128 << "\n beta_star_y_56 = " << beta_star_y_56_ << " cm"
0129 << "\n beam_divergence_x_45 = " << beam_divergence_x_45_ << " rad"
0130 << "\n beam_divergence_y_45 = " << beam_divergence_y_45_ << " rad"
0131 << "\n beam_divergence_x_56 = " << beam_divergence_x_56_ << " rad"
0132 << "\n beam_divergence_y_56 = " << beam_divergence_y_56_ << " rad"
0133 << "\n half_crossing_angle_x_45 = " << half_crossing_angle_x_45_ << " rad"
0134 << "\n half_crossing_angle_y_45 = " << half_crossing_angle_y_45_ << " rad"
0135 << "\n half_crossing_angle_x_56 = " << half_crossing_angle_x_56_ << " rad"
0136 << "\n half_crossing_angle_y_56 = " << half_crossing_angle_y_56_ << " rad"
0137 << "\n vtx_offset_x_45 = " << vtx_offset_x_45_ << " cm"
0138 << "\n vtx_offset_y_45 = " << vtx_offset_y_45_ << " cm"
0139 << "\n vtx_offset_z_45 = " << vtx_offset_z_45_ << " cm"
0140 << "\n vtx_offset_t_45 = " << vtx_offset_t_45_ << " cm"
0141 << "\n vtx_offset_x_56 = " << vtx_offset_x_56_ << " cm"
0142 << "\n vtx_offset_y_56 = " << vtx_offset_y_56_ << " cm"
0143 << "\n vtx_offset_z_56 = " << vtx_offset_z_56_ << " cm"
0144 << "\n vtx_offset_t_56 = " << vtx_offset_t_56_ << " cm"
0145 << "\n vtx_stddev_x = " << vtx_stddev_x_ << " cm"
0146 << "\n vtx_stddev_y = " << vtx_stddev_y_ << " cm"
0147 << "\n vtx_stddev_z = " << vtx_stddev_z_ << " cm"
0148 << "\n vtx_stddev_t = " << vtx_stddev_t_ << " cm" << std::endl;
0149 }
0150
0151 std::ostream& operator<<(std::ostream& os, CTPPSBeamParameters info) {
0152 std::stringstream ss;
0153 info.printInfo(ss);
0154 os << ss.str();
0155 return os;
0156 }