42 |
|
Double_t fPtMax; //maximum pt |
43 |
|
Double_t fEtaMin; //minimum eta |
44 |
|
Double_t fEtaMax; //maximum eta |
45 |
< |
T *fCol; //!pointer to collection |
45 |
> |
Bool_t fLoadBr; //=true then load branch (def=1) |
46 |
> |
const Collection<T> *fCol; //!pointer to collection |
47 |
|
TH1D *fPtHist; //!pt histogram |
48 |
|
TH1D *fEtaHist; //!eta histogram |
49 |
+ |
TH1D *fMassHist; //!mass histogram |
50 |
+ |
TH1D *fMtHist; //!mt histogram |
51 |
|
|
52 |
|
void Process(); |
53 |
|
void SlaveBegin(); |
65 |
|
fPtMax(5000), |
66 |
|
fEtaMin(-10), |
67 |
|
fEtaMax(10), |
68 |
+ |
fLoadBr(kTRUE), |
69 |
|
fCol(0), |
70 |
|
fPtHist(0), |
71 |
|
fEtaHist(0) |
79 |
|
{ |
80 |
|
// Process entries of the tree: Just load the branch and fill the histograms. |
81 |
|
|
82 |
< |
LoadBranch(GetColName()); |
83 |
< |
|
82 |
> |
if (fLoadBr) |
83 |
> |
LoadBranch(GetColName()); |
84 |
> |
else |
85 |
> |
fCol = GetObjThisEvt<Collection<T> >(GetColName()); |
86 |
> |
|
87 |
|
Int_t ents=fCol->GetEntries(); |
88 |
|
for(Int_t i=0;i<ents;++i) { |
89 |
< |
const Particle *p = fCol->At(i); |
89 |
> |
const T *p = fCol->At(i); |
90 |
|
Double_t pt = p->Pt(); |
91 |
|
if (pt<fPtMin) |
92 |
|
continue; |
108 |
|
{ |
109 |
|
// Request a branch and create the histograms. |
110 |
|
|
111 |
< |
ReqBranch(GetColName(), fCol); |
111 |
> |
if (fLoadBr) |
112 |
> |
ReqBranch(GetColName(), fCol); |
113 |
|
|
114 |
< |
fPtHist = new TH1D("hPtHist",";p_{t};#",100,0.,25.); |
114 |
> |
fPtHist = new TH1D("hPtHist",";p_{t} [GeV];#",100,0.,250.); |
115 |
|
AddOutput(fPtHist); |
116 |
|
fEtaHist = new TH1D("hEtaHist",";#eta;#",160,-8.,8.); |
117 |
|
AddOutput(fEtaHist); |