109 Bool_t useList, fillList;
114 void h1analysisProxy_Begin(TTree *tree)
122 TString option = GetOption();
123 printf(
"Starting (begin) h1analysis with process option: %s\n",option.Data());
128 if (fChain) fChain->SetEntryList(0);
129 delete gDirectory->GetList()->FindObject(
"elist");
132 if (option.Contains(
"fillList")) {
134 elist =
new TEntryList(
"elist",
"H1 selection from Cut");
137 fInput->Add(
new TNamed(
"fillList",
""));
143 if (option.Contains(
"useList")) {
146 tree->SetEntryList(elist);
147 TFile f(
"elist.root");
148 elist = (TEntryList*)f.Get(
"elist");
149 if (elist) elist->SetDirectory(0);
152 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
153 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
159 void h1analysisProxy_SlaveBegin(TTree *tree)
170 TString option = GetOption();
171 printf(
"Starting (slave) h1analysis with process option: %s\n",option.Data());
174 hdmd =
new TH1F(
"hdmd",
"dm_d",40,0.13,0.17);
175 h2 =
new TH2F(
"h2",
"ptD0 vs dm_d",30,0.135,0.165,30,-3,6);
185 if (option.Contains(
"fillList")) {
189 if ((elist = (TEntryList *) fInput->FindObject(
"elist")))
191 elist = (TEntryList *) elist->Clone();
200 if (option.Contains(
"useList")) {
202 TFile f(
"elist.root");
203 elist = (TEntryList*)f.Get(
"elist");
204 if (elist) elist->SetDirectory(0);
205 if (tree) tree->SetEntryList(elist);
208 Warning(
"Begin",
"option 'useList' not supported in PROOF - ignoring");
209 Warning(
"Begin",
"the entry list must be set on the chain *before* calling Process");
215 Double_t h1analysisProxy() {
220 Bool_t h1analysisProxy_Process(Long64_t entry)
229 float f2 = md0_d-1.8646;
230 bool test = TMath::Abs(md0_d-1.8646) >= 0.04;
231 if (gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
232 fChain->GetReadEntry(),f1,f2,test);
234 if (TMath::Abs(md0_d-1.8646) >= 0.04)
return kFALSE;
235 if (ptds_d <= 2.5)
return kFALSE;
236 if (TMath::Abs(etads_d) >= 1.5)
return kFALSE;
243 test = nhitrp[cik]*nhitrp[cipi] <= 1;
244 if (gDebug>0) fprintf(stderr,
"entry #%lld f1=%f f2=%f test=%d\n",
245 fChain->GetReadEntry(),f1,f2,test);
247 if (nhitrp[cik]*nhitrp[cipi] <= 1)
return kFALSE;
248 if (rend[cik] -rstart[cik] <= 22)
return kFALSE;
249 if (rend[cipi]-rstart[cipi] <= 22)
return kFALSE;
250 if (nlhk[cik] <= 0.1)
return kFALSE;
251 if (nlhpi[cipi] <= 0.1)
return kFALSE;
253 if (nlhpi[ipis-1] <= 0.1)
return kFALSE;
254 if (njets < 1)
return kFALSE;
258 if (fillList) elist->Enter(entry);
262 h2->Fill(dm_d,rpd0_t/0.029979*1.8646/ptd0_d);
269 void h1analysisProxy_SlaveTerminate()
272 printf(
"Terminate (slave) h1analysis\n");
276 void h1analysisProxy_Terminate()
278 printf(
"Terminate (final) h1analysis\n");
282 hdmd =
dynamic_cast<TH1F*
>(fOutput->FindObject(
"hdmd"));
283 h2 =
dynamic_cast<TH2F*
>(fOutput->FindObject(
"h2"));
285 if (hdmd == 0 || h2 == 0) {
286 Error(
"Terminate",
"hdmd = %p , h2 = %p", hdmd, h2);
292 TCanvas *c1 =
new TCanvas(
"c1",
"h1analysis analysis",10,10,800,600);
293 c1->SetBottomMargin(0.15);
294 hdmd->GetXaxis()->SetTitle(
"m_{K#pi#pi} - m_{K#pi}[GeV/c^{2}]");
295 hdmd->GetXaxis()->SetTitleOffset(1.4);
298 TF1 *f5 =
new TF1(
"f5",fdm5,0.139,0.17,5);
299 f5->SetParameters(1000000, .25, 2000, .1454, .001);
300 hdmd->Fit(
"f5",
"lr");
303 gStyle->SetOptFit(0);
304 gStyle->SetOptStat(1100);
305 TCanvas *c2 =
new TCanvas(
"c2",
"tauD0",100,100,800,600);
307 c2->SetBottomMargin(0.15);
313 TF1 *f2 =
new TF1(
"f2",fdm2,0.139,0.17,2);
314 f2->SetParameters(10000, 10);
315 h2->FitSlicesX(f2,0,-1,1,
"qln");
316 TH1D *h2_1 = (TH1D*)gDirectory->Get(
"h2_1");
317 h2_1->GetXaxis()->SetTitle(
"#tau[ps]");
318 h2_1->SetMarkerStyle(21);
321 TLine *line =
new TLine(0,0,0,c2->GetUymax());
326 TPaveStats *psdmd = (TPaveStats *)hdmd->GetListOfFunctions()->FindObject(
"stats");
327 psdmd->SetOptStat(1110);
332 elist =
dynamic_cast<TEntryList*
>(fOutput->FindObject(
"elist"));
334 TFile efile(
"elist.root",
"recreate");
337 Error(
"Terminate",
"entry list requested but not found in output");