CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10/src/IOMC/EventVertexGenerators/interface/BetafuncEvtVtxGenerator.h

Go to the documentation of this file.
00001 #ifndef IOMC_BetafuncEvtVtxGenerator_H
00002 #define IOMC_BetafuncEvtVtxGenerator_H
00003 
00004 // $Id: BetafuncEvtVtxGenerator.h,v 1.8 2012/01/18 16:22:25 vlimant Exp $
00005 /*
00006 ________________________________________________________________________
00007 
00008  BetafuncEvtVtxGenerator
00009 
00010  Smear vertex according to the Beta function on the transverse plane
00011  and a Gaussian on the z axis. It allows the beam to have a crossing
00012  angle (dx/dz and dy/dz).
00013 
00014  Based on GaussEvtVtxGenerator.h
00015  implemented by Francisco Yumiceva (yumiceva@fnal.gov)
00016 
00017  FERMILAB
00018  2006
00019 ________________________________________________________________________
00020 */
00021 
00022 #include "IOMC/EventVertexGenerators/interface/BaseEvtVtxGenerator.h"
00023 #include "FWCore/Framework/interface/ESWatcher.h"
00024 #include "CondFormats/DataRecord/interface/SimBeamSpotObjectsRcd.h"
00025 
00026 namespace CLHEP {
00027    class RandGaussQ;
00028 }
00029 
00030 class BetafuncEvtVtxGenerator : public BaseEvtVtxGenerator 
00031 {
00032 public:
00033   BetafuncEvtVtxGenerator(const edm::ParameterSet & p);
00034   virtual ~BetafuncEvtVtxGenerator();
00035 
00036   virtual void beginRun( edm::Run & , const edm::EventSetup&);
00037   virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&);
00038 
00040   //virtual CLHEP::Hep3Vector * newVertex();
00041   virtual HepMC::FourVector* newVertex() ;
00042 
00043   virtual TMatrixD* GetInvLorentzBoost();
00044 
00045     
00047   void sigmaZ(double s=1.0);
00048 
00050   void X0(double m=0) { fX0=m; }
00052   void Y0(double m=0) { fY0=m; }
00054   void Z0(double m=0) { fZ0=m; }
00055 
00057   void Phi(double m=0) { phi_=m; }
00059   void Alpha(double m=0) { alpha_=m; }
00060 
00062   void betastar(double m=0) { fbetastar=m; }
00064   void emittance(double m=0) { femittance=m; }
00065 
00067   double BetaFunction(double z, double z0);
00068     
00069 private:
00071   BetafuncEvtVtxGenerator(const BetafuncEvtVtxGenerator &p);
00073   BetafuncEvtVtxGenerator&  operator = (const BetafuncEvtVtxGenerator & rhs );
00074   
00075 private:
00076 
00077   bool readDB_;
00078 
00079   double alpha_, phi_;
00080   //TMatrixD boost_;
00081   
00082   double fX0, fY0, fZ0;
00083   double fSigmaZ;
00084   //double fdxdz, fdydz;
00085   double fbetastar, femittance;
00086   //  double falpha;
00087   double fTimeOffset;
00088     
00089   CLHEP::RandGaussQ*  fRandom ;
00090   
00091   void update(const edm::EventSetup& iEventSetup);
00092   edm::ESWatcher<SimBeamSpotObjectsRcd> parameterWatcher_;
00093 };
00094 
00095 #endif