Public Member Functions | |
GenEventRunInfoProducer (const edm::ParameterSet &) | |
constructor | |
Private Member Functions | |
void | produce (edm::Event &evt, const edm::EventSetup &es) |
Private Attributes | |
edm::InputTag | src_ |
Save the cross section and filter efficiency info from the RUN section into the EVENT Workaround for CSA07.
Definition at line 17 of file GenEventRunInfoProducer.cc.
GenEventRunInfoProducer::GenEventRunInfoProducer | ( | const edm::ParameterSet & | p | ) |
constructor
Definition at line 38 of file GenEventRunInfoProducer.cc.
00038 : 00039 src_( p.getParameter<InputTag>( "src" ) ) { 00040 produces<double>("AutoCrossSection"); 00041 produces<double>("PreCalculatedCrossSection"); 00042 produces<double>("FilterEfficiency"); 00043 }
void GenEventRunInfoProducer::produce | ( | edm::Event & | evt, | |
const edm::EventSetup & | es | |||
) | [private, virtual] |
Implements edm::EDProducer.
Definition at line 46 of file GenEventRunInfoProducer.cc.
References cs1, cs2, edm::DataViewImpl::getByLabel(), edm::Event::getRun(), edm::Event::put(), and src_.
00046 { 00047 00048 // get the run info 00049 Handle<GenInfoProduct> gi; 00050 evt.getRun().getByLabel( src_, gi); 00051 00052 auto_ptr<double> cs1( new double(1) ); 00053 auto_ptr<double> cs2( new double(1) ); 00054 auto_ptr<double> eff( new double(1) ); 00055 00056 double cross_section1 = gi->cross_section(); // automatically calculated at the end of the Pythia/Herwig run 00057 double cross_section2 = gi->external_cross_section(); // is the precalculated one written in the cfg file -- units is pb!! 00058 double filter_eff = gi->filter_efficiency(); 00059 00060 (*cs1) = cross_section1; 00061 (*cs2) = cross_section2; 00062 (*eff) = filter_eff; 00063 evt.put( cs1, "AutoCrossSection" ); 00064 evt.put( cs2, "PreCalculatedCrossSection" ); 00065 evt.put( eff, "FilterEfficiency" ); 00066 00067 }
edm::InputTag GenEventRunInfoProducer::src_ [private] |