CMS 3D CMS Logo

APVGainHelpers.h
Go to the documentation of this file.
1 #ifndef CALIBTRACKER_SISTRIPCHANNELGAIN_APVGAINHELPERS_H
2 #define CALIBTRACKER_SISTRIPCHANNELGAIN_APVGAINHELPERS_H
3 
8 
9 #include <string>
10 #include <vector>
11 #include <utility>
12 #include <cstdint>
13 #include <unordered_map>
14 
15 namespace APVGain {
16 
18 
19  int subdetectorId(uint32_t);
20  int subdetectorId(const std::string&);
21  int subdetectorSide(uint32_t, const TrackerTopology*);
22  int thickness(uint32_t);
23  int thickness(const std::string& tag);
24  int subdetectorSide(const std::string&);
25  int subdetectorPlane(uint32_t, const TrackerTopology*);
26  int subdetectorPlane(const std::string&);
27 
28  std::vector<std::pair<std::string, std::string>> monHnames(std::vector<std::string>, bool, const char* tag);
29 
30  struct APVmon {
31  public:
32  APVmon(int v0, int v1, int v2, int v3, MonitorElement* v4)
34 
36 
38 
40 
41  int getThickness() { return m_thickness; }
42 
44 
45  void printAll() {
46  LogDebug("APVGainHelpers") << "subDetectorID:" << m_subdetectorId << std::endl;
47  LogDebug("APVGainHelpers") << "subDetectorSide:" << m_subdetectorSide << std::endl;
48  LogDebug("APVGainHelpers") << "subDetectorPlane:" << m_subdetectorPlane << std::endl;
49  LogDebug("APVGainHelpers") << "thickness:" << m_thickness << std::endl;
50  LogDebug("APVGainHelpers") << "histoName:" << m_monitor->getName() << std::endl;
51  return;
52  }
53 
54  private:
60  };
61 
63  public:
65  : EventStats(),
66  Charge_Vs_Index(7),
67  Charge_1(),
68  Charge_2(),
69  Charge_3(),
70  Charge_4(),
79  NStripAPVs(0),
80  NPixelDets(0),
82  APVsColl() {}
83 
85  std::vector<dqm::reco::MonitorElement*> Charge_Vs_Index;
86  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_1;
87  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_2;
88  std::array<std::vector<dqm::reco::MonitorElement*>, 7> Charge_3;
89  std::array<std::vector<dqm::reco::MonitorElement*>, 7>
92  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIB;
93  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTOB;
94  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIDP;
95  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTIDM;
96  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECP1;
97  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECP2;
98  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECM1;
99  std::vector<dqm::reco::MonitorElement*> Charge_Vs_PathlengthTECM2;
100  mutable std::atomic<unsigned int> NStripAPVs;
101  mutable std::atomic<unsigned int> NPixelDets;
102  std::vector<std::shared_ptr<stAPVGain>> APVsCollOrdered;
103  std::unordered_map<unsigned int, std::shared_ptr<stAPVGain>> APVsColl;
104  };
105 
106  std::vector<MonitorElement*> FetchMonitor(std::vector<APVmon>, uint32_t, const TrackerTopology* topo = nullptr);
107  std::vector<unsigned int> FetchIndices(std::map<unsigned int, APVloc>,
108  uint32_t,
109  const TrackerTopology* topo = nullptr);
110 
111 }; // namespace APVGain
112 
113 #endif
dqm::impl::MonitorElement
Definition: MonitorElement.h:99
V0Monitor_cff.v0
v0
Definition: V0Monitor_cff.py:7
APVGain::APVmon::APVmon
APVmon(int v0, int v1, int v2, int v3, MonitorElement *v4)
Definition: APVGainHelpers.h:32
MessageLogger.h
APVGain::APVGainHistograms::APVsColl
std::unordered_map< unsigned int, std::shared_ptr< stAPVGain > > APVsColl
Definition: APVGainHelpers.h:103
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECM1
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECM1
Definition: APVGainHelpers.h:98
APVGain::APVGainHistograms::APVGainHistograms
APVGainHistograms()
Definition: APVGainHelpers.h:64
APVGain::FetchIndices
std::vector< unsigned int > FetchIndices(std::map< unsigned int, APVloc >, uint32_t, const TrackerTopology *topo=nullptr)
Definition: APVGainHelpers.cc:187
APVGain::APVGainHistograms::Charge_3
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_3
Definition: APVGainHelpers.h:88
TrackerTopology
Definition: TrackerTopology.h:16
APVGain::APVmon::m_monitor
MonitorElement * m_monitor
Definition: APVGainHelpers.h:59
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
APVGain::APVGainHistograms::Charge_4
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_4
Definition: APVGainHelpers.h:90
APVGain::APVmon
Definition: APVGainHelpers.h:30
APVGain::APVmon::m_subdetectorId
int m_subdetectorId
Definition: APVGainHelpers.h:56
APVGain::subdetectorPlane
int subdetectorPlane(uint32_t, const TrackerTopology *)
Definition: APVGainHelpers.cc:119
APVGainStruct.h
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIB
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIB
Definition: APVGainHelpers.h:92
APVGain::APVGainHistograms::Charge_Vs_PathlengthTOB
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTOB
Definition: APVGainHelpers.h:93
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIDM
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIDM
Definition: APVGainHelpers.h:95
APVGain::APVmon::getThickness
int getThickness()
Definition: APVGainHelpers.h:41
APVGain::APVGainHistograms::Charge_Vs_PathlengthTIDP
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTIDP
Definition: APVGainHelpers.h:94
APVGain::APVmon::m_thickness
int m_thickness
Definition: APVGainHelpers.h:55
APVGain::APVGainHistograms::NPixelDets
std::atomic< unsigned int > NPixelDets
Definition: APVGainHelpers.h:101
TrackerTopology.h
APVGain
Definition: APVGainHelpers.h:15
APVGain::APVmon::getSubdetectorPlane
int getSubdetectorPlane()
Definition: APVGainHelpers.h:39
APVGain::APVGainHistograms::Charge_Vs_Index
std::vector< dqm::reco::MonitorElement * > Charge_Vs_Index
Definition: APVGainHelpers.h:85
APVGain::APVGainHistograms::NStripAPVs
std::atomic< unsigned int > NStripAPVs
Definition: APVGainHelpers.h:100
APVGain::APVGainHistograms::EventStats
dqm::reco::MonitorElement * EventStats
Definition: APVGainHelpers.h:84
APVGain::APVmon::getMonitor
MonitorElement * getMonitor()
Definition: APVGainHelpers.h:43
APVGain::APVGainHistograms::Charge_1
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_1
Definition: APVGainHelpers.h:86
APVGain::APVGainHistograms::Charge_2
std::array< std::vector< dqm::reco::MonitorElement * >, 7 > Charge_2
Definition: APVGainHelpers.h:87
APVGain::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: APVGainHelpers.h:17
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
APVGain::subdetectorSide
int subdetectorSide(uint32_t, const TrackerTopology *)
Definition: APVGainHelpers.cc:49
makeGlobalPositionRcd_cfg.tag
tag
Definition: makeGlobalPositionRcd_cfg.py:6
APVGain::FetchMonitor
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=nullptr)
Definition: APVGainHelpers.cc:151
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECP2
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECP2
Definition: APVGainHelpers.h:97
APVGain::APVGainHistograms::APVsCollOrdered
std::vector< std::shared_ptr< stAPVGain > > APVsCollOrdered
Definition: APVGainHelpers.h:102
APVGain::APVmon::m_subdetectorPlane
int m_subdetectorPlane
Definition: APVGainHelpers.h:58
APVGain::thickness
int thickness(uint32_t)
Definition: APVGainHelpers.cc:76
APVGain::APVmon::getSubdetectorId
int getSubdetectorId()
Definition: APVGainHelpers.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
APVGain::APVmon::printAll
void printAll()
Definition: APVGainHelpers.h:45
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECM2
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECM2
Definition: APVGainHelpers.h:99
dqm::impl::MonitorElement::getName
const std::string & getName() const
get name of ME
Definition: MonitorElement.h:250
APVGain::monHnames
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
Definition: APVGainHelpers.cc:215
APVGain::APVmon::getSubdetectorSide
int getSubdetectorSide()
Definition: APVGainHelpers.h:37
APVGain::APVmon::m_subdetectorSide
int m_subdetectorSide
Definition: APVGainHelpers.h:57
APVGain::APVGainHistograms::Charge_Vs_PathlengthTECP1
std::vector< dqm::reco::MonitorElement * > Charge_Vs_PathlengthTECP1
Definition: APVGainHelpers.h:96
APVGain::APVGainHistograms
Definition: APVGainHelpers.h:62
APVGain::subdetectorId
int subdetectorId(uint32_t)
Definition: APVGainHelpers.cc:16