40 beamSpotOutputBase_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
std::
string>(
"BeamSpotOutputBase")),
41 outputrecordName_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
std::
string>(
"outputRecordName",
"BeamSpotObjectsRcd")),
42 sigmaZValue_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<double>(
"SigmaZValue")),
43 sigmaZCut_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<double>(
"SigmaZCut")),
44 dumpTxt_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
bool>(
"DumpTxt")),
45 outTxtFileName_ (iConfig.getParameter<
ParameterSet>(
"AlcaBeamSpotHarvesterParameters").getUntrackedParameter<
std::
string>(
"TxtFileName")),
46 theAlcaBeamSpotManager_(iConfig, consumesCollector()) {
80 outFile.open(outTxt.c_str(),std::ios::app);
85 aBeamSpot->
SetType(it->second.second.type());
86 aBeamSpot->
SetPosition(it->second.second.x0(),it->second.second.y0(),it->second.second.z0());
88 aBeamSpot->
SetSigmaZ(it->second.second.sigmaZ());
93 aBeamSpot->
Setdxdz(it->second.second.dxdz());
94 aBeamSpot->
Setdydz(it->second.second.dydz());
99 aBeamSpot->
SetBetaStar(it->second.second.betaStar() );
101 for (
int i=0;
i<7; ++
i) {
102 for (
int j=0; j<7; ++j) {
130 std::time_t lumi_t_begin = it ->
second.first.unixTime();
131 std::time_t lumi_t_end = it ->
second.first.unixTime();
135 currentBS.
reftime[0] = lumi_t_begin;
136 currentBS.
reftime[1] = lumi_t_end;
141 <<
"new tag requested" << std::endl;
150 std::map<std::string, std::string> jrInfo;
160 <<
"no new tag requested, appending IOV" << std::endl;
std::string beamSpotOutputBase_
#define DEFINE_FWK_MODULE(type)
void beginRun(const edm::Run &, const edm::EventSetup &) override
void SetSigmaZ(double val)
set sigma Z, RMS bunch length
std::string outTxtFileName_
void analyze(const edm::Event &, const edm::EventSetup &) override
void endRun(const edm::Run &, const edm::EventSetup &) override
void SetCovariance(int i, int j, double val)
set i,j element of the full covariance matrix 7x7
void Setdydz(double val)
set dydz slope, crossing angle in XZ
std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > >::iterator bsMap_iterator
AlcaBeamSpotHarvester(const edm::ParameterSet &)
Constructor.
U second(std::pair< T, U > const &p)
void endJob(void) override
unsigned long long Time_t
bool isNewTagRequest(const std::string &recordName)
void beginLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void SetEmittanceX(double val)
set emittance
~AlcaBeamSpotHarvester() override
Destructor.
void writeOne(T *payload, Time_t time, const std::string &recordName, bool withlogging=false)
void Setdxdz(double val)
set dxdz slope, crossing angle
void endLuminosityBlock(const edm::LuminosityBlock &, const edm::EventSetup &) override
void createWeightedPayloads(void)
void SetBetaStar(double val)
set beta star
void readLumi(const edm::LuminosityBlock &)
void SetType(int type)
set beam type
void SetEmittanceY(double val)
set emittance
void SetBeamWidthX(double val)
set average transverse beam width X
void SetBeamWidthY(double val)
set average transverse beam width Y
void beginJob(void) override
AlcaBeamSpotManager theAlcaBeamSpotManager_
void reportAnalysisFile(std::string const &fileName, std::map< std::string, std::string > const &fileData)
void dumpBeamSpotTxt(std::ofstream &outFile, BeamSpotContainer const &bsContainer)
std::string outputrecordName_
const std::map< edm::LuminosityBlockNumber_t, std::pair< edm::Timestamp, reco::BeamSpot > > & getPayloads(void)
void SetPosition(double x, double y, double z)
set XYZ position