|
|
Go to the documentation of this file.
40 : beamSpotOutputBase_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
41 .getUntrackedParameter<
std::
string>(
"BeamSpotOutputBase")),
42 outputrecordName_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
43 .getUntrackedParameter<
std::
string>(
"outputRecordName",
"BeamSpotObjectsRcd")),
44 sigmaZValue_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
45 .getUntrackedParameter<double>(
"SigmaZValue")),
46 sigmaZCut_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
47 .getUntrackedParameter<double>(
"SigmaZCut")),
49 iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
bool>(
"DumpTxt")),
50 outTxtFileName_(iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters")
51 .getUntrackedParameter<
std::
string>(
"TxtFileName")),
52 theAlcaBeamSpotManager_(iConfig, consumesCollector()) {}
77 std::map<edm::LuminosityBlockNumber_t, std::pair<edm::Timestamp, reco::BeamSpot>> beamSpotMap =
84 outFile.open(outTxt.c_str(), std::ios::app);
89 aBeamSpot->
SetType(it->second.second.type());
90 aBeamSpot->
SetPosition(it->second.second.x0(), it->second.second.y0(), it->second.second.z0());
92 aBeamSpot->
SetSigmaZ(it->second.second.sigmaZ());
96 aBeamSpot->
Setdxdz(it->second.second.dxdz());
97 aBeamSpot->
Setdydz(it->second.second.dydz());
102 aBeamSpot->
SetBetaStar(it->second.second.betaStar());
104 for (
int i = 0;
i < 7; ++
i) {
105 for (
int j = 0;
j < 7; ++
j) {
127 currentBS.
beamspot = it->second.second;
132 std::time_t lumi_t_begin = it->second.first.unixTime();
133 std::time_t lumi_t_end = it->second.first.unixTime();
138 currentBS.
reftime[0] = lumi_t_begin;
139 currentBS.
reftime[1] = lumi_t_end;
142 edm::LogInfo(
"AlcaBeamSpotHarvester") <<
"new tag requested" << std::endl;
154 std::map<std::string, std::string> jrInfo;
161 edm::LogInfo(
"AlcaBeamSpotHarvester") <<
"no new tag requested, appending IOV" << std::endl;
std::string beamSpotOutputBase_
void beginRun(const edm::Run &, const edm::EventSetup &) override
void SetBetaStar(double val)
set beta star
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
void SetBeamWidthY(double val)
set average transverse beam width Y
Log< level::Info, false > LogInfo
std::string outputrecordName_
void SetSigmaZ(double val)
set sigma Z, RMS bunch length
void createWeightedPayloads(void)
void readLumi(const edm::LuminosityBlock &)
#define DEFINE_FWK_MODULE(type)
void dumpBeamSpotTxt(std::ofstream &outFile, BeamSpotContainer const &bsContainer)
void SetEmittanceY(double val)
set emittance
const std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > > & getPayloads(void)
AlcaBeamSpotManager theAlcaBeamSpotManager_
AlcaBeamSpotHarvester(const edm::ParameterSet &)
Constructor.
void SetPosition(double x, double y, double z)
set XYZ position
void SetType(int type)
set beam type
void SetEmittanceX(double val)
set emittance
void SetCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
unsigned long long Time_t
void endJob(void) override
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void Setdxdz(double val)
set dxdz slope, crossing angle
std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > >::iterator bsMap_iterator
Hash writeOne(const T *payload, Time_t time, const std::string &recordName)
void SetBeamWidthX(double val)
set average transverse beam width X
~AlcaBeamSpotHarvester() override
Destructor.
void beginJob(void) override
bool isNewTagRequest(const std::string &recordName)
std::string outTxtFileName_
void Setdydz(double val)
set dydz slope, crossing angle in XZ
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override