I have a set of cuts that I’ve written in TCut form. Is there a way to apply these cuts in an event loop? The only way I know to apply cuts in an event loop is via if statements on branches whose locations have been set. I would like to do TTree::MakeClass and just use the list of TCuts I already have.
Hi,
How about something like:
myclass::Loop() {
fChain->Draw(">>eventlist",myTCut);
TEventList *elist = (TEventList*)gDirectory->Get("eventlist");
///fChain->SetEventList(elist);
for (Long64_t i = 0 ; i < elist->GetEntries() ; ++i) {
fChain->GetEntry(elist->GetEntry(i));
// do something useful here
}
}
Cheers,
Paul