546 |
|
(this->collection)[isamp].events->SetBranchAddress("lumi",&lumi); |
547 |
|
(this->collection)[isamp].events->SetBranchAddress("runNum",&runNum); |
548 |
|
|
549 |
< |
TTreeFormula *select = new TTreeFormula("select", "pfJetGoodNum>=3&&jzb[1]>100&&jzb[1]<150&&id1==id2", (this->collection)[isamp].events); |
549 |
> |
TTreeFormula *select = new TTreeFormula("select", cut.c_str()&&essentialcut, (this->collection)[isamp].events); |
550 |
> |
int npickedup=0; |
551 |
|
for (Int_t entry = 0 ; entry < (this->collection)[isamp].events->GetEntries() ; entry++) { |
552 |
|
(this->collection)[isamp].events->LoadTree(entry); |
553 |
|
if (select->EvalInstance()) { |
554 |
|
(this->collection)[isamp].events->GetEntry(entry); |
555 |
|
cout << runNum << ":" << lumi << ":" << eventNum << endl; |
556 |
+ |
npickedup++; |
557 |
|
} |
558 |
|
} |
559 |
+ |
cout << "Printed out a total of " << npickedup << " events" << endl; |
560 |
|
} |
561 |
|
|
562 |
|
|