]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWGGA/PHOSTasks/PHOS_PbPb/macros/production/CountRejected.C
Minor cleanup of CountRejected.C
[u/mrichter/AliRoot.git] / PWGGA / PHOSTasks / PHOS_PbPb / macros / production / CountRejected.C
CommitLineData
1c0b7911 1int total=0; int rejected=0;
2Float_t fromPt=1.; Float_t toPt=5.;
3
4namespace RawProduction {
5 class Output;
6}
7
8void CountReject(RawProduction::Output& output, const char* trigger, int cent, const char* pid, const char* methode)
9{
10 TH1* hist = output.GetHistogram(Form("%s/c%03i/%s/%s", trigger, cent, pid, methode));
11 int fromBin = hist->FindBin(fromPt);
12 int toBin = hist->FindBin( toPt);
13 for(int bin = fromBin; bin<=toBin; ++bin) {
14 ++total;
15 if( 0. == hist->GetBinContent(bin))
16 ++rejected;
17 }
18}
19
20
21void CountRejected()
22{
23 gROOT->LoadMacro("MakeRawProduction.C+g");
0d331407 24 RawProduction::Output output("RawProduction.root");
1c0b7911 25 gStyle->SetOptStat(0);
26
27 TStringToken pids("All Allcore Allwou Disp Disp2 Dispcore Dispwou CPV CPVcore CPV2 Both Bothcore", " ");
28 while( pids.NextToken() ) {
29 TStringToken fits("mr1r mr1 mr2r mr2", " ");
30 while( fits.NextToken() ) {
31 CountReject(output, "kMB", -1, pids.Data(), fits.Data());
32 //CountReject(output, "kMB", -11, pids.Data(), fits.Data());
33 CountReject(output, "kMB", -10, pids.Data(), fits.Data());
34 //CountReject(output, "kMB", -6, pids.Data(), fits.Data());
35
36 CountReject(output, "kCentral", -1, pids.Data(), fits.Data());
37
38 //CountReject(output, "kSemiCentral", -11, pids.Data(), fits.Data());
39 }
40 }
41
42
43 Printf("fits:%i, rejected:%i", total, rejected);
44}