CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions | Public Attributes

GetLumi Class Reference

#include <GetLumi.h>

List of all members.

Public Member Functions

 GetLumi (const edm::ParameterSet &)
 GetLumi (edm::InputTag, double)
double getRawValue (const edm::Event &)
double getValue (const edm::Event &)
virtual ~GetLumi ()

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)

Public Attributes

edm::InputTag lumiInputTag_
double lumiScale_

Detailed Description

Definition at line 16 of file GetLumi.h.


Constructor & Destructor Documentation

GetLumi::GetLumi ( const edm::ParameterSet iConfig)

Definition at line 14 of file GetLumi.cc.

  : lumiInputTag_ ( iConfig.getParameter<edm::InputTag>("lumi")  )
  , lumiScale_    ( iConfig.getParameter<double>("lumiScale")    )
{
}
GetLumi::GetLumi ( edm::InputTag  lumiInputTag,
double  lumiScale 
)

Definition at line 20 of file GetLumi.cc.

  : lumiInputTag_ ( lumiInputTag )
  , lumiScale_    ( lumiScale    )
{
}
GetLumi::~GetLumi ( ) [virtual]

Definition at line 26 of file GetLumi.cc.

{
}

Member Function Documentation

static void GetLumi::fillDescriptions ( edm::ConfigurationDescriptions descriptions) [static]
double GetLumi::getRawValue ( const edm::Event iEvent)

Definition at line 31 of file GetLumi.cc.

References edm::EventBase::bunchCrossing(), edm::Event::getLuminosityBlock(), edm::HandleBase::isValid(), LumiDetails::kOCC1, fjr2json::lumi, and lumiInputTag_.

Referenced by getValue().

{

  // taken from 
  // DPGAnalysis/SiStripTools/src/DigiLumiCorrHistogramMaker.cc
  // the scale factor 6.37 should follow the lumi prescriptions
  edm::Handle<LumiDetails> lumi;
  iEvent.getLuminosityBlock().getByLabel(lumiInputTag_,lumi);

  double bxlumi = 0;
  if(lumi->isValid()) {
    bxlumi = lumi->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing());
  }

  return bxlumi;

}
double GetLumi::getValue ( const edm::Event iEvent)

Definition at line 51 of file GetLumi.cc.

References getRawValue(), and lumiScale_.

Referenced by VertexMonitor::analyze(), TrackingMonitor::analyze(), and LogMessageMonitor::analyze().

{
  //    bxlumi = lumi->lumiValue(LumiDetails::kOCC1,iEvent.bunchCrossing())*6.37;
  return getRawValue(iEvent)*lumiScale_;
}

Member Data Documentation

Definition at line 28 of file GetLumi.h.

Referenced by getRawValue().

Definition at line 29 of file GetLumi.h.

Referenced by getValue().