ATLAS Offline Software
Functions
CscBins Namespace Reference

Functions

void BinLabels (TH1 *h, int side)
 

Function Documentation

◆ BinLabels()

void CscBins::BinLabels ( TH1 h,
int  side 
)

Definition at line 32 of file CscClusterValAlg.cxx.

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