File indexing completed on 2025-08-05 08:11:57
0001 #ifndef TH2INTT_h
0002 #define TH2INTT_h
0003
0004 #include "TH2Poly.h"
0005 #include "TLine.h"
0006 #include "vector"
0007 #include "map"
0008 #include "TLatex.h"
0009
0010
0011 struct ladder_info {
0012 int FC;
0013 TString Port;
0014 int ROC;
0015 int Direction;
0016 int bin_id;
0017 };
0018
0019 struct full_ladder_info {
0020 int FC;
0021 TString Port;
0022 int ROC;
0023 int Direction;
0024 TString Ladder;
0025 };
0026
0027 struct ladder_pos {
0028 double x1;
0029 double y1;
0030
0031 double x2;
0032 double y2;
0033
0034 double x3;
0035 double y3;
0036
0037 double x4;
0038 double y4;
0039 };
0040
0041 map<TString,ladder_info> ladder_toinfo_map{
0042 {"B1L101S", {0, "D2", 0, 0}},
0043 {"B0L101S", {1, "C1", 0, 0}},
0044 {"B1L001S", {2, "C2", 0, 0}},
0045 {"B1L000S", {3, "B3", 0, 0}},
0046 {"B1L100S", {4, "A2", 0, 0}},
0047 {"B0L000S", {5, "B1", 0, 0}},
0048 {"B0L100S", {6, "A1", 0, 0}},
0049
0050 {"B1L103S", {7, "C2", 1, 0}},
0051 {"B0L002S", {8, "C1", 1, 0}},
0052 {"B0L001S", {9, "A1", 1, 0}},
0053 {"B1L002S", {10, "B3", 1, 0}},
0054 {"B1L102S", {11, "A2", 1, 0}},
0055 {"B0L102S", {12, "B1", 1, 0}},
0056 {"B1L003S", {13, "D2", 1, 0}},
0057
0058
0059
0060 {"B1L105S", {0, "C2", 2, 0}},
0061 {"B0L104S", {1, "C1", 2, 0}},
0062 {"B0L103S", {2, "A2", 2, 0}},
0063 {"B1L004S", {3, "B3", 2, 0}},
0064 {"B1L104S", {4, "A1", 2, 0}},
0065 {"B0L003S", {5, "B1", 2, 0}},
0066 {"B1L005S", {6, "D2", 2, 0}},
0067
0068 {"B1L107S", {7, "C2", 3, 0}},
0069 {"B0L005S", {8, "C1", 3, 0}},
0070 {"B0L004S", {9, "A1", 3, 0}},
0071 {"B1L006S", {10, "B2", 3, 0}},
0072 {"B1L106S", {11, "A2", 3, 0}},
0073 {"B0L105S", {12, "B1", 3, 0}},
0074 {"B1L007S", {13, "D1", 3, 0}},
0075
0076
0077
0078 {"B0L106S", {0, "A1", 4, 0}},
0079 {"B0L006S", {1, "B1", 4, 0}},
0080 {"B0L107S", {2, "C1", 4, 0}},
0081 {"B1L108S", {3, "A2", 4, 0}},
0082 {"B1L008S", {4, "B2", 4, 0}},
0083 {"B1L109S", {5, "C2", 4, 0}},
0084 {"B1L009S", {6, "D1", 4, 0}},
0085
0086 {"B0L007S", {7, "A1", 5, 0}},
0087 {"B0L108S", {8, "B3", 5, 0}},
0088 {"B0L008S", {9, "C1", 5, 0}},
0089 {"B1L110S", {10, "A2", 5, 0}},
0090 {"B1L010S", {11, "B2", 5, 0}},
0091 {"B1L111S", {12, "C2", 5, 0}},
0092 {"B1L011S", {13, "C3", 5, 0}},
0093
0094
0095
0096 {"B0L109S", {0, "A1", 6, 0}},
0097 {"B0L009S", {1, "B1", 6, 0}},
0098 {"B0L110S", {2, "C1", 6, 0}},
0099 {"B1L112S", {3, "A2", 6, 0}},
0100 {"B1L012S", {4, "B3", 6, 0}},
0101 {"B1L113S", {5, "C2", 6, 0}},
0102 {"B1L013S", {6, "D1", 6, 0}},
0103
0104 {"B0L010S", {7, "A1", 7, 0}},
0105 {"B0L111S", {8, "B1", 7, 0}},
0106 {"B0L011S", {9, "C1", 7, 0}},
0107 {"B1L114S", {10, "A2", 7, 0}},
0108 {"B1L014S", {11, "B3", 7, 0}},
0109 {"B1L115S", {12, "C3", 7, 0}},
0110 {"B1L015S", {13, "D2", 7, 0}},
0111
0112
0113
0114 {"B1L101N", {0, "B1", 0, 1}},
0115 {"B0L000N", {1, "C2", 0, 1}},
0116 {"B0L100N", {2, "D1", 0, 1}},
0117 {"B1L001N", {3, "A2", 0, 1}},
0118 {"B0L101N", {4, "B2", 0, 1}},
0119 {"B1L000N", {5, "C3", 0, 1}},
0120 {"B1L100N", {6, "D2", 0, 1}},
0121
0122 {"B0L002N", {7, "B1", 1, 1}},
0123 {"B0L102N", {8, "C2", 1, 1}},
0124 {"B0L001N", {9, "D1", 1, 1}},
0125 {"B1L003N", {10, "A2", 1, 1}},
0126 {"B1L103N", {11, "B2", 1, 1}},
0127 {"B1L002N", {12, "C3", 1, 1}},
0128 {"B1L102N", {13, "B3", 1, 1}},
0129
0130
0131
0132 {"B0L003N", {0, "C1", 2, 1}},
0133 {"B0L104N", {1, "B1", 2, 1}},
0134 {"B0L103N", {2, "D2", 2, 1}},
0135 {"B1L004N", {3, "D1", 2, 1}},
0136 {"B1L005N", {4, "A2", 2, 1}},
0137 {"B1L104N", {5, "C2", 2, 1}},
0138 {"B1L105N", {6, "A1", 2, 1}},
0139
0140 {"B1L107N", {7, "C3", 3, 1}},
0141 {"B1L007N", {8, "B1", 3, 1}},
0142 {"B1L006N", {9, "C1", 3, 1}},
0143 {"B1L106N", {10, "D2", 3, 1}},
0144 {"B0L005N", {11, "A1", 3, 1}},
0145 {"B0L105N", {12, "C2", 3, 1}},
0146 {"B0L004N", {13, "D1", 3, 1}},
0147
0148
0149
0150 {"B0L106N", {0, "A1", 4, 1}},
0151 {"B0L006N", {1, "C3", 4, 1}},
0152 {"B0L107N", {2, "B2", 4, 1}},
0153 {"B1L108N", {3, "D1", 4, 1}},
0154 {"B1L008N", {4, "C2", 4, 1}},
0155 {"B1L109N", {5, "B3", 4, 1}},
0156 {"B1L009N", {6, "A2", 4, 1}},
0157
0158 {"B0L007N", {7, "D1", 5, 1}},
0159 {"B0L108N", {8, "C3", 5, 1}},
0160 {"B0L008N", {9, "A2", 5, 1}},
0161 {"B1L110N", {10, "D2", 5, 1}},
0162 {"B1L010N", {11, "C2", 5, 1}},
0163 {"B1L111N", {12, "B3", 5, 1}},
0164 {"B1L011N", {13, "A1", 5, 1}},
0165
0166
0167
0168 {"B0L109N", {0, "B3", 6, 1}},
0169 {"B0L009N", {1, "C1", 6, 1}},
0170 {"B0L110N", {2, "B1", 6, 1}},
0171 {"B1L112N", {3, "D1", 6, 1}},
0172 {"B1L012N", {4, "C2", 6, 1}},
0173 {"B1L113N", {5, "B2", 6, 1}},
0174 {"B1L013N", {6, "A1", 6, 1}},
0175
0176 {"B0L010N", {7, "B2", 7, 1}},
0177 {"B0L111N", {8, "C2", 7, 1}},
0178 {"B0L011N", {9, "B1", 7, 1}},
0179 {"B1L114N", {10, "D2", 7, 1}},
0180 {"B1L014N", {11, "C3", 7, 1}},
0181 {"B1L115N", {12, "B3", 7, 1}},
0182 {"B1L015N", {13, "A1", 7, 1}}
0183 };
0184
0185 map<TString,full_ladder_info> serverFC_toinfo_map{
0186 {"intt0_0", {0, "D2", 0, 0, "B1L101S"}},
0187 {"intt0_1", {1, "C1", 0, 0, "B0L101S"}},
0188 {"intt0_2", {2, "C2", 0, 0, "B1L001S"}},
0189 {"intt0_3", {3, "B3", 0, 0, "B1L000S"}},
0190 {"intt0_4", {4, "A2", 0, 0, "B1L100S"}},
0191 {"intt0_5", {5, "B1", 0, 0, "B0L000S"}},
0192 {"intt0_6", {6, "A1", 0, 0, "B0L100S"}},
0193
0194 {"intt0_7", {7, "C2", 1, 0, "B1L103S"}},
0195 {"intt0_8", {8, "C1", 1, 0, "B0L002S"}},
0196 {"intt0_9", {9, "A1", 1, 0, "B0L001S"}},
0197 {"intt0_10", {10, "B3", 1, 0, "B1L002S"}},
0198 {"intt0_11", {11, "A2", 1, 0, "B1L102S"}},
0199 {"intt0_12", {12, "B1", 1, 0, "B0L102S"}},
0200 {"intt0_13", {13, "D2", 1, 0, "B1L003S"}},
0201
0202
0203
0204 {"intt1_0", {0, "C2", 2, 0, "B1L105S"}},
0205 {"intt1_1", {1, "C1", 2, 0, "B0L104S"}},
0206 {"intt1_2", {2, "A2", 2, 0, "B0L103S"}},
0207 {"intt1_3", {3, "B3", 2, 0, "B1L004S"}},
0208 {"intt1_4", {4, "A1", 2, 0, "B1L104S"}},
0209 {"intt1_5", {5, "B1", 2, 0, "B0L003S"}},
0210 {"intt1_6", {6, "D2", 2, 0, "B1L005S"}},
0211
0212 {"intt1_7", {7, "C2", 3, 0, "B1L107S"}},
0213 {"intt1_8", {8, "C1", 3, 0, "B0L005S"}},
0214 {"intt1_9", {9, "A1", 3, 0, "B0L004S"}},
0215 {"intt1_10", {10, "B2", 3, 0, "B1L006S"}},
0216 {"intt1_11", {11, "A2", 3, 0, "B1L106S"}},
0217 {"intt1_12", {12, "B1", 3, 0, "B0L105S"}},
0218 {"intt1_13", {13, "D1", 3, 0, "B1L007S"}},
0219
0220
0221
0222 {"intt2_0", {0, "A1", 4, 0, "B0L106S"}},
0223 {"intt2_1", {1, "B1", 4, 0, "B0L006S"}},
0224 {"intt2_2", {2, "C1", 4, 0, "B0L107S"}},
0225 {"intt2_3", {3, "A2", 4, 0, "B1L108S"}},
0226 {"intt2_4", {4, "B2", 4, 0, "B1L008S"}},
0227 {"intt2_5", {5, "C2", 4, 0, "B1L109S"}},
0228 {"intt2_6", {6, "D1", 4, 0, "B1L009S"}},
0229
0230 {"intt2_7", {7, "A1", 5, 0, "B0L007S"}},
0231 {"intt2_8", {8, "B3", 5, 0, "B0L108S"}},
0232 {"intt2_9", {9, "C1", 5, 0, "B0L008S"}},
0233 {"intt2_10", {10, "A2", 5, 0, "B1L110S"}},
0234 {"intt2_11", {11, "B2", 5, 0, "B1L010S"}},
0235 {"intt2_12", {12, "C2", 5, 0, "B1L111S"}},
0236 {"intt2_13", {13, "C3", 5, 0, "B1L011S"}},
0237
0238
0239
0240 {"intt3_0", {0, "A1", 6, 0, "B0L109S"}},
0241 {"intt3_1", {1, "B1", 6, 0, "B0L009S"}},
0242 {"intt3_2", {2, "C1", 6, 0, "B0L110S"}},
0243 {"intt3_3", {3, "A2", 6, 0, "B1L112S"}},
0244 {"intt3_4", {4, "B3", 6, 0, "B1L012S"}},
0245 {"intt3_5", {5, "C2", 6, 0, "B1L113S"}},
0246 {"intt3_6", {6, "D1", 6, 0, "B1L013S"}},
0247
0248 {"intt3_7", {7, "A1", 7, 0, "B0L010S"}},
0249 {"intt3_8", {8, "B1", 7, 0, "B0L111S"}},
0250 {"intt3_9", {9, "C1", 7, 0, "B0L011S"}},
0251 {"intt3_10", {10, "A2", 7, 0, "B1L114S"}},
0252 {"intt3_11", {11, "B3", 7, 0, "B1L014S"}},
0253 {"intt3_12", {12, "C3", 7, 0, "B1L115S"}},
0254 {"intt3_13", {13, "D2", 7, 0, "B1L015S"}},
0255
0256
0257
0258 {"intt4_0", {0, "B1", 0, 1, "B1L101N"}},
0259 {"intt4_1", {1, "C2", 0, 1, "B0L000N"}},
0260 {"intt4_2", {2, "D1", 0, 1, "B0L100N"}},
0261 {"intt4_3", {3, "A2", 0, 1, "B1L001N"}},
0262 {"intt4_4", {4, "B2", 0, 1, "B0L101N"}},
0263 {"intt4_5", {5, "C3", 0, 1, "B1L000N"}},
0264 {"intt4_6", {6, "D2", 0, 1, "B1L100N"}},
0265
0266 {"intt4_7", {7, "B1", 1, 1, "B0L002N"}},
0267 {"intt4_8", {8, "C2", 1, 1, "B0L102N"}},
0268 {"intt4_9", {9, "D1", 1, 1, "B0L001N"}},
0269 {"intt4_10", {10, "A2", 1, 1, "B1L003N"}},
0270 {"intt4_11", {11, "B2", 1, 1, "B1L103N"}},
0271 {"intt4_12", {12, "C3", 1, 1, "B1L002N"}},
0272 {"intt4_13", {13, "B3", 1, 1, "B1L102N"}},
0273
0274
0275
0276 {"intt5_0", {0, "C1", 2, 1, "B0L003N"}},
0277 {"intt5_1", {1, "B1", 2, 1, "B0L104N"}},
0278 {"intt5_2", {2, "D2", 2, 1, "B0L103N"}},
0279 {"intt5_3", {3, "D1", 2, 1, "B1L004N"}},
0280 {"intt5_4", {4, "A2", 2, 1, "B1L005N"}},
0281 {"intt5_5", {5, "C2", 2, 1, "B1L104N"}},
0282 {"intt5_6", {6, "A1", 2, 1, "B1L105N"}},
0283
0284 {"intt5_7", {7, "C3", 3, 1, "B1L107N"}},
0285 {"intt5_8", {8, "B1", 3, 1, "B1L007N"}},
0286 {"intt5_9", {9, "C1", 3, 1, "B1L006N"}},
0287 {"intt5_10", {10, "D2", 3, 1, "B1L106N"}},
0288 {"intt5_11", {11, "A1", 3, 1, "B0L005N"}},
0289 {"intt5_12", {12, "C2", 3, 1, "B0L105N"}},
0290 {"intt5_13", {13, "D1", 3, 1, "B0L004N"}},
0291
0292
0293
0294 {"intt6_0", {0, "A1", 4, 1, "B0L106N"}},
0295 {"intt6_1", {1, "C3", 4, 1, "B0L006N"}},
0296 {"intt6_2", {2, "B2", 4, 1, "B0L107N"}},
0297 {"intt6_3", {3, "D1", 4, 1, "B1L108N"}},
0298 {"intt6_4", {4, "C2", 4, 1, "B1L008N"}},
0299 {"intt6_5", {5, "B3", 4, 1, "B1L109N"}},
0300 {"intt6_6", {6, "A2", 4, 1, "B1L009N"}},
0301
0302 {"intt6_7", {7, "D1", 5, 1, "B0L007N"}},
0303 {"intt6_8", {8, "C3", 5, 1, "B0L108N"}},
0304 {"intt6_9", {9, "A2", 5, 1, "B0L008N"}},
0305 {"intt6_10", {10, "D2", 5, 1, "B1L110N"}},
0306 {"intt6_11", {11, "C2", 5, 1, "B1L010N"}},
0307 {"intt6_12", {12, "B3", 5, 1, "B1L111N"}},
0308 {"intt6_13", {13, "A1", 5, 1, "B1L011N"}},
0309
0310
0311
0312 {"intt7_0", {0, "B3", 6, 1, "B0L109N"}},
0313 {"intt7_1", {1, "C1", 6, 1, "B0L009N"}},
0314 {"intt7_2", {2, "B1", 6, 1, "B0L110N"}},
0315 {"intt7_3", {3, "D1", 6, 1, "B1L112N"}},
0316 {"intt7_4", {4, "C2", 6, 1, "B1L012N"}},
0317 {"intt7_5", {5, "B2", 6, 1, "B1L113N"}},
0318 {"intt7_6", {6, "A1", 6, 1, "B1L013N"}},
0319
0320 {"intt7_7", {7, "B2", 7, 1, "B0L010N"}},
0321 {"intt7_8", {8, "C2", 7, 1, "B0L111N"}},
0322 {"intt7_9", {9, "B1", 7, 1, "B0L011N"}},
0323 {"intt7_10", {10, "D2", 7, 1, "B1L114N"}},
0324 {"intt7_11", {11, "C3", 7, 1, "B1L014N"}},
0325 {"intt7_12", {12, "B3", 7, 1, "B1L115N"}},
0326 {"intt7_13", {13, "A1", 7, 1, "B1L015N"}}
0327 };
0328
0329 map<int,TString> layer_map = {
0330 {0,"B0L0"},
0331 {1,"B0L1"},
0332 {2,"B1L0"},
0333 {3,"B1L1"}
0334 };
0335
0336 class TH2INTT : public TH2Poly
0337 {
0338 public :
0339 TH2INTT() : TH2Poly(){
0340 TH2Poly::Initialize(-23, 23., -10., 10., 25, 25);
0341 TH2Poly::SetStats(0);
0342 TH2INTT::fill_ladder_pos_map();
0343 TH2INTT::fill_ladder_line();
0344 TH2INTT::fill_ladder_toinfo_map_bin();
0345
0346
0347 for (int i = 0; i < ladder_pos_map["B0L0S"].size(); i++) {
0348 px={ladder_pos_map["B0L0S"][i].x1, ladder_pos_map["B0L0S"][i].x2, ladder_pos_map["B0L0S"][i].x3, ladder_pos_map["B0L0S"][i].x4};
0349 py={ladder_pos_map["B0L0S"][i].y1, ladder_pos_map["B0L0S"][i].y2, ladder_pos_map["B0L0S"][i].y3, ladder_pos_map["B0L0S"][i].y4};
0350 TH2Poly::AddBin(4, &px[0], &py[0]);
0351 }
0352
0353
0354 for (int i = 0; i < ladder_pos_map["B0L1S"].size(); i++) {
0355 px={ladder_pos_map["B0L1S"][i].x1, ladder_pos_map["B0L1S"][i].x2, ladder_pos_map["B0L1S"][i].x3, ladder_pos_map["B0L1S"][i].x4};
0356 py={ladder_pos_map["B0L1S"][i].y1, ladder_pos_map["B0L1S"][i].y2, ladder_pos_map["B0L1S"][i].y3, ladder_pos_map["B0L1S"][i].y4};
0357 TH2Poly::AddBin(4, &px[0], &py[0]);
0358 }
0359
0360
0361 for (int i = 0; i < ladder_pos_map["B1L0S"].size(); i++) {
0362 px={ladder_pos_map["B1L0S"][i].x1, ladder_pos_map["B1L0S"][i].x2, ladder_pos_map["B1L0S"][i].x3, ladder_pos_map["B1L0S"][i].x4};
0363 py={ladder_pos_map["B1L0S"][i].y1, ladder_pos_map["B1L0S"][i].y2, ladder_pos_map["B1L0S"][i].y3, ladder_pos_map["B1L0S"][i].y4};
0364 TH2Poly::AddBin(4, &px[0], &py[0]);
0365 }
0366
0367
0368 for (int i = 0; i < ladder_pos_map["B1L1S"].size(); i++) {
0369 px={ladder_pos_map["B1L1S"][i].x1, ladder_pos_map["B1L1S"][i].x2, ladder_pos_map["B1L1S"][i].x3, ladder_pos_map["B1L1S"][i].x4};
0370 py={ladder_pos_map["B1L1S"][i].y1, ladder_pos_map["B1L1S"][i].y2, ladder_pos_map["B1L1S"][i].y3, ladder_pos_map["B1L1S"][i].y4};
0371 TH2Poly::AddBin(4, &px[0], &py[0]);
0372 }
0373
0374
0375
0376
0377 for (int i = 0; i < ladder_pos_map["B0L0N"].size(); i++) {
0378 px={ladder_pos_map["B0L0N"][i].x1, ladder_pos_map["B0L0N"][i].x2, ladder_pos_map["B0L0N"][i].x3, ladder_pos_map["B0L0N"][i].x4};
0379 py={ladder_pos_map["B0L0N"][i].y1, ladder_pos_map["B0L0N"][i].y2, ladder_pos_map["B0L0N"][i].y3, ladder_pos_map["B0L0N"][i].y4};
0380 TH2Poly::AddBin(4, &px[0], &py[0]);
0381 }
0382
0383
0384 for (int i = 0; i < ladder_pos_map["B0L1N"].size(); i++) {
0385 px={ladder_pos_map["B0L1N"][i].x1, ladder_pos_map["B0L1N"][i].x2, ladder_pos_map["B0L1N"][i].x3, ladder_pos_map["B0L1N"][i].x4};
0386 py={ladder_pos_map["B0L1N"][i].y1, ladder_pos_map["B0L1N"][i].y2, ladder_pos_map["B0L1N"][i].y3, ladder_pos_map["B0L1N"][i].y4};
0387 TH2Poly::AddBin(4, &px[0], &py[0]);
0388 }
0389
0390
0391 for (int i = 0; i < ladder_pos_map["B1L0N"].size(); i++) {
0392 px={ladder_pos_map["B1L0N"][i].x1, ladder_pos_map["B1L0N"][i].x2, ladder_pos_map["B1L0N"][i].x3, ladder_pos_map["B1L0N"][i].x4};
0393 py={ladder_pos_map["B1L0N"][i].y1, ladder_pos_map["B1L0N"][i].y2, ladder_pos_map["B1L0N"][i].y3, ladder_pos_map["B1L0N"][i].y4};
0394 TH2Poly::AddBin(4, &px[0], &py[0]);
0395 }
0396
0397
0398 for (int i = 0; i < ladder_pos_map["B1L1N"].size(); i++) {
0399 px={ladder_pos_map["B1L1N"][i].x1, ladder_pos_map["B1L1N"][i].x2, ladder_pos_map["B1L1N"][i].x3, ladder_pos_map["B1L1N"][i].x4};
0400 py={ladder_pos_map["B1L1N"][i].y1, ladder_pos_map["B1L1N"][i].y2, ladder_pos_map["B1L1N"][i].y3, ladder_pos_map["B1L1N"][i].y4};
0401 TH2Poly::AddBin(4, &px[0], &py[0]);
0402 }
0403
0404
0405
0406 };
0407
0408 void SetSerFCSContent(TString server_FC, double content);
0409 double GetSerFCSContent(TString server_FC);
0410 void SetSerFCIContent(int server_id, int FC_id, double content);
0411 double GetSerFCIContent(int server_id, int FC_id);
0412
0413 void SetLadderSContent(TString ladder_name, double content);
0414 double GetLadderSContent(TString ladder_name);
0415 void SetLadderIContent(int barrel_id, int layer_id, int ladder_id, int side, double content);
0416 double GetLadderIContent(int barrel_id, int layer_id, int ladder_id, int side);
0417
0418 virtual void Draw(Option_t* option = "") {
0419 TH2Poly::Draw(option);
0420
0421 TLatex *side_text = new TLatex();
0422
0423 side_text -> SetTextSize(0.06);
0424 side_text -> SetTextAlign(21);
0425
0426 double text_offset = 2.5;
0427
0428 side_text -> DrawLatex(-10, 8, "South" );
0429 side_text -> DrawLatex(10, 8, "North" );
0430
0431 TArrow *arx = new TArrow(-1.5,-8,1.5,-8,0.015,"|>");
0432 arx->SetAngle(40);
0433 arx->SetLineWidth(2);
0434 arx->Draw("");
0435
0436 TArrow *ary = new TArrow(-1.5,-8,-1.5,-5,0.015,"|>");
0437 ary->SetAngle(40);
0438 ary->SetLineWidth(2);
0439 ary->Draw("");
0440
0441 TLatex *coord_text = new TLatex();
0442 coord_text -> SetTextSize(0.05);
0443 coord_text -> SetTextAlign(21);
0444 coord_text -> DrawLatex(2, -8.5, "X");
0445 coord_text -> DrawLatex(-1.5, -4.5, "Y");
0446 coord_text -> DrawLatex(1, -6, "#odot Z");
0447
0448 TLatex *note_text = new TLatex();
0449 note_text -> SetTextSize(0.035);
0450 note_text -> SetTextAlign(32);
0451 note_text -> DrawLatex(22, -9, "View from North to South");
0452
0453
0454
0455
0456
0457 for (int i = 0; i < ladder_line.size(); i++)
0458 {
0459 ladder_line[i] -> Draw("lsame");
0460 }
0461 }
0462
0463
0464 private :
0465
0466 vector<TLine *> ladder_line;
0467 void fill_ladder_line();
0468 void fill_ladder_pos_map();
0469 void fill_ladder_toinfo_map_bin();
0470
0471 vector<double> px;
0472 vector<double> py;
0473
0474 TString index_word[16] = {"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15"};
0475
0476
0477
0478 map<TString,vector<ladder_pos>> ladder_pos_map;
0479
0480 double south_x_offset = -10;
0481 double north_x_offset = 10;
0482
0483 double B0L0_12_r = 10.2798/2.;
0484 double B0L0_point1_initial = 81;
0485 double B0L0_point2_initial = 69;
0486
0487 double B0L0_34_r = 9.9152/2.;
0488 double B0L0_point3_initial = 64;
0489 double B0L0_point4_initial = 86;
0490
0491
0492 double B0L1_12_r = 11.028/2.;
0493 double B0L1_point1_initial = 174 + 90;
0494 double B0L1_point2_initial = 186 + 90;
0495
0496 double B0L1_34_r = 10.6569/2.;
0497 double B0L1_point3_initial = 190 + 90;
0498 double B0L1_point4_initial = 170 + 90;
0499
0500
0501
0502 double B1L0_correction = 22.5 + 3.75;
0503 double B1L0_12_r = 13.6355/2.;
0504 double B1L0_point1_initial = 160 + 90 + B1L0_correction;
0505 double B1L0_point2_initial = 170 + 90 + B1L0_correction;
0506
0507 double B1L0_34_r = 13.2395/2.;
0508 double B1L0_point3_initial = 173 + 90 + B1L0_correction;
0509 double B1L0_point4_initial = 157 + 90 + B1L0_correction;
0510
0511
0512 double B1L1_correction = 3.5;
0513 double B1L1_12_r = 14.4022 /2.;
0514 double B1L1_point1_initial = 172 + 90 + B1L1_correction;
0515 double B1L1_point2_initial = 181 + 90 + B1L1_correction;
0516
0517 double B1L1_34_r = 14.007 /2.;
0518 double B1L1_point3_initial = 184 + 90 + B1L1_correction;
0519 double B1L1_point4_initial = 168 + 90 + B1L1_correction;
0520
0521 };
0522
0523 void TH2INTT::fill_ladder_pos_map(){
0524
0525 vector<ladder_pos> temp_vec; temp_vec.clear();
0526
0527
0528 for (int i = 0; i <12; i++)
0529 {
0530 temp_vec.push_back({
0531 B0L0_12_r * cos((B0L0_point1_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + south_x_offset, B0L0_12_r * sin((B0L0_point1_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0532 B0L0_12_r * cos((B0L0_point2_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + south_x_offset, B0L0_12_r * sin((B0L0_point2_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0533 B0L0_34_r * cos((B0L0_point3_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + south_x_offset, B0L0_34_r * sin((B0L0_point3_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0534 B0L0_34_r * cos((B0L0_point4_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + south_x_offset, B0L0_34_r * sin((B0L0_point4_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi()))
0535 });
0536 }
0537 ladder_pos_map["B0L0S"] = temp_vec; temp_vec.clear();
0538
0539
0540 for (int i = 0; i <12; i++)
0541 {
0542 temp_vec.push_back({
0543 B0L1_12_r * cos((B0L1_point1_initial - i * 30) / (180./TMath::Pi())) + south_x_offset, B0L1_12_r * sin((B0L1_point1_initial - i * 30) / (180./TMath::Pi())),
0544 B0L1_12_r * cos((B0L1_point2_initial - i * 30) / (180./TMath::Pi())) + south_x_offset, B0L1_12_r * sin((B0L1_point2_initial - i * 30) / (180./TMath::Pi())),
0545 B0L1_34_r * cos((B0L1_point3_initial - i * 30) / (180./TMath::Pi())) + south_x_offset, B0L1_34_r * sin((B0L1_point3_initial - i * 30) / (180./TMath::Pi())),
0546 B0L1_34_r * cos((B0L1_point4_initial - i * 30) / (180./TMath::Pi())) + south_x_offset, B0L1_34_r * sin((B0L1_point4_initial - i * 30) / (180./TMath::Pi()))
0547 });
0548 }
0549 ladder_pos_map["B0L1S"] = temp_vec; temp_vec.clear();
0550
0551
0552 for (int i = 0; i <16; i++)
0553 {
0554 temp_vec.push_back({
0555 B1L0_12_r * cos((B1L0_point1_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + south_x_offset, B1L0_12_r * sin((B1L0_point1_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0556 B1L0_12_r * cos((B1L0_point2_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + south_x_offset, B1L0_12_r * sin((B1L0_point2_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0557 B1L0_34_r * cos((B1L0_point3_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + south_x_offset, B1L0_34_r * sin((B1L0_point3_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0558 B1L0_34_r * cos((B1L0_point4_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + south_x_offset, B1L0_34_r * sin((B1L0_point4_initial - i * 22.5 - 22.5) / (180./TMath::Pi()))
0559 });
0560 }
0561 ladder_pos_map["B1L0S"] = temp_vec; temp_vec.clear();
0562
0563
0564 for (int i = 0; i <16; i++)
0565 {
0566 temp_vec.push_back({
0567 B1L1_12_r * cos((B1L1_point1_initial - i * 22.5) / (180./TMath::Pi())) + south_x_offset, B1L1_12_r * sin((B1L1_point1_initial - i * 22.5) / (180./TMath::Pi())),
0568 B1L1_12_r * cos((B1L1_point2_initial - i * 22.5) / (180./TMath::Pi())) + south_x_offset, B1L1_12_r * sin((B1L1_point2_initial - i * 22.5) / (180./TMath::Pi())),
0569 B1L1_34_r * cos((B1L1_point3_initial - i * 22.5) / (180./TMath::Pi())) + south_x_offset, B1L1_34_r * sin((B1L1_point3_initial - i * 22.5) / (180./TMath::Pi())),
0570 B1L1_34_r * cos((B1L1_point4_initial - i * 22.5) / (180./TMath::Pi())) + south_x_offset, B1L1_34_r * sin((B1L1_point4_initial - i * 22.5) / (180./TMath::Pi()))
0571 });
0572 }
0573 ladder_pos_map["B1L1S"] = temp_vec; temp_vec.clear();
0574
0575
0576
0577
0578
0579
0580 for (int i = 0; i <12; i++)
0581 {
0582 temp_vec.push_back({
0583 B0L0_12_r * cos((B0L0_point1_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + north_x_offset, B0L0_12_r * sin((B0L0_point1_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0584 B0L0_12_r * cos((B0L0_point2_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + north_x_offset, B0L0_12_r * sin((B0L0_point2_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0585 B0L0_34_r * cos((B0L0_point3_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + north_x_offset, B0L0_34_r * sin((B0L0_point3_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())),
0586 B0L0_34_r * cos((B0L0_point4_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi())) + north_x_offset, B0L0_34_r * sin((B0L0_point4_initial - 5 * 30 - i * 30 - 30) / (180./TMath::Pi()))
0587 });
0588 }
0589 ladder_pos_map["B0L0N"] = temp_vec; temp_vec.clear();
0590
0591
0592 for (int i = 0; i <12; i++)
0593 {
0594 temp_vec.push_back({
0595 B0L1_12_r * cos((B0L1_point1_initial - i * 30) / (180./TMath::Pi())) + north_x_offset, B0L1_12_r * sin((B0L1_point1_initial - i * 30) / (180./TMath::Pi())),
0596 B0L1_12_r * cos((B0L1_point2_initial - i * 30) / (180./TMath::Pi())) + north_x_offset, B0L1_12_r * sin((B0L1_point2_initial - i * 30) / (180./TMath::Pi())),
0597 B0L1_34_r * cos((B0L1_point3_initial - i * 30) / (180./TMath::Pi())) + north_x_offset, B0L1_34_r * sin((B0L1_point3_initial - i * 30) / (180./TMath::Pi())),
0598 B0L1_34_r * cos((B0L1_point4_initial - i * 30) / (180./TMath::Pi())) + north_x_offset, B0L1_34_r * sin((B0L1_point4_initial - i * 30) / (180./TMath::Pi()))
0599 });
0600 }
0601 ladder_pos_map["B0L1N"] = temp_vec; temp_vec.clear();
0602
0603
0604 for (int i = 0; i <16; i++)
0605 {
0606 temp_vec.push_back({
0607 B1L0_12_r * cos((B1L0_point1_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + north_x_offset, B1L0_12_r * sin((B1L0_point1_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0608 B1L0_12_r * cos((B1L0_point2_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + north_x_offset, B1L0_12_r * sin((B1L0_point2_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0609 B1L0_34_r * cos((B1L0_point3_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + north_x_offset, B1L0_34_r * sin((B1L0_point3_initial - i * 22.5 - 22.5) / (180./TMath::Pi())),
0610 B1L0_34_r * cos((B1L0_point4_initial - i * 22.5 - 22.5) / (180./TMath::Pi())) + north_x_offset, B1L0_34_r * sin((B1L0_point4_initial - i * 22.5 - 22.5) / (180./TMath::Pi()))
0611 });
0612 }
0613 ladder_pos_map["B1L0N"] = temp_vec; temp_vec.clear();
0614
0615
0616 for (int i = 0; i <16; i++)
0617 {
0618 temp_vec.push_back({
0619 B1L1_12_r * cos((B1L1_point1_initial - i * 22.5) / (180./TMath::Pi())) + north_x_offset, B1L1_12_r * sin((B1L1_point1_initial - i * 22.5) / (180./TMath::Pi())),
0620 B1L1_12_r * cos((B1L1_point2_initial - i * 22.5) / (180./TMath::Pi())) + north_x_offset, B1L1_12_r * sin((B1L1_point2_initial - i * 22.5) / (180./TMath::Pi())),
0621 B1L1_34_r * cos((B1L1_point3_initial - i * 22.5) / (180./TMath::Pi())) + north_x_offset, B1L1_34_r * sin((B1L1_point3_initial - i * 22.5) / (180./TMath::Pi())),
0622 B1L1_34_r * cos((B1L1_point4_initial - i * 22.5) / (180./TMath::Pi())) + north_x_offset, B1L1_34_r * sin((B1L1_point4_initial - i * 22.5) / (180./TMath::Pi()))
0623 });
0624 }
0625 ladder_pos_map["B1L1N"] = temp_vec; temp_vec.clear();
0626
0627 }
0628
0629 void TH2INTT::fill_ladder_line(){
0630
0631
0632
0633 for (int i = 0; i < ladder_pos_map["B0L0S"].size(); i++) {
0634 ladder_line.push_back(new TLine(ladder_pos_map["B0L0S"][i].x1, ladder_pos_map["B0L0S"][i].y1, ladder_pos_map["B0L0S"][i].x2, ladder_pos_map["B0L0S"][i].y2 ));
0635 ladder_line.push_back(new TLine(ladder_pos_map["B0L0S"][i].x2, ladder_pos_map["B0L0S"][i].y2, ladder_pos_map["B0L0S"][i].x3, ladder_pos_map["B0L0S"][i].y3 ));
0636 ladder_line.push_back(new TLine(ladder_pos_map["B0L0S"][i].x3, ladder_pos_map["B0L0S"][i].y3, ladder_pos_map["B0L0S"][i].x4, ladder_pos_map["B0L0S"][i].y4 ));
0637 ladder_line.push_back(new TLine(ladder_pos_map["B0L0S"][i].x4, ladder_pos_map["B0L0S"][i].y4, ladder_pos_map["B0L0S"][i].x1, ladder_pos_map["B0L0S"][i].y1 ));
0638 }
0639
0640
0641 for (int i = 0; i < ladder_pos_map["B0L1S"].size(); i++) {
0642 ladder_line.push_back(new TLine(ladder_pos_map["B0L1S"][i].x1, ladder_pos_map["B0L1S"][i].y1, ladder_pos_map["B0L1S"][i].x2, ladder_pos_map["B0L1S"][i].y2 ));
0643 ladder_line.push_back(new TLine(ladder_pos_map["B0L1S"][i].x2, ladder_pos_map["B0L1S"][i].y2, ladder_pos_map["B0L1S"][i].x3, ladder_pos_map["B0L1S"][i].y3 ));
0644 ladder_line.push_back(new TLine(ladder_pos_map["B0L1S"][i].x3, ladder_pos_map["B0L1S"][i].y3, ladder_pos_map["B0L1S"][i].x4, ladder_pos_map["B0L1S"][i].y4 ));
0645 ladder_line.push_back(new TLine(ladder_pos_map["B0L1S"][i].x4, ladder_pos_map["B0L1S"][i].y4, ladder_pos_map["B0L1S"][i].x1, ladder_pos_map["B0L1S"][i].y1 ));
0646 }
0647
0648
0649 for (int i = 0; i < ladder_pos_map["B1L0S"].size(); i++) {
0650 ladder_line.push_back(new TLine(ladder_pos_map["B1L0S"][i].x1, ladder_pos_map["B1L0S"][i].y1, ladder_pos_map["B1L0S"][i].x2, ladder_pos_map["B1L0S"][i].y2 ));
0651 ladder_line.push_back(new TLine(ladder_pos_map["B1L0S"][i].x2, ladder_pos_map["B1L0S"][i].y2, ladder_pos_map["B1L0S"][i].x3, ladder_pos_map["B1L0S"][i].y3 ));
0652 ladder_line.push_back(new TLine(ladder_pos_map["B1L0S"][i].x3, ladder_pos_map["B1L0S"][i].y3, ladder_pos_map["B1L0S"][i].x4, ladder_pos_map["B1L0S"][i].y4 ));
0653 ladder_line.push_back(new TLine(ladder_pos_map["B1L0S"][i].x4, ladder_pos_map["B1L0S"][i].y4, ladder_pos_map["B1L0S"][i].x1, ladder_pos_map["B1L0S"][i].y1 ));
0654 }
0655
0656
0657 for (int i = 0; i < ladder_pos_map["B1L1S"].size(); i++) {
0658 ladder_line.push_back(new TLine(ladder_pos_map["B1L1S"][i].x1, ladder_pos_map["B1L1S"][i].y1, ladder_pos_map["B1L1S"][i].x2, ladder_pos_map["B1L1S"][i].y2 ));
0659 ladder_line.push_back(new TLine(ladder_pos_map["B1L1S"][i].x2, ladder_pos_map["B1L1S"][i].y2, ladder_pos_map["B1L1S"][i].x3, ladder_pos_map["B1L1S"][i].y3 ));
0660 ladder_line.push_back(new TLine(ladder_pos_map["B1L1S"][i].x3, ladder_pos_map["B1L1S"][i].y3, ladder_pos_map["B1L1S"][i].x4, ladder_pos_map["B1L1S"][i].y4 ));
0661 ladder_line.push_back(new TLine(ladder_pos_map["B1L1S"][i].x4, ladder_pos_map["B1L1S"][i].y4, ladder_pos_map["B1L1S"][i].x1, ladder_pos_map["B1L1S"][i].y1 ));
0662 }
0663
0664
0665
0666
0667 for (int i = 0; i < ladder_pos_map["B0L0N"].size(); i++) {
0668 ladder_line.push_back(new TLine(ladder_pos_map["B0L0N"][i].x1, ladder_pos_map["B0L0N"][i].y1, ladder_pos_map["B0L0N"][i].x2, ladder_pos_map["B0L0N"][i].y2 ));
0669 ladder_line.push_back(new TLine(ladder_pos_map["B0L0N"][i].x2, ladder_pos_map["B0L0N"][i].y2, ladder_pos_map["B0L0N"][i].x3, ladder_pos_map["B0L0N"][i].y3 ));
0670 ladder_line.push_back(new TLine(ladder_pos_map["B0L0N"][i].x3, ladder_pos_map["B0L0N"][i].y3, ladder_pos_map["B0L0N"][i].x4, ladder_pos_map["B0L0N"][i].y4 ));
0671 ladder_line.push_back(new TLine(ladder_pos_map["B0L0N"][i].x4, ladder_pos_map["B0L0N"][i].y4, ladder_pos_map["B0L0N"][i].x1, ladder_pos_map["B0L0N"][i].y1 ));
0672 }
0673
0674
0675 for (int i = 0; i < ladder_pos_map["B0L1N"].size(); i++) {
0676 ladder_line.push_back(new TLine(ladder_pos_map["B0L1N"][i].x1, ladder_pos_map["B0L1N"][i].y1, ladder_pos_map["B0L1N"][i].x2, ladder_pos_map["B0L1N"][i].y2 ));
0677 ladder_line.push_back(new TLine(ladder_pos_map["B0L1N"][i].x2, ladder_pos_map["B0L1N"][i].y2, ladder_pos_map["B0L1N"][i].x3, ladder_pos_map["B0L1N"][i].y3 ));
0678 ladder_line.push_back(new TLine(ladder_pos_map["B0L1N"][i].x3, ladder_pos_map["B0L1N"][i].y3, ladder_pos_map["B0L1N"][i].x4, ladder_pos_map["B0L1N"][i].y4 ));
0679 ladder_line.push_back(new TLine(ladder_pos_map["B0L1N"][i].x4, ladder_pos_map["B0L1N"][i].y4, ladder_pos_map["B0L1N"][i].x1, ladder_pos_map["B0L1N"][i].y1 ));
0680 }
0681
0682
0683 for (int i = 0; i < ladder_pos_map["B1L0N"].size(); i++) {
0684 ladder_line.push_back(new TLine(ladder_pos_map["B1L0N"][i].x1, ladder_pos_map["B1L0N"][i].y1, ladder_pos_map["B1L0N"][i].x2, ladder_pos_map["B1L0N"][i].y2 ));
0685 ladder_line.push_back(new TLine(ladder_pos_map["B1L0N"][i].x2, ladder_pos_map["B1L0N"][i].y2, ladder_pos_map["B1L0N"][i].x3, ladder_pos_map["B1L0N"][i].y3 ));
0686 ladder_line.push_back(new TLine(ladder_pos_map["B1L0N"][i].x3, ladder_pos_map["B1L0N"][i].y3, ladder_pos_map["B1L0N"][i].x4, ladder_pos_map["B1L0N"][i].y4 ));
0687 ladder_line.push_back(new TLine(ladder_pos_map["B1L0N"][i].x4, ladder_pos_map["B1L0N"][i].y4, ladder_pos_map["B1L0N"][i].x1, ladder_pos_map["B1L0N"][i].y1 ));
0688 }
0689
0690
0691 for (int i = 0; i < ladder_pos_map["B1L1N"].size(); i++) {
0692 ladder_line.push_back(new TLine(ladder_pos_map["B1L1N"][i].x1, ladder_pos_map["B1L1N"][i].y1, ladder_pos_map["B1L1N"][i].x2, ladder_pos_map["B1L1N"][i].y2 ));
0693 ladder_line.push_back(new TLine(ladder_pos_map["B1L1N"][i].x2, ladder_pos_map["B1L1N"][i].y2, ladder_pos_map["B1L1N"][i].x3, ladder_pos_map["B1L1N"][i].y3 ));
0694 ladder_line.push_back(new TLine(ladder_pos_map["B1L1N"][i].x3, ladder_pos_map["B1L1N"][i].y3, ladder_pos_map["B1L1N"][i].x4, ladder_pos_map["B1L1N"][i].y4 ));
0695 ladder_line.push_back(new TLine(ladder_pos_map["B1L1N"][i].x4, ladder_pos_map["B1L1N"][i].y4, ladder_pos_map["B1L1N"][i].x1, ladder_pos_map["B1L1N"][i].y1 ));
0696 }
0697
0698
0699 }
0700
0701 void TH2INTT::fill_ladder_toinfo_map_bin(){
0702
0703 TString side_word;
0704 int bin_index = 1;
0705
0706 for (int arm = 0; arm < 2; arm++)
0707 {
0708 side_word = (arm == 0) ? "S" : "N";
0709
0710 for (int layer = 0; layer < 4; layer++)
0711 {
0712 int n_ladder = (layer < 2) ? 12 : 16;
0713
0714 for (int HL = 0; HL < n_ladder; HL++)
0715 {
0716 ladder_toinfo_map[ Form("%s%s%s",layer_map.at(layer).Data(),index_word[HL].Data(),side_word.Data()) ].bin_id = bin_index;
0717
0718
0719
0720 bin_index += 1;
0721 }
0722
0723
0724
0725 }
0726
0727 }
0728
0729 }
0730
0731 void TH2INTT::SetLadderSContent(TString ladder_name, double content)
0732 {
0733 TH2Poly::SetBinContent(ladder_toinfo_map.at(ladder_name).bin_id, content);
0734 }
0735
0736 void TH2INTT::SetSerFCSContent(TString server_FC, double content)
0737 {
0738 TH2Poly::SetBinContent(ladder_toinfo_map.at( serverFC_toinfo_map.at(server_FC).Ladder ).bin_id, content);
0739 }
0740
0741 void TH2INTT::SetLadderIContent(int barrel_id, int layer_id, int ladder_id, int side, double content)
0742 {
0743 if (side != 0 && side != 1) {
0744 cout<<"wrong side fill"<<endl;
0745 return;
0746 }
0747
0748 TString side_word = (side == 0) ? "S" : "N";
0749
0750 TH2Poly::SetBinContent(ladder_toinfo_map.at(Form("B%iL%i%s%s",barrel_id,layer_id,index_word[ladder_id].Data(),side_word.Data())).bin_id, content);
0751 }
0752
0753 void TH2INTT::SetSerFCIContent(int server_id, int FC_id, double content)
0754 {
0755 TH2Poly::SetBinContent(ladder_toinfo_map.at( serverFC_toinfo_map.at(Form("intt%i_%i",server_id,FC_id)).Ladder ).bin_id, content);
0756 }
0757
0758
0759
0760 double TH2INTT::GetLadderSContent(TString ladder_name)
0761 {
0762 return TH2Poly::GetBinContent(ladder_toinfo_map.at(ladder_name).bin_id);
0763 }
0764
0765 double TH2INTT::GetSerFCSContent(TString server_FC)
0766 {
0767 return TH2Poly::GetBinContent(ladder_toinfo_map.at( serverFC_toinfo_map.at(server_FC).Ladder ).bin_id);
0768 }
0769
0770 double TH2INTT::GetLadderIContent(int barrel_id, int layer_id, int ladder_id, int side)
0771 {
0772 if (side != 0 && side != 1) {
0773 cout<<"wrong side fill"<<endl;
0774 return 0;
0775 }
0776
0777 TString side_word = (side == 0) ? "S" : "N";
0778 return TH2Poly::GetBinContent(ladder_toinfo_map.at(Form("B%iL%i%s%s",barrel_id,layer_id,index_word[ladder_id].Data(),side_word.Data())).bin_id);
0779 }
0780
0781 double TH2INTT::GetSerFCIContent(int server_id, int FC_id)
0782 {
0783 return TH2Poly::GetBinContent(ladder_toinfo_map.at( serverFC_toinfo_map.at(Form("intt%i_%i",server_id,FC_id)).Ladder ).bin_id);
0784 }
0785
0786 #endif