File indexing completed on 2024-04-06 12:13:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef gen_EvtGenInterface_h
0011 #define gen_EvtGenInterface_h
0012
0013 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0014 #include <memory>
0015 #include <string>
0016 #include <vector>
0017
0018 #include "EvtGenBase/EvtParticle.hh"
0019
0020 #include "FWCore/Framework/interface/Frameworkfwd.h"
0021
0022 #include "FWCore/Utilities/interface/RandomNumberGenerator.h"
0023 #include "GeneratorInterface/EvtGenInterface/interface/EvtGenInterfaceBase.h"
0024
0025 class myEvtRandomEngine;
0026
0027 namespace HepMC {
0028 class GenParticle;
0029 class GenEvent;
0030 }
0031
0032 class EvtId;
0033 class EvtGen;
0034
0035 namespace gen {
0036 class EvtGenInterface : public EvtGenInterfaceBase {
0037 public:
0038
0039 EvtGenInterface(const edm::ParameterSet&);
0040 ~EvtGenInterface() override;
0041
0042 void init() override;
0043 const std::vector<int>& operatesOnParticles() override { return m_PDGs; }
0044 HepMC::GenEvent* decay(HepMC::GenEvent*) override;
0045 void setRandomEngine(CLHEP::HepRandomEngine* v) override;
0046 static double flat();
0047
0048 private:
0049 bool addToHepMC(HepMC::GenParticle* partHep, const EvtId& idEvt, HepMC::GenEvent* theEvent, bool del_daug);
0050 void update_particles(HepMC::GenParticle* partHep, HepMC::GenEvent* theEvent, HepMC::GenParticle* p);
0051 void SetDefault_m_PDGs();
0052 bool findLastinChain(HepMC::GenParticle*& p);
0053 bool hasnoDaughter(HepMC::GenParticle* p);
0054 void go_through_daughters(EvtParticle* part);
0055
0056 EvtGen* m_EvtGen;
0057
0058 std::vector<EvtId> forced_id;
0059 std::vector<int> forced_pdgids;
0060
0061 std::vector<int> ignore_pdgids;
0062
0063
0064 std::vector<int> polarize_ids;
0065 std::vector<double> polarize_pol;
0066 std::map<int, float> polarizations;
0067 int BmixingOption = 1;
0068 edm::ParameterSet* fPSet;
0069
0070 static CLHEP::HepRandomEngine* fRandomEngine;
0071 myEvtRandomEngine* the_engine;
0072 };
0073 }
0074 #endif