|
ATLAS Offline Software
|
Go to the documentation of this file.
8 #include "TProfile2D.h"
36 if (
hist->GetXaxis()->GetNbins() !=
nFEBs(
part))
return false;
42 for (
int i = 0;
i < nTicks;
i++)
88 for (
unsigned int c = 0;
c < 10;
c++)
127 if (
layer == 1)
return 2;
128 if (
layer == 2)
return 2;
133 if (
layer == 1)
return 6;
134 if (
layer == 2)
return 2;
173 if (
layer == 0)
return 61;
175 if (region == 0)
return 447;
176 if (region == 1)
return 3;
179 if (region == 0)
return 56;
180 if (region == 1)
return 1;
182 if (
layer == 3)
return 27;
186 if (
layer == 0)
return 12;
188 if (region == 0)
return 1;
189 if (region == 1)
return 3;
190 if (region == 2)
return 96;
191 if (region == 3)
return 48;
192 if (region == 4)
return 64;
193 if (region == 5)
return 4;
196 if (region == 0)
return 1;
197 if (region == 1)
return 43;
199 if (
layer == 3)
return 20;
203 if (
layer == 0)
return 0;
204 if (
layer == 1)
return 7;
205 if (
layer == 2)
return 7;
206 if (
layer == 3)
return 0;
210 if (
layer >= 4)
return 0;
211 if (region == 0) {
short n[4] = { 10, 10, 9, 8 };
return n[
layer]; }
212 if (region == 1) {
short n[4] = { 4, 3, 3, 4 };
return n[
layer]; }
216 if (
layer > 3)
return 0;
217 if (
layer == 1)
return 63;
219 short n[16] = { 30, 32, 32, 31, 31, 32, 32, 30, 30, 32, 32, 31, 31, 32, 32, 30 };
231 if (
layer > 3)
return 0;
232 if (region == 1)
return (
layer == 1 ||
layer == 2 ? 256 : 0);
233 short n[4] = { 64, 64, 256, 256 };
237 if (
layer > 3)
return 0;
238 short n[4] = { 64, 64, 256, 256 };
243 short n[3] = { 0, 64, 64 };
250 if (
layer > 3)
return 0;
251 if (region == 0)
return 64;
252 if (region == 1)
return 32;
256 if (
layer > 3)
return 0;
257 short n[4] = { 0, 16, 16, 16 };
267 if (
layer > 3)
return 0;
268 double w[4] = { 0.025, 0.0249724/8, 0.025, 0.050 };
269 double nominal =
w[
layer];
270 if (
iEta == -1)
return nominal;
276 if (
layer == 0)
return nominal;
277 if (calo ==
EMB_A &&
layer == 1 && region == 0 &&
iEta == 0)
return nominal*1.5;
279 if (
layer == 1 && region == 0)
return nominal;
280 if (
layer == 1 && region == 1)
return 8*nominal;
281 if (
layer == 2 && region == 0)
return nominal;
282 if (
layer == 2 && region == 1)
return 3*nominal;
283 if (
layer == 3)
return nominal;
288 if (
layer > 3)
return 0;
289 double w[4] = { 0.025, 0.025/8, 0.025, 0.050 };
290 double nominal =
w[
layer];
291 if (
iEta == -1)
return nominal;
300 if (
layer == 0)
return nominal;
301 if (
layer == 1 && region == 0)
return 16*nominal;
302 if (
layer == 1 && region == 1)
return 8*nominal;
303 if (
layer == 1 && region == 2)
return nominal;
304 if (
layer == 1 && region == 3)
return 4/3.*nominal;
305 if (
layer == 1 && region == 4)
return 2*nominal;
306 if (
layer == 1 && region == 5)
return 8*nominal;
307 if (
layer == 2 && region == 0)
return 2*nominal;
308 if (
layer == 2 && region == 1)
return nominal;
309 if (
layer == 3)
return nominal;
314 if (
layer > 3)
return 0;
315 double nominal = 0.1;
316 if (
iEta == -1)
return nominal;
319 if (
layer == 1)
return nominal;
320 if (
layer == 2)
return nominal;
321 if (
layer == 3)
return nominal;
326 if (
layer > 3)
return 0;
327 if (region == 0)
return 0.1;
328 if (region == 1)
return 0.2;
333 double nominal = 1.8/64;
334 if (
layer == 1)
return nominal;
335 if (
layer == 2)
return 2*nominal;
336 if (
layer == 3)
return 4*nominal;
346 if (
layer > 3)
return 0;
350 if (nphi!=0) nominal=TMath::TwoPi()/nphi;
366 if (
layer == 1 && region == 0)
return 0;
367 if (region == 1)
return 1.40;
371 if (
layer == 0)
return 1.5;
373 if (region == 0)
return 1.385;
374 if (region == 1)
return 1.435;
375 if (region == 2)
return 1.51;
376 if (region == 3)
return 1.81;
377 if (region == 4)
return 2.01;
378 if (region == 5)
return 2.41;
381 if (region == 0)
return 1.385;
382 if (region == 1)
return 1.435;
384 if (
layer == 3)
return 1.5;
389 if (region == 0)
return 1.5;
390 if (region == 1)
return 2.5;
392 if (calo ==
FCAL_A)
return 3.1;
408 if (
layer == 0)
return 1.52;
410 if (region == 0)
return 1.40;
411 if (region == 1)
return 1.475;
413 if (
layer == 3)
return 1.35;
416 if (
layer == 0)
return 1.8;
418 if (region == 0)
return 1.435;
419 if (region == 1)
return 1.51;
420 if (region == 2)
return 1.81;
421 if (region == 3)
return 2.01;
422 if (region == 4)
return 2.41;
423 if (region == 5)
return 2.51;
426 if (region == 0)
return 1.435;
427 if (region == 1)
return 2.51;
429 if (
layer == 3)
return 2.5;
434 if (region == 0)
return 2.5;
435 if (region == 1)
return 3.3;
437 if (calo ==
FCAL_A)
return 4.9;
474 if (
layer == 2 && region >= 1)
iEta += 1;
477 if (region == 1)
iEta += 10;
489 std::vector<TArrayD*>
v;
v.push_back(&binsC);
v.push_back(&binsA);
495 std::vector<TArrayD*>
v;
v.push_back(&binsO);
v.push_back(&binsI);
502 binsBA =
remove(binsBA, -1);
503 binsBA =
remove(binsBA, -1);
504 binsOA =
remove(binsOA, 0);
505 }
else if (
layer == 2) {
506 binsBA =
remove(binsBA, -1);
509 TArrayD binsBC =
mirror(binsBA);
510 TArrayD binsOC =
mirror(binsOA);
511 std::vector<TArrayD*>
v;
512 v.push_back(&binsOC);
v.push_back(&binsBC);
513 v.push_back(&binsBA);
v.push_back(&binsOA);
520 std::vector<TArrayD*>
v;
521 v.push_back(&binsIC);
v.push_back(&binsPE);
v.push_back(&binsIA);
528 TArrayD trans(2); trans[0] = -1.5; trans[1] = 1.5;
529 std::vector<TArrayD*>
v;
530 v.push_back(&binsHC);
v.push_back(&trans);
v.push_back(&binsHA);
534 if (
nEta(calo,
layer) == 0)
return TArrayD();
540 for (
short k = 0;
k < nRegs;
k++) {
541 for (
short ii = 0; ii <
nEta(calo,
layer,
k); ii++,
i++)
557 h->GetXaxis()->SetTitle(
"#eta");
558 h->GetYaxis()->SetTitle(
"#phi");
629 std::vector<std::string> ftBarrelA, ftBarrelC;
630 ftBarrelA.resize(32); ftBarrelC.resize(32);
631 ftBarrelA[0] =
" 0-01L"; ftBarrelC[0] =
" 0-09L";
632 ftBarrelA[1] =
" 1-02R"; ftBarrelC[1] =
" 1-08R";
633 ftBarrelA[2] =
" 2-02L"; ftBarrelC[2] =
" 2-08L";
634 ftBarrelA[3] =
" 3-03R"; ftBarrelC[3] =
" 3-07R";
635 ftBarrelA[4] =
" 4-03L"; ftBarrelC[4] =
" 4-07L";
636 ftBarrelA[5] =
" 5-04R"; ftBarrelC[5] =
" 5-06R";
637 ftBarrelA[6] =
" 6-04L"; ftBarrelC[6] =
" 6-06L";
638 ftBarrelA[7] =
" 7-05R"; ftBarrelC[7] =
" 7-05R";
639 ftBarrelA[8] =
" 8-05L"; ftBarrelC[8] =
" 8-05L";
640 ftBarrelA[9] =
" 9-06R"; ftBarrelC[9] =
" 9-04R";
641 ftBarrelA[10] =
"10-06L"; ftBarrelC[10] =
"10-04L";
642 ftBarrelA[11] =
"11-07R"; ftBarrelC[11] =
"11-03R";
643 ftBarrelA[12] =
"12-07L"; ftBarrelC[12] =
"12-03L";
644 ftBarrelA[13] =
"13-08R"; ftBarrelC[13] =
"13-02R";
645 ftBarrelA[14] =
"14-08L"; ftBarrelC[14] =
"14-02L";
646 ftBarrelA[15] =
"15-09R"; ftBarrelC[15] =
"15-01R";
647 ftBarrelA[16] =
"16-09L"; ftBarrelC[16] =
"16-01L";
648 ftBarrelA[17] =
"17-10R"; ftBarrelC[17] =
"17-16R";
649 ftBarrelA[18] =
"18-10L"; ftBarrelC[18] =
"18-16L";
650 ftBarrelA[19] =
"19-11R"; ftBarrelC[19] =
"19-15R";
651 ftBarrelA[20] =
"20-11L"; ftBarrelC[20] =
"20-15L";
652 ftBarrelA[21] =
"21-12R"; ftBarrelC[21] =
"21-14R";
653 ftBarrelA[22] =
"22-12L"; ftBarrelC[22] =
"22-14L";
654 ftBarrelA[23] =
"23-13R"; ftBarrelC[23] =
"23-13R";
655 ftBarrelA[24] =
"24-13L"; ftBarrelC[24] =
"24-13L";
656 ftBarrelA[25] =
"25-14R"; ftBarrelC[25] =
"25-12R";
657 ftBarrelA[26] =
"26-14L"; ftBarrelC[26] =
"26-12L";
658 ftBarrelA[27] =
"27-15R"; ftBarrelC[27] =
"27-11R";
659 ftBarrelA[28] =
"28-15L"; ftBarrelC[28] =
"28-11L";
660 ftBarrelA[29] =
"29-16R"; ftBarrelC[29] =
"29-10R";
661 ftBarrelA[30] =
"30-16L"; ftBarrelC[30] =
"30-10L";
662 ftBarrelA[31] =
"31-01R"; ftBarrelC[31] =
"31-09R";
665 std::vector<std::string> ftEndcapA, ftEndcapC;
666 ftEndcapA.resize(25); ftEndcapC.resize(25);
667 ftEndcapA[0] =
" 0-01R"; ftEndcapC[0] =
" 0-07R";
668 ftEndcapA[1] =
" 1-01L"; ftEndcapC[1] =
" 1-07L";
669 ftEndcapA[2] =
" 2-02R"; ftEndcapC[2] =
" 2-06R";
670 ftEndcapA[3] =
" 3-02L"; ftEndcapC[3] =
" 3-06L";
671 ftEndcapA[4] =
" 4-03R"; ftEndcapC[4] =
" 4-05R";
672 ftEndcapA[5] =
" 5-03L"; ftEndcapC[5] =
" 5-05L";
673 ftEndcapA[6] =
" 6-04R"; ftEndcapC[6] =
" 6-04L";
674 ftEndcapA[7] =
" 7-05R"; ftEndcapC[7] =
" 7-03R";
675 ftEndcapA[8] =
" 8-05L"; ftEndcapC[8] =
" 8-03L";
676 ftEndcapA[9] =
" 9-06R"; ftEndcapC[9] =
" 9-02R";
677 ftEndcapA[10] =
"10-06L"; ftEndcapC[10] =
"10-02L";
678 ftEndcapA[11] =
"11-07R"; ftEndcapC[11] =
"11-01R";
679 ftEndcapA[12] =
"12-07L"; ftEndcapC[12] =
"12-01L";
680 ftEndcapA[13] =
"13-08R"; ftEndcapC[13] =
"13-13R";
681 ftEndcapA[14] =
"14-08L"; ftEndcapC[14] =
"14-13L";
682 ftEndcapA[15] =
"15-09R"; ftEndcapC[15] =
"15-12R";
683 ftEndcapA[16] =
"16-09L"; ftEndcapC[16] =
"16-12L";
684 ftEndcapA[17] =
"17-10R"; ftEndcapC[17] =
"17-11R";
685 ftEndcapA[18] =
"18-10L"; ftEndcapC[18] =
"18-11L";
686 ftEndcapA[19] =
"19-11R"; ftEndcapC[19] =
"19-10R";
687 ftEndcapA[20] =
"20-11L"; ftEndcapC[20] =
"20-10L";
688 ftEndcapA[21] =
"21-12R"; ftEndcapC[21] =
"21-09R";
689 ftEndcapA[22] =
"22-12L"; ftEndcapC[22] =
"22-09L";
690 ftEndcapA[23] =
"23-13R"; ftEndcapC[23] =
"23-08R";
691 ftEndcapA[24] =
"24-13L"; ftEndcapC[24] =
"24-08L";
703 std::vector<TArrayD*> nonEmptyArrays;
705 for (
unsigned int k = 0;
k < arrays.size();
k++) {
706 if (arrays[
k]->GetSize() == 0)
continue;
707 n += arrays[
k]->GetSize();
708 nonEmptyArrays.push_back(arrays[
k]);
711 TArrayD
bins(
n - nonEmptyArrays.size() + 1);
713 for (
unsigned int k = 0;
k < nonEmptyArrays.size();
k++)
714 for (
int ii = 0; ii < nonEmptyArrays[
k]->GetSize() - 1; ii++,
i++)
715 bins[
i] = (*nonEmptyArrays[
k])[ii];
716 bins[
i] = (*nonEmptyArrays[nonEmptyArrays.size() - 1])[nonEmptyArrays[nonEmptyArrays.size() - 1]->GetSize() - 1];
723 int n =
bins.GetSize();
724 TArrayD mirrorBins(
n);
725 for (
int k = 0;
k <
n;
k++)
726 mirrorBins[
k] = -
bins[
n -
k - 1];
732 int n =
bins.GetSize();
738 for (
int kk = 0;
kk <
n;
kk++) {
static double phiSize(CaloId calo, short layer, short region, short iPhi=-1)
static TH2D * etaPhiHist(CaloId calo, short layer, const TString &name, const TString &title)
static bool matchCalo(CaloId id, CaloId idSpec)
static TArrayD merge(const std::vector< TArrayD * > &arrays)
static bool setBinLabels(TH2 *hist, PartitionId part)
static short nRegions(CaloId calo, short layer)
static CaloId summary(CaloId id)
static double phiCenter(CaloId calo, short layer, short region, short iPhi)
static double phiHigh(CaloId calo, short layer, short region, short iPhi)
static double phi(CaloId calo, short layer, short region, short iPhi)
static short nSlots(PartitionId part)
static double etaMin(CaloId calo, short layer, short region=-1)
static double etaSize(CaloId calo, short layer, short region, short iEta=-1)
static short etaIndex(CaloId calo, short layer, short region, short iEta)
static short nPhi(CaloId calo, short layer, short region=0)
static short nPartitionChannels(PartitionId part)
static short nLayers(CaloId calo)
static TH2D * partitionHist(PartitionId part, const TString &name, const TString &title)
static TProfile2D * partitionProfileHist(PartitionId part, const TString &name, const TString &title)
static double eta(CaloId calo, short layer, short region, short iEta)
static double phiMin(CaloId calo, short layer, short region=-1)
static short firstLayer(CaloId calo)
static double etaCenter(CaloId calo, short layer, short region, short iEta)
static double etaMax(CaloId calo, short layer, short region=-1)
static TArrayD mirror(const TArrayD &bins)
static short nFeedThroughs(PartitionId part)
static double etaHigh(CaloId calo, short layer, short region, short iEta)
static short nEta(CaloId calo, short layer, short region, short iPhi=1)
static CaloId mirror(CaloId id)
static TArrayD remove(const TArrayD &bins, int index)
static int nChannels(CaloId calo, short layer, short region)
static TArrayD etaBins(CaloId calo, short layer)
setScale setgFexType iEta
static short sign(CaloId id)
static short firstEta(CaloId calo, short layer, short region=0)
static TString feedThroughName(PartitionId part, short feedThrough)
constexpr std::size_t nPhiBins