CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NormDML.h
Go to the documentation of this file.
1 #ifndef RecoLuminosity_LumiProducer_NormDML_H
2 #define RecoLuminosity_LumiProducer_NormDML_H
3 // -*- C++ -*-
4 //
5 // Package: LumiProducer
6 // Class: NormDML
7 //
15 //
16 // Original Author: Zhen Xie
17 //
18 #include <string>
19 #include <vector>
20 #include <map>
21 namespace coral{
22  class ISchema;
23 }
24 namespace lumi{
25  class NormDML{
26  public:
27  struct normData{
30  std::map< unsigned int,float > afterglows;
31  std::map< std::string, float > coefficientmap;
33  unsigned int beamegev;
34  };
35  enum LumiType{HF,PIXEL};
36  NormDML();
38  /*
39  find the most recent id for the given norm tag
40  */
41  unsigned long long normIdByName(const coral::ISchema& schema,const std::string& normtagname);
42  /*
43  find the most recent normid for the given norm type
44  */
45  void normIdByType(const coral::ISchema& schema,std::map<std::string,unsigned long long>& resultMap,LumiType=HF,bool defaultonly=true);
46  /*
47  retrieve norm data by normid
48  */
49  void normById(const coral::ISchema& schema,
50  unsigned long long normid,
51  std::map< unsigned int,normData >&result);
52 
53  /*
54  parse corrector functions
55  */
57  std::vector<std::string>& correctorParams);
58  void parseAfterglows(const std::string& afterglowStr,
59  std::map<unsigned int,float>& afterglowmap);
60  };
61 }//ns lumi
62 #endif
std::map< unsigned int, float > afterglows
Definition: NormDML.h:30
unsigned int beamegev
Definition: NormDML.h:33
tuple schema
Definition: dataDML.py:2334
tuple lumi
Definition: fjr2json.py:35
void parseAfterglows(const std::string &afterglowStr, std::map< unsigned int, float > &afterglowmap)
Definition: NormDML.cc:151
std::map< std::string, float > coefficientmap
Definition: NormDML.h:31
tuple result
Definition: mps_fire.py:83
void parseLumiCorrector(const std::string &correctorStr, std::vector< std::string > &correctorParams)
Definition: NormDML.cc:144
list correctorStr
Definition: lumiNorm.py:120
void normById(const coral::ISchema &schema, unsigned long long normid, std::map< unsigned int, normData > &result)
Definition: NormDML.cc:98
std::string normtag
Definition: NormDML.h:28
std::string corrfunc
Definition: NormDML.h:29
std::string amodetag
Definition: NormDML.h:32
int normid
Definition: lumiCalc2.py:356
void normIdByType(const coral::ISchema &schema, std::map< std::string, unsigned long long > &resultMap, LumiType=HF, bool defaultonly=true)
Definition: NormDML.cc:50
unsigned long long normIdByName(const coral::ISchema &schema, const std::string &normtagname)
Definition: NormDML.cc:18