CMS 3D CMS Logo

QGLikelihoodSystematicsDBReader.cc
Go to the documentation of this file.
1 #include <memory>
12 
14 public:
17 
18 private:
19  void beginJob() override{};
20  void analyze(const edm::Event&, const edm::EventSetup&) override;
21  void endJob() override{};
22 
25 };
26 
28  mPayloadName = iConfig.getUntrackedParameter<std::string>("payloadName");
29  mPrintScreen = iConfig.getUntrackedParameter<bool>("printScreen");
30  mCreateTextFile = iConfig.getUntrackedParameter<bool>("createTextFile");
31 }
32 
34  edm::LogInfo("UserOutput") << "Inspecting QGLikelihood payload with label:" << mPayloadName << std::endl;
36  QGLikelihoodSystematicsRcd const& rcdhandle = iSetup.get<QGLikelihoodSystematicsRcd>();
37  rcdhandle.get(mPayloadName, QGLSysPar);
38 
39  std::vector<QGLikelihoodSystematicsObject::Entry> const& data = QGLSysPar->data;
40  edm::LogInfo("UserOutput") << "There are " << data.size()
41  << " entries (categories with parameters for smearing):" << std::endl;
42  for (auto idata = data.begin(); idata != data.end(); ++idata) {
43  int qgBin = idata->systCategory.QGIndex;
44  double etaMin = idata->systCategory.EtaMin;
45  double etaMax = idata->systCategory.EtaMax;
46  double rhoMin = idata->systCategory.RhoMin;
47  double rhoMax = idata->systCategory.RhoMax;
48  double ptMin = idata->systCategory.PtMin;
49  double ptMax = idata->systCategory.PtMax;
50  double a = idata->a;
51  double b = idata->b;
52  double lmin = idata->lmin;
53  double lmax = idata->lmax;
54 
55  char buff[1000];
56  sprintf(buff,
57  "qg=%1d, ptMin=%8.2f, ptMax=%8.2f, etaMin=%3.1f, etaMax=%3.1f, rhoMin=%6.2f, rhoMax=%6.2f, a=%7.3f, "
58  "b=%7.3f, lmin=%6.2f, lmax=%6.2f",
59  qgBin,
60  ptMin,
61  ptMax,
62  etaMin,
63  etaMax,
64  rhoMin,
65  rhoMax,
66  a,
67  b,
68  lmin,
69  lmax);
70  edm::LogVerbatim("UserOutput") << buff << std::endl;
71  }
72 }
73 
QGLikelihoodSystematicsRcd
Definition: QGLikelihoodSystematicsRcd.h:23
ALCARECOTkAlBeamHalo_cff.etaMin
etaMin
GeV.
Definition: ALCARECOTkAlBeamHalo_cff.py:32
ESHandle.h
QGLikelihoodSystematicsDBReader::QGLikelihoodSystematicsDBReader
QGLikelihoodSystematicsDBReader(const edm::ParameterSet &)
Definition: QGLikelihoodSystematicsDBReader.cc:27
QGLikelihoodSystematicsDBReader::beginJob
void beginJob() override
Definition: QGLikelihoodSystematicsDBReader.cc:19
ptMin
constexpr float ptMin
Definition: PhotonIDValueMapProducer.cc:155
QGLikelihoodSystematicsRcd.h
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
EDAnalyzer.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
QGLikelihoodSystematicsDBReader::mPrintScreen
bool mPrintScreen
Definition: QGLikelihoodSystematicsDBReader.cc:24
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
JetCorrectionsRecord.h
MakerMacros.h
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
AlignmentTrackSelector_cfi.ptMax
ptMax
Definition: AlignmentTrackSelector_cfi.py:12
edm::ESHandle
Definition: DTSurvey.h:22
b
double b
Definition: hdecay.h:118
QGLikelihoodSystematicsObject::data
std::vector< Entry > data
Definition: QGLikelihoodObject.h:44
QGLikelihoodSystematicsDBReader::mPayloadName
std::string mPayloadName
Definition: QGLikelihoodSystematicsDBReader.cc:21
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
QGLikelihoodSystematicsDBReader::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: QGLikelihoodSystematicsDBReader.cc:33
edm::ParameterSet
Definition: ParameterSet.h:47
a
double a
Definition: hdecay.h:119
Event.h
HLT_FULL_cff.rhoMax
rhoMax
Definition: HLT_FULL_cff.py:14989
iEvent
int iEvent
Definition: GenABIO.cc:224
QGLikelihoodObject.h
edm::EventSetup
Definition: EventSetup.h:58
QGLikelihoodSystematicsDBReader::mCreateTextFile
bool mCreateTextFile
Definition: QGLikelihoodSystematicsDBReader.cc:24
Frameworkfwd.h
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
ALCARECOTkAlBeamHalo_cff.etaMax
etaMax
Definition: ALCARECOTkAlBeamHalo_cff.py:33
EventSetup.h
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
QGLikelihoodSystematicsDBReader
Definition: QGLikelihoodSystematicsDBReader.cc:13
edm::eventsetup::EventSetupRecordImplementation::get
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
Definition: EventSetupRecordImplementation.h:74
QGLikelihoodSystematicsDBReader::endJob
void endJob() override
Definition: QGLikelihoodSystematicsDBReader.cc:21
ParameterSet.h
edm::Event
Definition: Event.h:73
electronConversionRejectionValidator.rhoMin
rhoMin
Definition: electronConversionRejectionValidator.py:59
QGLikelihoodSystematicsDBReader::~QGLikelihoodSystematicsDBReader
~QGLikelihoodSystematicsDBReader() override
Definition: QGLikelihoodSystematicsDBReader.cc:16