UserUtils
Public Member Functions | Private Member Functions | Private Attributes | List of all members
WeightProdSum Class Reference
Inheritance diagram for WeightProdSum:

Detailed Description

In HEP analysis, simulated events are typically weighted by various scale factors. and the actual "number of events" represented by a single simulated event would be product of all the various scale events. This plugin does just that: given a list of weight to use, calculated the product of all the weights, storing the per-event weight product, and also saving the sum of the weight product per run.

Public Member Functions

 WeightProdSum (const edm::ParameterSet &)
 

Private Member Functions

virtual void beginRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endRun (const edm::Run &, const edm::EventSetup &) override
 
virtual void endRunProduce (edm::Run &, const edm::EventSetup &) override
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::vector< edm::EDGetToken > _weightsrclist
 
edm::Handle< double > _weighthandle
 
double _weightsum
 

Constructor & Destructor Documentation

◆ WeightProdSum()

WeightProdSum::WeightProdSum ( const edm::ParameterSet &  iConfig)
explicit

Construction expects the a parameter of type vInputTag, listing the doubles to be used in the product calculation. The weight product per-event would be stored under the label "WeightProd", and the sum of weight products stored at run level would be under the object label "WeightSum" (requires the usr::Counter class to read).


The documentation for this class was generated from the following file: