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 
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &, const edm::EventSetup &) override
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
int iEvent
Definition: GenABIO.cc:224
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
double b
Definition: hdecay.h:118
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
double a
Definition: hdecay.h:119
T get() const
Definition: EventSetup.h:73
QGLikelihoodSystematicsDBReader(const edm::ParameterSet &)