Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:27

0001 #ifndef CondFormats_PPSObjects_CTPPSBeamParameters_h
0002 #define CondFormats_PPSObjects_CTPPSBeamParameters_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    PPSObjects
0006 // Class:      CTPPSBeamParameters
0007 //
0008 /**\class CTPPSBeamParameters CTPPSBeamParameters.h CondFormats/CTPPSRedoutObjects/src/CTPPSBeamParameters.cc
0009 
0010  Description: Beam parameters for proton reconstruction
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 // Original Author:  Wagner Carvalho
0016 //         Created:  20 Nov 2018
0017 //
0018 
0019 #include "CondFormats/Serialization/interface/Serializable.h"
0020 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0021 
0022 class CTPPSBeamParameters {
0023 public:
0024   // Constructor
0025   CTPPSBeamParameters();
0026   // Destructor
0027   ~CTPPSBeamParameters();
0028 
0029   // Getters
0030 
0031   double getBeamMom45() const;
0032   double getBeamMom56() const;
0033 
0034   double getBetaStarX45() const;
0035   double getBetaStarY45() const;
0036   double getBetaStarX56() const;
0037   double getBetaStarY56() const;
0038 
0039   double getBeamDivergenceX45() const;
0040   double getBeamDivergenceY45() const;
0041   double getBeamDivergenceX56() const;
0042   double getBeamDivergenceY56() const;
0043 
0044   double getHalfXangleX45() const;
0045   double getHalfXangleY45() const;
0046   double getHalfXangleX56() const;
0047   double getHalfXangleY56() const;
0048 
0049   double getVtxOffsetX45() const;
0050   double getVtxOffsetY45() const;
0051   double getVtxOffsetZ45() const;
0052   double getVtxOffsetT45() const;
0053   double getVtxOffsetX56() const;
0054   double getVtxOffsetY56() const;
0055   double getVtxOffsetZ56() const;
0056   double getVtxOffsetT56() const;
0057 
0058   double getVtxStddevX() const;
0059   double getVtxStddevY() const;
0060   double getVtxStddevZ() const;
0061   double getVtxStddevT() const;
0062 
0063   // Setters
0064 
0065   void setBeamMom45(double mom);
0066   void setBeamMom56(double mom);
0067 
0068   void setBetaStarX45(double beta);
0069   void setBetaStarY45(double beta);
0070   void setBetaStarX56(double beta);
0071   void setBetaStarY56(double beta);
0072 
0073   void setBeamDivergenceX45(double div);
0074   void setBeamDivergenceY45(double div);
0075   void setBeamDivergenceX56(double div);
0076   void setBeamDivergenceY56(double div);
0077 
0078   void setHalfXangleX45(double angle);
0079   void setHalfXangleY45(double angle);
0080   void setHalfXangleX56(double angle);
0081   void setHalfXangleY56(double angle);
0082 
0083   void setVtxOffsetX45(double offset);
0084   void setVtxOffsetY45(double offset);
0085   void setVtxOffsetZ45(double offset);
0086   void setVtxOffsetT45(double offset);
0087   void setVtxOffsetX56(double offset);
0088   void setVtxOffsetY56(double offset);
0089   void setVtxOffsetZ56(double offset);
0090   void setVtxOffsetT56(double offset);
0091 
0092   void setVtxStddevX(double stddev);
0093   void setVtxStddevY(double stddev);
0094   void setVtxStddevZ(double stddev);
0095   void setVtxStddevT(double stddev);
0096 
0097   void printInfo(std::stringstream &s);
0098 
0099 private:
0100   // LHC sector 45 corresponds to beam 2, sector 56 to beam 1
0101   double beam_momentum_45_;  // GeV
0102   double beam_momentum_56_;  // GeV
0103 
0104   double beta_star_x_45_, beta_star_x_56_;  // cm
0105   double beta_star_y_45_, beta_star_y_56_;
0106 
0107   double beam_divergence_x_45_, beam_divergence_x_56_;  // rad
0108   double beam_divergence_y_45_, beam_divergence_y_56_;
0109 
0110   double half_crossing_angle_x_45_, half_crossing_angle_x_56_;  // rad
0111   double half_crossing_angle_y_45_, half_crossing_angle_y_56_;
0112 
0113   // splitting between 45 and 56 may effectively account for magnet misalignment
0114   double vtx_offset_x_45_, vtx_offset_x_56_;  // cm
0115   double vtx_offset_y_45_, vtx_offset_y_56_;  // cm
0116   double vtx_offset_z_45_, vtx_offset_z_56_;  // cm
0117   double vtx_offset_t_45_, vtx_offset_t_56_;  // cm
0118 
0119   // the following variables might possibly be in another CMS record already,
0120   // but we might want to keep them for completeness/independence
0121   double vtx_stddev_x_;  // cm
0122   double vtx_stddev_y_;  // cm
0123   double vtx_stddev_z_;  // cm
0124   double vtx_stddev_t_;  // cm
0125 
0126   COND_SERIALIZABLE;
0127 };
0128 
0129 std::ostream &operator<<(std::ostream &, CTPPSBeamParameters);
0130 
0131 #endif