Dear ROOTers,
I am using root Version 4.00/02 20 February 2004.
I am trying to understand how TTree.Process() working.
I have class myselect : public TSelector {…} and following code in myselect::Process():
fChain->GetTree()->GetEntry(entry);
for (Int_t count = 0; count<T2IdNtracks; ++count) {
if ((T2IdAlgo[count]==3)&&(abs(T2IdEta[count])<0.7)&&(abs(T2IdPt[count])>5.0)) {
PtHist->Fill(T2IdPt[count]);
}
}
I run 2 commands:
chain.Process(“myselect.C”);
and
chain.Draw(“T2IdPt>>nhitsf(100,-150,150)”,"(T2IdAlgo==3)&(abs(T2IdEta)<0.7)&(abs(T2IdPt)>5)");
Should nhitsf and PtHist contain same data?
In my case i have a bit more data in PtHist. Is it correct?
PtHist created by following code:
TH1F PtHist = new TH1F (“pt”, “Selectors Pt”, 100, -150, 150);
Thank you.