void chkef( ULong64_t low, ULong64_t high, ULong64_t n ){ cout<FindObject("AD"); TH1F * hc = new TH1F("hc","hc",2000,0.1,50); TH1F * ht = new TH1F("ht","ht",2000,0.1,50); TString cond= Form("(((RTS<<32)+(VTS<<16)+LTS)>=%lld)&&(((RTS<<32)+(VTS<<16)+LTS)<%lld)",low,high); TString condad=Form("&&( (((RTS<<32)+(VTS<<16)+LTS)>=%lld)&&(((RTS<<32)+(VTS<<16)+LTS)<%lld) )",low,high); // cout<Draw("T_FPMW_HF_C:T_FPMW_CATS2_C",cond.Data(),"goff"); long long a=AD->GetSelectedRows(); t1->Draw("T_FPMW_HF_C:T_FPMW_CATS2_C",Form("T_FPMW_CATS2_C<1 && T_FPMW_HF_C>2 && %s",cond.Data() ),"goff"); long long b=AD->GetSelectedRows(); cout << "CATS lost efficiency with resect to VAMOS" << 100.*b/a << "%" << endl; } cout << sep ; cout << "Forward (condition by before)" << endl; for(int i =0; i<4;i++) { t1->Draw(Form("IC[%d]>>ht",i+1),cond.Data() ,"goff"); t1->Draw(Form("IC[%d]>>hc",i+1),Form("IC[%d]>0.1 %s",i,condad.Data() ),"goff"); cout << "IC " << i << " " << hc->Integral()/ht->Integral()*100. << "%"<< endl; } cout << sep ; cout << "Backward (condition by after)" << endl; for(int i =0; i<4;i++) { t1->Draw(Form("IC[%d]>>ht",i),cond.Data() ,"goff"); t1->Draw(Form("IC[%d]>>hc",i),Form("IC[%d]>0.1 %s",i+1, condad.Data() ),"goff"); cout << "IC " << i+1 << " " << hc->Integral()/ht->Integral()*100. << "%"<< endl; } cout << sep ; cout << "DC (condition by IC[0])" << endl; for(int i =0; i<4;i++) { t1->Draw(Form("IC[0]>>ht"),cond.Data(),"goff"); t1->Draw(Form("IC[0]>>hc"),Form("EWIRE_%d>100 %s",i, condad.Data() ),"goff"); cout << "DC WIRE " << i << " " << hc->Integral()/ht->Integral()*100. << "%"<< endl; } cout << sep ; cout << "DC X (condition by IC[0])" << endl; for(int i =0; i<4;i++) { t1->Draw(Form("IC[0]>>ht"),cond.Data(),"goff"); t1->Draw(Form("IC[0]>>hc"),Form("DC%d_X>-1500 %s",i, condad.Data() ),"goff"); cout << "DCX" << i << " " << hc->Integral()/ht->Integral()*100. << "%"<< endl; } cout << sep ; cout << "Xf (condition by IC[0])" << endl; t1->Draw(Form("IC[0]>>ht"),cond.Data() ,"goff"); t1->Draw(Form("IC[0]>>hc"),Form("Xf>-1500 %s", condad.Data() ),"goff"); cout << "Xf " << hc->Integral()/ht->Integral()*100. << "%"<< endl; cout << sep ; delete hc; delete ht; } //==============================================================end /* ORIGINAL NAME but now the original code for VAMOS eff is above */ void EffCheck_fhjm() { ULong64_t hour; ULong64_t LTSmin=-1; ULong64_t LTSmax=-1; ULong64_t LTS,VTS,RTS, tmin,tmax,tmp; cout<< "============================================================\n" ; cout<<" "<GetName()<Get("AD"); tree->SetBranchAddress("LTS",<S); tree->SetBranchAddress("VTS",&VTS); tree->SetBranchAddress("RTS",&RTS); for (int i=1;iGetEntries();i++){ tree->GetEntry(i); tmp=(RTS<<32)+(VTS<<16)+LTS; if ((LTS>0)&&(tmp>1e+14)){ //================== kill some low values? if ((LTSmin>tmp) || (LTSmin==-1)){ LTSmin=tmp; } if ((LTSmaxDraw("(RTS<<32)+(VTS<<16)+LTS>>h(10000)","",""); // Long64_t LTSmin=AD->GetV1()[0]; // AD->Draw("RTS<<32+VTS<<16+LTS","LTS>0","goff", 1, AD->GetEntries()-1 ); // Long64_t LTSmax=AD->GetV1()[0]; cout<<"min "<