CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_5/src/CondFormats/BeamSpotObjects/interface/SimBeamSpotObjects.h

Go to the documentation of this file.
00001 #ifndef SIMBEAMSPOTOBJECTS_H
00002 #define SIMBEAMSPOTOBJECTS_H
00003 
00010 #include <sstream>
00011 #include "CLHEP/Units/GlobalSystemOfUnits.h"
00012 #include "CLHEP/Units/GlobalPhysicalConstants.h"
00013 
00014 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00015 
00016 class SimBeamSpotObjects {
00017  public:
00018   SimBeamSpotObjects(){};
00019   virtual ~ SimBeamSpotObjects(){};
00020 
00021   double fX0, fY0, fZ0;
00022   double fSigmaZ;
00023   double fbetastar, femittance;
00024   double fPhi,fAlpha;
00025   double fTimeOffset;
00026 
00027   void print(std::stringstream& ss) const;
00028 
00029   void read(edm::ParameterSet & p){
00030     fX0 =        p.getParameter<double>("X0")*cm;
00031     fY0 =        p.getParameter<double>("Y0")*cm;
00032     fZ0 =        p.getParameter<double>("Z0")*cm;
00033     fSigmaZ =    p.getParameter<double>("SigmaZ")*cm;
00034     fAlpha =     p.getParameter<double>("Alpha")*radian;
00035     fPhi =       p.getParameter<double>("Phi")*radian;
00036     fbetastar =  p.getParameter<double>("BetaStar")*cm;
00037     femittance = p.getParameter<double>("Emittance")*cm; // this is not the normalized emittance
00038     fTimeOffset = p.getParameter<double>("TimeOffset")*ns*c_light; // HepMC time units are mm
00039   }
00040 };
00041 
00042 std::ostream& operator<< ( std::ostream&, SimBeamSpotObjects beam );
00043 
00044 #endif