CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/IOMC/EventVertexGenerators/interface/BaseEvtVtxGenerator.h

Go to the documentation of this file.
00001 #ifndef IOMC_BaseEvtVtxGenerator_H
00002 #define IOMC_BaseEvtVtxGenerator_H
00003 /*
00004 *   $Date: 2010/02/11 00:12:31 $
00005 *   $Revision: 1.8 $
00006 */
00007 
00008 #include "FWCore/Framework/interface/EDProducer.h"
00009 #include "FWCore/Utilities/interface/InputTag.h"
00010 
00011 #include "TMatrixD.h"
00012 
00013 /*
00014 namespace HepMC {
00015    class GenEvent;
00016 }
00017 */
00018 
00019 namespace HepMC {
00020    class FourVector ;
00021 }
00022 
00023 namespace CLHEP {
00024    //class Hep3Vector;
00025    class HepRandomEngine;
00026 }
00027 
00028 class BaseEvtVtxGenerator : public edm::EDProducer
00029 {
00030    public:
00031       
00032    // ctor & dtor
00033    explicit BaseEvtVtxGenerator( const edm::ParameterSet& );
00034    virtual ~BaseEvtVtxGenerator();
00035       
00036    virtual void produce( edm::Event&, const edm::EventSetup& );
00037       
00038    //virtual CLHEP::Hep3Vector* newVertex() = 0;
00039    virtual HepMC::FourVector* newVertex() = 0 ;
00043    //virtual CLHEP::Hep3Vector* lastVertex() { return fVertex; }
00044    virtual HepMC::FourVector* lastVertex() { return fVertex; }
00045    
00046    virtual TMatrixD* GetInvLorentzBoost() = 0;
00047    
00048    protected:
00049 
00050    // Returns a reference to encourage users to use a reference
00051    // when initializing CLHEP distributions.  If a pointer
00052    // is used, then the distribution thinks it owns the engine
00053    // and will delete the engine when the distribution is destroyed
00054    // (a big problem since the distribution does not own the memory).
00055    CLHEP::HepRandomEngine& getEngine();
00056 
00057    //CLHEP::Hep3Vector*       fVertex;
00058    HepMC::FourVector*       fVertex ;
00059    TMatrixD *boost_;
00060    double fTimeOffset;
00061    
00062    private :
00063 
00064    CLHEP::HepRandomEngine*  fEngine;
00065    edm::InputTag            sourceLabel;
00066    
00067 };
00068 
00069 #endif