CMS 3D CMS Logo

WeightManager.h
Go to the documentation of this file.
1 #ifndef Validation_EventGenerator_WeightManager
2 #define Validation_EventGenerator_WeightManager
3 
4 // Utility class, that computes the event weight,
5 // either returning the weight as stored in the HepMCCollection
6 // or returning the product of the weights stored in
7 // a vector of GenEventInfoProducts
8 
12 
14 #include <vector>
15 
16 namespace edm {
17  class ParameterSet;
18  class Event;
19 } // namespace edm
20 
22 public:
25 
26  double weight(const edm::Event&);
27  std::vector<std::vector<double>> weightsCollection(const edm::Event&);
28 
29 private:
30  bool _useHepMC;
31  std::vector<edm::InputTag> _genEventInfos;
33 
35  std::vector<edm::EDGetTokenT<GenEventInfoProduct>> genEventInfosTokens_;
36 };
37 
38 #endif
std::vector< edm::InputTag > _genEventInfos
Definition: WeightManager.h:31
edm::InputTag _hepmcCollection
Definition: WeightManager.h:32
std::vector< edm::EDGetTokenT< GenEventInfoProduct > > genEventInfosTokens_
Definition: WeightManager.h:35
edm::EDGetTokenT< edm::HepMCProduct > hepmcCollectionToken_
Definition: WeightManager.h:34
WeightManager(const edm::ParameterSet &, edm::ConsumesCollector iC)
HLT enums.
std::vector< std::vector< double > > weightsCollection(const edm::Event &)
double weight(const edm::Event &)