#include "TTree.h" #include "TCut.h" #include using std::cout; using std::endl; #define NDX 10 const Float_t dx[NDX]={200.0, 1.0, 0.9, 0.8 , 0.75, 0.6, 0.5, 0.4, 0.3, 0.25}; Int_t nevt(0); Int_t s1_ntrack(0), s2_ntrack(0); //number poiting back to each track Int_t s1_pr(0), s2_pr(0); //number that have prehits Int_t s1_in(0), s2_in(0); //number that dont have in time hits Int_t s1_inef(0), s2_inef(0); //number that have no intime and not outtime hits void scan(TTree* ch_reco) { char cut[256]; TCut s1("evthdr.ntrack==1 && abs(vetohdr.projx)<6.0 && vetohdr.projz>0.5 && vetohdr.projz<7.5"); TCut s2("evthdr.ntrack==1 && abs(vetohdr.projx)<6.0 && vetohdr.projz>8.5 && vetohdr.projz<14.5"); nevt = ch_reco->Draw("vetohdr.projx", "evthdr.ntrack==1", "goff"); s1_ntrack = ch_reco->Draw("vetohdr.projx", s1, "goff"); s2_ntrack = ch_reco->Draw("vetohdr.projx", s2, "goff"); cout << "N Evnts: " << nevt <Draw("vetohdr.projx", s1 && cut, "goff"); s2_pr = ch_reco->Draw("vetohdr.projx", s2 && cut,"goff"); sprintf(cut, "abs(vetohdr.dx[1])> %f", dx[i]); s1_in = ch_reco->Draw("vetohdr.projx", s1 && cut,"goff"); s2_in = ch_reco->Draw("vetohdr.projx", s2 && cut,"goff"); sprintf(cut, "abs(vetohdr.dx[1])> %f && abs(vetohdr.dx[0])> %f", dx[i], dx[i]); s1_inef = ch_reco->Draw("vetohdr.projx", s1 && cut,"goff"); s2_inef = ch_reco->Draw("vetohdr.projx", s2 && cut,"goff"); cout << "dx:" <