CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/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: 2012/01/17 11:58:52 $
00005 *   $Revision: 1.9 $
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    virtual void beginRun( edm::Run & , const edm::EventSetup&) {};
00038 
00039    //virtual CLHEP::Hep3Vector* newVertex() = 0;
00040    virtual HepMC::FourVector* newVertex() = 0 ;
00044    //virtual CLHEP::Hep3Vector* lastVertex() { return fVertex; }
00045    virtual HepMC::FourVector* lastVertex() { return fVertex; }
00046    
00047    virtual TMatrixD* GetInvLorentzBoost() = 0;
00048    
00049    protected:
00050 
00051    // Returns a reference to encourage users to use a reference
00052    // when initializing CLHEP distributions.  If a pointer
00053    // is used, then the distribution thinks it owns the engine
00054    // and will delete the engine when the distribution is destroyed
00055    // (a big problem since the distribution does not own the memory).
00056    CLHEP::HepRandomEngine& getEngine();
00057 
00058    //CLHEP::Hep3Vector*       fVertex;
00059    HepMC::FourVector*       fVertex ;
00060    TMatrixD *boost_;
00061    double fTimeOffset;
00062    
00063    private :
00064 
00065    CLHEP::HepRandomEngine*  fEngine;
00066    edm::InputTag            sourceLabel;
00067    
00068 };
00069 
00070 #endif