39 : beamSpotOutputBase_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
40 .getUntrackedParameter<
std::
string>(
"BeamSpotOutputBase")),
41 outputrecordName_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
42 .getUntrackedParameter<
std::
string>(
"outputRecordName",
"BeamSpotObjectsRcd")),
43 sigmaZValue_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
44 .getUntrackedParameter<double>(
"SigmaZValue")),
45 sigmaZCut_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
46 .getUntrackedParameter<double>(
"SigmaZCut")),
48 iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
bool>(
"DumpTxt")),
49 outTxtFileName_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
50 .getUntrackedParameter<
std::
string>(
"TxtFileName")),
51 theAlcaBeamSpotManager_(iConfig, consumesCollector()) {}
67 std::map<edm::LuminosityBlockNumber_t, std::pair<edm::Timestamp, reco::BeamSpot>> beamSpotMap =
74 outFile.open(outTxt.c_str(), std::ios::app);
79 aBeamSpot.
setType(
it->second.second.type());
80 aBeamSpot.
setPosition(
it->second.second.x0(),
it->second.second.y0(),
it->second.second.z0());
86 aBeamSpot.
setdxdz(
it->second.second.dxdz());
87 aBeamSpot.
setdydz(
it->second.second.dydz());
94 for (
int i = 0;
i < 7; ++
i) {
95 for (
int j = 0;
j < 7; ++
j) {
122 std::time_t lumi_t_begin =
it->second.first.unixTime();
123 std::time_t lumi_t_end =
it->second.first.unixTime();
128 currentBS.
reftime[0] = lumi_t_begin;
129 currentBS.
reftime[1] = lumi_t_end;
132 edm::LogInfo(
"AlcaBeamSpotHarvester") <<
"new tag requested" << std::endl;
139 std::map<std::string, std::string> jrInfo;
146 edm::LogInfo(
"AlcaBeamSpotHarvester") <<
"no new tag requested, appending IOV" << std::endl;
void setCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
void setEmittanceY(double val)
set emittance
std::string beamSpotOutputBase_
void beginRun(const edm::Run &, const edm::EventSetup &) override
void setBetaStar(double val)
set beta star
std::string outTxtFileName_
std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > >::iterator bsMap_iterator
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
void setType(int type)
set beam type
AlcaBeamSpotHarvester(const edm::ParameterSet &)
Constructor.
void setEmittanceX(double val)
set emittance
unsigned long long Time_t
bool isNewTagRequest(const std::string &recordName)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void setdydz(double val)
set dydz slope, crossing angle in XZ
Hash writeOneIOV(const T &payload, Time_t time, const std::string &recordName)
#define DEFINE_FWK_MODULE(type)
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void setdxdz(double val)
set dxdz slope, crossing angle
void createWeightedPayloads(void)
Log< level::Info, false > LogInfo
void readLumi(const edm::LuminosityBlock &)
void setSigmaZ(double val)
set sigma Z, RMS bunch length
AlcaBeamSpotManager theAlcaBeamSpotManager_
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
void setPosition(double x, double y, double z)
set XYZ position
void setBeamWidthX(double val)
set average transverse beam width X
void dumpBeamSpotTxt(std::ofstream &outFile, BeamSpotContainer const &bsContainer)
std::string outputrecordName_
void setBeamWidthY(double val)
set average transverse beam width Y
const std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > > & getPayloads(void)