CMS 3D CMS Logo

ChamberLocationSpec.cc
Go to the documentation of this file.
2 #include <sstream>
3 
5  std::ostringstream str;
6  std::string subsVal[5] = {"--", "-", "0", "+", "++"}; // -2,-1,0,1,2
7  std::string febZVal[3] = {"-z", "+z"}; // 0,1
8  std::string febZRVal[3] = {"N/A", "IN", "OUT"}; // 0,1,2
9  std::string boeVal[2] = {"Endcap", "Barrel"}; // 0,1
10  if (depth >= 0) {
11  str << " ChamberLocationSpec: " << std::endl
12  << " --->DiskOrWheel: " << diskOrWheel << " Layer: " << layer << " Sector: " << sector
13  << " Subsector: " << subsVal[subsector + 2] << " ChamberLocationName: " << chamberLocationName()
14  << " FebZOrnt: " << febZVal[int(febZOrnt)] << " FebZRadOrnt: " << febZRVal[int(febZRadOrnt)]
15  << " BarrelOrEndcap: " << boeVal[int(barrelOrEndcap)];
16  }
17  return str.str();
18 }
19 
21  std::ostringstream ocln;
22  std::string cln;
23  if (barrelOrEndcap == 1) {
24  std::string layerVal[6] = {"RB1in", "RB1out", "RB2in", "RB2out", "RB3", "RB4"};
25  std::string prefix = "W";
26  if (diskOrWheel > 0)
27  prefix = "W+";
28  std::string subsVal[5] = {"--", "-", "", "+", "++"};
29  ocln << prefix << diskOrWheel << "/" << layerVal[layer - 1] << "/" << sector << subsVal[subsector + 2];
30  } else {
31  std::string prefix = "RE";
32  if (diskOrWheel > 0)
33  prefix = "RE+";
34  ocln << prefix << diskOrWheel << "/" << layer << "/" << sector;
35  }
36  cln = ocln.str();
37  return cln;
38 }
std::string print(int depth=0) const
debug printout
std::string chamberLocationName() const
#define str(s)