CMS 3D CMS Logo

GenEventRunInfoProducer Class Reference

Author:
Liz,Oliver,Filip
More...

Inheritance diagram for GenEventRunInfoProducer:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

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_


Detailed Description

Author:
Liz,Oliver,Filip

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.


Constructor & Destructor Documentation

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 }


Member Function Documentation

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 }


Member Data Documentation

edm::InputTag GenEventRunInfoProducer::src_ [private]

Definition at line 24 of file GenEventRunInfoProducer.cc.

Referenced by produce().


The documentation for this class was generated from the following file:
Generated on Tue Jun 9 18:21:12 2009 for CMSSW by  doxygen 1.5.4