ATLAS Offline Software
Public Member Functions | List of all members
NHitStack Class Reference
Inheritance diagram for NHitStack:
Collaboration diagram for NHitStack:

Public Member Functions

 NHitStack (TNtuple *, TLegend *, bool, int, int)
 

Detailed Description

Definition at line 101 of file TRTCalib_makeplots.cxx.

Constructor & Destructor Documentation

◆ NHitStack()

NHitStack::NHitStack ( TNtuple *  tuple,
TLegend *  leg,
bool  doleg,
int  mint0,
int  minrt 
)

Definition at line 107 of file TRTCalib_makeplots.cxx.

108 {
109 
110  int min = (int)tuple->GetMinimum("nt0");
111  int max = (int)tuple->GetMaximum("nt0");
112  float bsize = ceil(((float)(max - min) / 50));
113  int hmax = min + (int)(50 * bsize);
114  // cout << min << " " << max << " " << bsize << " " << hmax << endl;
115  TH1F *hits1 = new TH1F(Form("%s_hits1", tuple->GetName()), "test1", 50, min, hmax);
116  TH1F *hits2 = new TH1F(Form("%s_hits2", tuple->GetName()), "test2", 50, min, hmax);
117  TH1F *hits3 = new TH1F(Form("%s_hits3", tuple->GetName()), "test3", 50, min, hmax);
118  // TH1F* hits2 = new TH1F("hits2","test2",50,min,hmax);
119  // TH1F* hits3 = new TH1F("hits3","test3",50,min,hmax);
120  tuple->Draw(Form("nt0>>%s_hits1", tuple->GetName()), Form("nt0<=%i", mint0));
121  tuple->Draw(Form("nt0>>%s_hits2", tuple->GetName()), Form("nt0>%i && nt0<=%i", mint0, minrt));
122  tuple->Draw(Form("nt0>>%s_hits3", tuple->GetName()), Form("nt0>%i", minrt));
123  hits1->SetFillColor(46);
124  hits2->SetFillColor(8);
125  hits3->SetFillColor(38);
126 
127  // gStyle->SetOptStat("e");
128 
129  this->Add(hits1);
130  this->Add(hits2);
131  this->Add(hits3);
132 
133  if (doleg)
134  {
135  leg->AddEntry(hits1, "no calibration");
136  leg->AddEntry(hits2, "enough for T0 calib");
137  leg->AddEntry(hits3, "enough for T0+RT calib");
138  leg->SetTextSize(0.04);
139  }
140 }

The documentation for this class was generated from the following file:
max
#define max(a, b)
Definition: cfImp.cxx:41
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
compute_lumi.leg
leg
Definition: compute_lumi.py:95
min
#define min(a, b)
Definition: cfImp.cxx:40
hmax
double hmax(TH1 *&h)
Definition: listroot.cxx:115
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24