|
|
Go to the documentation of this file.
13 Cabling::Cabling(
string dtcconfig,
string moduleconfig,
Settings const& settings) : settings_(settings) {
14 ifstream indtc(dtcconfig.c_str());
20 while (indtc.good()) {
32 string dtcbase =
dtc.substr(2,
dtc.size() - 2);
34 dtcbase =
"neg_" +
dtc.substr(6,
dtc.size() - 6);
41 ifstream inmodules(moduleconfig.c_str());
45 while (inmodules.good()) {
46 inmodules >> layer >>
ladder >> module >>
dtc;
50 if (layer > 0 && layer <= (
int)
N_PSLAYER) {
53 module = (module - 300);
57 module = (module - 200);
59 if ((module > 100) && (layer > 0 && layer <= (
int)
N_PSLAYER)) {
62 if (!inmodules.good())
71 auto it2 = it1->second.find(
ladder);
72 assert(it2 != it1->second.end());
73 auto it3 = it2->second.find(module);
74 if (it3 == it2->second.end()) {
75 throw cms::Exception(
"LogicError") << __FILE__ <<
" " << __LINE__ <<
"Could not find stub " << layer <<
" "
76 <<
ladder <<
" " << module;
82 unsigned int layerdisk = layer - 1;
85 layerdisk = module +
N_DISK;
89 int isec =
dtc[0] -
'0';
91 string dtcbase =
dtc.substr(2,
dtc.size() - 2);
93 dtcbase =
"neg_" +
dtc.substr(6,
dtc.size() - 6);
101 dtcranges_[dtcbase].addphi(phisec, layerdisk);
105 ofstream
out(
"dtcphirange.txt");
109 double min = it.second.min(
i);
110 double max = it.second.max(
i);
112 out << it.first <<
" " <<
i + 1 <<
" " <<
min <<
" " <<
max << endl;
119 std::vector<string>
tmp;
121 for (
const auto& it :
dtcs_) {
122 tmp.push_back(it.first);
constexpr unsigned int N_PSLAYER
void writephirange() const
Settings const & settings_
std::vector< std::string > DTCs() const
double dphisector() const
constexpr unsigned int N_TILTED_RINGS
std::map< std::string, DTC > dtcs_
const std::string & dtc(int layer, int ladder, int module) const
std::map< std::string, DTC > dtcranges_
void addphi(const std::string &dtc, double phi, int layer, int module)
constexpr std::array< unsigned int, N_PSLAYER > N_MOD_PLANK
std::map< int, std::map< int, std::map< int, std::string > > > modules_
constexpr T reduceRange(T x)