Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-04 02:02:43

0001 #ifndef IOMC_GaussEvtVtxGenerator_H
0002 #define IOMC_GaussEvtVtxGenerator_H
0003 
0004 /**
0005  * Generate event vertices according to a Gauss distribution. 
0006  * Attention: All values are assumed to be cm!
0007  *
0008  */
0009 
0010 #include "IOMC/EventVertexGenerators/interface/BaseEvtVtxGenerator.h"
0011 
0012 namespace CLHEP {
0013   class HepRandomEngine;
0014 }
0015 
0016 class GaussEvtVtxGenerator : public BaseEvtVtxGenerator {
0017 public:
0018   GaussEvtVtxGenerator(const edm::ParameterSet& p);
0019   /** Copy constructor */
0020   GaussEvtVtxGenerator(const GaussEvtVtxGenerator& p) = delete;
0021   /** Copy assignment operator */
0022   GaussEvtVtxGenerator& operator=(const GaussEvtVtxGenerator& rhs) = delete;
0023   ~GaussEvtVtxGenerator() override;
0024 
0025   /// return a new event vertex
0026   //virtual CLHEP::Hep3Vector* newVertex();
0027   HepMC::FourVector newVertex(CLHEP::HepRandomEngine*) const override;
0028 
0029   TMatrixD const* GetInvLorentzBoost() const override { return nullptr; }
0030 
0031   /// set resolution in X in cm
0032   void sigmaX(double s = 1.0);
0033   /// set resolution in Y in cm
0034   void sigmaY(double s = 1.0);
0035   /// set resolution in Z in cm
0036   void sigmaZ(double s = 1.0);
0037 
0038   /// set mean in X in cm
0039   void meanX(double m = 0) { fMeanX = m; }
0040   /// set mean in Y in cm
0041   void meanY(double m = 0) { fMeanY = m; }
0042   /// set mean in Z in cm
0043   void meanZ(double m = 0) { fMeanZ = m; }
0044 
0045 private:
0046   double fSigmaX, fSigmaY, fSigmaZ;
0047   double fMeanX, fMeanY, fMeanZ;
0048   double fTimeOffset;
0049 };
0050 
0051 #endif