CMS 3D CMS Logo

QGLikelihoodSystematicsDBReader.cc
Go to the documentation of this file.
1 #include <memory>
12 
14 public:
17 
18 private:
19  virtual void beginJob() override{};
20  virtual void analyze(const edm::Event&, const edm::EventSetup&) override;
21  virtual void endJob() override{};
22 
25 };
26 
27 
29  mPayloadName = iConfig.getUntrackedParameter<std::string>("payloadName");
30  mPrintScreen = iConfig.getUntrackedParameter<bool>("printScreen");
31  mCreateTextFile = iConfig.getUntrackedParameter<bool>("createTextFile");
32 }
33 
34 
36  edm::LogInfo("UserOutput") << "Inspecting QGLikelihood payload with label:" << mPayloadName << std::endl;
38  QGLikelihoodSystematicsRcd const& rcdhandle = iSetup.get<QGLikelihoodSystematicsRcd>();
39  rcdhandle.get(mPayloadName, QGLSysPar);
40 
41  std::vector<QGLikelihoodSystematicsObject::Entry> const& data = QGLSysPar->data;
42  edm::LogInfo("UserOutput") << "There are " << data.size() << " entries (categories with parameters for smearing):" << std::endl;
43  for(auto idata = data.begin(); idata != data.end(); ++idata){
44  int qgBin = idata->systCategory.QGIndex;
45  double etaMin = idata->systCategory.EtaMin;
46  double etaMax = idata->systCategory.EtaMax;
47  double rhoMin = idata->systCategory.RhoMin;
48  double rhoMax = idata->systCategory.RhoMax;
49  double ptMin = idata->systCategory.PtMin;
50  double ptMax = idata->systCategory.PtMax;
51  double a = idata->a;
52  double b = idata->b;
53  double lmin = idata->lmin;
54  double lmax = idata->lmax;
55 
56  char buff[1000];
57  sprintf(buff, "qg=%1d, ptMin=%8.2f, ptMax=%8.2f, etaMin=%3.1f, etaMax=%3.1f, rhoMin=%6.2f, rhoMax=%6.2f, a=%7.3f, b=%7.3f, lmin=%6.2f, lmax=%6.2f", qgBin, ptMin, ptMax, etaMin, etaMax, rhoMin, rhoMax, a, b, lmin, lmax);
58  edm::LogVerbatim("UserOutput") << buff << std::endl;
59  }
60 }
61 
T getUntrackedParameter(std::string const &, T const &) const
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
int iEvent
Definition: GenABIO.cc:230
void get(HolderT &iHolder) const
const T & get() const
Definition: EventSetup.h:56
double b
Definition: hdecay.h:120
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
QGLikelihoodSystematicsDBReader(const edm::ParameterSet &)