File indexing completed on 2024-09-08 23:52:06
0001 #ifndef Validation_EventGenerator_WeightManager
0002 #define Validation_EventGenerator_WeightManager
0003
0004
0005
0006
0007
0008
0009 #include "FWCore/Utilities/interface/InputTag.h"
0010 #include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h"
0011 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h"
0012
0013 #include "FWCore/Framework/interface/ConsumesCollector.h"
0014 #include <vector>
0015
0016 namespace edm {
0017 class ParameterSet;
0018 class Event;
0019 }
0020
0021 class WeightManager {
0022 public:
0023 WeightManager(const edm::ParameterSet&, edm::ConsumesCollector iC);
0024 ~WeightManager() {}
0025
0026 double weight(const edm::Event&);
0027 std::vector<std::vector<double>> weightsCollection(const edm::Event&);
0028
0029 private:
0030 bool _useHepMC;
0031 std::vector<edm::InputTag> _genEventInfos;
0032 edm::InputTag _hepmcCollection;
0033
0034 edm::EDGetTokenT<edm::HepMCProduct> hepmcCollectionToken_;
0035 std::vector<edm::EDGetTokenT<GenEventInfoProduct>> genEventInfosTokens_;
0036 };
0037
0038 #endif