CMS 3D CMS Logo

Classes | Functions
beamspot Namespace Reference

Classes

struct  BeamSpotContainer
 

Functions

void dumpBeamSpotTxt (std::ofstream &outFile, BeamSpotContainer const &bsContainer)
 

Function Documentation

void beamspot::dumpBeamSpotTxt ( std::ofstream &  outFile,
BeamSpotContainer const &  bsContainer 
)

Definition at line 20 of file BeamSpotWrite2Txt.h.

References beamspot::BeamSpotContainer::beamspot, reco::BeamSpot::BeamWidthX(), reco::BeamSpot::BeamWidthY(), beamspot::BeamSpotContainer::beginLumiOfFit, beamspot::BeamSpotContainer::beginTimeOfFit, reco::BeamSpot::betaStar(), reco::BeamSpot::covariance(), reco::BeamSpot::dxdz(), reco::BeamSpot::dydz(), reco::BeamSpot::emittanceX(), reco::BeamSpot::emittanceY(), beamspot::BeamSpotContainer::endLumiOfFit, beamspot::BeamSpotContainer::endTimeOfFit, mps_fire::i, dqmiolumiharvest::j, beamspot::BeamSpotContainer::reftime, beamspot::BeamSpotContainer::run, reco::BeamSpot::sigmaZ(), reco::BeamSpot::type(), reco::BeamSpot::x0(), reco::BeamSpot::y0(), and reco::BeamSpot::z0().

Referenced by BeamFitter::dumpTxtFile(), and AlcaBeamSpotHarvester::endRun().

20  {
21  outFile << "Runnumber " << bsContainer.run << std::endl;
22  outFile << "BeginTimeOfFit " << bsContainer.beginTimeOfFit << " " << bsContainer.reftime[0] << std::endl;
23  outFile << "EndTimeOfFit " << bsContainer.endTimeOfFit << " " << bsContainer.reftime[1] << std::endl;
24  outFile << "LumiRange " << bsContainer.beginLumiOfFit << " - " << bsContainer.endLumiOfFit << std::endl;
25  outFile << "Type " << bsContainer.beamspot.type() << std::endl;
26  outFile << "X0 " << bsContainer.beamspot.x0() << std::endl;
27  outFile << "Y0 " << bsContainer.beamspot.y0() << std::endl;
28  outFile << "Z0 " << bsContainer.beamspot.z0() << std::endl;
29  outFile << "sigmaZ0 " << bsContainer.beamspot.sigmaZ() << std::endl;
30  outFile << "dxdz " << bsContainer.beamspot.dxdz() << std::endl;
31  outFile << "dydz " << bsContainer.beamspot.dydz() << std::endl;
32  outFile << "BeamWidthX " << bsContainer.beamspot.BeamWidthX() << std::endl;
33  outFile << "BeamWidthY " << bsContainer.beamspot.BeamWidthY() << std::endl;
34  for (int i = 0; i < 6; ++i) {
35  outFile << "Cov(" << i << ",j) ";
36  for (int j = 0; j < 7; ++j) {
37  outFile << bsContainer.beamspot.covariance(i, j) << " ";
38  }
39  outFile << std::endl;
40  }
41  // Uncertainties on sigmaX and sigmaY are set to be equal. Legacy from a distant past
42  outFile << "Cov(6,j) 0 0 0 0 0 0 " << bsContainer.beamspot.covariance(6, 6) << std::endl;
43  outFile << "EmittanceX " << bsContainer.beamspot.emittanceX() << std::endl;
44  outFile << "EmittanceY " << bsContainer.beamspot.emittanceY() << std::endl;
45  outFile << "BetaStar " << bsContainer.beamspot.betaStar() << std::endl;
46  }