36 if ( d==
"TIB" )
return 3;
37 if ( d==
"TID" )
return 4;
38 if ( d==
"TOB" )
return 5;
39 if ( d==
"TEC" )
return 6;
50 return topo->
side( det_id );
64 std::size_t
m = tag.find(
"minus");
65 std::size_t
p = tag.find(
"plus");
66 if (m!=std::string::npos)
return 1;
67 if (p!=std::string::npos)
return 2;
95 std::size_t
p = (tag.find(
"layer")!=std::string::npos)? tag.find(
"layer") : tag.find(
"wheel");
96 if (p!=std::string::npos) {
97 std::size_t
start = tag.find(
"_",p+1) + 1;
98 std::size_t stop = tag.find(
'_',start);
100 return atoi( plane.c_str());
110 std::vector<MonitorElement*>
found = std::vector<MonitorElement*>();
114 std::vector<APVGain::APVmon>::iterator it= histos.begin();
116 while (it!=histos.end()) {
122 bool match = (subdetectorId==0 || subdetectorId==sId) &&
123 (subdetectorPlane==0 || subdetectorPlane==sPlane) &&
124 (subdetectorSide==0 || subdetectorSide==sSide);
127 found.push_back((*it).monitor);
136 std::vector<std::pair<std::string,std::string>>
139 std::vector<std::pair<std::string,std::string>>
out;
140 int re = (allPlanes)? 34 + VH.size() : VH.size();
145 if (Tag.length()) Tag =
"__" + Tag;
153 for(
int i=1;
i<=TIBlayers;
i++) {
154 h_tag =
"TIB_layer_" + std::to_string(
i) + Tag;
155 h_tit = h_tag;
std::replace(h_tit.begin(),h_tit.end(),
'_',
' ');
156 out.push_back(std::pair<std::string,std::string>(h_tag,h_tit));
160 for(
int i=1;
i<=TOBlayers;
i++) {
161 h_tag =
"TOB_layer_" + std::to_string(
i) + Tag;
162 h_tit = h_tag;
std::replace(h_tit.begin(),h_tit.end(),
'_',
' ');
163 out.push_back(std::pair<std::string,std::string>(h_tag,h_tit));
167 for(
int i=-TIDwheels;
i<=TIDwheels;
i++) {
169 if (
i<0) h_tag =
"TIDminus_wheel_" + std::to_string(
i) + Tag;
170 else h_tag =
"TIDplus_wheel_" + std::to_string(
i) + Tag;
171 h_tit = h_tag;
std::replace(h_tit.begin(),h_tit.end(),
'_',
' ');
172 out.push_back(std::pair<std::string,std::string>(h_tag,h_tit));
176 for(
int i=-TECwheels;
i<=TECwheels;
i++) {
178 if (
i<0) h_tag =
"TECminus_wheel_" + std::to_string(
i) + Tag;
179 else h_tag =
"TECplus_wheel_" + std::to_string(
i) + Tag;
180 h_tit = h_tag;
std::replace(h_tit.begin(),h_tit.end(),
'_',
' ');
181 out.push_back(std::pair<std::string,std::string>(h_tag,h_tit));
185 for(
unsigned int i=0;
i<VH.size();
i++) {
187 h_tit = h_tag;
std::replace(h_tit.begin(),h_tit.end(),
'_',
' ');
188 out.push_back(std::pair<std::string,std::string>(h_tag,h_tit));
unsigned int tibLayer(const DetId &id) const
unsigned int side(const DetId &id) const
int subdetectorPlane(uint32_t, const TrackerTopology *)
def replace(string, replacements)
unsigned int tidWheel(const DetId &id) const
std::vector< MonitorElement * > FetchMonitor(std::vector< APVmon >, uint32_t, const TrackerTopology *topo=0)
unsigned int tidSide(const DetId &id) const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int subdetectorSide(uint32_t, const TrackerTopology *)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::vector< std::pair< std::string, std::string > > monHnames(std::vector< std::string >, bool, const char *tag)
unsigned int tecWheel(const DetId &id) const
int subdetectorId(uint32_t)
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const