Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:00

0001 #ifndef IOMC_BaseEvtVtxGenerator_H
0002 #define IOMC_BaseEvtVtxGenerator_H
0003 /*
0004 */
0005 
0006 #include "FWCore/Framework/interface/stream/EDProducer.h"
0007 #include "FWCore/Utilities/interface/EDGetToken.h"
0008 
0009 #include "TMatrixD.h"
0010 
0011 namespace HepMC {
0012   class FourVector;
0013 }
0014 
0015 namespace CLHEP {
0016   class HepRandomEngine;
0017 }
0018 
0019 namespace edm {
0020   class HepMCProduct;
0021 }
0022 
0023 class BaseEvtVtxGenerator : public edm::stream::EDProducer<> {
0024 public:
0025   // ctor & dtor
0026   explicit BaseEvtVtxGenerator(const edm::ParameterSet&);
0027   ~BaseEvtVtxGenerator() override;
0028 
0029   void produce(edm::Event&, const edm::EventSetup&) override;
0030 
0031   virtual HepMC::FourVector newVertex(CLHEP::HepRandomEngine*) const = 0;
0032   /** This method - and the comment - is a left-over from COBRA-OSCAR time :
0033     *  return the last generated event vertex.
0034     *  If no vertex has been generated yet, a NULL pointer is returned. */
0035   //virtual CLHEP::Hep3Vector* lastVertex() { return fVertex; }
0036   //virtual HepMC::FourVector* lastVertex() { return fVertex; }
0037 
0038   virtual TMatrixD const* GetInvLorentzBoost() const = 0;
0039 
0040 private:
0041   edm::EDGetTokenT<edm::HepMCProduct> sourceToken;
0042 };
0043 
0044 #endif