#include <AlcaBeamSpotFromDB.h>
Public Member Functions | |
AlcaBeamSpotFromDB (const edm::ParameterSet &) | |
~AlcaBeamSpotFromDB () | |
Private Member Functions | |
virtual void | beginJob () |
virtual void | beginLuminosityBlock (edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup) |
virtual void | endJob () |
virtual void | endLuminosityBlock (edm::LuminosityBlock &lumiSeg, const edm::EventSetup &iSetup) |
virtual void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
_________________________________________________________________ class: AlcaBeamSpotFromDB.h package: RecoVertex/TkAlCaRecoProducers
author: Francisco Yumiceva, Fermilab (yumiceva@fnal.gov)
version
________________________________________________________________
Definition at line 25 of file AlcaBeamSpotFromDB.h.
AlcaBeamSpotFromDB::AlcaBeamSpotFromDB | ( | const edm::ParameterSet & | iConfig | ) | [explicit] |
_________________________________________________________________ class: AlcaBeamSpotFromDB.cc package: RecoVertex/BeamSpotProducer
author: Francisco Yumiceva, Fermilab (yumiceva@fnal.gov)
version
________________________________________________________________
Definition at line 33 of file AlcaBeamSpotFromDB.cc.
{
produces<reco::BeamSpot, edm::InLumi>("alcaBeamSpot");
}
AlcaBeamSpotFromDB::~AlcaBeamSpotFromDB | ( | ) |
Definition at line 40 of file AlcaBeamSpotFromDB.cc.
{ }
void AlcaBeamSpotFromDB::beginJob | ( | void | ) | [private, virtual] |
void AlcaBeamSpotFromDB::beginLuminosityBlock | ( | edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
void AlcaBeamSpotFromDB::endJob | ( | void | ) | [private, virtual] |
void AlcaBeamSpotFromDB::endLuminosityBlock | ( | edm::LuminosityBlock & | lumiSeg, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |
Reimplemented from edm::EDProducer.
Definition at line 56 of file AlcaBeamSpotFromDB.cc.
References align::BeamSpot, gather_cfg::cout, reco::BeamSpot::Fake, edm::EventSetup::get(), BeamSpotObjects::GetBeamType(), BeamSpotObjects::GetBeamWidthX(), BeamSpotObjects::GetBeamWidthY(), BeamSpotObjects::GetBetaStar(), BeamSpotObjects::GetCovariance(), BeamSpotObjects::Getdxdz(), BeamSpotObjects::Getdydz(), BeamSpotObjects::GetEmittanceX(), BeamSpotObjects::GetEmittanceY(), BeamSpotObjects::GetSigmaZ(), BeamSpotObjects::GetX(), BeamSpotObjects::GetY(), BeamSpotObjects::GetZ(), i, j, edm::ESHandle< T >::product(), edm::LuminosityBlock::put(), query::result, reco::BeamSpot::setBeamWidthY(), reco::BeamSpot::setbetaStar(), reco::BeamSpot::setEmittanceX(), reco::BeamSpot::setEmittanceY(), reco::BeamSpot::setType(), and reco::BeamSpot::Tracker.
{ // read DB object edm::ESHandle< BeamSpotObjects > beamhandle; iSetup.get<BeamSpotObjectsRcd>().get(beamhandle); const BeamSpotObjects *spotDB = beamhandle.product(); // translate from BeamSpotObjects to reco::BeamSpot reco::BeamSpot::Point apoint( spotDB->GetX(), spotDB->GetY(), spotDB->GetZ() ); reco::BeamSpot::CovarianceMatrix matrix; for ( int i=0; i<7; ++i ) { for ( int j=0; j<7; ++j ) { matrix(i,j) = spotDB->GetCovariance(i,j); } } reco::BeamSpot aSpot; // this assume beam width same in x and y aSpot = reco::BeamSpot( apoint, spotDB->GetSigmaZ(), spotDB->Getdxdz(), spotDB->Getdydz(), spotDB->GetBeamWidthX(), matrix ); aSpot.setBeamWidthY( spotDB->GetBeamWidthY() ); aSpot.setEmittanceX( spotDB->GetEmittanceX() ); aSpot.setEmittanceY( spotDB->GetEmittanceY() ); aSpot.setbetaStar( spotDB->GetBetaStar() ); if ( spotDB->GetBeamType() == 2 ) { aSpot.setType( reco::BeamSpot::Tracker ); } else{ aSpot.setType( reco::BeamSpot::Fake ); } std::auto_ptr<reco::BeamSpot> result(new reco::BeamSpot); *result = aSpot; lumiSeg.put(result, std::string("alcaBeamSpot")); //std::cout << " for runs: " << iEvent.id().run() << " - " << iEvent.id().run() << std::endl; std::cout << aSpot << std::endl; }
void AlcaBeamSpotFromDB::produce | ( | edm::Event & | iEvent, |
const edm::EventSetup & | iSetup | ||
) | [private, virtual] |