(no subject)

From: Maarten Bruinsma (t26@nikhef.nl)
Date: Mon Jun 23 1997 - 13:37:12 MEST


Dear ROOT,

When I want to determine how many entries in my ntuple
satisfy a certain selection, do I have to give an explicit command that
the selection-string has to be processed? I have tried the following:

// Calculate efficiencies:
 
 Float_t Ptcut,Pcut;
 Int_t Nr_Selected;
 Int_t Nr_NotSelected;
 Char_t Cuts[80];
 sprintf(Cuts,"sqrt(Px*Px+Py*Py)>0");
 TTreeFormula* Selection = new TTreeFormula("selectionform", Cuts,
muontuple);
 Nr_NotSelected= muontuple->GetSelectedRows();
 
 for(Ptcut=0;Ptcut<2;Ptcut+=0.1)
 {
 for(Pcut=0;Pcut<20;Pcut+=1)
 {
 sprintf(Cuts," sqrt(Px*Px+Py*Py)> %f &&  sqrt(Px*Px+Py*Py+Pz*Pz) > %f",
Ptcut, Pcut);
 Nr_Selected = muontuple->GetSelectedRows(); 
 
 Efficiencies->Fill(Nr_Selected,Ptcut,Pcut);
 
 }
 }

But somehow the NrSelected is always zero. What should I do?

Thanks,

Maarten



**********************************************************************
*                         Maarten Bruinsma                           *
**********************************************************************



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:19 MET