Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:35:36

0001 #ifndef CondFormats_BeamSpotObjects_SimBeamSpotHLLHCObjects_h
0002 #define CondFormats_BeamSpotObjects_SimBeamSpotHLLHCObjects_h
0003 
0004 /** \class SimBeamSpotHLLHCObjects
0005  *
0006  * Provide the vertex smearing parameters from DB
0007  *
0008  * This Object contains the parameters needed by the HLLHCEvtVtxGenerator generator:
0009  *   Parameters used:
0010  *      - fMeanX, fMeanY, fMeanZ
0011  *      - fEProton, fCrabFrequency, fRF800
0012  *      - fCrossingAngle
0013  *      - fCrabbingAngleCrossing, fCrabbingAngleSeparation
0014  *      - fBetaCrossingPlane, fBetaSeparationPlane
0015  *      - fHorizontalEmittance, fVerticalEmittance
0016  *      - fBunchLength
0017  *      - fTimeOffset
0018  *
0019  */
0020 
0021 #include "CondFormats/Serialization/interface/Serializable.h"
0022 
0023 #include <sstream>
0024 
0025 class SimBeamSpotHLLHCObjects {
0026 public:
0027   /// default constructor
0028   SimBeamSpotHLLHCObjects() {
0029     fMeanX = 0.0;
0030     fMeanY = 0.0;
0031     fMeanZ = 0.0;
0032     fEProton = 0.0;
0033     fCrabFrequency = 0.0;
0034     fRF800 = 0.0;
0035     fCrossingAngle = 0.0;
0036     fCrabbingAngleCrossing = 0.0;
0037     fCrabbingAngleSeparation = 0.0;
0038     fBetaCrossingPlane = 0.0;
0039     fBetaSeparationPlane = 0.0;
0040     fHorizontalEmittance = 0.0;
0041     fVerticalEmittance = 0.0;
0042     fBunchLength = 0.0;
0043     fTimeOffset = 0.0;
0044   };
0045 
0046   virtual ~SimBeamSpotHLLHCObjects() {}
0047 
0048   /// set meanX, meanY, meanZ
0049   void setMeanX(double val) { fMeanX = val; }
0050   void setMeanY(double val) { fMeanY = val; }
0051   void setMeanZ(double val) { fMeanZ = val; }
0052   /// set EProton, fCrabFrequency, RF800
0053   void setEProton(double val) { fEProton = val; }
0054   void setCrabFrequency(double val) { fCrabFrequency = val; }
0055   void setRF800(double val) { fRF800 = val; }
0056   /// set Crossing and Crabbing angles
0057   void setCrossingAngle(double val) { fCrossingAngle = val; }
0058   void setCrabbingAngleCrossing(double val) { fCrabbingAngleCrossing = val; }
0059   void setCrabbingAngleSeparation(double val) { fCrabbingAngleSeparation = val; }
0060   /// set BetaStar and Emittance
0061   void setBetaCrossingPlane(double val) { fBetaCrossingPlane = val; }
0062   void setBetaSeparationPlane(double val) { fBetaSeparationPlane = val; }
0063   void setHorizontalEmittance(double val) { fHorizontalEmittance = val; }
0064   void setVerticalEmittance(double val) { fVerticalEmittance = val; }
0065   /// set BunchLength and TimeOffset
0066   void setBunchLength(double val) { fBunchLength = val; }
0067   void setTimeOffset(double val) { fTimeOffset = val; }
0068 
0069   /// get meanX, meanY, meanZ position
0070   double meanX() const { return fMeanX; }
0071   double meanY() const { return fMeanY; }
0072   double meanZ() const { return fMeanZ; }
0073   /// get EProton, fCrabFrequency, RF800
0074   double eProton() const { return fEProton; }
0075   double crabFrequency() const { return fCrabFrequency; }
0076   double rf800() const { return fRF800; }
0077   /// set Crossing and Crabbing angles
0078   double crossingAngle() const { return fCrossingAngle; }
0079   double crabbingAngleCrossing() const { return fCrabbingAngleCrossing; }
0080   double crabbingAngleSeparation() const { return fCrabbingAngleSeparation; }
0081   /// get BetaStar and Emittance
0082   double betaCrossingPlane() const { return fBetaCrossingPlane; }
0083   double betaSeparationPlane() const { return fBetaSeparationPlane; }
0084   double horizontalEmittance() const { return fHorizontalEmittance; }
0085   double verticalEmittance() const { return fVerticalEmittance; }
0086   /// get BunchLength and TimeOffset
0087   double bunchLenght() const { return fBunchLength; }
0088   double timeOffset() const { return fTimeOffset; }
0089 
0090   /// print sim beam spot parameters
0091   void print(std::stringstream& ss) const;
0092 
0093 private:
0094   double fMeanX, fMeanY, fMeanZ;
0095   double fEProton, fCrabFrequency, fRF800;
0096   double fCrossingAngle, fCrabbingAngleCrossing, fCrabbingAngleSeparation;
0097   double fBetaCrossingPlane, fBetaSeparationPlane;
0098   double fHorizontalEmittance, fVerticalEmittance;
0099   double fBunchLength, fTimeOffset;
0100 
0101   COND_SERIALIZABLE;
0102 };
0103 
0104 std::ostream& operator<<(std::ostream&, SimBeamSpotHLLHCObjects beam);
0105 
0106 #endif