ATLAS Offline Software
Functions
CscPrdBins Namespace Reference

Functions

void PrdBinLabels (TH1 *h, int side)
 

Function Documentation

◆ PrdBinLabels()

void CscPrdBins::PrdBinLabels ( TH1 h,
int  side 
)

Definition at line 30 of file CscPrdValAlg.cxx.

30  {
31  h->GetXaxis()->SetTitle("");
32  h->GetXaxis()->SetLabelSize(0.03);
33  if(side == -1) {
34  for(size_t j=6; j<86; j++) {
35  if( j%5 != 0 ) {
36  float xmid = h->GetBinLowEdge(j) + h->GetBinWidth(j);
37  xmid -= 1.0; xmid *= -1.0;
38  int seclay = int(ceil(xmid*10)); // get sector/layer
39  int sec = seclay/10;
40  int lay = (seclay%10)/2 ;
41  lay = (4 - lay) + 1;
42  h->GetXaxis()->SetBinLabel(j,Form("%c%02d:%d",(sec%2==0?'S':'L'),sec,lay));
43  } // end for
44  } // end if
45  } else if (side == 1) {
46  for(size_t j=6; j<86; j++) {
47  if( j%5 != 0 ) {
48  float xmid = h->GetBinLowEdge(j) + h->GetBinWidth(j);
49  int seclay = int(ceil(xmid*10)); // get sector/layer
50  int sec = seclay/10;
51  int lay = (seclay%10)/2 ;
52  h->GetXaxis()->SetBinLabel(j,Form("%c%02d:%d",(sec%2==0?'S':'L'),sec,lay));
53  }
54  } // end for
55  } // end else
56 
57  } // BinLabels
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TRT::Hit::side
@ side
Definition: HitInfo.h:83
h