CMS 3D CMS Logo

GEMValidationUtils.cc
Go to the documentation of this file.
2 
3 #include "TString.h"
4 
5 TString GEMUtils::getSuffixName(Int_t region_id) { return TString::Format("_Re%+d", region_id); }
6 
7 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id) {
8  return TString::Format("_GE%.2d-%c", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'));
9 }
10 
11 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id, Int_t layer_id) {
12  return TString::Format("_GE%.2d-%c-L%d", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'), layer_id);
13 }
14 
15 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id, Int_t layer_id, Int_t eta_id) {
16  return TString::Format("_GE%.2d-%c-L%d-E%d", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'), layer_id, eta_id);
17 }
18 
20  auto [region_id, station_id] = key;
21  return getSuffixName(region_id, station_id);
22 }
23 
25  auto [region_id, station_id, layer_id] = key;
26  return getSuffixName(region_id, station_id, layer_id);
27 }
28 
30  auto [region_id, station_id, layer_id, eta_id] = key;
31  return getSuffixName(region_id, station_id, layer_id, eta_id);
32 }
33 
34 TString GEMUtils::getSuffixTitle(Int_t region_id) { return TString::Format(" Region %+d", region_id); }
35 
36 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id) {
37  return TString::Format(" GE%.2d-%c", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'));
38 }
39 
40 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id, Int_t layer_id) {
41  return TString::Format(" GE%.2d-%c-L%d", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'), layer_id);
42 }
43 
44 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id, Int_t layer_id, Int_t eta_id) {
45  return TString::Format(" GE%.2d-%c-L%d-E%d", station_id * 10 + 1, (region_id > 0 ? 'P' : 'M'), layer_id, eta_id);
46 }
47 
49  auto [region_id, station_id] = key;
50  return getSuffixTitle(region_id, station_id);
51 }
52 
54  auto [region_id, station_id, layer_id] = key;
55  return getSuffixTitle(region_id, station_id, layer_id);
56 }
57 
59  auto [region_id, station_id, layer_id, eta_id] = key;
60  return getSuffixTitle(region_id, station_id, layer_id, eta_id);
61 }
TString getSuffixName(Int_t region_id)
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
TString getSuffixTitle(Int_t region_id)
std::tuple< Int_t, Int_t > ME2IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey